summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Carlton <carlton@bactrian.org>2003-06-27 21:50:37 +0000
committerDavid Carlton <carlton@bactrian.org>2003-06-27 21:50:37 +0000
commitf9d1068d7181f399f83f153dbdd3150188a699bf (patch)
treec38af7b159de09bbfbed9a92513049b11305618b
parent2dc24d0234c7499ed20e4e2560000854890843a6 (diff)
downloadgdb-f9d1068d7181f399f83f153dbdd3150188a699bf.tar.gz
2003-06-27 David Carlton <carlton@kealia.com>
* Merge with mainline; tag is carlton_dictionary-20030627-merge.
-rw-r--r--COPYING.NEWLIB27
-rw-r--r--ChangeLog112
-rw-r--r--Makefile.in18609
-rw-r--r--README-maintainer-mode2
-rw-r--r--bfd/ChangeLog683
-rw-r--r--bfd/Makefile.am37
-rw-r--r--bfd/Makefile.in41
-rw-r--r--bfd/aout-ns32k.c2
-rw-r--r--bfd/aoutx.h28
-rw-r--r--bfd/archures.c1
-rw-r--r--bfd/bfd-in.h2
-rw-r--r--bfd/bfd-in2.h38
-rw-r--r--bfd/bfd.c6
-rw-r--r--bfd/bout.c12
-rw-r--r--bfd/coff-a29k.c9
-rw-r--r--bfd/coff-alpha.c46
-rw-r--r--bfd/coff-apollo.c4
-rw-r--r--bfd/coff-arm.c32
-rw-r--r--bfd/coff-h8300.c2
-rw-r--r--bfd/coff-h8500.c2
-rw-r--r--bfd/coff-i386.c12
-rw-r--r--bfd/coff-i860.c8
-rw-r--r--bfd/coff-i960.c16
-rw-r--r--bfd/coff-m68k.c14
-rw-r--r--bfd/coff-m88k.c6
-rw-r--r--bfd/coff-mcore.c10
-rw-r--r--bfd/coff-mips.c40
-rw-r--r--bfd/coff-or32.c6
-rw-r--r--bfd/coff-ppc.c22
-rw-r--r--bfd/coff-rs6000.c4
-rw-r--r--bfd/coff-sh.c18
-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.c7
-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/coff64-rs6000.c4
-rw-r--r--bfd/coffcode.h180
-rw-r--r--bfd/cofflink.c54
-rw-r--r--bfd/config.bfd47
-rw-r--r--bfd/config.in9
-rwxr-xr-xbfd/configure134
-rw-r--r--bfd/configure.in4
-rw-r--r--bfd/cpu-h8300.c26
-rw-r--r--bfd/cpu-ns32k.c18
-rw-r--r--bfd/doc/bfdint.texi30
-rw-r--r--bfd/ecoff.c16
-rw-r--r--bfd/ecofflink.c22
-rw-r--r--bfd/elf-bfd.h7
-rw-r--r--bfd/elf-eh-frame.c2
-rw-r--r--bfd/elf-hppa.h10
-rw-r--r--bfd/elf-m10200.c14
-rw-r--r--bfd/elf-m10300.c16
-rw-r--r--bfd/elf.c59
-rw-r--r--bfd/elf32-arm.h14
-rw-r--r--bfd/elf32-avr.c6
-rw-r--r--bfd/elf32-cris.c15
-rw-r--r--bfd/elf32-d10v.c9
-rw-r--r--bfd/elf32-dlx.c8
-rw-r--r--bfd/elf32-fr30.c11
-rw-r--r--bfd/elf32-frv.c12
-rw-r--r--bfd/elf32-h8300.c21
-rw-r--r--bfd/elf32-hppa.c15
-rw-r--r--bfd/elf32-i370.c12
-rw-r--r--bfd/elf32-i386.c360
-rw-r--r--bfd/elf32-i860.c8
-rw-r--r--bfd/elf32-i960.c6
-rw-r--r--bfd/elf32-ip2k.c8
-rw-r--r--bfd/elf32-iq2000.c6
-rw-r--r--bfd/elf32-m32r.c28
-rw-r--r--bfd/elf32-m68hc11.c4
-rw-r--r--bfd/elf32-m68hc1x.c6
-rw-r--r--bfd/elf32-m68k.c6
-rw-r--r--bfd/elf32-mcore.c12
-rw-r--r--bfd/elf32-mips.c354
-rw-r--r--bfd/elf32-msp430.c4
-rw-r--r--bfd/elf32-openrisc.c10
-rw-r--r--bfd/elf32-ppc.c585
-rw-r--r--bfd/elf32-ppc.h6
-rw-r--r--bfd/elf32-s390.c8
-rw-r--r--bfd/elf32-sh.c24
-rw-r--r--bfd/elf32-sh64.c10
-rw-r--r--bfd/elf32-sparc.c8
-rw-r--r--bfd/elf32-v850.c42
-rw-r--r--bfd/elf32-vax.c4
-rw-r--r--bfd/elf32-xstormy16.c14
-rw-r--r--bfd/elf32-xtensa.c28
-rw-r--r--bfd/elf64-alpha.c14
-rw-r--r--bfd/elf64-hppa.c2
-rw-r--r--bfd/elf64-mips.c214
-rw-r--r--bfd/elf64-mmix.c12
-rw-r--r--bfd/elf64-ppc.c1774
-rw-r--r--bfd/elf64-ppc.h26
-rw-r--r--bfd/elf64-s390.c8
-rw-r--r--bfd/elf64-sh64.c32
-rw-r--r--bfd/elf64-sparc.c10
-rw-r--r--bfd/elf64-x86-64.c8
-rw-r--r--bfd/elfcode.h6
-rw-r--r--bfd/elflink.c10
-rw-r--r--bfd/elflink.h209
-rw-r--r--bfd/elfn32-mips.c158
-rw-r--r--bfd/elfxx-ia64.c16
-rw-r--r--bfd/elfxx-mips.c160
-rw-r--r--bfd/elfxx-mips.h7
-rw-r--r--bfd/i386linux.c2
-rw-r--r--bfd/ieee.c2
-rw-r--r--bfd/libbfd.h2
-rw-r--r--bfd/libcoff-in.h6
-rw-r--r--bfd/libcoff.h6
-rw-r--r--bfd/linker.c20
-rw-r--r--bfd/m68klinux.c2
-rw-r--r--bfd/opncls.c219
-rw-r--r--bfd/pdp11.c22
-rw-r--r--bfd/pe-mips.c18
-rw-r--r--bfd/peXXigen.c2
-rw-r--r--bfd/pef.c148
-rw-r--r--bfd/po/Make-in24
-rw-r--r--bfd/po/SRC-POTFILES.in5
-rw-r--r--bfd/po/bfd.pot1887
-rw-r--r--bfd/reloc.c42
-rw-r--r--bfd/reloc16.c12
-rw-r--r--bfd/section.c19
-rw-r--r--bfd/simple.c2
-rw-r--r--bfd/sparclinux.c2
-rw-r--r--bfd/sunos.c8
-rw-r--r--bfd/syms.c5
-rw-r--r--bfd/versados.c6
-rw-r--r--bfd/version.h2
-rw-r--r--bfd/vms.c10
-rw-r--r--bfd/xcofflink.c6
-rwxr-xr-xconfig.guess16
-rwxr-xr-xconfig.sub25
-rwxr-xr-xconfigure124
-rw-r--r--configure.in58
-rw-r--r--gdb/ChangeLog3150
-rw-r--r--gdb/MAINTAINERS6
-rw-r--r--gdb/Makefile.in198
-rw-r--r--gdb/NEWS11
-rw-r--r--gdb/PROBLEMS93
-rw-r--r--gdb/README97
-rw-r--r--gdb/abug-rom.c2
-rw-r--r--gdb/acconfig.h3
-rw-r--r--gdb/acinclude.m453
-rw-r--r--gdb/aclocal.m453
-rw-r--r--gdb/ada-lang.c25
-rw-r--r--gdb/ada-lang.h6
-rw-r--r--gdb/ada-lex.l8
-rw-r--r--gdb/ada-tasks.c5
-rw-r--r--gdb/ada-valprint.c6
-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.c2422
-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/arch-utils.c100
-rw-r--r--gdb/arch-utils.h29
-rw-r--r--gdb/arm-linux-tdep.c51
-rw-r--r--gdb/arm-tdep.c98
-rw-r--r--gdb/avr-tdep.c1254
-rw-r--r--gdb/block.c17
-rw-r--r--gdb/blockframe.c39
-rw-r--r--gdb/breakpoint.c66
-rw-r--r--gdb/buildsym.c11
-rw-r--r--gdb/c-valprint.c7
-rw-r--r--gdb/charset.c1
-rw-r--r--gdb/cli/cli-cmds.c34
-rw-r--r--gdb/cli/cli-decode.c14
-rw-r--r--gdb/cli/cli-dump.c2
-rw-r--r--gdb/cli/cli-interp.c2
-rw-r--r--gdb/cli/cli-script.c10
-rw-r--r--gdb/coffread.c17
-rw-r--r--gdb/config.in9
-rw-r--r--gdb/config/alpha/alpha-linux.mh3
-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/arm/linux.mh2
-rw-r--r--gdb/config/arm/linux.mt2
-rw-r--r--gdb/config/arm/nm-linux.h5
-rw-r--r--gdb/config/arm/tm-linux.h8
-rw-r--r--gdb/config/djgpp/fnchange.lst5
-rw-r--r--gdb/config/h8300/tm-h8300.h3
-rw-r--r--gdb/config/i386/i386sol2.mt2
-rw-r--r--gdb/config/i386/linux.mh3
-rw-r--r--gdb/config/i386/linux.mt2
-rw-r--r--gdb/config/i386/nm-x86-64linux.h54
-rw-r--r--gdb/config/i386/tm-i386.h4
-rw-r--r--gdb/config/i386/tm-x86-64linux.h10
-rw-r--r--gdb/config/i386/x86-64linux.mh8
-rw-r--r--gdb/config/i386/x86-64linux.mt4
-rw-r--r--gdb/config/ia64/linux.mh2
-rw-r--r--gdb/config/ia64/linux.mt2
-rw-r--r--gdb/config/ia64/nm-linux.h7
-rw-r--r--gdb/config/ia64/tm-ia64.h51
-rw-r--r--gdb/config/m68k/linux.mh4
-rw-r--r--gdb/config/m68k/tm-delta68.h8
-rw-r--r--gdb/config/m68k/tm-linux.h33
-rw-r--r--gdb/config/m68k/tm-m68k.h4
-rw-r--r--gdb/config/m68k/tm-m68klynx.h2
-rw-r--r--gdb/config/m68k/tm-sun3.h2
-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/embed.mt2
-rw-r--r--gdb/config/mips/embed64.mt4
-rw-r--r--gdb/config/mips/embedl.mt4
-rw-r--r--gdb/config/mips/embedl64.mt4
-rw-r--r--gdb/config/mips/linux.mh3
-rw-r--r--gdb/config/mips/linux.mt2
-rw-r--r--gdb/config/mips/littlemips.mt3
-rw-r--r--gdb/config/mips/mips.mt (renamed from gdb/config/mips/vr4100.mt)2
-rw-r--r--gdb/config/mips/mips64.mt (renamed from gdb/config/mips/vr4300.mt)2
-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.h11
-rw-r--r--gdb/config/mips/tm-irix6.h15
-rw-r--r--gdb/config/mips/tm-mips.h56
-rw-r--r--gdb/config/mips/tm-mips64.h2
-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/vr4300el.mt5
-rw-r--r--gdb/config/mips/vr4xxx.mt5
-rw-r--r--gdb/config/mips/vr4xxxel.mt5
-rw-r--r--gdb/config/mips/vr5000.mt5
-rw-r--r--gdb/config/mips/vr5000el.mt5
-rw-r--r--gdb/config/nm-linux.h10
-rw-r--r--gdb/config/pa/nm-hppah.h5
-rw-r--r--gdb/config/pa/tm-hppa.h66
-rw-r--r--gdb/config/pa/tm-hppa64.h24
-rw-r--r--gdb/config/pa/tm-hppah.h5
-rw-r--r--gdb/config/powerpc/linux.mh4
-rw-r--r--gdb/config/powerpc/nm-ppc64-linux.h27
-rw-r--r--gdb/config/powerpc/ppc64-linux.mh19
-rw-r--r--gdb/config/powerpc/tm-linux.h9
-rw-r--r--gdb/config/s390/s390.mh2
-rw-r--r--gdb/config/s390/tm-linux.h4
-rw-r--r--gdb/config/s390/tm-s390.h37
-rw-r--r--gdb/config/sh/linux.mt2
-rw-r--r--gdb/config/sh/tm-sh.h4
-rw-r--r--gdb/config/sparc/linux.mh2
-rw-r--r--gdb/config/sparc/tm-sparc.h34
-rw-r--r--gdb/config/vax/tm-vax.h4
-rwxr-xr-xgdb/configure663
-rw-r--r--gdb/configure.host54
-rw-r--r--gdb/configure.in25
-rw-r--r--gdb/configure.tgt64
-rw-r--r--gdb/cp-abi.c2
-rw-r--r--gdb/cp-namespace.c10
-rw-r--r--gdb/cp-support.c296
-rw-r--r--gdb/cp-support.h9
-rw-r--r--gdb/cp-valprint.c8
-rw-r--r--gdb/cpu32bug-rom.c2
-rw-r--r--gdb/cris-tdep.c203
-rw-r--r--gdb/d10v-tdep.c181
-rw-r--r--gdb/dbug-rom.c2
-rw-r--r--gdb/dbxread.c2
-rw-r--r--gdb/defs.h9
-rw-r--r--gdb/dictionary.c132
-rw-r--r--gdb/dictionary.h4
-rw-r--r--gdb/dink32-rom.c2
-rw-r--r--gdb/doc/ChangeLog62
-rw-r--r--gdb/doc/Makefile.in3
-rw-r--r--gdb/doc/agentexpr.texi16
-rw-r--r--gdb/doc/gdb.texinfo406
-rw-r--r--gdb/doc/gdbint.texinfo99
-rw-r--r--gdb/doublest.c12
-rw-r--r--gdb/dummy-frame.c6
-rw-r--r--gdb/dwarf2-frame.c1336
-rw-r--r--gdb/dwarf2-frame.h (renamed from gdb/config/mips/tm-bigmips64.h)29
-rw-r--r--gdb/dwarf2cfi.c1970
-rw-r--r--gdb/dwarf2cfi.h102
-rw-r--r--gdb/dwarf2expr.h2
-rw-r--r--gdb/dwarf2read.c12
-rw-r--r--gdb/dwarfread.c56
-rw-r--r--gdb/elfread.c91
-rw-r--r--gdb/event-top.c10
-rw-r--r--gdb/findvar.c278
-rw-r--r--gdb/frame-base.c36
-rw-r--r--gdb/frame-unwind.c2
-rw-r--r--gdb/frame.c235
-rw-r--r--gdb/frame.h130
-rw-r--r--gdb/frv-tdep.c39
-rw-r--r--gdb/gdb-stabs.h5
-rw-r--r--gdb/gdb_assert.h11
-rw-r--r--gdb/gdbarch.c1824
-rw-r--r--gdb/gdbarch.h1753
-rwxr-xr-xgdb/gdbarch.sh228
-rw-r--r--gdb/gdbserver/ChangeLog38
-rw-r--r--gdb/gdbserver/Makefile.in14
-rw-r--r--gdb/gdbserver/configure.srv2
-rw-r--r--gdb/gdbserver/linux-low.c47
-rw-r--r--gdb/gdbserver/low-hppabsd.c355
-rw-r--r--gdb/gdbserver/low-lynx.c745
-rw-r--r--gdb/gdbserver/low-nbsd.c599
-rw-r--r--gdb/gdbserver/low-sim.c269
-rw-r--r--gdb/gdbserver/low-sparc.c314
-rw-r--r--gdb/gdbserver/low-sun3.c291
-rw-r--r--gdb/gdbserver/remote-utils.c6
-rw-r--r--gdb/gdbserver/server.c22
-rw-r--r--gdb/gdbserver/target.h10
-rw-r--r--gdb/gdbtypes.c9
-rw-r--r--gdb/gdbtypes.h5
-rw-r--r--gdb/gnu-nat.c1
-rw-r--r--gdb/gnu-v2-abi.c4
-rw-r--r--gdb/gnu-v3-abi.c3
-rw-r--r--gdb/h8300-tdep.c647
-rw-r--r--gdb/hpacc-abi.c1
-rw-r--r--gdb/hppa-hpux-tdep.c7
-rw-r--r--gdb/hppa-tdep.c133
-rw-r--r--gdb/hppah-nat.c10
-rw-r--r--gdb/hpread.c31
-rw-r--r--gdb/hpux-thread.c4
-rw-r--r--gdb/i386-cygwin-tdep.c63
-rw-r--r--gdb/i386-interix-tdep.c2
-rw-r--r--gdb/i386-linux-nat.c20
-rw-r--r--gdb/i386-linux-tdep.c127
-rw-r--r--gdb/i386-nto-tdep.c17
-rw-r--r--gdb/i386-sol2-tdep.c6
-rw-r--r--gdb/i386-tdep.c1372
-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/i387-tdep.c177
-rw-r--r--gdb/i387-tdep.h13
-rw-r--r--gdb/ia64-tdep.c107
-rw-r--r--gdb/infcall.c104
-rw-r--r--gdb/infcmd.c31
-rw-r--r--gdb/inferior.h6
-rw-r--r--gdb/infrun.c62
-rw-r--r--gdb/infttrace.c70
-rw-r--r--gdb/interps.c4
-rw-r--r--gdb/interps.h2
-rw-r--r--gdb/irix4-nat.c2
-rw-r--r--gdb/irix5-nat.c2
-rw-r--r--gdb/jv-exp.y8
-rw-r--r--gdb/jv-lang.c9
-rw-r--r--gdb/jv-valprint.c15
-rw-r--r--gdb/lin-lwp.c295
-rw-r--r--gdb/linespec.c3
-rw-r--r--gdb/linux-nat.c219
-rw-r--r--gdb/linux-nat.h73
-rw-r--r--gdb/linux-proc.c10
-rw-r--r--gdb/m68hc11-tdep.c29
-rw-r--r--gdb/m68k-tdep.c171
-rw-r--r--gdb/m68k-tdep.h12
-rw-r--r--gdb/m68klinux-tdep.c33
-rw-r--r--gdb/macrocmd.c2
-rw-r--r--gdb/macrotab.c2
-rw-r--r--gdb/main.c15
-rw-r--r--gdb/maint.c2
-rw-r--r--gdb/mcore-tdep.c98
-rw-r--r--gdb/mdebugread.c46
-rw-r--r--gdb/memattr.c2
-rw-r--r--gdb/mi/ChangeLog24
-rw-r--r--gdb/mi/mi-cmd-stack.c11
-rw-r--r--gdb/mi/mi-cmds.c1
-rw-r--r--gdb/mi/mi-interp.c2
-rw-r--r--gdb/mi/mi-main.c5
-rw-r--r--gdb/mi/mi-parse.c5
-rw-r--r--gdb/mips-linux-tdep.c4
-rw-r--r--gdb/mips-nat.c2
-rw-r--r--gdb/mips-tdep.c1171
-rw-r--r--gdb/mips-tdep.h3
-rw-r--r--gdb/mipsnbsd-tdep.c6
-rw-r--r--gdb/mipsv4-nat.c2
-rw-r--r--gdb/mn10300-tdep.c28
-rw-r--r--gdb/monitor.c7
-rwxr-xr-xgdb/nlm/configure43
-rw-r--r--gdb/nlm/configure.in2
-rw-r--r--gdb/ns32k-tdep.c27
-rw-r--r--gdb/ns32knbsd-tdep.c2
-rw-r--r--gdb/nto-tdep.c16
-rw-r--r--gdb/objc-exp.y1
-rw-r--r--gdb/objc-lang.c150
-rw-r--r--gdb/objc-lang.h3
-rw-r--r--gdb/objfiles.c3
-rw-r--r--gdb/ocd.c2
-rw-r--r--gdb/osabi.c12
-rw-r--r--gdb/p-exp.y10
-rw-r--r--gdb/p-valprint.c19
-rw-r--r--gdb/pa64solib.c14
-rw-r--r--gdb/ppc-bdm.c2
-rw-r--r--gdb/ppc-linux-nat.c33
-rw-r--r--gdb/ppc-linux-tdep.c331
-rw-r--r--gdb/ppcbug-rom.c2
-rw-r--r--gdb/printcmd.c222
-rw-r--r--gdb/rdi-share/host.h3
-rw-r--r--gdb/regcache.c100
-rw-r--r--gdb/reggroups.c2
-rw-r--r--gdb/remote-array.c1424
-rw-r--r--gdb/remote-e7000.c6
-rw-r--r--gdb/remote-est.c2
-rw-r--r--gdb/remote-fileio.c1379
-rw-r--r--gdb/remote-fileio.h (renamed from gdb/config/mips/tm-tx39l.h)34
-rw-r--r--gdb/remote-hms.c2
-rw-r--r--gdb/remote-mips.c14
-rw-r--r--gdb/remote-rdi.c10
-rw-r--r--gdb/remote-rdp.c4
-rw-r--r--gdb/remote-vxsparc.c8
-rw-r--r--gdb/remote.c132
-rw-r--r--gdb/remote.h4
-rw-r--r--gdb/rom68k-rom.c2
-rw-r--r--gdb/rs6000-nat.c3
-rw-r--r--gdb/rs6000-tdep.c134
-rw-r--r--gdb/s390-nat.c51
-rw-r--r--gdb/s390-tdep.c97
-rw-r--r--gdb/sentinel-frame.c4
-rw-r--r--gdb/ser-e7kpc.c4
-rw-r--r--gdb/sh-tdep.c111
-rw-r--r--gdb/sh3-rom.c2
-rw-r--r--gdb/shnbsd-nat.c3
-rw-r--r--gdb/signals/signals.c2
-rw-r--r--gdb/solib-irix.c8
-rw-r--r--gdb/solib-legacy.c2
-rw-r--r--gdb/solib-sunos.c22
-rw-r--r--gdb/solib-svr4.c61
-rw-r--r--gdb/solib.c27
-rw-r--r--gdb/somread.c7
-rw-r--r--gdb/sparc-nat.c2
-rw-r--r--gdb/sparc-tdep.c417
-rw-r--r--gdb/sparcnbsd-tdep.c8
-rw-r--r--gdb/stabsread.c10
-rw-r--r--gdb/stabsread.h6
-rw-r--r--gdb/stack.c271
-rw-r--r--gdb/stack.h (renamed from gdb/config/mips/tm-bigmips.h)11
-rw-r--r--gdb/std-regs.c2
-rw-r--r--gdb/symfile.c170
-rw-r--r--gdb/symfile.h245
-rw-r--r--gdb/symmisc.c44
-rw-r--r--gdb/symtab.c405
-rw-r--r--gdb/symtab.h27
-rw-r--r--gdb/target.c26
-rw-r--r--gdb/target.h12
-rw-r--r--gdb/testsuite/ChangeLog134
-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/attach.exp58
-rw-r--r--gdb/testsuite/gdb.base/bang.exp41
-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/fileio.c503
-rw-r--r--gdb/testsuite/gdb.base/fileio.exp277
-rw-r--r--gdb/testsuite/gdb.base/float.exp8
-rw-r--r--gdb/testsuite/gdb.base/gdb_history256
-rw-r--r--gdb/testsuite/gdb.base/langs.exp15
-rw-r--r--gdb/testsuite/gdb.base/readline.exp34
-rw-r--r--gdb/testsuite/gdb.base/relocate.exp26
-rw-r--r--gdb/testsuite/gdb.base/selftest.exp4
-rw-r--r--gdb/testsuite/gdb.base/shreloc.c18
-rw-r--r--gdb/testsuite/gdb.base/shreloc.exp257
-rw-r--r--gdb/testsuite/gdb.base/shreloc1.c10
-rw-r--r--gdb/testsuite/gdb.base/shreloc2.c10
-rw-r--r--gdb/testsuite/gdb.base/signals.exp1
-rw-r--r--gdb/testsuite/gdb.base/store.c86
-rw-r--r--gdb/testsuite/gdb.base/store.exp58
-rw-r--r--gdb/testsuite/gdb.c++/pr-1210.cc19
-rw-r--r--gdb/testsuite/gdb.c++/pr-1210.exp76
-rw-r--r--gdb/testsuite/lib/mi-support.exp2
-rw-r--r--gdb/thread-db.c99
-rw-r--r--gdb/top.c16
-rw-r--r--gdb/top.h11
-rw-r--r--gdb/trad-frame.c96
-rw-r--r--gdb/trad-frame.h70
-rw-r--r--gdb/tui/ChangeLog28
-rw-r--r--gdb/tui/tui-hooks.c29
-rw-r--r--gdb/tui/tui.c27
-rw-r--r--gdb/tui/tuiCommand.c23
-rw-r--r--gdb/tui/tuiData.c21
-rw-r--r--gdb/tui/tuiDataWin.c21
-rw-r--r--gdb/tui/tuiDisassem.c30
-rw-r--r--gdb/tui/tuiGeneralWin.c21
-rw-r--r--gdb/tui/tuiIO.c29
-rw-r--r--gdb/tui/tuiLayout.c27
-rw-r--r--gdb/tui/tuiRegs.c27
-rw-r--r--gdb/tui/tuiSource.c28
-rw-r--r--gdb/tui/tuiSourceWin.c28
-rw-r--r--gdb/tui/tuiStack.c35
-rw-r--r--gdb/tui/tuiWin.c36
-rw-r--r--gdb/typeprint.c2
-rw-r--r--gdb/ui-file.c38
-rw-r--r--gdb/ui-file.h5
-rw-r--r--gdb/ui-out.c9
-rw-r--r--gdb/utils.c63
-rw-r--r--gdb/v850-tdep.c40
-rw-r--r--gdb/valops.c163
-rw-r--r--gdb/value.h15
-rw-r--r--gdb/values.c4
-rw-r--r--gdb/varobj.c13
-rw-r--r--gdb/vax-tdep.c70
-rw-r--r--gdb/version.in2
-rw-r--r--gdb/win32-nat.c11
-rw-r--r--gdb/wince.c3
-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.c1159
-rw-r--r--gdb/x86-64-tdep.h33
-rw-r--r--gdb/xcoffread.c5
-rw-r--r--gdb/xstormy16-tdep.c31
-rw-r--r--include/ChangeLog34
-rw-r--r--include/ansidecl.h11
-rw-r--r--include/bfdlink.h25
-rw-r--r--include/elf/ChangeLog14
-rw-r--r--include/elf/common.h3
-rw-r--r--include/elf/h8.h1
-rw-r--r--include/elf/v850.h3
-rw-r--r--include/gdb/ChangeLog4
-rw-r--r--include/gdb/fileio.h146
-rw-r--r--include/opcode/ChangeLog280
-rw-r--r--include/opcode/h8300.h2373
-rw-r--r--include/opcode/i386.h24
-rw-r--r--include/opcode/i860.h16
-rw-r--r--include/opcode/ppc.h5
-rw-r--r--include/safe-ctype.h18
-rw-r--r--libiberty/ChangeLog54
-rw-r--r--libiberty/Makefile.in3
-rw-r--r--libiberty/asprintf.c4
-rw-r--r--libiberty/config.in9
-rwxr-xr-xlibiberty/configure159
-rw-r--r--libiberty/configure.in16
-rw-r--r--libiberty/functions.texi104
-rw-r--r--libiberty/hashtab.c4
-rw-r--r--libiberty/hex.c9
-rw-r--r--libiberty/physmem.c2
-rw-r--r--libiberty/safe-ctype.c119
-rw-r--r--libiberty/testsuite/demangle-expected262
-rw-r--r--libiberty/testsuite/test-demangle.c2
-rw-r--r--libiberty/vasprintf.c6
-rwxr-xr-xltconfig12
-rw-r--r--opcodes/ChangeLog194
-rw-r--r--opcodes/Makefile.am8
-rw-r--r--opcodes/Makefile.in12
-rw-r--r--opcodes/aclocal.m418
-rw-r--r--opcodes/cgen-asm.in4
-rw-r--r--opcodes/config.in9
-rwxr-xr-xopcodes/configure760
-rw-r--r--opcodes/fr30-asm.c4
-rw-r--r--opcodes/fr30-desc.c2
-rw-r--r--opcodes/fr30-desc.h2
-rw-r--r--opcodes/frv-asm.c35
-rw-r--r--opcodes/frv-desc.c88
-rw-r--r--opcodes/frv-desc.h15
-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/i386-dis.c110
-rw-r--r--opcodes/i860-dis.c10
-rw-r--r--opcodes/ip2k-asm.c4
-rw-r--r--opcodes/ip2k-desc.c2
-rw-r--r--opcodes/ip2k-desc.h2
-rw-r--r--opcodes/iq2000-asm.c13
-rw-r--r--opcodes/iq2000-desc.c164
-rw-r--r--opcodes/iq2000-desc.h8
-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/m32r-asm.c4
-rw-r--r--opcodes/m32r-desc.c2
-rw-r--r--opcodes/m32r-desc.h2
-rw-r--r--opcodes/m32r-opc.c12
-rw-r--r--opcodes/openrisc-asm.c4
-rw-r--r--opcodes/openrisc-desc.c2
-rw-r--r--opcodes/openrisc-desc.h2
-rw-r--r--opcodes/po/Make-in24
-rw-r--r--opcodes/po/POTFILES.in1
-rw-r--r--opcodes/po/opcodes.pot447
-rw-r--r--opcodes/ppc-opc.c120
-rw-r--r--opcodes/xstormy16-asm.c4
-rw-r--r--opcodes/xstormy16-desc.c2
-rw-r--r--opcodes/xstormy16-desc.h2
-rw-r--r--opcodes/z8k-dis.c10
-rw-r--r--opcodes/z8k-opc.h1339
-rw-r--r--opcodes/z8kgen.c419
-rw-r--r--readline/ChangeLog.gdb10
-rw-r--r--readline/aclocal.m410
-rwxr-xr-xreadline/configure11
-rwxr-xr-xreadline/support/config.guess16
-rwxr-xr-xreadline/support/config.sub25
-rw-r--r--sim/common/ChangeLog28
-rw-r--r--sim/common/cgen-trace.c4
-rw-r--r--sim/common/cgen-trace.h2
-rw-r--r--sim/common/nrun.c6
-rw-r--r--sim/common/run.c22
-rw-r--r--sim/common/sim-fpu.c18
-rw-r--r--sim/common/sim-fpu.h6
-rw-r--r--sim/common/sim-options.c17
-rw-r--r--sim/common/sim-reg.c4
-rw-r--r--sim/d10v/ChangeLog5
-rw-r--r--sim/d10v/interp.c62
-rw-r--r--sim/h8300/ChangeLog38
-rw-r--r--sim/h8300/Makefile.in18
-rw-r--r--sim/h8300/compile.c4380
-rw-r--r--sim/h8300/sim-main.h170
-rw-r--r--sim/mips/ChangeLog4
-rw-r--r--sim/mips/mips.igen4
-rw-r--r--sim/ppc/ChangeLog125
-rw-r--r--sim/ppc/Makefile.in28
-rw-r--r--sim/ppc/altivec.igen2356
-rw-r--r--sim/ppc/altivec_expression.h50
-rw-r--r--sim/ppc/altivec_registers.h63
-rwxr-xr-xsim/ppc/configure188
-rw-r--r--sim/ppc/configure.in12
-rw-r--r--sim/ppc/e500.igen3348
-rw-r--r--sim/ppc/e500_expression.h173
-rw-r--r--sim/ppc/e500_registers.h83
-rw-r--r--sim/ppc/emul_chirp.c27
-rw-r--r--sim/ppc/gen-idecode.c6
-rw-r--r--sim/ppc/gen-itable.c1
-rw-r--r--sim/ppc/gen-model.c1
-rw-r--r--sim/ppc/gen-support.c6
-rw-r--r--sim/ppc/hw_com.c2
-rw-r--r--sim/ppc/hw_htab.c11
-rw-r--r--sim/ppc/hw_init.c42
-rw-r--r--sim/ppc/hw_nvram.c2
-rw-r--r--sim/ppc/hw_register.c11
-rw-r--r--sim/ppc/idecode_expression.h9
-rw-r--r--sim/ppc/igen.c19
-rw-r--r--sim/ppc/interrupts.c4
-rw-r--r--sim/ppc/ld-cache.c40
-rw-r--r--sim/ppc/ld-cache.h12
-rw-r--r--sim/ppc/ld-insn.c48
-rw-r--r--sim/ppc/ld-insn.h14
-rw-r--r--sim/ppc/ppc-cache-rules65
-rw-r--r--sim/ppc/ppc-instructions70
-rw-r--r--sim/ppc/ppc-spr-table2
-rw-r--r--sim/ppc/psim.c114
-rw-r--r--sim/ppc/psim.h11
-rw-r--r--sim/ppc/registers.c29
-rw-r--r--sim/ppc/registers.h30
-rw-r--r--sim/ppc/sim_calls.c32
656 files changed, 60642 insertions, 27533 deletions
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 b5255a001aa..2aceb5d2159 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,115 @@
+2003-06-26 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * configure.in: Rename 'target_libs' to 'target_libraries'.
+ Remove useless reference to 'target_libs'.
+ * configure: Regenerate.
+
+2003-06-23 Keith Seitz <kseitz@sources.redhat.com>
+
+ * Makefile.tpl: Add maybe-configure-itcl to configure-gdb.
+ * Makefile.in: Regenerate.
+
+2003-06-23 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * Makefile.def: Introduce flags_to_pass.
+ * Makefile.tpl: Generate BASE_FLAGS_TO_PASS using it.
+ * Makefile.in: Regenerate.
+
+2003-06-23 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * configure.in (noconfigdirs) <cris-*-*>: Disable target-newlib
+ and target-libgloss.
+ <d30v-*-*, fr30-*-*, i960-*-*, m32r-*-*>: Disable gdb.
+ <h8300*-*-*>: Disable libf2c and ${libgcj}.
+ * configure: Regenerate.
+
+2003-06-17 Benjamin Kosnik <bkoz@redhat.com>
+
+ * configure.in: Update testsuite_flags to new location.
+ * configure. Regenerate.
+
+2003-06-18 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * Makefile.tpl: Remove BUILD_CC stuff.
+ * Makefile.in: Regenerate.
+
+2003-06-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config.guess: Update to 2003-06-12 version.
+ * config.sub: Update to 2003-06-13 version.
+
+2003-06-12 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * MAINTAINERS: Add myself as MIPS co-maintainer.
+
+2003-06-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config.guess: Update to 2003-06-06 version.
+ * config.sub: Update to 2003-06-06 version.
+
+2003-06-11 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * configure.in: Don't pass --with-stabs for mips*-sgi-irix6*o32.
+ * configure. Regenerate.
+
+2003-06-10 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * configure.in: Disable serial configure by default.
+ * configure: Regenerate.
+ * Makefile.tpl: Abolish .NOTPARALLEL.
+ * Makefile.in: Regenerate.
+
+ * Makefile.tpl: Replace {build,host,target}_canonical by
+ {build,host,target}.
+ * Makefile.in: Regenerate.
+
+ * Makefile.tpl: Fix stupid pasto.
+ * Makefile.in: Regenerate.
+
+2003-06-09 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * Makefile.tpl: Remove bogus conditional.
+ * Makefile.in: Regenerate.
+
+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.in b/Makefile.in
index 7511bc057af..9137641c2ca 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -26,20 +26,11 @@
VPATH=@srcdir@
build_alias=@build_alias@
-build_cpu=@build_cpu@
-build_vendor=@build_vendor@
-build_os=@build_os@
-build_canonical=@build_cpu@-@build_vendor@-@build_os@
+build=@build@
host_alias=@host_alias@
-host_cpu=@host_cpu@
-host_vendor=@host_vendor@
-host_os=@host_os@
-host_canonical=@host_cpu@-@host_vendor@-@host_os@
+host=@host@
target_alias=@target_alias@
-target_cpu=@target_cpu@
-target_vendor=@target_vendor@
-target_os=@target_os@
-target_canonical=@target_cpu@-@target_vendor@-@target_os@
+target=@target@
program_transform_name = @program_transform_name@
@@ -159,7 +150,6 @@ CXX_FOR_BUILD = $(CXX)
# Special variables passed down in EXTRA_GCC_FLAGS. They are defined
# here so that they can be overridden by Makefile fragments.
-BUILD_CC = $(CC_FOR_BUILD)
BUILD_PREFIX = @BUILD_PREFIX@
BUILD_PREFIX_1 = @BUILD_PREFIX_1@
@@ -263,7 +253,7 @@ USUAL_AR_FOR_TARGET = ` \
if [ -f $$r/binutils/ar ] ; then \
echo $$r/binutils/ar ; \
else \
- if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
+ if [ '$(host)' = '$(target)' ] ; then \
echo $(AR); \
else \
echo ar | sed '$(program_transform_name)' ; \
@@ -277,7 +267,7 @@ USUAL_AS_FOR_TARGET = ` \
elif [ -f $$r/gcc/xgcc ]; then \
$(CC_FOR_TARGET) -print-prog-name=as ; \
else \
- if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
+ if [ '$(host)' = '$(target)' ] ; then \
echo $(AS); \
else \
echo as | sed '$(program_transform_name)' ; \
@@ -310,7 +300,7 @@ USUAL_DLLTOOL_FOR_TARGET = ` \
if [ -f $$r/binutils/dlltool ] ; then \
echo $$r/binutils/dlltool ; \
else \
- if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
+ if [ '$(host)' = '$(target)' ] ; then \
echo $(DLLTOOL); \
else \
echo dlltool | sed '$(program_transform_name)' ; \
@@ -326,7 +316,7 @@ USUAL_LD_FOR_TARGET = ` \
elif [ -f $$r/gcc/xgcc ]; then \
$(CC_FOR_TARGET) -print-prog-name=ld ; \
else \
- if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
+ if [ '$(host)' = '$(target)' ] ; then \
echo $(LD); \
else \
echo ld | sed '$(program_transform_name)' ; \
@@ -342,7 +332,7 @@ USUAL_NM_FOR_TARGET = ` \
elif [ -f $$r/gcc/xgcc ]; then \
$(CC_FOR_TARGET) -print-prog-name=nm ; \
else \
- if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
+ if [ '$(host)' = '$(target)' ] ; then \
echo $(NM); \
else \
echo nm | sed '$(program_transform_name)' ; \
@@ -354,7 +344,7 @@ USUAL_RANLIB_FOR_TARGET = ` \
if [ -f $$r/binutils/ranlib ] ; then \
echo $$r/binutils/ranlib ; \
else \
- if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
+ if [ '$(host)' = '$(target)' ] ; then \
if [ x'$(RANLIB)' != x ]; then \
echo $(RANLIB); \
else \
@@ -370,7 +360,7 @@ USUAL_WINDRES_FOR_TARGET = ` \
if [ -f $$r/binutils/windres ] ; then \
echo $$r/binutils/windres ; \
else \
- if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
+ if [ '$(host)' = '$(target)' ] ; then \
echo $(WINDRES); \
else \
echo windres | sed '$(program_transform_name)' ; \
@@ -396,47 +386,10 @@ all: all.normal
###
# Flags to pass down to all sub-makes.
-# Please keep these in alphabetical order.
BASE_FLAGS_TO_PASS = \
- "AR_FLAGS=$(AR_FLAGS)" \
- "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
- "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
- "BISON=$(BISON)" \
- "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
- "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
- "CFLAGS=$(CFLAGS)" \
- "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
- "GCJ_FOR_TARGET=$(GCJ_FOR_TARGET)" \
- "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
- "CXXFLAGS=$(CXXFLAGS)" \
- "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
- "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
"DESTDIR=$(DESTDIR)" \
- "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
- "INSTALL=$(INSTALL)" \
- "INSTALL_DATA=$(INSTALL_DATA)" \
- "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
- "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
- "LDFLAGS=$(LDFLAGS)" \
- "LEX=$(LEX)" \
- "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
- "LIBCFLAGS=$(LIBCFLAGS)" \
- "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
- "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
- "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
- "M4=$(M4)" \
- "MAKE=$(MAKE)" \
- "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
- "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
- "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
"RPATH_ENVVAR=$(RPATH_ENVVAR)" \
- "SHELL=$(SHELL)" \
- "EXPECT=$(EXPECT)" \
- "RUNTEST=$(RUNTEST)" \
- "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
"TARGET_SUBDIR=$(TARGET_SUBDIR)" \
- "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
- "YACC=$(YACC)" \
"bindir=$(bindir)" \
"datadir=$(datadir)" \
"exec_prefix=$(exec_prefix)" \
@@ -459,7 +412,43 @@ BASE_FLAGS_TO_PASS = \
"gxx_include_dir=$(gxx_include_dir)" \
"gcc_version=$(gcc_version)" \
"gcc_version_trigger=$(gcc_version_trigger)" \
- "target_alias=$(target_alias)"
+ "target_alias=$(target_alias)" \
+ "BISON=$(BISON)" \
+ "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
+ "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
+ "EXPECT=$(EXPECT)" \
+ "INSTALL=$(INSTALL)" \
+ "INSTALL_DATA=$(INSTALL_DATA)" \
+ "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
+ "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
+ "LEX=$(LEX)" \
+ "M4=$(M4)" \
+ "MAKE=$(MAKE)" \
+ "RUNTEST=$(RUNTEST)" \
+ "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
+ "SHELL=$(SHELL)" \
+ "YACC=$(YACC)" \
+ "AR_FLAGS=$(AR_FLAGS)" \
+ "CFLAGS=$(CFLAGS)" \
+ "CXXFLAGS=$(CXXFLAGS)" \
+ "LDFLAGS=$(LDFLAGS)" \
+ "LIBCFLAGS=$(LIBCFLAGS)" \
+ "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
+ "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
+ "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
+ "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
+ "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
+ "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
+ "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
+ "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
+ "GCJ_FOR_TARGET=$(GCJ_FOR_TARGET)" \
+ "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
+ "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
+ "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
+ "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
+ "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
+ "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
+ "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)"
# For any flags above that may contain shell code that varies from one
# target library to another. When doing recursive invocations of the
@@ -472,7 +461,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 +489,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 +510,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)' \
@@ -531,7 +518,6 @@ EXTRA_GCC_FLAGS = \
'CC=$(CC)' \
'CXX=$(CXX)' \
'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
- 'BUILD_CC=$(CC_FOR_BUILD)' \
'BUILD_PREFIX=$(BUILD_PREFIX)' \
'BUILD_PREFIX_1=$(BUILD_PREFIX_1)' \
'NM=$(NM)' \
@@ -636,93 +622,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 +715,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-target-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-target-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-target-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-target-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 +17278,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) | \
@@ -1328,7 +17290,7 @@ clean-target-libgcc:
.PHONY: check do-check
check:
- $(MAKE) do-check NOTPARALLEL=parallel-ok
+ $(MAKE) do-check
# Only include modules actually being configured and built.
do-check: maybe-check-gcc \
@@ -1731,18 +17693,16 @@ configure-ash:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in ash; \
cd ash || exit 1; \
case $(srcdir) in \
@@ -1799,18 +17759,16 @@ configure-autoconf:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in autoconf; \
cd autoconf || exit 1; \
case $(srcdir) in \
@@ -1867,18 +17825,16 @@ configure-automake:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in automake; \
cd automake || exit 1; \
case $(srcdir) in \
@@ -1935,18 +17891,16 @@ configure-bash:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in bash; \
cd bash || exit 1; \
case $(srcdir) in \
@@ -2003,18 +17957,16 @@ configure-bfd:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in bfd; \
cd bfd || exit 1; \
case $(srcdir) in \
@@ -2071,18 +18023,16 @@ configure-opcodes:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in opcodes; \
cd opcodes || exit 1; \
case $(srcdir) in \
@@ -2139,18 +18089,16 @@ configure-binutils:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in binutils; \
cd binutils || exit 1; \
case $(srcdir) in \
@@ -2207,18 +18155,16 @@ configure-bison:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in bison; \
cd bison || exit 1; \
case $(srcdir) in \
@@ -2249,7 +18195,7 @@ maybe-check-bison:
# This module is only tested in a native toolchain.
check-bison:
- @if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
+ @if [ '$(host)' = '$(target)' ] ; then \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
@@ -2278,18 +18224,16 @@ configure-byacc:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in byacc; \
cd byacc || exit 1; \
case $(srcdir) in \
@@ -2320,7 +18264,7 @@ maybe-check-byacc:
# This module is only tested in a native toolchain.
check-byacc:
- @if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
+ @if [ '$(host)' = '$(target)' ] ; then \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
@@ -2349,18 +18293,16 @@ configure-bzip2:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in bzip2; \
cd bzip2 || exit 1; \
case $(srcdir) in \
@@ -2417,18 +18359,16 @@ configure-dejagnu:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in dejagnu; \
cd dejagnu || exit 1; \
case $(srcdir) in \
@@ -2485,18 +18425,16 @@ configure-diff:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in diff; \
cd diff || exit 1; \
case $(srcdir) in \
@@ -2553,18 +18491,16 @@ configure-dosutils:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in dosutils; \
cd dosutils || exit 1; \
case $(srcdir) in \
@@ -2617,18 +18553,16 @@ configure-etc:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in etc; \
cd etc || exit 1; \
case $(srcdir) in \
@@ -2685,18 +18619,16 @@ configure-fastjar:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in fastjar; \
cd fastjar || exit 1; \
case $(srcdir) in \
@@ -2727,7 +18659,7 @@ maybe-check-fastjar:
# This module is only tested in a native toolchain.
check-fastjar:
- @if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
+ @if [ '$(host)' = '$(target)' ] ; then \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
@@ -2756,18 +18688,16 @@ configure-fileutils:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in fileutils; \
cd fileutils || exit 1; \
case $(srcdir) in \
@@ -2824,18 +18754,16 @@ configure-findutils:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in findutils; \
cd findutils || exit 1; \
case $(srcdir) in \
@@ -2892,18 +18820,16 @@ configure-find:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in find; \
cd find || exit 1; \
case $(srcdir) in \
@@ -2960,18 +18886,16 @@ configure-flex:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in flex; \
cd flex || exit 1; \
case $(srcdir) in \
@@ -3002,7 +18926,7 @@ maybe-check-flex:
# This module is only tested in a native toolchain.
check-flex:
- @if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
+ @if [ '$(host)' = '$(target)' ] ; then \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
@@ -3031,18 +18955,16 @@ configure-gas:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in gas; \
cd gas || exit 1; \
case $(srcdir) in \
@@ -3099,18 +19021,16 @@ configure-gawk:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in gawk; \
cd gawk || exit 1; \
case $(srcdir) in \
@@ -3167,18 +19087,16 @@ configure-gettext:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in gettext; \
cd gettext || exit 1; \
case $(srcdir) in \
@@ -3235,18 +19153,16 @@ configure-gnuserv:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in gnuserv; \
cd gnuserv || exit 1; \
case $(srcdir) in \
@@ -3303,18 +19219,16 @@ configure-gprof:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in gprof; \
cd gprof || exit 1; \
case $(srcdir) in \
@@ -3371,18 +19285,16 @@ configure-gzip:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in gzip; \
cd gzip || exit 1; \
case $(srcdir) in \
@@ -3439,18 +19351,16 @@ configure-hello:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in hello; \
cd hello || exit 1; \
case $(srcdir) in \
@@ -3507,18 +19417,16 @@ configure-indent:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in indent; \
cd indent || exit 1; \
case $(srcdir) in \
@@ -3575,18 +19483,16 @@ configure-intl:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in intl; \
cd intl || exit 1; \
case $(srcdir) in \
@@ -3643,18 +19549,16 @@ configure-tcl:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in tcl; \
cd tcl || exit 1; \
case $(srcdir) in \
@@ -3711,18 +19615,16 @@ configure-itcl:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in itcl; \
cd itcl || exit 1; \
case $(srcdir) in \
@@ -3779,18 +19681,16 @@ configure-ld:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in ld; \
cd ld || exit 1; \
case $(srcdir) in \
@@ -3847,18 +19747,16 @@ configure-libgui:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in libgui; \
cd libgui || exit 1; \
case $(srcdir) in \
@@ -3915,18 +19813,16 @@ configure-libiberty:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in libiberty; \
cd libiberty || exit 1; \
case $(srcdir) in \
@@ -3983,18 +19879,16 @@ configure-libtool:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in libtool; \
cd libtool || exit 1; \
case $(srcdir) in \
@@ -4051,18 +19945,16 @@ configure-m4:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in m4; \
cd m4 || exit 1; \
case $(srcdir) in \
@@ -4119,18 +20011,16 @@ configure-make:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in make; \
cd make || exit 1; \
case $(srcdir) in \
@@ -4187,18 +20077,16 @@ configure-mmalloc:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in mmalloc; \
cd mmalloc || exit 1; \
case $(srcdir) in \
@@ -4251,18 +20139,16 @@ configure-patch:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in patch; \
cd patch || exit 1; \
case $(srcdir) in \
@@ -4319,18 +20205,16 @@ configure-perl:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in perl; \
cd perl || exit 1; \
case $(srcdir) in \
@@ -4387,18 +20271,16 @@ configure-prms:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in prms; \
cd prms || exit 1; \
case $(srcdir) in \
@@ -4455,18 +20337,16 @@ configure-rcs:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in rcs; \
cd rcs || exit 1; \
case $(srcdir) in \
@@ -4523,18 +20403,16 @@ configure-readline:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in readline; \
cd readline || exit 1; \
case $(srcdir) in \
@@ -4591,18 +20469,16 @@ configure-release:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in release; \
cd release || exit 1; \
case $(srcdir) in \
@@ -4651,18 +20527,16 @@ configure-recode:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in recode; \
cd recode || exit 1; \
case $(srcdir) in \
@@ -4719,18 +20593,16 @@ configure-sed:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in sed; \
cd sed || exit 1; \
case $(srcdir) in \
@@ -4787,18 +20659,16 @@ configure-send-pr:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in send-pr; \
cd send-pr || exit 1; \
case $(srcdir) in \
@@ -4855,18 +20725,16 @@ configure-shellutils:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in shellutils; \
cd shellutils || exit 1; \
case $(srcdir) in \
@@ -4923,18 +20791,16 @@ configure-sid:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in sid; \
cd sid || exit 1; \
case $(srcdir) in \
@@ -4991,18 +20857,16 @@ configure-sim:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in sim; \
cd sim || exit 1; \
case $(srcdir) in \
@@ -5059,18 +20923,16 @@ configure-tar:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in tar; \
cd tar || exit 1; \
case $(srcdir) in \
@@ -5127,18 +20989,16 @@ configure-texinfo:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in texinfo; \
cd texinfo || exit 1; \
case $(srcdir) in \
@@ -5191,18 +21051,16 @@ configure-textutils:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in textutils; \
cd textutils || exit 1; \
case $(srcdir) in \
@@ -5259,18 +21117,16 @@ configure-time:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in time; \
cd time || exit 1; \
case $(srcdir) in \
@@ -5327,18 +21183,16 @@ configure-uudecode:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in uudecode; \
cd uudecode || exit 1; \
case $(srcdir) in \
@@ -5395,18 +21249,16 @@ configure-wdiff:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in wdiff; \
cd wdiff || exit 1; \
case $(srcdir) in \
@@ -5463,18 +21315,16 @@ configure-zip:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in zip; \
cd zip || exit 1; \
case $(srcdir) in \
@@ -5505,7 +21355,7 @@ maybe-check-zip:
# This module is only tested in a native toolchain.
check-zip:
- @if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
+ @if [ '$(host)' = '$(target)' ] ; then \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
@@ -5534,18 +21384,16 @@ configure-zlib:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in zlib; \
cd zlib || exit 1; \
case $(srcdir) in \
@@ -5594,18 +21442,16 @@ configure-gdb:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in gdb; \
cd gdb || exit 1; \
case $(srcdir) in \
@@ -5662,18 +21508,16 @@ configure-expect:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in expect; \
cd expect || exit 1; \
case $(srcdir) in \
@@ -5730,18 +21574,16 @@ configure-guile:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in guile; \
cd guile || exit 1; \
case $(srcdir) in \
@@ -5798,18 +21640,16 @@ configure-tk:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in tk; \
cd tk || exit 1; \
case $(srcdir) in \
@@ -5866,18 +21706,16 @@ configure-tix:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in tix; \
cd tix || exit 1; \
case $(srcdir) in \
@@ -5934,18 +21772,16 @@ configure-libtermcap:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in libtermcap; \
cd libtermcap || exit 1; \
case $(srcdir) in \
@@ -5998,18 +21834,16 @@ configure-utils:
CFLAGS="$(CFLAGS)"; export CFLAGS; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in utils; \
cd utils || exit 1; \
case $(srcdir) in \
@@ -7712,18 +23546,16 @@ configure-gcc:
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
- if [ z$(build_canonical) != z$(host_canoncial) ] ; then \
- AR="$(AR)"; export AR; \
- AS="$(AS)"; export AS; \
- CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
- DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
- LD="$(LD)"; export LD; \
- NM="$(NM)"; export NM; \
- RANLIB="$(RANLIB)"; export RANLIB; \
- WINDRES="$(WINDRES)"; export WINDRES; \
- OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
- OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
- fi; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
echo Configuring in gcc; \
cd gcc || exit 1; \
case $(srcdir) in \
@@ -7802,6 +23634,23 @@ $(GCC_STRAP_TARGETS): all-bootstrap configure-gcc
echo "Building runtime libraries"; \
$(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
+profiledbootstrap: all-bootstrap configure-gcc
+ @r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Bootstrapping the compiler"; \
+ cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stageprofile_build
+ @r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}` ; export s; \
+ $(SET_LIB_PATH) \
+ echo "Building runtime libraries and training compiler"; \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
+ @r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Building feedback based compiler"; \
+ cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stagefeedback_build
+
.PHONY: cross
cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
@r=`${PWD}`; export r; \
@@ -7816,7 +23665,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 \
@@ -7841,7 +23690,7 @@ check-gcc-c++:
.PHONY: check-c++
check-c++:
- $(MAKE) check-target-libstdc++-v3 check-gcc-c++ NOTPARALLEL=parallel-ok
+ $(MAKE) check-target-libstdc++-v3 check-gcc-c++
.PHONY: install-gcc maybe-install-gcc
maybe-install-gcc:
@@ -7898,7 +23747,7 @@ all-bootstrap: maybe-all-libiberty maybe-all-texinfo maybe-all-bison maybe-all-b
# Host modules specific to gdb.
# GDB needs to know that the simulator is being built.
-configure-gdb: maybe-configure-tcl maybe-configure-tk maybe-configure-sim
+configure-gdb: maybe-configure-itcl maybe-configure-tcl maybe-configure-tk maybe-configure-sim
GDB_TK = @GDB_TK@
all-gdb: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-mmalloc maybe-all-readline maybe-all-bison maybe-all-byacc maybe-all-sim $(gdbnlmrequirements) $(GDB_TK)
install-gdb: maybe-install-tcl maybe-install-tk maybe-install-itcl maybe-install-tix maybe-install-libgui
@@ -8038,12 +23887,6 @@ $(srcdir)/configure: @MAINT@ $(srcdir)/configure.in $(srcdir)/config/acx.m4
# Special directives to GNU Make
# ------------------------------
-# Tell GNU make 3.79 not to run the top level in parallel. This
-# prevents contention for $builddir/$target/config.cache, as well
-# as minimizing scatter in file system caches.
-NOTPARALLEL = .NOTPARALLEL
-$(NOTPARALLEL):
-
# Don't pass command-line variables to submakes.
.NOEXPORT:
MAKEOVERRIDES=
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 14f90db7c0f..44159e5a1c1 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,594 @@
+2003-06-27 Nick Clifton <nickc@redhat.com>
+
+ * opncls.c (bfd_add_gnu_debuglink_section): Rename to
+ bfd_add_gnu_debuglink_section and only create the section, do not
+ fill in its contents.
+ (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
+ contents of a .gnu-debuglink section.
+ * bfd-in2.h: Regenerate.
+
+2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * elfxx-mips.c: Revert .got alignment to 2**4.
+
+2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * elf32-mips.c: Fix addend for _gp_disp special symbol.
+
+2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
+ relocation header setup.
+
+2003-06-25 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
+ (ppc_elf_reloc_type_lookup): Modify comment.
+ (ppc_elf_info_to_howto): Ditto.
+ (ppc_elf_relocate_section): Ditto.
+ (ppc_elf_check_relocs): Call ppc_elf_howto_init.
+
+2003-06-25 Alan Modra <amodra@bigpond.net.au>
+
+ * aout-ns32k.c: Correct spelling of "relocatable".
+ * aoutx.h: Likewise.
+ * bfd-in.h: Likewise.
+ * bfd.c: Likewise.
+ * bout.c: Likewise.
+ * coff-a29k.c: Likewise.
+ * coff-alpha.c: Likewise.
+ * coff-arm.c: Likewise.
+ * coff-i386.c: Likewise.
+ * coff-i860.c: Likewise.
+ * coff-i960.c: Likewise.
+ * coff-m68k.c: Likewise.
+ * coff-m88k.c: Likewise.
+ * coff-mcore.c: Likewise.
+ * coff-mips.c: Likewise.
+ * coff-or32.c: Likewise.
+ * coff-ppc.c: Likewise.
+ * coff-rs6000.c: Likewise.
+ * coff-sh.c: Likewise.
+ * coff-tic80.c: Likewise.
+ * coff64-rs6000.c: Likewise.
+ * cofflink.c: Likewise.
+ * cpu-ns32k.c: Likewise.
+ * ecoff.c: Likewise.
+ * ecofflink.c: Likewise.
+ * elf-bfd.h: Likewise.
+ * elf-eh-frame.c: Likewise.
+ * elf-hppa.h: Likewise.
+ * elf-m10200.c: Likewise.
+ * elf-m10300.c: Likewise.
+ * elf.c: Likewise.
+ * elf32-arm.h: Likewise.
+ * elf32-avr.c: Likewise.
+ * elf32-cris.c: Likewise.
+ * elf32-d10v.c: Likewise.
+ * elf32-dlx.c: Likewise.
+ * elf32-fr30.c: Likewise.
+ * elf32-frv.c: Likewise.
+ * elf32-h8300.c: Likewise.
+ * elf32-hppa.c: Likewise.
+ * elf32-i370.c: Likewise.
+ * elf32-i386.c: Likewise.
+ * elf32-i860.c: Likewise.
+ * elf32-i960.c: Likewise.
+ * elf32-ip2k.c: Likewise.
+ * elf32-iq2000.c: Likewise.
+ * elf32-m32r.c: Likewise.
+ * elf32-m68hc11.c: Likewise.
+ * elf32-m68hc1x.c: Likewise.
+ * elf32-m68k.c: Likewise.
+ * elf32-mcore.c: Likewise.
+ * elf32-mips.c: Likewise.
+ * elf32-msp430.c: Likewise.
+ * elf32-openrisc.c: Likewise.
+ * elf32-ppc.c: Likewise.
+ * elf32-s390.c: Likewise.
+ * elf32-sh.c: Likewise.
+ * elf32-sh64.c: Likewise.
+ * elf32-sparc.c: Likewise.
+ * elf32-v850.c: Likewise.
+ * elf32-vax.c: Likewise.
+ * elf32-xstormy16.c: Likewise.
+ * elf32-xtensa.c: Likewise.
+ * elf64-alpha.c: Likewise.
+ * elf64-hppa.c: Likewise.
+ * elf64-mips.c: Likewise.
+ * elf64-mmix.c: Likewise.
+ * elf64-ppc.c: Likewise.
+ * elf64-s390.c: Likewise.
+ * elf64-sh64.c: Likewise.
+ * elf64-sparc.c: Likewise.
+ * elf64-x86-64.c: Likewise.
+ * elfcode.h: Likewise.
+ * elflink.h: Likewise.
+ * elfn32-mips.c: Likewise.
+ * elfxx-ia64.c: Likewise.
+ * elfxx-mips.c: Likewise.
+ * i386linux.c: Likewise.
+ * ieee.c: Likewise.
+ * libcoff-in.h: Likewise.
+ * linker.c: Likewise.
+ * m68klinux.c: Likewise.
+ * pdp11.c: Likewise.
+ * pe-mips.c: Likewise.
+ * peXXigen.c: Likewise.
+ * reloc.c: Likewise.
+ * reloc16.c: Likewise.
+ * sparclinux.c: Likewise.
+ * sunos.c: Likewise.
+ * syms.c: Likewise.
+ * versados.c: Likewise.
+ * vms.c: Likewise.
+ * xcofflink.c: Likewise.
+ * bfd-in2.h: Regenerate.
+ * libcoff.h: Regenerate.
+ * libbfd.h: Regenerate.
+
+2003-06-24 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
+ local sym errors.
+
+ * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
+ prototypes and casts. Replace PTR with void *. Formatting.
+ * elf32-ppc.c: Likewise. Break long strings too.
+ (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
+ (ppc_elf_unhandled_reloc): Internationalize error message.
+ * elf32-ppc.h: Remove PARAMS.
+
+2003-06-23 Mark Mitchell <mark@codesourcery.com>
+
+ * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
+ APUinfo slots.
+ (ppc_elf_final_write_processing): Likewise.
+
+2003-06-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elflink.h (elf_link_input_bfd): Check raw size when using
+ kept_section to preserve debug information discarded by
+ linkonce.
+
+2003-06-20 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
+ (ppc64_elf_setup_section_lists): Set it.
+ (ppc64_elf_relocate_section): Check sym section id against top_id.
+ (ppc_build_one_stub): Comment on top_id.
+
+2003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
+ * config.bfd: Add tic4x-*-rtems*.
+
+2003-06-20 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
+ prototypes and casts. Replace PTR with void *. Format copyright.
+ Mention ABI links.
+ (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
+ sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
+ (ppc_type_of_stub): Make r_type an enum.
+ (ppc64_elf_size_stubs): Likewise.
+ * elf64-ppc.h: Remove PARAMS macro.
+
+2003-06-19 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
+ elf hash tab fields.
+
+ * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
+ (ppc64_elf_info_to_howto): Likewise.
+ (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
+ * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
+
+2003-06-19 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
+ reloc overflow on discarded eh_frame entries.
+
+2003-06-19 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (toc_adjusting_stub_needed): New function.
+ (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
+ Return error condition.
+ (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
+ that have has_gp_reloc set.
+ (struct ppc_link_hash_table): Add stub_count.
+ (ppc_build_one_stub): Increment it.
+ (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
+ individual fields.
+ * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
+
+2003-06-18 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
+ size calculation from addend. Round size up.
+
+2003-06-18 Hans-Peter Nilsson <hp@axis.com>
+
+ * elf32-cris.c (cris_elf_relocate_section) <case
+ R_CRIS_32_GOTREL>: When linking a program, don't complain about a
+ symbol from a normal object or an undefined weak symbol.
+
+2003-06-18 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
+ R_PPC64_TOC relocs.
+
+2003-06-17 H.J. Lu <hongjiu.lu@intel.com>
+
+ * section.c (struct sec): Put back kept_section.
+ (STD_SECTION): Put back kept_section initialization.
+ * bfd-in2.h: Regenerate.
+
+ * elflink.h (elf_link_input_bfd): Also check discarded linkonce
+ sections for relocateable output. Use kept_section to preserve
+ debug information discarded by linkonce.
+
+2003-06-17 Roland McGrath <roland@redhat.com>
+
+ * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
+ segment-relative relocation between different segments.
+
+2003-06-17 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
+ optimizations earlier.
+
+ * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
+ Restore previous input_list type.
+ (ppc64_elf_link_hash_table_create): Undo last change.
+ (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
+ per output section, but don't bother with bfd_abs_section marker.
+ (ppc64_elf_next_input_section): Adjust for multiple input section
+ lists.
+ (group_sections): Likewise.
+
+2003-06-17 Jakub Jelinek <jakub@redhat.com>
+
+ * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
+ *r_offset == r_addend for RELATIVE relocs against .got.
+
+2003-06-17 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
+
+2003-06-17 Nick Clifton <nickc@redhat.com>
+
+ * elflink.h (elf_gc_record_vtentry): Allocate an extra element
+ in the vtable_entries_used array to allow for the accessing
+ the largest element.
+
+2003-06-17 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
+ input_list.
+ (ppc64_elf_link_hash_table_create): Init input_list here.
+ (ppc64_elf_setup_section_lists): Remove code setting up input lists
+ per output section. Set toc_off for abs and other standard sections.
+ (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
+ (ppc64_elf_next_input_section): Adjust for single input section list.
+ Don't set toc_curr from input bfds that haven't set elf_gp.
+ (group_sections): Adjust for single input section list.
+
+ * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
+
+2003-06-16 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
+ tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
+ dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
+ got section for RELATIVE relocs. Fix wrong comment. Change condition
+ under which dynamic relocs update the section contents.
+
+2003-06-13 Robert Millan <zeratul2@wanadoo.es>
+
+ * config.bfd: Add i386-netbsd-gnu target.
+
+2003-06-12 Nick Clifton <nickc@redhat.com>
+
+ * opncls.c (calc_crc32): Rename to
+ bfd_calc_gnu_debuglink_crc32 and export.
+ (GNU_DEBUGLINK): Define and use to replace occurrences of
+ hard-coded ".gnu_debuglink" in the code.
+ (get_debug_link_info): Prevent aborts by replacing call to
+ xmalloc with a call to malloc.
+ (find_separate_debug_file): Prevent aborts by replacing calls
+ to xmalloc and xstrdup with calls to malloc and strdup.
+ (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
+ section to a bfd.
+ * bfd-in2.h: Regenerate.
+
+2003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
+
+ * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
+ New target (was i[3-7]86-*-openbsd* before).
+ (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
+ (vax-*-openbsd*): New target.
+
+2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
+ for n32, too.
+ (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
+ (mips_elf_rel_dyn_section): Use appropriate section alignment.
+ (mips_elf_create_got_section): Likewise.
+ (_bfd_mips_elf_create_dynamic_sections): Likewise.
+
+2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * elf32-mips.c (mips_elf_generic_reloc): New Function.
+ (elf_mips_howto_table_rel): Use it.
+ (gprel32_with_gp): Move prototype.
+ (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
+ Use mips_elf_generic_reloc.
+ (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
+ Code cleanup.
+ (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
+ zero addend.
+ (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
+ as in the other *_gprel*_reloc functions.
+ (gprel32_with_gp): Handle partial_inplace properly.
+ (mips32_64bit_reloc): Use mips_elf_generic_reloc.
+ (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
+ Do addend handling directly instead of calling
+ _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
+ * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
+ of zero addend. Handle partial_inplace properly.
+ (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
+ addend.
+ (mips_elf64_gprel16_reloc): Likewise.
+ (mips_elf64_literal_reloc): Likewise.
+ (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
+ logic as in the other *_gprel*_reloc functions. Handle
+ partial_inplace properly.
+ (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
+ addend. Handle partial_inplace properly.
+ (mips16_gprel_reloc): Likewise. Do addend handling directly instead
+ of calling _bfd_mips_elf_gprel16_with_gp.
+ * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
+ (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
+ of zero addend.
+ (mips_elf_shift6_reloc): Handle partial_inplace properly.
+ (mips16_gprel_reloc): Likewise. Do addend handling directly instead
+ of calling _bfd_mips_elf_gprel16_with_gp.
+ * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
+ partial_inplace properly. Fix wrong addend handling. Fix overflow
+ check.
+ (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
+ exported.
+ (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
+ (_bfd_mips_elf_relocate_section): Likewise.
+ (mips_elf_create_dynamic_relocation): Update sec_info_type access.
+ * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
+ (_bfd_mips_elf_sign_extend): New prototype.
+
+2003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
+
+ * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
+ New target (was sparc-*-openbsd* before).
+ (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
+
+ * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
+ * configure: Regenerate.
+
+2003-06-11 H.J. Lu <hongjiu.lu@intel.com>
+
+ * po/Make-in (DESTDIR): New.
+ (install-data-yes): Support $(DESTDIR).
+ (uninstall): Likewise.
+
+2003-06-11 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am (config.status): Depend on version.h.
+ Run "make dep-am".
+ * Makefile.in: Regenerate.
+ * po/SRC-POTFILES.in: Regenerate.
+
+2003-06-10 Alan Modra <amodra@bigpond.net.au>
+ Gary Hade <garyhade@us.ibm.com>
+
+ * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
+
+2003-06-10 Richard Sandiford <rsandifo@redhat.com>
+
+ * archures.c (bfd_mach_h8300sxn): New architecture.
+ * bfd-in2.h: Regenerate.
+ * cpu-h8300.c (h8300_scan): Check for 'sxn'.
+ (h8300sxn_info_struct): New.
+ (h8300sx_info_struct): Link to it.
+ * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
+ (elf32_h8_final_write_processing): Likewise.
+
+2003-06-08 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
+ elfxx-target.h so that we can use elf_backend_got_header_size.
+ (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
+ (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
+ associated macros.
+ (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
+ dst_mask.
+ (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
+ ppc_stub_plt_branch_r2off.
+ (struct ppc_stub_hash_entry): Reorganize.
+ (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
+ toc_curr, toc_off and emit_stub_syms.
+ (ppc64_elf_link_hash_table_create): Init them.
+ (ppc_stub_name): Correct string size.
+ (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
+ (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
+ used.
+ (ppc_type_of_stub): Tweak root.type test.
+ (build_plt_stub): Remove glink code. Adjust for insn macro changes.
+ (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
+ ppc_stub_plt_branch_r2off.
+ (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
+ range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
+ (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
+ Initialize elf_gp and toc_curr.
+ (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
+ (ppc64_elf_next_input_section): Set toc_off.
+ (group_sections): Ensure groups have the same TOC.
+ (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
+ (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
+ Build new glink stub.
+ (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
+ (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
+ * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
+ (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
+ * section.c (struct sec): Rename flag12 to has_gp_reloc.
+ (STD_SECTION): Update.
+ * ecoff.c (bfd_debug_section): Update comment.
+ * bfd-in2.h: Regenerate.
+
+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.
+ (mips_elf_link_hash_table): Likewise.
+
2003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
* elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
@@ -31,7 +622,7 @@
for X_STORMY16_REL_12 reloc.
* elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
- the type of the has table in the bfd_link_info structure.
+ the type of the hash table in the bfd_link_info structure.
(bfd_elf_get_runpath_list): Likewise.
2003-05-19 Roland McGrath <roland@redhat.com>
@@ -175,11 +766,11 @@
* elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
copy ELF_LINK_NON_GOT_REF from weakdef.
- (allocate_dynrelocs): For undef weak syms with non-default
+ (allocate_dynrelocs): For undef weak syms with non-default
visibility, a) don't allocate plt entries, b) don't allocate
.got relocs, c) discard dyn rel space
- (sh_elf_relocate_section): d) don't generate .got relocs, e)
- don't generate dynamic relocs.
+ (sh_elf_relocate_section): d) don't generate .got relocs, e)
+ don't generate dynamic relocs.
(sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
for weakdefs when symbol already adjusted.
@@ -911,7 +1502,7 @@
2003-03-25 Stan Cox <scox@redhat.com>
Nick Clifton <nickc@redhat.com>
- Contribute support for Intel's iWMMXt chip - an ARM variant:
+ Contribute support for Intel's iWMMXt chip - an ARM variant:
* archures.c: Add bfd_mach_arm_iWMMXt.
* reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
@@ -926,7 +1517,7 @@
* cpu-arm.c (processors): Add iWMMXt.
(arch_inf): Likewise.
* elf32-arm.h (arm_object_p): Handle note section.
- (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
+ (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
be linked with XScale ones.
(elf32_arm_section_flags): New function: Set flags on note section.
(elf32_arm_final_write_processing): Handle note section.
@@ -1419,7 +2010,7 @@
variables, structure fields or function params to tls_mask or
similar to better reflect usage.
(struct got_entry): Comment.
- (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
+ (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
(get_tls_mask): Rename from get_tls_type.
2003-02-09 Alan Modra <amodra@bigpond.net.au>
@@ -1770,13 +2361,11 @@
2003-01-23 Nick Clifton <nickc@redhat.com>
* Add sh2e support:
-
2002-04-02 Elena Zannoni <ezannoni@redhat.com>
-
- * archures.c (bfd_mach_sh2e): Added.
- * bfd-in2.h: Rebuilt.
- * cpu-sh.c (arch_info_struct): Added SH2e.
- * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
+ * archures.c (bfd_mach_sh2e): Added.
+ * bfd-in2.h: Rebuilt.
+ * cpu-sh.c (arch_info_struct): Added SH2e.
+ * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
2003-01-23 Alan Modra <amodra@bigpond.net.au>
@@ -2144,7 +2733,7 @@
in a local var. Comment typo fixes.
(h8300_bfd_link_add_symbols): Likewise.
- * bfd/reloc.c (struct reloc_howto_struct): Revise src_mask and
+ * reloc.c (struct reloc_howto_struct): Revise src_mask and
dst_mask comments.
* bfd-in2.h: Regenerate.
@@ -2691,7 +3280,7 @@
2002-11-07 Michal Ludvig <mludvig@suse.cz>
- * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
+ * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
_bfd_dwarf2_find_nearest_line): Use
bfd_simple_get_relocated_section_contents() instead of
bfd_get_section_contents().
@@ -3249,7 +3838,7 @@
* Makefile.am: Add entries for elf32-sh64-lin.c and
elf64-sh64-lin.c. Regenerate.
* Makefile.in: Regenerate.
- * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
+ * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
to use sh64 vectors rather than sh vectors.
* configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
@@ -3675,7 +4264,7 @@
2002-08-28 Catherine Moore <clm@redhat.com>
- * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
+ * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
(v850-elf-reloc): Don't resolve pc relative relocs.
(v850_elf_ignore_reloc): New routine.
(v850_elf_final_link_relocate): Handle new relocs.
@@ -3895,9 +4484,9 @@
2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
- * bfd/elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
+ * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
symbols when looking for section referred to by a relocation.
- * bfd/elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
+ * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
2002-08-15 Alan Modra <amodra@bigpond.net.au>
@@ -4684,7 +5273,7 @@
2002-07-04 Alan Modra <amodra@bigpond.net.au>
- * section.c (_bfd_strip_section_from_output): Remove unnecessary
+ * section.c (_bfd_strip_section_from_output): Remove unnecessary
link order code. Don't actually remove the output section here;
Just set a flag for the linker to do so.
* elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
@@ -4979,7 +5568,7 @@
* elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
function.
- (allocate_global_data_dlt): Don't add millicode symbols to dynamic
+ (allocate_global_data_dlt): Don't add millicode symbols to dynamic
symbol table.
(allocate_global_data_opd, allocate_dynrel_entries): Likewise.
(elf64_hppa_size_dynamic_sections): Revise to use
@@ -5856,7 +6445,7 @@
2002-05-18 Tom Rix <trix@redhat.com>
- * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
+ * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
2002-05-17 Alan Modra <amodra@bigpond.net.au>
@@ -6789,7 +7378,7 @@
* coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
_bfd_xcoff_generic_stat_arch_elt. Fix format check.
- * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
+ * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
2002-03-19 Tom Rix <trix@redhat.com>
@@ -7056,7 +7645,7 @@
2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
- * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
+ * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
little endian.
2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
@@ -7102,7 +7691,7 @@
* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
* elf64-s390.c (elf_s390_relocate_section): Likewise.
* elf64-sh64.c (sh_elf64_relocate_section): Likewise.
- * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
+ * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
* elf64-alpha.c (elf64_alpha_relocate_section): Handle
_bfd_elf_section_offset returning -2 the same way as -1.
@@ -7330,7 +7919,7 @@
datalabel_got_offset.
(sh_elf_link_hash_newfunc): Initialize it.
(sh_elf_relocate_section): Augment the scope of
- seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
+ seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
GOT and GOTOFF handling to new SHmedia relocation types. Support
GOT_BIAS.
(sh_elf_check_relocs): Likewise.
@@ -7377,14 +7966,14 @@
match official numbers and names; moved unmaching ones to the
range 0xf2-0xff.
* elf32-sh64.c, elf64-sh64.c: Likewise.
- 2001-03-12 DJ Delorie <dj@redhat.com>
+ 2001-03-12 DJ Delorie <dj@redhat.com>
* elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
sections.
- 2001-03-12 DJ Delorie <dj@redhat.com>
+ 2001-03-12 DJ Delorie <dj@redhat.com>
* elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
be aligned.
* elf64-sh64.c (sh_elf64_relocate_section): Ditto.
- 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
+ 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
* elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
(sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
.cranges section with SEC_SORT_ENTRIES set.
@@ -7395,9 +7984,9 @@
start address if called by linker.
2001-01-08 Ben Elliston <bje@redhat.com>
* elf32-sh64.c (sh64_elf_final_write_processing): Activate
- Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
+ Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
* elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
- 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
+ 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
* elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
line. Add comments before all entries.
<R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
@@ -7417,7 +8006,7 @@
clarify describing comment. Add comments before all entries.
(sh_elf_relocate_section) <relocating for a local symbol>: Do not
honour STO_SH5_ISA32; instead call reloc_dangerous callback.
- 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
+ 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
Sort .cranges section in final link. Prepare to set bit 0 on
entry address.
* elf32-sh64.c (struct sh64_find_section_vma_data): New.
@@ -7440,7 +8029,7 @@
* elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
temporarily disabled) setting bit 0 on entry address.
(elf_backend_final_write_processing): Define.
- 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
+ 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
* elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
be a proper relocation for PTA and PTB rather than a marker.
<R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
@@ -7458,7 +8047,7 @@
<case R_SH_PT_16>: New case.
* Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
* Makefile.in: Regenerate.
- 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
+ 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
* elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
all code sections.
(sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
@@ -7471,11 +8060,11 @@
(sh64_elf_copy_private_data): Add missing "return true".
(sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
(sh_elf64_merge_private_data): Ditto.
- 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
+ 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
* elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
elf64-sh64.c:sh64_elf_fake_sections.
(elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
- 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
+ 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
* elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
(sh64_elf_final_write_processing): New.
(elf_backend_final_write_processing): Define.
@@ -7484,7 +8073,7 @@
sh64_elf_copy_private_data_internal, just copy e_flags field.
(sh64_elf_merge_private_data): Do not call
sh64_elf_copy_private_data_internal.
- 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
+ 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
Remove EF_SH64_ABI64, let ELF size make difference.
Remove SH64-specific BFD section flag.
* elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
@@ -7500,7 +8089,7 @@
* section.c (Section flags definitions): Don't define
SEC_SH_ISA_SHMEDIA.
(bfd-in2.h): Regenerate.
- 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
+ 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
Make DataLabel references work with partial linking.
* elf32-sh64.c: Fix formatting.
(sh64_elf_link_output_symbol_hook): New.
@@ -7513,7 +8102,7 @@
sh64_elf64_link_output_symbol_hook.
(sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
undefined if partial linking. Adjust sanity check.
- 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
+ 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
Implement semantics for inter-file DataLabel references.
* elf64-sh64.c (DATALABEL_SUFFIX): Define.
(sh64_elf64_add_symbol_hook): New.
@@ -7529,13 +8118,13 @@
* elf32-sh.c (sh_elf_relocate_section): If passing an indirect
symbol with st_type STT_DATALABEL on the way to a symbol with
st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
- 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
+ 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
Pass through STT_DATALABEL.
* elf32-sh64.c (sh64_elf_get_symbol_type): New.
(elf_backend_get_symbol_type): Define.
* elf64-sh64.c (sh64_elf64_get_symbol_type): New.
(elf_backend_get_symbol_type): Define.
- 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
+ 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
* elf32-sh64.c: Tweak comments.
(sh64_elf_copy_private_data_internal): Add prototype.
(bfd_elf32_bfd_set_private_flags): Define.
@@ -7559,7 +8148,7 @@
* configure: Regenerate.
* po/POTFILES.in: Regenerate.
* po/bfd.pot: Regenerate.
- 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
+ 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
* elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
anything else but EF_SH64 and EF_SH64_ABI64.
(sh64_elf_merge_private_data): Emit error for anything else but
@@ -7569,7 +8158,7 @@
* configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
bfd_elf32_sh64l_vec as a temporary measure.
* configure: Regenerate.
- 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
+ 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
* cpu-sh.c (arch_info_struct): Include sh5 item
unconditionalized.
* config.bfd (sh64-*-elf*): Do not set targ_cflags.
@@ -7587,7 +8176,7 @@
<global symbol>: Ditto.
(sh_elf_set_mach_from_flags): Remove code refusing
deleted EF_SH64_32BIT_ABI flag.
- 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
+ 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
* elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
@@ -7596,7 +8185,7 @@
<global symbol>: Ditto if h->other & STO_SH5_ISA32.
* elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
relocation.
- 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
+ 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
* Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
(BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
Regenerate dependencies.
@@ -7819,7 +8408,7 @@
* peXXigen.c (pe_print_idata): Rearrange message to aid in
translation.
- (pe_print_pdata): Rearrange message to aid in translation.
+ (pe_print_pdata): Rearrange message to aid in translation.
* libbfd.c (warn_deprecated): Rearrange error message to aid in
translation.
@@ -8316,7 +8905,7 @@
* ptrace-core.c (ptrace_unix_core_file_p): Likewise.
* trad-core.c (trad_unix_core_file_p): Likewise.
- * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
+ * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
with bfd_release and bfd_section_list_clear.
* hpux-core.c (hpux_core_core_file_p): Likewise.
* irix-core.c (irix_core_core_file_p): Likewise.
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index 5ecaa5b1600..6240f35c251 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -862,8 +862,9 @@ CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a stamp-lib \
DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES)
-# We want to rerun configure if config.bfd or configure.host change.
-config.status: $(srcdir)/configure $(srcdir)/config.bfd $(srcdir)/configure.host
+# We want to rerun configure if config.bfd, configure.host or version.h change.
+config.status: $(srcdir)/configure $(srcdir)/config.bfd \
+ $(srcdir)/configure.host $(srcdir)/version.h
$(SHELL) ./config.status --recheck
# What appears below is generated by a hacked mkdep using gcc -MM.
@@ -918,7 +919,7 @@ archive64.lo: archive64.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h
cpu-a29k.lo: cpu-a29k.c $(INCDIR)/filenames.h
cpu-alpha.lo: cpu-alpha.c $(INCDIR)/filenames.h
cpu-arc.lo: cpu-arc.c $(INCDIR)/filenames.h
-cpu-arm.lo: cpu-arm.c $(INCDIR)/filenames.h
+cpu-arm.lo: cpu-arm.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h
cpu-avr.lo: cpu-avr.c $(INCDIR)/filenames.h
cpu-cris.lo: cpu-cris.c $(INCDIR)/filenames.h
cpu-d10v.lo: cpu-d10v.c $(INCDIR)/filenames.h
@@ -1207,17 +1208,19 @@ elf32-m68k.lo: elf32-m68k.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf32-target.h
elf32-m68hc11.lo: elf32-m68hc11.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/m68hc11.h \
- $(INCDIR)/elf/reloc-macros.h elf32-target.h elf32-m68hc1x.h
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf32-m68hc1x.h \
+ $(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/opcode/m68hc11.h elf32-target.h
elf32-m68hc12.lo: elf32-m68hc12.c $(INCDIR)/filenames.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/m68hc11.h \
- $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/m68hc11.h \
- elf32-target.h elf32-m68hc1x.h
+ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf32-m68hc1x.h \
+ $(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/opcode/m68hc11.h elf32-target.h
elf32-m68hc1x.lo: elf32-m68hc1x.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/m68hc11.h \
- $(INCDIR)/elf/reloc-macros.h elf32-target.h elf32-m68hc1x.h
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf32-m68hc1x.h \
+ $(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/opcode/m68hc11.h
elf32-m88k.lo: elf32-m88k.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h elf32-target.h
@@ -1301,9 +1304,11 @@ elf32-xstormy16.lo: elf32-xstormy16.c $(INCDIR)/filenames.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/xstormy16.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \
elf32-target.h
-elf32-xtensa.lo: elf32-xtensa.c $(INCDIR)/bfdlink.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/elf/xtensa.h $(INCDIR)/xtensa-isa.h elf32-target.h
+elf32-xtensa.lo: elf32-xtensa.c $(INCDIR)/filenames.h \
+ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/xtensa.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/xtensa-isa.h \
+ $(INCDIR)/xtensa-config.h elf32-target.h
elf32.lo: elf32.c elfcode.h $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfcore.h \
@@ -1413,8 +1418,8 @@ pc532-mach.lo: pc532-mach.c $(INCDIR)/filenames.h libaout.h \
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
+pef.lo: pef.c $(INCDIR)/safe-ctype.h pef.h pef-traceback.h \
+ $(INCDIR)/filenames.h $(INCDIR)/libiberty.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..aca93712044 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
@@ -809,7 +809,7 @@ configure.in version.h
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-TAR = gtar
+TAR = tar
GZIP_ENV = --best
SOURCES = $(libbfd_a_SOURCES) $(libbfd_la_SOURCES)
OBJECTS = $(libbfd_a_OBJECTS) $(libbfd_la_OBJECTS)
@@ -1395,8 +1395,9 @@ stmp-lcoff-h: $(LIBCOFF_H_FILES)
$(SHELL) $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h
touch stmp-lcoff-h
-# We want to rerun configure if config.bfd or configure.host change.
-config.status: $(srcdir)/configure $(srcdir)/config.bfd $(srcdir)/configure.host
+# We want to rerun configure if config.bfd, configure.host or version.h change.
+config.status: $(srcdir)/configure $(srcdir)/config.bfd \
+ $(srcdir)/configure.host $(srcdir)/version.h
$(SHELL) ./config.status --recheck
# What appears below is generated by a hacked mkdep using gcc -MM.
@@ -1451,7 +1452,7 @@ archive64.lo: archive64.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h
cpu-a29k.lo: cpu-a29k.c $(INCDIR)/filenames.h
cpu-alpha.lo: cpu-alpha.c $(INCDIR)/filenames.h
cpu-arc.lo: cpu-arc.c $(INCDIR)/filenames.h
-cpu-arm.lo: cpu-arm.c $(INCDIR)/filenames.h
+cpu-arm.lo: cpu-arm.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h
cpu-avr.lo: cpu-avr.c $(INCDIR)/filenames.h
cpu-cris.lo: cpu-cris.c $(INCDIR)/filenames.h
cpu-d10v.lo: cpu-d10v.c $(INCDIR)/filenames.h
@@ -1740,17 +1741,19 @@ elf32-m68k.lo: elf32-m68k.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf32-target.h
elf32-m68hc11.lo: elf32-m68hc11.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/m68hc11.h \
- $(INCDIR)/elf/reloc-macros.h elf32-target.h elf32-m68hc1x.h
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf32-m68hc1x.h \
+ $(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/opcode/m68hc11.h elf32-target.h
elf32-m68hc12.lo: elf32-m68hc12.c $(INCDIR)/filenames.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/m68hc11.h \
- $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/m68hc11.h \
- elf32-target.h elf32-m68hc1x.h
+ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf32-m68hc1x.h \
+ $(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/opcode/m68hc11.h elf32-target.h
elf32-m68hc1x.lo: elf32-m68hc1x.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/m68hc11.h \
- $(INCDIR)/elf/reloc-macros.h elf32-target.h elf32-m68hc1x.h
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf32-m68hc1x.h \
+ $(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/opcode/m68hc11.h
elf32-m88k.lo: elf32-m88k.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h elf32-target.h
@@ -1834,9 +1837,11 @@ elf32-xstormy16.lo: elf32-xstormy16.c $(INCDIR)/filenames.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/xstormy16.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \
elf32-target.h
-elf32-xtensa.lo: elf32-xtensa.c $(INCDIR)/bfdlink.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/elf/xtensa.h $(INCDIR)/xtensa-isa.h elf32-target.h
+elf32-xtensa.lo: elf32-xtensa.c $(INCDIR)/filenames.h \
+ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/xtensa.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/xtensa-isa.h \
+ $(INCDIR)/xtensa-config.h elf32-target.h
elf32.lo: elf32.c elfcode.h $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfcore.h \
@@ -1946,8 +1951,8 @@ pc532-mach.lo: pc532-mach.c $(INCDIR)/filenames.h libaout.h \
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
+pef.lo: pef.c $(INCDIR)/safe-ctype.h pef.h pef-traceback.h \
+ $(INCDIR)/filenames.h $(INCDIR)/libiberty.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/aout-ns32k.c b/bfd/aout-ns32k.c
index 0972b5db187..8092705ba11 100644
--- a/bfd/aout-ns32k.c
+++ b/bfd/aout-ns32k.c
@@ -65,7 +65,7 @@ MY(put_reloc) PARAMS ((bfd *, int, int, bfd_vma, reloc_howto_type *,
struct reloc_std_external *));
/* The ns32k series is ah, unusual, when it comes to relocation.
- There are three storage methods for relocateable objects. There
+ There are three storage methods for relocatable objects. There
are displacements, immediate operands and ordinary twos complement
data. Of these, only the last fits into the standard relocation
scheme. Immediate operands are stored huffman encoded and
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
index 7f02d13e61d..674fc76316e 100644
--- a/bfd/aoutx.h
+++ b/bfd/aoutx.h
@@ -3749,7 +3749,7 @@ NAME(aout,final_link) (abfd, info, callback)
includes_hash_initialized = TRUE;
/* Figure out the largest section size. Also, if generating
- relocateable output, count the relocs. */
+ relocatable output, count the relocs. */
trsize = 0;
drsize = 0;
max_contents_size = 0;
@@ -3759,7 +3759,7 @@ NAME(aout,final_link) (abfd, info, callback)
{
bfd_size_type sz;
- if (info->relocateable)
+ if (info->relocatable)
{
if (bfd_get_flavour (sub) == bfd_target_aout_flavour)
{
@@ -3773,7 +3773,7 @@ NAME(aout,final_link) (abfd, info, callback)
work out the number of relocs needed, and then multiply
by the reloc size. */
(*_bfd_error_handler)
- (_("%s: relocateable link from %s to %s not supported"),
+ (_("%s: relocatable link from %s to %s not supported"),
bfd_get_filename (abfd),
sub->xvec->name, abfd->xvec->name);
bfd_set_error (bfd_error_invalid_operation);
@@ -3803,7 +3803,7 @@ NAME(aout,final_link) (abfd, info, callback)
}
}
- if (info->relocateable)
+ if (info->relocatable)
{
if (obj_textsec (abfd) != (asection *) NULL)
trsize += (_bfd_count_link_order_relocs (obj_textsec (abfd)
@@ -4786,9 +4786,9 @@ aout_link_input_section (finfo, input_bfd, input_section, reloff_ptr,
input_size))
return FALSE;
- /* If we are producing relocateable output, the relocs were
+ /* If we are producing relocatable output, the relocs were
modified, and we now write them out. */
- if (finfo->info->relocateable && rel_size > 0)
+ if (finfo->info->relocatable && rel_size > 0)
{
if (bfd_seek (finfo->output_bfd, *reloff_ptr, SEEK_SET) != 0)
return FALSE;
@@ -4850,7 +4850,7 @@ aout_link_input_section_std (finfo, input_bfd, input_section, relocs,
struct aout_link_hash_entry *, PTR, bfd_byte *, bfd_boolean *,
bfd_vma *));
bfd *output_bfd;
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
struct external_nlist *syms;
char *strings;
struct aout_link_hash_entry **sym_hashes;
@@ -4866,7 +4866,7 @@ aout_link_input_section_std (finfo, input_bfd, input_section, relocs,
BFD_ASSERT (input_bfd->xvec->header_byteorder
== output_bfd->xvec->header_byteorder);
- relocateable = finfo->info->relocateable;
+ relocatable = finfo->info->relocatable;
syms = obj_aout_external_syms (input_bfd);
strings = obj_aout_external_strings (input_bfd);
sym_hashes = obj_aout_sym_hashes (input_bfd);
@@ -4935,9 +4935,9 @@ aout_link_input_section_std (finfo, input_bfd, input_section, relocs,
}
#endif
- if (relocateable)
+ if (relocatable)
{
- /* We are generating a relocateable output file, and must
+ /* We are generating a relocatable output file, and must
modify the reloc accordingly. */
if (r_extern)
{
@@ -5195,7 +5195,7 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs,
struct aout_link_hash_entry *, PTR, bfd_byte *, bfd_boolean *,
bfd_vma *));
bfd *output_bfd;
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
struct external_nlist *syms;
char *strings;
struct aout_link_hash_entry **sym_hashes;
@@ -5211,7 +5211,7 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs,
BFD_ASSERT (input_bfd->xvec->header_byteorder
== output_bfd->xvec->header_byteorder);
- relocateable = finfo->info->relocateable;
+ relocatable = finfo->info->relocatable;
syms = obj_aout_external_syms (input_bfd);
strings = obj_aout_external_strings (input_bfd);
sym_hashes = obj_aout_sym_hashes (input_bfd);
@@ -5256,9 +5256,9 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs,
BFD_ASSERT (r_type < TABLE_SIZE (howto_table_ext));
- if (relocateable)
+ if (relocatable)
{
- /* We are generating a relocateable output file, and must
+ /* We are generating a relocatable output file, and must
modify the reloc accordingly. */
if (r_extern
|| r_type == (unsigned int) RELOC_BASE10
diff --git a/bfd/archures.c b/bfd/archures.c
index 250892ce532..6132f155df0 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
@@ -170,6 +170,7 @@ DESCRIPTION
.#define bfd_mach_h8300hn 4
.#define bfd_mach_h8300sn 5
.#define bfd_mach_h8300sx 6
+.#define bfd_mach_h8300sxn 7
. bfd_arch_pdp11, {* DEC PDP-11 *}
. bfd_arch_powerpc, {* PowerPC *}
.#define bfd_mach_ppc 32
diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index fdf5f1c389e..977095e1966 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -619,7 +619,7 @@ extern bfd_boolean bfd_ecoff_debug_accumulate_other
extern bfd_boolean bfd_ecoff_debug_externals
PARAMS ((bfd *abfd, struct ecoff_debug_info *debug,
const struct ecoff_debug_swap *swap,
- bfd_boolean relocateable,
+ bfd_boolean relocatable,
bfd_boolean (*get_extr) (struct symbol_cache_entry *,
struct ecoff_extr *),
void (*set_index) (struct symbol_cache_entry *,
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 8df80a00aa4..c6815ccb07b 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. */
@@ -626,7 +626,7 @@ extern bfd_boolean bfd_ecoff_debug_accumulate_other
extern bfd_boolean bfd_ecoff_debug_externals
PARAMS ((bfd *abfd, struct ecoff_debug_info *debug,
const struct ecoff_debug_swap *swap,
- bfd_boolean relocateable,
+ bfd_boolean relocatable,
bfd_boolean (*get_extr) (struct symbol_cache_entry *,
struct ecoff_extr *),
void (*set_index) (struct symbol_cache_entry *,
@@ -905,9 +905,18 @@ bfd_make_writable PARAMS ((bfd *abfd));
bfd_boolean
bfd_make_readable PARAMS ((bfd *abfd));
+unsigned long
+bfd_calc_gnu_debuglink_crc32 PARAMS ((unsigned long crc, const unsigned char *buf, bfd_size_type len));
+
char *
bfd_follow_gnu_debuglink PARAMS ((bfd *abfd, const char *dir));
+struct sec *
+bfd_create_gnu_debuglink_section PARAMS ((bfd * abfd, const char * filename));
+
+bfd_boolean
+bfd_fill_in_gnu_debuglink_section PARAMS ((bfd * abfd, struct sec * sect, const char * filename));
+
/* Extracted from libbfd.c. */
/* Byte swapping macros for user section data. */
@@ -1308,8 +1317,10 @@ typedef struct sec
/* Nonzero if this section needs the relax finalize pass. */
unsigned int need_finalize_relax:1;
+ /* Nonzero if this section has a gp reloc. */
+ unsigned int has_gp_reloc:1;
+
/* Usused bits. */
- unsigned int flag12:1;
unsigned int flag13:1;
unsigned int flag14:1;
unsigned int flag15:1;
@@ -1400,6 +1411,10 @@ typedef struct sec
/* Optional information about a COMDAT entry; NULL if not COMDAT. */
struct bfd_comdat_info *comdat;
+ /* Points to the kept section if this section is a link-once section,
+ and is discarded. */
+ struct sec *kept_section;
+
/* When a section is being output, this value changes as more
linenumbers are written out. */
file_ptr moving_line_filepos;
@@ -1652,6 +1667,7 @@ enum bfd_architecture
#define bfd_mach_h8300hn 4
#define bfd_mach_h8300sn 5
#define bfd_mach_h8300sx 6
+#define bfd_mach_h8300sxn 7
bfd_arch_pdp11, /* DEC PDP-11 */
bfd_arch_powerpc, /* PowerPC */
#define bfd_mach_ppc 32
@@ -1792,7 +1808,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 +3496,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/bfd.c b/bfd/bfd.c
index 99c5ea668e8..e54bd89d6c2 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -1164,12 +1164,12 @@ DESCRIPTION
bfd_byte *
bfd_get_relocated_section_contents (abfd, link_info, link_order, data,
- relocateable, symbols)
+ relocatable, symbols)
bfd *abfd;
struct bfd_link_info *link_info;
struct bfd_link_order *link_order;
bfd_byte *data;
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
asymbol **symbols;
{
bfd *abfd2;
@@ -1188,7 +1188,7 @@ bfd_get_relocated_section_contents (abfd, link_info, link_order, data,
fn = abfd2->xvec->_bfd_get_relocated_section_contents;
- return (*fn) (abfd, link_info, link_order, data, relocateable, symbols);
+ return (*fn) (abfd, link_info, link_order, data, relocatable, symbols);
}
/* Record information about an ELF program header. */
diff --git a/bfd/bout.c b/bfd/bout.c
index b839929c38f..43537eb47f3 100644
--- a/bfd/bout.c
+++ b/bfd/bout.c
@@ -1,6 +1,6 @@
/* BFD back-end for Intel 960 b.out binaries.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002
+ 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -1298,12 +1298,12 @@ b_out_bfd_relax_section (abfd, i, link_info, again)
static bfd_byte *
b_out_bfd_get_relocated_section_contents (output_bfd, link_info, link_order,
- data, relocateable, symbols)
+ data, relocatable, symbols)
bfd *output_bfd;
struct bfd_link_info *link_info;
struct bfd_link_order *link_order;
bfd_byte *data;
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
asymbol **symbols;
{
/* Get enough memory to hold the stuff. */
@@ -1317,11 +1317,11 @@ b_out_bfd_get_relocated_section_contents (output_bfd, link_info, link_order,
if (reloc_size < 0)
goto error_return;
- /* If producing relocateable output, don't bother to relax. */
- if (relocateable)
+ /* If producing relocatable output, don't bother to relax. */
+ if (relocatable)
return bfd_generic_get_relocated_section_contents (output_bfd, link_info,
link_order,
- data, relocateable,
+ data, relocatable,
symbols);
reloc_vector = (arelent **) bfd_malloc ((bfd_size_type) reloc_size);
diff --git a/bfd/coff-a29k.c b/bfd/coff-a29k.c
index fd547315fea..444dbc2a775 100644
--- a/bfd/coff-a29k.c
+++ b/bfd/coff-a29k.c
@@ -1,5 +1,6 @@
/* BFD back-end for AMD 29000 COFF binaries.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001,
+ 2002, 2003
Free Software Foundation, Inc.
Contributed by David Wood at New York University 7/8/91.
@@ -327,10 +328,10 @@ coff_a29k_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_boolean hihalf;
bfd_vma hihalf_val;
- /* If we are performing a relocateable link, we don't need to do a
+ /* If we are performing a relocatable link, we don't need to do a
thing. The caller will take care of adjusting the reloc
addresses and symbol indices. */
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
hihalf = FALSE;
@@ -580,4 +581,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-alpha.c b/bfd/coff-alpha.c
index 14e0ee15c5e..e9dd4169b22 100644
--- a/bfd/coff-alpha.c
+++ b/bfd/coff-alpha.c
@@ -1,5 +1,5 @@
/* BFD back-end for ALPHA Extended-Coff files.
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Modified from coff-mips.c by Steve Chamberlain <sac@cygnus.com> and
Ian Lance Taylor <ian@cygnus.com>.
@@ -53,7 +53,7 @@ static reloc_howto_type *alpha_bfd_reloc_type_lookup
PARAMS ((bfd *, bfd_reloc_code_real_type));
static bfd_byte *alpha_ecoff_get_relocated_section_contents
PARAMS ((bfd *abfd, struct bfd_link_info *, struct bfd_link_order *,
- bfd_byte *data, bfd_boolean relocateable, asymbol **symbols));
+ bfd_byte *data, bfd_boolean relocatable, asymbol **symbols));
static bfd_vma alpha_convert_external_reloc
PARAMS ((bfd *, struct bfd_link_info *, bfd *, struct external_reloc *,
struct ecoff_link_hash_entry *));
@@ -753,12 +753,12 @@ alpha_adjust_reloc_out (abfd, rel, intern)
static bfd_byte *
alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
- data, relocateable, symbols)
+ data, relocatable, symbols)
bfd *abfd;
struct bfd_link_info *link_info;
struct bfd_link_order *link_order;
bfd_byte *data;
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
asymbol **symbols;
{
bfd *input_bfd = link_order->u.indirect.section->owner;
@@ -766,7 +766,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
long reloc_size = bfd_get_reloc_upper_bound (input_bfd, input_section);
arelent **reloc_vector = NULL;
long reloc_count;
- bfd *output_bfd = relocateable ? abfd : (bfd *) NULL;
+ bfd *output_bfd = relocatable ? abfd : (bfd *) NULL;
bfd_vma gp;
bfd_boolean gp_undefined;
bfd_vma stack[RELOC_STACKSIZE];
@@ -798,7 +798,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
gp = _bfd_get_gp_value (abfd);
if (gp == 0)
{
- if (relocateable)
+ if (relocatable)
{
asection *sec;
bfd_vma lo;
@@ -858,7 +858,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
case ALPHA_R_SREL16:
case ALPHA_R_SREL32:
case ALPHA_R_SREL64:
- if (relocateable
+ if (relocatable
&& ((*rel->sym_ptr_ptr)->flags & BSF_SECTION_SYM) == 0)
{
rel->address += input_section->output_offset;
@@ -991,7 +991,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
asymbol *symbol;
bfd_vma relocation;
- if (relocateable)
+ if (relocatable)
{
rel->address += input_section->output_offset;
break;
@@ -1024,7 +1024,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
bfd_vma val;
int offset, size;
- if (relocateable)
+ if (relocatable)
{
rel->address += input_section->output_offset;
break;
@@ -1051,7 +1051,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
asymbol *symbol;
bfd_vma relocation;
- if (relocateable)
+ if (relocatable)
{
rel->address += input_section->output_offset;
break;
@@ -1084,7 +1084,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
asymbol *symbol;
bfd_vma relocation;
- if (relocateable)
+ if (relocatable)
{
rel->address += input_section->output_offset;
break;
@@ -1121,7 +1121,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
abort ();
}
- if (relocateable)
+ if (relocatable)
{
asection *os = input_section->output_section;
@@ -1248,7 +1248,7 @@ alpha_bfd_reloc_type_lookup (abfd, code)
}
/* A helper routine for alpha_relocate_section which converts an
- external reloc when generating relocateable output. Returns the
+ external reloc when generating relocatable output. Returns the
relocation amount. */
static bfd_vma
@@ -1262,7 +1262,7 @@ alpha_convert_external_reloc (output_bfd, info, input_bfd, ext_rel, h)
unsigned long r_symndx;
bfd_vma relocation;
- BFD_ASSERT (info->relocateable);
+ BFD_ASSERT (info->relocatable);
if (h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
@@ -1443,7 +1443,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
lita_sec = symndx_to_section[RELOC_SECTION_LITA];
gp = _bfd_get_gp_value (output_bfd);
- if (! info->relocateable && lita_sec != NULL)
+ if (! info->relocatable && lita_sec != NULL)
{
struct ecoff_section_tdata *lita_sec_data;
@@ -1552,7 +1552,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
not otherwise used for anything. For some reason, the
address of the relocation does not appear to include the
section VMA, unlike the other relocation types. */
- if (info->relocateable)
+ if (info->relocatable)
H_PUT_64 (input_bfd, input_section->output_offset + r_vaddr,
ext_rel->r_vaddr);
adjust_addrp = FALSE;
@@ -1705,7 +1705,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (h == (struct ecoff_link_hash_entry *) NULL)
abort ();
- if (! info->relocateable)
+ if (! info->relocatable)
{
if (h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
@@ -1748,7 +1748,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
addend += r_vaddr;
- if (info->relocateable)
+ if (info->relocatable)
{
/* Adjust r_vaddr by the addend. */
H_PUT_64 (input_bfd, addend, ext_rel->r_vaddr);
@@ -1782,9 +1782,9 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
case ALPHA_R_OP_STORE:
/* Store a value from the reloc stack into a bitfield. If
- we are generating relocateable output, all we do is
+ we are generating relocatable output, all we do is
adjust the address of the reloc. */
- if (! info->relocateable)
+ if (! info->relocatable)
{
bfd_vma mask;
bfd_vma val;
@@ -1850,9 +1850,9 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
abort ();
}
- if (info->relocateable)
+ if (info->relocatable)
{
- /* We are generating relocateable output, and must
+ /* We are generating relocatable output, and must
convert the existing reloc. */
if (r_extern)
{
@@ -1975,7 +1975,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
}
}
- if (info->relocateable && adjust_addrp)
+ if (info->relocatable && adjust_addrp)
{
/* Change the address of the relocation. */
H_PUT_64 (input_bfd,
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..98d7048a26c 100644
--- a/bfd/coff-arm.c
+++ b/bfd/coff-arm.c
@@ -1,6 +1,6 @@
/* BFD back-end for ARM COFF files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002
+ 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -1247,13 +1247,13 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
return FALSE;
/* The relocation_section function will skip pcrel_offset relocs
- when doing a relocateable link. However, we want to convert
+ when doing a relocatable link. However, we want to convert
ARM26 to ARM26D relocs if possible. We return a fake howto in
this case without pcrel_offset set, and adjust the addend to
compensate. */
if (rel->r_type == ARM_26
&& h != NULL
- && info->relocateable
+ && info->relocatable
&& (h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
&& (h->root.u.def.section->output_section
@@ -1283,18 +1283,18 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
the next opcode's pc, so is off by one. */
#if 0 /* This appears to have been true for WINCE 2.0, but it is not
true for WINCE 3.0. */
- if (howto->pc_relative && !info->relocateable)
+ if (howto->pc_relative && !info->relocatable)
addend -= 8;
#endif
#endif
- /* If we are doing a relocateable link, then we can just ignore
+ /* If we are doing a relocatable link, then we can just ignore
a PC relative reloc that is pcrel_offset. It will already
- have the correct value. If this is not a relocateable link,
+ have the correct value. If this is not a relocatable link,
then we should ignore the symbol value. */
if (howto->pc_relative && howto->pcrel_offset)
{
- if (info->relocateable)
+ if (info->relocatable)
continue;
/* FIXME - it is not clear which targets need this next test
and which do not. It is known that it is needed for the
@@ -1341,7 +1341,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
stub generation to the final linker pass. If we fail to
verify that the name is defined, we'll try to build stubs
for an undefined name... */
- if (! info->relocateable
+ if (! info->relocatable
&& ( h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak))
{
@@ -1595,7 +1595,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
+ sec->output_offset);
}
- else if (! info->relocateable)
+ else if (! info->relocatable)
{
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd, input_section,
@@ -1617,7 +1617,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
rstat = bfd_reloc_ok;
#ifndef ARM_WINCE
/* Only perform this fix during the final link, not a relocatable link. nickc@cygnus.com */
- else if (! info->relocateable
+ else if (! info->relocatable
&& howto->type == ARM_THUMB23)
{
/* This is pretty much a copy of what the default
@@ -1743,7 +1743,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
Is this the best way to fix up thumb addresses? krk@cygnus.com
Probably not, but it works, and if it works it don't need fixing! nickc@cygnus.com */
/* Only perform this fix during the final link, not a relocatable link. nickc@cygnus.com */
- if (! info->relocateable
+ if (! info->relocatable
&& (rel->r_type == ARM_32 || rel->r_type == ARM_RVA32))
{
/* Determine if we need to set the bottom bit of a relocated address
@@ -2023,7 +2023,7 @@ bfd_arm_get_bfd_for_interworking (abfd, info)
/* If we are only performing a partial link do not bother
getting a bfd to hold the glue. */
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
globals = coff_arm_hash_table (info);
@@ -2078,7 +2078,7 @@ bfd_arm_process_before_allocation (abfd, info, support_old_code)
/* If we are only performing a partial link do not bother
to construct any glue. */
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
/* Here we have a bfd that is to be included on the link. We have a hook
@@ -2198,7 +2198,7 @@ bfd_arm_process_before_allocation (abfd, info, support_old_code)
#define coff_bfd_copy_private_bfd_data coff_arm_copy_private_bfd_data
#define coff_bfd_link_hash_table_create coff_arm_link_hash_table_create
-/* When doing a relocateable link, we want to convert ARM26 relocs
+/* When doing a relocatable link, we want to convert ARM26 relocs
into ARM26D relocs. */
static bfd_boolean
@@ -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-i386.c b/bfd/coff-i386.c
index f083ae15a0f..a24344ad8c3 100644
--- a/bfd/coff-i386.c
+++ b/bfd/coff-i386.c
@@ -1,6 +1,6 @@
/* BFD back-end for Intel 386 COFF files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002
+ 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -56,7 +56,7 @@ static reloc_howto_type *coff_i386_reloc_type_lookup
section for a reference to a common symbol is the value itself plus
any desired offset. Ian Taylor, Cygnus Support. */
-/* If we are producing relocateable output, we need to do some
+/* If we are producing relocatable output, we need to do some
adjustments to the object file that are not done by the
bfd_perform_relocation function. This function is called by every
reloc type to make any required adjustments. */
@@ -103,7 +103,7 @@ coff_i386_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
{
/* For some reason bfd_perform_relocation always effectively
ignores the addend for a COFF target when producing
- relocateable output. This seems to be always wrong for 386
+ relocatable output. This seems to be always wrong for 386
COFF, so we handle the addend here instead. */
#ifdef COFF_WITH_PE
if (output_bfd == (bfd *) NULL)
@@ -386,7 +386,7 @@ static reloc_howto_type howto_table[] =
/* The PE relocate section routine. The only difference between this
and the regular routine is that we don't want to do anything for a
- relocateable link. */
+ relocatable link. */
static bfd_boolean coff_pe_i386_relocate_section
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
@@ -405,7 +405,7 @@ coff_pe_i386_relocate_section (output_bfd, info, input_bfd,
struct internal_syment *syms;
asection **sections;
{
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
return _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
@@ -470,7 +470,7 @@ coff_i386_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
#ifndef COFF_WITH_PE
/* If the output symbol is common (in which case this must be a
- relocateable link), we need to add in the final size of the
+ relocatable link), we need to add in the final size of the
common symbol. */
if (h != NULL && h->root.type == bfd_link_hash_common)
*addendp += h->root.u.c.size;
diff --git a/bfd/coff-i860.c b/bfd/coff-i860.c
index 767692dc61e..b862ff7f0c2 100644
--- a/bfd/coff-i860.c
+++ b/bfd/coff-i860.c
@@ -1,5 +1,5 @@
/* BFD back-end for Intel 860 COFF files.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000, 2001, 2002
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Created mostly by substituting "860" for "386" in coff-i386.c
Harry Dolan <dolan@ssd.intel.com>, October 1995
@@ -47,7 +47,7 @@ static const bfd_target * i3coff_object_p PARAMS ((bfd *));
section for a reference to a common symbol is the value itself plus
any desired offset. Ian Taylor, Cygnus Support. */
-/* If we are producing relocateable output, we need to do some
+/* If we are producing relocatable output, we need to do some
adjustments to the object file that are not done by the
bfd_perform_relocation function. This function is called by every
reloc type to make any required adjustments. */
@@ -87,7 +87,7 @@ coff_i860_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
{
/* For some reason bfd_perform_relocation always effectively
ignores the addend for a COFF target when producing
- relocateable output. This seems to be always wrong for 860
+ relocatable output. This seems to be always wrong for 860
COFF, so we handle the addend here instead. */
diff = reloc_entry->addend;
}
@@ -348,7 +348,7 @@ coff_i860_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
}
/* If the output symbol is common (in which case this must be a
- relocateable link), we need to add in the final size of the
+ relocatable link), we need to add in the final size of the
common symbol. */
if (h != NULL && h->root.type == bfd_link_hash_common)
*addendp += h->root.u.c.size;
diff --git a/bfd/coff-i960.c b/bfd/coff-i960.c
index eee6718a5ef..3a04753dcd4 100644
--- a/bfd/coff-i960.c
+++ b/bfd/coff-i960.c
@@ -1,6 +1,6 @@
/* BFD back-end for Intel 960 COFF files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001,
- 2002 Free Software Foundation, Inc.
+ 2002, 2003 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -180,12 +180,12 @@ optcall_callback (abfd, reloc_entry, symbol_in, data,
same object file. It appears to simply discard such relocs, rather
than adding their values into the object file. We handle this here
by converting all relocs against defined symbols into relocs
- against the section symbol, when generating a relocateable output
+ against the section symbol, when generating a relocatable output
file.
Note that this function is only called if we are not using the COFF
specific backend linker. It only does something when doing a
- relocateable link, which will almost certainly fail when not
+ relocatable link, which will almost certainly fail when not
generating COFF i960 output, so this function is actually no longer
useful. It was used before this target was converted to use the
COFF specific backend linker. */
@@ -205,7 +205,7 @@ coff_i960_relocate (abfd, reloc_entry, symbol, data, input_section,
if (output_bfd == NULL)
{
- /* Not generating relocateable output file. */
+ /* Not generating relocatable output file. */
return bfd_reloc_continue;
}
@@ -328,7 +328,7 @@ coff_i960_start_final_link (abfd, info)
asection *o;
bfd_byte *esym;
- if (! info->relocateable)
+ if (! info->relocatable)
return TRUE;
esym = (bfd_byte *) bfd_malloc (symesz);
@@ -455,7 +455,7 @@ coff_i960_relocate_section (output_bfd, info, input_bfd, input_section,
+ sec->output_section->vma
+ sec->output_offset);
}
- else if (! info->relocateable)
+ else if (! info->relocatable)
{
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd, input_section,
@@ -466,7 +466,7 @@ coff_i960_relocate_section (output_bfd, info, input_bfd, input_section,
done = FALSE;
- if (howto->type == R_OPTCALL && ! info->relocateable && symndx != -1)
+ if (howto->type == R_OPTCALL && ! info->relocatable && symndx != -1)
{
int class;
@@ -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..0947811687a 100644
--- a/bfd/coff-m68k.c
+++ b/bfd/coff-m68k.c
@@ -1,6 +1,6 @@
/* BFD back-end for Motorola 68000 COFF binaries.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999,
- 2000, 2001, 2002
+ 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -250,7 +250,7 @@ m68kcoff_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
symbol is the value itself plus any desired offset. (taken from
work done by Ian Taylor, Cygnus Support, for I386 COFF). */
-/* If we are producing relocateable output, we need to do some
+/* If we are producing relocatable output, we need to do some
adjustments to the object file that are not done by the
bfd_perform_relocation function. This function is called by every
reloc type to make any required adjustments. */
@@ -290,7 +290,7 @@ m68kcoff_common_addend_special_fn (abfd, reloc_entry, symbol, data,
{
/* For some reason bfd_perform_relocation always effectively
ignores the addend for a COFF target when producing
- relocateable output. This seems to be always wrong for 386
+ relocatable output. This seems to be always wrong for 386
COFF, so we handle the addend here instead. */
diff = reloc_entry->addend;
}
@@ -409,7 +409,7 @@ m68kcoff_common_addend_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
}
/* If the output symbol is common (in which case this must be a
- relocateable link), we need to add in the final size of the
+ relocatable link), we need to add in the final size of the
common symbol. */
if (h != NULL && h->root.type == bfd_link_hash_common)
*addendp += h->root.u.c.size;
@@ -445,7 +445,7 @@ bfd_m68k_coff_create_embedded_relocs (abfd, info, datasec, relsec, errmsg)
bfd_byte *p;
bfd_size_type amt;
- BFD_ASSERT (! info->relocateable);
+ BFD_ASSERT (! info->relocatable);
*errmsg = NULL;
@@ -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..a8b2c55e319 100644
--- a/bfd/coff-m88k.c
+++ b/bfd/coff-m88k.c
@@ -1,6 +1,6 @@
/* BFD back-end for Motorola 88000 COFF "Binary Compatability Standard" files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1998, 1999, 2000,
- 2001, 2002
+ 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -120,7 +120,7 @@ m88k_special_reloc (abfd, reloc_entry, symbol, data,
(unsigned char *) data + addr);
}
- /* If we are not producing relocateable output, return an error if
+ /* If we are not producing relocatable output, return an error if
the symbol is not defined. */
if (bfd_is_und_section (symbol->section) && output_bfd == (bfd *) NULL)
return bfd_reloc_undefined;
@@ -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..c4b073592ed 100644
--- a/bfd/coff-mcore.c
+++ b/bfd/coff-mcore.c
@@ -1,5 +1,5 @@
/* BFD back-end for Motorola MCore COFF/PE
- Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -388,10 +388,10 @@ coff_mcore_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_boolean hihalf;
bfd_vma hihalf_val;
- /* If we are performing a relocateable link, we don't need to do a
+ /* If we are performing a relocatable link, we don't need to do a
thing. The caller will take care of adjusting the reloc
addresses and symbol indices. */
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
/* Check if we have the same endianess */
@@ -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-mips.c b/bfd/coff-mips.c
index 6bb1b9f3ab9..d6d82184234 100644
--- a/bfd/coff-mips.c
+++ b/bfd/coff-mips.c
@@ -1,6 +1,6 @@
/* BFD back-end for MIPS Extended-Coff files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002
+ 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Original version by Per Bothner.
Full support added by Ian Lance Taylor, ian@cygnus.com.
@@ -551,7 +551,7 @@ mips_adjust_reloc_out (abfd, rel, intern)
}
/* ECOFF relocs are either against external symbols, or against
- sections. If we are producing relocateable output, and the reloc
+ sections. If we are producing relocatable output, and the reloc
is against an external symbol, and nothing has given us any
additional addend, the resulting reloc will also be against the
same symbol. In such a case, we don't want to change anything
@@ -559,7 +559,7 @@ mips_adjust_reloc_out (abfd, rel, intern)
final link time. Rather than put special case code into
bfd_perform_relocation, all the reloc types use this howto
function. It just short circuits the reloc if producing
- relocateable output against an external symbol. */
+ relocatable output against an external symbol. */
static bfd_reloc_status_type
mips_generic_reloc (abfd,
@@ -758,7 +758,7 @@ mips_gprel_reloc (abfd,
bfd *output_bfd;
char **error_message;
{
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
bfd_vma gp;
bfd_vma relocation;
unsigned long val;
@@ -777,27 +777,27 @@ mips_gprel_reloc (abfd,
}
if (output_bfd != (bfd *) NULL)
- relocateable = TRUE;
+ relocatable = TRUE;
else
{
- relocateable = FALSE;
+ relocatable = FALSE;
output_bfd = symbol->section->output_section->owner;
}
- if (bfd_is_und_section (symbol->section) && ! relocateable)
+ if (bfd_is_und_section (symbol->section) && ! relocatable)
return bfd_reloc_undefined;
/* We have to figure out the gp value, so that we can adjust the
symbol value correctly. We look up the symbol _gp in the output
BFD. If we can't find it, we're stuck. We cache it in the ECOFF
target data. We don't need to adjust the symbol value for an
- external symbol if we are producing relocateable output. */
+ external symbol if we are producing relocatable output. */
gp = _bfd_get_gp_value (output_bfd);
if (gp == 0
- && (! relocateable
+ && (! relocatable
|| (symbol->flags & BSF_SECTION_SYM) != 0))
{
- if (relocateable)
+ if (relocatable)
{
/* Make up a value. */
gp = symbol->section->output_section->vma + 0x4000;
@@ -861,16 +861,16 @@ mips_gprel_reloc (abfd,
val -= 0x10000;
/* Adjust val for the final section location and GP value. If we
- are producing relocateable output, we don't want to do this for
+ are producing relocatable output, we don't want to do this for
an external symbol. */
- if (! relocateable
+ if (! relocatable
|| (symbol->flags & BSF_SECTION_SYM) != 0)
val += relocation - gp;
insn = (insn &~ (unsigned) 0xffff) | (val & 0xffff);
bfd_put_32 (abfd, (bfd_vma) insn, (bfd_byte *) data + reloc_entry->address);
- if (relocateable)
+ if (relocatable)
reloc_entry->address += input_section->output_offset;
/* Make sure it fit in 16 bits. */
@@ -1046,7 +1046,7 @@ mips_rello_reloc (abfd,
}
/* bfd_perform_relocation does not handle pcrel_offset relocations
- correctly when generating a relocateable file, so handle them
+ correctly when generating a relocatable file, so handle them
directly here. */
if (output_bfd != (bfd *) NULL)
{
@@ -1413,7 +1413,7 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
and the GP value of OUTPUT_BFD (which is in GP). */
addend = ecoff_data (input_bfd)->gp - gp;
}
- else if (! info->relocateable
+ else if (! info->relocatable
|| h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
{
@@ -1432,7 +1432,7 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
/* This is a relocation against an undefined or common
symbol. The current addend in the instruction is
simply the desired offset into the symbol (normally
- zero). We are generating relocateable output, and we
+ zero). We are generating relocatable output, and we
aren't going to define this symbol, so we just leave
the instruction alone. */
addend = 0;
@@ -1446,7 +1446,7 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
if (offsets != NULL
&& offsets[i] != 0)
{
- BFD_ASSERT (! info->relocateable);
+ BFD_ASSERT (! info->relocatable);
BFD_ASSERT (int_rel.r_type == MIPS_R_PCREL16
|| int_rel.r_type == MIPS_R_RELHI
|| int_rel.r_type == MIPS_R_RELLO);
@@ -1524,9 +1524,9 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
}
}
- if (info->relocateable)
+ if (info->relocatable)
{
- /* We are generating relocateable output, and must convert
+ /* We are generating relocatable output, and must convert
the existing reloc. */
if (int_rel.r_extern)
{
@@ -2348,7 +2348,7 @@ bfd_mips_ecoff_create_embedded_relocs (abfd, info, datasec, relsec, errmsg)
bfd_byte *p;
bfd_size_type amt;
- BFD_ASSERT (! info->relocateable);
+ BFD_ASSERT (! info->relocatable);
*errmsg = NULL;
diff --git a/bfd/coff-or32.c b/bfd/coff-or32.c
index 6bec813e13f..b21cdf3f4ad 100644
--- a/bfd/coff-or32.c
+++ b/bfd/coff-or32.c
@@ -1,5 +1,5 @@
/* BFD back-end for OpenRISC 1000 COFF binaries.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
Contributed by Ivan Guzvinec <ivang@opencores.org>
This file is part of BFD, the Binary File Descriptor library.
@@ -360,10 +360,10 @@ coff_or32_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_boolean hihalf;
bfd_vma hihalf_val;
- /* If we are performing a relocateable link, we don't need to do a
+ /* If we are performing a relocatable link, we don't need to do a
thing. The caller will take care of adjusting the reloc
addresses and symbol indices. */
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
hihalf = FALSE;
diff --git a/bfd/coff-ppc.c b/bfd/coff-ppc.c
index 067f2b65878..cf54942314b 100644
--- a/bfd/coff-ppc.c
+++ b/bfd/coff-ppc.c
@@ -1088,10 +1088,10 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_vma relocation;
reloc_howto_type *howto = 0;
- /* If we are performing a relocateable link, we don't need to do a
+ /* If we are performing a relocatable link, we don't need to do a
thing. The caller will take care of adjusting the reloc
addresses and symbol indices. */
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
hihalf = FALSE;
@@ -2325,7 +2325,7 @@ ppc_bfd_coff_final_link (abfd, info)
|| info->strip == strip_some)
o->lineno_count += sec->lineno_count;
- if (info->relocateable)
+ if (info->relocatable)
o->reloc_count += sec->reloc_count;
if (sec->_raw_size > max_contents_size)
@@ -2335,7 +2335,7 @@ ppc_bfd_coff_final_link (abfd, info)
if (sec->reloc_count > max_reloc_count)
max_reloc_count = sec->reloc_count;
}
- else if (info->relocateable
+ else if (info->relocatable
&& (p->type == bfd_section_reloc_link_order
|| p->type == bfd_symbol_reloc_link_order))
++o->reloc_count;
@@ -2350,9 +2350,9 @@ ppc_bfd_coff_final_link (abfd, info)
}
}
- /* If doing a relocateable link, allocate space for the pointers we
+ /* If doing a relocatable link, allocate space for the pointers we
need to keep. */
- if (info->relocateable)
+ if (info->relocatable)
{
unsigned int i;
@@ -2401,9 +2401,9 @@ ppc_bfd_coff_final_link (abfd, info)
Because of this problem, we also keep the relocs in
memory until the end of the link. This wastes memory,
- but only when doing a relocateable link, which is not the
+ but only when doing a relocatable link, which is not the
common case. */
- BFD_ASSERT (info->relocateable);
+ BFD_ASSERT (info->relocatable);
amt = o->reloc_count;
amt *= sizeof (struct internal_reloc);
finfo.section_info[o->target_index].relocs =
@@ -2455,7 +2455,7 @@ ppc_bfd_coff_final_link (abfd, info)
finfo.linenos = (bfd_byte *) bfd_malloc (amt);
finfo.contents = (bfd_byte *) bfd_malloc (max_contents_size);
finfo.external_relocs = (bfd_byte *) bfd_malloc (max_reloc_count * relsz);
- if (! info->relocateable)
+ if (! info->relocatable)
{
amt = max_reloc_count * sizeof (struct internal_reloc);
finfo.internal_relocs = (struct internal_reloc *) bfd_malloc (amt);
@@ -2467,7 +2467,7 @@ ppc_bfd_coff_final_link (abfd, info)
|| (finfo.linenos == NULL && max_lineno_count > 0)
|| (finfo.contents == NULL && max_contents_size > 0)
|| (finfo.external_relocs == NULL && max_reloc_count > 0)
- || (! info->relocateable
+ || (! info->relocatable
&& finfo.internal_relocs == NULL
&& max_reloc_count > 0))
goto error_return;
@@ -2602,7 +2602,7 @@ ppc_bfd_coff_final_link (abfd, info)
finfo.outsyms = NULL;
}
- if (info->relocateable)
+ if (info->relocatable)
{
/* Now that we have written out all the global symbols, we know
the symbol indices to use for relocs against them, and we can
diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c
index 87b80b6a894..8ba305c7740 100644
--- a/bfd/coff-rs6000.c
+++ b/bfd/coff-rs6000.c
@@ -1,5 +1,5 @@
/* BFD back-end for IBM RS/6000 "XCOFF" files.
- Copyright 1990-1999, 2000, 2001, 2002
+ Copyright 1990-1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
FIXME: Can someone provide a transliteration of this name into ASCII?
Using the following chars caused a compiler warning on HIUX (so I replaced
@@ -3426,7 +3426,7 @@ xcoff_ppc_relocate_section (output_bfd, info, input_bfd,
}
else if ((0 == (h->flags & (XCOFF_DEF_DYNAMIC | XCOFF_IMPORT)))
- && ! info->relocateable)
+ && ! info->relocatable)
{
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd, input_section,
diff --git a/bfd/coff-sh.c b/bfd/coff-sh.c
index bcf059d299e..6b1468effab 100644
--- a/bfd/coff-sh.c
+++ b/bfd/coff-sh.c
@@ -706,7 +706,7 @@ sh_relax_section (abfd, sec, link_info, again)
*again = FALSE;
- if (link_info->relocateable
+ if (link_info->relocatable
|| (sec->flags & SEC_RELOC) == 0
|| sec->reloc_count == 0)
return TRUE;
@@ -2969,7 +2969,7 @@ sh_relocate_section (output_bfd, info, input_bfd, input_section, contents,
+ sec->output_section->vma
+ sec->output_offset);
}
- else if (! info->relocateable)
+ else if (! info->relocatable)
{
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd, input_section,
@@ -3024,12 +3024,12 @@ sh_relocate_section (output_bfd, info, input_bfd, input_section, contents,
static bfd_byte *
sh_coff_get_relocated_section_contents (output_bfd, link_info, link_order,
- data, relocateable, symbols)
+ data, relocatable, symbols)
bfd *output_bfd;
struct bfd_link_info *link_info;
struct bfd_link_order *link_order;
bfd_byte *data;
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
asymbol **symbols;
{
asection *input_section = link_order->u.indirect.section;
@@ -3040,12 +3040,12 @@ sh_coff_get_relocated_section_contents (output_bfd, link_info, link_order,
/* We only need to handle the case of relaxing, or of having a
particular set of section contents, specially. */
- if (relocateable
+ if (relocatable
|| coff_section_data (input_bfd, input_section) == NULL
|| coff_section_data (input_bfd, input_section)->contents == NULL)
return bfd_generic_get_relocated_section_contents (output_bfd, link_info,
link_order, data,
- relocateable,
+ relocatable,
symbols);
memcpy (data, coff_section_data (input_bfd, input_section)->contents,
@@ -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..c7ec9bd61f2 100644
--- a/bfd/coff-tic80.c
+++ b/bfd/coff-tic80.c
@@ -1,5 +1,6 @@
/* BFD back-end for Texas Instruments TMS320C80 Multimedia Video Processor (MVP).
- Copyright 1996, 1997, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1999, 2000, 2001, 2002, 2003
+ Free Software Foundation, Inc.
Written by Fred Fish (fnf@cygnus.com)
@@ -576,7 +577,7 @@ coff_tic80_relocate_section (output_bfd, info, input_bfd,
+ sec->output_offset);
}
- else if (! info->relocateable)
+ else if (! info->relocatable)
{
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd, input_section,
@@ -719,4 +720,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/coff64-rs6000.c b/bfd/coff64-rs6000.c
index dcb96dd7127..c6b18037603 100644
--- a/bfd/coff64-rs6000.c
+++ b/bfd/coff64-rs6000.c
@@ -1,5 +1,5 @@
/* BFD back-end for IBM RS/6000 "XCOFF64" files.
- Copyright 2000, 2001, 2002
+ Copyright 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Written Clinton Popetz.
Contributed by Cygnus Support.
@@ -1277,7 +1277,7 @@ xcoff64_ppc_relocate_section (output_bfd, info, input_bfd,
+ sec->output_offset);
}
else if ((0 == (h->flags & (XCOFF_DEF_DYNAMIC | XCOFF_IMPORT)))
- && ! info->relocateable)
+ && ! info->relocatable)
{
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd, input_section,
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/cofflink.c b/bfd/cofflink.c
index 4e613881242..59b32ed1f6f 100644
--- a/bfd/cofflink.c
+++ b/bfd/cofflink.c
@@ -1,5 +1,5 @@
/* COFF specific linker code.
- Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
@@ -597,9 +597,9 @@ coff_link_add_symbols (abfd, info)
sym_hash += sym.n_numaux + 1;
}
- /* If this is a non-traditional, non-relocateable link, try to
+ /* If this is a non-traditional, non-relocatable link, try to
optimize the handling of any .stab/.stabstr sections. */
- if (! info->relocateable
+ if (! info->relocatable
&& ! info->traditional_format
&& info->hash->creator->flavour == bfd_get_flavour (abfd)
&& (info->strip != strip_all && info->strip != strip_debugger))
@@ -739,7 +739,7 @@ _bfd_coff_final_link (abfd, info)
|| info->strip == strip_some)
o->lineno_count += sec->lineno_count;
- if (info->relocateable)
+ if (info->relocatable)
o->reloc_count += sec->reloc_count;
if (sec->_raw_size > max_contents_size)
@@ -749,7 +749,7 @@ _bfd_coff_final_link (abfd, info)
if (sec->reloc_count > max_reloc_count)
max_reloc_count = sec->reloc_count;
}
- else if (info->relocateable
+ else if (info->relocatable
&& (p->type == bfd_section_reloc_link_order
|| p->type == bfd_symbol_reloc_link_order))
++o->reloc_count;
@@ -782,9 +782,9 @@ _bfd_coff_final_link (abfd, info)
}
}
- /* If doing a relocateable link, allocate space for the pointers we
+ /* If doing a relocatable link, allocate space for the pointers we
need to keep. */
- if (info->relocateable)
+ if (info->relocatable)
{
unsigned int i;
@@ -830,9 +830,9 @@ _bfd_coff_final_link (abfd, info)
Because of this problem, we also keep the relocs in
memory until the end of the link. This wastes memory,
- but only when doing a relocateable link, which is not the
+ but only when doing a relocatable link, which is not the
common case. */
- BFD_ASSERT (info->relocateable);
+ BFD_ASSERT (info->relocatable);
amt = o->reloc_count;
amt *= sizeof (struct internal_reloc);
finfo.section_info[o->target_index].relocs =
@@ -884,7 +884,7 @@ _bfd_coff_final_link (abfd, info)
finfo.contents = (bfd_byte *) bfd_malloc (max_contents_size);
amt = max_reloc_count * relsz;
finfo.external_relocs = (bfd_byte *) bfd_malloc (amt);
- if (! info->relocateable)
+ if (! info->relocatable)
{
amt = max_reloc_count * sizeof (struct internal_reloc);
finfo.internal_relocs = (struct internal_reloc *) bfd_malloc (amt);
@@ -896,7 +896,7 @@ _bfd_coff_final_link (abfd, info)
|| (finfo.linenos == NULL && max_lineno_count > 0)
|| (finfo.contents == NULL && max_contents_size > 0)
|| (finfo.external_relocs == NULL && max_reloc_count > 0)
- || (! info->relocateable
+ || (! info->relocatable
&& finfo.internal_relocs == NULL
&& max_reloc_count > 0))
goto error_return;
@@ -1033,7 +1033,7 @@ _bfd_coff_final_link (abfd, info)
finfo.outsyms = NULL;
}
- if (info->relocateable && max_output_reloc_count > 0)
+ if (info->relocatable && max_output_reloc_count > 0)
{
/* Now that we have written out all the global symbols, we know
the symbol indices to use for relocs against them, and we can
@@ -1334,8 +1334,8 @@ mark_relocs (finfo, input_bfd)
internal_relocs = _bfd_coff_read_internal_relocs
(input_bfd, a, FALSE,
finfo->external_relocs,
- finfo->info->relocateable,
- (finfo->info->relocateable
+ finfo->info->relocatable,
+ (finfo->info->relocatable
? (finfo->section_info[ a->output_section->target_index ].relocs + a->output_section->reloc_count)
: finfo->internal_relocs)
);
@@ -1430,7 +1430,7 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
going to be involved in the relocations */
if (( finfo->info->strip != strip_none
|| finfo->info->discard != discard_none)
- && finfo->info->relocateable)
+ && finfo->info->relocatable)
{
/* mark the symbol array as 'not-used' */
memset (indexp, 0, obj_raw_syment_count (input_bfd) * sizeof * indexp);
@@ -1477,7 +1477,7 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
relocation. */
if ((finfo->info->strip != strip_none
|| finfo->info->discard != discard_none)
- && finfo->info->relocateable)
+ && finfo->info->relocatable)
dont_skip_symbol = *indexp;
else
dont_skip_symbol = FALSE;
@@ -2356,8 +2356,8 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
target_index = o->output_section->target_index;
internal_relocs = (_bfd_coff_read_internal_relocs
(input_bfd, o, FALSE, finfo->external_relocs,
- finfo->info->relocateable,
- (finfo->info->relocateable
+ finfo->info->relocatable,
+ (finfo->info->relocatable
? (finfo->section_info[target_index].relocs
+ o->output_section->reloc_count)
: finfo->internal_relocs)));
@@ -2374,7 +2374,7 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
finfo->sec_ptrs))
return FALSE;
- if (finfo->info->relocateable)
+ if (finfo->info->relocatable)
{
bfd_vma offset;
struct internal_reloc *irelend;
@@ -2608,9 +2608,9 @@ _bfd_coff_write_global_sym (h, data)
/* When a weak symbol is not overriden by a strong one,
turn it into an external symbol when not building a
- shared or relocateable object. */
+ shared or relocatable object. */
if (! finfo->info->shared
- && ! finfo->info->relocateable
+ && ! finfo->info->relocatable
&& IS_WEAK_EXTERNAL (finfo->output_bfd, isym))
isym.n_sclass = C_EXT;
@@ -2666,7 +2666,7 @@ _bfd_coff_write_global_sym (h, data)
if (sec->reloc_count > 0xffff
&& (! obj_pe (output_bfd)
- || finfo->info->relocateable))
+ || finfo->info->relocatable))
(*_bfd_error_handler)
(_("%s: %s: reloc overflow: 0x%lx > 0xffff"),
bfd_get_filename (output_bfd),
@@ -2675,7 +2675,7 @@ _bfd_coff_write_global_sym (h, data)
if (sec->lineno_count > 0xffff
&& (! obj_pe (output_bfd)
- || finfo->info->relocateable))
+ || finfo->info->relocatable))
(*_bfd_error_handler)
(_("%s: warning: %s: line number overflow: 0x%lx > 0xffff"),
bfd_get_filename (output_bfd),
@@ -2938,13 +2938,13 @@ _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
if (howto == NULL)
return FALSE;
- /* If we are doing a relocateable link, then we can just ignore
+ /* If we are doing a relocatable link, then we can just ignore
a PC relative reloc that is pcrel_offset. It will already
- have the correct value. If this is not a relocateable link,
+ have the correct value. If this is not a relocatable link,
then we should ignore the symbol value. */
if (howto->pc_relative && howto->pcrel_offset)
{
- if (info->relocateable)
+ if (info->relocatable)
continue;
if (sym != NULL && sym->n_scnum != 0)
addend += sym->n_value;
@@ -2987,7 +2987,7 @@ _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
else if (h->root.type == bfd_link_hash_undefweak)
val = 0;
- else if (! info->relocateable)
+ else if (! info->relocatable)
{
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd, input_section,
diff --git a/bfd/config.bfd b/bfd/config.bfd
index d93b07131a7..e1aa6b74cba 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*)
@@ -271,7 +284,7 @@ case "${targ}" in
targ_defvec=tic30_coff_vec
;;
- c4x-*-*coff* | tic4x-*-*coff*)
+ c4x-*-*coff* | tic4x-*-*coff* | tic4x-*-rtems*)
targ_defvec=tic4x_coff1_vec
targ_selvecs="tic4x_coff1_beh_vec tic4x_coff2_vec tic4x_coff2_beh_vec tic4x_coff0_vec tic4x_coff0_beh_vec"
targ_underscore=yes
@@ -433,7 +446,7 @@ case "${targ}" in
targ_cflags=-DOLD_FREEBSD_ABI_LABEL ;;
esac
;;
- i[3-7]86-*-netbsdelf*)
+ i[3-7]86-*-netbsdelf* | i[3-7]86-*-netbsd*-gnu*)
targ_defvec=bfd_elf32_i386_vec
targ_selvecs=i386netbsd_vec
;;
@@ -441,11 +454,16 @@ case "${targ}" in
targ_defvec=i386pe_vec
targ_selvecs="i386pe_vec i386pei_vec bfd_elf32_i386_vec"
;;
- i[3-7]86-*-netbsdaout* | i[3-7]86-*-netbsd* | i[3-7]86-*-openbsd*)
+ i[3-7]86-*-netbsdaout* | i[3-7]86-*-netbsd* | \
+ i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3])
targ_defvec=i386netbsd_vec
targ_selvecs="bfd_elf32_i386_vec i386bsd_vec"
targ_underscore=yes
;;
+ i[3-7]86-*-openbsd*)
+ targ_defvec=bfd_elf32_i386_vec
+ targ_selvecs=i386netbsd_vec
+ ;;
i[3-7]86-*-netware*)
targ_defvec=bfd_elf32_i386_vec
targ_selvecs="nlm32_i386_vec i386coff_vec i386aout_vec"
@@ -718,10 +736,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 +770,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"
@@ -942,7 +951,6 @@ case "${targ}" in
targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec"
;;
-
powerpcle-*-pe | powerpcle-*-winnt* | powerpcle-*-cygwin*)
targ_defvec=bfd_powerpcle_pe_vec
targ_selvecs="bfd_powerpcle_pei_vec bfd_powerpc_pei_vec bfd_powerpcle_pe_vec bfd_powerpc_pe_vec"
@@ -1034,7 +1042,6 @@ case "${targ}" in
targ_defvec=bfd_elf32_shnbsd_vec
targ_selvecs="bfd_elf32_shlnbsd_vec shcoff_vec shlcoff_vec"
;;
-
shl*-*-elf* | sh[1234]l*-*-elf* | sh3el*-*-elf* | shl*-*-kaos*)
targ_defvec=bfd_elf32_shl_vec
targ_selvecs="bfd_elf32_sh_vec shlcoff_vec shcoff_vec shlcoff_small_vec shcoff_small_vec"
@@ -1104,10 +1111,14 @@ case "${targ}" in
targ_selvecs=bfd_elf32_sparc_vec
targ_underscore=yes
;;
- sparc-*-openbsd*)
+ sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1])
targ_defvec=sparcnetbsd_vec
targ_underscore=yes
;;
+ sparc-*-openbsd*)
+ targ_defvec=bfd_elf32_sparc_vec
+ targ_selvecs=sparcnetbsd_vec
+ ;;
sparc-*-elf* | sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*)
targ_defvec=bfd_elf32_sparc_vec
targ_selvecs=sunos_big_vec
@@ -1168,7 +1179,6 @@ case "${targ}" in
targ_underscore=yes
;;
-
v850-*-*)
targ_defvec=bfd_elf32_v850_vec
;;
@@ -1195,6 +1205,11 @@ case "${targ}" in
targ_underscore=yes
;;
+ vax-*-openbsd*)
+ targ_defvec=vaxnetbsd_vec
+ targ_underscore=yes
+ ;;
+
vax*-*-*vms*)
targ_defvec=vms_vax_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/configure b/bfd/configure
index df2d7ff38fc..3b37998b4c2 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -5298,7 +5298,9 @@ rm -f conftest*
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/tahoe.h"'
;;
- vax-*-netbsd*) COREFILE=netbsd-core.lo ;;
+ vax-*-netbsd* | vax-*-openbsd*)
+ COREFILE=netbsd-core.lo
+ ;;
vax-*-ultrix2*)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/vaxult2.h"'
@@ -5334,17 +5336,17 @@ rm -f conftest*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5338: checking for $ac_hdr" >&5
+echo "configure:5340: 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 5343 "configure"
+#line 5345 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5350: \"$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*
@@ -5372,12 +5374,12 @@ done
if test "$ac_cv_header_sys_procfs_h" = yes; then
echo $ac_n "checking for prstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5376: checking for prstatus_t in sys/procfs.h" >&5
+echo "configure:5378: checking for prstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5381 "configure"
+#line 5383 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5386,7 +5388,7 @@ int main() {
prstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prstatus_t=yes
else
@@ -5408,12 +5410,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus_t" 1>&6
echo $ac_n "checking for prstatus32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5412: checking for prstatus32_t in sys/procfs.h" >&5
+echo "configure:5414: checking for prstatus32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5417 "configure"
+#line 5419 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5422,7 +5424,7 @@ int main() {
prstatus32_t avar
; return 0; }
EOF
-if { (eval echo configure:5426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prstatus32_t=yes
else
@@ -5444,12 +5446,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus32_t" 1>&6
echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5448: checking for prstatus_t.pr_who in sys/procfs.h" >&5
+echo "configure:5450: checking for prstatus_t.pr_who in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5453 "configure"
+#line 5455 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5458,7 +5460,7 @@ int main() {
prstatus_t avar; void* aref = (void*) &avar.pr_who
; return 0; }
EOF
-if { (eval echo configure:5462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=yes
else
@@ -5480,12 +5482,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" 1>&6
echo $ac_n "checking for prstatus32_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5484: checking for prstatus32_t.pr_who in sys/procfs.h" >&5
+echo "configure:5486: checking for prstatus32_t.pr_who in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5489 "configure"
+#line 5491 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5494,7 +5496,7 @@ int main() {
prstatus32_t avar; void* aref = (void*) &avar.pr_who
; return 0; }
EOF
-if { (eval echo configure:5498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=yes
else
@@ -5516,12 +5518,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" 1>&6
echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5520: checking for pstatus_t in sys/procfs.h" >&5
+echo "configure:5522: 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 5525 "configure"
+#line 5527 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5530,7 +5532,7 @@ int main() {
pstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pstatus_t=yes
else
@@ -5552,12 +5554,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
echo $ac_n "checking for pxstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5556: checking for pxstatus_t in sys/procfs.h" >&5
+echo "configure:5558: checking for pxstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pxstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5561 "configure"
+#line 5563 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5566,7 +5568,7 @@ int main() {
pxstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pxstatus_t=yes
else
@@ -5588,12 +5590,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pxstatus_t" 1>&6
echo $ac_n "checking for pstatus32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5592: checking for pstatus32_t in sys/procfs.h" >&5
+echo "configure:5594: checking for pstatus32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5597 "configure"
+#line 5599 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5602,7 +5604,7 @@ int main() {
pstatus32_t avar
; return 0; }
EOF
-if { (eval echo configure:5606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pstatus32_t=yes
else
@@ -5624,12 +5626,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus32_t" 1>&6
echo $ac_n "checking for prpsinfo_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5628: checking for prpsinfo_t in sys/procfs.h" >&5
+echo "configure:5630: checking for prpsinfo_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5633 "configure"
+#line 5635 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5638,7 +5640,7 @@ int main() {
prpsinfo_t avar
; return 0; }
EOF
-if { (eval echo configure:5642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prpsinfo_t=yes
else
@@ -5660,12 +5662,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo_t" 1>&6
echo $ac_n "checking for prpsinfo32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5664: checking for prpsinfo32_t in sys/procfs.h" >&5
+echo "configure:5666: checking for prpsinfo32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5669 "configure"
+#line 5671 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5674,7 +5676,7 @@ int main() {
prpsinfo32_t avar
; return 0; }
EOF
-if { (eval echo configure:5678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prpsinfo32_t=yes
else
@@ -5696,12 +5698,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo32_t" 1>&6
echo $ac_n "checking for psinfo_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5700: checking for psinfo_t in sys/procfs.h" >&5
+echo "configure:5702: checking for psinfo_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5705 "configure"
+#line 5707 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5710,7 +5712,7 @@ int main() {
psinfo_t avar
; return 0; }
EOF
-if { (eval echo configure:5714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_psinfo_t=yes
else
@@ -5732,12 +5734,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo_t" 1>&6
echo $ac_n "checking for psinfo32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5736: checking for psinfo32_t in sys/procfs.h" >&5
+echo "configure:5738: checking for psinfo32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5741 "configure"
+#line 5743 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5746,7 +5748,7 @@ int main() {
psinfo32_t avar
; return 0; }
EOF
-if { (eval echo configure:5750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_psinfo32_t=yes
else
@@ -5768,12 +5770,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo32_t" 1>&6
echo $ac_n "checking for lwpstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5772: checking for lwpstatus_t in sys/procfs.h" >&5
+echo "configure:5774: checking for lwpstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5777 "configure"
+#line 5779 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5782,7 +5784,7 @@ int main() {
lwpstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_lwpstatus_t=yes
else
@@ -5804,12 +5806,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpstatus_t" 1>&6
echo $ac_n "checking for lwpxstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5808: checking for lwpxstatus_t in sys/procfs.h" >&5
+echo "configure:5810: checking for lwpxstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpxstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5813 "configure"
+#line 5815 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5818,7 +5820,7 @@ int main() {
lwpxstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_lwpxstatus_t=yes
else
@@ -5840,12 +5842,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpxstatus_t" 1>&6
echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5844: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5
+echo "configure:5846: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5849 "configure"
+#line 5851 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5854,7 +5856,7 @@ int main() {
lwpstatus_t avar; void* aref = (void*) &avar.pr_context
; return 0; }
EOF
-if { (eval echo configure:5858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=yes
else
@@ -5876,12 +5878,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" 1>&6
echo $ac_n "checking for lwpstatus_t.pr_reg in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5880: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5
+echo "configure:5882: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5885 "configure"
+#line 5887 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5890,7 +5892,7 @@ int main() {
lwpstatus_t avar; void* aref = (void*) &avar.pr_reg
; return 0; }
EOF
-if { (eval echo configure:5894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=yes
else
@@ -5912,12 +5914,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" 1>&6
echo $ac_n "checking for win32_pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5916: checking for win32_pstatus_t in sys/procfs.h" >&5
+echo "configure:5918: checking for win32_pstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_win32_pstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5921 "configure"
+#line 5923 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5926,7 +5928,7 @@ int main() {
win32_pstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5930: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes
else
@@ -6396,10 +6398,10 @@ case ${host64}-${target64}-${want64} in
if test -n "$GCC" ; then
bad_64bit_gcc=no;
echo $ac_n "checking for gcc version with buggy 64-bit support""... $ac_c" 1>&6
-echo "configure:6400: checking for gcc version with buggy 64-bit support" >&5
+echo "configure:6402: checking for gcc version with buggy 64-bit support" >&5
# Add more tests for gcc versions with non-working 64-bit support here.
cat > conftest.$ac_ext <<EOF
-#line 6403 "configure"
+#line 6405 "configure"
#include "confdefs.h"
:__GNUC__:__GNUC_MINOR__:__i386__:
EOF
@@ -6445,17 +6447,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:6449: checking for $ac_hdr" >&5
+echo "configure:6451: 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 6454 "configure"
+#line 6456 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6459: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6461: \"$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*
@@ -6484,12 +6486,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6488: checking for $ac_func" >&5
+echo "configure:6490: 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 6493 "configure"
+#line 6495 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6512,7 +6514,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6518: \"$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
@@ -6537,7 +6539,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:6541: checking for working mmap" >&5
+echo "configure:6543: 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
@@ -6545,7 +6547,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 6549 "configure"
+#line 6551 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -6685,7 +6687,7 @@ main()
}
EOF
-if { (eval echo configure:6689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6691: \"$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
@@ -6710,12 +6712,12 @@ fi
for ac_func in madvise mprotect
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6714: checking for $ac_func" >&5
+echo "configure:6716: 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 6719 "configure"
+#line 6721 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6738,7 +6740,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
diff --git a/bfd/configure.in b/bfd/configure.in
index b7081454d67..379b3ac5577 100644
--- a/bfd/configure.in
+++ b/bfd/configure.in
@@ -359,7 +359,9 @@ changequote([,])dnl
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/tahoe.h"'
;;
- vax-*-netbsd*) COREFILE=netbsd-core.lo ;;
+ vax-*-netbsd* | vax-*-openbsd*)
+ COREFILE=netbsd-core.lo
+ ;;
vax-*-ultrix2*)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/vaxult2.h"'
diff --git a/bfd/cpu-h8300.c b/bfd/cpu-h8300.c
index f61e7576a8b..e1c77bfe2e6 100644
--- a/bfd/cpu-h8300.c
+++ b/bfd/cpu-h8300.c
@@ -82,7 +82,13 @@ h8300_scan (info, string)
return (info->mach == bfd_mach_h8300sn);
if (*string == 'x' || *string == 'X')
- return (info->mach == bfd_mach_h8300sx);
+ {
+ string++;
+ if (*string == 'n' || *string == 'N')
+ return (info->mach == bfd_mach_h8300sxn);
+
+ return (info->mach == bfd_mach_h8300sx);
+ }
return (info->mach == bfd_mach_h8300s);
}
@@ -106,6 +112,22 @@ compatible (in, out)
return in;
}
+static const bfd_arch_info_type h8300sxn_info_struct =
+{
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_h8300,
+ bfd_mach_h8300sxn,
+ "h8300sxn", /* arch_name */
+ "h8300sxn", /* printable name */
+ 1,
+ FALSE, /* the default machine */
+ compatible,
+ h8300_scan,
+ 0
+};
+
static const bfd_arch_info_type h8300sx_info_struct =
{
32, /* 32 bits in a word */
@@ -119,7 +141,7 @@ static const bfd_arch_info_type h8300sx_info_struct =
FALSE, /* the default machine */
compatible,
h8300_scan,
- 0
+ &h8300sxn_info_struct
};
static const bfd_arch_info_type h8300sn_info_struct =
diff --git a/bfd/cpu-ns32k.c b/bfd/cpu-ns32k.c
index 1fe67d9ffce..1a12b162f20 100644
--- a/bfd/cpu-ns32k.c
+++ b/bfd/cpu-ns32k.c
@@ -1,5 +1,5 @@
/* BFD support for the ns32k architecture.
- Copyright 1990, 1991, 1994, 1995, 1998, 2000, 2001, 2002
+ Copyright 1990, 1991, 1994, 1995, 1998, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Almost totally rewritten by Ian Dall from initial work
by Andrew Cagney.
@@ -182,7 +182,7 @@ do_ns32k_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
return bfd_reloc_ok;
}
- /* If we are not producing relocateable output, return an error if
+ /* If we are not producing relocatable output, return an error if
the symbol is not defined. An undefined weak symbol is
considered to have a value of zero (SVR4 ABI, p. 4-27). */
if (symbol->section == &bfd_und_section
@@ -236,7 +236,7 @@ do_ns32k_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
include the position of the location; for example, m88kbcs,
or ELF. For those targets, pcrel_offset is TRUE.
- If we are producing relocateable output, then we must ensure
+ If we are producing relocatable output, then we must ensure
that this reloc will be correctly computed when the final
relocation is done. If pcrel_offset is FALSE we want to wind
up with the negative of the location within the section,
@@ -245,7 +245,7 @@ do_ns32k_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
we do not want to adjust the existing addend at all.
FIXME: This seems logical to me, but for the case of
- producing relocateable output it is not what the code
+ producing relocatable output it is not what the code
actually does. I don't want to change it, because it seems
far too likely that something will break. */
relocation -=
@@ -297,7 +297,7 @@ do_ns32k_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
should not have any tests that depend upon the flavour. It's
seem like entirely the wrong place for such a thing. The
second obvious point is that the current code ignores the
- reloc addend when producing relocateable output for COFF.
+ reloc addend when producing relocatable output for COFF.
That's peculiar. In fact, I really have no idea what the
point of the line you want to remove is.
@@ -315,10 +315,10 @@ do_ns32k_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
(coff-i386 does subtract the old value, to be compatible with
existing coff-i386 targets, like SCO).
- So everything works fine when not producing relocateable
- output. When we are producing relocateable output, logically
+ So everything works fine when not producing relocatable
+ output. When we are producing relocatable output, logically
we should do exactly what we do when not producing
- relocateable output. Therefore, your patch is correct. In
+ relocatable output. Therefore, your patch is correct. In
fact, it should probably always just set reloc_entry->addend
to 0 for all cases, since it is, in fact, going to add the
value into the object file. This won't hurt the COFF code,
@@ -326,7 +326,7 @@ do_ns32k_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
to other formats (the thing to check for would be whether
any formats both use the addend and set partial_inplace).
- When I wanted to make coff-i386 produce relocateable output,
+ When I wanted to make coff-i386 produce relocatable output,
I ran into the problem that you are running into: I wanted
to remove that line. Rather than risk it, I made the
coff-i386 relocs use a special function; it's coff_i386_reloc
diff --git a/bfd/doc/bfdint.texi b/bfd/doc/bfdint.texi
index 27375cd4802..4566731c10e 100644
--- a/bfd/doc/bfdint.texi
+++ b/bfd/doc/bfdint.texi
@@ -1,6 +1,6 @@
\input texinfo
@c Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998,
-@c 2000, 2001
+@c 2000, 2001, 2002, 2003
@c Free Software Foundation, Inc.
@setfilename bfdint.info
@@ -835,7 +835,7 @@ corresponding field in the target vector is named
@item _bfd_get_relocated_section_contents
Read the contents of a section and apply the relocation information.
-This handles both a final link and a relocateable link; in the latter
+This handles both a final link and a relocatable link; in the latter
case, it adjust the relocation information as well. This is called via
@samp{bfd_get_relocated_section_contents}. Most targets implement it by
calling @samp{bfd_generic_get_relocated_section_contents}.
@@ -1169,7 +1169,7 @@ allocate space in a different section and use the offset within that
section as the value to store. In the IEEE object file format,
relocations may involve arbitrary expressions.
-When doing a relocateable link, the linker may or may not have to do
+When doing a relocatable link, the linker may or may not have to do
anything with a relocation, depending upon the definition of the
relocation. Simple relocations generally do not require any special
action.
@@ -1240,9 +1240,9 @@ existing target, you need to do the following:
@itemize @bullet
@item
Make sure you clearly understand what the contents of the section should
-look like after assembly, after a relocateable link, and after a final
+look like after assembly, after a relocatable link, and after a final
link. Make sure you clearly understand the operations the linker must
-perform during a relocateable link and during a final link.
+perform during a relocatable link and during a final link.
@item
Write a howto structure for the relocation. The howto structure is
@@ -1257,7 +1257,7 @@ call @samp{bfd_install_relocation}, so your howto structure has to be
able to handle that. You may need to set the @samp{special_function}
field to handle assembly correctly. Be careful to ensure that any code
you write to handle the assembler will also work correctly when doing a
-relocateable link. For example, see @samp{bfd_elf_generic_reloc}.
+relocatable link. For example, see @samp{bfd_elf_generic_reloc}.
@item
Test the assembler. Consider the cases of relocation against an
@@ -1271,14 +1271,14 @@ If your target uses the new linker, which is recommended, add any
required handling to the target specific relocation function. In simple
cases this will just involve a call to @samp{_bfd_final_link_relocate}
or @samp{_bfd_relocate_contents}, depending upon the definition of the
-relocation and whether the link is relocateable or not.
+relocation and whether the link is relocatable or not.
@item
Test the linker. Test the case of a final link. If the relocation can
overflow, use a linker script to force an overflow and make sure the
-error is reported correctly. Test a relocateable link, whether the
-symbol is defined or undefined in the relocateable output. For both the
-final and relocateable link, test the case when the symbol is a common
+error is reported correctly. Test a relocatable link, whether the
+symbol is defined or undefined in the relocatable output. For both the
+final and relocatable link, test the case when the symbol is a common
symbol, when the symbol looked like a common symbol but became a defined
symbol, when the symbol is defined in a different object file, and when
the symbol is defined in the same object file.
@@ -1291,7 +1291,7 @@ thing for the relocation. You may need to set the
doing a link in which the output object file format is S-records.
@item
-Using the linker to generate relocateable output in a different object
+Using the linker to generate relocatable output in a different object
file format is impossible in the general case, so you generally don't
have to worry about that. The GNU linker makes sure to stop that from
happening when an input file in a different format has relocations.
@@ -1350,7 +1350,7 @@ howto structure. Some mechanism would be used to determine which type
of howto structure was being used by a particular format.
The new howto structure would clearly define the relocation behaviour in
-the case of an assembly, a relocateable link, and a final link. At
+the case of an assembly, a relocatable link, and a final link. At
least one special function would be defined as an escape, and it might
make sense to define more.
@@ -1566,7 +1566,7 @@ relocations. @samp{Rela} relocations will require more space in object
files (but not in executables, except when using dynamic linking).
However, this is outweighed by the simplicity of addend handling when
using @samp{Rela} relocations. With @samp{Rel} relocations, the addend
-must be stored in the section contents, which makes relocateable links
+must be stored in the section contents, which makes relocatable links
more complex.
For example, consider C code like @code{i = a[1000];} where @samp{a} is
@@ -1578,7 +1578,7 @@ relocations, that addend must be stored in the instructions themselves.
If you are adding support for a RISC chip which uses two or more
instructions to load an address, then the addend may not fit in a single
instruction, and will have to be somehow split among the instructions.
-This makes linking awkward, particularly when doing a relocateable link
+This makes linking awkward, particularly when doing a relocatable link
in which the addend may have to be updated. It can be done---the MIPS
ELF support does it---but it should be avoided when possible.
@@ -1645,7 +1645,7 @@ information, and modify the section contents according to the relocation
information. In simple cases, this is little more than a loop over the
relocations which computes the value of each relocation and calls
@samp{_bfd_final_link_relocate}. The function must check for a
-relocateable link, and in that case normally needs to do nothing other
+relocatable link, and in that case normally needs to do nothing other
than adjust the addend for relocations against a section symbol.
The complex cases generally have to do with dynamic linker support. GOT
diff --git a/bfd/ecoff.c b/bfd/ecoff.c
index 1ba7d56a6e4..ce18f54b0b1 100644
--- a/bfd/ecoff.c
+++ b/bfd/ecoff.c
@@ -81,8 +81,10 @@ static asection bfd_debug_section =
"*DEBUG*", 0, 0, NULL, 0, 0, 0,
/* linker_mark, linker_has_input, gc_mark, segment_mark, */
0, 0, 0, 0,
- /* sec_info_type, use_rela_p, has_tls_reloc, flag11, flag12, */
- 0, 0, 0, 0, 0,
+ /* sec_info_type, use_rela_p, has_tls_reloc, */
+ 0, 0, 0,
+ /* need_finalize_relax, has_gp_reloc, */
+ 0, 0,
/* flag13, flag14, flag15, flag16, flag20, flag24, */
0, 0, 0, 0, 0, 0,
/* vma, lma, _cooked_size, _raw_size, */
@@ -4158,7 +4160,7 @@ _bfd_ecoff_bfd_final_link (abfd, info)
ecoff_link_write_external,
(PTR) &einfo);
- if (info->relocateable)
+ if (info->relocatable)
{
/* We need to make a pass over the link_orders to count up the
number of relocations we will need to output, so that we know
@@ -4188,7 +4190,7 @@ _bfd_ecoff_bfd_final_link (abfd, info)
bfd_ecoff_debug_free (handle, abfd, debug, &backend->debug_swap, info);
- if (info->relocateable)
+ if (info->relocatable)
{
/* Now reset the reloc_count field of the sections in the output
BFD to 0, so that we can use them to keep track of how many
@@ -4208,7 +4210,7 @@ _bfd_ecoff_bfd_final_link (abfd, info)
ecoff_data (abfd)->gp = (h->u.def.value
+ h->u.def.section->output_section->vma
+ h->u.def.section->output_offset);
- else if (info->relocateable)
+ else if (info->relocatable)
{
bfd_vma lo;
@@ -4606,11 +4608,11 @@ ecoff_indirect_link_order (output_bfd, info, output_section, link_order)
cooked_size))
goto error_return;
- /* If we are producing relocateable output, the relocs were
+ /* If we are producing relocatable output, the relocs were
modified, and we write them out now. We use the reloc_count
field of output_section to keep track of the number of relocs we
have output so far. */
- if (info->relocateable)
+ if (info->relocatable)
{
file_ptr pos = (output_section->rel_filepos
+ output_section->reloc_count * external_reloc_size);
diff --git a/bfd/ecofflink.c b/bfd/ecofflink.c
index b74f18a52df..89edae344f5 100644
--- a/bfd/ecofflink.c
+++ b/bfd/ecofflink.c
@@ -1,5 +1,5 @@
/* Routines to link ECOFF debugging information.
- Copyright 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002
+ Copyright 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>.
@@ -526,7 +526,7 @@ bfd_ecoff_debug_init (output_bfd, output_debug, output_swap, info)
ainfo->largest_file_shuffle = 0;
- if (! info->relocateable)
+ if (! info->relocatable)
{
if (! bfd_hash_table_init (&ainfo->str_hash.table, string_hash_newfunc))
return NULL;
@@ -559,7 +559,7 @@ bfd_ecoff_debug_free (handle, output_bfd, output_debug, output_swap, info)
bfd_hash_table_free (&ainfo->fdr_hash.table);
- if (! info->relocateable)
+ if (! info->relocatable)
bfd_hash_table_free (&ainfo->str_hash.table);
objalloc_free (ainfo->memory);
@@ -879,9 +879,9 @@ bfd_ecoff_debug_accumulate (handle, output_bfd, output_debug, output_swap,
/* If we are doing a final link, we hash all the strings in
the local symbol table together. This reduces the amount
of space required by debugging information. We don't do
- this when performing a relocateable link because it would
+ this when performing a relocatable link because it would
prevent us from easily merging different FDR's. */
- if (! info->relocateable)
+ if (! info->relocatable)
{
bfd_boolean ffilename;
const char *name;
@@ -958,7 +958,7 @@ bfd_ecoff_debug_accumulate (handle, output_bfd, output_debug, output_swap,
fdr.iauxBase = output_symhdr->iauxMax;
output_symhdr->iauxMax += fdr.caux;
}
- if (! info->relocateable)
+ if (! info->relocatable)
{
/* When are are hashing strings, we lie about the number of
@@ -1127,7 +1127,7 @@ ecoff_add_string (ainfo, info, debug, fdr, string)
symhdr = &debug->symbolic_header;
len = strlen (string);
- if (info->relocateable)
+ if (info->relocatable)
{
if (!add_memory_shuffle (ainfo, &ainfo->ss, &ainfo->ss_end, (PTR) string,
len + 1))
@@ -1287,12 +1287,12 @@ bfd_ecoff_debug_accumulate_other (handle, output_bfd, output_debug,
this interface, so that must be changed to do something else. */
bfd_boolean
-bfd_ecoff_debug_externals (abfd, debug, swap, relocateable, get_extr,
+bfd_ecoff_debug_externals (abfd, debug, swap, relocatable, get_extr,
set_index)
bfd *abfd;
struct ecoff_debug_info *debug;
const struct ecoff_debug_swap *swap;
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
bfd_boolean (*get_extr) PARAMS ((asymbol *, EXTR *));
void (*set_index) PARAMS ((asymbol *, bfd_size_type));
{
@@ -1317,7 +1317,7 @@ bfd_ecoff_debug_externals (abfd, debug, swap, relocateable, get_extr,
/* If we're producing an executable, move common symbols into
bss. */
- if (! relocateable)
+ if (! relocatable)
{
if (esym.asym.sc == scCommon)
esym.asym.sc = scBss;
@@ -1694,7 +1694,7 @@ bfd_ecoff_write_accumulated_debug (handle, abfd, debug, swap, info, where)
/* The string table is written out from the hash table if this is a
final link. */
- if (info->relocateable)
+ if (info->relocatable)
{
BFD_ASSERT (ainfo->ss_hash == (struct string_hash_entry *) NULL);
if (! ecoff_write_shuffle (abfd, swap, ainfo->ss, space))
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 1da605502b5..5e4c1807c7c 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -706,7 +706,7 @@ struct elf_backend_data
This function is responsible for adjust the section contents as
necessary, and (if using Rela relocs and generating a
- relocateable output file) adjusting the reloc addend as
+ relocatable output file) adjusting the reloc addend as
necessary.
This function does not have to worry about setting the reloc
@@ -720,7 +720,7 @@ struct elf_backend_data
The global hash table entry for the global symbols can be found
via elf_sym_hashes (input_bfd).
- When generating relocateable output, this function must handle
+ When generating relocatable output, this function must handle
STB_LOCAL/STT_SECTION symbols specially. The output symbol is
going to be the section symbol corresponding to the output
section, which means that the addend must be adjusted
@@ -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-eh-frame.c b/bfd/elf-eh-frame.c
index 7d0b52bc40f..e422aa96a55 100644
--- a/bfd/elf-eh-frame.c
+++ b/bfd/elf-eh-frame.c
@@ -403,7 +403,7 @@ _bfd_elf_discard_section_eh_frame (abfd, info, sec,
in which case we can remove it provided we adjust
all FDEs. Also, it can be removed if we have removed
all FDEs using it. */
- if ((!info->relocateable
+ if ((!info->relocatable
&& cie_compare (&cie, &hdr_info->last_cie) == 0)
|| cie_usage_count == 0)
{
diff --git a/bfd/elf-hppa.h b/bfd/elf-hppa.h
index 5e4458c1170..f3727466015 100644
--- a/bfd/elf-hppa.h
+++ b/bfd/elf-hppa.h
@@ -1,5 +1,5 @@
/* Common code for PA ELF implementations.
- Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -1159,7 +1159,7 @@ elf_hppa_unmark_useless_dynamic_symbols (h, data)
Ultimately we should have better controls over the generic ELF BFD
linker code. */
- if (! info->relocateable
+ if (! info->relocatable
&& ! (info->shared
&& !info->no_undefined)
&& h->root.type == bfd_link_hash_undefined
@@ -1195,7 +1195,7 @@ elf_hppa_remark_useless_dynamic_symbols (h, data)
Ultimately we should have better controls over the generic ELF BFD
linker code. */
- if (! info->relocateable
+ if (! info->relocatable
&& ! (info->shared
&& !info->no_undefined)
&& h->root.type == bfd_link_hash_undefined
@@ -1265,7 +1265,7 @@ elf_hppa_final_link (abfd, info)
bfd_boolean retval;
struct elf64_hppa_link_hash_table *hppa_info = elf64_hppa_hash_table (info);
- if (! info->relocateable)
+ if (! info->relocatable)
{
struct elf_link_hash_entry *gp;
bfd_vma gp_val;
@@ -1376,7 +1376,7 @@ elf_hppa_relocate_section (output_bfd, info, input_bfd, input_section,
Elf_Internal_Rela *relend;
struct elf64_hppa_link_hash_table *hppa_info;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
hppa_info = elf64_hppa_hash_table (info);
diff --git a/bfd/elf-m10200.c b/bfd/elf-m10200.c
index c35adcba81c..09d7d993ba1 100644
--- a/bfd/elf-m10200.c
+++ b/bfd/elf-m10200.c
@@ -343,7 +343,7 @@ mn10200_elf_relocate_section (output_bfd, info, input_bfd, input_section,
struct elf_link_hash_entry **sym_hashes;
Elf_Internal_Rela *rel, *relend;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
@@ -512,10 +512,10 @@ mn10200_elf_relax_section (abfd, sec, link_info, again)
/* Assume nothing changes. */
*again = FALSE;
- /* We don't have to do anything for a relocateable link, if
+ /* We don't have to do anything for a relocatable link, if
this section does not have relocs, or if this is not a
code section. */
- if (link_info->relocateable
+ if (link_info->relocatable
|| (sec->flags & SEC_RELOC) == 0
|| sec->reloc_count == 0
|| (sec->flags & SEC_CODE) == 0)
@@ -1305,12 +1305,12 @@ mn10200_elf_symbol_address_p (abfd, sec, isym, addr)
static bfd_byte *
mn10200_elf_get_relocated_section_contents (output_bfd, link_info, link_order,
- data, relocateable, symbols)
+ data, relocatable, symbols)
bfd *output_bfd;
struct bfd_link_info *link_info;
struct bfd_link_order *link_order;
bfd_byte *data;
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
asymbol **symbols;
{
Elf_Internal_Shdr *symtab_hdr;
@@ -1322,11 +1322,11 @@ mn10200_elf_get_relocated_section_contents (output_bfd, link_info, link_order,
/* We only need to handle the case of relaxing, or of having a
particular set of section contents, specially. */
- if (relocateable
+ if (relocatable
|| elf_section_data (input_section)->this_hdr.contents == NULL)
return bfd_generic_get_relocated_section_contents (output_bfd, link_info,
link_order, data,
- relocateable,
+ relocatable,
symbols);
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c
index cad2b9c7b8c..15d1a336ff9 100644
--- a/bfd/elf-m10300.c
+++ b/bfd/elf-m10300.c
@@ -350,7 +350,7 @@ mn10300_elf_check_relocs (abfd, info, sec, relocs)
const Elf_Internal_Rela *rel;
const Elf_Internal_Rela *rel_end;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -550,7 +550,7 @@ mn10300_elf_relocate_section (output_bfd, info, input_bfd, input_section,
struct elf32_mn10300_link_hash_entry **sym_hashes;
Elf_Internal_Rela *rel, *relend;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
@@ -1334,10 +1334,10 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
/* For error_return. */
section = sec;
- /* We don't have to do anything for a relocateable link, if
+ /* We don't have to do anything for a relocatable link, if
this section does not have relocs, or if this is not a
code section. */
- if (link_info->relocateable
+ if (link_info->relocatable
|| (sec->flags & SEC_RELOC) == 0
|| sec->reloc_count == 0
|| (sec->flags & SEC_CODE) == 0)
@@ -2541,12 +2541,12 @@ mn10300_elf_symbol_address_p (abfd, sec, isym, addr)
static bfd_byte *
mn10300_elf_get_relocated_section_contents (output_bfd, link_info, link_order,
- data, relocateable, symbols)
+ data, relocatable, symbols)
bfd *output_bfd;
struct bfd_link_info *link_info;
struct bfd_link_order *link_order;
bfd_byte *data;
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
asymbol **symbols;
{
Elf_Internal_Shdr *symtab_hdr;
@@ -2558,11 +2558,11 @@ mn10300_elf_get_relocated_section_contents (output_bfd, link_info, link_order,
/* We only need to handle the case of relaxing, or of having a
particular set of section contents, specially. */
- if (relocateable
+ if (relocatable
|| elf_section_data (input_section)->this_hdr.contents == NULL)
return bfd_generic_get_relocated_section_contents (output_bfd, link_info,
link_order, data,
- relocateable,
+ relocatable,
symbols);
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
diff --git a/bfd/elf.c b/bfd/elf.c
index 66383e7c0d4..470f3c2f76e 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -936,7 +936,7 @@ const char *const bfd_elf_section_type_names[] = {
"SHT_NOBITS", "SHT_REL", "SHT_SHLIB", "SHT_DYNSYM",
};
-/* ELF relocs are against symbols. If we are producing relocateable
+/* ELF relocs are against symbols. If we are producing relocatable
output, and the reloc is against an external symbol, and nothing
has given us any additional addend, the resulting reloc will also
be against the same symbol. In such a case, we don't want to
@@ -944,7 +944,7 @@ const char *const bfd_elf_section_type_names[] = {
all be done at final link time. Rather than put special case code
into bfd_perform_relocation, all the reloc types use this howto
function. It just short circuits the reloc if producing
- relocateable output against an external symbol. */
+ relocatable output against an external symbol. */
bfd_reloc_status_type
bfd_elf_generic_reloc (abfd,
@@ -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);
@@ -1837,7 +1838,7 @@ bfd_section_from_shdr (abfd, shindex)
SHF_ALLOC is set, and this is a shared object, then we also
treat this section as a BFD section. We can not base the
decision purely on SHF_ALLOC, because that flag is sometimes
- set in a relocateable object file, which would confuse the
+ set in a relocatable object file, which would confuse the
linker. */
if ((hdr->sh_flags & SHF_ALLOC) != 0
&& (abfd->flags & DYNAMIC) != 0
@@ -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-arm.h b/bfd/elf32-arm.h
index ba286b1237d..e2d66adb8ca 100644
--- a/bfd/elf32-arm.h
+++ b/bfd/elf32-arm.h
@@ -564,7 +564,7 @@ bfd_elf32_arm_add_glue_sections_to_bfd (abfd, info)
/* If we are only performing a partial
link do not bother adding the glue. */
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
sec = bfd_get_section_by_name (abfd, ARM2THUMB_GLUE_SECTION_NAME);
@@ -620,7 +620,7 @@ bfd_elf32_arm_get_bfd_for_interworking (abfd, info)
/* If we are only performing a partial link
do not bother getting a bfd to hold the glue. */
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
globals = elf32_arm_hash_table (info);
@@ -652,7 +652,7 @@ bfd_elf32_arm_process_before_allocation (abfd, link_info, no_pipeline_knowledge)
/* If we are only performing a partial link do not bother
to construct any glue. */
- if (link_info->relocateable)
+ if (link_info->relocatable)
return TRUE;
/* Here we have a bfd that is to be included on the link. We have a hook
@@ -1838,7 +1838,7 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
const char *name;
#if !USE_REL
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
#endif
@@ -1870,9 +1870,9 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
howto = bfd_reloc.howto;
#if USE_REL
- if (info->relocateable)
+ if (info->relocatable)
{
- /* This is a relocateable link. We don't have to change
+ /* This is a relocatable link. We don't have to change
anything, unless the reloc is against a section symbol,
in which case we have to adjust according to where the
section symbol winds up in the output section. */
@@ -2630,7 +2630,7 @@ elf32_arm_check_relocs (abfd, info, sec, relocs)
asection *sgot, *srelgot, *sreloc;
bfd_vma *local_got_offsets;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
sgot = srelgot = sreloc = NULL;
diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c
index a701dc9d00e..defa9ce4534 100644
--- a/bfd/elf32-avr.c
+++ b/bfd/elf32-avr.c
@@ -1,5 +1,5 @@
/* AVR-specific support for 32-bit ELF
- Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Denis Chertykov <denisc@overta.ru>
This file is part of BFD, the Binary File Descriptor library.
@@ -455,7 +455,7 @@ elf32_avr_check_relocs (abfd, info, sec, relocs)
const Elf_Internal_Rela *rel;
const Elf_Internal_Rela *rel_end;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -719,7 +719,7 @@ elf32_avr_relocate_section (output_bfd, info, input_bfd, input_section,
Elf_Internal_Rela * rel;
Elf_Internal_Rela * relend;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c
index 40327b650e4..4618a8f2830 100644
--- a/bfd/elf32-cris.c
+++ b/bfd/elf32-cris.c
@@ -799,7 +799,7 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
dynobj = elf_hash_table (info)->dynobj;
@@ -1129,8 +1129,15 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
break;
case R_CRIS_32_GOTREL:
- /* This relocation must only be performed against local symbols. */
- if (h != NULL && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
+ /* This relocation must only be performed against local symbols.
+ It's also ok when we link a program and the symbol is either
+ defined in an ordinary (non-DSO) object or is undefined weak. */
+ if (h != NULL
+ && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+ && !(!info->shared
+ && ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0
+ || ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0
+ && h->root.type == bfd_link_hash_undefweak))))
{
(*_bfd_error_handler)
(_("%s: relocation %s is not allowed for global symbol: `%s' from %s section"),
@@ -2267,7 +2274,7 @@ cris_elf_check_relocs (abfd, info, sec, relocs)
asection *srelgot;
asection *sreloc;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
dynobj = elf_hash_table (info)->dynobj;
diff --git a/bfd/elf32-d10v.c b/bfd/elf32-d10v.c
index 1d6912a0f4c..cc5eddce7fd 100644
--- a/bfd/elf32-d10v.c
+++ b/bfd/elf32-d10v.c
@@ -1,5 +1,6 @@
/* D10V-specific support for 32-bit ELF
- Copyright 1996, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1996, 1998, 1999, 2000, 2001, 2002, 2003
+ Free Software Foundation, Inc.
Contributed by Martin Hunt (hunt@cygnus.com).
This file is part of BFD, the Binary File Descriptor library.
@@ -303,7 +304,7 @@ elf32_d10v_check_relocs (abfd, info, sec, relocs)
const Elf_Internal_Rela *rel;
const Elf_Internal_Rela *rel_end;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -388,9 +389,9 @@ elf32_d10v_relocate_section (output_bfd, info, input_bfd, input_section,
howto = elf_d10v_howto_table + r_type;
- if (info->relocateable)
+ if (info->relocatable)
{
- /* This is a relocateable link. We don't have to change
+ /* This is a relocatable link. We don't have to change
anything, unless the reloc is against a section symbol,
in which case we have to adjust according to where the
section symbol winds up in the output section. */
diff --git a/bfd/elf32-dlx.c b/bfd/elf32-dlx.c
index a1f7d0d48f1..1f380e88eaa 100644
--- a/bfd/elf32-dlx.c
+++ b/bfd/elf32-dlx.c
@@ -1,5 +1,5 @@
/* DLX specific support for 32-bit ELF
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -320,7 +320,7 @@ _bfd_dlx_elf_hi16_reloc (abfd, reloc_entry, symbol, data,
return ret;
}
-/* ELF relocs are against symbols. If we are producing relocateable
+/* ELF relocs are against symbols. If we are producing relocatable
output, and the reloc is against an external symbol, and nothing
has given us any additional addend, the resulting reloc will also
be against the same symbol. In such a case, we don't want to
@@ -328,7 +328,7 @@ _bfd_dlx_elf_hi16_reloc (abfd, reloc_entry, symbol, data,
all be done at final link time. Rather than put special case code
into bfd_perform_relocation, all the reloc types use this howto
function. It just short circuits the reloc if producing
- relocateable output against an external symbol. */
+ relocatable output against an external symbol. */
static bfd_reloc_status_type
elf32_dlx_relocate16 (abfd, reloc_entry, symbol, data,
@@ -532,7 +532,7 @@ elf32_dlx_check_relocs (abfd, info, sec, relocs)
const Elf_Internal_Rela *rel;
const Elf_Internal_Rela *rel_end;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
diff --git a/bfd/elf32-fr30.c b/bfd/elf32-fr30.c
index 2311316498e..c4e22908969 100644
--- a/bfd/elf32-fr30.c
+++ b/bfd/elf32-fr30.c
@@ -1,5 +1,6 @@
/* FR30-specific support for 32-bit ELF.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -478,7 +479,7 @@ fr30_final_link_relocate (howto, input_bfd, input_section, contents, rel,
zero.
This function is responsible for adjusting the section contents as
- necessary, and (if using Rela relocs and generating a relocateable
+ necessary, and (if using Rela relocs and generating a relocatable
output file) adjusting the reloc addend as necessary.
This function does not have to worry about setting the reloc
@@ -492,7 +493,7 @@ fr30_final_link_relocate (howto, input_bfd, input_section, contents, rel,
The global hash table entry for the global symbols can be found
via elf_sym_hashes (input_bfd).
- When generating relocateable output, this function must handle
+ When generating relocatable output, this function must handle
STB_LOCAL/STT_SECTION symbols specially. The output symbol is
going to be the section symbol corresponding to the output
section, which means that the addend must be adjusted
@@ -515,7 +516,7 @@ fr30_elf_relocate_section (output_bfd, info, input_bfd, input_section,
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
@@ -726,7 +727,7 @@ fr30_elf_check_relocs (abfd, info, sec, relocs)
const Elf_Internal_Rela *rel;
const Elf_Internal_Rela *rel_end;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
diff --git a/bfd/elf32-frv.c b/bfd/elf32-frv.c
index 08dae266d61..19fb324576c 100644
--- a/bfd/elf32-frv.c
+++ b/bfd/elf32-frv.c
@@ -1,5 +1,5 @@
/* FRV-specific support for 32-bit ELF.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -651,7 +651,7 @@ frv_final_link_relocate (howto, input_bfd, input_section, contents, rel,
zero.
This function is responsible for adjusting the section contents as
- necessary, and (if using Rela relocs and generating a relocateable
+ necessary, and (if using Rela relocs and generating a relocatable
output file) adjusting the reloc addend as necessary.
This function does not have to worry about setting the reloc
@@ -665,7 +665,7 @@ frv_final_link_relocate (howto, input_bfd, input_section, contents, rel,
The global hash table entry for the global symbols can be found
via elf_sym_hashes (input_bfd).
- When generating relocateable output, this function must handle
+ When generating relocatable output, this function must handle
STB_LOCAL/STT_SECTION symbols specially. The output symbol is
going to be the section symbol corresponding to the output
section, which means that the addend must be adjusted
@@ -688,7 +688,7 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
@@ -907,7 +907,7 @@ elf32_frv_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
bfd_vma *valp;
{
if (sym->st_shndx == SHN_COMMON
- && !info->relocateable
+ && !info->relocatable
&& (int)sym->st_size <= (int)bfd_get_gp_size (abfd))
{
/* Common symbols less than or equal to -G nn bytes are
@@ -947,7 +947,7 @@ elf32_frv_check_relocs (abfd, info, sec, relocs)
const Elf_Internal_Rela *rel;
const Elf_Internal_Rela *rel_end;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
diff --git a/bfd/elf32-h8300.c b/bfd/elf32-h8300.c
index f272dc8e084..1b623f27f21 100644
--- a/bfd/elf32-h8300.c
+++ b/bfd/elf32-h8300.c
@@ -426,7 +426,7 @@ elf32_h8_relocate_section (output_bfd, info, input_bfd, input_section,
struct elf_link_hash_entry **sym_hashes;
Elf_Internal_Rela *rel, *relend;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
@@ -582,6 +582,9 @@ elf32_h8_mach (flags)
case E_H8_MACH_H8300SX:
return bfd_mach_h8300sx;
+
+ case E_H8_MACH_H8300SXN:
+ return bfd_mach_h8300sxn;
}
}
@@ -622,6 +625,10 @@ elf32_h8_final_write_processing (abfd, linker)
case bfd_mach_h8300sx:
val = E_H8_MACH_H8300SX;
break;
+
+ case bfd_mach_h8300sxn:
+ val = E_H8_MACH_H8300SXN;
+ break;
}
elf_elfheader (abfd)->e_flags &= ~ (EF_H8_MACH);
@@ -699,10 +706,10 @@ elf32_h8_relax_section (abfd, sec, link_info, again)
/* Assume nothing changes. */
*again = FALSE;
- /* We don't have to do anything for a relocateable link, if
+ /* We don't have to do anything for a relocatable link, if
this section does not have relocs, or if this is not a
code section. */
- if (link_info->relocateable
+ if (link_info->relocatable
|| (sec->flags & SEC_RELOC) == 0
|| sec->reloc_count == 0
|| (sec->flags & SEC_CODE) == 0)
@@ -1371,12 +1378,12 @@ elf32_h8_symbol_address_p (abfd, sec, addr)
static bfd_byte *
elf32_h8_get_relocated_section_contents (output_bfd, link_info, link_order,
- data, relocateable, symbols)
+ data, relocatable, symbols)
bfd *output_bfd;
struct bfd_link_info *link_info;
struct bfd_link_order *link_order;
bfd_byte *data;
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
asymbol **symbols;
{
Elf_Internal_Shdr *symtab_hdr;
@@ -1388,11 +1395,11 @@ elf32_h8_get_relocated_section_contents (output_bfd, link_info, link_order,
/* We only need to handle the case of relaxing, or of having a
particular set of section contents, specially. */
- if (relocateable
+ if (relocatable
|| elf_section_data (input_section)->this_hdr.contents == NULL)
return bfd_generic_get_relocated_section_contents (output_bfd, link_info,
link_order, data,
- relocateable,
+ relocatable,
symbols);
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index becfb73c873..ca3e8e12c91 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -1214,7 +1214,7 @@ elf32_hppa_check_relocs (abfd, info, sec, relocs)
asection *sreloc;
asection *stubreloc;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
htab = hppa_link_hash_table (info);
@@ -3593,7 +3593,7 @@ elf32_hppa_relocate_section (output_bfd, info, input_bfd, input_section,
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
@@ -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-i370.c b/bfd/elf32-i370.c
index 8b74baa93c4..2eacb81035a 100644
--- a/bfd/elf32-i370.c
+++ b/bfd/elf32-i370.c
@@ -1,5 +1,5 @@
/* i370-specific support for 32-bit ELF
- Copyright 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002
+ Copyright 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
Hacked by Linas Vepstas for i370 linas@linas.org
@@ -971,7 +971,7 @@ i370_elf_check_relocs (abfd, info, sec, relocs)
bfd_vma *local_got_offsets;
asection *sreloc;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
#ifdef DEBUG
@@ -1200,7 +1200,7 @@ i370_elf_finish_dynamic_sections (output_bfd, info)
This function is responsible for adjust the section contents as
necessary, and (if using Rela relocs and generating a
- relocateable output file) adjusting the reloc addend as
+ relocatable output file) adjusting the reloc addend as
necessary.
This function does not have to worry about setting the reloc
@@ -1214,7 +1214,7 @@ i370_elf_finish_dynamic_sections (output_bfd, info)
The global hash table entry for the global symbols can be found
via elf_sym_hashes (input_bfd).
- When generating relocateable output, this function must handle
+ When generating relocatable output, this function must handle
STB_LOCAL/STT_SECTION symbols specially. The output symbol is
going to be the section symbol corresponding to the output
section, which means that the addend must be adjusted
@@ -1241,7 +1241,7 @@ i370_elf_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_vma *local_got_offsets;
bfd_boolean ret = TRUE;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
#ifdef DEBUG
@@ -1249,7 +1249,7 @@ i370_elf_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_archive_filename (input_bfd),
bfd_section_name(input_bfd, input_section),
(long) input_section->reloc_count,
- (info->relocateable) ? " (relocatable)" : "");
+ (info->relocatable) ? " (relocatable)" : "");
#endif
if (!i370_elf_howto_table[ R_I370_ADDR31 ]) /* Initialize howto table if needed */
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index cfcb7b34c19..3c7bbd991da 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -24,69 +24,8 @@
#include "libbfd.h"
#include "elf-bfd.h"
-static reloc_howto_type *elf_i386_reloc_type_lookup
- PARAMS ((bfd *, bfd_reloc_code_real_type));
-static void elf_i386_info_to_howto_rel
- PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
-static bfd_boolean elf_i386_is_local_label_name
- PARAMS ((bfd *, const char *));
-static bfd_boolean elf_i386_grok_prstatus
- PARAMS ((bfd *abfd, Elf_Internal_Note *note));
-static bfd_boolean elf_i386_grok_psinfo
- PARAMS ((bfd *abfd, Elf_Internal_Note *note));
-static struct bfd_hash_entry *link_hash_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
-static struct bfd_link_hash_table *elf_i386_link_hash_table_create
- PARAMS ((bfd *));
-static bfd_boolean create_got_section
- PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_boolean elf_i386_create_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-static void elf_i386_copy_indirect_symbol
- PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
- struct elf_link_hash_entry *));
-static int elf_i386_tls_transition
- PARAMS ((struct bfd_link_info *, int, int));
-
-static bfd_boolean elf_i386_mkobject
- PARAMS ((bfd *));
-static bfd_boolean elf_i386_object_p
- PARAMS ((bfd *));
-static bfd_boolean elf_i386_check_relocs
- PARAMS ((bfd *, struct bfd_link_info *, asection *,
- const Elf_Internal_Rela *));
-static asection *elf_i386_gc_mark_hook
- PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
- struct elf_link_hash_entry *, Elf_Internal_Sym *));
-static bfd_boolean elf_i386_gc_sweep_hook
- PARAMS ((bfd *, struct bfd_link_info *, asection *,
- const Elf_Internal_Rela *));
-static bfd_boolean elf_i386_adjust_dynamic_symbol
- PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
-static bfd_boolean allocate_dynrelocs
- PARAMS ((struct elf_link_hash_entry *, PTR));
-static bfd_boolean readonly_dynrelocs
- PARAMS ((struct elf_link_hash_entry *, PTR));
-static bfd_boolean elf_i386_fake_sections
- PARAMS ((bfd *, Elf_Internal_Shdr *, asection *));
-static bfd_boolean elf_i386_size_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_vma dtpoff_base
- PARAMS ((struct bfd_link_info *));
-static bfd_vma tpoff
- PARAMS ((struct bfd_link_info *, bfd_vma));
-static bfd_boolean elf_i386_relocate_section
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
- Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
-static bfd_boolean elf_i386_finish_dynamic_symbol
- PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
- Elf_Internal_Sym *));
-static enum elf_reloc_type_class elf_i386_reloc_type_class
- PARAMS ((const Elf_Internal_Rela *));
-static bfd_boolean elf_i386_finish_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-
-#define USE_REL 1 /* 386 uses REL relocations instead of RELA. */
+/* 386 uses REL relocations instead of RELA. */
+#define USE_REL 1
#include "elf/i386.h"
@@ -130,8 +69,8 @@ static reloc_howto_type elf_howto_table[]=
R_386_standard counts the number up to this point, and
R_386_ext_offset is the value to subtract from a reloc type of
R_386_16 thru R_386_PC8 to form an index into this table. */
-#define R_386_standard ((unsigned int) R_386_GOTPC + 1)
-#define R_386_ext_offset ((unsigned int) R_386_TLS_TPOFF - R_386_standard)
+#define R_386_standard (R_386_GOTPC + 1)
+#define R_386_ext_offset (R_386_TLS_TPOFF - R_386_standard)
/* These relocs are a GNU extension. */
HOWTO(R_386_TLS_TPOFF, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
@@ -165,8 +104,8 @@ static reloc_howto_type elf_howto_table[]=
bfd_elf_generic_reloc, "R_386_PC8",
TRUE, 0xff, 0xff, TRUE),
-#define R_386_ext ((unsigned int) R_386_PC8 + 1 - R_386_ext_offset)
-#define R_386_tls_offset ((unsigned int) R_386_TLS_LDO_32 - R_386_ext)
+#define R_386_ext (R_386_PC8 + 1 - R_386_ext_offset)
+#define R_386_tls_offset (R_386_TLS_LDO_32 - R_386_ext)
/* These are common with Solaris TLS implementation. */
HOWTO(R_386_TLS_LDO_32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
bfd_elf_generic_reloc, "R_386_TLS_LDO_32",
@@ -188,8 +127,8 @@ static reloc_howto_type elf_howto_table[]=
TRUE, 0xffffffff, 0xffffffff, FALSE),
/* Another gap. */
-#define R_386_tls ((unsigned int) R_386_TLS_TPOFF32 + 1 - R_386_tls_offset)
-#define R_386_vt_offset ((unsigned int) R_386_GNU_VTINHERIT - R_386_tls)
+#define R_386_tls (R_386_TLS_TPOFF32 + 1 - R_386_tls_offset)
+#define R_386_vt_offset (R_386_GNU_VTINHERIT - R_386_tls)
/* GNU extension to record C++ vtable hierarchy. */
HOWTO (R_386_GNU_VTINHERIT, /* type */
@@ -221,146 +160,144 @@ static reloc_howto_type elf_howto_table[]=
0, /* dst_mask */
FALSE) /* pcrel_offset */
-#define R_386_vt ((unsigned int) R_386_GNU_VTENTRY + 1 - R_386_vt_offset)
+#define R_386_vt (R_386_GNU_VTENTRY + 1 - R_386_vt_offset)
};
#ifdef DEBUG_GEN_RELOC
-#define TRACE(str) fprintf (stderr, "i386 bfd reloc lookup %d (%s)\n", code, str)
+#define TRACE(str) \
+ fprintf (stderr, "i386 bfd reloc lookup %d (%s)\n", code, str)
#else
#define TRACE(str)
#endif
static reloc_howto_type *
-elf_i386_reloc_type_lookup (abfd, code)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_reloc_code_real_type code;
+elf_i386_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_reloc_code_real_type code)
{
switch (code)
{
case BFD_RELOC_NONE:
TRACE ("BFD_RELOC_NONE");
- return &elf_howto_table[(unsigned int) R_386_NONE ];
+ return &elf_howto_table[R_386_NONE];
case BFD_RELOC_32:
TRACE ("BFD_RELOC_32");
- return &elf_howto_table[(unsigned int) R_386_32 ];
+ return &elf_howto_table[R_386_32];
case BFD_RELOC_CTOR:
TRACE ("BFD_RELOC_CTOR");
- return &elf_howto_table[(unsigned int) R_386_32 ];
+ return &elf_howto_table[R_386_32];
case BFD_RELOC_32_PCREL:
TRACE ("BFD_RELOC_PC32");
- return &elf_howto_table[(unsigned int) R_386_PC32 ];
+ return &elf_howto_table[R_386_PC32];
case BFD_RELOC_386_GOT32:
TRACE ("BFD_RELOC_386_GOT32");
- return &elf_howto_table[(unsigned int) R_386_GOT32 ];
+ return &elf_howto_table[R_386_GOT32];
case BFD_RELOC_386_PLT32:
TRACE ("BFD_RELOC_386_PLT32");
- return &elf_howto_table[(unsigned int) R_386_PLT32 ];
+ return &elf_howto_table[R_386_PLT32];
case BFD_RELOC_386_COPY:
TRACE ("BFD_RELOC_386_COPY");
- return &elf_howto_table[(unsigned int) R_386_COPY ];
+ return &elf_howto_table[R_386_COPY];
case BFD_RELOC_386_GLOB_DAT:
TRACE ("BFD_RELOC_386_GLOB_DAT");
- return &elf_howto_table[(unsigned int) R_386_GLOB_DAT ];
+ return &elf_howto_table[R_386_GLOB_DAT];
case BFD_RELOC_386_JUMP_SLOT:
TRACE ("BFD_RELOC_386_JUMP_SLOT");
- return &elf_howto_table[(unsigned int) R_386_JUMP_SLOT ];
+ return &elf_howto_table[R_386_JUMP_SLOT];
case BFD_RELOC_386_RELATIVE:
TRACE ("BFD_RELOC_386_RELATIVE");
- return &elf_howto_table[(unsigned int) R_386_RELATIVE ];
+ return &elf_howto_table[R_386_RELATIVE];
case BFD_RELOC_386_GOTOFF:
TRACE ("BFD_RELOC_386_GOTOFF");
- return &elf_howto_table[(unsigned int) R_386_GOTOFF ];
+ return &elf_howto_table[R_386_GOTOFF];
case BFD_RELOC_386_GOTPC:
TRACE ("BFD_RELOC_386_GOTPC");
- return &elf_howto_table[(unsigned int) R_386_GOTPC ];
+ return &elf_howto_table[R_386_GOTPC];
/* These relocs are a GNU extension. */
case BFD_RELOC_386_TLS_TPOFF:
TRACE ("BFD_RELOC_386_TLS_TPOFF");
- return &elf_howto_table[(unsigned int) R_386_TLS_TPOFF - R_386_ext_offset];
+ return &elf_howto_table[R_386_TLS_TPOFF - R_386_ext_offset];
case BFD_RELOC_386_TLS_IE:
TRACE ("BFD_RELOC_386_TLS_IE");
- return &elf_howto_table[(unsigned int) R_386_TLS_IE - R_386_ext_offset];
+ return &elf_howto_table[R_386_TLS_IE - R_386_ext_offset];
case BFD_RELOC_386_TLS_GOTIE:
TRACE ("BFD_RELOC_386_TLS_GOTIE");
- return &elf_howto_table[(unsigned int) R_386_TLS_GOTIE - R_386_ext_offset];
+ return &elf_howto_table[R_386_TLS_GOTIE - R_386_ext_offset];
case BFD_RELOC_386_TLS_LE:
TRACE ("BFD_RELOC_386_TLS_LE");
- return &elf_howto_table[(unsigned int) R_386_TLS_LE - R_386_ext_offset];
+ return &elf_howto_table[R_386_TLS_LE - R_386_ext_offset];
case BFD_RELOC_386_TLS_GD:
TRACE ("BFD_RELOC_386_TLS_GD");
- return &elf_howto_table[(unsigned int) R_386_TLS_GD - R_386_ext_offset];
+ return &elf_howto_table[R_386_TLS_GD - R_386_ext_offset];
case BFD_RELOC_386_TLS_LDM:
TRACE ("BFD_RELOC_386_TLS_LDM");
- return &elf_howto_table[(unsigned int) R_386_TLS_LDM - R_386_ext_offset];
+ return &elf_howto_table[R_386_TLS_LDM - R_386_ext_offset];
case BFD_RELOC_16:
TRACE ("BFD_RELOC_16");
- return &elf_howto_table[(unsigned int) R_386_16 - R_386_ext_offset];
+ return &elf_howto_table[R_386_16 - R_386_ext_offset];
case BFD_RELOC_16_PCREL:
TRACE ("BFD_RELOC_16_PCREL");
- return &elf_howto_table[(unsigned int) R_386_PC16 - R_386_ext_offset];
+ return &elf_howto_table[R_386_PC16 - R_386_ext_offset];
case BFD_RELOC_8:
TRACE ("BFD_RELOC_8");
- return &elf_howto_table[(unsigned int) R_386_8 - R_386_ext_offset];
+ return &elf_howto_table[R_386_8 - R_386_ext_offset];
case BFD_RELOC_8_PCREL:
TRACE ("BFD_RELOC_8_PCREL");
- return &elf_howto_table[(unsigned int) R_386_PC8 - R_386_ext_offset];
+ return &elf_howto_table[R_386_PC8 - R_386_ext_offset];
/* Common with Sun TLS implementation. */
case BFD_RELOC_386_TLS_LDO_32:
TRACE ("BFD_RELOC_386_TLS_LDO_32");
- return &elf_howto_table[(unsigned int) R_386_TLS_LDO_32 - R_386_tls_offset];
+ return &elf_howto_table[R_386_TLS_LDO_32 - R_386_tls_offset];
case BFD_RELOC_386_TLS_IE_32:
TRACE ("BFD_RELOC_386_TLS_IE_32");
- return &elf_howto_table[(unsigned int) R_386_TLS_IE_32 - R_386_tls_offset];
+ return &elf_howto_table[R_386_TLS_IE_32 - R_386_tls_offset];
case BFD_RELOC_386_TLS_LE_32:
TRACE ("BFD_RELOC_386_TLS_LE_32");
- return &elf_howto_table[(unsigned int) R_386_TLS_LE_32 - R_386_tls_offset];
+ return &elf_howto_table[R_386_TLS_LE_32 - R_386_tls_offset];
case BFD_RELOC_386_TLS_DTPMOD32:
TRACE ("BFD_RELOC_386_TLS_DTPMOD32");
- return &elf_howto_table[(unsigned int) R_386_TLS_DTPMOD32 - R_386_tls_offset];
+ return &elf_howto_table[R_386_TLS_DTPMOD32 - R_386_tls_offset];
case BFD_RELOC_386_TLS_DTPOFF32:
TRACE ("BFD_RELOC_386_TLS_DTPOFF32");
- return &elf_howto_table[(unsigned int) R_386_TLS_DTPOFF32 - R_386_tls_offset];
+ return &elf_howto_table[R_386_TLS_DTPOFF32 - R_386_tls_offset];
case BFD_RELOC_386_TLS_TPOFF32:
TRACE ("BFD_RELOC_386_TLS_TPOFF32");
- return &elf_howto_table[(unsigned int) R_386_TLS_TPOFF32 - R_386_tls_offset];
+ return &elf_howto_table[R_386_TLS_TPOFF32 - R_386_tls_offset];
case BFD_RELOC_VTABLE_INHERIT:
TRACE ("BFD_RELOC_VTABLE_INHERIT");
- return &elf_howto_table[(unsigned int) R_386_GNU_VTINHERIT
- - R_386_vt_offset];
+ return &elf_howto_table[R_386_GNU_VTINHERIT - R_386_vt_offset];
case BFD_RELOC_VTABLE_ENTRY:
TRACE ("BFD_RELOC_VTABLE_ENTRY");
- return &elf_howto_table[(unsigned int) R_386_GNU_VTENTRY
- - R_386_vt_offset];
+ return &elf_howto_table[R_386_GNU_VTENTRY - R_386_vt_offset];
default:
break;
@@ -371,10 +308,9 @@ elf_i386_reloc_type_lookup (abfd, code)
}
static void
-elf_i386_info_to_howto_rel (abfd, cache_ptr, dst)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *cache_ptr;
- Elf_Internal_Rela *dst;
+elf_i386_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *cache_ptr,
+ Elf_Internal_Rela *dst)
{
unsigned int r_type = ELF32_R_TYPE (dst->r_info);
unsigned int indx;
@@ -389,7 +325,7 @@ elf_i386_info_to_howto_rel (abfd, cache_ptr, dst)
{
(*_bfd_error_handler) (_("%s: invalid relocation type %d"),
bfd_archive_filename (abfd), (int) r_type);
- indx = (unsigned int) R_386_NONE;
+ indx = R_386_NONE;
}
cache_ptr->howto = &elf_howto_table[indx];
}
@@ -401,9 +337,7 @@ elf_i386_info_to_howto_rel (abfd, cache_ptr, dst)
_bfd_elf_is_local_label_name. */
static bfd_boolean
-elf_i386_is_local_label_name (abfd, name)
- bfd *abfd;
- const char *name;
+elf_i386_is_local_label_name (bfd *abfd, const char *name)
{
if (name[0] == '.' && name[1] == 'X')
return TRUE;
@@ -413,9 +347,7 @@ elf_i386_is_local_label_name (abfd, name)
/* Support for core dump NOTE sections. */
static bfd_boolean
-elf_i386_grok_prstatus (abfd, note)
- bfd *abfd;
- Elf_Internal_Note *note;
+elf_i386_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
{
int offset;
size_t raw_size;
@@ -445,9 +377,7 @@ elf_i386_grok_prstatus (abfd, note)
}
static bfd_boolean
-elf_i386_grok_psinfo (abfd, note)
- bfd *abfd;
- Elf_Internal_Note *note;
+elf_i386_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
{
switch (note->descsz)
{
@@ -456,9 +386,9 @@ elf_i386_grok_psinfo (abfd, note)
case 124: /* Linux/i386 elf_prpsinfo */
elf_tdata (abfd)->core_program
- = _bfd_elfcore_strndup (abfd, note->descdata + 28, 16);
+ = _bfd_elfcore_strndup (abfd, note->descdata + 28, 16);
elf_tdata (abfd)->core_command
- = _bfd_elfcore_strndup (abfd, note->descdata + 44, 80);
+ = _bfd_elfcore_strndup (abfd, note->descdata + 44, 80);
}
/* Note that for some reason, a spurious space is tacked
@@ -607,8 +537,7 @@ struct elf_i386_obj_tdata
(elf_i386_tdata (abfd)->local_got_tls_type)
static bfd_boolean
-elf_i386_mkobject (abfd)
- bfd *abfd;
+elf_i386_mkobject (bfd *abfd)
{
bfd_size_type amt = sizeof (struct elf_i386_obj_tdata);
abfd->tdata.any = bfd_zalloc (abfd, amt);
@@ -618,8 +547,7 @@ elf_i386_mkobject (abfd)
}
static bfd_boolean
-elf_i386_object_p (abfd)
- bfd *abfd;
+elf_i386_object_p (bfd *abfd)
{
/* Allocate our special target data. */
struct elf_i386_obj_tdata *new_tdata;
@@ -664,10 +592,9 @@ struct elf_i386_link_hash_table
/* Create an entry in an i386 ELF linker hash table. */
static struct bfd_hash_entry *
-link_hash_newfunc (entry, table, string)
- struct bfd_hash_entry *entry;
- struct bfd_hash_table *table;
- const char *string;
+link_hash_newfunc (struct bfd_hash_entry *entry,
+ struct bfd_hash_table *table,
+ const char *string)
{
/* Allocate the structure if it has not already been allocated by a
subclass. */
@@ -696,13 +623,12 @@ link_hash_newfunc (entry, table, string)
/* Create an i386 ELF linker hash table. */
static struct bfd_link_hash_table *
-elf_i386_link_hash_table_create (abfd)
- bfd *abfd;
+elf_i386_link_hash_table_create (bfd *abfd)
{
struct elf_i386_link_hash_table *ret;
bfd_size_type amt = sizeof (struct elf_i386_link_hash_table);
- ret = (struct elf_i386_link_hash_table *) bfd_malloc (amt);
+ ret = bfd_malloc (amt);
if (ret == NULL)
return NULL;
@@ -729,9 +655,7 @@ elf_i386_link_hash_table_create (abfd)
shortcuts to them in our hash table. */
static bfd_boolean
-create_got_section (dynobj, info)
- bfd *dynobj;
- struct bfd_link_info *info;
+create_got_section (bfd *dynobj, struct bfd_link_info *info)
{
struct elf_i386_link_hash_table *htab;
@@ -760,9 +684,7 @@ create_got_section (dynobj, info)
hash table. */
static bfd_boolean
-elf_i386_create_dynamic_sections (dynobj, info)
- bfd *dynobj;
- struct bfd_link_info *info;
+elf_i386_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info)
{
struct elf_i386_link_hash_table *htab;
@@ -789,9 +711,9 @@ elf_i386_create_dynamic_sections (dynobj, info)
/* Copy the extra info we tack onto an elf_link_hash_entry. */
static void
-elf_i386_copy_indirect_symbol (bed, dir, ind)
- struct elf_backend_data *bed;
- struct elf_link_hash_entry *dir, *ind;
+elf_i386_copy_indirect_symbol (struct elf_backend_data *bed,
+ struct elf_link_hash_entry *dir,
+ struct elf_link_hash_entry *ind)
{
struct elf_i386_link_hash_entry *edir, *eind;
@@ -854,10 +776,7 @@ elf_i386_copy_indirect_symbol (bed, dir, ind)
}
static int
-elf_i386_tls_transition (info, r_type, is_local)
- struct bfd_link_info *info;
- int r_type;
- int is_local;
+elf_i386_tls_transition (struct bfd_link_info *info, int r_type, int is_local)
{
if (info->shared)
return r_type;
@@ -886,11 +805,10 @@ elf_i386_tls_transition (info, r_type, is_local)
table, and dynamic reloc sections. */
static bfd_boolean
-elf_i386_check_relocs (abfd, info, sec, relocs)
- bfd *abfd;
- struct bfd_link_info *info;
- asection *sec;
- const Elf_Internal_Rela *relocs;
+elf_i386_check_relocs (bfd *abfd,
+ struct bfd_link_info *info,
+ asection *sec,
+ const Elf_Internal_Rela *relocs)
{
struct elf_i386_link_hash_table *htab;
Elf_Internal_Shdr *symtab_hdr;
@@ -899,7 +817,7 @@ elf_i386_check_relocs (abfd, info, sec, relocs)
const Elf_Internal_Rela *rel_end;
asection *sreloc;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
htab = elf_i386_hash_table (info);
@@ -1004,8 +922,7 @@ elf_i386_check_relocs (abfd, info, sec, relocs)
size = symtab_hdr->sh_info;
size *= (sizeof (bfd_signed_vma) + sizeof(char));
- local_got_refcounts = ((bfd_signed_vma *)
- bfd_zalloc (abfd, size));
+ local_got_refcounts = bfd_zalloc (abfd, size);
if (local_got_refcounts == NULL)
return FALSE;
elf_local_got_refcounts (abfd) = local_got_refcounts;
@@ -1029,7 +946,8 @@ elf_i386_check_relocs (abfd, info, sec, relocs)
else
{
(*_bfd_error_handler)
- (_("%s: `%s' accessed both as normal and thread local symbol"),
+ (_("%s: `%s' accessed both as normal and "
+ "thread local symbol"),
bfd_archive_filename (abfd),
h ? h->root.root.string : "<local>");
return FALSE;
@@ -1195,8 +1113,7 @@ elf_i386_check_relocs (abfd, info, sec, relocs)
if (p == NULL || p->sec != sec)
{
bfd_size_type amt = sizeof *p;
- p = ((struct elf_i386_dyn_relocs *)
- bfd_alloc (htab->elf.dynobj, amt));
+ p = bfd_alloc (htab->elf.dynobj, amt);
if (p == NULL)
return FALSE;
p->next = *head;
@@ -1238,12 +1155,11 @@ elf_i386_check_relocs (abfd, info, sec, relocs)
relocation. */
static asection *
-elf_i386_gc_mark_hook (sec, info, rel, h, sym)
- asection *sec;
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
- Elf_Internal_Rela *rel;
- struct elf_link_hash_entry *h;
- Elf_Internal_Sym *sym;
+elf_i386_gc_mark_hook (asection *sec,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ Elf_Internal_Rela *rel,
+ struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym)
{
if (h != NULL)
{
@@ -1277,11 +1193,10 @@ elf_i386_gc_mark_hook (sec, info, rel, h, sym)
/* Update the got entry reference counts for the section being removed. */
static bfd_boolean
-elf_i386_gc_sweep_hook (abfd, info, sec, relocs)
- bfd *abfd;
- struct bfd_link_info *info;
- asection *sec;
- const Elf_Internal_Rela *relocs;
+elf_i386_gc_sweep_hook (bfd *abfd,
+ struct bfd_link_info *info,
+ asection *sec,
+ const Elf_Internal_Rela *relocs)
{
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
@@ -1375,9 +1290,8 @@ elf_i386_gc_sweep_hook (abfd, info, sec, relocs)
understand. */
static bfd_boolean
-elf_i386_adjust_dynamic_symbol (info, h)
- struct bfd_link_info *info;
- struct elf_link_hash_entry *h;
+elf_i386_adjust_dynamic_symbol (struct bfd_link_info *info,
+ struct elf_link_hash_entry *h)
{
struct elf_i386_link_hash_table *htab;
asection *s;
@@ -1534,9 +1448,7 @@ elf_i386_adjust_dynamic_symbol (info, h)
dynamic relocs. */
static bfd_boolean
-allocate_dynrelocs (h, inf)
- struct elf_link_hash_entry *h;
- PTR inf;
+allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
{
struct bfd_link_info *info;
struct elf_i386_link_hash_table *htab;
@@ -1748,9 +1660,7 @@ allocate_dynrelocs (h, inf)
/* Find any dynamic relocs that apply to read-only sections. */
static bfd_boolean
-readonly_dynrelocs (h, inf)
- struct elf_link_hash_entry *h;
- PTR inf;
+readonly_dynrelocs (struct elf_link_hash_entry *h, void *inf)
{
struct elf_i386_link_hash_entry *eh;
struct elf_i386_dyn_relocs *p;
@@ -1779,9 +1689,8 @@ readonly_dynrelocs (h, inf)
/* Set the sizes of the dynamic sections. */
static bfd_boolean
-elf_i386_size_dynamic_sections (output_bfd, info)
- bfd *output_bfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info;
+elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info)
{
struct elf_i386_link_hash_table *htab;
bfd *dynobj;
@@ -1797,7 +1706,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)
@@ -1948,7 +1857,7 @@ elf_i386_size_dynamic_sections (output_bfd, info)
section's contents are written out. This should not happen,
but this way if it does, we get a R_386_NONE reloc instead
of garbage. */
- s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
+ s->contents = bfd_zalloc (dynobj, s->_raw_size);
if (s->contents == NULL)
return FALSE;
}
@@ -1961,9 +1870,9 @@ elf_i386_size_dynamic_sections (output_bfd, info)
the .dynamic section. The DT_DEBUG entry is filled in by the
dynamic linker and used by the debugger. */
#define add_dynamic_entry(TAG, VAL) \
- bfd_elf32_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
+ bfd_elf32_add_dynamic_entry (info, (TAG), (VAL))
- if (! info->shared)
+ if (info->executable)
{
if (!add_dynamic_entry (DT_DEBUG, 0))
return FALSE;
@@ -2007,10 +1916,9 @@ elf_i386_size_dynamic_sections (output_bfd, info)
section name, which is a hack, but ought to work. */
static bfd_boolean
-elf_i386_fake_sections (abfd, hdr, sec)
- bfd *abfd ATTRIBUTE_UNUSED;
- Elf_Internal_Shdr *hdr;
- asection *sec;
+elf_i386_fake_sections (bfd *abfd ATTRIBUTE_UNUSED,
+ Elf_Internal_Shdr *hdr,
+ asection *sec)
{
register const char *name;
@@ -2043,8 +1951,7 @@ elf_i386_fake_sections (abfd, hdr, sec)
This is PT_TLS segment p_vaddr. */
static bfd_vma
-dtpoff_base (info)
- struct bfd_link_info *info;
+dtpoff_base (struct bfd_link_info *info)
{
/* If tls_segment is NULL, we should have signalled an error already. */
if (elf_hash_table (info)->tls_segment == NULL)
@@ -2056,9 +1963,7 @@ dtpoff_base (info)
if STT_TLS virtual address is ADDRESS. */
static bfd_vma
-tpoff (info, address)
- struct bfd_link_info *info;
- bfd_vma address;
+tpoff (struct bfd_link_info *info, bfd_vma address)
{
struct elf_link_tls_segment *tls_segment
= elf_hash_table (info)->tls_segment;
@@ -2073,16 +1978,14 @@ tpoff (info, address)
/* Relocate an i386 ELF section. */
static bfd_boolean
-elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
- contents, relocs, local_syms, local_sections)
- bfd *output_bfd;
- struct bfd_link_info *info;
- bfd *input_bfd;
- asection *input_section;
- bfd_byte *contents;
- Elf_Internal_Rela *relocs;
- Elf_Internal_Sym *local_syms;
- asection **local_sections;
+elf_i386_relocate_section (bfd *output_bfd,
+ struct bfd_link_info *info,
+ bfd *input_bfd,
+ asection *input_section,
+ bfd_byte *contents,
+ Elf_Internal_Rela *relocs,
+ Elf_Internal_Sym *local_syms,
+ asection **local_sections)
{
struct elf_i386_link_hash_table *htab;
Elf_Internal_Shdr *symtab_hdr;
@@ -2114,11 +2017,11 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
int tls_type;
r_type = ELF32_R_TYPE (rel->r_info);
- if (r_type == (int) R_386_GNU_VTINHERIT
- || r_type == (int) R_386_GNU_VTENTRY)
+ if (r_type == R_386_GNU_VTINHERIT
+ || r_type == R_386_GNU_VTENTRY)
continue;
- if ((indx = (unsigned) r_type) >= R_386_standard
+ if ((indx = r_type) >= R_386_standard
&& ((indx = r_type - R_386_ext_offset) - R_386_standard
>= R_386_ext - R_386_standard)
&& ((indx = r_type - R_386_tls_offset) - R_386_ext
@@ -2131,7 +2034,7 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
r_symndx = ELF32_R_SYM (rel->r_info);
- if (info->relocateable)
+ if (info->relocatable)
{
bfd_vma val;
bfd_byte *where;
@@ -2633,12 +2536,14 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
if (val == 0xa1)
{
/* movl foo, %eax. */
- bfd_put_8 (output_bfd, 0xb8, contents + rel->r_offset - 1);
+ bfd_put_8 (output_bfd, 0xb8,
+ contents + rel->r_offset - 1);
}
else
{
BFD_ASSERT (rel->r_offset >= 2);
- type = bfd_get_8 (input_bfd, contents + rel->r_offset - 2);
+ type = bfd_get_8 (input_bfd,
+ contents + rel->r_offset - 2);
switch (type)
{
case 0x8b:
@@ -3010,7 +2915,7 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
r = _bfd_final_link_relocate (howto, input_bfd, input_section,
contents, rel->r_offset,
- relocation, (bfd_vma) 0);
+ relocation, 0);
if (r != bfd_reloc_ok)
{
@@ -3032,7 +2937,7 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
if (r == bfd_reloc_overflow)
{
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0,
+ (info, name, howto->name, 0,
input_bfd, input_section, rel->r_offset)))
return FALSE;
}
@@ -3055,11 +2960,10 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
dynamic sections here. */
static bfd_boolean
-elf_i386_finish_dynamic_symbol (output_bfd, info, h, sym)
- bfd *output_bfd;
- struct bfd_link_info *info;
- struct elf_link_hash_entry *h;
- Elf_Internal_Sym *sym;
+elf_i386_finish_dynamic_symbol (bfd *output_bfd,
+ struct bfd_link_info *info,
+ struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym)
{
struct elf_i386_link_hash_table *htab;
@@ -3218,10 +3122,9 @@ elf_i386_finish_dynamic_symbol (output_bfd, info, h, sym)
dynamic linker, before writing them out. */
static enum elf_reloc_type_class
-elf_i386_reloc_type_class (rela)
- const Elf_Internal_Rela *rela;
+elf_i386_reloc_type_class (const Elf_Internal_Rela *rela)
{
- switch ((int) ELF32_R_TYPE (rela->r_info))
+ switch (ELF32_R_TYPE (rela->r_info))
{
case R_386_RELATIVE:
return reloc_class_relative;
@@ -3237,9 +3140,8 @@ elf_i386_reloc_type_class (rela)
/* Finish up the dynamic sections. */
static bfd_boolean
-elf_i386_finish_dynamic_sections (output_bfd, info)
- bfd *output_bfd;
- struct bfd_link_info *info;
+elf_i386_finish_dynamic_sections (bfd *output_bfd,
+ struct bfd_link_info *info)
{
struct elf_i386_link_hash_table *htab;
bfd *dynobj;
@@ -3348,11 +3250,11 @@ elf_i386_finish_dynamic_sections (output_bfd, info)
if (htab->sgotplt->_raw_size > 0)
{
bfd_put_32 (output_bfd,
- (sdyn == NULL ? (bfd_vma) 0
+ (sdyn == NULL ? 0
: sdyn->output_section->vma + sdyn->output_offset),
htab->sgotplt->contents);
- bfd_put_32 (output_bfd, (bfd_vma) 0, htab->sgotplt->contents + 4);
- bfd_put_32 (output_bfd, (bfd_vma) 0, htab->sgotplt->contents + 8);
+ bfd_put_32 (output_bfd, 0, htab->sgotplt->contents + 4);
+ bfd_put_32 (output_bfd, 0, htab->sgotplt->contents + 8);
}
elf_section_data (htab->sgotplt->output_section)->this_hdr.sh_entsize = 4;
@@ -3413,13 +3315,9 @@ elf_i386_finish_dynamic_sections (output_bfd, info)
"FreeBSD" label in the ELF header. So we put this label on all
executables and (for simplicity) also all other object files. */
-static void elf_i386_post_process_headers
- PARAMS ((bfd *, struct bfd_link_info *));
-
static void
-elf_i386_post_process_headers (abfd, link_info)
- bfd *abfd;
- struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
+elf_i386_post_process_headers (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
Elf_Internal_Ehdr *i_ehdrp;
diff --git a/bfd/elf32-i860.c b/bfd/elf32-i860.c
index 74112f1389f..cec42be7e3a 100644
--- a/bfd/elf32-i860.c
+++ b/bfd/elf32-i860.c
@@ -1,5 +1,5 @@
/* Intel i860 specific support for 32-bit ELF.
- Copyright 1993, 1995, 1999, 2000, 2001, 2002
+ Copyright 1993, 1995, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Full i860 support contributed by Jason Eckhardt <jle@cygnus.com>.
@@ -840,7 +840,7 @@ i860_final_link_relocate (howto, input_bfd, input_section, contents, rel, reloca
zero.
This function is responsible for adjusting the section contents as
- necessary, and (if using Rela relocs and generating a relocateable
+ necessary, and (if using Rela relocs and generating a relocatable
output file) adjusting the reloc addend as necessary.
This function does not have to worry about setting the reloc
@@ -854,7 +854,7 @@ i860_final_link_relocate (howto, input_bfd, input_section, contents, rel, reloca
The global hash table entry for the global symbols can be found
via elf_sym_hashes (input_bfd).
- When generating relocateable output, this function must handle
+ When generating relocatable output, this function must handle
STB_LOCAL/STT_SECTION symbols specially. The output symbol is
going to be the section symbol corresponding to the output
section, which means that the addend must be adjusted
@@ -876,7 +876,7 @@ elf32_i860_relocate_section (output_bfd, info, input_bfd, input_section,
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
diff --git a/bfd/elf32-i960.c b/bfd/elf32-i960.c
index 4a1e931f293..6218e1a50da 100644
--- a/bfd/elf32-i960.c
+++ b/bfd/elf32-i960.c
@@ -1,5 +1,5 @@
/* Intel 860 specific support for 32-bit ELF
- Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -96,7 +96,7 @@ elf32_i960_info_to_howto_rel (abfd, cache_ptr, dst)
cache_ptr->howto = &elf_howto_table[(int) type];
}
-/* ELF relocs are against symbols. If we are producing relocateable
+/* ELF relocs are against symbols. If we are producing relocatable
output, and the reloc is against an external symbol, and nothing
has given us any additional addend, the resulting reloc will also
be against the same symbol. In such a case, we don't want to
@@ -104,7 +104,7 @@ elf32_i960_info_to_howto_rel (abfd, cache_ptr, dst)
all be done at final link time. Rather than put special case code
into bfd_perform_relocation, all the reloc types use this howto
function. It just short circuits the reloc if producing
- relocateable output against an external symbol. */
+ relocatable output against an external symbol. */
bfd_reloc_status_type
elf32_i960_relocate (abfd,
diff --git a/bfd/elf32-ip2k.c b/bfd/elf32-ip2k.c
index e10e9410ac6..4cb28bb31b8 100644
--- a/bfd/elf32-ip2k.c
+++ b/bfd/elf32-ip2k.c
@@ -834,7 +834,7 @@ ip2k_elf_relax_section (abfd, sec, link_info, again)
/* We don't have to do anything for a relocatable link,
if this section does not have relocs, or if this is
not a code section. */
- if (link_info->relocateable
+ if (link_info->relocatable
|| (sec->flags & SEC_RELOC) == 0
|| sec->reloc_count == 0
|| (sec->flags & SEC_CODE) == 0)
@@ -1456,7 +1456,7 @@ ip2k_final_link_relocate (howto, input_bfd, input_section, contents, rel,
zero.
This function is responsible for adjusting the section contents as
- necessary, and (if using Rela relocs and generating a relocateable
+ necessary, and (if using Rela relocs and generating a relocatable
output file) adjusting the reloc addend as necessary.
This function does not have to worry about setting the reloc
@@ -1470,7 +1470,7 @@ ip2k_final_link_relocate (howto, input_bfd, input_section, contents, rel,
The global hash table entry for the global symbols can be found
via elf_sym_hashes (input_bfd).
- When generating relocateable output, this function must handle
+ When generating relocatable output, this function must handle
STB_LOCAL/STT_SECTION symbols specially. The output symbol is
going to be the section symbol corresponding to the output
section, which means that the addend must be adjusted
@@ -1493,7 +1493,7 @@ ip2k_elf_relocate_section (output_bfd, info, input_bfd, input_section,
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
diff --git a/bfd/elf32-iq2000.c b/bfd/elf32-iq2000.c
index ebdd30300ff..e2a3b17aee5 100644
--- a/bfd/elf32-iq2000.c
+++ b/bfd/elf32-iq2000.c
@@ -458,7 +458,7 @@ iq2000_elf_check_relocs (abfd, info, sec, relocs)
const Elf_Internal_Rela *rel_end;
bfd_boolean changed = FALSE;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -531,7 +531,7 @@ iq2000_elf_check_relocs (abfd, info, sec, relocs)
zero.
This function is responsible for adjusting the section contents as
- necessary, and (if using Rela relocs and generating a relocateable
+ necessary, and (if using Rela relocs and generating a relocatable
output file) adjusting the reloc addend as necessary.
This function does not have to worry about setting the reloc
@@ -545,7 +545,7 @@ iq2000_elf_check_relocs (abfd, info, sec, relocs)
The global hash table entry for the global symbols can be found
via elf_sym_hashes (input_bfd).
- When generating relocateable output, this function must handle
+ When generating relocatable output, this function must handle
STB_LOCAL/STT_SECTION symbols specially. The output symbol is
going to be the section symbol corresponding to the output
section, which means that the addend must be adjusted
diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c
index 3116ace867a..34773ce1a64 100644
--- a/bfd/elf32-m32r.c
+++ b/bfd/elf32-m32r.c
@@ -840,7 +840,7 @@ m32r_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
asection **secp;
bfd_vma *valp;
{
- if (! info->relocateable
+ if (! info->relocatable
&& (*namep)[0] == '_' && (*namep)[1] == 'S'
&& strcmp (*namep, "_SDA_BASE_") == 0
&& info->hash->creator->flavour == bfd_target_elf_flavour)
@@ -903,7 +903,7 @@ m32r_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
symbol value correctly. We look up the symbol _SDA_BASE_ in the output
BFD. If we can't find it, we're stuck. We cache it in the ELF
target data. We don't need to adjust the symbol value for an
- external symbol if we are producing relocateable output. */
+ external symbol if we are producing relocatable output. */
static bfd_reloc_status_type
m32r_elf_final_sda_base (output_bfd, info, error_message, psb)
@@ -948,7 +948,7 @@ m32r_elf_final_sda_base (output_bfd, info, error_message, psb)
This function is responsible for adjust the section contents as
necessary, and (if using Rela relocs and generating a
- relocateable output file) adjusting the reloc addend as
+ relocatable output file) adjusting the reloc addend as
necessary.
This function does not have to worry about setting the reloc
@@ -962,7 +962,7 @@ m32r_elf_final_sda_base (output_bfd, info, error_message, psb)
The global hash table entry for the global symbols can be found
via elf_sym_hashes (input_bfd).
- When generating relocateable output, this function must handle
+ When generating relocatable output, this function must handle
STB_LOCAL/STT_SECTION symbols specially. The output symbol is
going to be the section symbol corresponding to the output
section, which means that the addend must be adjusted
@@ -987,7 +987,7 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_boolean ret = TRUE;
#if !USE_REL
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
#endif
@@ -1031,9 +1031,9 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section,
r_symndx = ELF32_R_SYM (rel->r_info);
#if USE_REL
- if (info->relocateable)
+ if (info->relocatable)
{
- /* This is a relocateable link. We don't have to change
+ /* This is a relocatable link. We don't have to change
anything, unless the reloc is against a section symbol,
in which case we have to adjust according to where the
section symbol winds up in the output section. */
@@ -1350,10 +1350,10 @@ m32r_elf_relax_section (abfd, sec, link_info, again)
/* Assume nothing changes. */
*again = FALSE;
- /* We don't have to do anything for a relocateable link, if
+ /* We don't have to do anything for a relocatable link, if
this section does not have relocs, or if this is not a
code section. */
- if (link_info->relocateable
+ if (link_info->relocatable
|| (sec->flags & SEC_RELOC) == 0
|| sec->reloc_count == 0
|| (sec->flags & SEC_CODE) == 0
@@ -1744,12 +1744,12 @@ m32r_elf_relax_delete_bytes (abfd, sec, addr, count)
static bfd_byte *
m32r_elf_get_relocated_section_contents (output_bfd, link_info, link_order,
- data, relocateable, symbols)
+ data, relocatable, symbols)
bfd *output_bfd;
struct bfd_link_info *link_info;
struct bfd_link_order *link_order;
bfd_byte *data;
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
asymbol **symbols;
{
Elf_Internal_Shdr *symtab_hdr;
@@ -1762,11 +1762,11 @@ m32r_elf_get_relocated_section_contents (output_bfd, link_info, link_order,
/* We only need to handle the case of relaxing, or of having a
particular set of section contents, specially. */
- if (relocateable
+ if (relocatable
|| elf_section_data (input_section)->this_hdr.contents == NULL)
return bfd_generic_get_relocated_section_contents (output_bfd, link_info,
link_order, data,
- relocateable,
+ relocatable,
symbols);
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
@@ -2050,7 +2050,7 @@ m32r_elf_check_relocs (abfd, info, sec, relocs)
const Elf_Internal_Rela *rel;
const Elf_Internal_Rela *rel_end;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
diff --git a/bfd/elf32-m68hc11.c b/bfd/elf32-m68hc11.c
index 1b95105299d..03839074549 100644
--- a/bfd/elf32-m68hc11.c
+++ b/bfd/elf32-m68hc11.c
@@ -687,10 +687,10 @@ m68hc11_elf_relax_section (abfd, sec, link_info, again)
/* Assume nothing changes. */
*again = FALSE;
- /* We don't have to do anything for a relocateable link, if
+ /* We don't have to do anything for a relocatable link, if
this section does not have relocs, or if this is not a
code section. */
- if (link_info->relocateable
+ if (link_info->relocatable
|| (sec->flags & SEC_RELOC) == 0
|| sec->reloc_count == 0
|| (sec->flags & SEC_CODE) == 0)
diff --git a/bfd/elf32-m68hc1x.c b/bfd/elf32-m68hc1x.c
index 176a256c744..a3def112f1f 100644
--- a/bfd/elf32-m68hc1x.c
+++ b/bfd/elf32-m68hc1x.c
@@ -956,7 +956,7 @@ elf32_m68hc11_check_relocs (abfd, info, sec, relocs)
const Elf_Internal_Rela * rel;
const Elf_Internal_Rela * rel_end;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
symtab_hdr = & elf_tdata (abfd)->symtab_hdr;
@@ -1152,9 +1152,9 @@ elf32_m68hc11_relocate_section (output_bfd, info, input_bfd, input_section,
|| r_type == R_M68HC11_GNU_VTINHERIT )
continue;
- if (info->relocateable)
+ if (info->relocatable)
{
- /* This is a relocateable link. We don't have to change
+ /* This is a relocatable link. We don't have to change
anything, unless the reloc is against a section symbol,
in which case we have to adjust according to where the
section symbol winds up in the output section. */
diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c
index 1cf23d6abb7..1320429cf1f 100644
--- a/bfd/elf32-m68k.c
+++ b/bfd/elf32-m68k.c
@@ -427,7 +427,7 @@ elf_m68k_check_relocs (abfd, info, sec, relocs)
asection *srelgot;
asection *sreloc;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
dynobj = elf_hash_table (info)->dynobj;
@@ -1358,7 +1358,7 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section,
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
dynobj = elf_hash_table (info)->dynobj;
@@ -2153,7 +2153,7 @@ bfd_m68k_elf32_create_embedded_relocs (abfd, info, datasec, relsec, errmsg)
bfd_byte *p;
bfd_size_type amt;
- BFD_ASSERT (! info->relocateable);
+ BFD_ASSERT (! info->relocatable);
*errmsg = NULL;
diff --git a/bfd/elf32-mcore.c b/bfd/elf32-mcore.c
index 927418e03e5..e88f01d64be 100644
--- a/bfd/elf32-mcore.c
+++ b/bfd/elf32-mcore.c
@@ -1,5 +1,5 @@
/* Motorola MCore specific support for 32-bit ELF
- Copyright 1994, 1995, 1999, 2000, 2001, 2002
+ Copyright 1994, 1995, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -367,7 +367,7 @@ mcore_elf_unsupported_reloc (abfd, reloc_entry, symbol, data, input_section,
This function is responsible for adjust the section contents as
necessary, and (if using Rela relocs and generating a
- relocateable output file) adjusting the reloc addend as
+ relocatable output file) adjusting the reloc addend as
necessary.
This function does not have to worry about setting the reloc
@@ -381,7 +381,7 @@ mcore_elf_unsupported_reloc (abfd, reloc_entry, symbol, data, input_section,
The global hash table entry for the global symbols can be found
via elf_sym_hashes (input_bfd).
- When generating relocateable output, this function must handle
+ When generating relocatable output, this function must handle
STB_LOCAL/STT_SECTION symbols specially. The output symbol is
going to be the section symbol corresponding to the output
section, which means that the addend must be adjusted
@@ -411,10 +411,10 @@ mcore_elf_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_archive_filename (input_bfd),
bfd_section_name(input_bfd, input_section),
(long) input_section->reloc_count,
- (info->relocateable) ? " (relocatable)" : "");
+ (info->relocatable) ? " (relocatable)" : "");
#endif
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
if (! mcore_elf_howto_table [R_MCORE_PCRELIMM8BY4]) /* Initialize howto table if needed */
@@ -637,7 +637,7 @@ mcore_elf_check_relocs (abfd, info, sec, relocs)
const Elf_Internal_Rela * rel;
const Elf_Internal_Rela * rel_end;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
symtab_hdr = & elf_tdata (abfd)->symtab_hdr;
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index 3b472464b10..e495cc46dd5 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -47,12 +47,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ECOFF_SIGNED_32
#include "ecoffswap.h"
+static bfd_reloc_status_type mips_elf_generic_reloc
+ PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static bfd_reloc_status_type mips_elf_hi16_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static bfd_reloc_status_type mips_elf_lo16_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static bfd_reloc_status_type mips_elf_got16_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static bfd_reloc_status_type gprel32_with_gp
+ PARAMS ((bfd *, asymbol *, arelent *, asection *, bfd_boolean, PTR,
+ bfd_vma));
static bfd_reloc_status_type mips_elf_gprel32_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static bfd_reloc_status_type mips32_64bit_reloc
@@ -116,7 +121,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_NONE", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
@@ -131,7 +136,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_16", /* name */
TRUE, /* partial_inplace */
0x0000ffff, /* src_mask */
@@ -146,7 +151,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_32", /* name */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
@@ -161,7 +166,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_REL32", /* name */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
@@ -179,7 +184,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
/* This needs complex overflow
detection, because the upper four
bits must match the PC + 4. */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_26", /* name */
TRUE, /* partial_inplace */
0x03ffffff, /* src_mask */
@@ -269,7 +274,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_PC16", /* name */
TRUE, /* partial_inplace */
0x0000ffff, /* src_mask */
@@ -284,7 +289,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_CALL16", /* name */
TRUE, /* partial_inplace */
0x0000ffff, /* src_mask */
@@ -320,7 +325,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
6, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_SHIFT5", /* name */
TRUE, /* partial_inplace */
0x000007c0, /* src_mask */
@@ -337,7 +342,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
6, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_SHIFT6", /* name */
TRUE, /* partial_inplace */
0x000007c4, /* src_mask */
@@ -367,7 +372,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_GOT_DISP", /* name */
TRUE, /* partial_inplace */
0x0000ffff, /* src_mask */
@@ -382,7 +387,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_GOT_PAGE", /* name */
TRUE, /* partial_inplace */
0x0000ffff, /* src_mask */
@@ -397,7 +402,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_GOT_OFST", /* name */
TRUE, /* partial_inplace */
0x0000ffff, /* src_mask */
@@ -412,7 +417,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_GOT_HI16", /* name */
TRUE, /* partial_inplace */
0x0000ffff, /* src_mask */
@@ -427,7 +432,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_GOT_LO16", /* name */
TRUE, /* partial_inplace */
0x0000ffff, /* src_mask */
@@ -442,7 +447,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_SUB", /* name */
TRUE, /* partial_inplace */
MINUS_ONE, /* src_mask */
@@ -462,7 +467,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_HIGHER", /* name */
TRUE, /* partial_inplace */
0x0000ffff, /* src_mask */
@@ -477,7 +482,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_HIGHEST", /* name */
TRUE, /* partial_inplace */
0x0000ffff, /* src_mask */
@@ -492,7 +497,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_CALL_HI16", /* name */
TRUE, /* partial_inplace */
0x0000ffff, /* src_mask */
@@ -507,7 +512,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_CALL_LO16", /* name */
TRUE, /* partial_inplace */
0x0000ffff, /* src_mask */
@@ -522,7 +527,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_SCN_DISP", /* name */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
@@ -543,7 +548,7 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_JALR", /* name */
FALSE, /* partial_inplace */
0x00000000, /* src_mask */
@@ -645,7 +650,7 @@ static reloc_howto_type elf_mips_gnu_rel16_s2 =
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_GNU_REL16_S2", /* name */
TRUE, /* partial_inplace */
0xffff, /* src_mask */
@@ -661,7 +666,7 @@ static reloc_howto_type elf_mips_gnu_pcrel64 =
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_PC64", /* name */
TRUE, /* partial_inplace */
MINUS_ONE, /* src_mask */
@@ -677,7 +682,7 @@ static reloc_howto_type elf_mips_gnu_pcrel32 =
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf_generic_reloc, /* special_function */
"R_MIPS_PC32", /* name */
TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
@@ -716,6 +721,33 @@ static reloc_howto_type elf_mips_gnu_vtentry_howto =
0, /* dst_mask */
FALSE); /* pcrel_offset */
+/* We use this instead of bfd_elf_generic_reloc because the latter
+ gets the handling of zero addends wrong. */
+static bfd_reloc_status_type
+mips_elf_generic_reloc (abfd, reloc_entry, symbol, data, input_section,
+ output_bfd, error_message)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ arelent *reloc_entry;
+ asymbol *symbol;
+ PTR data ATTRIBUTE_UNUSED;
+ asection *input_section;
+ bfd *output_bfd;
+ char **error_message ATTRIBUTE_UNUSED;
+{
+ /* If we're relocating, and this is an external symbol, we don't want
+ to change anything. */
+ if (output_bfd != (bfd *) NULL
+ && (symbol->flags & BSF_SECTION_SYM) == 0
+ && (symbol->flags & BSF_LOCAL) != 0)
+ {
+ reloc_entry->address += input_section->output_offset;
+ return bfd_reloc_ok;
+ }
+
+ /* Just go on, nothing to see here. */
+ return bfd_reloc_continue;
+}
+
/* Do a R_MIPS_HI16 relocation. This has to be done in combination
with a R_MIPS_LO16 reloc, because there is a carry from the LO16 to
the HI16. Here we just save the information we need; we do the
@@ -761,7 +793,7 @@ mips_elf_hi16_reloc (abfd, reloc_entry, symbol, data, input_section,
to change anything. */
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
- && reloc_entry->addend == 0)
+ && (symbol->flags & BSF_LOCAL) != 0)
{
reloc_entry->address += input_section->output_offset;
return bfd_reloc_ok;
@@ -771,21 +803,21 @@ mips_elf_hi16_reloc (abfd, reloc_entry, symbol, data, input_section,
if (strcmp (bfd_asymbol_name (symbol), "_gp_disp") == 0)
{
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
bfd_vma gp;
if (ret == bfd_reloc_undefined)
abort ();
if (output_bfd != NULL)
- relocateable = TRUE;
+ relocatable = TRUE;
else
{
- relocateable = FALSE;
+ relocatable = FALSE;
output_bfd = symbol->section->output_section->owner;
}
- ret = mips_elf_final_gp (output_bfd, symbol, relocateable,
+ ret = mips_elf_final_gp (output_bfd, symbol, relocatable,
error_message, &gp);
if (ret != bfd_reloc_ok)
return ret;
@@ -855,41 +887,42 @@ mips_elf_lo16_reloc (abfd, reloc_entry, symbol, data, input_section,
unsigned long vallo;
struct mips_hi16 *next;
- /* Do the HI16 relocation. Note that we actually don't need
- to know anything about the LO16 itself, except where to
- find the low 16 bits of the addend needed by the LO16. */
- insn = bfd_get_32 (abfd, l->addr);
- vallo = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
-
- /* The low order 16 bits are always treated as a signed
- value. */
- vallo = ((vallo & 0xffff) ^ 0x8000) - 0x8000;
- val = ((insn & 0xffff) << 16) + vallo;
- val += l->addend;
-
- /* If PC-relative, we need to subtract out the address of the LO
- half of the HI/LO. (The actual relocation is relative
- to that instruction.) */
- if (reloc_entry->howto->pc_relative)
- val -= reloc_entry->address;
-
- /* At this point, "val" has the value of the combined HI/LO
- pair. If the low order 16 bits (which will be used for
- the LO16 insn) are negative, then we will need an
- adjustment for the high order 16 bits. */
- val += 0x8000;
- val = (val >> 16) & 0xffff;
-
- insn &= ~ (bfd_vma) 0xffff;
- insn |= val;
- bfd_put_32 (abfd, (bfd_vma) insn, l->addr);
-
if (strcmp (bfd_asymbol_name (symbol), "_gp_disp") == 0)
{
gp_disp_relent = *reloc_entry;
reloc_entry = &gp_disp_relent;
reloc_entry->addend = l->addend;
}
+ else
+ {
+ /* Do the HI16 relocation. Note that we actually don't need
+ to know anything about the LO16 itself, except where to
+ find the low 16 bits of the addend needed by the LO16. */
+ insn = bfd_get_32 (abfd, l->addr);
+ vallo = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
+ /* The low order 16 bits are always treated as a signed
+ value. */
+ vallo = ((vallo & 0xffff) ^ 0x8000) - 0x8000;
+ val = ((insn & 0xffff) << 16) + vallo;
+ val += l->addend;
+
+ /* If PC-relative, we need to subtract out the address of the LO
+ half of the HI/LO. (The actual relocation is relative
+ to that instruction.) */
+ if (reloc_entry->howto->pc_relative)
+ val -= reloc_entry->address;
+
+ /* At this point, "val" has the value of the combined HI/LO
+ pair. If the low order 16 bits (which will be used for
+ the LO16 insn) are negative, then we will need an
+ adjustment for the high order 16 bits. */
+ val += 0x8000;
+ val = (val >> 16) & 0xffff;
+
+ insn &= ~ (bfd_vma) 0xffff;
+ insn |= val;
+ bfd_put_32 (abfd, (bfd_vma) insn, l->addr);
+ }
next = l->next;
free (l);
@@ -923,8 +956,8 @@ mips_elf_lo16_reloc (abfd, reloc_entry, symbol, data, input_section,
}
/* Now do the LO16 reloc in the usual way. */
- return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message);
+ return mips_elf_generic_reloc (abfd, reloc_entry, symbol, data,
+ input_section, output_bfd, error_message);
}
/* Do a R_MIPS_GOT16 reloc. This is a reloc against the global offset
@@ -956,20 +989,14 @@ mips_elf_got16_reloc (abfd, reloc_entry, symbol, data, input_section,
to change anything. */
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
- && reloc_entry->addend == 0)
+ && (symbol->flags & BSF_LOCAL) != 0)
{
reloc_entry->address += input_section->output_offset;
return bfd_reloc_ok;
}
- /* If we're relocating, and this is a local symbol, we can handle it
- just like HI16. */
- if (output_bfd != (bfd *) NULL
- && (symbol->flags & BSF_SECTION_SYM) != 0)
- return mips_elf_hi16_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message);
-
- abort ();
+ return mips_elf_hi16_reloc (abfd, reloc_entry, symbol, data,
+ input_section, output_bfd, error_message);
}
/* Set the GP value for OUTPUT_BFD. Returns FALSE if this is a
@@ -1027,18 +1054,18 @@ mips_elf_assign_gp (output_bfd, pgp)
symbol value correctly. We look up the symbol _gp in the output
BFD. If we can't find it, we're stuck. We cache it in the ELF
target data. We don't need to adjust the symbol value for an
- external symbol if we are producing relocateable output. */
+ external symbol if we are producing relocatable output. */
static bfd_reloc_status_type
-mips_elf_final_gp (output_bfd, symbol, relocateable, error_message, pgp)
+mips_elf_final_gp (output_bfd, symbol, relocatable, error_message, pgp)
bfd *output_bfd;
asymbol *symbol;
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
char **error_message;
bfd_vma *pgp;
{
if (bfd_is_und_section (symbol->section)
- && ! relocateable)
+ && ! relocatable)
{
*pgp = 0;
return bfd_reloc_undefined;
@@ -1046,10 +1073,10 @@ mips_elf_final_gp (output_bfd, symbol, relocateable, error_message, pgp)
*pgp = _bfd_get_gp_value (output_bfd);
if (*pgp == 0
- && (! relocateable
+ && (! relocatable
|| (symbol->flags & BSF_SECTION_SYM) != 0))
{
- if (relocateable)
+ if (relocatable)
{
/* Make up a value. */
*pgp = symbol->section->output_section->vma + 0x4000;
@@ -1083,47 +1110,41 @@ _bfd_mips_elf32_gprel16_reloc (abfd, reloc_entry, symbol, data, input_section,
bfd *output_bfd;
char **error_message;
{
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
bfd_reloc_status_type ret;
bfd_vma gp;
- /* If we're relocating, and this is an external symbol with no
- addend, we don't want to change anything. We will only have an
- addend if this is a newly created reloc, not read from an ELF
- file. */
+ /* If we're relocating, and this is an external symbol, we don't want
+ to change anything. */
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
- && reloc_entry->addend == 0)
+ && (symbol->flags & BSF_LOCAL) != 0)
{
reloc_entry->address += input_section->output_offset;
return bfd_reloc_ok;
}
if (output_bfd != (bfd *) NULL)
- relocateable = TRUE;
+ relocatable = TRUE;
else
{
- relocateable = FALSE;
+ relocatable = FALSE;
output_bfd = symbol->section->output_section->owner;
}
- ret = mips_elf_final_gp (output_bfd, symbol, relocateable, error_message,
+ ret = mips_elf_final_gp (output_bfd, symbol, relocatable, error_message,
&gp);
if (ret != bfd_reloc_ok)
return ret;
return _bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry,
- input_section, relocateable,
+ input_section, relocatable,
data, gp);
}
/* Do a R_MIPS_GPREL32 relocation. This is a 32 bit value which must
become the offset from the gp register. */
-static bfd_reloc_status_type gprel32_with_gp
- PARAMS ((bfd *, asymbol *, arelent *, asection *, bfd_boolean, PTR,
- bfd_vma));
-
static bfd_reloc_status_type
mips_elf_gprel32_reloc (abfd, reloc_entry, symbol, data, input_section,
output_bfd, error_message)
@@ -1135,17 +1156,15 @@ mips_elf_gprel32_reloc (abfd, reloc_entry, symbol, data, input_section,
bfd *output_bfd;
char **error_message;
{
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
bfd_reloc_status_type ret;
bfd_vma gp;
- /* If we're relocating, and this is an external symbol with no
- addend, we don't want to change anything. We will only have an
- addend if this is a newly created reloc, not read from an ELF
- file. */
+ /* If we're relocating, and this is an external symbol, we don't want
+ to change anything. */
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
- && reloc_entry->addend == 0)
+ && (symbol->flags & BSF_LOCAL) != 0)
{
*error_message = (char *)
_("32bits gp relative relocation occurs for an external symbol");
@@ -1153,38 +1172,35 @@ mips_elf_gprel32_reloc (abfd, reloc_entry, symbol, data, input_section,
}
if (output_bfd != (bfd *) NULL)
- {
- relocateable = TRUE;
- gp = _bfd_get_gp_value (output_bfd);
- }
+ relocatable = TRUE;
else
{
- relocateable = FALSE;
+ relocatable = FALSE;
output_bfd = symbol->section->output_section->owner;
-
- ret = mips_elf_final_gp (output_bfd, symbol, relocateable,
- error_message, &gp);
- if (ret != bfd_reloc_ok)
- return ret;
}
+ ret = mips_elf_final_gp (output_bfd, symbol, relocatable,
+ error_message, &gp);
+ if (ret != bfd_reloc_ok)
+ return ret;
+
return gprel32_with_gp (abfd, symbol, reloc_entry, input_section,
- relocateable, data, gp);
+ relocatable, data, gp);
}
static bfd_reloc_status_type
-gprel32_with_gp (abfd, symbol, reloc_entry, input_section, relocateable, data,
+gprel32_with_gp (abfd, symbol, reloc_entry, input_section, relocatable, data,
gp)
bfd *abfd;
asymbol *symbol;
arelent *reloc_entry;
asection *input_section;
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
PTR data;
bfd_vma gp;
{
bfd_vma relocation;
- unsigned long val;
+ bfd_vma val;
if (bfd_is_com_section (symbol->section))
relocation = 0;
@@ -1197,21 +1213,25 @@ gprel32_with_gp (abfd, symbol, reloc_entry, input_section, relocateable, data,
if (reloc_entry->address > input_section->_cooked_size)
return bfd_reloc_outofrange;
- val = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
-
/* Set val to the offset into the section or symbol. */
- val += reloc_entry->addend;
+ val = reloc_entry->addend;
+
+ if (reloc_entry->howto->partial_inplace)
+ val += bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
/* Adjust val for the final section location and GP value. If we
- are producing relocateable output, we don't want to do this for
+ are producing relocatable output, we don't want to do this for
an external symbol. */
- if (! relocateable
+ if (! relocatable
|| (symbol->flags & BSF_SECTION_SYM) != 0)
val += relocation - gp;
- bfd_put_32 (abfd, (bfd_vma) val, (bfd_byte *) data + reloc_entry->address);
+ if (reloc_entry->howto->partial_inplace)
+ bfd_put_32 (abfd, val, (bfd_byte *) data + reloc_entry->address);
+ else
+ reloc_entry->addend = val;
- if (relocateable)
+ if (relocatable)
reloc_entry->address += input_section->output_offset;
return bfd_reloc_ok;
@@ -1237,8 +1257,8 @@ mips32_64bit_reloc (abfd, reloc_entry, symbol, data, input_section,
unsigned long val;
bfd_size_type addr;
- r = bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message);
+ r = mips_elf_generic_reloc (abfd, reloc_entry, symbol, data,
+ input_section, output_bfd, error_message);
if (r != bfd_reloc_continue)
return r;
@@ -1312,33 +1332,33 @@ mips16_gprel_reloc (abfd, reloc_entry, symbol, data, input_section,
bfd *output_bfd;
char **error_message;
{
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
bfd_reloc_status_type ret;
bfd_vma gp;
- unsigned short extend, insn;
- unsigned long final;
+ unsigned short extend = 0;
+ unsigned short insn = 0;
+ bfd_signed_vma val;
+ bfd_vma relocation;
- /* If we're relocating, and this is an external symbol with no
- addend, we don't want to change anything. We will only have an
- addend if this is a newly created reloc, not read from an ELF
- file. */
+ /* If we're relocating, and this is an external symbol, we don't want
+ to change anything. */
if (output_bfd != NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
- && reloc_entry->addend == 0)
+ && (symbol->flags & BSF_LOCAL) != 0)
{
reloc_entry->address += input_section->output_offset;
return bfd_reloc_ok;
}
if (output_bfd != NULL)
- relocateable = TRUE;
+ relocatable = TRUE;
else
{
- relocateable = FALSE;
+ relocatable = FALSE;
output_bfd = symbol->section->output_section->owner;
}
- ret = mips_elf_final_gp (output_bfd, symbol, relocateable, error_message,
+ ret = mips_elf_final_gp (output_bfd, symbol, relocatable, error_message,
&gp);
if (ret != bfd_reloc_ok)
return ret;
@@ -1346,33 +1366,55 @@ mips16_gprel_reloc (abfd, reloc_entry, symbol, data, input_section,
if (reloc_entry->address > input_section->_cooked_size)
return bfd_reloc_outofrange;
- /* Pick up the mips16 extend instruction and the real instruction. */
- extend = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address);
- insn = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address + 2);
-
- /* Stuff the current addend back as a 32 bit value, do the usual
- relocation, and then clean up. */
- bfd_put_32 (abfd,
- (bfd_vma) (((extend & 0x1f) << 11)
- | (extend & 0x7e0)
- | (insn & 0x1f)),
- (bfd_byte *) data + reloc_entry->address);
-
- ret = _bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry,
- input_section, relocateable, data, gp);
-
- final = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
- bfd_put_16 (abfd,
- (bfd_vma) ((extend & 0xf800)
- | ((final >> 11) & 0x1f)
- | (final & 0x7e0)),
- (bfd_byte *) data + reloc_entry->address);
- bfd_put_16 (abfd,
- (bfd_vma) ((insn & 0xffe0)
- | (final & 0x1f)),
- (bfd_byte *) data + reloc_entry->address + 2);
+ if (bfd_is_com_section (symbol->section))
+ relocation = 0;
+ else
+ relocation = symbol->value;
- return ret;
+ relocation += symbol->section->output_section->vma;
+ relocation += symbol->section->output_offset;
+
+ /* Set val to the offset into the section or symbol. */
+ val = reloc_entry->addend;
+
+ if (reloc_entry->howto->partial_inplace)
+ {
+ /* Pick up the mips16 extend instruction and the real instruction. */
+ extend = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address);
+ insn = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address + 2);
+ val += ((extend & 0x1f) << 11) | (extend & 0x7e0) | (insn & 0x1f);
+ }
+
+ _bfd_mips_elf_sign_extend(val, 16);
+
+ /* Adjust val for the final section location and GP value. If we
+ are producing relocatable output, we don't want to do this for
+ an external symbol. */
+ if (! relocatable
+ || (symbol->flags & BSF_SECTION_SYM) != 0)
+ val += relocation - gp;
+
+ if (reloc_entry->howto->partial_inplace)
+ {
+ bfd_put_16 (abfd,
+ (bfd_vma) ((extend & 0xf800)
+ | ((val >> 11) & 0x1f)
+ | (val & 0x7e0)),
+ (bfd_byte *) data + reloc_entry->address);
+ bfd_put_16 (abfd,
+ (bfd_vma) ((insn & 0xffe0)
+ | (val & 0x1f)),
+ (bfd_byte *) data + reloc_entry->address + 2);
+ }
+ else
+ reloc_entry->addend = val;
+
+ if (relocatable)
+ reloc_entry->address += input_section->output_offset;
+ else if (((val & ~0xffff) != ~0xffff) && ((val & ~0xffff) != 0))
+ return bfd_reloc_overflow;
+
+ return bfd_reloc_ok;
}
/* A mapping from BFD reloc types to MIPS ELF reloc types. */
@@ -1688,7 +1730,7 @@ bfd_mips_elf32_create_embedded_relocs (abfd, info, datasec, relsec, errmsg)
Elf_Internal_Rela *irel, *irelend;
bfd_byte *p;
- BFD_ASSERT (! info->relocateable);
+ BFD_ASSERT (! info->relocatable);
*errmsg = NULL;
diff --git a/bfd/elf32-msp430.c b/bfd/elf32-msp430.c
index 694a30f1198..23f5069cb19 100644
--- a/bfd/elf32-msp430.c
+++ b/bfd/elf32-msp430.c
@@ -1,5 +1,5 @@
/* MSP430-specific support for 32-bit ELF
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003 Free Software Foundation, Inc.
Contributed by Dmitry Diky <diwil@mail.ru>
This file is part of BFD, the Binary File Descriptor library.
@@ -278,7 +278,7 @@ elf32_msp430_check_relocs (abfd, info, sec, relocs)
const Elf_Internal_Rela *rel;
const Elf_Internal_Rela *rel_end;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
diff --git a/bfd/elf32-openrisc.c b/bfd/elf32-openrisc.c
index 8e8d0bc52fa..a9b6d1d2358 100644
--- a/bfd/elf32-openrisc.c
+++ b/bfd/elf32-openrisc.c
@@ -1,5 +1,5 @@
/* OpenRISC-specific support for 32-bit ELF.
- Copyright 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Johan Rydberg, jrydberg@opencores.org
This file is part of BFD, the Binary File Descriptor library.
@@ -298,7 +298,7 @@ openrisc_final_link_relocate (howto, input_bfd, input_section, contents, rel,
zero.
This function is responsible for adjusting the section contents as
- necessary, and (if using Rela relocs and generating a relocateable
+ necessary, and (if using Rela relocs and generating a relocatable
output file) adjusting the reloc addend as necessary.
This function does not have to worry about setting the reloc
@@ -312,7 +312,7 @@ openrisc_final_link_relocate (howto, input_bfd, input_section, contents, rel,
The global hash table entry for the global symbols can be found
via elf_sym_hashes (input_bfd).
- When generating relocateable output, this function must handle
+ When generating relocatable output, this function must handle
STB_LOCAL/STT_SECTION symbols specially. The output symbol is
going to be the section symbol corresponding to the output
section, which means that the addend must be adjusted
@@ -335,7 +335,7 @@ openrisc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
@@ -529,7 +529,7 @@ openrisc_elf_check_relocs (abfd, info, sec, relocs)
const Elf_Internal_Rela *rel;
const Elf_Internal_Rela *rel_end;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 1e1ab8cce3b..2e1353fdf7e 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -35,88 +35,10 @@
/* RELA relocations are used here. */
-static struct bfd_hash_entry *ppc_elf_link_hash_newfunc
- PARAMS ((struct bfd_hash_entry *entry, struct bfd_hash_table *table,
- const char *string));
-static struct bfd_link_hash_table *ppc_elf_link_hash_table_create
- PARAMS ((bfd *abfd));
-static void ppc_elf_copy_indirect_symbol
- PARAMS ((struct elf_backend_data *bed, struct elf_link_hash_entry *dir,
- struct elf_link_hash_entry *ind));
-static reloc_howto_type *ppc_elf_reloc_type_lookup
- PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
-static void ppc_elf_info_to_howto
- PARAMS ((bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst));
-static void ppc_elf_howto_init
- PARAMS ((void));
-static int ppc_elf_sort_rela
- PARAMS ((const PTR, const PTR));
-static bfd_boolean ppc_elf_relax_section
- PARAMS ((bfd *, asection *, struct bfd_link_info *, bfd_boolean *));
static bfd_reloc_status_type ppc_elf_addr16_ha_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_reloc_status_type ppc_elf_unhandled_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static bfd_boolean ppc_elf_object_p
- PARAMS ((bfd *));
-static bfd_boolean ppc_elf_set_private_flags
- PARAMS ((bfd *, flagword));
-static bfd_boolean ppc_elf_merge_private_bfd_data
- PARAMS ((bfd *, bfd *));
-static int ppc_elf_additional_program_headers
- PARAMS ((bfd *));
-static bfd_boolean ppc_elf_modify_segment_map
- PARAMS ((bfd *));
-static bfd_boolean ppc_elf_create_got
- PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_boolean ppc_elf_create_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_boolean ppc_elf_section_from_shdr
- PARAMS ((bfd *, Elf_Internal_Shdr *, const char *));
-static bfd_boolean ppc_elf_fake_sections
- PARAMS ((bfd *, Elf_Internal_Shdr *, asection *));
-static elf_linker_section_t *ppc_elf_create_linker_section
- PARAMS ((bfd *abfd, struct bfd_link_info *info,
- enum elf_linker_section_enum));
-static bfd_boolean update_local_sym_info
- PARAMS ((bfd *, Elf_Internal_Shdr *, unsigned long, int));
-static void bad_shared_reloc
- PARAMS ((bfd *, enum elf_ppc_reloc_type));
-static bfd_boolean ppc_elf_check_relocs
- PARAMS ((bfd *, struct bfd_link_info *, asection *,
- const Elf_Internal_Rela *));
-static asection *ppc_elf_gc_mark_hook
- PARAMS ((asection *sec, struct bfd_link_info *info, Elf_Internal_Rela *rel,
- struct elf_link_hash_entry *h, Elf_Internal_Sym *sym));
-static bfd_boolean ppc_elf_gc_sweep_hook
- PARAMS ((bfd *abfd, struct bfd_link_info *info, asection *sec,
- const Elf_Internal_Rela *relocs));
-static bfd_boolean ppc_elf_adjust_dynamic_symbol
- PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
-static bfd_boolean allocate_dynrelocs
- PARAMS ((struct elf_link_hash_entry *, PTR));
-static bfd_boolean readonly_dynrelocs
- PARAMS ((struct elf_link_hash_entry *, PTR));
-static bfd_boolean ppc_elf_size_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_boolean ppc_elf_relocate_section
- PARAMS ((bfd *, struct bfd_link_info *info, bfd *, asection *, bfd_byte *,
- Elf_Internal_Rela *relocs, Elf_Internal_Sym *local_syms,
- asection **));
-static bfd_boolean ppc_elf_add_symbol_hook
- PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
- const char **, flagword *, asection **, bfd_vma *));
-static bfd_boolean ppc_elf_finish_dynamic_symbol
- PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
- Elf_Internal_Sym *));
-static bfd_boolean ppc_elf_finish_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-static enum elf_reloc_type_class ppc_elf_reloc_type_class
- PARAMS ((const Elf_Internal_Rela *));
-static bfd_boolean ppc_elf_grok_prstatus
- PARAMS ((bfd *abfd, Elf_Internal_Note *note));
-static bfd_boolean ppc_elf_grok_psinfo
- PARAMS ((bfd *abfd, Elf_Internal_Note *note));
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
/* Branch prediction bit for branch taken relocs. */
#define BRANCH_PREDICT_BIT 0x200000
@@ -235,10 +157,9 @@ struct ppc_elf_link_hash_table
/* Create an entry in a PPC ELF linker hash table. */
static struct bfd_hash_entry *
-ppc_elf_link_hash_newfunc (entry, table, string)
- struct bfd_hash_entry *entry;
- struct bfd_hash_table *table;
- const char *string;
+ppc_elf_link_hash_newfunc (struct bfd_hash_entry *entry,
+ struct bfd_hash_table *table,
+ const char *string)
{
/* Allocate the structure if it has not already been allocated by a
subclass. */
@@ -264,13 +185,11 @@ ppc_elf_link_hash_newfunc (entry, table, string)
/* Create a PPC ELF linker hash table. */
static struct bfd_link_hash_table *
-ppc_elf_link_hash_table_create (abfd)
- bfd *abfd;
+ppc_elf_link_hash_table_create (bfd *abfd)
{
struct ppc_elf_link_hash_table *ret;
- ret = ((struct ppc_elf_link_hash_table *)
- bfd_malloc (sizeof (struct ppc_elf_link_hash_table)));
+ ret = bfd_malloc (sizeof (struct ppc_elf_link_hash_table));
if (ret == NULL)
return NULL;
@@ -308,9 +227,9 @@ ppc_elf_link_hash_table_create (abfd)
/* Copy the extra info we tack onto an elf_link_hash_entry. */
static void
-ppc_elf_copy_indirect_symbol (bed, dir, ind)
- struct elf_backend_data *bed;
- struct elf_link_hash_entry *dir, *ind;
+ppc_elf_copy_indirect_symbol (struct elf_backend_data *bed,
+ struct elf_link_hash_entry *dir,
+ struct elf_link_hash_entry *ind)
{
struct ppc_elf_link_hash_entry *edir, *eind;
@@ -367,7 +286,7 @@ ppc_elf_copy_indirect_symbol (bed, dir, ind)
_bfd_elf_link_hash_copy_indirect (bed, dir, ind);
}
-static reloc_howto_type *ppc_elf_howto_table[(int) R_PPC_max];
+static reloc_howto_type *ppc_elf_howto_table[R_PPC_max];
static reloc_howto_type ppc_elf_howto_raw[] = {
/* This reloc does nothing. */
@@ -1606,7 +1525,7 @@ static reloc_howto_type ppc_elf_howto_raw[] = {
/* Initialize the ppc_elf_howto_table, so that linear accesses can be done. */
static void
-ppc_elf_howto_init ()
+ppc_elf_howto_init (void)
{
unsigned int i, type;
@@ -1647,23 +1566,20 @@ ppc_elf_howto_init ()
/* Sort sections by address. */
static int
-ppc_elf_sort_rela (arg1, arg2)
- const PTR arg1;
- const PTR arg2;
+ppc_elf_sort_rela (const void *arg1, const void *arg2)
{
- const Elf_Internal_Rela **rela1 = (const Elf_Internal_Rela**) arg1;
- const Elf_Internal_Rela **rela2 = (const Elf_Internal_Rela**) arg2;
+ const Elf_Internal_Rela * const *rela1 = arg1;
+ const Elf_Internal_Rela * const *rela2 = arg2;
/* Sort by offset. */
return ((*rela1)->r_offset - (*rela2)->r_offset);
}
static bfd_boolean
-ppc_elf_relax_section (abfd, isec, link_info, again)
- bfd *abfd;
- asection *isec;
- struct bfd_link_info *link_info;
- bfd_boolean *again;
+ppc_elf_relax_section (bfd *abfd,
+ asection *isec,
+ struct bfd_link_info *link_info,
+ bfd_boolean *again)
{
#define PAGESIZE 0x1000
@@ -1695,7 +1611,7 @@ ppc_elf_relax_section (abfd, isec, link_info, again)
else
{
/* Go get them off disk. */
- contents = (bfd_byte *) bfd_malloc (isec->_raw_size);
+ contents = bfd_malloc (isec->_raw_size);
if (contents == NULL)
goto error_return;
free_contents = contents;
@@ -1714,8 +1630,7 @@ ppc_elf_relax_section (abfd, isec, link_info, again)
/* Get a copy of the native relocations. */
internal_relocs
- = _bfd_elf_link_read_relocs (abfd, isec, (PTR) NULL,
- (Elf_Internal_Rela *) NULL,
+ = _bfd_elf_link_read_relocs (abfd, isec, NULL, NULL,
link_info->keep_memory);
if (internal_relocs == NULL)
goto error_return;
@@ -1725,15 +1640,15 @@ ppc_elf_relax_section (abfd, isec, link_info, again)
/* Setup a faster access method for the reloc info we need. */
amt = isec->reloc_count;
amt *= sizeof (Elf_Internal_Rela*);
- rela_comb = (Elf_Internal_Rela**) bfd_malloc (amt);
+ rela_comb = bfd_malloc (amt);
if (rela_comb == NULL)
goto error_return;
for (n = 0; n < isec->reloc_count; ++n)
{
- long r_type;
+ enum elf_ppc_reloc_type r_type;
r_type = ELF32_R_TYPE (internal_relocs[n].r_info);
- if (r_type < 0 || r_type >= (int) R_PPC_max)
+ if (r_type >= R_PPC_max)
goto error_return;
/* Prologue constants are sometimes present in the ".text"
@@ -1861,7 +1776,7 @@ ppc_elf_relax_section (abfd, isec, link_info, again)
#undef BO4
if (modified)
{
- bfd_put_32 (abfd, (bfd_vma) insn, contents + isec_offset);
+ bfd_put_32 (abfd, insn, contents + isec_offset);
section_modified = TRUE;
}
}
@@ -1910,20 +1825,19 @@ ppc_elf_relax_section (abfd, isec, link_info, again)
}
static reloc_howto_type *
-ppc_elf_reloc_type_lookup (abfd, code)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_reloc_code_real_type code;
+ppc_elf_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_reloc_code_real_type code)
{
enum elf_ppc_reloc_type r;
+ /* Initialize howto table if not already done. */
if (!ppc_elf_howto_table[R_PPC_ADDR32])
- /* Initialize howto table if needed. */
ppc_elf_howto_init ();
- switch ((int) code)
+ switch (code)
{
default:
- return (reloc_howto_type *) NULL;
+ return NULL;
case BFD_RELOC_NONE: r = R_PPC_NONE; break;
case BFD_RELOC_32: r = R_PPC_ADDR32; break;
@@ -2008,19 +1922,18 @@ ppc_elf_reloc_type_lookup (abfd, code)
case BFD_RELOC_VTABLE_ENTRY: r = R_PPC_GNU_VTENTRY; break;
}
- return ppc_elf_howto_table[(int) r];
+ return ppc_elf_howto_table[r];
};
/* Set the howto pointer for a PowerPC ELF reloc. */
static void
-ppc_elf_info_to_howto (abfd, cache_ptr, dst)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *cache_ptr;
- Elf_Internal_Rela *dst;
+ppc_elf_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *cache_ptr,
+ Elf_Internal_Rela *dst)
{
+ /* Initialize howto table if not already done. */
if (!ppc_elf_howto_table[R_PPC_ADDR32])
- /* Initialize howto table if needed. */
ppc_elf_howto_init ();
BFD_ASSERT (ELF32_R_TYPE (dst->r_info) < (unsigned int) R_PPC_max);
@@ -2030,15 +1943,13 @@ ppc_elf_info_to_howto (abfd, cache_ptr, dst)
/* Handle the R_PPC_ADDR16_HA reloc. */
static bfd_reloc_status_type
-ppc_elf_addr16_ha_reloc (abfd, reloc_entry, symbol, data, input_section,
- output_bfd, error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data ATTRIBUTE_UNUSED;
- asection *input_section;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
+ppc_elf_addr16_ha_reloc (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *reloc_entry,
+ asymbol *symbol,
+ void *data ATTRIBUTE_UNUSED,
+ asection *input_section,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
{
bfd_vma relocation;
@@ -2066,15 +1977,13 @@ ppc_elf_addr16_ha_reloc (abfd, reloc_entry, symbol, data, input_section,
}
static bfd_reloc_status_type
-ppc_elf_unhandled_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message;
+ppc_elf_unhandled_reloc (bfd *abfd,
+ arelent *reloc_entry,
+ asymbol *symbol,
+ void *data,
+ asection *input_section,
+ bfd *output_bfd,
+ char **error_message)
{
/* If this is a relocatable link (output_bfd test tells us), just
call the generic function. Any adjustment will be done at final
@@ -2086,7 +1995,7 @@ ppc_elf_unhandled_reloc (abfd, reloc_entry, symbol, data,
if (error_message != NULL)
{
static char buf[60];
- sprintf (buf, "generic linker can't handle %s",
+ sprintf (buf, _("generic linker can't handle %s"),
reloc_entry->howto->name);
*error_message = buf;
}
@@ -2097,8 +2006,7 @@ ppc_elf_unhandled_reloc (abfd, reloc_entry, symbol, data,
default is 64 bit. */
static bfd_boolean
-ppc_elf_object_p (abfd)
- bfd *abfd;
+ppc_elf_object_p (bfd *abfd)
{
if (abfd->arch_info->the_default && abfd->arch_info->bits_per_word == 64)
{
@@ -2117,9 +2025,7 @@ ppc_elf_object_p (abfd)
/* Function to set whether a module needs the -mrelocatable bit set. */
static bfd_boolean
-ppc_elf_set_private_flags (abfd, flags)
- bfd *abfd;
- flagword flags;
+ppc_elf_set_private_flags (bfd *abfd, flagword flags)
{
BFD_ASSERT (!elf_flags_init (abfd)
|| elf_elfheader (abfd)->e_flags == flags);
@@ -2133,9 +2039,7 @@ ppc_elf_set_private_flags (abfd, flags)
object file when linking. */
static bfd_boolean
-ppc_elf_merge_private_bfd_data (ibfd, obfd)
- bfd *ibfd;
- bfd *obfd;
+ppc_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
{
flagword old_flags;
flagword new_flags;
@@ -2173,7 +2077,8 @@ ppc_elf_merge_private_bfd_data (ibfd, obfd)
{
error = TRUE;
(*_bfd_error_handler)
- (_("%s: compiled with -mrelocatable and linked with modules compiled normally"),
+ (_("%s: compiled with -mrelocatable and linked with "
+ "modules compiled normally"),
bfd_archive_filename (ibfd));
}
else if ((new_flags & (EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB)) == 0
@@ -2181,7 +2086,8 @@ ppc_elf_merge_private_bfd_data (ibfd, obfd)
{
error = TRUE;
(*_bfd_error_handler)
- (_("%s: compiled normally and linked with modules compiled with -mrelocatable"),
+ (_("%s: compiled normally and linked with "
+ "modules compiled with -mrelocatable"),
bfd_archive_filename (ibfd));
}
@@ -2208,7 +2114,8 @@ ppc_elf_merge_private_bfd_data (ibfd, obfd)
{
error = TRUE;
(*_bfd_error_handler)
- (_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
+ (_("%s: uses different e_flags (0x%lx) fields "
+ "than previous modules (0x%lx)"),
bfd_archive_filename (ibfd), (long) new_flags, (long) old_flags);
}
@@ -2226,10 +2133,7 @@ ppc_elf_merge_private_bfd_data (ibfd, obfd)
is called when elfcode.h finds a section with an unknown type. */
static bfd_boolean
-ppc_elf_section_from_shdr (abfd, hdr, name)
- bfd *abfd;
- Elf_Internal_Shdr *hdr;
- const char *name;
+ppc_elf_section_from_shdr (bfd *abfd, Elf_Internal_Shdr *hdr, const char *name)
{
asection *newsect;
flagword flags;
@@ -2252,10 +2156,9 @@ ppc_elf_section_from_shdr (abfd, hdr, name)
/* Set up any other section flags and such that may be necessary. */
static bfd_boolean
-ppc_elf_fake_sections (abfd, shdr, asect)
- bfd *abfd ATTRIBUTE_UNUSED;
- Elf_Internal_Shdr *shdr;
- asection *asect;
+ppc_elf_fake_sections (bfd *abfd ATTRIBUTE_UNUSED,
+ Elf_Internal_Shdr *shdr,
+ asection *asect)
{
if ((asect->flags & SEC_EXCLUDE) != 0)
shdr->sh_flags |= SHF_EXCLUDE;
@@ -2268,10 +2171,9 @@ ppc_elf_fake_sections (abfd, shdr, asect)
/* Create a special linker section */
static elf_linker_section_t *
-ppc_elf_create_linker_section (abfd, info, which)
- bfd *abfd;
- struct bfd_link_info *info;
- enum elf_linker_section_enum which;
+ppc_elf_create_linker_section (bfd *abfd,
+ struct bfd_link_info *info,
+ enum elf_linker_section_enum which)
{
bfd *dynobj = elf_hash_table (info)->dynobj;
elf_linker_section_t *lsect;
@@ -2311,7 +2213,7 @@ ppc_elf_create_linker_section (abfd, info, which)
(int) which);
bfd_set_error (bfd_error_bad_value);
- return (elf_linker_section_t *) 0;
+ return NULL;
case LINKER_SECTION_SDATA: /* .sdata/.sbss section */
defaults.name = ".sdata";
@@ -2341,8 +2243,7 @@ ppc_elf_create_linker_section (abfd, info, which)
need to bump up the number of section headers. */
static int
-ppc_elf_additional_program_headers (abfd)
- bfd *abfd;
+ppc_elf_additional_program_headers (bfd *abfd)
{
asection *s;
int ret;
@@ -2367,8 +2268,7 @@ ppc_elf_additional_program_headers (abfd)
/* Modify the segment map if needed. */
static bfd_boolean
-ppc_elf_modify_segment_map (abfd)
- bfd *abfd ATTRIBUTE_UNUSED;
+ppc_elf_modify_segment_map (bfd *abfd ATTRIBUTE_UNUSED)
{
return TRUE;
}
@@ -2376,9 +2276,7 @@ ppc_elf_modify_segment_map (abfd)
/* The powerpc .got has a blrl instruction in it. Mark it executable. */
static bfd_boolean
-ppc_elf_create_got (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
+ppc_elf_create_got (bfd *abfd, struct bfd_link_info *info)
{
struct ppc_elf_link_hash_table *htab;
asection *s;
@@ -2414,9 +2312,7 @@ ppc_elf_create_got (abfd, info)
to create .dynbss and .rela.bss). */
static bfd_boolean
-ppc_elf_create_dynamic_sections (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
+ppc_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
{
struct ppc_elf_link_hash_table *htab;
asection *s;
@@ -2464,9 +2360,8 @@ ppc_elf_create_dynamic_sections (abfd, info)
understand. */
static bfd_boolean
-ppc_elf_adjust_dynamic_symbol (info, h)
- struct bfd_link_info *info;
- struct elf_link_hash_entry *h;
+ppc_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
+ struct elf_link_hash_entry *h)
{
struct ppc_elf_link_hash_table *htab;
asection *s;
@@ -2655,11 +2550,9 @@ ppc_elf_adjust_dynamic_symbol (info, h)
/* Allocate space in associated reloc sections for dynamic relocs. */
static bfd_boolean
-allocate_dynrelocs (h, inf)
- struct elf_link_hash_entry *h;
- PTR inf;
+allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
{
- struct bfd_link_info *info = (struct bfd_link_info *) inf;
+ struct bfd_link_info *info = inf;
struct ppc_elf_link_hash_entry *eh;
struct ppc_elf_link_hash_table *htab;
struct ppc_elf_dyn_relocs *p;
@@ -2719,7 +2612,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. */
@@ -2804,7 +2697,7 @@ allocate_dynrelocs (h, inf)
generated via assembly. We want calls to protected symbols to
resolve directly to the function rather than going via the plt.
If people want function pointer comparisons to work as expected
- then they should avoid writing weird assembly. */
+ then they should avoid writing weird assembly. */
if (SYMBOL_CALLS_LOCAL (info, h))
{
struct ppc_elf_dyn_relocs **pp;
@@ -2869,9 +2762,7 @@ allocate_dynrelocs (h, inf)
/* Find any dynamic relocs that apply to read-only sections. */
static bfd_boolean
-readonly_dynrelocs (h, info)
- struct elf_link_hash_entry *h;
- PTR info;
+readonly_dynrelocs (struct elf_link_hash_entry *h, void *info)
{
struct ppc_elf_dyn_relocs *p;
@@ -2901,9 +2792,8 @@ readonly_dynrelocs (h, info)
/* Set the sizes of the dynamic sections. */
static bfd_boolean
-ppc_elf_size_dynamic_sections (output_bfd, info)
- bfd *output_bfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info;
+ppc_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info)
{
struct ppc_elf_link_hash_table *htab;
asection *s;
@@ -2920,7 +2810,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);
@@ -3087,7 +2977,7 @@ ppc_elf_size_dynamic_sections (output_bfd, info)
}
/* Allocate memory for the section contents. */
- s->contents = (bfd_byte *) bfd_zalloc (htab->elf.dynobj, s->_raw_size);
+ s->contents = bfd_zalloc (htab->elf.dynobj, s->_raw_size);
if (s->contents == NULL)
return FALSE;
}
@@ -3100,9 +2990,9 @@ ppc_elf_size_dynamic_sections (output_bfd, info)
the .dynamic section. The DT_DEBUG entry is filled in by the
dynamic linker and used by the debugger. */
#define add_dynamic_entry(TAG, VAL) \
- bfd_elf32_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
+ bfd_elf32_add_dynamic_entry (info, (TAG), (VAL))
- if (!info->shared)
+ if (info->executable)
{
if (!add_dynamic_entry (DT_DEBUG, 0))
return FALSE;
@@ -3129,7 +3019,7 @@ ppc_elf_size_dynamic_sections (output_bfd, info)
need a DT_TEXTREL entry. */
if ((info->flags & DF_TEXTREL) == 0)
elf_link_hash_traverse (elf_hash_table (info), readonly_dynrelocs,
- (PTR) info);
+ info);
if ((info->flags & DF_TEXTREL) != 0)
{
@@ -3143,11 +3033,10 @@ ppc_elf_size_dynamic_sections (output_bfd, info)
}
static bfd_boolean
-update_local_sym_info (abfd, symtab_hdr, r_symndx, tls_type)
- bfd *abfd;
- Elf_Internal_Shdr *symtab_hdr;
- unsigned long r_symndx;
- int tls_type;
+update_local_sym_info (bfd *abfd,
+ Elf_Internal_Shdr *symtab_hdr,
+ unsigned long r_symndx,
+ int tls_type)
{
bfd_signed_vma *local_got_refcounts = elf_local_got_refcounts (abfd);
char *local_got_tls_masks;
@@ -3157,7 +3046,7 @@ update_local_sym_info (abfd, symtab_hdr, r_symndx, tls_type)
bfd_size_type size = symtab_hdr->sh_info;
size *= sizeof (*local_got_refcounts) + sizeof (*local_got_tls_masks);
- local_got_refcounts = (bfd_signed_vma *) bfd_zalloc (abfd, size);
+ local_got_refcounts = bfd_zalloc (abfd, size);
if (local_got_refcounts == NULL)
return FALSE;
elf_local_got_refcounts (abfd) = local_got_refcounts;
@@ -3170,14 +3059,12 @@ update_local_sym_info (abfd, symtab_hdr, r_symndx, tls_type)
}
static void
-bad_shared_reloc (abfd, r_type)
- bfd *abfd;
- enum elf_ppc_reloc_type r_type;
+bad_shared_reloc (bfd *abfd, enum elf_ppc_reloc_type r_type)
{
(*_bfd_error_handler)
(_("%s: relocation %s cannot be used when making a shared object"),
bfd_archive_filename (abfd),
- ppc_elf_howto_table[(int) r_type]->name);
+ ppc_elf_howto_table[r_type]->name);
bfd_set_error (bfd_error_bad_value);
}
@@ -3186,11 +3073,10 @@ bad_shared_reloc (abfd, r_type)
table. */
static bfd_boolean
-ppc_elf_check_relocs (abfd, info, sec, relocs)
- bfd *abfd;
- struct bfd_link_info *info;
- asection *sec;
- const Elf_Internal_Rela *relocs;
+ppc_elf_check_relocs (bfd *abfd,
+ struct bfd_link_info *info,
+ asection *sec,
+ const Elf_Internal_Rela *relocs)
{
struct ppc_elf_link_hash_table *htab;
Elf_Internal_Shdr *symtab_hdr;
@@ -3199,7 +3085,7 @@ ppc_elf_check_relocs (abfd, info, sec, relocs)
const Elf_Internal_Rela *rel_end;
asection *sreloc;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
#ifdef DEBUG
@@ -3208,9 +3094,12 @@ ppc_elf_check_relocs (abfd, info, sec, relocs)
bfd_archive_filename (abfd));
#endif
+ /* Initialize howto table if not already done. */
+ if (!ppc_elf_howto_table[R_PPC_ADDR32])
+ ppc_elf_howto_init ();
+
/* Create the linker generated sections all the time so that the
special symbols are created. */
-
htab = ppc_elf_hash_table (info);
if (htab->sdata == NULL)
{
@@ -3264,7 +3153,7 @@ ppc_elf_check_relocs (abfd, info, sec, relocs)
}
}
- r_type = (enum elf_ppc_reloc_type) ELF32_R_TYPE (rel->r_info);
+ r_type = ELF32_R_TYPE (rel->r_info);
switch (r_type)
{
case R_PPC_GOT_TLSLD16:
@@ -3383,6 +3272,12 @@ ppc_elf_check_relocs (abfd, info, sec, relocs)
{
/* It does not make sense to have a procedure linkage
table entry for a local symbol. */
+ (*_bfd_error_handler) (_("%s(%s+0x%lx): %s reloc against "
+ "local symbol"),
+ bfd_archive_filename (abfd),
+ sec->name,
+ (long) rel->r_offset,
+ ppc_elf_howto_table[r_type]->name);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -3540,7 +3435,9 @@ ppc_elf_check_relocs (abfd, info, sec, relocs)
struct ppc_elf_dyn_relocs **head;
#ifdef DEBUG
- fprintf (stderr, "ppc_elf_check_relocs need to create relocation for %s\n",
+ fprintf (stderr,
+ "ppc_elf_check_relocs needs to "
+ "create relocation for %s\n",
(h && h->root.root.string
? h->root.root.string : "<unknown>"));
#endif
@@ -3604,8 +3501,7 @@ ppc_elf_check_relocs (abfd, info, sec, relocs)
p = *head;
if (p == NULL || p->sec != sec)
{
- p = ((struct ppc_elf_dyn_relocs *)
- bfd_alloc (htab->elf.dynobj, sizeof *p));
+ p = bfd_alloc (htab->elf.dynobj, sizeof *p);
if (p == NULL)
return FALSE;
p->next = *head;
@@ -3631,12 +3527,11 @@ ppc_elf_check_relocs (abfd, info, sec, relocs)
relocation. */
static asection *
-ppc_elf_gc_mark_hook (sec, info, rel, h, sym)
- asection *sec;
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
- Elf_Internal_Rela *rel;
- struct elf_link_hash_entry *h;
- Elf_Internal_Sym *sym;
+ppc_elf_gc_mark_hook (asection *sec,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ Elf_Internal_Rela *rel,
+ struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym)
{
if (h != NULL)
{
@@ -3671,11 +3566,10 @@ ppc_elf_gc_mark_hook (sec, info, rel, h, sym)
section being removed. */
static bfd_boolean
-ppc_elf_gc_sweep_hook (abfd, info, sec, relocs)
- bfd *abfd;
- struct bfd_link_info *info;
- asection *sec;
- const Elf_Internal_Rela *relocs;
+ppc_elf_gc_sweep_hook (bfd *abfd,
+ struct bfd_link_info *info,
+ asection *sec,
+ const Elf_Internal_Rela *relocs)
{
struct ppc_elf_link_hash_table *htab;
Elf_Internal_Shdr *symtab_hdr;
@@ -3715,7 +3609,7 @@ ppc_elf_gc_sweep_hook (abfd, info, sec, relocs)
}
}
- r_type = (enum elf_ppc_reloc_type) ELF32_R_TYPE (rel->r_info);
+ r_type = ELF32_R_TYPE (rel->r_info);
switch (r_type)
{
case R_PPC_GOT_TLSLD16:
@@ -3796,9 +3690,7 @@ ppc_elf_gc_sweep_hook (abfd, info, sec, relocs)
/* Set htab->tls_sec and htab->tls_get_addr. */
bfd_boolean
-ppc_elf_tls_setup (obfd, info)
- bfd *obfd;
- struct bfd_link_info *info;
+ppc_elf_tls_setup (bfd *obfd, struct bfd_link_info *info)
{
asection *tls;
struct ppc_elf_link_hash_table *htab;
@@ -3820,15 +3712,14 @@ ppc_elf_tls_setup (obfd, info)
opportunities. */
bfd_boolean
-ppc_elf_tls_optimize (obfd, info)
- bfd *obfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info;
+ppc_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info)
{
bfd *ibfd;
asection *sec;
struct ppc_elf_link_hash_table *htab;
- if (info->relocateable || info->shared)
+ if (info->relocatable || info->shared)
return TRUE;
htab = ppc_elf_hash_table (info);
@@ -3844,8 +3735,7 @@ ppc_elf_tls_optimize (obfd, info)
int expecting_tls_get_addr;
/* Read the relocations. */
- relstart = _bfd_elf_link_read_relocs (ibfd, sec, (PTR) NULL,
- (Elf_Internal_Rela *) NULL,
+ relstart = _bfd_elf_link_read_relocs (ibfd, sec, NULL, NULL,
info->keep_memory);
if (relstart == NULL)
return FALSE;
@@ -3878,7 +3768,7 @@ ppc_elf_tls_optimize (obfd, info)
|| !(h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC))
is_local = TRUE;
- r_type = (enum elf_ppc_reloc_type) ELF32_R_TYPE (rel->r_info);
+ r_type = ELF32_R_TYPE (rel->r_info);
switch (r_type)
{
case R_PPC_GOT_TLSLD16:
@@ -4015,17 +3905,16 @@ ppc_elf_tls_optimize (obfd, info)
file. We use it to put .comm items in .sbss, and not .bss. */
static bfd_boolean
-ppc_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
- bfd *abfd;
- struct bfd_link_info *info;
- const Elf_Internal_Sym *sym;
- const char **namep ATTRIBUTE_UNUSED;
- flagword *flagsp ATTRIBUTE_UNUSED;
- asection **secp;
- bfd_vma *valp;
+ppc_elf_add_symbol_hook (bfd *abfd,
+ struct bfd_link_info *info,
+ const Elf_Internal_Sym *sym,
+ const char **namep ATTRIBUTE_UNUSED,
+ flagword *flagsp ATTRIBUTE_UNUSED,
+ asection **secp,
+ bfd_vma *valp)
{
if (sym->st_shndx == SHN_COMMON
- && !info->relocateable
+ && !info->relocatable
&& sym->st_size <= elf_gp_size (abfd)
&& info->hash->creator->flavour == bfd_target_elf_flavour)
{
@@ -4043,17 +3932,16 @@ ppc_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
will move the symbols to the appropriate output section
when it defines common symbols. */
amt = sizeof (asection);
- sdata->bss_section = (asection *) bfd_zalloc (abfd, amt);
+ sdata->bss_section = bfd_zalloc (abfd, amt);
if (sdata->bss_section == NULL)
return FALSE;
sdata->bss_section->name = sdata->bss_name;
sdata->bss_section->flags = SEC_IS_COMMON;
sdata->bss_section->output_section = sdata->bss_section;
amt = sizeof (asymbol);
- sdata->bss_section->symbol = (asymbol *) bfd_zalloc (abfd, amt);
+ sdata->bss_section->symbol = bfd_zalloc (abfd, amt);
amt = sizeof (asymbol *);
- sdata->bss_section->symbol_ptr_ptr =
- (asymbol **) bfd_zalloc (abfd, amt);
+ sdata->bss_section->symbol_ptr_ptr = bfd_zalloc (abfd, amt);
if (sdata->bss_section->symbol == NULL
|| sdata->bss_section->symbol_ptr_ptr == NULL)
return FALSE;
@@ -4074,11 +3962,10 @@ ppc_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
dynamic sections here. */
static bfd_boolean
-ppc_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
- bfd *output_bfd;
- struct bfd_link_info *info;
- struct elf_link_hash_entry *h;
- Elf_Internal_Sym *sym;
+ppc_elf_finish_dynamic_symbol (bfd *output_bfd,
+ struct bfd_link_info *info,
+ struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym)
{
struct ppc_elf_link_hash_table *htab;
@@ -4183,9 +4070,8 @@ ppc_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
/* Finish up the dynamic sections. */
static bfd_boolean
-ppc_elf_finish_dynamic_sections (output_bfd, info)
- bfd *output_bfd;
- struct bfd_link_info *info;
+ppc_elf_finish_dynamic_sections (bfd *output_bfd,
+ struct bfd_link_info *info)
{
asection *sdyn;
struct ppc_elf_link_hash_table *htab;
@@ -4241,10 +4127,10 @@ ppc_elf_finish_dynamic_sections (output_bfd, info)
if (htab->got)
{
unsigned char *contents = htab->got->contents;
- bfd_put_32 (output_bfd, (bfd_vma) 0x4e800021 /* blrl */, contents);
+ bfd_put_32 (output_bfd, 0x4e800021 /* blrl */, contents);
if (sdyn == NULL)
- bfd_put_32 (output_bfd, (bfd_vma) 0, contents + 4);
+ bfd_put_32 (output_bfd, 0, contents + 4);
else
bfd_put_32 (output_bfd,
sdyn->output_section->vma + sdyn->output_offset,
@@ -4265,7 +4151,7 @@ ppc_elf_finish_dynamic_sections (output_bfd, info)
This function is responsible for adjust the section contents as
necessary, and (if using Rela relocs and generating a
- relocateable output file) adjusting the reloc addend as
+ relocatable output file) adjusting the reloc addend as
necessary.
This function does not have to worry about setting the reloc
@@ -4279,23 +4165,21 @@ ppc_elf_finish_dynamic_sections (output_bfd, info)
The global hash table entry for the global symbols can be found
via elf_sym_hashes (input_bfd).
- When generating relocateable output, this function must handle
+ When generating relocatable output, this function must handle
STB_LOCAL/STT_SECTION symbols specially. The output symbol is
going to be the section symbol corresponding to the output
section, which means that the addend must be adjusted
accordingly. */
static bfd_boolean
-ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
- contents, relocs, local_syms, local_sections)
- bfd *output_bfd;
- struct bfd_link_info *info;
- bfd *input_bfd;
- asection *input_section;
- bfd_byte *contents;
- Elf_Internal_Rela *relocs;
- Elf_Internal_Sym *local_syms;
- asection **local_sections;
+ppc_elf_relocate_section (bfd *output_bfd,
+ struct bfd_link_info *info,
+ bfd *input_bfd,
+ asection *input_section,
+ bfd_byte *contents,
+ Elf_Internal_Rela *relocs,
+ Elf_Internal_Sym *local_syms,
+ asection **local_sections)
{
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
@@ -4309,18 +4193,19 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_boolean ret = TRUE;
#ifdef DEBUG
- fprintf (stderr, "ppc_elf_relocate_section called for %s section %s, %ld relocations%s\n",
+ fprintf (stderr, "ppc_elf_relocate_section called for %s section %s, "
+ "%ld relocations%s\n",
bfd_archive_filename (input_bfd),
bfd_section_name(input_bfd, input_section),
(long) input_section->reloc_count,
- (info->relocateable) ? " (relocatable)" : "");
+ (info->relocatable) ? " (relocatable)" : "");
#endif
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
+ /* Initialize howto table if not already done. */
if (!ppc_elf_howto_table[R_PPC_ADDR32])
- /* Initialize howto table if needed. */
ppc_elf_howto_init ();
htab = ppc_elf_hash_table (info);
@@ -4346,10 +4231,10 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_boolean warned;
unsigned int tls_type, tls_mask, tls_gd;
- r_type = (enum elf_ppc_reloc_type)ELF32_R_TYPE (rel->r_info);
- sym = (Elf_Internal_Sym *) 0;
- sec = (asection *) 0;
- h = (struct elf_link_hash_entry *) 0;
+ r_type = ELF32_R_TYPE (rel->r_info);
+ sym = NULL;
+ sec = NULL;
+ h = NULL;
unresolved_reloc = FALSE;
warned = FALSE;
r_symndx = ELF32_R_SYM (rel->r_info);
@@ -4542,8 +4427,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
/* The next instruction should be a call to
__tls_get_addr. Peek at the reloc to be sure. */
- r_type2
- = (enum elf_ppc_reloc_type) ELF32_R_TYPE (rel[1].r_info);
+ r_type2 = ELF32_R_TYPE (rel[1].r_info);
r_symndx2 = ELF32_R_SYM (rel[1].r_info);
if (r_symndx2 < symtab_hdr->sh_info
|| (r_type2 != R_PPC_REL14
@@ -4642,8 +4526,8 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
addend = rel->r_addend;
tls_type = 0;
howto = NULL;
- if ((unsigned) r_type < (unsigned) R_PPC_max)
- howto = ppc_elf_howto_table[(int) r_type];
+ if (r_type < R_PPC_max)
+ howto = ppc_elf_howto_table[r_type];
switch (r_type)
{
default:
@@ -5010,7 +4894,8 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
int skip;
#ifdef DEBUG
- fprintf (stderr, "ppc_elf_relocate_section need to create relocation for %s\n",
+ fprintf (stderr, "ppc_elf_relocate_section needs to "
+ "create relocation for %s\n",
(h && h->root.root.string
? h->root.root.string : "<unknown>"));
#endif
@@ -5089,11 +4974,9 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
BFD_ASSERT (indx > 0);
#ifdef DEBUG
if (indx <= 0)
- {
- printf ("indx=%d section=%s flags=%08x name=%s\n",
- indx, osec->name, osec->flags,
- h->root.root.string);
- }
+ printf ("indx=%d section=%s flags=%08x name=%s\n",
+ indx, osec->name, osec->flags,
+ h->root.root.string);
#endif
}
@@ -5146,7 +5029,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
an embedded ELF object, for which the .got section acts like the
AIX .toc section. */
case R_PPC_TOC16: /* phony GOT16 relocations */
- BFD_ASSERT (sec != (asection *) 0);
+ BFD_ASSERT (sec != NULL);
BFD_ASSERT (bfd_is_und_section (sec)
|| strcmp (bfd_get_section_name (abfd, sec), ".got") == 0
|| strcmp (bfd_get_section_name (abfd, sec), ".cgot") == 0)
@@ -5180,18 +5063,20 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
const char *name;
const struct elf_link_hash_entry *sh;
- BFD_ASSERT (sec != (asection *) 0);
+ BFD_ASSERT (sec != NULL);
name = bfd_get_section_name (abfd, sec->output_section);
if (! ((strncmp (name, ".sdata", 6) == 0
&& (name[6] == 0 || name[6] == '.'))
|| (strncmp (name, ".sbss", 5) == 0
&& (name[5] == 0 || name[5] == '.'))))
{
- (*_bfd_error_handler) (_("%s: the target (%s) of a %s relocation is in the wrong output section (%s)"),
- bfd_archive_filename (input_bfd),
- sym_name,
- howto->name,
- name);
+ (*_bfd_error_handler)
+ (_("%s: the target (%s) of a %s relocation is "
+ "in the wrong output section (%s)"),
+ bfd_archive_filename (input_bfd),
+ sym_name,
+ howto->name,
+ name);
}
sh = htab->sdata->sym_hash;
addend -= (sh->root.u.def.value
@@ -5206,16 +5091,18 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
const char *name;
const struct elf_link_hash_entry *sh;
- BFD_ASSERT (sec != (asection *) 0);
+ BFD_ASSERT (sec != NULL);
name = bfd_get_section_name (abfd, sec->output_section);
if (! (strncmp (name, ".sdata2", 7) == 0
|| strncmp (name, ".sbss2", 6) == 0))
{
- (*_bfd_error_handler) (_("%s: the target (%s) of a %s relocation is in the wrong output section (%s)"),
- bfd_archive_filename (input_bfd),
- sym_name,
- howto->name,
- name);
+ (*_bfd_error_handler)
+ (_("%s: the target (%s) of a %s relocation is "
+ "in the wrong output section (%s)"),
+ bfd_archive_filename (input_bfd),
+ sym_name,
+ howto->name,
+ name);
bfd_set_error (bfd_error_bad_value);
ret = FALSE;
@@ -5236,7 +5123,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
const struct elf_link_hash_entry *sh;
int reg;
- BFD_ASSERT (sec != (asection *) 0);
+ BFD_ASSERT (sec != NULL);
name = bfd_get_section_name (abfd, sec->output_section);
if (((strncmp (name, ".sdata", 6) == 0
&& (name[6] == 0 || name[6] == '.'))
@@ -5268,11 +5155,13 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
else
{
- (*_bfd_error_handler) (_("%s: the target (%s) of a %s relocation is in the wrong output section (%s)"),
- bfd_archive_filename (input_bfd),
- sym_name,
- howto->name,
- name);
+ (*_bfd_error_handler)
+ (_("%s: the target (%s) of a %s relocation is "
+ "in the wrong output section (%s)"),
+ bfd_archive_filename (input_bfd),
+ sym_name,
+ howto->name,
+ name);
bfd_set_error (bfd_error_bad_value);
ret = FALSE;
@@ -5293,7 +5182,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
case R_PPC_SECTOFF_LO:
case R_PPC_SECTOFF_HI:
case R_PPC_SECTOFF_HA:
- BFD_ASSERT (sec != (asection *) 0);
+ BFD_ASSERT (sec != NULL);
addend -= sec->output_section->vma;
break;
@@ -5362,7 +5251,8 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
#ifdef DEBUG
- fprintf (stderr, "\ttype = %s (%d), name = %s, symbol index = %ld, offset = %ld, addend = %ld\n",
+ fprintf (stderr, "\ttype = %s (%d), name = %s, symbol index = %ld, "
+ "offset = %ld, addend = %ld\n",
howto->name,
(int) r_type,
sym_name,
@@ -5443,10 +5333,9 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
static enum elf_reloc_type_class
-ppc_elf_reloc_type_class (rela)
- const Elf_Internal_Rela *rela;
+ppc_elf_reloc_type_class (const Elf_Internal_Rela *rela)
{
- switch ((int) ELF32_R_TYPE (rela->r_info))
+ switch (ELF32_R_TYPE (rela->r_info))
{
case R_PPC_RELATIVE:
return reloc_class_relative;
@@ -5464,9 +5353,7 @@ ppc_elf_reloc_type_class (rela)
/* Support for core dump NOTE sections. */
static bfd_boolean
-ppc_elf_grok_prstatus (abfd, note)
- bfd *abfd;
- Elf_Internal_Note *note;
+ppc_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
{
int offset;
unsigned int raw_size;
@@ -5496,9 +5383,7 @@ ppc_elf_grok_prstatus (abfd, note)
}
static bfd_boolean
-ppc_elf_grok_psinfo (abfd, note)
- bfd *abfd;
- Elf_Internal_Note *note;
+ppc_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
{
switch (note->descsz)
{
@@ -5535,31 +5420,17 @@ typedef struct apuinfo_list
}
apuinfo_list;
-static apuinfo_list * head;
-
-static void apuinfo_list_init PARAMS ((void));
-static void apuinfo_list_add PARAMS ((unsigned long));
-static unsigned apuinfo_list_length PARAMS ((void));
-static unsigned long apuinfo_list_element PARAMS ((unsigned long));
-static void apuinfo_list_finish PARAMS ((void));
-
-extern void ppc_elf_begin_write_processing
- PARAMS ((bfd *, struct bfd_link_info *));
-extern void ppc_elf_final_write_processing
- PARAMS ((bfd *, bfd_boolean));
-extern bfd_boolean ppc_elf_write_section
- PARAMS ((bfd *, asection *, bfd_byte *));
+static apuinfo_list *head;
static void
-apuinfo_list_init PARAMS ((void))
+apuinfo_list_init (void)
{
head = NULL;
}
static void
-apuinfo_list_add (value)
- unsigned long value;
+apuinfo_list_add (unsigned long value)
{
apuinfo_list *entry = head;
@@ -5580,7 +5451,7 @@ apuinfo_list_add (value)
}
static unsigned
-apuinfo_list_length PARAMS ((void))
+apuinfo_list_length (void)
{
apuinfo_list *entry;
unsigned long count;
@@ -5594,8 +5465,7 @@ apuinfo_list_length PARAMS ((void))
}
static inline unsigned long
-apuinfo_list_element (number)
- unsigned long number;
+apuinfo_list_element (unsigned long number)
{
apuinfo_list * entry;
@@ -5608,7 +5478,7 @@ apuinfo_list_element (number)
}
static void
-apuinfo_list_finish PARAMS ((void))
+apuinfo_list_finish (void)
{
apuinfo_list *entry;
@@ -5628,10 +5498,8 @@ apuinfo_list_finish PARAMS ((void))
/* Scan the input BFDs and create a linked list of
the APUinfo values that will need to be emitted. */
-void
-ppc_elf_begin_write_processing (abfd, link_info)
- bfd *abfd;
- struct bfd_link_info *link_info;
+static void
+ppc_elf_begin_write_processing (bfd *abfd, struct bfd_link_info *link_info)
{
bfd *ibfd;
asection *asec;
@@ -5721,9 +5589,9 @@ ppc_elf_begin_write_processing (abfd, link_info)
if (strcmp (ptr + 12, APUINFO_LABEL) != 0)
goto fail;
- /* Get the number of apuinfo entries. */
+ /* Get the number of bytes used for apuinfo entries. */
datum = bfd_get_32 (ibfd, ptr + 4);
- if ((datum * 4 + 20) != length)
+ if (datum + 20 != length)
goto fail;
/* Make sure that we do not run off the end of the section. */
@@ -5731,8 +5599,8 @@ ppc_elf_begin_write_processing (abfd, link_info)
goto fail;
/* Scan the apuinfo section, building a list of apuinfo numbers. */
- for (i = 0; i < datum; i++)
- apuinfo_list_add (bfd_get_32 (ibfd, ptr + 20 + (i * 4)));
+ for (i = 0; i < datum; i += 4)
+ apuinfo_list_add (bfd_get_32 (ibfd, ptr + 20 + i));
/* Update the offset. */
offset += length;
@@ -5762,11 +5630,10 @@ ppc_elf_begin_write_processing (abfd, link_info)
/* Prevent the output section from accumulating the input sections'
contents. We have already stored this in our linked list structure. */
-bfd_boolean
-ppc_elf_write_section (abfd, asec, contents)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *asec;
- bfd_byte *contents ATTRIBUTE_UNUSED;
+static bfd_boolean
+ppc_elf_write_section (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *asec,
+ bfd_byte *contents ATTRIBUTE_UNUSED)
{
return (apuinfo_list_length ()
&& strcmp (asec->name, APUINFO_SECTION_NAME) == 0);
@@ -5775,10 +5642,8 @@ ppc_elf_write_section (abfd, asec, contents)
/* Finally we can generate the output section. */
-void
-ppc_elf_final_write_processing (abfd, linker)
- bfd *abfd;
- bfd_boolean linker ATTRIBUTE_UNUSED;
+static void
+ppc_elf_final_write_processing (bfd *abfd, bfd_boolean linker ATTRIBUTE_UNUSED)
{
bfd_byte *buffer;
asection *asec;
@@ -5808,7 +5673,7 @@ ppc_elf_final_write_processing (abfd, linker)
/* Create the apuinfo header. */
num_entries = apuinfo_list_length ();
bfd_put_32 (abfd, sizeof APUINFO_LABEL, buffer);
- bfd_put_32 (abfd, num_entries, buffer + 4);
+ bfd_put_32 (abfd, num_entries * 4, buffer + 4);
bfd_put_32 (abfd, 0x2, buffer + 8);
strcpy (buffer + 12, APUINFO_LABEL);
diff --git a/bfd/elf32-ppc.h b/bfd/elf32-ppc.h
index ead9c944d69..72be813a804 100644
--- a/bfd/elf32-ppc.h
+++ b/bfd/elf32-ppc.h
@@ -17,7 +17,5 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-bfd_boolean ppc_elf_tls_setup
- PARAMS ((bfd *, struct bfd_link_info *));
-bfd_boolean ppc_elf_tls_optimize
- PARAMS ((bfd *, struct bfd_link_info *));
+bfd_boolean ppc_elf_tls_setup (bfd *, struct bfd_link_info *);
+bfd_boolean ppc_elf_tls_optimize (bfd *, struct bfd_link_info *);
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
index 9475f60a669..50d430dba99 100644
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -895,7 +895,7 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
bfd_signed_vma *local_got_refcounts;
int tls_type, old_tls_type;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
htab = elf_s390_hash_table (info);
@@ -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;
@@ -2198,7 +2198,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
htab = elf_s390_hash_table (info);
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index 4ff31bfb695..af8dd6718a6 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -2034,7 +2034,7 @@ sh_elf_relax_section (abfd, sec, link_info, again)
*again = FALSE;
- if (link_info->relocateable
+ if (link_info->relocatable
|| (sec->flags & SEC_RELOC) == 0
|| sec->reloc_count == 0)
return TRUE;
@@ -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;
@@ -4650,9 +4650,9 @@ sh_elf_relocate_section (output_bfd, info, input_bfd, input_section,
(info,
_("Unexpected STO_SH5_ISA32 on local symbol is not handled"),
input_bfd, input_section, rel->r_offset));
- if (info->relocateable)
+ if (info->relocatable)
{
- /* This is a relocateable link. We don't have to change
+ /* This is a relocatable link. We don't have to change
anything, unless the reloc is against a section symbol,
in which case we have to adjust according to where the
section symbol winds up in the output section. */
@@ -4721,8 +4721,8 @@ sh_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
/* Section symbol are never (?) placed in the hash table, so
we can just ignore hash relocations when creating a
- relocateable object file. */
- if (info->relocateable)
+ relocatable object file. */
+ if (info->relocatable)
continue;
h = sym_hashes[r_symndx - symtab_hdr->sh_info];
@@ -5718,12 +5718,12 @@ sh_elf_relocate_section (output_bfd, info, input_bfd, input_section,
static bfd_byte *
sh_elf_get_relocated_section_contents (output_bfd, link_info, link_order,
- data, relocateable, symbols)
+ data, relocatable, symbols)
bfd *output_bfd;
struct bfd_link_info *link_info;
struct bfd_link_order *link_order;
bfd_byte *data;
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
asymbol **symbols;
{
Elf_Internal_Shdr *symtab_hdr;
@@ -5735,11 +5735,11 @@ sh_elf_get_relocated_section_contents (output_bfd, link_info, link_order,
/* We only need to handle the case of relaxing, or of having a
particular set of section contents, specially. */
- if (relocateable
+ if (relocatable
|| elf_section_data (input_section)->this_hdr.contents == NULL)
return bfd_generic_get_relocated_section_contents (output_bfd, link_info,
link_order, data,
- relocateable,
+ relocatable,
symbols);
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
@@ -6211,7 +6211,7 @@ sh_elf_check_relocs (abfd, info, sec, relocs)
srelgot = NULL;
sreloc = NULL;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
diff --git a/bfd/elf32-sh64.c b/bfd/elf32-sh64.c
index 1a2acc1c7c8..4728842ac0d 100644
--- a/bfd/elf32-sh64.c
+++ b/bfd/elf32-sh64.c
@@ -403,11 +403,11 @@ sh64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
{
struct elf_link_hash_entry *h;
- /* For relocateable links, we register the DataLabel sym in its own
+ /* For relocatable links, we register the DataLabel sym in its own
right, and tweak the name when it's output. Otherwise, we make
an indirect symbol of it. */
flagword flags
- = info->relocateable || info->emitrelocations
+ = info->relocatable || info->emitrelocations
? BSF_GLOBAL : BSF_GLOBAL | BSF_INDIRECT;
char *dl_name
@@ -451,9 +451,9 @@ sh64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
free (dl_name);
if (h->type != STT_DATALABEL
- || ((info->relocateable || info->emitrelocations)
+ || ((info->relocatable || info->emitrelocations)
&& h->root.type != bfd_link_hash_undefined)
- || (! info->relocateable && !info->emitrelocations
+ || (! info->relocatable && !info->emitrelocations
&& h->root.type != bfd_link_hash_indirect))
{
/* Make sure we don't get confused on invalid input. */
@@ -498,7 +498,7 @@ sh64_elf_link_output_symbol_hook (abfd, info, cname, sym, input_sec)
{
char *name = (char *) cname;
- if (info->relocateable || info->emitrelocations)
+ if (info->relocatable || info->emitrelocations)
{
if (ELF_ST_TYPE (sym->st_info) == STT_DATALABEL)
name[strlen (name) - strlen (DATALABEL_SUFFIX)] = 0;
diff --git a/bfd/elf32-sparc.c b/bfd/elf32-sparc.c
index e2c65448150..83d4c47187f 100644
--- a/bfd/elf32-sparc.c
+++ b/bfd/elf32-sparc.c
@@ -862,7 +862,7 @@ elf32_sparc_check_relocs (abfd, info, sec, relocs)
asection *sreloc;
bfd_boolean checked_tlsgd = FALSE;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
htab = elf32_sparc_hash_table (info);
@@ -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;
@@ -2126,7 +2126,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
htab = elf32_sparc_hash_table (info);
diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c
index 62bbbdacf21..e41d0c0d7c4 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 },
@@ -636,7 +652,7 @@ v850_elf_check_relocs (abfd, info, sec, relocs)
int other = 0;
const char *common = (const char *)0;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
#ifdef DEBUG
@@ -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;
@@ -1608,7 +1632,7 @@ v850_elf_relocate_section (output_bfd, info, input_bfd, input_section,
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
@@ -2496,7 +2520,7 @@ v850_elf_relax_section (abfd, sec, link_info, again)
*again = FALSE;
- if (link_info->relocateable
+ if (link_info->relocatable
|| (sec->flags & SEC_RELOC) == 0
|| sec->reloc_count == 0)
return TRUE;
diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c
index 1aca042c61c..3ad97478856 100644
--- a/bfd/elf32-vax.c
+++ b/bfd/elf32-vax.c
@@ -578,7 +578,7 @@ elf_vax_check_relocs (abfd, info, sec, relocs)
asection *srelgot;
asection *sreloc;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
dynobj = elf_hash_table (info)->dynobj;
@@ -1440,7 +1440,7 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section,
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
dynobj = elf_hash_table (info)->dynobj;
diff --git a/bfd/elf32-xstormy16.c b/bfd/elf32-xstormy16.c
index c05c186cbc2..af9a04882fe 100644
--- a/bfd/elf32-xstormy16.c
+++ b/bfd/elf32-xstormy16.c
@@ -1,5 +1,5 @@
/* XSTORMY16-specific support for 32-bit ELF.
- Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -423,7 +423,7 @@ xstormy16_elf_check_relocs (abfd, info, sec, relocs)
asection *splt;
bfd *dynobj;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
symtab_hdr = &elf_tdata(abfd)->symtab_hdr;
@@ -609,7 +609,7 @@ xstormy16_elf_relax_section (dynobj, splt, info, again)
/* Assume nothing changes. */
*again = FALSE;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
/* We only relax the .plt section at the moment. */
@@ -739,7 +739,7 @@ xstormy16_elf_always_size_sections (output_bfd, info)
bfd *dynobj;
asection *splt;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
dynobj = elf_hash_table (info)->dynobj;
@@ -766,7 +766,7 @@ xstormy16_elf_always_size_sections (output_bfd, info)
zero.
This function is responsible for adjusting the section contents as
- necessary, and (if using Rela relocs and generating a relocateable
+ necessary, and (if using Rela relocs and generating a relocatable
output file) adjusting the reloc addend as necessary.
This function does not have to worry about setting the reloc
@@ -780,7 +780,7 @@ xstormy16_elf_always_size_sections (output_bfd, info)
The global hash table entry for the global symbols can be found
via elf_sym_hashes (input_bfd).
- When generating relocateable output, this function must handle
+ When generating relocatable output, this function must handle
STB_LOCAL/STT_SECTION symbols specially. The output symbol is
going to be the section symbol corresponding to the output
section, which means that the addend must be adjusted
@@ -805,7 +805,7 @@ xstormy16_elf_relocate_section (output_bfd, info, input_bfd, input_section,
bfd *dynobj;
asection *splt;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
index b277540107c..1f8d86de223 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -127,7 +127,7 @@ static char *build_encoding_error_message
PARAMS ((xtensa_opcode, xtensa_encode_result));
static bfd_reloc_status_type bfd_elf_xtensa_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static void do_fix_for_relocateable_link
+static void do_fix_for_relocatable_link
PARAMS ((Elf_Internal_Rela *, bfd *, asection *));
static void do_fix_for_final_link
PARAMS ((Elf_Internal_Rela *, asection *, bfd_vma *));
@@ -609,7 +609,7 @@ elf_xtensa_check_relocs (abfd, info, sec, relocs)
property_table_entry *lit_table;
int ltblsize;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -1662,7 +1662,7 @@ bfd_elf_xtensa_reloc (abfd, reloc_entry, symbol, data, input_section,
asection *reloc_target_output_section;
bfd_boolean is_weak_undef;
- /* ELF relocs are against symbols. If we are producing relocateable
+ /* ELF relocs are against symbols. If we are producing relocatable
output, and the reloc is against an external symbol, the resulting
reloc will also be against the same symbol. In such a case, we
don't want to change anything about the way the reloc is handled,
@@ -1841,7 +1841,7 @@ xtensa_elf_dynamic_symbol_p (info, h)
/* Relocate an Xtensa ELF section. This is invoked by the linker for
- both relocateable and final links. */
+ both relocatable and final links. */
static bfd_boolean
elf_xtensa_relocate_section (output_bfd, info, input_bfd,
@@ -1909,9 +1909,9 @@ elf_xtensa_relocate_section (output_bfd, info, input_bfd,
r_symndx = ELF32_R_SYM (rel->r_info);
- if (info->relocateable)
+ if (info->relocatable)
{
- /* This is a relocateable link.
+ /* This is a relocatable link.
1) If the reloc is against a section symbol, adjust
according to the output section.
2) If there is a new target for this relocation,
@@ -1922,7 +1922,7 @@ elf_xtensa_relocate_section (output_bfd, info, input_bfd,
if (relaxing_section)
{
/* Check if this references a section in another input file. */
- do_fix_for_relocateable_link (rel, input_bfd, input_section);
+ do_fix_for_relocatable_link (rel, input_bfd, input_section);
r_type = ELF32_R_TYPE (rel->r_info);
}
@@ -1934,7 +1934,7 @@ elf_xtensa_relocate_section (output_bfd, info, input_bfd,
r_type = ELF32_R_TYPE (rel->r_info);
}
- /* This is a relocateable link, so we don't have to change
+ /* This is a relocatable link, so we don't have to change
anything unless the reloc is against a section symbol,
in which case we have to adjust according to where the
section symbol winds up in the output section. */
@@ -1950,7 +1950,7 @@ elf_xtensa_relocate_section (output_bfd, info, input_bfd,
/* If there is an addend with a partial_inplace howto,
then move the addend to the contents. This is a hack
- to work around problems with DWARF in relocateable links
+ to work around problems with DWARF in relocatable links
with some previous version of BFD. Now we can't easily get
rid of the hack without breaking backward compatibility.... */
if (rel->r_addend)
@@ -1973,7 +1973,7 @@ elf_xtensa_relocate_section (output_bfd, info, input_bfd,
}
}
- /* Done with work for relocateable link; continue with next reloc. */
+ /* Done with work for relocatable link; continue with next reloc. */
continue;
}
@@ -2465,7 +2465,7 @@ elf_xtensa_finish_dynamic_sections (output_bfd, info)
}
/* Combine adjacent literal table entries. */
- BFD_ASSERT (! info->relocateable);
+ BFD_ASSERT (! info->relocatable);
num_xtlit_entries = elf_xtensa_combine_prop_entries (output_bfd, ".xt.lit");
if (num_xtlit_entries < 0)
return FALSE;
@@ -4431,10 +4431,10 @@ is_resolvable_asm_expansion (abfd, sec, contents, irel, link_info,
if (!target_sec->output_section)
return FALSE;
- /* For relocateable sections, we can only simplify when the output
+ /* For relocatable sections, we can only simplify when the output
section of the target is the same as the output section of the
source. */
- if (link_info->relocateable
+ if (link_info->relocatable
&& (target_sec->output_section != sec->output_section))
return FALSE;
@@ -5345,7 +5345,7 @@ relax_section_symbols (abfd, sec)
/* "Fix" handling functions, called while performing relocations. */
static void
-do_fix_for_relocateable_link (rel, input_bfd, input_section)
+do_fix_for_relocatable_link (rel, input_bfd, input_section)
Elf_Internal_Rela *rel;
bfd *input_bfd;
asection *input_section;
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c
index 9ce3bf3b56a..767d89c4072 100644
--- a/bfd/elf64-alpha.c
+++ b/bfd/elf64-alpha.c
@@ -2058,7 +2058,7 @@ elf64_alpha_relax_section (abfd, sec, link_info, again)
/* We are not currently changing any sizes, so only one pass. */
*again = FALSE;
- if (link_info->relocateable
+ if (link_info->relocatable
|| (sec->flags & SEC_RELOC) == 0
|| sec->reloc_count == 0)
return TRUE;
@@ -2465,7 +2465,7 @@ elf64_alpha_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
bfd_vma *valp;
{
if (sym->st_shndx == SHN_COMMON
- && !info->relocateable
+ && !info->relocatable
&& sym->st_size <= elf_gp_size (abfd))
{
/* Common symbols less than or equal to -G nn bytes are
@@ -3057,7 +3057,7 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
bfd_boolean got_created;
bfd_size_type amt;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
dynobj = elf_hash_table(info)->dynobj;
@@ -3863,7 +3863,7 @@ elf64_alpha_always_size_sections (output_bfd, info)
{
bfd *i;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
/* First, take care of the indirect symbols created by versioning. */
@@ -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;
@@ -4330,7 +4330,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
const char *section_name;
/* Handle relocatable links with a smaller loop. */
- if (info->relocateable)
+ if (info->relocatable)
return elf64_alpha_relocate_section_r (output_bfd, info, input_bfd,
input_section, contents, relocs,
local_syms, local_sections);
diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c
index 8ce5b20f3f7..4c88a543a37 100644
--- a/bfd/elf64-hppa.c
+++ b/bfd/elf64-hppa.c
@@ -599,7 +599,7 @@ elf64_hppa_check_relocs (abfd, info, sec, relocs)
size_t buf_len;
int sec_symndx;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
/* If this is the first dynamic object found in the link, create
diff --git a/bfd/elf64-mips.c b/bfd/elf64-mips.c
index a43b3da9f70..bec1acaa1c3 100644
--- a/bfd/elf64-mips.c
+++ b/bfd/elf64-mips.c
@@ -1447,15 +1447,17 @@ mips_elf64_hi16_reloc (abfd, reloc_entry, symbol, data, input_section,
want to change anything. */
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
- && (! reloc_entry->howto->partial_inplace
- || reloc_entry->addend == 0))
+ && (symbol->flags & BSF_LOCAL) != 0)
{
reloc_entry->address += input_section->output_offset;
return bfd_reloc_ok;
}
- if (((reloc_entry->addend & 0xffff) + 0x8000) & ~0xffff)
- reloc_entry->addend += 0x8000;
+ if (reloc_entry->howto->partial_inplace)
+ {
+ if (((reloc_entry->addend & 0xffff) + 0x8000) & ~0xffff)
+ reloc_entry->addend += 0x8000;
+ }
return bfd_reloc_continue;
}
@@ -1488,7 +1490,8 @@ mips_elf64_got16_reloc (abfd, reloc_entry, symbol, data, input_section,
/* If we're relocating, and this is a local symbol, we can handle it
just like an R_MIPS_HI16. */
if (output_bfd != (bfd *) NULL
- && (symbol->flags & BSF_SECTION_SYM) != 0)
+ && ((symbol->flags & BSF_SECTION_SYM) != 0
+ || (symbol->flags & BSF_LOCAL) == 0))
return mips_elf64_hi16_reloc (abfd, reloc_entry, symbol, data,
input_section, output_bfd, error_message);
@@ -1553,18 +1556,18 @@ mips_elf64_assign_gp (output_bfd, pgp)
symbol value correctly. We look up the symbol _gp in the output
BFD. If we can't find it, we're stuck. We cache it in the ELF
target data. We don't need to adjust the symbol value for an
- external symbol if we are producing relocateable output. */
+ external symbol if we are producing relocatable output. */
static bfd_reloc_status_type
-mips_elf64_final_gp (output_bfd, symbol, relocateable, error_message, pgp)
+mips_elf64_final_gp (output_bfd, symbol, relocatable, error_message, pgp)
bfd *output_bfd;
asymbol *symbol;
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
char **error_message;
bfd_vma *pgp;
{
if (bfd_is_und_section (symbol->section)
- && ! relocateable)
+ && ! relocatable)
{
*pgp = 0;
return bfd_reloc_undefined;
@@ -1572,10 +1575,10 @@ mips_elf64_final_gp (output_bfd, symbol, relocateable, error_message, pgp)
*pgp = _bfd_get_gp_value (output_bfd);
if (*pgp == 0
- && (! relocateable
+ && (! relocatable
|| (symbol->flags & BSF_SECTION_SYM) != 0))
{
- if (relocateable)
+ if (relocatable)
{
/* Make up a value. */
*pgp = symbol->section->output_section->vma /*+ 0x4000*/;
@@ -1606,38 +1609,35 @@ mips_elf64_gprel16_reloc (abfd, reloc_entry, symbol, data, input_section,
bfd *output_bfd;
char **error_message;
{
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
bfd_reloc_status_type ret;
bfd_vma gp;
- /* If we're relocating, and this is an external symbol with no
- addend, we don't want to change anything. We will only have an
- addend if this is a newly created reloc, not read from an ELF
- file. */
+ /* If we're relocating, and this is an external symbol, we don't want
+ to change anything. */
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
- && (! reloc_entry->howto->partial_inplace
- || reloc_entry->addend == 0))
+ && (symbol->flags & BSF_LOCAL) != 0)
{
reloc_entry->address += input_section->output_offset;
return bfd_reloc_ok;
}
if (output_bfd != (bfd *) NULL)
- relocateable = TRUE;
+ relocatable = TRUE;
else
{
- relocateable = FALSE;
+ relocatable = FALSE;
output_bfd = symbol->section->output_section->owner;
}
- ret = mips_elf64_final_gp (output_bfd, symbol, relocateable, error_message,
+ ret = mips_elf64_final_gp (output_bfd, symbol, relocatable, error_message,
&gp);
if (ret != bfd_reloc_ok)
return ret;
return _bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry,
- input_section, relocateable,
+ input_section, relocatable,
data, gp);
}
@@ -1654,7 +1654,7 @@ mips_elf64_literal_reloc (abfd, reloc_entry, symbol, data, input_section,
bfd *output_bfd;
char **error_message;
{
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
bfd_reloc_status_type ret;
bfd_vma gp;
@@ -1662,8 +1662,7 @@ mips_elf64_literal_reloc (abfd, reloc_entry, symbol, data, input_section,
want to change anything. */
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
- && (! reloc_entry->howto->partial_inplace
- || reloc_entry->addend == 0))
+ && (symbol->flags & BSF_LOCAL) != 0)
{
reloc_entry->address += input_section->output_offset;
return bfd_reloc_ok;
@@ -1671,20 +1670,20 @@ mips_elf64_literal_reloc (abfd, reloc_entry, symbol, data, input_section,
/* FIXME: The entries in the .lit8 and .lit4 sections should be merged. */
if (output_bfd != (bfd *) NULL)
- relocateable = TRUE;
+ relocatable = TRUE;
else
{
- relocateable = FALSE;
+ relocatable = FALSE;
output_bfd = symbol->section->output_section->owner;
}
- ret = mips_elf64_final_gp (output_bfd, symbol, relocateable, error_message,
+ ret = mips_elf64_final_gp (output_bfd, symbol, relocatable, error_message,
&gp);
if (ret != bfd_reloc_ok)
return ret;
return _bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry,
- input_section, relocateable,
+ input_section, relocatable,
data, gp);
}
@@ -1702,19 +1701,17 @@ mips_elf64_gprel32_reloc (abfd, reloc_entry, symbol, data, input_section,
bfd *output_bfd;
char **error_message;
{
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
bfd_reloc_status_type ret;
bfd_vma gp;
bfd_vma relocation;
- unsigned long val;
+ bfd_vma val;
- /* If we're relocating, and this is an external symbol with no
- addend, we don't want to change anything. We will only have an
- addend if this is a newly created reloc, not read from an ELF
- file. */
+ /* If we're relocating, and this is an external symbol, we don't want
+ to change anything. */
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
- && reloc_entry->addend == 0)
+ && (symbol->flags & BSF_LOCAL) != 0)
{
*error_message = (char *)
_("32bits gp relative relocation occurs for an external symbol");
@@ -1722,21 +1719,18 @@ mips_elf64_gprel32_reloc (abfd, reloc_entry, symbol, data, input_section,
}
if (output_bfd != (bfd *) NULL)
- {
- relocateable = TRUE;
- gp = _bfd_get_gp_value (output_bfd);
- }
+ relocatable = TRUE;
else
{
- relocateable = FALSE;
+ relocatable = FALSE;
output_bfd = symbol->section->output_section->owner;
-
- ret = mips_elf64_final_gp (output_bfd, symbol, relocateable,
- error_message, &gp);
- if (ret != bfd_reloc_ok)
- return ret;
}
+ ret = mips_elf64_final_gp (output_bfd, symbol, relocatable,
+ error_message, &gp);
+ if (ret != bfd_reloc_ok)
+ return ret;
+
if (bfd_is_com_section (symbol->section))
relocation = 0;
else
@@ -1748,27 +1742,25 @@ mips_elf64_gprel32_reloc (abfd, reloc_entry, symbol, data, input_section,
if (reloc_entry->address > input_section->_cooked_size)
return bfd_reloc_outofrange;
- if (reloc_entry->howto->src_mask == 0)
- {
- /* This case arises with the 64-bit MIPS ELF ABI. */
- val = 0;
- }
- else
- val = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
-
/* Set val to the offset into the section or symbol. */
- val += reloc_entry->addend;
+ val = reloc_entry->addend;
+
+ if (reloc_entry->howto->partial_inplace)
+ val += bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
/* Adjust val for the final section location and GP value. If we
- are producing relocateable output, we don't want to do this for
+ are producing relocatable output, we don't want to do this for
an external symbol. */
- if (! relocateable
+ if (! relocatable
|| (symbol->flags & BSF_SECTION_SYM) != 0)
val += relocation - gp;
- bfd_put_32 (abfd, val, (bfd_byte *) data + reloc_entry->address);
+ if (reloc_entry->howto->partial_inplace)
+ bfd_put_32 (abfd, val, (bfd_byte *) data + reloc_entry->address);
+ else
+ reloc_entry->addend = val;
- if (relocateable)
+ if (relocatable)
reloc_entry->address += input_section->output_offset;
return bfd_reloc_ok;
@@ -1792,15 +1784,17 @@ mips_elf64_shift6_reloc (abfd, reloc_entry, symbol, data, input_section,
want to change anything. */
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
- && (! reloc_entry->howto->partial_inplace
- || reloc_entry->addend == 0))
+ && (symbol->flags & BSF_LOCAL) != 0)
{
reloc_entry->address += input_section->output_offset;
return bfd_reloc_ok;
}
- reloc_entry->addend = (reloc_entry->addend & 0x00007c0)
- | (reloc_entry->addend & 0x00000800) >> 9;
+ if (reloc_entry->howto->partial_inplace)
+ {
+ reloc_entry->addend = ((reloc_entry->addend & 0x00007c0)
+ | (reloc_entry->addend & 0x00000800) >> 9);
+ }
return bfd_reloc_continue;
}
@@ -1854,33 +1848,33 @@ mips16_gprel_reloc (abfd, reloc_entry, symbol, data, input_section,
bfd *output_bfd;
char **error_message;
{
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
bfd_reloc_status_type ret;
bfd_vma gp;
- unsigned short extend, insn;
- unsigned long final;
+ unsigned short extend = 0;
+ unsigned short insn = 0;
+ bfd_signed_vma val;
+ bfd_vma relocation;
/* If we're relocating, and this is an external symbol with no
- addend, we don't want to change anything. We will only have an
- addend if this is a newly created reloc, not read from an ELF
- file. */
+ addend, we don't want to change anything. */
if (output_bfd != NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
- && reloc_entry->addend == 0)
+ && (symbol->flags & BSF_LOCAL) != 0)
{
reloc_entry->address += input_section->output_offset;
return bfd_reloc_ok;
}
if (output_bfd != NULL)
- relocateable = TRUE;
+ relocatable = TRUE;
else
{
- relocateable = FALSE;
+ relocatable = FALSE;
output_bfd = symbol->section->output_section->owner;
}
- ret = mips_elf64_final_gp (output_bfd, symbol, relocateable, error_message,
+ ret = mips_elf64_final_gp (output_bfd, symbol, relocatable, error_message,
&gp);
if (ret != bfd_reloc_ok)
return ret;
@@ -1888,33 +1882,55 @@ mips16_gprel_reloc (abfd, reloc_entry, symbol, data, input_section,
if (reloc_entry->address > input_section->_cooked_size)
return bfd_reloc_outofrange;
- /* Pick up the mips16 extend instruction and the real instruction. */
- extend = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address);
- insn = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address + 2);
-
- /* Stuff the current addend back as a 32 bit value, do the usual
- relocation, and then clean up. */
- bfd_put_32 (abfd,
- (bfd_vma) (((extend & 0x1f) << 11)
- | (extend & 0x7e0)
- | (insn & 0x1f)),
- (bfd_byte *) data + reloc_entry->address);
-
- ret = _bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry,
- input_section, relocateable, data, gp);
-
- final = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
- bfd_put_16 (abfd,
- (bfd_vma) ((extend & 0xf800)
- | ((final >> 11) & 0x1f)
- | (final & 0x7e0)),
- (bfd_byte *) data + reloc_entry->address);
- bfd_put_16 (abfd,
- (bfd_vma) ((insn & 0xffe0)
- | (final & 0x1f)),
- (bfd_byte *) data + reloc_entry->address + 2);
+ if (bfd_is_com_section (symbol->section))
+ relocation = 0;
+ else
+ relocation = symbol->value;
- return ret;
+ relocation += symbol->section->output_section->vma;
+ relocation += symbol->section->output_offset;
+
+ /* Set val to the offset into the section or symbol. */
+ val = reloc_entry->addend;
+
+ if (reloc_entry->howto->partial_inplace)
+ {
+ /* Pick up the mips16 extend instruction and the real instruction. */
+ extend = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address);
+ insn = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address + 2);
+ val += ((extend & 0x1f) << 11) | (extend & 0x7e0) | (insn & 0x1f);
+ }
+
+ _bfd_mips_elf_sign_extend(val, 16);
+
+ /* Adjust val for the final section location and GP value. If we
+ are producing relocatable output, we don't want to do this for
+ an external symbol. */
+ if (! relocatable
+ || (symbol->flags & BSF_SECTION_SYM) != 0)
+ val += relocation - gp;
+
+ if (reloc_entry->howto->partial_inplace)
+ {
+ bfd_put_16 (abfd,
+ (bfd_vma) ((extend & 0xf800)
+ | ((val >> 11) & 0x1f)
+ | (val & 0x7e0)),
+ (bfd_byte *) data + reloc_entry->address);
+ bfd_put_16 (abfd,
+ (bfd_vma) ((insn & 0xffe0)
+ | (val & 0x1f)),
+ (bfd_byte *) data + reloc_entry->address + 2);
+ }
+ else
+ reloc_entry->addend = val;
+
+ if (relocatable)
+ reloc_entry->address += input_section->output_offset;
+ else if (((val & ~0xffff) != ~0xffff) && ((val & ~0xffff) != 0))
+ return bfd_reloc_overflow;
+
+ return bfd_reloc_ok;
}
/* A mapping from BFD reloc types to MIPS ELF reloc types. */
diff --git a/bfd/elf64-mmix.c b/bfd/elf64-mmix.c
index d0213e6a493..54c4ca892b8 100644
--- a/bfd/elf64-mmix.c
+++ b/bfd/elf64-mmix.c
@@ -1229,9 +1229,9 @@ mmix_elf_relocate_section (output_bfd, info, input_bfd, input_section,
r_symndx = ELF64_R_SYM (rel->r_info);
- if (info->relocateable)
+ if (info->relocatable)
{
- /* This is a relocateable link. We don't have to change
+ /* This is a relocatable link. We don't have to change
anything, unless the reloc is against a section symbol,
in which case we have to adjust according to where the
section symbol winds up in the output section. */
@@ -1669,7 +1669,7 @@ mmix_elf_check_common_relocs (abfd, info, sec, relocs)
const Elf_Internal_Rela *rel;
const Elf_Internal_Rela *rel_end;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
/* We currently have to abuse this COFF-specific member, since there's
@@ -1780,7 +1780,7 @@ mmix_elf_check_relocs (abfd, info, sec, relocs)
const Elf_Internal_Rela *rel;
const Elf_Internal_Rela *rel_end;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -2352,10 +2352,10 @@ mmix_elf_relax_section (abfd, sec, link_info, again)
if (sec->_cooked_size == 0)
sec->_cooked_size = sec->_raw_size;
- /* We don't have to do anything for a relocateable link, if
+ /* We don't have to do anything for a relocatable link, if
this section does not have relocs, or if this is not a
code section. */
- if (link_info->relocateable
+ if (link_info->relocatable
|| (sec->flags & SEC_RELOC) == 0
|| sec->reloc_count == 0
|| (sec->flags & SEC_CODE) == 0
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index f32d261fe6e..bc331c8be66 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -15,12 +15,13 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-/* This file is based on the 64-bit PowerPC ELF ABI. It is also based
- on the file elf32-ppc.c. */
+/* The 64-bit PowerPC ELF ABI may be found at
+ http://www.linuxbase.org/spec/ELF/ppc64/PPC-elf64abi.txt, and
+ http://www.linuxbase.org/spec/ELF/ppc64/spec/book1.html */
#include "bfd.h"
#include "sysdep.h"
@@ -30,36 +31,65 @@
#include "elf/ppc64.h"
#include "elf64-ppc.h"
-static void ppc_howto_init
- PARAMS ((void));
-static reloc_howto_type *ppc64_elf_reloc_type_lookup
- PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
-static void ppc64_elf_info_to_howto
- PARAMS ((bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst));
static bfd_reloc_status_type ppc64_elf_ha_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_reloc_status_type ppc64_elf_brtaken_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_reloc_status_type ppc64_elf_sectoff_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_reloc_status_type ppc64_elf_sectoff_ha_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_reloc_status_type ppc64_elf_toc_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_reloc_status_type ppc64_elf_toc_ha_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_reloc_status_type ppc64_elf_toc64_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_reloc_status_type ppc64_elf_unhandled_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static bfd_boolean ppc64_elf_object_p
- PARAMS ((bfd *));
-static bfd_boolean ppc64_elf_merge_private_bfd_data
- PARAMS ((bfd *, bfd *));
-static bfd_boolean ppc64_elf_new_section_hook
- PARAMS ((bfd *, asection *));
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
+#define TARGET_LITTLE_SYM bfd_elf64_powerpcle_vec
+#define TARGET_LITTLE_NAME "elf64-powerpcle"
+#define TARGET_BIG_SYM bfd_elf64_powerpc_vec
+#define TARGET_BIG_NAME "elf64-powerpc"
+#define ELF_ARCH bfd_arch_powerpc
+#define ELF_MACHINE_CODE EM_PPC64
+#define ELF_MAXPAGESIZE 0x10000
+#define elf_info_to_howto ppc64_elf_info_to_howto
+
+#define elf_backend_want_got_sym 0
+#define elf_backend_want_plt_sym 0
+#define elf_backend_plt_alignment 3
+#define elf_backend_plt_not_loaded 1
+#define elf_backend_got_symbol_offset 0
+#define elf_backend_got_header_size 8
+#define elf_backend_plt_header_size PLT_INITIAL_ENTRY_SIZE
+#define elf_backend_can_gc_sections 1
+#define elf_backend_can_refcount 1
+#define elf_backend_rela_normal 1
+
+#define bfd_elf64_bfd_reloc_type_lookup ppc64_elf_reloc_type_lookup
+#define bfd_elf64_bfd_merge_private_bfd_data ppc64_elf_merge_private_bfd_data
+#define bfd_elf64_new_section_hook ppc64_elf_new_section_hook
+#define bfd_elf64_bfd_link_hash_table_create ppc64_elf_link_hash_table_create
+#define bfd_elf64_bfd_link_hash_table_free ppc64_elf_link_hash_table_free
+
+#define elf_backend_object_p ppc64_elf_object_p
+#define elf_backend_create_dynamic_sections ppc64_elf_create_dynamic_sections
+#define elf_backend_copy_indirect_symbol ppc64_elf_copy_indirect_symbol
+#define elf_backend_check_relocs ppc64_elf_check_relocs
+#define elf_backend_gc_mark_hook ppc64_elf_gc_mark_hook
+#define elf_backend_gc_sweep_hook ppc64_elf_gc_sweep_hook
+#define elf_backend_adjust_dynamic_symbol ppc64_elf_adjust_dynamic_symbol
+#define elf_backend_hide_symbol ppc64_elf_hide_symbol
+#define elf_backend_always_size_sections ppc64_elf_func_desc_adjust
+#define elf_backend_size_dynamic_sections ppc64_elf_size_dynamic_sections
+#define elf_backend_relocate_section ppc64_elf_relocate_section
+#define elf_backend_finish_dynamic_symbol ppc64_elf_finish_dynamic_symbol
+#define elf_backend_reloc_type_class ppc64_elf_reloc_type_class
+#define elf_backend_finish_dynamic_sections ppc64_elf_finish_dynamic_sections
+
/* The name of the dynamic interpreter. This is put in the .interp
section. */
#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
@@ -77,7 +107,10 @@ static bfd_boolean ppc64_elf_new_section_hook
#define TP_OFFSET 0x7000
#define DTP_OFFSET 0x8000
-/* .plt call stub instructions. */
+/* .plt call stub instructions. The normal stub is like this, but
+ sometimes the .plt entry crosses a 64k boundary and we need to
+ insert an addis to adjust r12. */
+#define PLT_CALL_STUB_SIZE (7*4)
#define ADDIS_R12_R2 0x3d820000 /* addis %r12,%r2,xxx@ha */
#define STD_R2_40R1 0xf8410028 /* std %r2,40(%r1) */
#define LD_R11_0R12 0xe96c0000 /* ld %r11,xxx+0@l(%r12) */
@@ -86,19 +119,31 @@ static bfd_boolean ppc64_elf_new_section_hook
/* ld %r11,xxx+16@l(%r12) */
#define BCTR 0x4e800420 /* bctr */
-/* The normal stub is this size. */
-#define PLT_CALL_STUB_SIZE (7*4)
-
-/* But sometimes the .plt entry crosses a 64k boundary, and we need
- to adjust the high word with this insn. */
-#define ADDIS_R12_R12_1 0x3d8c0001 /* addis %r12,%r12,1 */
-
-/* The .glink fixup call stub is the same as the .plt call stub, but
- the first instruction restores r2, and the std is omitted. */
-#define LD_R2_40R1 0xe8410028 /* ld %r2,40(%r1) */
-/* Always allow this much space. */
-#define GLINK_CALL_STUB_SIZE (8*4)
+#define ADDIS_R2_R2 0x3c420000 /* addis %r2,%r2,off@ha */
+#define ADDI_R2_R2 0x38420000 /* addi %r2,%r2,off@l */
+
+#define LD_R2_40R1 0xe8410028 /* ld %r2,40(%r1) */
+
+/* glink call stub instructions. We enter with the index in R0, and the
+ address of glink entry in CTR. From that, we can calculate PLT0. */
+#define GLINK_CALL_STUB_SIZE (16*4)
+#define MFCTR_R12 0x7d8902a6 /* mfctr %r12 */
+#define SLDI_R11_R0_3 0x780b1f24 /* sldi %r11,%r0,3 */
+#define ADDIC_R2_R0_32K 0x34408000 /* addic. %r2,%r0,-32768 */
+#define SUB_R12_R12_R11 0x7d8b6050 /* sub %r12,%r12,%r11 */
+#define SRADI_R2_R2_63 0x7c42fe76 /* sradi %r2,%r2,63 */
+#define SLDI_R11_R0_2 0x780b1764 /* sldi %r11,%r0,2 */
+#define AND_R2_R2_R11 0x7c425838 /* and %r2,%r2,%r11 */
+ /* sub %r12,%r12,%r11 */
+#define ADD_R12_R12_R2 0x7d8c1214 /* add %r12,%r12,%r2 */
+#define ADDIS_R12_R12 0x3d8c0000 /* addis %r12,%r12,xxx@ha */
+ /* ld %r11,xxx@l(%r12) */
+#define ADDI_R12_R12 0x398c0000 /* addi %r12,%r12,xxx@l */
+ /* ld %r2,8(%r12) */
+ /* mtctr %r11 */
+ /* ld %r11,16(%r12) */
+ /* bctr */
/* Pad with this. */
#define NOP 0x60000000
@@ -1718,7 +1763,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
"R_PPC64_GOT_TPREL16_DS", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
- 0xffff, /* dst_mask */
+ 0xfffc, /* dst_mask */
FALSE), /* pcrel_offset */
/* Like GOT_TPREL16_DS, but no overflow. */
@@ -1733,7 +1778,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
"R_PPC64_GOT_TPREL16_LO_DS", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
- 0xffff, /* dst_mask */
+ 0xfffc, /* dst_mask */
FALSE), /* pcrel_offset */
/* Like GOT_TPREL16_LO_DS, but next higher group of 16 bits. */
@@ -1802,7 +1847,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
be done. */
static void
-ppc_howto_init ()
+ppc_howto_init (void)
{
unsigned int i, type;
@@ -1818,9 +1863,8 @@ ppc_howto_init ()
}
static reloc_howto_type *
-ppc64_elf_reloc_type_lookup (abfd, code)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_reloc_code_real_type code;
+ppc64_elf_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_reloc_code_real_type code)
{
enum elf_ppc64_reloc_type r = R_PPC64_NONE;
@@ -1828,10 +1872,10 @@ ppc64_elf_reloc_type_lookup (abfd, code)
/* Initialize howto table if needed. */
ppc_howto_init ();
- switch ((int) code)
+ switch (code)
{
default:
- return (reloc_howto_type *) NULL;
+ return NULL;
case BFD_RELOC_NONE: r = R_PPC64_NONE;
break;
@@ -2037,16 +2081,14 @@ ppc64_elf_reloc_type_lookup (abfd, code)
break;
}
- return ppc64_elf_howto_table[(int) r];
+ return ppc64_elf_howto_table[r];
};
/* Set the howto pointer for a PowerPC ELF reloc. */
static void
-ppc64_elf_info_to_howto (abfd, cache_ptr, dst)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *cache_ptr;
- Elf_Internal_Rela *dst;
+ppc64_elf_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr,
+ Elf_Internal_Rela *dst)
{
unsigned int type;
@@ -2063,15 +2105,9 @@ ppc64_elf_info_to_howto (abfd, cache_ptr, dst)
/* Handle the R_PPC64_ADDR16_HA and similar relocs. */
static bfd_reloc_status_type
-ppc64_elf_ha_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message;
+ppc64_elf_ha_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
+ void *data, asection *input_section,
+ bfd *output_bfd, char **error_message)
{
/* If this is a relocatable link (output_bfd test tells us), just
call the generic function. Any adjustment will be done at final
@@ -2088,15 +2124,9 @@ ppc64_elf_ha_reloc (abfd, reloc_entry, symbol, data,
}
static bfd_reloc_status_type
-ppc64_elf_brtaken_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message;
+ppc64_elf_brtaken_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
+ void *data, asection *input_section,
+ bfd *output_bfd, char **error_message)
{
long insn;
enum elf_ppc64_reloc_type r_type;
@@ -2114,7 +2144,7 @@ ppc64_elf_brtaken_reloc (abfd, reloc_entry, symbol, data,
octets = reloc_entry->address * bfd_octets_per_byte (abfd);
insn = bfd_get_32 (abfd, (bfd_byte *) data + octets);
insn &= ~(0x01 << 21);
- r_type = (enum elf_ppc64_reloc_type) reloc_entry->howto->type;
+ r_type = reloc_entry->howto->type;
if (r_type == R_PPC64_ADDR14_BRTAKEN
|| r_type == R_PPC64_REL14_BRTAKEN)
insn |= 0x01 << 21; /* 'y' or 't' bit, lowest bit of BO field. */
@@ -2150,20 +2180,14 @@ ppc64_elf_brtaken_reloc (abfd, reloc_entry, symbol, data,
if ((bfd_signed_vma) (target - from) < 0)
insn ^= 0x01 << 21;
}
- bfd_put_32 (abfd, (bfd_vma) insn, (bfd_byte *) data + octets);
+ bfd_put_32 (abfd, insn, (bfd_byte *) data + octets);
return bfd_reloc_continue;
}
static bfd_reloc_status_type
-ppc64_elf_sectoff_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message;
+ppc64_elf_sectoff_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
+ void *data, asection *input_section,
+ bfd *output_bfd, char **error_message)
{
/* If this is a relocatable link (output_bfd test tells us), just
call the generic function. Any adjustment will be done at final
@@ -2178,15 +2202,9 @@ ppc64_elf_sectoff_reloc (abfd, reloc_entry, symbol, data,
}
static bfd_reloc_status_type
-ppc64_elf_sectoff_ha_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message;
+ppc64_elf_sectoff_ha_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
+ void *data, asection *input_section,
+ bfd *output_bfd, char **error_message)
{
/* If this is a relocatable link (output_bfd test tells us), just
call the generic function. Any adjustment will be done at final
@@ -2204,15 +2222,9 @@ ppc64_elf_sectoff_ha_reloc (abfd, reloc_entry, symbol, data,
}
static bfd_reloc_status_type
-ppc64_elf_toc_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message;
+ppc64_elf_toc_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
+ void *data, asection *input_section,
+ bfd *output_bfd, char **error_message)
{
bfd_vma TOCstart;
@@ -2233,15 +2245,9 @@ ppc64_elf_toc_reloc (abfd, reloc_entry, symbol, data,
}
static bfd_reloc_status_type
-ppc64_elf_toc_ha_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message;
+ppc64_elf_toc_ha_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
+ void *data, asection *input_section,
+ bfd *output_bfd, char **error_message)
{
bfd_vma TOCstart;
@@ -2265,15 +2271,9 @@ ppc64_elf_toc_ha_reloc (abfd, reloc_entry, symbol, data,
}
static bfd_reloc_status_type
-ppc64_elf_toc64_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message;
+ppc64_elf_toc64_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
+ void *data, asection *input_section,
+ bfd *output_bfd, char **error_message)
{
bfd_vma TOCstart;
bfd_size_type octets;
@@ -2295,15 +2295,9 @@ ppc64_elf_toc64_reloc (abfd, reloc_entry, symbol, data,
}
static bfd_reloc_status_type
-ppc64_elf_unhandled_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message;
+ppc64_elf_unhandled_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
+ void *data, asection *input_section,
+ bfd *output_bfd, char **error_message)
{
/* If this is a relocatable link (output_bfd test tells us), just
call the generic function. Any adjustment will be done at final
@@ -2326,8 +2320,7 @@ ppc64_elf_unhandled_reloc (abfd, reloc_entry, symbol, data,
default is 32 bit. */
static bfd_boolean
-ppc64_elf_object_p (abfd)
- bfd *abfd;
+ppc64_elf_object_p (bfd *abfd)
{
if (abfd->arch_info->the_default && abfd->arch_info->bits_per_word == 32)
{
@@ -2347,9 +2340,7 @@ ppc64_elf_object_p (abfd)
object file when linking. */
static bfd_boolean
-ppc64_elf_merge_private_bfd_data (ibfd, obfd)
- bfd *ibfd;
- bfd *obfd;
+ppc64_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
{
/* Check if we have the same endianess. */
if (ibfd->xvec->byteorder != obfd->xvec->byteorder
@@ -2359,9 +2350,11 @@ ppc64_elf_merge_private_bfd_data (ibfd, obfd)
const char *msg;
if (bfd_big_endian (ibfd))
- msg = _("%s: compiled for a big endian system and target is little endian");
+ msg = _("%s: compiled for a big endian system "
+ "and target is little endian");
else
- msg = _("%s: compiled for a little endian system and target is big endian");
+ msg = _("%s: compiled for a little endian system "
+ "and target is big endian");
(*_bfd_error_handler) (msg, bfd_archive_filename (ibfd));
@@ -2394,17 +2387,15 @@ struct _ppc64_elf_section_data
((struct _ppc64_elf_section_data *) elf_section_data (sec))
static bfd_boolean
-ppc64_elf_new_section_hook (abfd, sec)
- bfd *abfd;
- asection *sec;
+ppc64_elf_new_section_hook (bfd *abfd, asection *sec)
{
struct _ppc64_elf_section_data *sdata;
bfd_size_type amt = sizeof (*sdata);
- sdata = (struct _ppc64_elf_section_data *) bfd_zalloc (abfd, amt);
+ sdata = bfd_zalloc (abfd, amt);
if (sdata == NULL)
return FALSE;
- sec->used_by_bfd = (PTR) sdata;
+ sec->used_by_bfd = sdata;
return _bfd_elf_new_section_hook (abfd, sec);
}
@@ -2574,12 +2565,31 @@ struct plt_entry
. mtctr %r11
. ld %r11,xxx+16@toc@l(%r12)
. bctr
+
+ ppc_stub_long_branch and ppc_stub_plt_branch may also have additional
+ code to adjust the value and save r2 to support multiple toc sections.
+ A ppc_stub_long_branch with an r2 offset looks like:
+ . std %r2,40(%r1)
+ . addis %r2,%r2,off@ha
+ . addi %r2,%r2,off@l
+ . b dest
+
+ A ppc_stub_plt_branch with an r2 offset looks like:
+ . std %r2,40(%r1)
+ . addis %r12,%r2,xxx@toc@ha
+ . ld %r11,xxx@toc@l(%r12)
+ . addis %r2,%r2,off@ha
+ . addi %r2,%r2,off@l
+ . mtctr %r11
+ . bctr
*/
enum ppc_stub_type {
ppc_stub_none,
ppc_stub_long_branch,
+ ppc_stub_long_branch_r2off,
ppc_stub_plt_branch,
+ ppc_stub_plt_branch_r2off,
ppc_stub_plt_call
};
@@ -2588,6 +2598,8 @@ struct ppc_stub_hash_entry {
/* Base hash table entry structure. */
struct bfd_hash_entry root;
+ enum ppc_stub_type stub_type;
+
/* The stub section. */
asection *stub_sec;
@@ -2599,8 +2611,6 @@ struct ppc_stub_hash_entry {
bfd_vma target_value;
asection *target_section;
- enum ppc_stub_type stub_type;
-
/* The symbol table entry, if any, that this was derived from. */
struct ppc_link_hash_entry *h;
@@ -2677,8 +2687,8 @@ struct ppc_link_hash_table
bfd *stub_bfd;
/* Linker call-backs. */
- asection * (*add_stub_section) PARAMS ((const char *, asection *));
- void (*layout_sections_again) PARAMS ((void));
+ asection * (*add_stub_section) (const char *, asection *);
+ void (*layout_sections_again) (void);
/* Array to keep track of which stub sections have been created, and
information on stub grouping. */
@@ -2687,23 +2697,37 @@ struct ppc_link_hash_table
asection *link_sec;
/* The stub section. */
asection *stub_sec;
+ /* Along with elf_gp, specifies the TOC pointer used in this group. */
+ bfd_vma toc_off;
} *stub_group;
- /* Assorted information used by ppc64_elf_size_stubs. */
+ /* Support for multiple toc sections. */
+ unsigned int no_multi_toc;
+ unsigned int multi_toc_needed;
+
+ /* Temp used when calculating TOC pointers. */
+ bfd_vma toc_curr;
+
+ /* Highest input section id. */
+ int top_id;
+
+ /* Highest output section index. */
int top_index;
+
+ /* List of input sections for each output section. */
asection **input_list;
/* Short-cuts to get to dynamic linker sections. */
- asection *sgot;
- asection *srelgot;
- asection *splt;
- asection *srelplt;
- asection *sdynbss;
- asection *srelbss;
- asection *sglink;
+ asection *got;
+ asection *relgot;
+ asection *plt;
+ asection *relplt;
+ asection *dynbss;
+ asection *relbss;
+ asection *glink;
asection *sfpr;
- asection *sbrlt;
- asection *srelbrlt;
+ asection *brlt;
+ asection *relbrlt;
/* Short-cut to first output tls section. */
asection *tls_sec;
@@ -2717,6 +2741,12 @@ struct ppc_link_hash_table
bfd_vma offset;
} tlsld_got;
+ /* Statistics. */
+ unsigned long stub_count[ppc_stub_plt_call];
+
+ /* Set if we should emit symbols for stubs. */
+ unsigned int emit_stub_syms;
+
/* Set on error. */
unsigned int stub_error;
@@ -2734,88 +2764,6 @@ struct ppc_link_hash_table
struct sym_sec_cache sym_sec;
};
-static struct bfd_hash_entry *stub_hash_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
-static struct bfd_hash_entry *branch_hash_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
-static struct bfd_hash_entry *link_hash_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
-static struct bfd_link_hash_table *ppc64_elf_link_hash_table_create
- PARAMS ((bfd *));
-static void ppc64_elf_link_hash_table_free
- PARAMS ((struct bfd_link_hash_table *));
-static char *ppc_stub_name
- PARAMS ((const asection *, const asection *,
- const struct ppc_link_hash_entry *, const Elf_Internal_Rela *));
-static struct ppc_stub_hash_entry *ppc_get_stub_entry
- PARAMS ((const asection *, const asection *, struct elf_link_hash_entry *,
- const Elf_Internal_Rela *, struct ppc_link_hash_table *));
-static struct ppc_stub_hash_entry *ppc_add_stub
- PARAMS ((const char *, asection *, struct ppc_link_hash_table *));
-static bfd_boolean create_linkage_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_boolean create_got_section
- PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_boolean ppc64_elf_create_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-static void ppc64_elf_copy_indirect_symbol
- PARAMS ((struct elf_backend_data *, struct elf_link_hash_entry *,
- struct elf_link_hash_entry *));
-static bfd_boolean update_local_sym_info
- PARAMS ((bfd *, Elf_Internal_Shdr *, unsigned long, bfd_vma, int));
-static bfd_boolean update_plt_info
- PARAMS ((bfd *, struct ppc_link_hash_entry *, bfd_vma));
-static bfd_boolean ppc64_elf_check_relocs
- PARAMS ((bfd *, struct bfd_link_info *, asection *,
- const Elf_Internal_Rela *));
-static asection * ppc64_elf_gc_mark_hook
- PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
- struct elf_link_hash_entry *, Elf_Internal_Sym *));
-static bfd_boolean ppc64_elf_gc_sweep_hook
- PARAMS ((bfd *, struct bfd_link_info *, asection *,
- const Elf_Internal_Rela *));
-static bfd_boolean func_desc_adjust
- PARAMS ((struct elf_link_hash_entry *, PTR));
-static bfd_boolean ppc64_elf_func_desc_adjust
- PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_boolean ppc64_elf_adjust_dynamic_symbol
- PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
-static void ppc64_elf_hide_symbol
- PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *, bfd_boolean));
-static bfd_boolean get_sym_h
- PARAMS ((struct elf_link_hash_entry **, Elf_Internal_Sym **, asection **,
- char **, Elf_Internal_Sym **, unsigned long, bfd *));
-static int get_tls_mask
- PARAMS ((char **, Elf_Internal_Sym **, const Elf_Internal_Rela *, bfd *));
-static bfd_boolean allocate_dynrelocs
- PARAMS ((struct elf_link_hash_entry *, PTR));
-static bfd_boolean readonly_dynrelocs
- PARAMS ((struct elf_link_hash_entry *, PTR));
-static enum elf_reloc_type_class ppc64_elf_reloc_type_class
- PARAMS ((const Elf_Internal_Rela *));
-static bfd_boolean ppc64_elf_size_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-static enum ppc_stub_type ppc_type_of_stub
- PARAMS ((asection *, const Elf_Internal_Rela *,
- struct ppc_link_hash_entry **, bfd_vma));
-static bfd_byte *build_plt_stub
- PARAMS ((bfd *, bfd_byte *, int, int));
-static bfd_boolean ppc_build_one_stub
- PARAMS ((struct bfd_hash_entry *, PTR));
-static bfd_boolean ppc_size_one_stub
- PARAMS ((struct bfd_hash_entry *, PTR));
-static void group_sections
- PARAMS ((struct ppc_link_hash_table *, bfd_size_type, bfd_boolean));
-static bfd_boolean ppc64_elf_relocate_section
- PARAMS ((bfd *, struct bfd_link_info *info, bfd *, asection *, bfd_byte *,
- Elf_Internal_Rela *relocs, Elf_Internal_Sym *local_syms,
- asection **));
-static bfd_boolean ppc64_elf_finish_dynamic_symbol
- PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
- Elf_Internal_Sym *));
-static bfd_boolean ppc64_elf_finish_dynamic_sections
- PARAMS ((bfd *, struct bfd_link_info *));
-
/* Get the ppc64 ELF linker hash table from a link_info structure. */
#define ppc_hash_table(p) \
@@ -2832,10 +2780,9 @@ static bfd_boolean ppc64_elf_finish_dynamic_sections
/* Create an entry in the stub hash table. */
static struct bfd_hash_entry *
-stub_hash_newfunc (entry, table, string)
- struct bfd_hash_entry *entry;
- struct bfd_hash_table *table;
- const char *string;
+stub_hash_newfunc (struct bfd_hash_entry *entry,
+ struct bfd_hash_table *table,
+ const char *string)
{
/* Allocate the structure if it has not already been allocated by a
subclass. */
@@ -2854,11 +2801,11 @@ stub_hash_newfunc (entry, table, string)
/* Initialize the local fields. */
eh = (struct ppc_stub_hash_entry *) entry;
+ eh->stub_type = ppc_stub_none;
eh->stub_sec = NULL;
eh->stub_offset = 0;
eh->target_value = 0;
eh->target_section = NULL;
- eh->stub_type = ppc_stub_none;
eh->h = NULL;
eh->id_sec = NULL;
}
@@ -2869,10 +2816,9 @@ stub_hash_newfunc (entry, table, string)
/* Create an entry in the branch hash table. */
static struct bfd_hash_entry *
-branch_hash_newfunc (entry, table, string)
- struct bfd_hash_entry *entry;
- struct bfd_hash_table *table;
- const char *string;
+branch_hash_newfunc (struct bfd_hash_entry *entry,
+ struct bfd_hash_table *table,
+ const char *string)
{
/* Allocate the structure if it has not already been allocated by a
subclass. */
@@ -2901,10 +2847,9 @@ branch_hash_newfunc (entry, table, string)
/* Create an entry in a ppc64 ELF linker hash table. */
static struct bfd_hash_entry *
-link_hash_newfunc (entry, table, string)
- struct bfd_hash_entry *entry;
- struct bfd_hash_table *table;
- const char *string;
+link_hash_newfunc (struct bfd_hash_entry *entry,
+ struct bfd_hash_table *table,
+ const char *string)
{
/* Allocate the structure if it has not already been allocated by a
subclass. */
@@ -2936,13 +2881,12 @@ link_hash_newfunc (entry, table, string)
/* Create a ppc64 ELF linker hash table. */
static struct bfd_link_hash_table *
-ppc64_elf_link_hash_table_create (abfd)
- bfd *abfd;
+ppc64_elf_link_hash_table_create (bfd *abfd)
{
struct ppc_link_hash_table *htab;
bfd_size_type amt = sizeof (struct ppc_link_hash_table);
- htab = (struct ppc_link_hash_table *) bfd_malloc (amt);
+ htab = bfd_zmalloc (amt);
if (htab == NULL)
return NULL;
@@ -2960,28 +2904,6 @@ ppc64_elf_link_hash_table_create (abfd)
if (!bfd_hash_table_init (&htab->branch_hash_table, branch_hash_newfunc))
return NULL;
- htab->stub_bfd = NULL;
- htab->add_stub_section = NULL;
- htab->layout_sections_again = NULL;
- htab->stub_group = NULL;
- htab->sgot = NULL;
- htab->srelgot = NULL;
- htab->splt = NULL;
- htab->srelplt = NULL;
- htab->sdynbss = NULL;
- htab->srelbss = NULL;
- htab->sglink = NULL;
- htab->sfpr = NULL;
- htab->sbrlt = NULL;
- htab->srelbrlt = NULL;
- htab->tls_sec = NULL;
- htab->tls_get_addr = NULL;
- htab->tlsld_got.refcount = 0;
- htab->stub_error = 0;
- htab->has_14bit_branch = 0;
- htab->have_undefweak = 0;
- htab->stub_iteration = 0;
- htab->sym_sec.abfd = NULL;
/* Initializing two fields of the union is just cosmetic. We really
only care about glist, but when compiled on a 32-bit host the
bfd_vma fields are larger. Setting the bfd_vma to zero makes
@@ -2997,8 +2919,7 @@ ppc64_elf_link_hash_table_create (abfd)
/* Free the derived linker hash table. */
static void
-ppc64_elf_link_hash_table_free (hash)
- struct bfd_link_hash_table *hash;
+ppc64_elf_link_hash_table_free (struct bfd_link_hash_table *hash)
{
struct ppc_link_hash_table *ret = (struct ppc_link_hash_table *) hash;
@@ -3010,11 +2931,10 @@ ppc64_elf_link_hash_table_free (hash)
/* Build a name for an entry in the stub hash table. */
static char *
-ppc_stub_name (input_section, sym_sec, h, rel)
- const asection *input_section;
- const asection *sym_sec;
- const struct ppc_link_hash_entry *h;
- const Elf_Internal_Rela *rel;
+ppc_stub_name (const asection *input_section,
+ const asection *sym_sec,
+ const struct ppc_link_hash_entry *h,
+ const Elf_Internal_Rela *rel)
{
char *stub_name;
bfd_size_type len;
@@ -3038,7 +2958,7 @@ ppc_stub_name (input_section, sym_sec, h, rel)
}
else
{
- len = 8 + 1 + 8 + 1 + 8 + 1 + 16 + 1;
+ len = 8 + 1 + 8 + 1 + 8 + 1 + 8 + 1;
stub_name = bfd_malloc (len);
if (stub_name != NULL)
{
@@ -3056,12 +2976,11 @@ ppc_stub_name (input_section, sym_sec, h, rel)
creating the stub name takes a bit of time. */
static struct ppc_stub_hash_entry *
-ppc_get_stub_entry (input_section, sym_sec, hash, rel, htab)
- const asection *input_section;
- const asection *sym_sec;
- struct elf_link_hash_entry *hash;
- const Elf_Internal_Rela *rel;
- struct ppc_link_hash_table *htab;
+ppc_get_stub_entry (const asection *input_section,
+ const asection *sym_sec,
+ struct elf_link_hash_entry *hash,
+ const Elf_Internal_Rela *rel,
+ struct ppc_link_hash_table *htab)
{
struct ppc_stub_hash_entry *stub_entry;
struct ppc_link_hash_entry *h = (struct ppc_link_hash_entry *) hash;
@@ -3103,10 +3022,9 @@ ppc_get_stub_entry (input_section, sym_sec, hash, rel, htab)
stub entry are initialised. */
static struct ppc_stub_hash_entry *
-ppc_add_stub (stub_name, section, htab)
- const char *stub_name;
- asection *section;
- struct ppc_link_hash_table *htab;
+ppc_add_stub (const char *stub_name,
+ asection *section,
+ struct ppc_link_hash_table *htab)
{
asection *link_sec;
asection *stub_sec;
@@ -3159,9 +3077,7 @@ ppc_add_stub (stub_name, section, htab)
/* Create sections for linker generated code. */
static bfd_boolean
-create_linkage_sections (dynobj, info)
- bfd *dynobj;
- struct bfd_link_info *info;
+create_linkage_sections (bfd *dynobj, struct bfd_link_info *info)
{
struct ppc_link_hash_table *htab;
flagword flags;
@@ -3178,29 +3094,29 @@ create_linkage_sections (dynobj, info)
return FALSE;
/* Create .glink for lazy dynamic linking support. */
- htab->sglink = bfd_make_section_anyway (dynobj, ".glink");
- if (htab->sglink == NULL
- || ! bfd_set_section_flags (dynobj, htab->sglink, flags)
- || ! bfd_set_section_alignment (dynobj, htab->sglink, 2))
+ htab->glink = bfd_make_section_anyway (dynobj, ".glink");
+ if (htab->glink == NULL
+ || ! bfd_set_section_flags (dynobj, htab->glink, flags)
+ || ! bfd_set_section_alignment (dynobj, htab->glink, 2))
return FALSE;
/* Create .branch_lt for plt_branch stubs. */
flags = (SEC_ALLOC | SEC_LOAD
| SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED);
- htab->sbrlt = bfd_make_section_anyway (dynobj, ".branch_lt");
- if (htab->sbrlt == NULL
- || ! bfd_set_section_flags (dynobj, htab->sbrlt, flags)
- || ! bfd_set_section_alignment (dynobj, htab->sbrlt, 3))
+ htab->brlt = bfd_make_section_anyway (dynobj, ".branch_lt");
+ if (htab->brlt == NULL
+ || ! bfd_set_section_flags (dynobj, htab->brlt, flags)
+ || ! bfd_set_section_alignment (dynobj, htab->brlt, 3))
return FALSE;
if (info->shared)
{
flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY
| SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED);
- htab->srelbrlt = bfd_make_section_anyway (dynobj, ".rela.branch_lt");
- if (!htab->srelbrlt
- || ! bfd_set_section_flags (dynobj, htab->srelbrlt, flags)
- || ! bfd_set_section_alignment (dynobj, htab->srelbrlt, 3))
+ htab->relbrlt = bfd_make_section_anyway (dynobj, ".rela.branch_lt");
+ if (!htab->relbrlt
+ || ! bfd_set_section_flags (dynobj, htab->relbrlt, flags)
+ || ! bfd_set_section_alignment (dynobj, htab->relbrlt, 3))
return FALSE;
}
return TRUE;
@@ -3210,9 +3126,7 @@ create_linkage_sections (dynobj, info)
shortcuts to them in our hash table. */
static bfd_boolean
-create_got_section (dynobj, info)
- bfd *dynobj;
- struct bfd_link_info *info;
+create_got_section (bfd *dynobj, struct bfd_link_info *info)
{
struct ppc_link_hash_table *htab;
@@ -3220,17 +3134,17 @@ create_got_section (dynobj, info)
return FALSE;
htab = ppc_hash_table (info);
- htab->sgot = bfd_get_section_by_name (dynobj, ".got");
- if (!htab->sgot)
+ htab->got = bfd_get_section_by_name (dynobj, ".got");
+ if (!htab->got)
abort ();
- htab->srelgot = bfd_make_section (dynobj, ".rela.got");
- if (!htab->srelgot
- || ! bfd_set_section_flags (dynobj, htab->srelgot,
+ htab->relgot = bfd_make_section (dynobj, ".rela.got");
+ if (!htab->relgot
+ || ! bfd_set_section_flags (dynobj, htab->relgot,
(SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
| SEC_IN_MEMORY | SEC_LINKER_CREATED
| SEC_READONLY))
- || ! bfd_set_section_alignment (dynobj, htab->srelgot, 3))
+ || ! bfd_set_section_alignment (dynobj, htab->relgot, 3))
return FALSE;
return TRUE;
}
@@ -3238,27 +3152,25 @@ create_got_section (dynobj, info)
/* Create the dynamic sections, and set up shortcuts. */
static bfd_boolean
-ppc64_elf_create_dynamic_sections (dynobj, info)
- bfd *dynobj;
- struct bfd_link_info *info;
+ppc64_elf_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info)
{
struct ppc_link_hash_table *htab;
htab = ppc_hash_table (info);
- if (!htab->sgot && !create_got_section (dynobj, info))
+ if (!htab->got && !create_got_section (dynobj, info))
return FALSE;
if (!_bfd_elf_create_dynamic_sections (dynobj, info))
return FALSE;
- htab->splt = bfd_get_section_by_name (dynobj, ".plt");
- htab->srelplt = bfd_get_section_by_name (dynobj, ".rela.plt");
- htab->sdynbss = bfd_get_section_by_name (dynobj, ".dynbss");
+ htab->plt = bfd_get_section_by_name (dynobj, ".plt");
+ htab->relplt = bfd_get_section_by_name (dynobj, ".rela.plt");
+ htab->dynbss = bfd_get_section_by_name (dynobj, ".dynbss");
if (!info->shared)
- htab->srelbss = bfd_get_section_by_name (dynobj, ".rela.bss");
+ htab->relbss = bfd_get_section_by_name (dynobj, ".rela.bss");
- if (!htab->splt || !htab->srelplt || !htab->sdynbss
- || (!info->shared && !htab->srelbss))
+ if (!htab->plt || !htab->relplt || !htab->dynbss
+ || (!info->shared && !htab->relbss))
abort ();
return TRUE;
@@ -3267,9 +3179,9 @@ ppc64_elf_create_dynamic_sections (dynobj, info)
/* Copy the extra info we tack onto an elf_link_hash_entry. */
static void
-ppc64_elf_copy_indirect_symbol (bed, dir, ind)
- struct elf_backend_data *bed ATTRIBUTE_UNUSED;
- struct elf_link_hash_entry *dir, *ind;
+ppc64_elf_copy_indirect_symbol (struct elf_backend_data *bed ATTRIBUTE_UNUSED,
+ struct elf_link_hash_entry *dir,
+ struct elf_link_hash_entry *ind)
{
struct ppc_link_hash_entry *edir, *eind;
flagword mask;
@@ -3408,8 +3320,7 @@ ppc64_elf_copy_indirect_symbol (bed, dir, ind)
symbols undefined on the command-line. */
bfd_boolean
-ppc64_elf_mark_entry_syms (info)
- struct bfd_link_info *info;
+ppc64_elf_mark_entry_syms (struct bfd_link_info *info)
{
struct ppc_link_hash_table *htab;
struct bfd_sym_chain *sym;
@@ -3427,12 +3338,8 @@ ppc64_elf_mark_entry_syms (info)
}
static bfd_boolean
-update_local_sym_info (abfd, symtab_hdr, r_symndx, r_addend, tls_type)
- bfd *abfd;
- Elf_Internal_Shdr *symtab_hdr;
- unsigned long r_symndx;
- bfd_vma r_addend;
- int tls_type;
+update_local_sym_info (bfd *abfd, Elf_Internal_Shdr *symtab_hdr,
+ unsigned long r_symndx, bfd_vma r_addend, int tls_type)
{
struct got_entry **local_got_ents = elf_local_got_ents (abfd);
char *local_got_tls_masks;
@@ -3442,7 +3349,7 @@ update_local_sym_info (abfd, symtab_hdr, r_symndx, r_addend, tls_type)
bfd_size_type size = symtab_hdr->sh_info;
size *= sizeof (*local_got_ents) + sizeof (*local_got_tls_masks);
- local_got_ents = (struct got_entry **) bfd_zalloc (abfd, size);
+ local_got_ents = bfd_zalloc (abfd, size);
if (local_got_ents == NULL)
return FALSE;
elf_local_got_ents (abfd) = local_got_ents;
@@ -3458,7 +3365,7 @@ update_local_sym_info (abfd, symtab_hdr, r_symndx, r_addend, tls_type)
if (ent == NULL)
{
bfd_size_type amt = sizeof (*ent);
- ent = (struct got_entry *) bfd_alloc (abfd, amt);
+ ent = bfd_alloc (abfd, amt);
if (ent == NULL)
return FALSE;
ent->next = local_got_ents[r_symndx];
@@ -3476,10 +3383,7 @@ update_local_sym_info (abfd, symtab_hdr, r_symndx, r_addend, tls_type)
}
static bfd_boolean
-update_plt_info (abfd, eh, addend)
- bfd *abfd;
- struct ppc_link_hash_entry *eh;
- bfd_vma addend;
+update_plt_info (bfd *abfd, struct ppc_link_hash_entry *eh, bfd_vma addend)
{
struct plt_entry *ent;
@@ -3489,7 +3393,7 @@ update_plt_info (abfd, eh, addend)
if (ent == NULL)
{
bfd_size_type amt = sizeof (*ent);
- ent = (struct plt_entry *) bfd_alloc (abfd, amt);
+ ent = bfd_alloc (abfd, amt);
if (ent == NULL)
return FALSE;
ent->next = eh->elf.plt.plist;
@@ -3508,11 +3412,8 @@ update_plt_info (abfd, eh, addend)
linkage table, and dynamic reloc sections. */
static bfd_boolean
-ppc64_elf_check_relocs (abfd, info, sec, relocs)
- bfd *abfd;
- struct bfd_link_info *info;
- asection *sec;
- const Elf_Internal_Rela *relocs;
+ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
+ asection *sec, const Elf_Internal_Rela *relocs)
{
struct ppc_link_hash_table *htab;
Elf_Internal_Shdr *symtab_hdr;
@@ -3522,7 +3423,7 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs)
asection *sreloc;
asection **opd_sym_map;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
htab = ppc_hash_table (info);
@@ -3553,7 +3454,7 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs)
bfd_size_type amt;
amt = sec->_raw_size * sizeof (union opd_info) / 24;
- opd_sym_map = (asection **) bfd_zalloc (abfd, amt);
+ opd_sym_map = bfd_zalloc (abfd, amt);
if (opd_sym_map == NULL)
return FALSE;
ppc64_elf_section_data (sec)->opd.func_sec = opd_sym_map;
@@ -3579,7 +3480,7 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs)
else
h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- r_type = (enum elf_ppc64_reloc_type) ELF64_R_TYPE (rel->r_info);
+ r_type = ELF64_R_TYPE (rel->r_info);
switch (r_type)
{
case R_PPC64_GOT_TLSLD16:
@@ -3622,7 +3523,8 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs)
case R_PPC64_GOT16_LO:
case R_PPC64_GOT16_LO_DS:
/* This symbol requires a global offset table entry. */
- if (htab->sgot == NULL
+ sec->has_gp_reloc = 1;
+ if (htab->got == NULL
&& !create_got_section (htab->elf.dynobj, info))
return FALSE;
@@ -3639,7 +3541,7 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs)
if (ent == NULL)
{
bfd_size_type amt = sizeof (*ent);
- ent = (struct got_entry *) bfd_alloc (abfd, amt);
+ ent = bfd_alloc (abfd, amt);
if (ent == NULL)
return FALSE;
ent->next = eh->elf.got.glist;
@@ -3690,12 +3592,6 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs)
case R_PPC64_SECTOFF_HA:
case R_PPC64_SECTOFF_DS:
case R_PPC64_SECTOFF_LO_DS:
- case R_PPC64_TOC16:
- case R_PPC64_TOC16_LO:
- case R_PPC64_TOC16_HI:
- case R_PPC64_TOC16_HA:
- case R_PPC64_TOC16_DS:
- case R_PPC64_TOC16_LO_DS:
case R_PPC64_DTPREL16:
case R_PPC64_DTPREL16_LO:
case R_PPC64_DTPREL16_HI:
@@ -3708,6 +3604,16 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs)
case R_PPC64_DTPREL16_HIGHESTA:
break;
+ /* Nor do these. */
+ case R_PPC64_TOC16:
+ case R_PPC64_TOC16_LO:
+ case R_PPC64_TOC16_HI:
+ case R_PPC64_TOC16_HA:
+ case R_PPC64_TOC16_DS:
+ case R_PPC64_TOC16_LO_DS:
+ sec->has_gp_reloc = 1;
+ break;
+
/* This relocation describes the C++ object vtable hierarchy.
Reconstruct it for later use during GC. */
case R_PPC64_GNU_VTINHERIT:
@@ -3792,8 +3698,7 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs)
{
/* One extra to simplify get_tls_mask. */
bfd_size_type amt = sec->_raw_size * sizeof (unsigned) / 8 + 1;
- ppc64_elf_section_data (sec)->t_symndx
- = (unsigned *) bfd_zalloc (abfd, amt);
+ ppc64_elf_section_data (sec)->t_symndx = bfd_zalloc (abfd, amt);
if (ppc64_elf_section_data (sec)->t_symndx == NULL)
return FALSE;
}
@@ -3846,8 +3751,7 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs)
if (opd_sym_map != NULL
&& h == NULL
&& rel + 1 < rel_end
- && ((enum elf_ppc64_reloc_type) ELF64_R_TYPE ((rel + 1)->r_info)
- == R_PPC64_TOC))
+ && ELF64_R_TYPE ((rel + 1)->r_info) == R_PPC64_TOC)
{
asection *s;
@@ -4002,9 +3906,7 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs)
p = *head;
if (p == NULL || p->sec != sec)
{
- p = ((struct ppc_dyn_relocs *)
- bfd_alloc (htab->elf.dynobj,
- (bfd_size_type) sizeof *p));
+ p = bfd_alloc (htab->elf.dynobj, sizeof *p);
if (p == NULL)
return FALSE;
p->next = *head;
@@ -4032,12 +3934,11 @@ ppc64_elf_check_relocs (abfd, info, sec, relocs)
relocation. */
static asection *
-ppc64_elf_gc_mark_hook (sec, info, rel, h, sym)
- asection *sec;
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
- Elf_Internal_Rela *rel;
- struct elf_link_hash_entry *h;
- Elf_Internal_Sym *sym;
+ppc64_elf_gc_mark_hook (asection *sec,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ Elf_Internal_Rela *rel,
+ struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym)
{
asection *rsec = NULL;
@@ -4046,7 +3947,7 @@ ppc64_elf_gc_mark_hook (sec, info, rel, h, sym)
enum elf_ppc64_reloc_type r_type;
struct ppc_link_hash_entry *fdh;
- r_type = (enum elf_ppc64_reloc_type) ELF64_R_TYPE (rel->r_info);
+ r_type = ELF64_R_TYPE (rel->r_info);
switch (r_type)
{
case R_PPC64_GNU_VTINHERIT:
@@ -4103,11 +4004,8 @@ ppc64_elf_gc_mark_hook (sec, info, rel, h, sym)
section being removed. */
static bfd_boolean
-ppc64_elf_gc_sweep_hook (abfd, info, sec, relocs)
- bfd *abfd;
- struct bfd_link_info *info;
- asection *sec;
- const Elf_Internal_Rela *relocs;
+ppc64_elf_gc_sweep_hook (bfd *abfd, struct bfd_link_info *info,
+ asection *sec, const Elf_Internal_Rela *relocs)
{
struct ppc_link_hash_table *htab;
Elf_Internal_Shdr *symtab_hdr;
@@ -4131,7 +4029,7 @@ ppc64_elf_gc_sweep_hook (abfd, info, sec, relocs)
char tls_type = 0;
r_symndx = ELF64_R_SYM (rel->r_info);
- r_type = (enum elf_ppc64_reloc_type) ELF64_R_TYPE (rel->r_info);
+ r_type = ELF64_R_TYPE (rel->r_info);
if (r_symndx >= symtab_hdr->sh_info)
{
struct ppc_link_hash_entry *eh;
@@ -4241,9 +4139,7 @@ ppc64_elf_gc_sweep_hook (abfd, info, sec, relocs)
information on function code symbol entries to their corresponding
function descriptor symbol entries. */
static bfd_boolean
-func_desc_adjust (h, inf)
- struct elf_link_hash_entry *h;
- PTR inf;
+func_desc_adjust (struct elf_link_hash_entry *h, void *inf)
{
struct bfd_link_info *info;
struct ppc_link_hash_table *htab;
@@ -4255,7 +4151,7 @@ func_desc_adjust (h, inf)
if (h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
- info = (struct bfd_link_info *) inf;
+ info = inf;
htab = ppc_hash_table (info);
/* If this is a function code symbol, transfer dynamic linking
@@ -4366,9 +4262,8 @@ func_desc_adjust (h, inf)
dynamic linking information gathered so far on function code symbol
entries, to their corresponding function descriptor symbol entries. */
static bfd_boolean
-ppc64_elf_func_desc_adjust (obfd, info)
- bfd *obfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info;
+ppc64_elf_func_desc_adjust (bfd *obfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info)
{
struct ppc_link_hash_table *htab;
unsigned int lowest_savef = MAX_SAVE_FPR + 2;
@@ -4426,7 +4321,7 @@ ppc64_elf_func_desc_adjust (obfd, info)
}
}
- elf_link_hash_traverse (&htab->elf, func_desc_adjust, (PTR) info);
+ elf_link_hash_traverse (&htab->elf, func_desc_adjust, info);
htab->sfpr->_raw_size = ((MAX_SAVE_FPR + 2 - lowest_savef) * 4
+ (MAX_SAVE_FPR + 2 - lowest_restf) * 4);
@@ -4442,7 +4337,7 @@ ppc64_elf_func_desc_adjust (obfd, info)
htab->sfpr->_raw_size = 4;
}
- p = (bfd_byte *) bfd_alloc (htab->elf.dynobj, htab->sfpr->_raw_size);
+ p = bfd_alloc (htab->elf.dynobj, htab->sfpr->_raw_size);
if (p == NULL)
return FALSE;
htab->sfpr->contents = p;
@@ -4483,9 +4378,8 @@ ppc64_elf_func_desc_adjust (obfd, info)
understand. */
static bfd_boolean
-ppc64_elf_adjust_dynamic_symbol (info, h)
- struct bfd_link_info *info;
- struct elf_link_hash_entry *h;
+ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
+ struct elf_link_hash_entry *h)
{
struct ppc_link_hash_table *htab;
asection *s;
@@ -4585,7 +4479,7 @@ ppc64_elf_adjust_dynamic_symbol (info, h)
.rela.bss section we are going to use. */
if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
{
- htab->srelbss->_raw_size += sizeof (Elf64_External_Rela);
+ htab->relbss->_raw_size += sizeof (Elf64_External_Rela);
h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
}
@@ -4596,7 +4490,7 @@ ppc64_elf_adjust_dynamic_symbol (info, h)
power_of_two = 4;
/* Apply the required alignment. */
- s = htab->sdynbss;
+ s = htab->dynbss;
s->_raw_size = BFD_ALIGN (s->_raw_size, (bfd_size_type) (1 << power_of_two));
if (power_of_two > bfd_get_section_alignment (htab->elf.dynobj, s))
{
@@ -4617,10 +4511,9 @@ ppc64_elf_adjust_dynamic_symbol (info, h)
/* If given a function descriptor symbol, hide both the function code
sym and the descriptor. */
static void
-ppc64_elf_hide_symbol (info, h, force_local)
- struct bfd_link_info *info;
- struct elf_link_hash_entry *h;
- bfd_boolean force_local;
+ppc64_elf_hide_symbol (struct bfd_link_info *info,
+ struct elf_link_hash_entry *h,
+ bfd_boolean force_local)
{
_bfd_elf_link_hash_hide_symbol (info, h, force_local);
@@ -4674,14 +4567,9 @@ ppc64_elf_hide_symbol (info, h, force_local)
}
static bfd_boolean
-get_sym_h (hp, symp, symsecp, tls_maskp, locsymsp, r_symndx, ibfd)
- struct elf_link_hash_entry **hp;
- Elf_Internal_Sym **symp;
- asection **symsecp;
- char **tls_maskp;
- Elf_Internal_Sym **locsymsp;
- unsigned long r_symndx;
- bfd *ibfd;
+get_sym_h (struct elf_link_hash_entry **hp, Elf_Internal_Sym **symp,
+ asection **symsecp, char **tls_maskp, Elf_Internal_Sym **locsymsp,
+ unsigned long r_symndx, bfd *ibfd)
{
Elf_Internal_Shdr *symtab_hdr = &elf_tdata (ibfd)->symtab_hdr;
@@ -4772,14 +4660,11 @@ get_sym_h (hp, symp, symsecp, tls_maskp, locsymsp, r_symndx, ibfd)
/* Returns TLS_MASKP for the given REL symbol. Function return is 0 on
error, 2 on a toc GD type suitable for optimization, 3 on a toc LD
- type suitable for optimization, and 1 otherwise. */
+ type suitable for optimization, and 1 otherwise. */
static int
-get_tls_mask (tls_maskp, locsymsp, rel, ibfd)
- char **tls_maskp;
- Elf_Internal_Sym **locsymsp;
- const Elf_Internal_Rela *rel;
- bfd *ibfd;
+get_tls_mask (char **tls_maskp, Elf_Internal_Sym **locsymsp,
+ const Elf_Internal_Rela *rel, bfd *ibfd)
{
unsigned long r_symndx;
unsigned int next_r;
@@ -4826,9 +4711,7 @@ get_tls_mask (tls_maskp, locsymsp, rel, ibfd)
}
bfd_boolean
-ppc64_elf_edit_opd (obfd, info)
- bfd *obfd;
- struct bfd_link_info *info;
+ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
{
bfd *ibfd;
@@ -4854,10 +4737,10 @@ ppc64_elf_edit_opd (obfd, info)
{
/* Must be a ld -r link. ie. check_relocs hasn't been
called. */
- adjust = (long *) bfd_zalloc (obfd, amt);
+ adjust = bfd_zalloc (obfd, amt);
ppc64_elf_section_data (sec)->opd.adjust = adjust;
}
- memset (adjust, 0, (size_t) amt);
+ memset (adjust, 0, amt);
if (sec->output_section == bfd_abs_section_ptr)
continue;
@@ -4871,8 +4754,7 @@ ppc64_elf_edit_opd (obfd, info)
sym_hashes = elf_sym_hashes (ibfd);
/* Read the relocations. */
- relstart = _bfd_elf_link_read_relocs (ibfd, sec, (PTR) NULL,
- (Elf_Internal_Rela *) NULL,
+ relstart = _bfd_elf_link_read_relocs (ibfd, sec, NULL, NULL,
info->keep_memory);
if (relstart == NULL)
return FALSE;
@@ -4893,7 +4775,7 @@ ppc64_elf_edit_opd (obfd, info)
/* .opd contains a regular array of 24 byte entries. We're
only interested in the reloc pointing to a function entry
point. */
- r_type = (enum elf_ppc64_reloc_type) ELF64_R_TYPE (rel->r_info);
+ r_type = ELF64_R_TYPE (rel->r_info);
if (r_type == R_PPC64_TOC)
continue;
@@ -4908,7 +4790,7 @@ ppc64_elf_edit_opd (obfd, info)
if (rel + 1 >= relend)
continue;
- r_type = (enum elf_ppc64_reloc_type) ELF64_R_TYPE ((rel + 1)->r_info);
+ r_type = ELF64_R_TYPE ((rel + 1)->r_info);
if (r_type != R_PPC64_TOC)
continue;
@@ -4975,7 +4857,7 @@ ppc64_elf_edit_opd (obfd, info)
{
bfd_byte *loc = bfd_alloc (ibfd, sec->_raw_size);
if (loc == NULL
- || !bfd_get_section_contents (ibfd, sec, loc, (bfd_vma) 0,
+ || !bfd_get_section_contents (ibfd, sec, loc, 0,
sec->_raw_size))
{
if (local_syms != NULL
@@ -5134,9 +5016,7 @@ ppc64_elf_edit_opd (obfd, info)
/* Set htab->tls_sec. */
bfd_boolean
-ppc64_elf_tls_setup (obfd, info)
- bfd *obfd;
- struct bfd_link_info *info;
+ppc64_elf_tls_setup (bfd *obfd, struct bfd_link_info *info)
{
asection *tls;
struct ppc_link_hash_table *htab;
@@ -5171,15 +5051,13 @@ ppc64_elf_tls_setup (obfd, info)
dynamic relocations. */
bfd_boolean
-ppc64_elf_tls_optimize (obfd, info)
- bfd *obfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info;
+ppc64_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
{
bfd *ibfd;
asection *sec;
struct ppc_link_hash_table *htab;
- if (info->relocateable || info->shared)
+ if (info->relocatable || info->shared)
return TRUE;
htab = ppc_hash_table (info);
@@ -5194,8 +5072,7 @@ ppc64_elf_tls_optimize (obfd, info)
int expecting_tls_get_addr;
/* Read the relocations. */
- relstart = _bfd_elf_link_read_relocs (ibfd, sec, (PTR) NULL,
- (Elf_Internal_Rela *) NULL,
+ relstart = _bfd_elf_link_read_relocs (ibfd, sec, NULL, NULL,
info->keep_memory);
if (relstart == NULL)
return FALSE;
@@ -5251,8 +5128,7 @@ ppc64_elf_tls_optimize (obfd, info)
< (bfd_vma) 1 << 32);
}
- r_type
- = (enum elf_ppc64_reloc_type) ELF64_R_TYPE (rel->r_info);
+ r_type = ELF64_R_TYPE (rel->r_info);
switch (r_type)
{
case R_PPC64_GOT_TLSLD16:
@@ -5473,9 +5349,7 @@ ppc64_elf_tls_optimize (obfd, info)
dynamic relocs. */
static bfd_boolean
-allocate_dynrelocs (h, inf)
- struct elf_link_hash_entry *h;
- PTR inf;
+allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
{
struct bfd_link_info *info;
struct ppc_link_hash_table *htab;
@@ -5506,7 +5380,7 @@ allocate_dynrelocs (h, inf)
/* If this is the first .plt entry, make room for the special
first entry. */
- s = htab->splt;
+ s = htab->plt;
if (s->_raw_size == 0)
s->_raw_size += PLT_INITIAL_ENTRY_SIZE;
@@ -5516,7 +5390,7 @@ allocate_dynrelocs (h, inf)
s->_raw_size += PLT_ENTRY_SIZE;
/* Make room for the .glink code. */
- s = htab->sglink;
+ s = htab->glink;
if (s->_raw_size == 0)
s->_raw_size += GLINK_CALL_STUB_SIZE;
/* We need bigger stubs past index 32767. */
@@ -5525,7 +5399,7 @@ allocate_dynrelocs (h, inf)
s->_raw_size += 2*4;
/* We also need to make an entry in the .rela.plt section. */
- s = htab->srelplt;
+ s = htab->relplt;
s->_raw_size += sizeof (Elf64_External_Rela);
doneone = TRUE;
}
@@ -5590,7 +5464,7 @@ allocate_dynrelocs (h, inf)
continue;
}
- s = htab->sgot;
+ s = htab->got;
gent->got.offset = s->_raw_size;
s->_raw_size
+= (gent->tls_type & eh->tls_mask & (TLS_GD | TLS_LD)) ? 16 : 8;
@@ -5599,7 +5473,7 @@ allocate_dynrelocs (h, inf)
|| WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h))
&& (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|| h->root.type != bfd_link_hash_undefweak))
- htab->srelgot->_raw_size
+ htab->relgot->_raw_size
+= (gent->tls_type & eh->tls_mask & TLS_GD
? 2 * sizeof (Elf64_External_Rela)
: sizeof (Elf64_External_Rela));
@@ -5688,9 +5562,7 @@ allocate_dynrelocs (h, inf)
/* Find any dynamic relocs that apply to read-only sections. */
static bfd_boolean
-readonly_dynrelocs (h, inf)
- struct elf_link_hash_entry *h;
- PTR inf;
+readonly_dynrelocs (struct elf_link_hash_entry *h, void *inf)
{
struct ppc_link_hash_entry *eh;
struct ppc_dyn_relocs *p;
@@ -5705,7 +5577,7 @@ readonly_dynrelocs (h, inf)
if (s != NULL && (s->flags & SEC_READONLY) != 0)
{
- struct bfd_link_info *info = (struct bfd_link_info *) inf;
+ struct bfd_link_info *info = inf;
info->flags |= DF_TEXTREL;
@@ -5719,9 +5591,8 @@ readonly_dynrelocs (h, inf)
/* Set the sizes of the dynamic sections. */
static bfd_boolean
-ppc64_elf_size_dynamic_sections (output_bfd, info)
- bfd *output_bfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info;
+ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info)
{
struct ppc_link_hash_table *htab;
bfd *dynobj;
@@ -5737,7 +5608,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)
@@ -5749,10 +5620,10 @@ ppc64_elf_size_dynamic_sections (output_bfd, info)
if (htab->tlsld_got.refcount > 0)
{
- htab->tlsld_got.offset = htab->sgot->_raw_size;
- htab->sgot->_raw_size += 16;
+ htab->tlsld_got.offset = htab->got->_raw_size;
+ htab->got->_raw_size += 16;
if (info->shared)
- htab->srelgot->_raw_size += sizeof (Elf64_External_Rela);
+ htab->relgot->_raw_size += sizeof (Elf64_External_Rela);
}
else
htab->tlsld_got.offset = (bfd_vma) -1;
@@ -5806,8 +5677,8 @@ ppc64_elf_size_dynamic_sections (output_bfd, info)
locsymcount = symtab_hdr->sh_info;
end_lgot_ents = lgot_ents + locsymcount;
lgot_masks = (char *) end_lgot_ents;
- s = htab->sgot;
- srel = htab->srelgot;
+ s = htab->got;
+ srel = htab->relgot;
for (; lgot_ents < end_lgot_ents; ++lgot_ents, ++lgot_masks)
{
struct got_entry *ent;
@@ -5850,7 +5721,7 @@ ppc64_elf_size_dynamic_sections (output_bfd, info)
/* Allocate global sym .plt and .got entries, and space for global
sym dynamic relocs. */
- elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, (PTR) info);
+ elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, info);
/* We now have determined the sizes of the various dynamic sections.
Allocate memory for them. */
@@ -5864,12 +5735,20 @@ ppc64_elf_size_dynamic_sections (output_bfd, info)
and a non-zero _cooked_size sticks. */
s->_cooked_size = 0;
- if (s == htab->sbrlt || s == htab->srelbrlt)
+ if (s == htab->brlt || s == htab->relbrlt)
/* These haven't been allocated yet; don't strip. */
continue;
- else if (s == htab->splt
- || s == htab->sgot
- || s == htab->sglink)
+ else if (s == htab->got)
+ {
+ /* Automatic multiple tocs aren't possible if we are using the
+ GOT. The GOT is accessed via r2, so we can't adjust r2.
+ FIXME: There's no reason why we couldn't lay out multiple
+ GOTs too. */
+ if (s->_raw_size > elf_backend_got_header_size)
+ htab->no_multi_toc = 1;
+ }
+ else if (s == htab->plt
+ || s == htab->glink)
{
/* Strip this section if we don't need it; see the
comment below. */
@@ -5890,7 +5769,7 @@ ppc64_elf_size_dynamic_sections (output_bfd, info)
}
else
{
- if (s != htab->srelplt)
+ if (s != htab->relplt)
relocs = TRUE;
/* We use the reloc_count field as a counter if we need
@@ -5921,7 +5800,7 @@ ppc64_elf_size_dynamic_sections (output_bfd, info)
sections instead of garbage.
We also rely on the section contents being zero when writing
the GOT. */
- s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
+ s->contents = bfd_zalloc (dynobj, s->_raw_size);
if (s->contents == NULL)
return FALSE;
}
@@ -5934,15 +5813,15 @@ ppc64_elf_size_dynamic_sections (output_bfd, info)
the .dynamic section. The DT_DEBUG entry is filled in by the
dynamic linker and used by the debugger. */
#define add_dynamic_entry(TAG, VAL) \
- bfd_elf64_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
+ bfd_elf64_add_dynamic_entry (info, (TAG), (VAL))
- if (!info->shared)
+ if (info->executable)
{
if (!add_dynamic_entry (DT_DEBUG, 0))
return FALSE;
}
- if (htab->splt != NULL && htab->splt->_raw_size != 0)
+ if (htab->plt != NULL && htab->plt->_raw_size != 0)
{
if (!add_dynamic_entry (DT_PLTGOT, 0)
|| !add_dynamic_entry (DT_PLTRELSZ, 0)
@@ -5969,8 +5848,7 @@ ppc64_elf_size_dynamic_sections (output_bfd, info)
/* If any dynamic relocs apply to a read-only section,
then we need a DT_TEXTREL entry. */
if ((info->flags & DF_TEXTREL) == 0)
- elf_link_hash_traverse (&htab->elf, readonly_dynrelocs,
- (PTR) info);
+ elf_link_hash_traverse (&htab->elf, readonly_dynrelocs, info);
if ((info->flags & DF_TEXTREL) != 0)
{
@@ -5986,18 +5864,17 @@ ppc64_elf_size_dynamic_sections (output_bfd, info)
/* Determine the type of stub needed, if any, for a call. */
-static INLINE enum ppc_stub_type
-ppc_type_of_stub (input_sec, rel, hash, destination)
- asection *input_sec;
- const Elf_Internal_Rela *rel;
- struct ppc_link_hash_entry **hash;
- bfd_vma destination;
+static inline enum ppc_stub_type
+ppc_type_of_stub (asection *input_sec,
+ const Elf_Internal_Rela *rel,
+ struct ppc_link_hash_entry **hash,
+ bfd_vma destination)
{
struct ppc_link_hash_entry *h = *hash;
bfd_vma location;
bfd_vma branch_offset;
bfd_vma max_branch_offset;
- unsigned int r_type;
+ enum elf_ppc64_reloc_type r_type;
if (h != NULL)
{
@@ -6014,8 +5891,8 @@ ppc_type_of_stub (input_sec, rel, hash, destination)
}
}
- if (h->elf.root.type == bfd_link_hash_undefweak
- || h->elf.root.type == bfd_link_hash_undefined)
+ if (h->elf.root.type != bfd_link_hash_defined
+ && h->elf.root.type != bfd_link_hash_defweak)
return ppc_stub_none;
}
@@ -6029,7 +5906,7 @@ ppc_type_of_stub (input_sec, rel, hash, destination)
/* Determine if a long branch stub is needed. */
max_branch_offset = 1 << 25;
- if (r_type != (unsigned int) R_PPC64_REL24)
+ if (r_type != R_PPC64_REL24)
max_branch_offset = 1 << 15;
if (branch_offset + max_branch_offset >= 2 * max_branch_offset)
@@ -6042,29 +5919,22 @@ ppc_type_of_stub (input_sec, rel, hash, destination)
/* Build a .plt call stub. */
-static bfd_byte *
-build_plt_stub (obfd, p, offset, glink)
- bfd *obfd;
- bfd_byte *p;
- int offset;
- int glink;
+static inline bfd_byte *
+build_plt_stub (bfd *obfd, bfd_byte *p, int offset)
{
#define PPC_LO(v) ((v) & 0xffff)
#define PPC_HI(v) (((v) >> 16) & 0xffff)
#define PPC_HA(v) PPC_HI ((v) + 0x8000)
- if (glink)
- bfd_put_32 (obfd, LD_R2_40R1, p), p += 4;
bfd_put_32 (obfd, ADDIS_R12_R2 | PPC_HA (offset), p), p += 4;
- if (!glink)
- bfd_put_32 (obfd, STD_R2_40R1, p), p += 4;
+ bfd_put_32 (obfd, STD_R2_40R1, p), p += 4;
bfd_put_32 (obfd, LD_R11_0R12 | PPC_LO (offset), p), p += 4;
if (PPC_HA (offset + 8) != PPC_HA (offset))
- bfd_put_32 (obfd, ADDIS_R12_R12_1, p), p += 4;
+ bfd_put_32 (obfd, ADDIS_R12_R12 | 1, p), p += 4;
offset += 8;
bfd_put_32 (obfd, LD_R2_0R12 | PPC_LO (offset), p), p += 4;
if (PPC_HA (offset + 8) != PPC_HA (offset))
- bfd_put_32 (obfd, ADDIS_R12_R12_1, p), p += 4;
+ bfd_put_32 (obfd, ADDIS_R12_R12 | 1, p), p += 4;
offset += 8;
bfd_put_32 (obfd, MTCTR_R11, p), p += 4;
bfd_put_32 (obfd, LD_R11_0R12 | PPC_LO (offset), p), p += 4;
@@ -6073,9 +5943,7 @@ build_plt_stub (obfd, p, offset, glink)
}
static bfd_boolean
-ppc_build_one_stub (gen_entry, in_arg)
- struct bfd_hash_entry *gen_entry;
- PTR in_arg;
+ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
{
struct ppc_stub_hash_entry *stub_entry;
struct ppc_branch_hash_entry *br_entry;
@@ -6092,7 +5960,7 @@ ppc_build_one_stub (gen_entry, in_arg)
/* Massage our args to the form they really have. */
stub_entry = (struct ppc_stub_hash_entry *) gen_entry;
- info = (struct bfd_link_info *) in_arg;
+ info = in_arg;
htab = ppc_hash_table (info);
stub_sec = stub_entry->stub_sec;
@@ -6101,11 +5969,29 @@ ppc_build_one_stub (gen_entry, in_arg)
stub_entry->stub_offset = stub_sec->_cooked_size;
loc = stub_sec->contents + stub_entry->stub_offset;
+ if (htab->emit_stub_syms)
+ {
+ struct elf_link_hash_entry *h;
+ h = elf_link_hash_lookup (&htab->elf, stub_entry->root.string,
+ TRUE, FALSE, FALSE);
+ if (h == NULL)
+ return FALSE;
+ h->root.type = bfd_link_hash_defined;
+ h->root.u.def.section = stub_entry->stub_sec;
+ h->root.u.def.value = stub_entry->stub_offset;
+ h->elf_link_hash_flags = (ELF_LINK_HASH_REF_REGULAR
+ | ELF_LINK_HASH_DEF_REGULAR
+ | ELF_LINK_HASH_REF_REGULAR_NONWEAK
+ | ELF_LINK_FORCED_LOCAL);
+ }
+
stub_bfd = stub_sec->owner;
+ htab->stub_count[stub_entry->stub_type - 1] += 1;
switch (stub_entry->stub_type)
{
case ppc_stub_long_branch:
+ case ppc_stub_long_branch_r2off:
/* Branches are relative. This is where we are going to. */
off = (stub_entry->target_value
+ stub_entry->target_section->output_offset
@@ -6116,13 +6002,30 @@ ppc_build_one_stub (gen_entry, in_arg)
+ stub_sec->output_offset
+ stub_sec->output_section->vma);
- BFD_ASSERT (off + (1 << 25) < (bfd_vma) (1 << 26));
+ if (stub_entry->stub_type != ppc_stub_long_branch_r2off)
+ size = 4;
+ else
+ {
+ bfd_vma r2off;
+
+ r2off = (htab->stub_group[stub_entry->target_section->id].toc_off
+ - htab->stub_group[stub_entry->id_sec->id].toc_off);
+ bfd_put_32 (stub_bfd, STD_R2_40R1, loc);
+ loc += 4;
+ bfd_put_32 (stub_bfd, ADDIS_R2_R2 | PPC_HA (r2off), loc);
+ loc += 4;
+ bfd_put_32 (stub_bfd, ADDI_R2_R2 | PPC_LO (r2off), loc);
+ loc += 4;
+ off -= 12;
+ size = 16;
+ }
+ bfd_put_32 (stub_bfd, B_DOT | (off & 0x3fffffc), loc);
- bfd_put_32 (stub_bfd, (bfd_vma) B_DOT | (off & 0x3fffffc), loc);
- size = 4;
+ BFD_ASSERT (off + (1 << 25) < (bfd_vma) (1 << 26));
break;
case ppc_stub_plt_branch:
+ case ppc_stub_plt_branch_r2off:
br_entry = ppc_branch_hash_lookup (&htab->branch_hash_table,
stub_entry->root.string + 9,
FALSE, FALSE);
@@ -6138,33 +6041,33 @@ ppc_build_one_stub (gen_entry, in_arg)
+ stub_entry->target_section->output_offset
+ stub_entry->target_section->output_section->vma);
- bfd_put_64 (htab->sbrlt->owner, off,
- htab->sbrlt->contents + br_entry->offset);
+ bfd_put_64 (htab->brlt->owner, off,
+ htab->brlt->contents + br_entry->offset);
if (info->shared)
{
/* Create a reloc for the branch lookup table entry. */
Elf_Internal_Rela rela;
- bfd_byte *loc;
+ bfd_byte *rl;
rela.r_offset = (br_entry->offset
- + htab->sbrlt->output_offset
- + htab->sbrlt->output_section->vma);
+ + htab->brlt->output_offset
+ + htab->brlt->output_section->vma);
rela.r_info = ELF64_R_INFO (0, R_PPC64_RELATIVE);
rela.r_addend = off;
- loc = htab->srelbrlt->contents;
- loc += htab->srelbrlt->reloc_count++ * sizeof (Elf64_External_Rela);
- bfd_elf64_swap_reloca_out (htab->srelbrlt->owner, &rela, loc);
+ rl = htab->relbrlt->contents;
+ rl += htab->relbrlt->reloc_count++ * sizeof (Elf64_External_Rela);
+ bfd_elf64_swap_reloca_out (htab->relbrlt->owner, &rela, rl);
}
off = (br_entry->offset
- + htab->sbrlt->output_offset
- + htab->sbrlt->output_section->vma
- - elf_gp (htab->sbrlt->output_section->owner)
- - TOC_BASE_OFF);
+ + htab->brlt->output_offset
+ + htab->brlt->output_section->vma
+ - elf_gp (htab->brlt->output_section->owner)
+ - htab->stub_group[stub_entry->id_sec->id].toc_off);
- if (off + 0x80000000 > 0xffffffff || (off & 7) != 0)
+ if (off + 0x80008000 > 0xffffffff || (off & 7) != 0)
{
(*_bfd_error_handler)
(_("linkage table error against `%s'"),
@@ -6175,11 +6078,34 @@ ppc_build_one_stub (gen_entry, in_arg)
}
indx = off;
- bfd_put_32 (stub_bfd, (bfd_vma) ADDIS_R12_R2 | PPC_HA (indx), loc);
- bfd_put_32 (stub_bfd, (bfd_vma) LD_R11_0R12 | PPC_LO (indx), loc + 4);
- bfd_put_32 (stub_bfd, (bfd_vma) MTCTR_R11, loc + 8);
- bfd_put_32 (stub_bfd, (bfd_vma) BCTR, loc + 12);
- size = 16;
+ if (stub_entry->stub_type != ppc_stub_plt_branch_r2off)
+ {
+ bfd_put_32 (stub_bfd, ADDIS_R12_R2 | PPC_HA (indx), loc);
+ loc += 4;
+ bfd_put_32 (stub_bfd, LD_R11_0R12 | PPC_LO (indx), loc);
+ size = 16;
+ }
+ else
+ {
+ bfd_vma r2off;
+
+ r2off = (htab->stub_group[stub_entry->target_section->id].toc_off
+ - htab->stub_group[stub_entry->id_sec->id].toc_off);
+ bfd_put_32 (stub_bfd, STD_R2_40R1, loc);
+ loc += 4;
+ bfd_put_32 (stub_bfd, ADDIS_R12_R2 | PPC_HA (indx), loc);
+ loc += 4;
+ bfd_put_32 (stub_bfd, LD_R11_0R12 | PPC_LO (indx), loc);
+ loc += 4;
+ bfd_put_32 (stub_bfd, ADDIS_R2_R2 | PPC_HA (r2off), loc);
+ loc += 4;
+ bfd_put_32 (stub_bfd, ADDI_R2_R2 | PPC_LO (r2off), loc);
+ size = 28;
+ }
+ loc += 4;
+ bfd_put_32 (stub_bfd, MTCTR_R11, loc);
+ loc += 4;
+ bfd_put_32 (stub_bfd, BCTR, loc);
break;
case ppc_stub_plt_call:
@@ -6191,7 +6117,9 @@ ppc_build_one_stub (gen_entry, in_arg)
{
/* Point the symbol at the stub. There may be multiple stubs,
we don't really care; The main thing is to make this sym
- defined somewhere. */
+ defined somewhere. Maybe defining the symbol in the stub
+ section is a silly idea. If we didn't do this, htab->top_id
+ could disappear. */
stub_entry->h->oh->root.type = bfd_link_hash_defined;
stub_entry->h->oh->root.u.def.section = stub_entry->stub_sec;
stub_entry->h->oh->root.u.def.value = stub_entry->stub_offset;
@@ -6209,12 +6137,12 @@ ppc_build_one_stub (gen_entry, in_arg)
abort ();
off &= ~ (bfd_vma) 1;
- off += (htab->splt->output_offset
- + htab->splt->output_section->vma
- - elf_gp (htab->splt->output_section->owner)
- - TOC_BASE_OFF);
+ off += (htab->plt->output_offset
+ + htab->plt->output_section->vma
+ - elf_gp (htab->plt->output_section->owner)
+ - htab->stub_group[stub_entry->id_sec->id].toc_off);
- if (off + 0x80000000 > 0xffffffff || (off & 7) != 0)
+ if (off + 0x80008000 > 0xffffffff || (off & 7) != 0)
{
(*_bfd_error_handler)
(_("linkage table error against `%s'"),
@@ -6224,7 +6152,7 @@ ppc_build_one_stub (gen_entry, in_arg)
return FALSE;
}
- p = build_plt_stub (stub_bfd, loc, (int) off, 0);
+ p = build_plt_stub (stub_bfd, loc, off);
size = p - loc;
break;
@@ -6242,9 +6170,7 @@ ppc_build_one_stub (gen_entry, in_arg)
long_branch stubs won't do. */
static bfd_boolean
-ppc_size_one_stub (gen_entry, in_arg)
- struct bfd_hash_entry *gen_entry;
- PTR in_arg;
+ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
{
struct ppc_stub_hash_entry *stub_entry;
struct ppc_link_hash_table *htab;
@@ -6253,7 +6179,7 @@ ppc_size_one_stub (gen_entry, in_arg)
/* Massage our args to the form they really have. */
stub_entry = (struct ppc_stub_hash_entry *) gen_entry;
- htab = (struct ppc_link_hash_table *) in_arg;
+ htab = in_arg;
if (stub_entry->stub_type == ppc_stub_plt_call)
{
@@ -6267,21 +6193,19 @@ ppc_size_one_stub (gen_entry, in_arg)
}
if (off >= (bfd_vma) -2)
abort ();
- off += (htab->splt->output_offset
- + htab->splt->output_section->vma
- - elf_gp (htab->splt->output_section->owner)
- - TOC_BASE_OFF);
+ off += (htab->plt->output_offset
+ + htab->plt->output_section->vma
+ - elf_gp (htab->plt->output_section->owner)
+ - htab->stub_group[stub_entry->id_sec->id].toc_off);
- size = 28;
- if (PPC_HA ((int) off + 16) != PPC_HA ((int) off))
+ size = PLT_CALL_STUB_SIZE;
+ if (PPC_HA (off + 16) != PPC_HA (off))
size += 4;
}
else
{
- /* ppc_stub_long_branch or ppc_stub_plt_branch. */
- stub_entry->stub_type = ppc_stub_long_branch;
- size = 4;
-
+ /* ppc_stub_long_branch or ppc_stub_plt_branch, or their r2off
+ variants. */
off = (stub_entry->target_value
+ stub_entry->target_section->output_offset
+ stub_entry->target_section->output_section->vma);
@@ -6289,6 +6213,19 @@ ppc_size_one_stub (gen_entry, in_arg)
+ stub_entry->stub_sec->output_offset
+ stub_entry->stub_sec->output_section->vma);
+ /* Reset the stub type from the plt variant in case we now
+ can reach with a shorter stub. */
+ if (stub_entry->stub_type >= ppc_stub_plt_branch)
+ stub_entry->stub_type += ppc_stub_long_branch - ppc_stub_plt_branch;
+
+ size = 4;
+ if (stub_entry->stub_type == ppc_stub_long_branch_r2off)
+ {
+ off -= 12;
+ size = 16;
+ }
+
+ /* If the branch offset if too big, use a ppc_stub_plt_branch. */
if (off + (1 << 25) >= (bfd_vma) (1 << 26))
{
struct ppc_branch_hash_entry *br_entry;
@@ -6307,11 +6244,14 @@ ppc_size_one_stub (gen_entry, in_arg)
if (br_entry->iter != htab->stub_iteration)
{
br_entry->iter = htab->stub_iteration;
- br_entry->offset = htab->sbrlt->_raw_size;
- htab->sbrlt->_raw_size += 8;
+ br_entry->offset = htab->brlt->_raw_size;
+ htab->brlt->_raw_size += 8;
}
- stub_entry->stub_type = ppc_stub_plt_branch;
+
+ stub_entry->stub_type += ppc_stub_plt_branch - ppc_stub_long_branch;
size = 16;
+ if (stub_entry->stub_type != ppc_stub_plt_branch)
+ size = 28;
}
}
@@ -6324,23 +6264,20 @@ ppc_size_one_stub (gen_entry, in_arg)
0 when no stubs will be needed, and 1 on success. */
int
-ppc64_elf_setup_section_lists (output_bfd, info)
- bfd *output_bfd;
- struct bfd_link_info *info;
+ppc64_elf_setup_section_lists (bfd *output_bfd, struct bfd_link_info *info)
{
bfd *input_bfd;
- int top_id, top_index;
+ int top_id, top_index, id;
asection *section;
- asection **input_list, **list;
+ asection **input_list;
bfd_size_type amt;
struct ppc_link_hash_table *htab = ppc_hash_table (info);
- if (htab->elf.root.creator->flavour != bfd_target_elf_flavour
- || htab->sbrlt == NULL)
+ if (htab->brlt == NULL)
return 0;
/* Find the top input section id. */
- for (input_bfd = info->input_bfds, top_id = 0;
+ for (input_bfd = info->input_bfds, top_id = 3;
input_bfd != NULL;
input_bfd = input_bfd->link_next)
{
@@ -6353,11 +6290,18 @@ ppc64_elf_setup_section_lists (output_bfd, info)
}
}
+ htab->top_id = top_id;
amt = sizeof (struct map_stub) * (top_id + 1);
- htab->stub_group = (struct map_stub *) bfd_zmalloc (amt);
+ htab->stub_group = bfd_zmalloc (amt);
if (htab->stub_group == NULL)
return -1;
+ /* Set toc_off for com, und, abs and ind sections. */
+ for (id = 0; id < 3; id++)
+ htab->stub_group[id].toc_off = TOC_BASE_OFF;
+
+ elf_gp (output_bfd) = htab->toc_curr = ppc64_elf_toc (output_bfd);
+
/* We can't use output_bfd->section_count here to find the top output
section index as some sections may have been removed, and
_bfd_strip_section_from_output doesn't renumber the indices. */
@@ -6371,27 +6315,107 @@ ppc64_elf_setup_section_lists (output_bfd, info)
htab->top_index = top_index;
amt = sizeof (asection *) * (top_index + 1);
- input_list = (asection **) bfd_malloc (amt);
+ input_list = bfd_zmalloc (amt);
htab->input_list = input_list;
if (input_list == NULL)
return -1;
- /* For sections we aren't interested in, mark their entries with a
- value we can check later. */
- list = input_list + top_index;
- do
- *list = bfd_abs_section_ptr;
- while (list-- != input_list);
+ return 1;
+}
- for (section = output_bfd->sections;
- section != NULL;
- section = section->next)
+/* The linker repeatedly calls this function for each toc input
+ section. Group input bfds such that the toc within a group
+ is less than 64k in size. Will break with cute linker scripts
+ that play games with dot in the output toc section. */
+
+void
+ppc64_elf_next_toc_section (struct bfd_link_info *info, asection *isec)
+{
+ struct ppc_link_hash_table *htab = ppc_hash_table (info);
+
+ if (!htab->no_multi_toc)
{
- if ((section->flags & SEC_CODE) != 0)
- input_list[section->index] = NULL;
+ bfd_vma addr = isec->output_offset + isec->output_section->vma;
+ bfd_vma off = addr - htab->toc_curr;
+ if (off + isec->_raw_size > 0x10000)
+ {
+ htab->toc_curr = addr;
+ htab->multi_toc_needed = 1;
+ }
+ elf_gp (isec->owner) = (htab->toc_curr
+ - elf_gp (isec->output_section->owner)
+ + TOC_BASE_OFF);
}
+}
- return 1;
+/* Called after the last call to the above function. */
+
+void
+ppc64_elf_reinit_toc (bfd *output_bfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info)
+{
+ struct ppc_link_hash_table *htab = ppc_hash_table (info);
+
+ /* toc_curr tracks the TOC offset used for code sections below in
+ ppc64_elf_next_input_section. Start off at 0x8000. */
+ htab->toc_curr = TOC_BASE_OFF;
+}
+
+/* No toc references were found in ISEC. If the code in ISEC makes no
+ calls, then there's no need to use toc adjusting stubs when branching
+ into ISEC. Actually, indirect calls from ISEC are OK as they will
+ load r2. */
+
+static int
+toc_adjusting_stub_needed (struct bfd_link_info *info, asection *isec)
+{
+ bfd_byte *contents;
+ bfd_size_type i;
+ int ret;
+ int branch_ok;
+
+ /* Hack for linux kernel. .fixup contains branches, but only back to
+ the function that hit an exception. */
+ branch_ok = strcmp (isec->name, ".fixup") == 0;
+
+ contents = elf_section_data (isec)->this_hdr.contents;
+ if (contents == NULL)
+ {
+ contents = bfd_malloc (isec->_raw_size);
+ if (contents == NULL)
+ return -1;
+ if (! bfd_get_section_contents (isec->owner, isec, contents,
+ (file_ptr) 0, isec->_raw_size))
+ {
+ free (contents);
+ return -1;
+ }
+ if (info->keep_memory)
+ elf_section_data (isec)->this_hdr.contents = contents;
+ }
+
+ /* Code scan, because we don't necessarily have relocs on calls to
+ static functions. */
+ ret = 0;
+ for (i = 0; i < isec->_raw_size; i += 4)
+ {
+ unsigned long insn = bfd_get_32 (isec->owner, contents + i);
+ /* Is this a branch? */
+ if ((insn & (0x1f << 26)) == (18 << 26)
+ /* If branch and link, it's a function call. */
+ && ((insn & 1) != 0
+ /* Sibling calls use a plain branch. I don't know a way
+ of deciding whether a branch is really a sibling call. */
+ || !branch_ok))
+ {
+ ret = 1;
+ break;
+ }
+ }
+
+ if (elf_section_data (isec)->this_hdr.contents != contents)
+ free (contents);
+ return ret;
}
/* The linker repeatedly calls this function for each input section,
@@ -6399,26 +6423,42 @@ ppc64_elf_setup_section_lists (output_bfd, info)
Build lists of input sections to determine groupings between which
we may insert linker stubs. */
-void
-ppc64_elf_next_input_section (info, isec)
- struct bfd_link_info *info;
- asection *isec;
+bfd_boolean
+ppc64_elf_next_input_section (struct bfd_link_info *info, asection *isec)
{
struct ppc_link_hash_table *htab = ppc_hash_table (info);
+ int ret;
- if (isec->output_section->index <= htab->top_index)
+ if ((isec->output_section->flags & SEC_CODE) != 0
+ && isec->output_section->index <= htab->top_index)
{
asection **list = htab->input_list + isec->output_section->index;
- if (*list != bfd_abs_section_ptr)
- {
- /* Steal the link_sec pointer for our list. */
+ /* Steal the link_sec pointer for our list. */
#define PREV_SEC(sec) (htab->stub_group[(sec)->id].link_sec)
- /* This happens to make the list in reverse order,
- which is what we want. */
- PREV_SEC (isec) = *list;
- *list = isec;
- }
+ /* This happens to make the list in reverse order,
+ which is what we want. */
+ PREV_SEC (isec) = *list;
+ *list = isec;
}
+
+ /* If a code section has a function that uses the TOC then we need
+ to use the right TOC (obviously). Also, make sure that .opd gets
+ the correct TOC value. */
+ if (isec->has_gp_reloc || (isec->flags & SEC_CODE) == 0)
+ {
+ if (elf_gp (isec->owner) != 0)
+ htab->toc_curr = elf_gp (isec->owner);
+ }
+ else if ((ret = toc_adjusting_stub_needed (info, isec)) < 0)
+ return FALSE;
+ else
+ isec->has_gp_reloc = ret;
+
+ /* Functions that don't use the TOC can belong in any TOC group.
+ Use the last TOC base. This happens to make _init and _fini
+ pasting work. */
+ htab->stub_group[isec->id].toc_off = htab->toc_curr;
+ return TRUE;
}
/* See whether we can group stub sections together. Grouping stub
@@ -6429,23 +6469,21 @@ ppc64_elf_next_input_section (info, isec)
the middle of a function is not a good idea. */
static void
-group_sections (htab, stub_group_size, stubs_always_before_branch)
- struct ppc_link_hash_table *htab;
- bfd_size_type stub_group_size;
- bfd_boolean stubs_always_before_branch;
+group_sections (struct ppc_link_hash_table *htab,
+ bfd_size_type stub_group_size,
+ bfd_boolean stubs_always_before_branch)
{
asection **list = htab->input_list + htab->top_index;
do
{
asection *tail = *list;
- if (tail == bfd_abs_section_ptr)
- continue;
while (tail != NULL)
{
asection *curr;
asection *prev;
bfd_size_type total;
bfd_boolean big_sec;
+ bfd_vma curr_toc;
curr = tail;
if (tail->_cooked_size)
@@ -6453,10 +6491,12 @@ group_sections (htab, stub_group_size, stubs_always_before_branch)
else
total = tail->_raw_size;
big_sec = total >= stub_group_size;
+ curr_toc = htab->stub_group[tail->id].toc_off;
while ((prev = PREV_SEC (curr)) != NULL
&& ((total += curr->output_offset - prev->output_offset)
- < stub_group_size))
+ < stub_group_size)
+ && htab->stub_group[prev->id].toc_off == curr_toc)
curr = prev;
/* OK, the size from the start of CURR to the end is less
@@ -6487,7 +6527,8 @@ group_sections (htab, stub_group_size, stubs_always_before_branch)
total = 0;
while (prev != NULL
&& ((total += tail->output_offset - prev->output_offset)
- < stub_group_size))
+ < stub_group_size)
+ && htab->stub_group[prev->id].toc_off == curr_toc)
{
tail = prev;
prev = PREV_SEC (tail);
@@ -6509,14 +6550,12 @@ group_sections (htab, stub_group_size, stubs_always_before_branch)
instruction. */
bfd_boolean
-ppc64_elf_size_stubs (output_bfd, stub_bfd, info, group_size,
- add_stub_section, layout_sections_again)
- bfd *output_bfd;
- bfd *stub_bfd;
- struct bfd_link_info *info;
- bfd_signed_vma group_size;
- asection * (*add_stub_section) PARAMS ((const char *, asection *));
- void (*layout_sections_again) PARAMS ((void));
+ppc64_elf_size_stubs (bfd *output_bfd,
+ bfd *stub_bfd,
+ struct bfd_link_info *info,
+ bfd_signed_vma group_size,
+ asection *(*add_stub_section) (const char *, asection *),
+ void (*layout_sections_again) (void))
{
bfd_size_type stub_group_size;
bfd_boolean stubs_always_before_branch;
@@ -6594,8 +6633,7 @@ ppc64_elf_size_stubs (output_bfd, stub_bfd, info, group_size,
/* Get the relocs. */
internal_relocs
- = _bfd_elf_link_read_relocs (input_bfd, section, NULL,
- (Elf_Internal_Rela *) NULL,
+ = _bfd_elf_link_read_relocs (input_bfd, section, NULL, NULL,
info->keep_memory);
if (internal_relocs == NULL)
goto error_ret_free_local;
@@ -6605,7 +6643,8 @@ ppc64_elf_size_stubs (output_bfd, stub_bfd, info, group_size,
irelaend = irela + section->reloc_count;
for (; irela < irelaend; irela++)
{
- unsigned int r_type, r_indx;
+ enum elf_ppc64_reloc_type r_type;
+ unsigned int r_indx;
enum ppc_stub_type stub_type;
struct ppc_stub_hash_entry *stub_entry;
asection *sym_sec;
@@ -6620,17 +6659,17 @@ ppc64_elf_size_stubs (output_bfd, stub_bfd, info, group_size,
r_type = ELF64_R_TYPE (irela->r_info);
r_indx = ELF64_R_SYM (irela->r_info);
- if (r_type >= (unsigned int) R_PPC64_max)
+ if (r_type >= R_PPC64_max)
{
bfd_set_error (bfd_error_bad_value);
goto error_ret_free_internal;
}
/* Only look for stubs on branch instructions. */
- if (r_type != (unsigned int) R_PPC64_REL24
- && r_type != (unsigned int) R_PPC64_REL14
- && r_type != (unsigned int) R_PPC64_REL14_BRTAKEN
- && r_type != (unsigned int) R_PPC64_REL14_BRNTAKEN)
+ if (r_type != R_PPC64_REL24
+ && r_type != R_PPC64_REL14
+ && r_type != R_PPC64_REL14_BRTAKEN
+ && r_type != R_PPC64_REL14_BRNTAKEN)
continue;
/* Now determine the call target, its name, value,
@@ -6676,6 +6715,24 @@ ppc64_elf_size_stubs (output_bfd, stub_bfd, info, group_size,
/* Determine what (if any) linker stub is needed. */
stub_type = ppc_type_of_stub (section, irela, &hash,
destination);
+
+ if (stub_type != ppc_stub_plt_call)
+ {
+ /* Check whether we need a TOC adjusting stub.
+ Since the linker pastes together pieces from
+ different object files when creating the
+ _init and _fini functions, it may be that a
+ call to what looks like a local sym is in
+ fact a call needing a TOC adjustment. */
+ if (sym_sec != NULL
+ && sym_sec->output_section != NULL
+ && (htab->stub_group[sym_sec->id].toc_off
+ != htab->stub_group[section->id].toc_off)
+ && sym_sec->has_gp_reloc
+ && section->has_gp_reloc)
+ stub_type = ppc_stub_long_branch_r2off;
+ }
+
if (stub_type == ppc_stub_none)
continue;
@@ -6728,9 +6785,9 @@ ppc64_elf_size_stubs (output_bfd, stub_bfd, info, group_size,
return FALSE;
}
+ stub_entry->stub_type = stub_type;
stub_entry->target_value = sym_value;
stub_entry->target_section = sym_sec;
- stub_entry->stub_type = stub_type;
stub_entry->h = hash;
stub_entry->addend = irela->r_addend;
stub_changed = TRUE;
@@ -6763,8 +6820,8 @@ ppc64_elf_size_stubs (output_bfd, stub_bfd, info, group_size,
stub_sec->_raw_size = 0;
stub_sec->_cooked_size = 0;
}
- htab->sbrlt->_raw_size = 0;
- htab->sbrlt->_cooked_size = 0;
+ htab->brlt->_raw_size = 0;
+ htab->brlt->_cooked_size = 0;
bfd_hash_traverse (&htab->stub_hash_table, ppc_size_one_stub, htab);
@@ -6784,8 +6841,7 @@ ppc64_elf_size_stubs (output_bfd, stub_bfd, info, group_size,
move, we'll be called again. Provide a value for TOCstart. */
bfd_vma
-ppc64_elf_toc (obfd)
- bfd *obfd;
+ppc64_elf_toc (bfd *obfd)
{
asection *s;
bfd_vma TOCstart;
@@ -6842,14 +6898,15 @@ ppc64_elf_toc (obfd)
hash table. This function is called via gldelf64ppc_finish. */
bfd_boolean
-ppc64_elf_build_stubs (info)
- struct bfd_link_info *info;
+ppc64_elf_build_stubs (bfd_boolean emit_stub_syms,
+ struct bfd_link_info *info,
+ char **stats)
{
struct ppc_link_hash_table *htab = ppc_hash_table (info);
asection *stub_sec;
- bfd_vma plt_r2;
bfd_byte *p;
+ htab->emit_stub_syms = emit_stub_syms;
for (stub_sec = htab->stub_bfd->sections;
stub_sec != NULL;
stub_sec = stub_sec->next)
@@ -6860,59 +6917,94 @@ ppc64_elf_build_stubs (info)
size = stub_sec->_raw_size;
if (size != 0)
{
- stub_sec->contents = (bfd_byte *) bfd_zalloc (htab->stub_bfd, size);
+ stub_sec->contents = bfd_zalloc (htab->stub_bfd, size);
if (stub_sec->contents == NULL)
return FALSE;
}
stub_sec->_cooked_size = 0;
}
- if (htab->splt != NULL)
+ if (htab->plt != NULL)
{
unsigned int indx;
+ bfd_vma plt0;
/* Build the .glink plt call stub. */
- plt_r2 = (htab->splt->output_offset
- + htab->splt->output_section->vma
- - elf_gp (htab->splt->output_section->owner)
- - TOC_BASE_OFF);
- p = htab->sglink->contents;
- p = build_plt_stub (htab->sglink->owner, p, (int) plt_r2, 1);
- while (p < htab->sglink->contents + GLINK_CALL_STUB_SIZE)
+ plt0 = (htab->plt->output_section->vma
+ + htab->plt->output_offset
+ - (htab->glink->output_section->vma
+ + htab->glink->output_offset
+ + GLINK_CALL_STUB_SIZE));
+ if (plt0 + 0x80008000 > 0xffffffff)
{
- bfd_put_32 (htab->sglink->owner, NOP, p);
- p += 4;
+ (*_bfd_error_handler) (_(".glink and .plt too far apart"));
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
}
+ p = htab->glink->contents;
+ bfd_put_32 (htab->glink->owner, MFCTR_R12, p);
+ p += 4;
+ bfd_put_32 (htab->glink->owner, SLDI_R11_R0_3, p);
+ p += 4;
+ bfd_put_32 (htab->glink->owner, ADDIC_R2_R0_32K, p);
+ p += 4;
+ bfd_put_32 (htab->glink->owner, SUB_R12_R12_R11, p);
+ p += 4;
+ bfd_put_32 (htab->glink->owner, SRADI_R2_R2_63, p);
+ p += 4;
+ bfd_put_32 (htab->glink->owner, SLDI_R11_R0_2, p);
+ p += 4;
+ bfd_put_32 (htab->glink->owner, AND_R2_R2_R11, p);
+ p += 4;
+ bfd_put_32 (htab->glink->owner, SUB_R12_R12_R11, p);
+ p += 4;
+ bfd_put_32 (htab->glink->owner, ADD_R12_R12_R2, p);
+ p += 4;
+ bfd_put_32 (htab->glink->owner, ADDIS_R12_R12 | PPC_HA (plt0), p);
+ p += 4;
+ bfd_put_32 (htab->glink->owner, LD_R11_0R12 | PPC_LO (plt0), p);
+ p += 4;
+ bfd_put_32 (htab->glink->owner, ADDI_R12_R12 | PPC_LO (plt0), p);
+ p += 4;
+ bfd_put_32 (htab->glink->owner, LD_R2_0R12 | 8, p);
+ p += 4;
+ bfd_put_32 (htab->glink->owner, MTCTR_R11, p);
+ p += 4;
+ bfd_put_32 (htab->glink->owner, LD_R11_0R12 | 16, p);
+ p += 4;
+ bfd_put_32 (htab->glink->owner, BCTR, p);
+ p += 4;
+
/* Build the .glink lazy link call stubs. */
indx = 0;
- while (p < htab->sglink->contents + htab->sglink->_raw_size)
+ while (p < htab->glink->contents + htab->glink->_raw_size)
{
if (indx < 0x8000)
{
- bfd_put_32 (htab->sglink->owner, LI_R0_0 | indx, p);
+ bfd_put_32 (htab->glink->owner, LI_R0_0 | indx, p);
p += 4;
}
else
{
- bfd_put_32 (htab->sglink->owner, LIS_R0_0 | PPC_HI (indx), p);
+ bfd_put_32 (htab->glink->owner, LIS_R0_0 | PPC_HI (indx), p);
p += 4;
- bfd_put_32 (htab->sglink->owner, ORI_R0_R0_0 | PPC_LO (indx), p);
+ bfd_put_32 (htab->glink->owner, ORI_R0_R0_0 | PPC_LO (indx), p);
p += 4;
}
- bfd_put_32 (htab->sglink->owner,
- B_DOT | ((htab->sglink->contents - p) & 0x3fffffc), p);
+ bfd_put_32 (htab->glink->owner,
+ B_DOT | ((htab->glink->contents - p) & 0x3fffffc), p);
indx++;
p += 4;
}
- htab->sglink->_cooked_size = p - htab->sglink->contents;
+ htab->glink->_cooked_size = p - htab->glink->contents;
}
- if (htab->sbrlt->_raw_size != 0)
+ if (htab->brlt->_raw_size != 0)
{
- htab->sbrlt->contents = (bfd_byte *) bfd_zalloc (htab->sbrlt->owner,
- htab->sbrlt->_raw_size);
- if (htab->sbrlt->contents == NULL)
+ htab->brlt->contents = bfd_zalloc (htab->brlt->owner,
+ htab->brlt->_raw_size);
+ if (htab->brlt->contents == NULL)
return FALSE;
}
@@ -6928,13 +7020,35 @@ ppc64_elf_build_stubs (info)
}
if (stub_sec != NULL
- || htab->sglink->_raw_size != htab->sglink->_cooked_size)
+ || htab->glink->_raw_size != htab->glink->_cooked_size)
{
htab->stub_error = TRUE;
(*_bfd_error_handler) (_("stubs don't match calculated size"));
}
- return !htab->stub_error;
+ if (htab->stub_error)
+ return FALSE;
+
+ if (stats != NULL)
+ {
+ *stats = bfd_malloc (500);
+ if (*stats == NULL)
+ return FALSE;
+
+ sprintf (*stats, _("linker stubs in %u groups\n"
+ " branch %lu\n"
+ " toc adjust %lu\n"
+ " long branch %lu\n"
+ " long toc adj %lu\n"
+ " plt call %lu"),
+ htab->stub_bfd->section_count,
+ htab->stub_count[ppc_stub_long_branch - 1],
+ htab->stub_count[ppc_stub_long_branch_r2off - 1],
+ htab->stub_count[ppc_stub_plt_branch - 1],
+ htab->stub_count[ppc_stub_plt_branch_r2off - 1],
+ htab->stub_count[ppc_stub_plt_call - 1]);
+ }
+ return TRUE;
}
/* The RELOCATE_SECTION function is called by the ELF backend linker
@@ -6946,7 +7060,7 @@ ppc64_elf_build_stubs (info)
This function is responsible for adjust the section contents as
necessary, and (if using Rela relocs and generating a
- relocateable output file) adjusting the reloc addend as
+ relocatable output file) adjusting the reloc addend as
necessary.
This function does not have to worry about setting the reloc
@@ -6960,23 +7074,21 @@ ppc64_elf_build_stubs (info)
The global hash table entry for the global symbols can be found
via elf_sym_hashes (input_bfd).
- When generating relocateable output, this function must handle
+ When generating relocatable output, this function must handle
STB_LOCAL/STT_SECTION symbols specially. The output symbol is
going to be the section symbol corresponding to the output
section, which means that the addend must be adjusted
accordingly. */
static bfd_boolean
-ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
- contents, relocs, local_syms, local_sections)
- bfd *output_bfd;
- struct bfd_link_info *info;
- bfd *input_bfd;
- asection *input_section;
- bfd_byte *contents;
- Elf_Internal_Rela *relocs;
- Elf_Internal_Sym *local_syms;
- asection **local_sections;
+ppc64_elf_relocate_section (bfd *output_bfd,
+ struct bfd_link_info *info,
+ bfd *input_bfd,
+ asection *input_section,
+ bfd_byte *contents,
+ Elf_Internal_Rela *relocs,
+ Elf_Internal_Sym *local_syms,
+ asection **local_sections)
{
struct ppc_link_hash_table *htab;
Elf_Internal_Shdr *symtab_hdr;
@@ -6992,7 +7104,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
/* Disabled until we sort out how ld should choose 'y' vs 'at'. */
bfd_boolean is_power4 = FALSE;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
/* Initialize howto table if needed. */
@@ -7023,26 +7135,21 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_vma relocation;
bfd_boolean unresolved_reloc;
bfd_boolean warned;
- long insn;
+ long insn, mask;
struct ppc_stub_hash_entry *stub_entry;
bfd_vma max_br_offset;
bfd_vma from;
- r_type = (enum elf_ppc64_reloc_type) ELF64_R_TYPE (rel->r_info);
+ r_type = ELF64_R_TYPE (rel->r_info);
r_symndx = ELF64_R_SYM (rel->r_info);
- sym = (Elf_Internal_Sym *) 0;
- sec = (asection *) 0;
- h = (struct elf_link_hash_entry *) 0;
- sym_name = (const char *) 0;
+ sym = NULL;
+ sec = NULL;
+ h = NULL;
+ sym_name = NULL;
unresolved_reloc = FALSE;
warned = FALSE;
- if (r_type == R_PPC64_TOC)
- {
- /* Relocation value is TOC base. Symbol is ignored. */
- relocation = TOCstart + TOC_BASE_OFF;
- }
- else if (r_symndx < symtab_hdr->sh_info)
+ if (r_symndx < symtab_hdr->sh_info)
{
/* It's a local symbol. */
sym = local_syms + r_symndx;
@@ -7153,7 +7260,11 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
tls_mask = *toc_tls;
if (r_type == R_PPC64_TOC16_DS
|| r_type == R_PPC64_TOC16_LO_DS)
- goto toctprel;
+ {
+ if (tls_mask != 0
+ && (tls_mask & (TLS_DTPREL | TLS_TPREL)) == 0)
+ goto toctprel;
+ }
else
{
/* If we found a GD reloc pair, then we might be
@@ -7176,11 +7287,11 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
case R_PPC64_GOT_TPREL16_DS:
case R_PPC64_GOT_TPREL16_LO_DS:
- toctprel:
if (tls_mask != 0
&& (tls_mask & TLS_TPREL) == 0)
{
bfd_vma insn;
+ toctprel:
insn = bfd_get_32 (output_bfd, contents + rel->r_offset - 2);
insn &= 31 << 21;
insn |= 0x3c0d0000; /* addis 0,13,0 */
@@ -7292,8 +7403,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
/* The next instruction should be a call to
__tls_get_addr. Peek at the reloc to be sure. */
- r_type2
- = (enum elf_ppc64_reloc_type) ELF64_R_TYPE (rel[1].r_info);
+ r_type2 = ELF64_R_TYPE (rel[1].r_info);
r_symndx2 = ELF64_R_SYM (rel[1].r_info);
if (r_symndx2 < symtab_hdr->sh_info
|| (r_type2 != R_PPC64_REL14
@@ -7360,7 +7470,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
if (tls_gd == 0)
{
/* We changed the symbol on an LD reloc. Start over
- in order to get h, sym, sec etc. right. */
+ in order to get h, sym, sec etc. right. */
rel--;
continue;
}
@@ -7380,8 +7490,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
r_type = R_PPC64_TPREL64;
else
{
- bfd_put_64 (output_bfd, (bfd_vma) 1,
- contents + rel->r_offset);
+ bfd_put_64 (output_bfd, 1, contents + rel->r_offset);
r_type = R_PPC64_NONE;
}
rel->r_info = ELF64_R_INFO (r_symndx, r_type);
@@ -7391,8 +7500,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
if ((tls_mask & TLS_LD) == 0)
{
- bfd_put_64 (output_bfd, (bfd_vma) 1,
- contents + rel->r_offset);
+ bfd_put_64 (output_bfd, 1, contents + rel->r_offset);
r_type = R_PPC64_NONE;
rel->r_info = ELF64_R_INFO (r_symndx, r_type);
}
@@ -7449,20 +7557,28 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
insn ^= 0x01 << 21;
}
- bfd_put_32 (output_bfd, (bfd_vma) insn, contents + rel->r_offset);
+ bfd_put_32 (output_bfd, insn, contents + rel->r_offset);
break;
case R_PPC64_REL24:
- /* A REL24 branching to a linkage function is followed by a
- nop. We replace the nop with a ld in order to restore
- the TOC base pointer. Only calls to shared objects need
- to alter the TOC base. These are recognized by their
- need for a PLT entry. */
- if (h != NULL
- && (fdh = ((struct ppc_link_hash_entry *) h)->oh) != NULL
- && fdh->plt.plist != NULL
+ /* Calls to functions with a different TOC, such as calls to
+ shared objects, need to alter the TOC pointer. This is
+ done using a linkage stub. A REL24 branching to these
+ linkage stubs needs to be followed by a nop, as the nop
+ will be replaced with an instruction to restore the TOC
+ base pointer. */
+ if (((h != NULL
+ && (fdh = ((struct ppc_link_hash_entry *) h)->oh) != NULL
+ && fdh->plt.plist != NULL)
+ || ((fdh = h, sec) != NULL
+ && sec->output_section != NULL
+ && (htab->stub_group[sec->id].toc_off
+ != htab->stub_group[input_section->id].toc_off)))
&& (stub_entry = ppc_get_stub_entry (input_section, sec, fdh,
- rel, htab)) != NULL)
+ rel, htab)) != NULL
+ && (stub_entry->stub_type == ppc_stub_plt_call
+ || stub_entry->stub_type == ppc_stub_plt_branch_r2off
+ || stub_entry->stub_type == ppc_stub_long_branch_r2off))
{
bfd_boolean can_plt_call = 0;
@@ -7472,7 +7588,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
if (insn == NOP
|| insn == CROR_151515 || insn == CROR_313131)
{
- bfd_put_32 (input_bfd, (bfd_vma) LD_R2_40R1,
+ bfd_put_32 (input_bfd, LD_R2_40R1,
contents + rel->r_offset + 4);
can_plt_call = 1;
}
@@ -7480,11 +7596,42 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
if (!can_plt_call)
{
- /* If this is a plain branch rather than a branch
- and link, don't require a nop. */
- insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
- if ((insn & 1) == 0)
- can_plt_call = 1;
+ if (stub_entry->stub_type == ppc_stub_plt_call)
+ {
+ /* If this is a plain branch rather than a branch
+ and link, don't require a nop. */
+ insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
+ if ((insn & 1) == 0)
+ can_plt_call = 1;
+ }
+ else
+ {
+ if (strcmp (input_section->output_section->name,
+ ".init") == 0
+ || strcmp (input_section->output_section->name,
+ ".fini") == 0)
+ (*_bfd_error_handler)
+ (_("%s(%s+0x%lx): automatic multiple TOCs "
+ "not supported using your crt files; "
+ "recompile with -mminimal-toc or upgrade gcc"),
+ bfd_archive_filename (input_bfd),
+ input_section->name,
+ (long) rel->r_offset);
+ else
+ (*_bfd_error_handler)
+ (_("%s(%s+0x%lx): sibling call optimization to `%s' "
+ "does not allow automatic multiple TOCs; "
+ "recompile with -mminimal-toc or "
+ "-fno-optimize-sibling-calls, "
+ "or make `%s' extern"),
+ bfd_archive_filename (input_bfd),
+ input_section->name,
+ (long) rel->r_offset,
+ sym_name,
+ sym_name);
+ bfd_set_error (bfd_error_bad_value);
+ ret = FALSE;
+ }
}
if (can_plt_call)
@@ -7492,7 +7639,8 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
relocation = (stub_entry->stub_offset
+ stub_entry->stub_sec->output_offset
+ stub_entry->stub_sec->output_section->vma);
- unresolved_reloc = FALSE;
+ if (stub_entry->stub_type == ppc_stub_plt_call)
+ unresolved_reloc = FALSE;
}
}
@@ -7588,7 +7736,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_vma off;
unsigned long indx = 0;
- if (htab->sgot == NULL)
+ if (htab->got == NULL)
abort ();
if (tls_type == (TLS_TLS | TLS_LD)
@@ -7650,21 +7798,23 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|| ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|| h->root.type != bfd_link_hash_undefweak))
{
- outrel.r_offset = (htab->sgot->output_section->vma
- + htab->sgot->output_offset
+ outrel.r_offset = (htab->got->output_section->vma
+ + htab->got->output_offset
+ off);
+ outrel.r_addend = rel->r_addend;
if (tls_type & (TLS_LD | TLS_GD))
{
outrel.r_addend = 0;
outrel.r_info = ELF64_R_INFO (indx, R_PPC64_DTPMOD64);
if (tls_type == (TLS_TLS | TLS_GD))
{
- loc = htab->srelgot->contents;
- loc += (htab->srelgot->reloc_count++
+ loc = htab->relgot->contents;
+ loc += (htab->relgot->reloc_count++
* sizeof (Elf64_External_Rela));
bfd_elf64_swap_reloca_out (output_bfd,
&outrel, loc);
outrel.r_offset += 8;
+ outrel.r_addend = rel->r_addend;
outrel.r_info
= ELF64_R_INFO (indx, R_PPC64_DTPREL64);
}
@@ -7674,23 +7824,31 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
else if (tls_type == (TLS_TLS | TLS_TPREL))
outrel.r_info = ELF64_R_INFO (indx, R_PPC64_TPREL64);
else if (indx == 0)
- outrel.r_info = ELF64_R_INFO (indx, R_PPC64_RELATIVE);
+ {
+ outrel.r_info = ELF64_R_INFO (indx, R_PPC64_RELATIVE);
+
+ /* Write the .got section contents for the sake
+ of prelink. */
+ loc = htab->got->contents + off;
+ bfd_put_64 (output_bfd, outrel.r_addend + relocation,
+ loc);
+ }
else
outrel.r_info = ELF64_R_INFO (indx, R_PPC64_GLOB_DAT);
- outrel.r_addend = rel->r_addend;
- if (indx == 0)
+
+ if (indx == 0 && tls_type != (TLS_TLS | TLS_LD))
{
outrel.r_addend += relocation;
if (tls_type & (TLS_GD | TLS_DTPREL | TLS_TPREL))
outrel.r_addend -= htab->tls_sec->vma;
}
- loc = htab->srelgot->contents;
- loc += (htab->srelgot->reloc_count++
+ loc = htab->relgot->contents;
+ loc += (htab->relgot->reloc_count++
* sizeof (Elf64_External_Rela));
bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc);
}
- /* Init the .got section contents if we're not
+ /* Init the .got section contents here if we're not
emitting a reloc. */
else
{
@@ -7706,20 +7864,20 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
if (tls_type == (TLS_TLS | TLS_GD))
{
bfd_put_64 (output_bfd, relocation,
- htab->sgot->contents + off + 8);
+ htab->got->contents + off + 8);
relocation = 1;
}
}
bfd_put_64 (output_bfd, relocation,
- htab->sgot->contents + off);
+ htab->got->contents + off);
}
}
if (off >= (bfd_vma) -2)
abort ();
- relocation = htab->sgot->output_offset + off;
+ relocation = htab->got->output_offset + off;
/* TOC base (r2) is TOC start plus 0x8000. */
addend = - TOC_BASE_OFF;
@@ -7743,21 +7901,32 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
symbol. This happens when statically linking PIC code,
or when using -Bsymbolic. Go find a match if there is a
PLT entry. */
- if (htab->splt != NULL)
+ if (htab->plt != NULL)
{
struct plt_entry *ent;
for (ent = h->plt.plist; ent != NULL; ent = ent->next)
if (ent->addend == rel->r_addend
&& ent->plt.offset != (bfd_vma) -1)
{
- relocation = (htab->splt->output_section->vma
- + htab->splt->output_offset
+ relocation = (htab->plt->output_section->vma
+ + htab->plt->output_offset
+ ent->plt.offset);
unresolved_reloc = FALSE;
}
}
break;
+ case R_PPC64_TOC:
+ /* Relocation value is TOC base. */
+ relocation = TOCstart;
+ if (r_symndx == 0)
+ relocation += htab->stub_group[input_section->id].toc_off;
+ else if (sec != NULL && !unresolved_reloc)
+ relocation += htab->stub_group[sec->id].toc_off;
+ else
+ unresolved_reloc = TRUE;
+ goto dodyn2;
+
/* TOC16 relocs. We want the offset relative to the TOC base,
which is the address of the start of the TOC plus 0x8000.
The TOC consists of sections .got, .toc, .tocbss, and .plt,
@@ -7768,7 +7937,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
case R_PPC64_TOC16_DS:
case R_PPC64_TOC16_LO_DS:
case R_PPC64_TOC16_HA:
- addend -= TOCstart + TOC_BASE_OFF;
+ addend -= TOCstart + htab->stub_group[input_section->id].toc_off;
break;
/* Relocate against the beginning of the section. */
@@ -7778,7 +7947,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
case R_PPC64_SECTOFF_DS:
case R_PPC64_SECTOFF_LO_DS:
case R_PPC64_SECTOFF_HA:
- if (sec != (asection *) 0)
+ if (sec != NULL)
addend -= sec->output_section->vma;
break;
@@ -7864,7 +8033,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
break;
/* Fall thru. */
- case R_PPC64_TOC:
+ dodyn2:
if ((input_section->flags & SEC_ALLOC) == 0)
break;
@@ -7890,6 +8059,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_boolean skip, relocate;
asection *sreloc;
bfd_byte *loc;
+ bfd_vma out_off;
/* When generating a dynamic object, these relocations
are copied into the output file to be resolved at run
@@ -7898,22 +8068,34 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
skip = FALSE;
relocate = FALSE;
- outrel.r_offset =
- _bfd_elf_section_offset (output_bfd, info, input_section,
- rel->r_offset);
- if (outrel.r_offset == (bfd_vma) -1)
+ out_off = _bfd_elf_section_offset (output_bfd, info,
+ input_section, rel->r_offset);
+ if (out_off == (bfd_vma) -1)
skip = TRUE;
- else if (outrel.r_offset == (bfd_vma) -2)
+ else if (out_off == (bfd_vma) -2)
skip = TRUE, relocate = TRUE;
- outrel.r_offset += (input_section->output_section->vma
- + input_section->output_offset);
+ out_off += (input_section->output_section->vma
+ + input_section->output_offset);
+ outrel.r_offset = out_off;
outrel.r_addend = rel->r_addend;
+ /* Optimize unaligned reloc use. */
+ if ((r_type == R_PPC64_ADDR64 && (out_off & 7) != 0)
+ || (r_type == R_PPC64_UADDR64 && (out_off & 7) == 0))
+ r_type ^= R_PPC64_ADDR64 ^ R_PPC64_UADDR64;
+ else if ((r_type == R_PPC64_ADDR32 && (out_off & 3) != 0)
+ || (r_type == R_PPC64_UADDR32 && (out_off & 3) == 0))
+ r_type ^= R_PPC64_ADDR32 ^ R_PPC64_UADDR32;
+ else if ((r_type == R_PPC64_ADDR16 && (out_off & 1) != 0)
+ || (r_type == R_PPC64_UADDR16 && (out_off & 1) == 0))
+ r_type ^= R_PPC64_ADDR16 ^ R_PPC64_UADDR16;
+
if (skip)
memset (&outrel, 0, sizeof outrel);
else if (h != NULL
&& !SYMBOL_REFERENCES_LOCAL (info, h)
- && !is_opd)
+ && !is_opd
+ && r_type != R_PPC64_TOC)
outrel.r_info = ELF64_R_INFO (h->dynindx, r_type);
else
{
@@ -7921,8 +8103,6 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
or this is an opd section reloc which must point
at a local function. */
outrel.r_addend += relocation;
- /* ??? why? */
- relocate = TRUE;
if (r_type == R_PPC64_ADDR64 || r_type == R_PPC64_TOC)
{
if (is_opd && h != NULL)
@@ -7940,6 +8120,12 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
unresolved_reloc = FALSE;
}
outrel.r_info = ELF64_R_INFO (0, R_PPC64_RELATIVE);
+
+ /* We need to relocate .opd contents for ld.so.
+ Prelink also wants simple and consistent rules
+ for relocs. This make all RELATIVE relocs have
+ *r_offset equal to r_addend. */
+ relocate = TRUE;
}
else
{
@@ -7981,9 +8167,29 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
/* If this reloc is against an external symbol, it will
be computed at runtime, so there's no need to do
- anything now. */
+ anything now. However, for the sake of prelink ensure
+ that the section contents are a known value. */
if (! relocate)
- continue;
+ {
+ unresolved_reloc = FALSE;
+ /* The value chosen here is quite arbitrary as ld.so
+ ignores section contents except for the special
+ case of .opd where the contents might be accessed
+ before relocation. Choose zero, as that won't
+ cause reloc overflow. */
+ relocation = 0;
+ addend = 0;
+ /* Use *r_offset == r_addend for R_PPC64_ADDR64 relocs
+ to improve backward compatibility with older
+ versions of ld. */
+ if (r_type == R_PPC64_ADDR64)
+ addend = outrel.r_addend;
+ /* Adjust pc_relative relocs to have zero in *r_offset. */
+ else if (ppc64_elf_howto_table[r_type]->pc_relative)
+ addend = (input_section->output_section->vma
+ + input_section->output_offset
+ + rel->r_offset);
+ }
}
break;
@@ -8008,7 +8214,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
(*_bfd_error_handler)
(_("%s: relocation %s is not supported for symbol %s."),
bfd_archive_filename (input_bfd),
- ppc64_elf_howto_table[(int) r_type]->name, sym_name);
+ ppc64_elf_howto_table[r_type]->name, sym_name);
bfd_set_error (bfd_error_invalid_operation);
ret = FALSE;
@@ -8072,12 +8278,23 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
case R_PPC64_TPREL16_LO_DS:
case R_PPC64_DTPREL16_DS:
case R_PPC64_DTPREL16_LO_DS:
- if (((relocation + addend) & 3) != 0)
+ insn = bfd_get_32 (input_bfd, contents + (rel->r_offset & ~3));
+ mask = 3;
+ /* If this reloc is against an lq insn, then the value must be
+ a multiple of 16. This is somewhat of a hack, but the
+ "correct" way to do this by defining _DQ forms of all the
+ _DS relocs bloats all reloc switches in this file. It
+ doesn't seem to make much sense to use any of these relocs
+ in data, so testing the insn should be safe. */
+ if ((insn & (0x3f << 26)) == (56 << 26))
+ mask = 15;
+ if (((relocation + addend) & mask) != 0)
{
(*_bfd_error_handler)
- (_("%s: error: relocation %s not a multiple of 4"),
+ (_("%s: error: relocation %s not a multiple of %d"),
bfd_archive_filename (input_bfd),
- ppc64_elf_howto_table[(int) r_type]->name);
+ ppc64_elf_howto_table[r_type]->name,
+ mask + 1);
bfd_set_error (bfd_error_bad_value);
ret = FALSE;
continue;
@@ -8094,12 +8311,18 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
max_br_offset = 1 << 25;
branch_check:
- /* If the branch is out of reach, then redirect the
- call to the local stub for this function. */
+ /* If the branch is out of reach or the TOC register needs
+ adjusting, then redirect the call to the local stub for
+ this function. */
from = (rel->r_offset
+ input_section->output_offset
+ input_section->output_section->vma);
- if (relocation + addend - from + max_br_offset >= 2 * max_br_offset
+ if ((relocation + addend - from + max_br_offset >= 2 * max_br_offset
+ || (sec != NULL
+ && sec->output_section != NULL
+ && sec->id <= htab->top_id
+ && (htab->stub_group[sec->id].toc_off
+ != htab->stub_group[input_section->id].toc_off)))
&& (stub_entry = ppc_get_stub_entry (input_section, sec, h,
rel, htab)) != NULL)
{
@@ -8148,7 +8371,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
continue;
if (h != NULL
&& h->root.type == bfd_link_hash_undefweak
- && ppc64_elf_howto_table[(int) r_type]->pc_relative)
+ && ppc64_elf_howto_table[r_type]->pc_relative)
{
/* Assume this is a call protected by other code that
detects the symbol is undefined. If this is the case,
@@ -8160,7 +8383,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
if (!((*info->callbacks->reloc_overflow)
- (info, sym_name, ppc64_elf_howto_table[(int) r_type]->name,
+ (info, sym_name, ppc64_elf_howto_table[r_type]->name,
rel->r_addend, input_bfd, input_section, rel->r_offset)))
return FALSE;
}
@@ -8171,7 +8394,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_archive_filename (input_bfd),
bfd_get_section_name (input_bfd, input_section),
(long) rel->r_offset,
- ppc64_elf_howto_table[(int) r_type]->name,
+ ppc64_elf_howto_table[r_type]->name,
sym_name,
(int) r);
ret = FALSE;
@@ -8186,11 +8409,10 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
dynamic sections here. */
static bfd_boolean
-ppc64_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
- bfd *output_bfd;
- struct bfd_link_info *info;
- struct elf_link_hash_entry *h;
- Elf_Internal_Sym *sym;
+ppc64_elf_finish_dynamic_symbol (bfd *output_bfd,
+ struct bfd_link_info *info,
+ struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym)
{
struct ppc_link_hash_table *htab;
bfd *dynobj;
@@ -8210,20 +8432,20 @@ ppc64_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
/* This symbol has an entry in the procedure linkage
table. Set it up. */
- if (htab->splt == NULL
- || htab->srelplt == NULL
- || htab->sglink == NULL)
+ if (htab->plt == NULL
+ || htab->relplt == NULL
+ || htab->glink == NULL)
abort ();
/* Create a JMP_SLOT reloc to inform the dynamic linker to
fill in the PLT entry. */
- rela.r_offset = (htab->splt->output_section->vma
- + htab->splt->output_offset
+ rela.r_offset = (htab->plt->output_section->vma
+ + htab->plt->output_offset
+ ent->plt.offset);
rela.r_info = ELF64_R_INFO (h->dynindx, R_PPC64_JMP_SLOT);
rela.r_addend = ent->addend;
- loc = htab->srelplt->contents;
+ loc = htab->relplt->contents;
loc += ((ent->plt.offset - PLT_INITIAL_ENTRY_SIZE) / PLT_ENTRY_SIZE
* sizeof (Elf64_External_Rela));
bfd_elf64_swap_reloca_out (output_bfd, &rela, loc);
@@ -8240,7 +8462,7 @@ ppc64_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
if (h->dynindx == -1
|| (h->root.type != bfd_link_hash_defined
&& h->root.type != bfd_link_hash_defweak)
- || htab->srelbss == NULL)
+ || htab->relbss == NULL)
abort ();
rela.r_offset = (h->root.u.def.value
@@ -8248,8 +8470,8 @@ ppc64_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
+ h->root.u.def.section->output_offset);
rela.r_info = ELF64_R_INFO (h->dynindx, R_PPC64_COPY);
rela.r_addend = 0;
- loc = htab->srelbss->contents;
- loc += htab->srelbss->reloc_count++ * sizeof (Elf64_External_Rela);
+ loc = htab->relbss->contents;
+ loc += htab->relbss->reloc_count++ * sizeof (Elf64_External_Rela);
bfd_elf64_swap_reloca_out (output_bfd, &rela, loc);
}
@@ -8264,12 +8486,11 @@ ppc64_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
dynamic linker, before writing them out. */
static enum elf_reloc_type_class
-ppc64_elf_reloc_type_class (rela)
- const Elf_Internal_Rela *rela;
+ppc64_elf_reloc_type_class (const Elf_Internal_Rela *rela)
{
enum elf_ppc64_reloc_type r_type;
- r_type = (enum elf_ppc64_reloc_type) ELF64_R_TYPE (rela->r_info);
+ r_type = ELF64_R_TYPE (rela->r_info);
switch (r_type)
{
case R_PPC64_RELATIVE:
@@ -8286,9 +8507,8 @@ ppc64_elf_reloc_type_class (rela)
/* Finish up the dynamic sections. */
static bfd_boolean
-ppc64_elf_finish_dynamic_sections (output_bfd, info)
- bfd *output_bfd;
- struct bfd_link_info *info;
+ppc64_elf_finish_dynamic_sections (bfd *output_bfd,
+ struct bfd_link_info *info)
{
struct ppc_link_hash_table *htab;
bfd *dynobj;
@@ -8302,7 +8522,7 @@ ppc64_elf_finish_dynamic_sections (output_bfd, info)
{
Elf64_External_Dyn *dyncon, *dynconend;
- if (sdyn == NULL || htab->sgot == NULL)
+ if (sdyn == NULL || htab->got == NULL)
abort ();
dyncon = (Elf64_External_Dyn *) sdyn->contents;
@@ -8320,8 +8540,13 @@ ppc64_elf_finish_dynamic_sections (output_bfd, info)
continue;
case DT_PPC64_GLINK:
- s = htab->sglink;
+ s = htab->glink;
dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
+ /* We stupidly defined DT_PPC64_GLINK to be the start
+ of glink rather than the first entry point, which is
+ what ld.so needs, and now have a bigger stub to
+ support automatic multiple TOCs. */
+ dyn.d_un.d_ptr += GLINK_CALL_STUB_SIZE - 32;
break;
case DT_PPC64_OPD:
@@ -8339,23 +8564,23 @@ ppc64_elf_finish_dynamic_sections (output_bfd, info)
break;
case DT_PLTGOT:
- s = htab->splt;
+ s = htab->plt;
dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
break;
case DT_JMPREL:
- s = htab->srelplt;
+ s = htab->relplt;
dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
break;
case DT_PLTRELSZ:
- dyn.d_un.d_val = htab->srelplt->_raw_size;
+ dyn.d_un.d_val = htab->relplt->_raw_size;
break;
case DT_RELASZ:
/* Don't count procedure linkage table relocs in the
overall reloc count. */
- s = htab->srelplt;
+ s = htab->relplt;
if (s == NULL)
continue;
dyn.d_un.d_val -= s->_raw_size;
@@ -8365,7 +8590,7 @@ ppc64_elf_finish_dynamic_sections (output_bfd, info)
/* We may not be using the standard ELF linker script.
If .rela.plt is the first .rela section, we adjust
DT_RELA to not include it. */
- s = htab->srelplt;
+ s = htab->relplt;
if (s == NULL)
continue;
if (dyn.d_un.d_ptr != s->output_section->vma + s->output_offset)
@@ -8378,75 +8603,26 @@ ppc64_elf_finish_dynamic_sections (output_bfd, info)
}
}
- if (htab->sgot != NULL && htab->sgot->_raw_size != 0)
+ if (htab->got != NULL && htab->got->_raw_size != 0)
{
/* Fill in the first entry in the global offset table.
We use it to hold the link-time TOCbase. */
bfd_put_64 (output_bfd,
elf_gp (output_bfd) + TOC_BASE_OFF,
- htab->sgot->contents);
+ htab->got->contents);
/* Set .got entry size. */
- elf_section_data (htab->sgot->output_section)->this_hdr.sh_entsize = 8;
+ elf_section_data (htab->got->output_section)->this_hdr.sh_entsize = 8;
}
- if (htab->splt != NULL && htab->splt->_raw_size != 0)
+ if (htab->plt != NULL && htab->plt->_raw_size != 0)
{
/* Set .plt entry size. */
- elf_section_data (htab->splt->output_section)->this_hdr.sh_entsize
+ elf_section_data (htab->plt->output_section)->this_hdr.sh_entsize
= PLT_ENTRY_SIZE;
}
return TRUE;
}
-#define TARGET_LITTLE_SYM bfd_elf64_powerpcle_vec
-#define TARGET_LITTLE_NAME "elf64-powerpcle"
-#define TARGET_BIG_SYM bfd_elf64_powerpc_vec
-#define TARGET_BIG_NAME "elf64-powerpc"
-#define ELF_ARCH bfd_arch_powerpc
-#define ELF_MACHINE_CODE EM_PPC64
-#define ELF_MAXPAGESIZE 0x10000
-#define elf_info_to_howto ppc64_elf_info_to_howto
-
-#ifdef EM_CYGNUS_POWERPC
-#define ELF_MACHINE_ALT1 EM_CYGNUS_POWERPC
-#endif
-
-#ifdef EM_PPC_OLD
-#define ELF_MACHINE_ALT2 EM_PPC_OLD
-#endif
-
-#define elf_backend_want_got_sym 0
-#define elf_backend_want_plt_sym 0
-#define elf_backend_plt_alignment 3
-#define elf_backend_plt_not_loaded 1
-#define elf_backend_got_symbol_offset 0
-#define elf_backend_got_header_size 8
-#define elf_backend_plt_header_size PLT_INITIAL_ENTRY_SIZE
-#define elf_backend_can_gc_sections 1
-#define elf_backend_can_refcount 1
-#define elf_backend_rela_normal 1
-
-#define bfd_elf64_bfd_reloc_type_lookup ppc64_elf_reloc_type_lookup
-#define bfd_elf64_bfd_merge_private_bfd_data ppc64_elf_merge_private_bfd_data
-#define bfd_elf64_new_section_hook ppc64_elf_new_section_hook
-#define bfd_elf64_bfd_link_hash_table_create ppc64_elf_link_hash_table_create
-#define bfd_elf64_bfd_link_hash_table_free ppc64_elf_link_hash_table_free
-
-#define elf_backend_object_p ppc64_elf_object_p
-#define elf_backend_create_dynamic_sections ppc64_elf_create_dynamic_sections
-#define elf_backend_copy_indirect_symbol ppc64_elf_copy_indirect_symbol
-#define elf_backend_check_relocs ppc64_elf_check_relocs
-#define elf_backend_gc_mark_hook ppc64_elf_gc_mark_hook
-#define elf_backend_gc_sweep_hook ppc64_elf_gc_sweep_hook
-#define elf_backend_adjust_dynamic_symbol ppc64_elf_adjust_dynamic_symbol
-#define elf_backend_hide_symbol ppc64_elf_hide_symbol
-#define elf_backend_always_size_sections ppc64_elf_func_desc_adjust
-#define elf_backend_size_dynamic_sections ppc64_elf_size_dynamic_sections
-#define elf_backend_relocate_section ppc64_elf_relocate_section
-#define elf_backend_finish_dynamic_symbol ppc64_elf_finish_dynamic_symbol
-#define elf_backend_reloc_type_class ppc64_elf_reloc_type_class
-#define elf_backend_finish_dynamic_sections ppc64_elf_finish_dynamic_sections
-
#include "elf64-target.h"
diff --git a/bfd/elf64-ppc.h b/bfd/elf64-ppc.h
index 4b80cc56ecb..0572d528016 100644
--- a/bfd/elf64-ppc.h
+++ b/bfd/elf64-ppc.h
@@ -18,21 +18,25 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
bfd_boolean ppc64_elf_mark_entry_syms
- PARAMS ((struct bfd_link_info *));
+ (struct bfd_link_info *);
bfd_boolean ppc64_elf_edit_opd
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
bfd_boolean ppc64_elf_tls_setup
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
bfd_boolean ppc64_elf_tls_optimize
- PARAMS ((bfd *, struct bfd_link_info *));
+ (bfd *, struct bfd_link_info *);
bfd_vma ppc64_elf_toc
- PARAMS ((bfd *));
+ (bfd *);
int ppc64_elf_setup_section_lists
- PARAMS ((bfd *, struct bfd_link_info *));
-void ppc64_elf_next_input_section
- PARAMS ((struct bfd_link_info *, asection *));
+ (bfd *, struct bfd_link_info *);
+void ppc64_elf_next_toc_section
+ (struct bfd_link_info *, asection *);
+void ppc64_elf_reinit_toc
+ (bfd *, struct bfd_link_info *);
+bfd_boolean ppc64_elf_next_input_section
+ (struct bfd_link_info *, asection *);
bfd_boolean ppc64_elf_size_stubs
- PARAMS ((bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
- asection *(*) (const char *, asection *), void (*) (void)));
+ (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
+ asection *(*) (const char *, asection *), void (*) (void));
bfd_boolean ppc64_elf_build_stubs
- PARAMS ((struct bfd_link_info *));
+ (bfd_boolean, struct bfd_link_info *, char **);
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index 98555f269bf..21501de8d2a 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -849,7 +849,7 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
bfd_signed_vma *local_got_refcounts;
int tls_type, old_tls_type;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
htab = elf_s390_hash_table (info);
@@ -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;
@@ -2169,7 +2169,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
htab = elf_s390_hash_table (info);
diff --git a/bfd/elf64-sh64.c b/bfd/elf64-sh64.c
index d666fca9cbe..95bbbd2af1f 100644
--- a/bfd/elf64-sh64.c
+++ b/bfd/elf64-sh64.c
@@ -1585,9 +1585,9 @@ sh_elf64_relocate_section (output_bfd, info, input_bfd, input_section,
_("Unexpected STO_SH5_ISA32 on local symbol is not handled"),
input_bfd, input_section, rel->r_offset));
- if (info->relocateable)
+ if (info->relocatable)
{
- /* This is a relocateable link. We don't have to change
+ /* This is a relocatable link. We don't have to change
anything, unless the reloc is against a section symbol,
in which case we have to adjust according to where the
section symbol winds up in the output section. */
@@ -1631,8 +1631,8 @@ sh_elf64_relocate_section (output_bfd, info, input_bfd, input_section,
{
/* Section symbols are never (?) placed in the hash table, so
we can just ignore hash relocations when creating a
- relocateable object file. */
- if (info->relocateable)
+ relocatable object file. */
+ if (info->relocatable)
continue;
h = sym_hashes[r_symndx - symtab_hdr->sh_info];
@@ -2178,12 +2178,12 @@ sh_elf64_relocate_section (output_bfd, info, input_bfd, input_section,
static bfd_byte *
sh_elf64_get_relocated_section_contents (output_bfd, link_info, link_order,
- data, relocateable, symbols)
+ data, relocatable, symbols)
bfd *output_bfd;
struct bfd_link_info *link_info;
struct bfd_link_order *link_order;
bfd_byte *data;
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
asymbol **symbols;
{
Elf_Internal_Shdr *symtab_hdr;
@@ -2195,11 +2195,11 @@ sh_elf64_get_relocated_section_contents (output_bfd, link_info, link_order,
/* We only need to handle the case of relaxing, or of having a
particular set of section contents, specially. */
- if (relocateable
+ if (relocatable
|| elf_section_data (input_section)->this_hdr.contents == NULL)
return bfd_generic_get_relocated_section_contents (output_bfd, link_info,
link_order, data,
- relocateable,
+ relocatable,
symbols);
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
@@ -2527,7 +2527,7 @@ sh_elf64_check_relocs (abfd, info, sec, relocs)
srelgot = NULL;
sreloc = NULL;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -2932,11 +2932,11 @@ sh64_elf64_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
{
struct elf_link_hash_entry *h;
- /* For relocateable links, we register the DataLabel sym in its own
+ /* For relocatable links, we register the DataLabel sym in its own
right, and tweak the name when it's output. Otherwise, we make
an indirect symbol of it. */
flagword flags
- = info->relocateable || info->emitrelocations
+ = info->relocatable || info->emitrelocations
? BSF_GLOBAL : BSF_GLOBAL | BSF_INDIRECT;
char *dl_name
@@ -2980,9 +2980,9 @@ sh64_elf64_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
free (dl_name);
if (h->type != STT_DATALABEL
- || ((info->relocateable || info->emitrelocations)
+ || ((info->relocatable || info->emitrelocations)
&& h->root.type != bfd_link_hash_undefined)
- || (! info->relocateable && !info->emitrelocations
+ || (! info->relocatable && !info->emitrelocations
&& h->root.type != bfd_link_hash_indirect))
{
/* Make sure we don't get confused on invalid input. */
@@ -3027,7 +3027,7 @@ sh64_elf64_link_output_symbol_hook (abfd, info, cname, sym, input_sec)
{
char *name = (char *) cname;
- if (info->relocateable || info->emitrelocations)
+ if (info->relocatable || info->emitrelocations)
{
if (ELF_ST_TYPE (sym->st_info) == STT_DATALABEL)
name[strlen (name) - strlen (DATALABEL_SUFFIX)] = 0;
@@ -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..dbaa954b413 100644
--- a/bfd/elf64-sparc.c
+++ b/bfd/elf64-sparc.c
@@ -1101,7 +1101,7 @@ sparc64_elf_check_relocs (abfd, info, sec, relocs)
asection *srelgot;
asection *sreloc;
- if (info->relocateable || !(sec->flags & SEC_ALLOC))
+ if (info->relocatable || !(sec->flags & SEC_ALLOC))
return TRUE;
dynobj = elf_hash_table (info)->dynobj;
@@ -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;
@@ -2022,7 +2022,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
dynobj = elf_hash_table (info)->dynobj;
@@ -2684,7 +2684,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
overflows. We don't, but this breaks stabs debugging
info, whose relocations are only 32-bits wide. Ignore
overflows for discarded entries. */
- if (r_type == R_SPARC_32
+ if ((r_type == R_SPARC_32 || r_type == R_SPARC_DISP32)
&& _bfd_elf_section_offset (output_bfd, info, input_section,
rel->r_offset) == (bfd_vma) -1)
break;
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index c0ce57d708d..76af7df9e68 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -705,7 +705,7 @@ elf64_x86_64_check_relocs (abfd, info, sec, relocs)
const Elf_Internal_Rela *rel_end;
asection *sreloc;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
htab = elf64_x86_64_hash_table (info);
@@ -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;
@@ -1872,7 +1872,7 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
htab = elf64_x86_64_hash_table (info);
diff --git a/bfd/elfcode.h b/bfd/elfcode.h
index 55c5b4264e0..6686ab97ced 100644
--- a/bfd/elfcode.h
+++ b/bfd/elfcode.h
@@ -1187,7 +1187,7 @@ elf_slurp_symbol_table (abfd, symptrs, dynamic)
else
sym->symbol.section = bfd_abs_section_ptr;
- /* If this is a relocateable file, then the symbol value is
+ /* If this is a relocatable file, then the symbol value is
already section relative. */
if ((abfd->flags & (EXEC_P | DYNAMIC)) != 0)
sym->symbol.value -= sym->symbol.section->vma;
@@ -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..f4a65bf273b 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -463,7 +463,7 @@ elf_link_add_object_symbols (abfd, info)
/* You can't use -r against a dynamic object. Also, there's no
hope of using a dynamic object which does not exactly match
the format of the output file. */
- if (info->relocateable || info->hash->creator != abfd->xvec)
+ if (info->relocatable || info->hash->creator != abfd->xvec)
{
bfd_set_error (bfd_error_invalid_operation);
goto error_return;
@@ -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;
@@ -534,7 +534,7 @@ elf_link_add_object_symbols (abfd, info)
FALSE, collect, (struct bfd_link_hash_entry **) NULL)))
goto error_return;
- if (! info->relocateable)
+ if (! info->relocatable)
{
/* Clobber the section size so that the warning does
not get copied into the output file. */
@@ -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;
@@ -1658,7 +1658,7 @@ elf_link_add_object_symbols (abfd, info)
}
}
- if (! info->relocateable && ! dynamic
+ if (! info->relocatable && ! dynamic
&& is_elf_hash_table (info))
{
asection *s;
@@ -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->relocatable
+ && 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);
@@ -2872,7 +2909,7 @@ struct elf_outext_info
struct elf_final_link_info *finfo;
};
-/* When performing a relocateable link, the input relocations are
+/* When performing a relocatable link, the input relocations are
preserved. But, if they reference global symbols, the indices
referenced must be updated. Update all the relocations in
REL_HDR (there are COUNT of them), using the data in REL_HASH. */
@@ -3149,7 +3186,7 @@ elf_bfd_final_link (abfd, info)
dynamic = elf_hash_table (info)->dynamic_sections_created;
dynobj = elf_hash_table (info)->dynobj;
- emit_relocs = (info->relocateable
+ emit_relocs = (info->relocatable
|| info->emitrelocations
|| bed->elf_backend_emit_relocs);
@@ -3234,7 +3271,7 @@ elf_bfd_final_link (abfd, info)
if (sec->flags & SEC_MERGE)
merged = TRUE;
- if (info->relocateable || info->emitrelocations)
+ if (info->relocatable || info->emitrelocations)
reloc_count = sec->reloc_count;
else if (bed->elf_backend_count_relocs)
{
@@ -3359,7 +3396,7 @@ elf_bfd_final_link (abfd, info)
o->vma = 0;
}
- if (! info->relocateable && merged)
+ if (! info->relocatable && merged)
elf_link_hash_traverse (elf_hash_table (info),
_bfd_elf_link_sec_merge_syms, (PTR) abfd);
@@ -3487,7 +3524,7 @@ elf_bfd_final_link (abfd, info)
if (o != NULL)
o->target_index = bfd_get_symcount (abfd);
elfsym.st_shndx = i;
- if (info->relocateable || o == NULL)
+ if (info->relocatable || o == NULL)
elfsym.st_value = 0;
else
elfsym.st_value = o->vma;
@@ -3598,13 +3635,13 @@ elf_bfd_final_link (abfd, info)
Unfortunately, there is no way to know the total number of local
symbols until we have seen all of them, and the local symbol
indices precede the global symbol indices. This means that when
- we are generating relocateable output, and we see a reloc against
+ we are generating relocatable output, and we see a reloc against
a global symbol, we can not know the symbol index until we have
finished examining all the local symbols to see which ones we are
going to output. To deal with this, we keep the relocations in
memory, and don't output them until the end of the link. This is
an unfortunate waste of memory, but I don't see a good way around
- it. Fortunately, it only happens when performing a relocateable
+ it. Fortunately, it only happens when performing a relocatable
link, which is not the common case. FIXME: If keep_memory is set
we could write the relocs out and then read them again; I don't
know how bad the memory loss will be. */
@@ -4044,7 +4081,7 @@ elf_bfd_final_link (abfd, info)
}
}
- if (info->relocateable)
+ if (info->relocatable)
{
bfd_boolean failed = FALSE;
@@ -4416,8 +4453,9 @@ elf_link_output_extsym (h, data)
program is run. We don't have to worry about symbols that are
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)
+ if (! finfo->info->relocatable
+ && (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
@@ -4434,7 +4472,7 @@ elf_link_output_extsym (h, data)
/* We should also warn if a forced local symbol is referenced from
shared libraries. */
- if (! finfo->info->relocateable
+ if (! finfo->info->relocatable
&& (! finfo->info->shared || ! finfo->info->allow_shlib_undefined)
&& (h->elf_link_hash_flags
& (ELF_LINK_FORCED_LOCAL | ELF_LINK_HASH_REF_DYNAMIC
@@ -4532,11 +4570,11 @@ elf_link_output_extsym (h, data)
return FALSE;
}
- /* ELF symbols in relocateable files are section relative,
- but in nonrelocateable files they are virtual
+ /* ELF symbols in relocatable files are section relative,
+ but in nonrelocatable files they are virtual
addresses. */
sym.st_value = h->root.u.def.value + input_sec->output_offset;
- if (! finfo->info->relocateable)
+ if (! finfo->info->relocatable)
{
sym.st_value += input_sec->output_section->vma;
if (h->type == STT_TLS)
@@ -4619,7 +4657,7 @@ elf_link_output_extsym (h, data)
/* If a non-weak symbol with non-default visibility is not defined
locally, it is a fatal error. */
- if (! finfo->info->relocateable
+ if (! finfo->info->relocatable
&& ELF_ST_VISIBILITY (sym.st_other) != STV_DEFAULT
&& ELF_ST_BIND (sym.st_info) != STB_WEAK
&& h->root.type == bfd_link_hash_undefined
@@ -4749,7 +4787,7 @@ elf_link_input_bfd (finfo, input_bfd)
if ((input_bfd->flags & DYNAMIC) != 0)
return TRUE;
- emit_relocs = (finfo->info->relocateable
+ emit_relocs = (finfo->info->relocatable
|| finfo->info->emitrelocations
|| bed->elf_backend_emit_relocs);
@@ -4844,7 +4882,7 @@ elf_link_input_bfd (finfo, input_bfd)
continue;
/* If we are discarding all local symbols, we don't want to
- output this one. If we are generating a relocateable output
+ output this one. If we are generating a relocatable output
file, then some of the local symbols may be required by
relocs; we output them below as we discover that they are
needed. */
@@ -4859,7 +4897,7 @@ elf_link_input_bfd (finfo, input_bfd)
if ((isym->st_shndx < SHN_LORESERVE || isym->st_shndx > SHN_HIRESERVE)
&& isec != NULL
&& ((! isec->linker_mark && (isec->flags & SEC_HAS_CONTENTS) != 0)
- || (! finfo->info->relocateable
+ || (! finfo->info->relocatable
&& (isec->flags & SEC_EXCLUDE) != 0)))
continue;
@@ -4874,7 +4912,7 @@ elf_link_input_bfd (finfo, input_bfd)
&& (bfd_hash_lookup (finfo->info->keep_hash, name, FALSE, FALSE)
== NULL))
|| (((finfo->info->discard == discard_sec_merge
- && (isec->flags & SEC_MERGE) && ! finfo->info->relocateable)
+ && (isec->flags & SEC_MERGE) && ! finfo->info->relocatable)
|| finfo->info->discard == discard_l)
&& bfd_is_local_label_name (input_bfd, name)))
continue;
@@ -4891,7 +4929,7 @@ elf_link_input_bfd (finfo, input_bfd)
*pindex = bfd_get_symcount (output_bfd);
- /* ELF symbols in relocateable files are section relative, but
+ /* ELF symbols in relocatable files are section relative, but
in executable files they are virtual addresses. Note that
this code assumes that all ELF sections have an associated
BFD section with a reasonable value for output_offset; below
@@ -4899,7 +4937,7 @@ elf_link_input_bfd (finfo, input_bfd)
output_section. Any special sections must be set up to meet
these requirements. */
osym.st_value += isec->output_offset;
- if (! finfo->info->relocateable)
+ if (! finfo->info->relocatable)
{
osym.st_value += isec->output_section->vma;
if (ELF_ST_TYPE (osym.st_info) == STT_TLS)
@@ -4967,9 +5005,9 @@ elf_link_input_bfd (finfo, input_bfd)
from discarded sections and section symbols from
removed link-once sections. Complain about relocs
against discarded sections. Zero relocs against removed
- link-once sections. */
- if (!finfo->info->relocateable
- && !elf_section_ignore_discarded_relocs (o))
+ link-once sections. Preserve debug information as much
+ as we can. */
+ if (!elf_section_ignore_discarded_relocs (o))
{
Elf_Internal_Rela *rel, *relend;
@@ -4978,6 +5016,7 @@ elf_link_input_bfd (finfo, input_bfd)
for ( ; rel < relend; rel++)
{
unsigned long r_symndx = ELF_R_SYM (rel->r_info);
+ asection *sec;
if (r_symndx >= locsymcount
|| (elf_bad_symtab (input_bfd)
@@ -4992,28 +5031,36 @@ elf_link_input_bfd (finfo, input_bfd)
/* Complain if the definition comes from a
discarded section. */
+ sec = h->root.u.def.section;
if ((h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
- && elf_discarded_section (h->root.u.def.section))
+ && elf_discarded_section (sec))
{
if ((o->flags & SEC_DEBUGGING) != 0)
{
BFD_ASSERT (r_symndx != 0);
- memset (rel, 0, sizeof (*rel));
+ /* Try to preserve debug information. */
+ if ((o->flags & SEC_DEBUGGING) != 0
+ && sec->kept_section != NULL
+ && sec->_raw_size == sec->kept_section->_raw_size)
+ h->root.u.def.section
+ = sec->kept_section;
+ else
+ 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
{
- asection *sec = finfo->sections[r_symndx];
+ sec = finfo->sections[r_symndx];
if (sec != NULL && elf_discarded_section (sec))
{
@@ -5021,32 +5068,36 @@ elf_link_input_bfd (finfo, input_bfd)
|| (sec->flags & SEC_LINK_ONCE) != 0)
{
BFD_ASSERT (r_symndx != 0);
- rel->r_info
- = ELF_R_INFO (0, ELF_R_TYPE (rel->r_info));
- rel->r_addend = 0;
+ /* Try to preserve debug information. */
+ if ((o->flags & SEC_DEBUGGING) != 0
+ && sec->kept_section != NULL
+ && sec->_raw_size == sec->kept_section->_raw_size)
+ finfo->sections[r_symndx]
+ = sec->kept_section;
+ else
+ {
+ rel->r_info
+ = ELF_R_INFO (0, ELF_R_TYPE (rel->r_info));
+ rel->r_addend = 0;
+ }
}
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;
}
}
}
@@ -5057,7 +5108,7 @@ elf_link_input_bfd (finfo, input_bfd)
The back end routine is responsible for adjusting the
section contents as necessary, and (if using Rela relocs
- and generating a relocateable output file) adjusting the
+ and generating a relocatable output file) adjusting the
reloc addend as necessary.
The back end routine does not have to worry about setting
@@ -5067,7 +5118,7 @@ elf_link_input_bfd (finfo, input_bfd)
internal symbols, and can access the hash table entries
for the external symbols via elf_sym_hashes (input_bfd).
- When generating relocateable output, the back end routine
+ When generating relocatable output, the back end routine
must handle STB_LOCAL/STT_SECTION symbols specially. The
output symbol is going to be a section symbol
corresponding to the output section, which will require
@@ -5106,7 +5157,7 @@ elf_link_input_bfd (finfo, input_bfd)
+ elf_section_data (o->output_section)->rel_count
+ elf_section_data (o->output_section)->rel_count2);
last_offset = o->output_offset;
- if (!finfo->info->relocateable)
+ if (!finfo->info->relocatable)
last_offset += o->output_section->vma;
for (next_erel = 0; irela < irelaend; irela++, next_erel++)
{
@@ -5139,7 +5190,7 @@ elf_link_input_bfd (finfo, input_bfd)
irela->r_offset += o->output_offset;
/* Relocs in an executable have to be virtual addresses. */
- if (!finfo->info->relocateable)
+ if (!finfo->info->relocatable)
irela->r_offset += o->output_section->vma;
last_offset = irela->r_offset;
@@ -5243,7 +5294,7 @@ elf_link_input_bfd (finfo, input_bfd)
return FALSE;
sym.st_value += sec->output_offset;
- if (! finfo->info->relocateable)
+ if (! finfo->info->relocatable)
{
sym.st_value += osec->vma;
if (ELF_ST_TYPE (sym.st_info) == STT_TLS)
@@ -5271,7 +5322,7 @@ elf_link_input_bfd (finfo, input_bfd)
/* Swap out the relocs. */
if (bed->elf_backend_emit_relocs
- && !(finfo->info->relocateable
+ && !(finfo->info->relocatable
|| finfo->info->emitrelocations))
reloc_emitter = bed->elf_backend_emit_relocs;
else
@@ -5471,10 +5522,10 @@ elf_reloc_link_order (output_bfd, info, output_section, link_order)
}
/* The address of a reloc is relative to the section in a
- relocateable file, and is a virtual address in an executable
+ relocatable file, and is a virtual address in an executable
file. */
offset = link_order->offset;
- if (! info->relocateable)
+ if (! info->relocatable)
offset += output_section->vma;
for (i = 0; i < bed->s->int_rels_per_ext_rel; i++)
@@ -6138,7 +6189,7 @@ elf_gc_sections (abfd, info)
struct elf_link_hash_entry *h, Elf_Internal_Sym *));
if (!get_elf_backend_data (abfd)->can_gc_sections
- || info->relocateable || info->emitrelocations
+ || info->relocatable || info->emitrelocations
|| elf_hash_table (info)->dynamic_sections_created)
return TRUE;
@@ -6252,23 +6303,25 @@ elf_gc_record_vtentry (abfd, sec, h, addend)
if (addend >= h->vtable_entries_size)
{
- size_t size, bytes;
+ size_t size, bytes, file_align;
bfd_boolean *ptr = h->vtable_entries_used;
/* While the symbol is undefined, we have to be prepared to handle
a zero size. */
+ file_align = 1 << log_file_align;
if (h->root.type == bfd_link_hash_undefined)
- size = addend;
+ size = addend + file_align;
else
{
size = h->size;
- if (size < addend)
+ if (addend >= size)
{
/* Oops! We've got a reference past the defined end of
the table. This is probably a bug -- shall we warn? */
- size = addend;
+ size = addend + file_align;
}
}
+ size = (size + file_align - 1) & -file_align;
/* Allocate one extra entry for use as a "done" flag for the
consolidation pass. */
@@ -6546,7 +6599,7 @@ elf_bfd_discard_info (output_bfd, info)
continue;
eh = bfd_get_section_by_name (abfd, ".eh_frame");
- if (info->relocateable
+ if (info->relocatable
|| (eh != NULL
&& (eh->_raw_size == 0
|| bfd_is_abs_section (eh->output_section))))
@@ -6652,7 +6705,7 @@ elf_bfd_discard_info (output_bfd, info)
}
if (info->eh_frame_hdr
- && !info->relocateable
+ && !info->relocatable
&& _bfd_elf_discard_section_eh_frame_hdr (output_bfd, info))
ret = TRUE;
diff --git a/bfd/elfn32-mips.c b/bfd/elfn32-mips.c
index 2e499488821..60c6ad0404f 100644
--- a/bfd/elfn32-mips.c
+++ b/bfd/elfn32-mips.c
@@ -1453,9 +1453,10 @@ mips_elf_got16_reloc (abfd, reloc_entry, symbol, data, input_section,
char **error_message;
{
/* If we're relocating, and this is a local symbol, we can handle it
- just like HI16. */
+ just like an R_MIPS_HI16. */
if (output_bfd != (bfd *) NULL
- && (symbol->flags & BSF_SECTION_SYM) != 0)
+ && ((symbol->flags & BSF_SECTION_SYM) != 0
+ || (symbol->flags & BSF_LOCAL) == 0))
return mips_elf_hi16_reloc (abfd, reloc_entry, symbol, data,
input_section, output_bfd, error_message);
@@ -1519,18 +1520,18 @@ mips_elf_assign_gp (output_bfd, pgp)
symbol value correctly. We look up the symbol _gp in the output
BFD. If we can't find it, we're stuck. We cache it in the ELF
target data. We don't need to adjust the symbol value for an
- external symbol if we are producing relocateable output. */
+ external symbol if we are producing relocatable output. */
static bfd_reloc_status_type
-mips_elf_final_gp (output_bfd, symbol, relocateable, error_message, pgp)
+mips_elf_final_gp (output_bfd, symbol, relocatable, error_message, pgp)
bfd *output_bfd;
asymbol *symbol;
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
char **error_message;
bfd_vma *pgp;
{
if (bfd_is_und_section (symbol->section)
- && ! relocateable)
+ && ! relocatable)
{
*pgp = 0;
return bfd_reloc_undefined;
@@ -1538,10 +1539,10 @@ mips_elf_final_gp (output_bfd, symbol, relocateable, error_message, pgp)
*pgp = _bfd_get_gp_value (output_bfd);
if (*pgp == 0
- && (! relocateable
+ && (! relocatable
|| (symbol->flags & BSF_SECTION_SYM) != 0))
{
- if (relocateable)
+ if (relocatable)
{
/* Make up a value. */
*pgp = symbol->section->output_section->vma /*+ 0x4000*/;
@@ -1572,27 +1573,27 @@ mips_elf_gprel16_reloc (abfd, reloc_entry, symbol, data, input_section,
bfd *output_bfd;
char **error_message ATTRIBUTE_UNUSED;
{
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
bfd_reloc_status_type ret;
bfd_vma gp;
GET_RELOC_ADDEND (output_bfd, symbol, reloc_entry, input_section)
if (output_bfd != (bfd *) NULL)
- relocateable = TRUE;
+ relocatable = TRUE;
else
{
- relocateable = FALSE;
+ relocatable = FALSE;
output_bfd = symbol->section->output_section->owner;
}
- ret = mips_elf_final_gp (output_bfd, symbol, relocateable, error_message,
+ ret = mips_elf_final_gp (output_bfd, symbol, relocatable, error_message,
&gp);
if (ret != bfd_reloc_ok)
return ret;
return _bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry,
- input_section, relocateable,
+ input_section, relocatable,
data, gp);
}
@@ -1609,7 +1610,7 @@ mips_elf_literal_reloc (abfd, reloc_entry, symbol, data, input_section,
bfd *output_bfd;
char **error_message;
{
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
bfd_reloc_status_type ret;
bfd_vma gp;
@@ -1617,20 +1618,20 @@ mips_elf_literal_reloc (abfd, reloc_entry, symbol, data, input_section,
/* FIXME: The entries in the .lit8 and .lit4 sections should be merged. */
if (output_bfd != (bfd *) NULL)
- relocateable = TRUE;
+ relocatable = TRUE;
else
{
- relocateable = FALSE;
+ relocatable = FALSE;
output_bfd = symbol->section->output_section->owner;
}
- ret = mips_elf_final_gp (output_bfd, symbol, relocateable, error_message,
+ ret = mips_elf_final_gp (output_bfd, symbol, relocatable, error_message,
&gp);
if (ret != bfd_reloc_ok)
return ret;
return _bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry,
- input_section, relocateable,
+ input_section, relocatable,
data, gp);
}
@@ -1648,18 +1649,16 @@ mips_elf_gprel32_reloc (abfd, reloc_entry, symbol, data, input_section,
bfd *output_bfd;
char **error_message;
{
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
bfd_reloc_status_type ret;
bfd_vma gp;
GET_RELOC_ADDEND (output_bfd, symbol, reloc_entry, input_section)
- /* R_MIPS_GPREL32 relocations are defined for local symbols only.
- We will only have an addend if this is a newly created reloc,
- not read from an ELF file. */
+ /* R_MIPS_GPREL32 relocations are defined for local symbols only. */
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
- && reloc_entry->addend == 0)
+ && (symbol->flags & BSF_LOCAL) != 0)
{
*error_message = (char *)
_("32bits gp relative relocation occurs for an external symbol");
@@ -1668,32 +1667,32 @@ mips_elf_gprel32_reloc (abfd, reloc_entry, symbol, data, input_section,
if (output_bfd != (bfd *) NULL)
{
- relocateable = TRUE;
+ relocatable = TRUE;
gp = _bfd_get_gp_value (output_bfd);
}
else
{
- relocateable = FALSE;
+ relocatable = FALSE;
output_bfd = symbol->section->output_section->owner;
- ret = mips_elf_final_gp (output_bfd, symbol, relocateable,
+ ret = mips_elf_final_gp (output_bfd, symbol, relocatable,
error_message, &gp);
if (ret != bfd_reloc_ok)
return ret;
}
return gprel32_with_gp (abfd, symbol, reloc_entry, input_section,
- relocateable, data, gp);
+ relocatable, data, gp);
}
static bfd_reloc_status_type
-gprel32_with_gp (abfd, symbol, reloc_entry, input_section, relocateable, data,
+gprel32_with_gp (abfd, symbol, reloc_entry, input_section, relocatable, data,
gp)
bfd *abfd;
asymbol *symbol;
arelent *reloc_entry;
asection *input_section;
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
PTR data;
bfd_vma gp;
{
@@ -1720,15 +1719,15 @@ gprel32_with_gp (abfd, symbol, reloc_entry, input_section, relocateable, data,
val += reloc_entry->addend;
/* Adjust val for the final section location and GP value. If we
- are producing relocateable output, we don't want to do this for
+ are producing relocatable output, we don't want to do this for
an external symbol. */
- if (! relocateable
+ if (! relocatable
|| (symbol->flags & BSF_SECTION_SYM) != 0)
val += relocation - gp;
bfd_put_32 (abfd, (bfd_vma) val, (bfd_byte *) data + reloc_entry->address);
- if (relocateable)
+ if (relocatable)
reloc_entry->address += input_section->output_offset;
return bfd_reloc_ok;
@@ -1750,8 +1749,11 @@ mips_elf_shift6_reloc (abfd, reloc_entry, symbol, data, input_section,
{
GET_RELOC_ADDEND (output_bfd, symbol, reloc_entry, input_section)
- reloc_entry->addend = (reloc_entry->addend & 0x00007c0)
- | (reloc_entry->addend & 0x00000800) >> 9;
+ if (reloc_entry->howto->partial_inplace)
+ {
+ reloc_entry->addend = ((reloc_entry->addend & 0x00007c0)
+ | (reloc_entry->addend & 0x00000800) >> 9);
+ }
SET_RELOC_ADDEND (reloc_entry)
@@ -1798,23 +1800,25 @@ mips16_gprel_reloc (abfd, reloc_entry, symbol, data, input_section,
bfd *output_bfd;
char **error_message;
{
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
bfd_reloc_status_type ret;
bfd_vma gp;
- unsigned short extend, insn;
- unsigned long final;
+ unsigned short extend = 0;
+ unsigned short insn = 0;
+ bfd_signed_vma val;
+ bfd_vma relocation;
GET_RELOC_ADDEND (output_bfd, symbol, reloc_entry, input_section)
if (output_bfd != NULL)
- relocateable = TRUE;
+ relocatable = TRUE;
else
{
- relocateable = FALSE;
+ relocatable = FALSE;
output_bfd = symbol->section->output_section->owner;
}
- ret = mips_elf_final_gp (output_bfd, symbol, relocateable, error_message,
+ ret = mips_elf_final_gp (output_bfd, symbol, relocatable, error_message,
&gp);
if (ret != bfd_reloc_ok)
return ret;
@@ -1822,33 +1826,55 @@ mips16_gprel_reloc (abfd, reloc_entry, symbol, data, input_section,
if (reloc_entry->address > input_section->_cooked_size)
return bfd_reloc_outofrange;
- /* Pick up the mips16 extend instruction and the real instruction. */
- extend = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address);
- insn = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address + 2);
-
- /* Stuff the current addend back as a 32 bit value, do the usual
- relocation, and then clean up. */
- bfd_put_32 (abfd,
- (bfd_vma) (((extend & 0x1f) << 11)
- | (extend & 0x7e0)
- | (insn & 0x1f)),
- (bfd_byte *) data + reloc_entry->address);
-
- ret = _bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry,
- input_section, relocateable, data, gp);
-
- final = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
- bfd_put_16 (abfd,
- (bfd_vma) ((extend & 0xf800)
- | ((final >> 11) & 0x1f)
- | (final & 0x7e0)),
- (bfd_byte *) data + reloc_entry->address);
- bfd_put_16 (abfd,
- (bfd_vma) ((insn & 0xffe0)
- | (final & 0x1f)),
- (bfd_byte *) data + reloc_entry->address + 2);
+ if (bfd_is_com_section (symbol->section))
+ relocation = 0;
+ else
+ relocation = symbol->value;
- return ret;
+ relocation += symbol->section->output_section->vma;
+ relocation += symbol->section->output_offset;
+
+ /* Set val to the offset into the section or symbol. */
+ val = reloc_entry->addend;
+
+ if (reloc_entry->howto->partial_inplace)
+ {
+ /* Pick up the mips16 extend instruction and the real instruction. */
+ extend = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address);
+ insn = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address + 2);
+ val += ((extend & 0x1f) << 11) | (extend & 0x7e0) | (insn & 0x1f);
+ }
+
+ _bfd_mips_elf_sign_extend(val, 16);
+
+ /* Adjust val for the final section location and GP value. If we
+ are producing relocatable output, we don't want to do this for
+ an external symbol. */
+ if (! relocatable
+ || (symbol->flags & BSF_SECTION_SYM) != 0)
+ val += relocation - gp;
+
+ if (reloc_entry->howto->partial_inplace)
+ {
+ bfd_put_16 (abfd,
+ (bfd_vma) ((extend & 0xf800)
+ | ((val >> 11) & 0x1f)
+ | (val & 0x7e0)),
+ (bfd_byte *) data + reloc_entry->address);
+ bfd_put_16 (abfd,
+ (bfd_vma) ((insn & 0xffe0)
+ | (val & 0x1f)),
+ (bfd_byte *) data + reloc_entry->address + 2);
+ }
+ else
+ reloc_entry->addend = val;
+
+ if (relocatable)
+ reloc_entry->address += input_section->output_offset;
+ else if (((val & ~0xffff) != ~0xffff) && ((val & ~0xffff) != 0))
+ return bfd_reloc_overflow;
+
+ return bfd_reloc_ok;
}
#undef GET_RELOC_ADDEND
diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c
index ab2ff21c887..2098f6fa9fa 100644
--- a/bfd/elfxx-ia64.c
+++ b/bfd/elfxx-ia64.c
@@ -1341,7 +1341,7 @@ elfNN_ia64_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
bfd_vma *valp;
{
if (sym->st_shndx == SHN_COMMON
- && !info->relocateable
+ && !info->relocatable
&& sym->st_size <= elf_gp_size (abfd))
{
/* Common symbols less than or equal to -G nn bytes are
@@ -2228,7 +2228,7 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs)
const Elf_Internal_Rela *rel;
asection *got, *fptr, *srel;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -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. */
@@ -3779,7 +3779,7 @@ elfNN_ia64_final_link (abfd, info)
ia64_info = elfNN_ia64_hash_table (info);
/* Make sure we've got ourselves a nice fat __gp value. */
- if (!info->relocateable)
+ if (!info->relocatable)
{
bfd_vma gp_val = _bfd_get_gp_value (abfd);
struct elf_link_hash_entry *gp;
@@ -3805,7 +3805,7 @@ elfNN_ia64_final_link (abfd, info)
of the .IA_64.unwind section. Force this section to be relocated
into memory rather than written immediately to the output file. */
unwind_output_sec = NULL;
- if (!info->relocateable)
+ if (!info->relocatable)
{
asection *s = bfd_get_section_by_name (abfd, ELF_STRING_ia64_unwind);
if (s)
@@ -3863,7 +3863,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
ia64_info = elfNN_ia64_hash_table (info);
/* Infect various flags from the input section to the output section. */
- if (info->relocateable)
+ if (info->relocatable)
{
bfd_vma flags;
@@ -4325,7 +4325,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
{
int i;
for (i = m->count - 1; i >= 0; i--)
- if (m->sections[i] == sym_sec->output_section)
+ if (m->sections[i] == input_section->output_section)
break;
if (i >= 0)
break;
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 4199ff7064f..478a0dbed87 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -163,7 +163,7 @@ struct mips_elf_hash_sort_data
long min_got_dynindx;
/* The greatest dynamic symbol table index corresponding to a symbol
with a GOT entry that is not referenced (e.g., a dynamic symbol
- with dynamic relocations pointing to it from non-primary GOTs). */
+ with dynamic relocations pointing to it from non-primary GOTs). */
long max_unref_got_dynindx;
/* The greatest dynamic symbol table index not corresponding to a
symbol without a GOT entry. */
@@ -245,7 +245,8 @@ struct mips_elf_link_hash_table
struct extsym_info
{
- bfd *abfd; struct bfd_link_info *info;
+ bfd *abfd;
+ struct bfd_link_info *info;
struct ecoff_debug_info *debug;
const struct ecoff_debug_swap *swap;
bfd_boolean failed;
@@ -433,7 +434,6 @@ static const Elf_Internal_Rela *mips_elf_next_relocation
const Elf_Internal_Rela *));
static bfd_boolean mips_elf_local_relocation_p
PARAMS ((bfd *, const Elf_Internal_Rela *, asection **, bfd_boolean));
-static bfd_vma mips_elf_sign_extend PARAMS ((bfd_vma, int));
static bfd_boolean mips_elf_overflow_p PARAMS ((bfd_vma, int));
static bfd_vma mips_elf_high PARAMS ((bfd_vma));
static bfd_vma mips_elf_higher PARAMS ((bfd_vma));
@@ -516,11 +516,11 @@ static bfd *reldyn_sorting_bfd;
/* The name of the options section. */
#define MIPS_ELF_OPTIONS_SECTION_NAME(abfd) \
- (ABI_64_P (abfd) ? ".MIPS.options" : ".options")
+ (NEWABI_P (abfd) ? ".MIPS.options" : ".options")
/* The name of the stub section. */
#define MIPS_ELF_STUB_SECTION_NAME(abfd) \
- (ABI_64_P (abfd) ? ".MIPS.stubs" : ".stub")
+ (NEWABI_P (abfd) ? ".MIPS.stubs" : ".stub")
/* The size of an external REL relocation. */
#define MIPS_ELF_REL_SIZE(abfd) \
@@ -1080,18 +1080,18 @@ mips_elf_check_mips16_stubs (h, data)
bfd_reloc_status_type
_bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry, input_section,
- relocateable, data, gp)
+ relocatable, data, gp)
bfd *abfd;
asymbol *symbol;
arelent *reloc_entry;
asection *input_section;
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
PTR data;
bfd_vma gp;
{
bfd_vma relocation;
- unsigned long insn;
- unsigned long val;
+ unsigned long insn = 0;
+ bfd_signed_vma val;
if (bfd_is_com_section (symbol->section))
relocation = 0;
@@ -1104,35 +1104,36 @@ _bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry, input_section,
if (reloc_entry->address > input_section->_cooked_size)
return bfd_reloc_outofrange;
- insn = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
-
/* Set val to the offset into the section or symbol. */
- if (reloc_entry->howto->src_mask == 0)
- {
- /* This case occurs with the 64-bit MIPS ELF ABI. */
- val = reloc_entry->addend;
- }
- else
+ val = reloc_entry->addend;
+
+ if (reloc_entry->howto->partial_inplace)
{
- val = ((insn & 0xffff) + reloc_entry->addend) & 0xffff;
- if (val & 0x8000)
- val -= 0x10000;
+ insn = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
+ val += insn & 0xffff;
}
+ _bfd_mips_elf_sign_extend(val, 16);
+
/* Adjust val for the final section location and GP value. If we
- are producing relocateable output, we don't want to do this for
+ are producing relocatable output, we don't want to do this for
an external symbol. */
- if (! relocateable
+ if (! relocatable
|| (symbol->flags & BSF_SECTION_SYM) != 0)
val += relocation - gp;
- insn = (insn & ~0xffff) | (val & 0xffff);
- bfd_put_32 (abfd, insn, (bfd_byte *) data + reloc_entry->address);
+ if (reloc_entry->howto->partial_inplace)
+ {
+ insn = (insn & ~0xffff) | (val & 0xffff);
+ bfd_put_32 (abfd, (bfd_vma) insn,
+ (bfd_byte *) data + reloc_entry->address);
+ }
+ else
+ reloc_entry->addend = val;
- if (relocateable)
+ if (relocatable)
reloc_entry->address += input_section->output_offset;
-
- else if ((long) val >= 0x8000 || (long) val < -0x8000)
+ else if (((val & ~0xffff) != ~0xffff) && ((val & ~0xffff) != 0))
return bfd_reloc_overflow;
return bfd_reloc_ok;
@@ -1662,7 +1663,7 @@ mips_elf_rel_dyn_section (dynobj, create_p)
| SEC_LINKER_CREATED
| SEC_READONLY))
|| ! bfd_set_section_alignment (dynobj, sreloc,
- 4))
+ MIPS_ELF_LOG_FILE_ALIGN (dynobj)))
return NULL;
}
return sreloc;
@@ -2740,8 +2741,8 @@ mips_elf_local_relocation_p (input_bfd, relocation, local_sections,
/* Sign-extend VALUE, which has the indicated number of BITS. */
-static bfd_vma
-mips_elf_sign_extend (value, bits)
+bfd_vma
+_bfd_mips_elf_sign_extend (value, bits)
bfd_vma value;
int bits;
{
@@ -2869,6 +2870,8 @@ mips_elf_create_got_section (abfd, info, maybe_exclude)
if (maybe_exclude)
flags |= SEC_EXCLUDE;
+ /* We have to use an alignment of 2**4 here because this is hardcoded
+ in the function stub generation and in the linker script. */
s = bfd_make_section (abfd, ".got");
if (s == NULL
|| ! bfd_set_section_flags (abfd, s, flags)
@@ -3150,7 +3153,7 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info,
/* If this is a 32- or 64-bit call to a 16-bit function with a stub, we
need to redirect the call to the stub, unless we're already *in*
a stub. */
- if (r_type != R_MIPS16_26 && !info->relocateable
+ if (r_type != R_MIPS16_26 && !info->relocatable
&& ((h != NULL && h->fn_stub != NULL)
|| (local_p && elf_tdata (input_bfd)->local_stubs != NULL
&& elf_tdata (input_bfd)->local_stubs[r_symndx] != NULL))
@@ -3171,7 +3174,7 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info,
}
/* If this is a 16-bit call to a 32- or 64-bit function with a stub, we
need to redirect the call to the stub. */
- else if (r_type == R_MIPS16_26 && !info->relocateable
+ else if (r_type == R_MIPS16_26 && !info->relocatable
&& h != NULL
&& (h->call_stub != NULL || h->call_fp_stub != NULL)
&& !target_is_16_bit_code_p)
@@ -3207,7 +3210,7 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info,
/* Calls from 16-bit code to 32-bit code and vice versa require the
special jalx instruction. */
- *require_jalxp = (!info->relocateable
+ *require_jalxp = (!info->relocatable
&& (((r_type == R_MIPS16_26) && !target_is_16_bit_code_p)
|| ((r_type == R_MIPS_26) && target_is_16_bit_code_p)));
@@ -3304,7 +3307,7 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info,
return bfd_reloc_continue;
case R_MIPS_16:
- value = symbol + mips_elf_sign_extend (addend, 16);
+ value = symbol + _bfd_mips_elf_sign_extend (addend, 16);
overflowed_p = mips_elf_overflow_p (value, 16);
break;
@@ -3355,7 +3358,7 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info,
break;
case R_MIPS_GNU_REL16_S2:
- value = symbol + mips_elf_sign_extend (addend << 2, 18) - p;
+ value = symbol + _bfd_mips_elf_sign_extend (addend << 2, 18) - p;
overflowed_p = mips_elf_overflow_p (value, 18);
value = (value >> 2) & howto->dst_mask;
break;
@@ -3380,7 +3383,7 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info,
if (local_p)
value = (((addend << 2) | ((p + 4) & 0xf0000000)) + symbol) >> 2;
else
- value = (mips_elf_sign_extend (addend << 2, 28) + symbol) >> 2;
+ value = (_bfd_mips_elf_sign_extend (addend << 2, 28) + symbol) >> 2;
value &= howto->dst_mask;
break;
@@ -3440,7 +3443,7 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info,
instruction. If the addend was separate, leave it alone,
otherwise we may lose significant bits. */
if (howto->partial_inplace)
- addend = mips_elf_sign_extend (addend, 16);
+ addend = _bfd_mips_elf_sign_extend (addend, 16);
value = symbol + addend - gp;
/* If the symbol was local, any earlier relocatable links will
have adjusted its addend with the gp offset, so compensate
@@ -3489,7 +3492,7 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info,
break;
case R_MIPS_PC16:
- value = mips_elf_sign_extend (addend, 16) + symbol - p;
+ value = _bfd_mips_elf_sign_extend (addend, 16) + symbol - p;
overflowed_p = mips_elf_overflow_p (value, 16);
break;
@@ -3649,7 +3652,7 @@ mips_elf_perform_relocation (info, howto, relocation, value, input_bfd,
JALX is the 5-bit value 00011. X is 0 for jal, 1 for jalx.
Note that the immediate value in the first word is swapped.
- When producing a relocateable object file, R_MIPS16_26 is
+ When producing a relocatable object file, R_MIPS16_26 is
handled mostly like R_MIPS_26. In particular, the addend is
stored as a straight 26-bit value in a 32-bit instruction.
(gas makes life simpler for itself by never adjusting a
@@ -3687,13 +3690,13 @@ mips_elf_perform_relocation (info, howto, relocation, value, input_bfd,
where targ26-16 is sub1 followed by sub2 (i.e., the addend field A is
((sub1 << 16) | sub2)).
- When producing a relocateable object file, the calculation is
+ When producing a relocatable object file, the calculation is
(((A < 2) | ((P + 4) & 0xf0000000) + S) >> 2)
When producing a fully linked file, the calculation is
let R = (((A < 2) | ((P + 4) & 0xf0000000) + S) >> 2)
((R & 0x1f0000) << 5) | ((R & 0x3e00000) >> 5) | (R & 0xffff) */
- if (!info->relocateable)
+ if (!info->relocatable)
/* Shuffle the bits according to the formula above. */
value = (((value & 0x1f0000) << 5)
| ((value & 0x3e00000) >> 5)
@@ -3852,7 +3855,7 @@ mips_elf_create_dynamic_relocation (output_bfd, info, rel, h, sec,
/* We begin by assuming that the offset for the dynamic relocation
is the same as for the original relocation. We'll adjust this
later to reflect the correct output offsets. */
- if (elf_section_data (input_section)->sec_info_type != ELF_INFO_TYPE_STABS)
+ if (input_section->sec_info_type != ELF_INFO_TYPE_STABS)
{
outrel[1].r_offset = rel[1].r_offset;
outrel[2].r_offset = rel[2].r_offset;
@@ -4638,30 +4641,11 @@ _bfd_mips_elf_fake_sections (abfd, hdr, sec)
hdr->sh_entsize = 8;
}
- /* The generic elf_fake_sections will set up REL_HDR using the
- default kind of relocations. But, we may actually need both
- kinds of relocations, so we set up the second header here.
-
- This is not necessary for the O32 ABI since that only uses Elf32_Rel
- relocations (cf. System V ABI, MIPS RISC Processor Supplement,
- 3rd Edition, p. 4-17). It breaks the IRIX 5/6 32-bit ld, since one
- of the resulting empty .rela.<section> sections starts with
- sh_offset == object size, and ld doesn't allow that. While the check
- is arguably bogus for empty or SHT_NOBITS sections, it can easily be
- avoided by not emitting those useless sections in the first place. */
- if (! SGI_COMPAT (abfd) && ! NEWABI_P(abfd)
- && (sec->flags & SEC_RELOC) != 0)
- {
- struct bfd_elf_section_data *esd;
- bfd_size_type amt = sizeof (Elf_Internal_Shdr);
-
- esd = elf_section_data (sec);
- BFD_ASSERT (esd->rel_hdr2 == NULL);
- esd->rel_hdr2 = (Elf_Internal_Shdr *) bfd_zalloc (abfd, amt);
- if (!esd->rel_hdr2)
- return FALSE;
- _bfd_elf_init_reloc_shdr (abfd, esd->rel_hdr2, sec, !sec->use_rela_p);
- }
+ /* The generic elf_fake_sections will set up REL_HDR using the default
+ kind of relocations. We used to set up a second header for the
+ non-default kind of relocations here, but only NewABI would use
+ these, and the IRIX ld doesn't like resulting empty RELA sections.
+ Thus we create those header only on demand now. */
return TRUE;
}
@@ -4973,19 +4957,19 @@ _bfd_mips_elf_create_dynamic_sections (abfd, info)
/* Change alignments of some sections. */
s = bfd_get_section_by_name (abfd, ".hash");
if (s != NULL)
- bfd_set_section_alignment (abfd, s, 4);
+ bfd_set_section_alignment (abfd, s, MIPS_ELF_LOG_FILE_ALIGN (abfd));
s = bfd_get_section_by_name (abfd, ".dynsym");
if (s != NULL)
- bfd_set_section_alignment (abfd, s, 4);
+ bfd_set_section_alignment (abfd, s, MIPS_ELF_LOG_FILE_ALIGN (abfd));
s = bfd_get_section_by_name (abfd, ".dynstr");
if (s != NULL)
- bfd_set_section_alignment (abfd, s, 4);
+ bfd_set_section_alignment (abfd, s, MIPS_ELF_LOG_FILE_ALIGN (abfd));
s = bfd_get_section_by_name (abfd, ".reginfo");
if (s != NULL)
- bfd_set_section_alignment (abfd, s, 4);
+ bfd_set_section_alignment (abfd, s, MIPS_ELF_LOG_FILE_ALIGN (abfd));
s = bfd_get_section_by_name (abfd, ".dynamic");
if (s != NULL)
- bfd_set_section_alignment (abfd, s, 4);
+ bfd_set_section_alignment (abfd, s, MIPS_ELF_LOG_FILE_ALIGN (abfd));
}
if (!info->shared)
@@ -5060,7 +5044,7 @@ _bfd_mips_elf_check_relocs (abfd, info, sec, relocs)
asection *sreloc;
struct elf_backend_data *bed;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
dynobj = elf_hash_table (info)->dynobj;
@@ -5556,7 +5540,7 @@ _bfd_mips_relax_section (abfd, sec, link_info, again)
/* We are not currently changing any sizes, so only one pass. */
*again = FALSE;
- if (link_info->relocateable)
+ if (link_info->relocatable)
return TRUE;
internal_relocs = _bfd_elf_link_read_relocs (abfd, sec, (PTR) NULL,
@@ -5747,7 +5731,7 @@ _bfd_mips_elf_adjust_dynamic_symbol (info, h)
any R_MIPS_32 or R_MIPS_REL32 relocs against it into the output
file. */
hmips = (struct mips_elf_link_hash_entry *) h;
- if (! info->relocateable
+ if (! info->relocatable
&& hmips->possibly_dynamic_relocs != 0
&& (h->root.type == bfd_link_hash_defweak
|| (h->elf_link_hash_flags
@@ -5845,7 +5829,7 @@ _bfd_mips_elf_always_size_sections (output_bfd, info)
bfd_set_section_size (output_bfd, ri,
(bfd_size_type) sizeof (Elf32_External_RegInfo));
- if (! (info->relocateable
+ if (! (info->relocatable
|| ! mips_elf_hash_table (info)->mips16_stubs_seen))
mips_elf_link_hash_traverse (mips_elf_hash_table (info),
mips_elf_check_mips16_stubs,
@@ -6352,7 +6336,7 @@ _bfd_mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
input_bfd, contents);
l &= lo16_howto->src_mask;
l <<= lo16_howto->rightshift;
- l = mips_elf_sign_extend (l, 16);
+ l = _bfd_mips_elf_sign_extend (l, 16);
addend <<= 16;
@@ -6383,7 +6367,7 @@ _bfd_mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
addend = rel->r_addend;
}
- if (info->relocateable)
+ if (info->relocatable)
{
Elf_Internal_Sym *sym;
unsigned long r_symndx;
@@ -6397,7 +6381,7 @@ _bfd_mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
they're against a section symbol, in which case we need
to adjust by the section offset, or unless they're GP
relative in which case we need to adjust by the amount
- that we're adjusting GP in this relocateable object. */
+ that we're adjusting GP in this relocatable object. */
if (! mips_elf_local_relocation_p (input_bfd, rel, local_sections,
FALSE))
@@ -7798,10 +7782,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;
@@ -7897,7 +7881,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))
{
@@ -8128,12 +8112,12 @@ _bfd_mips_elf_set_section_contents (abfd, section, location, offset, count)
bfd_byte *
_bfd_elf_mips_get_relocated_section_contents (abfd, link_info, link_order,
- data, relocateable, symbols)
+ data, relocatable, symbols)
bfd *abfd;
struct bfd_link_info *link_info;
struct bfd_link_order *link_order;
bfd_byte *data;
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
asymbol **symbols;
{
/* Get enough memory to hold the stuff */
@@ -8241,7 +8225,7 @@ _bfd_elf_mips_get_relocated_section_contents (abfd, link_info, link_order,
{
/* bypass special_function call */
r = _bfd_mips_elf_gprel16_with_gp (input_bfd, sym, *parent,
- input_section, relocateable,
+ input_section, relocatable,
(PTR) data, gp);
goto skip_bfd_perform_relocation;
}
@@ -8251,11 +8235,11 @@ _bfd_elf_mips_get_relocated_section_contents (abfd, link_info, link_order,
*parent,
(PTR) data,
input_section,
- relocateable ? abfd : (bfd *) NULL,
+ relocatable ? abfd : (bfd *) NULL,
&error_message);
skip_bfd_perform_relocation:
- if (relocateable)
+ if (relocatable)
{
asection *os = input_section->output_section;
@@ -8462,7 +8446,7 @@ _bfd_mips_elf_final_link (abfd, info)
elf_gp (abfd) = (h->u.def.value
+ h->u.def.section->output_section->vma
+ h->u.def.section->output_offset);
- else if (info->relocateable)
+ else if (info->relocatable)
{
bfd_vma lo = MINUS_ONE;
@@ -8783,7 +8767,7 @@ _bfd_mips_elf_final_link (abfd, info)
information describing how the small data area would
change depending upon the -G switch. These sections
not used in executables files. */
- if (! info->relocateable)
+ if (! info->relocatable)
{
for (p = o->link_order_head;
p != (struct bfd_link_order *) NULL;
diff --git a/bfd/elfxx-mips.h b/bfd/elfxx-mips.h
index 3064c39d137..088dd6a57eb 100644
--- a/bfd/elfxx-mips.h
+++ b/bfd/elfxx-mips.h
@@ -108,6 +108,7 @@ extern bfd_reloc_status_type _bfd_mips_elf32_gprel16_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
extern unsigned long _bfd_elf_mips_mach
PARAMS ((flagword));
-extern bfd_boolean _bfd_mips_relax_section (bfd *, asection *,
- struct bfd_link_info *,
- bfd_boolean *);
+extern bfd_boolean _bfd_mips_relax_section
+ PARAMS ((bfd *, asection *, struct bfd_link_info *, bfd_boolean *));
+extern bfd_vma _bfd_mips_elf_sign_extend
+ PARAMS ((bfd_vma, int));
diff --git a/bfd/i386linux.c b/bfd/i386linux.c
index 6403e1c608b..84ae477d562 100644
--- a/bfd/i386linux.c
+++ b/bfd/i386linux.c
@@ -353,7 +353,7 @@ linux_add_one_symbol (info, abfd, name, flags, section, value, string,
insert = FALSE;
- if (! info->relocateable
+ if (! info->relocatable
&& linux_hash_table (info)->dynobj == NULL
&& strcmp (name, SHARABLE_CONFLICTS) == 0
&& (flags & BSF_CONSTRUCTOR) != 0
diff --git a/bfd/ieee.c b/bfd/ieee.c
index 59d57430d89..f0ba1e5b115 100644
--- a/bfd/ieee.c
+++ b/bfd/ieee.c
@@ -3590,7 +3590,7 @@ static const unsigned char exten[] =
0xf0, 0x20, 0x00,
0xf1, 0xce, 0x20, 0x00, 37, 3, 3, /* Set version 3 rev 3. */
0xf1, 0xce, 0x20, 0x00, 39, 2, /* Keep symbol in original case. */
- 0xf1, 0xce, 0x20, 0x00, 38 /* Set object type relocateable to x. */
+ 0xf1, 0xce, 0x20, 0x00, 38 /* Set object type relocatable to x. */
};
static const unsigned char envi[] =
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index 9bbdebd2184..46695e766ad 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -1509,7 +1509,7 @@ bfd_generic_get_relocated_section_contents PARAMS ((bfd *abfd,
struct bfd_link_info *link_info,
struct bfd_link_order *link_order,
bfd_byte *data,
- bfd_boolean relocateable,
+ bfd_boolean relocatable,
asymbol **symbols));
/* Extracted from archures.c. */
diff --git a/bfd/libcoff-in.h b/bfd/libcoff-in.h
index fac76506d4a..0c19433753c 100644
--- a/bfd/libcoff-in.h
+++ b/bfd/libcoff-in.h
@@ -1,6 +1,6 @@
/* BFD COFF object file private structure.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002
+ 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -434,7 +434,7 @@ struct coff_debug_merge_hash_table
bfd_hash_lookup (&(table)->root, (string), (create), (copy)))
/* Information we keep for each section in the output file when doing
- a relocateable link. */
+ a relocatable link. */
struct coff_link_section_info
{
@@ -461,7 +461,7 @@ struct coff_final_link_info
bfd_boolean global_to_static;
/* Hash table for long symbol names. */
struct bfd_strtab_hash *strtab;
- /* When doing a relocateable link, an array of information kept for
+ /* When doing a relocatable link, an array of information kept for
each output section, indexed by the target_index field. */
struct coff_link_section_info *section_info;
/* Symbol index of last C_FILE symbol (-1 if none). */
diff --git a/bfd/libcoff.h b/bfd/libcoff.h
index 1beec22af08..3cac32a4545 100644
--- a/bfd/libcoff.h
+++ b/bfd/libcoff.h
@@ -4,7 +4,7 @@
/* BFD COFF object file private structure.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002
+ 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -438,7 +438,7 @@ struct coff_debug_merge_hash_table
bfd_hash_lookup (&(table)->root, (string), (create), (copy)))
/* Information we keep for each section in the output file when doing
- a relocateable link. */
+ a relocatable link. */
struct coff_link_section_info
{
@@ -465,7 +465,7 @@ struct coff_final_link_info
bfd_boolean global_to_static;
/* Hash table for long symbol names. */
struct bfd_strtab_hash *strtab;
- /* When doing a relocateable link, an array of information kept for
+ /* When doing a relocatable link, an array of information kept for
each output section, indexed by the target_index field. */
struct coff_link_section_info *section_info;
/* Symbol index of last C_FILE symbol (-1 if none). */
diff --git a/bfd/linker.c b/bfd/linker.c
index c0e3236f853..72f8bfd909d 100644
--- a/bfd/linker.c
+++ b/bfd/linker.c
@@ -88,7 +88,7 @@ SUBSECTION
For example, with each entry in the hash table the a.out
linker keeps the index the symbol has in the final output file
- (this index number is used so that when doing a relocateable
+ (this index number is used so that when doing a relocatable
link the symbol index used in the output file can be quickly
filled in when copying over a reloc). The a.out linker code
defines the required structures and functions for a hash table
@@ -277,7 +277,7 @@ SUBSECTION
the input sections and copy the data into the output sections.
It must build an output symbol table including any local
symbols from the input files and the global symbols from the
- hash table. When producing relocateable output, it must
+ hash table. When producing relocatable output, it must
modify the input relocs and write them into the output file.
There may also be object format dependent work to be done.
@@ -317,7 +317,7 @@ SUBSUBSECTION
types of information. They also describe relocs that must be
created by the BFD backend, but do not correspond to any input
file; this is used to support -Ur, which builds constructors
- while generating a relocateable object file.
+ while generating a relocatable object file.
INODE
Relocating the section contents, Writing the symbol table, Information provided by the linker, Performing the Final Link
@@ -339,7 +339,7 @@ SUBSUBSECTION
input files. The <<_bfd_final_link>> function should read the
contents of the section and any associated relocs, apply the
relocs to the section contents, and write out the modified
- section contents. If performing a relocateable link, the
+ section contents. If performing a relocatable link, the
relocs themselves must also be modified and written out.
@findex _bfd_relocate_contents
@@ -2043,7 +2043,7 @@ _bfd_generic_final_link (abfd, info)
if (! generic_add_output_symbol (abfd, &outsymalloc, NULL))
return FALSE;
- if (info->relocateable)
+ if (info->relocatable)
{
/* Allocate space for the output relocs for each section. */
for (o = abfd->sections;
@@ -2362,7 +2362,7 @@ _bfd_generic_link_output_symbols (output_bfd, input_bfd, info, psymalloc)
break;
case discard_sec_merge:
output = TRUE;
- if (info->relocateable
+ if (info->relocatable
|| ! (sym->section->flags & SEC_MERGE))
break;
/* FALLTHROUGH */
@@ -2534,7 +2534,7 @@ _bfd_generic_reloc_link_order (abfd, info, sec, link_order)
{
arelent *r;
- if (! info->relocateable)
+ if (! info->relocatable)
abort ();
if (sec->orelocation == (arelent **) NULL)
abort ();
@@ -2767,7 +2767,7 @@ default_indirect_link_order (output_bfd, info, output_section, link_order,
BFD_ASSERT (input_section->output_offset == link_order->offset);
BFD_ASSERT (input_section->_cooked_size == link_order->size);
- if (info->relocateable
+ if (info->relocatable
&& input_section->reloc_count > 0
&& output_section->orelocation == (arelent **) NULL)
{
@@ -2777,7 +2777,7 @@ default_indirect_link_order (output_bfd, info, output_section, link_order,
types of object files. Handling this case correctly is
difficult, and sometimes impossible. */
(*_bfd_error_handler)
- (_("Attempt to do relocateable link with %s input and %s output"),
+ (_("Attempt to do relocatable link with %s input and %s output"),
bfd_get_target (input_bfd), bfd_get_target (output_bfd));
bfd_set_error (bfd_error_wrong_format);
return FALSE;
@@ -2842,7 +2842,7 @@ default_indirect_link_order (output_bfd, info, output_section, link_order,
if (contents == NULL && sec_size != 0)
goto error_return;
new_contents = (bfd_get_relocated_section_contents
- (output_bfd, info, link_order, contents, info->relocateable,
+ (output_bfd, info, link_order, contents, info->relocatable,
_bfd_generic_link_get_symbols (input_bfd)));
if (!new_contents)
goto error_return;
diff --git a/bfd/m68klinux.c b/bfd/m68klinux.c
index 1a829806975..90f342cba29 100644
--- a/bfd/m68klinux.c
+++ b/bfd/m68klinux.c
@@ -357,7 +357,7 @@ linux_add_one_symbol (info, abfd, name, flags, section, value, string,
insert = FALSE;
- if (! info->relocateable
+ if (! info->relocatable
&& linux_hash_table (info)->dynobj == NULL
&& strcmp (name, SHARABLE_CONFLICTS) == 0
&& (flags & BSF_CONSTRUCTOR) != 0
diff --git a/bfd/opncls.c b/bfd/opncls.c
index 47719797df3..5237190d97c 100644
--- a/bfd/opncls.c
+++ b/bfd/opncls.c
@@ -716,28 +716,32 @@ bfd_release (abfd, block)
without debug symbols).
*/
-static unsigned long calc_crc32 PARAMS ((unsigned long, const unsigned char *, size_t));
static char * get_debug_link_info PARAMS ((bfd *, unsigned long *));
static bfd_boolean separate_debug_file_exists PARAMS ((const char *, const unsigned long));
static char * find_separate_debug_file PARAMS ((bfd *, const char *));
+#define GNU_DEBUGLINK ".gnu_debuglink"
/*
-INTERNAL_FUNCTION
- calc_crc32
+FUNCTION
+ bfd_calc_gnu_debuglink_crc32
SYNOPSIS
- unsigned long calc_crc32 (unsigned long crc, const unsigned char *buf, size_t len);
+ unsigned long bfd_calc_gnu_debuglink_crc32 (unsigned long crc, const unsigned char *buf, bfd_size_type len);
DESCRIPTION
- Advance the CRC32 given by @var{crc} through @var{len}
- bytes of @var{buf}. Return the updated CRC32 value.
+ Computes a CRC value as used in the .gnu_debuglink section.
+ Advances the previously computed @var{crc} value by computing
+ and adding in the crc32 for @var{len} bytes of @var{buf}.
+
+RETURNS
+ Return the updated CRC32 value.
*/
-static unsigned long
-calc_crc32 (crc, buf, len)
+unsigned long
+bfd_calc_gnu_debuglink_crc32 (crc, buf, len)
unsigned long crc;
const unsigned char *buf;
- size_t len;
+ bfd_size_type len;
{
static const unsigned long crc32_table[256] =
{
@@ -808,7 +812,7 @@ INTERNAL_FUNCTION
get_debug_link_info
SYNOPSIS
- char *get_debug_link_info (bfd *abfd, unsigned long *crc32_out)
+ char * get_debug_link_info (bfd * abfd, unsigned long * crc32_out)
DESCRIPTION
fetch the filename and CRC32 value for any separate debuginfo
@@ -818,8 +822,8 @@ DESCRIPTION
static char *
get_debug_link_info (abfd, crc32_out)
- bfd *abfd;
- unsigned long *crc32_out;
+ bfd * abfd;
+ unsigned long * crc32_out;
{
asection * sect;
bfd_size_type debuglink_size;
@@ -831,14 +835,17 @@ get_debug_link_info (abfd, crc32_out)
BFD_ASSERT (abfd);
BFD_ASSERT (crc32_out);
- sect = bfd_get_section_by_name (abfd, ".gnu_debuglink");
+ sect = bfd_get_section_by_name (abfd, GNU_DEBUGLINK);
if (sect == NULL)
return NULL;
debuglink_size = bfd_section_size (abfd, sect);
- contents = xmalloc (debuglink_size);
+ contents = malloc (debuglink_size);
+ if (contents == NULL)
+ return NULL;
+
ret = bfd_get_section_contents (abfd, sect, contents,
(file_ptr)0, debuglink_size);
if (! ret)
@@ -877,7 +884,7 @@ separate_debug_file_exists (name, crc)
static char buffer [8 * 1024];
unsigned long file_crc = 0;
int fd;
- int count;
+ bfd_size_type count;
BFD_ASSERT (name);
@@ -886,7 +893,7 @@ separate_debug_file_exists (name, crc)
return FALSE;
while ((count = read (fd, buffer, sizeof (buffer))) > 0)
- file_crc = calc_crc32 (file_crc, buffer, count);
+ file_crc = bfd_calc_gnu_debuglink_crc32 (file_crc, buffer, count);
close (fd);
@@ -930,16 +937,21 @@ find_separate_debug_file (abfd, debug_file_directory)
return NULL;
basename = get_debug_link_info (abfd, & crc32);
-
if (basename == NULL)
return NULL;
+
if (strlen (basename) < 1)
{
free (basename);
return NULL;
}
- dir = xstrdup (abfd->filename);
+ dir = strdup (abfd->filename);
+ if (dir == NULL)
+ {
+ free (basename);
+ return NULL;
+ }
BFD_ASSERT (strlen (dir) != 0);
/* Strip off filename part. */
@@ -950,11 +962,17 @@ find_separate_debug_file (abfd, debug_file_directory)
dir[i + 1] = '\0';
BFD_ASSERT (dir[i] == '/' || dir[0] == '\0')
- debugfile = xmalloc (strlen (debug_file_directory) + 1
- + strlen (dir)
- + strlen (".debug/")
- + strlen (basename)
- + 1);
+ debugfile = malloc (strlen (debug_file_directory) + 1
+ + strlen (dir)
+ + strlen (".debug/")
+ + strlen (basename)
+ + 1);
+ if (debugfile == NULL)
+ {
+ free (basename);
+ free (dir);
+ return NULL;
+ }
/* First try in the same directory as the original file: */
strcpy (debugfile, dir);
@@ -1037,3 +1055,158 @@ bfd_follow_gnu_debuglink (abfd, dir)
#endif
return find_separate_debug_file (abfd, dir);
}
+
+/*
+FUNCTION
+ bfd_create_gnu_debuglink_section
+
+SYNOPSIS
+ struct sec * bfd_create_gnu_debuglink_section (bfd * abfd, const char * filename);
+
+DESCRIPTION
+
+ Takes a @var{BFD} and adds a .gnu_debuglink section to it. The section is sized
+ to be big enough to contain a link to the specified @var{filename}.
+
+RETURNS
+ A pointer to the new section is returned if all is ok. Otherwise <<NULL>> is
+ returned and bfd_error is set.
+*/
+
+asection *
+bfd_create_gnu_debuglink_section
+ (bfd * abfd,
+ const char * filename)
+{
+ asection * sect;
+ bfd_size_type debuglink_size;
+
+ if (abfd == NULL || filename == NULL)
+ {
+ bfd_set_error (bfd_error_invalid_operation);
+ return NULL;
+ }
+
+ /* Strip off any path components in filename. */
+ filename = lbasename (filename);
+
+ sect = bfd_get_section_by_name (abfd, GNU_DEBUGLINK);
+ if (sect)
+ {
+ /* Section already exists. */
+ bfd_set_error (bfd_error_invalid_operation);
+ return NULL;
+ }
+
+ sect = bfd_make_section (abfd, GNU_DEBUGLINK);
+ if (sect == NULL)
+ return NULL;
+
+ if (! bfd_set_section_flags (abfd, sect,
+ SEC_HAS_CONTENTS | SEC_READONLY | SEC_DEBUGGING))
+ /* XXX Should we delete the section from the bfd ? */
+ return NULL;
+
+
+ debuglink_size = strlen (filename) + 1;
+ debuglink_size += 3;
+ debuglink_size &= ~3;
+ debuglink_size += 4;
+
+ if (! bfd_set_section_size (abfd, sect, debuglink_size))
+ /* XXX Should we delete the section from the bfd ? */
+ return NULL;
+
+ return sect;
+}
+
+
+/*
+FUNCTION
+ bfd_fill_in_gnu_debuglink_section
+
+SYNOPSIS
+ bfd_boolean bfd_fill_in_gnu_debuglink_section (bfd * abfd, struct sec * sect, const char * filename);
+
+DESCRIPTION
+
+ Takes a @var{BFD} and containing a .gnu_debuglink section @var{SECT}
+ and fills in the contents of the section to contain a link to the
+ specified @var{filename}. The filename should be relative to the
+ current directory.
+
+RETURNS
+ <<TRUE>> is returned if all is ok. Otherwise <<FALSE>> is returned
+ and bfd_error is set.
+*/
+
+bfd_boolean
+bfd_fill_in_gnu_debuglink_section
+ (bfd * abfd,
+ struct sec * sect,
+ const char * filename)
+{
+ bfd_size_type debuglink_size;
+ unsigned long crc32;
+ char * contents;
+ bfd_size_type crc_offset;
+ FILE * handle;
+ static char buffer[8 * 1024];
+ size_t count;
+
+ if (abfd == NULL || sect == NULL || filename == NULL)
+ {
+ bfd_set_error (bfd_error_invalid_operation);
+ return FALSE;
+ }
+
+ /* Make sure that we can read the file.
+ XXX - Should we attempt to locate the debug info file using the same
+ algorithm as gdb ? At the moment, since we are creating the
+ .gnu_debuglink section, we insist upon the user providing us with a
+ correct-for-section-creation-time path, but this need not conform to
+ the gdb location algorithm. */
+ handle = fopen (filename, FOPEN_RB);
+ if (handle == NULL)
+ {
+ bfd_set_error (bfd_error_system_call);
+ return FALSE;
+ }
+
+ crc32 = 0;
+ while ((count = fread (buffer, 1, sizeof buffer, handle)) > 0)
+ crc32 = bfd_calc_gnu_debuglink_crc32 (crc32, buffer, count);
+ fclose (handle);
+
+ /* Strip off any path components in filename,
+ now that we no longer need them. */
+ filename = lbasename (filename);
+
+ debuglink_size = strlen (filename) + 1;
+ debuglink_size += 3;
+ debuglink_size &= ~3;
+ debuglink_size += 4;
+
+ contents = malloc (debuglink_size);
+ if (contents == NULL)
+ {
+ /* XXX Should we delete the section from the bfd ? */
+ bfd_set_error (bfd_error_no_memory);
+ return FALSE;
+ }
+
+ strcpy (contents, filename);
+ crc_offset = debuglink_size - 4;
+
+ bfd_put_32 (abfd, crc32, (bfd_byte *) (contents + crc_offset));
+
+ if (! bfd_set_section_contents (abfd, sect, contents,
+ (file_ptr)0, debuglink_size))
+ {
+ /* XXX Should we delete the section from the bfd ? */
+ free (contents);
+ return FALSE;
+ }
+
+ return TRUE;
+}
diff --git a/bfd/pdp11.c b/bfd/pdp11.c
index 95d78a1103d..52f7b70fc55 100644
--- a/bfd/pdp11.c
+++ b/bfd/pdp11.c
@@ -1,5 +1,5 @@
/* BFD back-end for PDP-11 a.out binaries.
- Copyright 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -3436,7 +3436,7 @@ NAME(aout,final_link) (abfd, info, callback)
includes_hash_initialized = TRUE;
/* Figure out the largest section size. Also, if generating
- relocateable output, count the relocs. */
+ relocatable output, count the relocs. */
trsize = 0;
drsize = 0;
max_contents_size = 0;
@@ -3446,7 +3446,7 @@ NAME(aout,final_link) (abfd, info, callback)
{
size_t sz;
- if (info->relocateable)
+ if (info->relocatable)
{
if (bfd_get_flavour (sub) == bfd_target_aout_flavour)
{
@@ -3460,7 +3460,7 @@ NAME(aout,final_link) (abfd, info, callback)
work out the number of relocs needed, and then multiply
by the reloc size. */
(*_bfd_error_handler)
- ("%s: relocateable link from %s to %s not supported",
+ ("%s: relocatable link from %s to %s not supported",
bfd_get_filename (abfd),
sub->xvec->name, abfd->xvec->name);
bfd_set_error (bfd_error_invalid_operation);
@@ -3490,7 +3490,7 @@ NAME(aout,final_link) (abfd, info, callback)
}
}
- if (info->relocateable)
+ if (info->relocatable)
{
if (obj_textsec (abfd) != (asection *) NULL)
trsize += (_bfd_count_link_order_relocs (obj_textsec (abfd)
@@ -4460,9 +4460,9 @@ aout_link_input_section (finfo, input_bfd, input_section, reloff_ptr,
input_size))
return FALSE;
- /* If we are producing relocateable output, the relocs were
+ /* If we are producing relocatable output, the relocs were
modified, and we now write them out. */
- if (finfo->info->relocateable && rel_size > 0)
+ if (finfo->info->relocatable && rel_size > 0)
{
if (bfd_seek (finfo->output_bfd, *reloff_ptr, SEEK_SET) != 0)
return FALSE;
@@ -4521,7 +4521,7 @@ pdp11_aout_link_input_section (finfo, input_bfd, input_section, relocs,
struct aout_link_hash_entry *, PTR, bfd_byte *, bfd_boolean *,
bfd_vma *));
bfd *output_bfd;
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
struct external_nlist *syms;
char *strings;
struct aout_link_hash_entry **sym_hashes;
@@ -4537,7 +4537,7 @@ pdp11_aout_link_input_section (finfo, input_bfd, input_section, relocs,
BFD_ASSERT (input_bfd->xvec->header_byteorder
== output_bfd->xvec->header_byteorder);
- relocateable = finfo->info->relocateable;
+ relocatable = finfo->info->relocatable;
syms = obj_aout_external_syms (input_bfd);
strings = obj_aout_external_strings (input_bfd);
sym_hashes = obj_aout_sym_hashes (input_bfd);
@@ -4578,9 +4578,9 @@ pdp11_aout_link_input_section (finfo, input_bfd, input_section, relocs,
howto = howto_table_pdp11 + howto_idx;
}
- if (relocateable)
+ if (relocatable)
{
- /* We are generating a relocateable output file, and must
+ /* We are generating a relocatable output file, and must
modify the reloc accordingly. */
if (r_extern)
{
diff --git a/bfd/pe-mips.c b/bfd/pe-mips.c
index c9a4d5841d9..3066aaa442b 100644
--- a/bfd/pe-mips.c
+++ b/bfd/pe-mips.c
@@ -1,6 +1,6 @@
/* BFD back-end for MIPS PE COFF files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002 Free Software Foundation, Inc.
+ 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Modified from coff-i386.c by DJ Delorie, dj@cygnus.com
This file is part of BFD, the Binary File Descriptor library.
@@ -73,7 +73,7 @@ static bfd_boolean coff_pe_mips_relocate_section
section for a reference to a common symbol is the value itself plus
any desired offset. Ian Taylor, Cygnus Support. */
-/* If we are producing relocateable output, we need to do some
+/* If we are producing relocatable output, we need to do some
adjustments to the object file that are not done by the
bfd_perform_relocation function. This function is called by every
reloc type to make any required adjustments. */
@@ -118,7 +118,7 @@ coff_mips_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
{
/* For some reason bfd_perform_relocation always effectively
ignores the addend for a COFF target when producing
- relocateable output. This seems to be always wrong for 386
+ relocatable output. This seems to be always wrong for 386
COFF, so we handle the addend here instead. */
diff = reloc_entry->addend;
}
@@ -467,7 +467,7 @@ coff_mips_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
#ifndef COFF_WITH_PE
/* If the output symbol is common (in which case this must be a
- relocateable link), we need to add in the final size of the
+ relocatable link), we need to add in the final size of the
common symbol. */
if (h != NULL && h->root.type == bfd_link_hash_common)
*addendp += h->root.u.c.size;
@@ -654,7 +654,7 @@ coff_pe_mips_relocate_section (output_bfd, info, input_bfd,
unsigned int i;
bfd_boolean got_lo;
- if (info->relocateable)
+ if (info->relocatable)
{
(*_bfd_error_handler) (_("\
%s: `ld -r' not supported with PE MIPS objects\n"),
@@ -722,13 +722,13 @@ coff_pe_mips_relocate_section (output_bfd, info, input_bfd,
if (howto == NULL)
return FALSE;
- /* If we are doing a relocateable link, then we can just ignore
+ /* If we are doing a relocatable link, then we can just ignore
a PC relative reloc that is pcrel_offset. It will already
- have the correct value. If this is not a relocateable link,
+ have the correct value. If this is not a relocatable link,
then we should ignore the symbol value. */
if (howto->pc_relative && howto->pcrel_offset)
{
- if (info->relocateable)
+ if (info->relocatable)
continue;
if (sym != NULL && sym->n_scnum != 0)
addend += sym->n_value;
@@ -768,7 +768,7 @@ coff_pe_mips_relocate_section (output_bfd, info, input_bfd,
+ sec->output_offset);
}
- else if (! info->relocateable)
+ else if (! info->relocatable)
{
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd, input_section,
diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c
index ba1c219bd34..7f1a6a3dfe2 100644
--- a/bfd/peXXigen.c
+++ b/bfd/peXXigen.c
@@ -961,7 +961,7 @@ _bfd_XXi_swap_scnhdr_out (abfd, in, out)
}
if (coff_data (abfd)->link_info
- && ! coff_data (abfd)->link_info->relocateable
+ && ! coff_data (abfd)->link_info->relocatable
&& ! coff_data (abfd)->link_info->shared
&& strcmp (scnhdr_int->s_name, ".text") == 0)
{
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/Make-in b/bfd/po/Make-in
index a288585d893..1608b2d6272 100644
--- a/bfd/po/Make-in
+++ b/bfd/po/Make-in
@@ -24,6 +24,8 @@ gnulocaledir = $(prefix)/share/locale
gettextsrcdir = $(prefix)/share/gettext/po
subdir = po
+DESTDIR =
+
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
MKINSTALLDIRS = @MKINSTALLDIRS@
@@ -124,9 +126,9 @@ install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
if test -r $(MKINSTALLDIRS); then \
- $(MKINSTALLDIRS) $(datadir); \
+ $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
else \
- $(top_srcdir)/mkinstalldirs $(datadir); \
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
fi
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
@@ -136,7 +138,7 @@ install-data-yes: all
*) destdir=$(localedir);; \
esac; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
- dir=$$destdir/$$lang/LC_MESSAGES; \
+ dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \
if test -r $(MKINSTALLDIRS); then \
$(MKINSTALLDIRS) $$dir; \
else \
@@ -166,12 +168,12 @@ install-data-yes: all
done
if test "$(PACKAGE)" = "gettext"; then \
if test -r $(MKINSTALLDIRS); then \
- $(MKINSTALLDIRS) $(gettextsrcdir); \
+ $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
else \
- $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \
fi; \
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
- $(gettextsrcdir)/Makefile.in.in; \
+ $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
else \
: ; \
fi
@@ -184,12 +186,12 @@ uninstall:
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
- rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
- rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
- rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
- rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
done
- rm -f $(gettextsrcdir)/po-Makefile.in.in
+ rm -f $(DESTDIR)$(gettextsrcdir)/po-Makefile.in.in
check: all
diff --git a/bfd/po/SRC-POTFILES.in b/bfd/po/SRC-POTFILES.in
index 24d4a48337c..bbd8ddad096 100644
--- a/bfd/po/SRC-POTFILES.in
+++ b/bfd/po/SRC-POTFILES.in
@@ -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
@@ -149,6 +150,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
@@ -166,6 +168,7 @@ elf32-sparc.c
elf32-v850.c
elf32-vax.c
elf32-xstormy16.c
+elf32-xtensa.c
elf32.c
elf64-alpha.c
elf64-gen.c
@@ -304,3 +307,5 @@ xcoff-target.h
xcofflink.c
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/reloc.c b/bfd/reloc.c
index 6aea881f385..09155b2757e 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -606,7 +606,7 @@ bfd_perform_relocation (abfd, reloc_entry, data, input_section, output_bfd,
return bfd_reloc_ok;
}
- /* If we are not producing relocateable output, return an error if
+ /* If we are not producing relocatable output, return an error if
the symbol is not defined. An undefined weak symbol is
considered to have a value of zero (SVR4 ABI, p. 4-27). */
if (bfd_is_und_section (symbol->section)
@@ -675,7 +675,7 @@ bfd_perform_relocation (abfd, reloc_entry, data, input_section, output_bfd,
include the position of the location; for example, m88kbcs,
or ELF. For those targets, pcrel_offset is TRUE.
- If we are producing relocateable output, then we must ensure
+ If we are producing relocatable output, then we must ensure
that this reloc will be correctly computed when the final
relocation is done. If pcrel_offset is FALSE we want to wind
up with the negative of the location within the section,
@@ -684,7 +684,7 @@ bfd_perform_relocation (abfd, reloc_entry, data, input_section, output_bfd,
we do not want to adjust the existing addend at all.
FIXME: This seems logical to me, but for the case of
- producing relocateable output it is not what the code
+ producing relocatable output it is not what the code
actually does. I don't want to change it, because it seems
far too likely that something will break. */
@@ -739,7 +739,7 @@ Hmmm. The first obvious point is that bfd_perform_relocation should
not have any tests that depend upon the flavour. It's seem like
entirely the wrong place for such a thing. The second obvious point
is that the current code ignores the reloc addend when producing
-relocateable output for COFF. That's peculiar. In fact, I really
+relocatable output for COFF. That's peculiar. In fact, I really
have no idea what the point of the line you want to remove is.
A typical COFF reloc subtracts the old value of the symbol and adds in
@@ -754,9 +754,9 @@ different story (we can't change it without losing backward
compatibility with old object files) (coff-i386 does subtract the old
value, to be compatible with existing coff-i386 targets, like SCO).
-So everything works fine when not producing relocateable output. When
-we are producing relocateable output, logically we should do exactly
-what we do when not producing relocateable output. Therefore, your
+So everything works fine when not producing relocatable output. When
+we are producing relocatable output, logically we should do exactly
+what we do when not producing relocatable output. Therefore, your
patch is correct. In fact, it should probably always just set
reloc_entry->addend to 0 for all cases, since it is, in fact, going to
add the value into the object file. This won't hurt the COFF code,
@@ -764,7 +764,7 @@ which doesn't use the addend; I'm not sure what it will do to other
formats (the thing to check for would be whether any formats both use
the addend and set partial_inplace).
-When I wanted to make coff-i386 produce relocateable output, I ran
+When I wanted to make coff-i386 produce relocatable output, I ran
into the problem that you are running into: I wanted to remove that
line. Rather than risk it, I made the coff-i386 relocs use a special
function; it's coff_i386_reloc in coff-i386.c. The function
@@ -1067,7 +1067,7 @@ bfd_install_relocation (abfd, reloc_entry, data_start, data_start_offset,
include the position of the location; for example, m88kbcs,
or ELF. For those targets, pcrel_offset is TRUE.
- If we are producing relocateable output, then we must ensure
+ If we are producing relocatable output, then we must ensure
that this reloc will be correctly computed when the final
relocation is done. If pcrel_offset is FALSE we want to wind
up with the negative of the location within the section,
@@ -1076,7 +1076,7 @@ bfd_install_relocation (abfd, reloc_entry, data_start, data_start_offset,
we do not want to adjust the existing addend at all.
FIXME: This seems logical to me, but for the case of
- producing relocateable output it is not what the code
+ producing relocatable output it is not what the code
actually does. I don't want to change it, because it seems
far too likely that something will break. */
@@ -1128,7 +1128,7 @@ Hmmm. The first obvious point is that bfd_install_relocation should
not have any tests that depend upon the flavour. It's seem like
entirely the wrong place for such a thing. The second obvious point
is that the current code ignores the reloc addend when producing
-relocateable output for COFF. That's peculiar. In fact, I really
+relocatable output for COFF. That's peculiar. In fact, I really
have no idea what the point of the line you want to remove is.
A typical COFF reloc subtracts the old value of the symbol and adds in
@@ -1143,9 +1143,9 @@ different story (we can't change it without losing backward
compatibility with old object files) (coff-i386 does subtract the old
value, to be compatible with existing coff-i386 targets, like SCO).
-So everything works fine when not producing relocateable output. When
-we are producing relocateable output, logically we should do exactly
-what we do when not producing relocateable output. Therefore, your
+So everything works fine when not producing relocatable output. When
+we are producing relocatable output, logically we should do exactly
+what we do when not producing relocatable output. Therefore, your
patch is correct. In fact, it should probably always just set
reloc_entry->addend to 0 for all cases, since it is, in fact, going to
add the value into the object file. This won't hurt the COFF code,
@@ -1153,7 +1153,7 @@ which doesn't use the addend; I'm not sure what it will do to other
formats (the thing to check for would be whether any formats both use
the addend and set partial_inplace).
-When I wanted to make coff-i386 produce relocateable output, I ran
+When I wanted to make coff-i386 produce relocatable output, I ran
into the problem that you are running into: I wanted to remove that
line. Rather than risk it, I made the coff-i386 relocs use a special
function; it's coff_i386_reloc in coff-i386.c. The function
@@ -1331,7 +1331,7 @@ space consuming. For each target:
function than to try to deal with it.
This routine does a final relocation. Whether it is useful for a
- relocateable link depends upon how the object format defines
+ relocatable link depends upon how the object format defines
relocations.
FIXME: This routine ignores any special_function in the HOWTO,
@@ -4066,7 +4066,7 @@ SYNOPSIS
struct bfd_link_info *link_info,
struct bfd_link_order *link_order,
bfd_byte *data,
- bfd_boolean relocateable,
+ bfd_boolean relocatable,
asymbol **symbols);
DESCRIPTION
@@ -4077,12 +4077,12 @@ DESCRIPTION
bfd_byte *
bfd_generic_get_relocated_section_contents (abfd, link_info, link_order, data,
- relocateable, symbols)
+ relocatable, symbols)
bfd *abfd;
struct bfd_link_info *link_info;
struct bfd_link_order *link_order;
bfd_byte *data;
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
asymbol **symbols;
{
/* Get enough memory to hold the stuff. */
@@ -4131,10 +4131,10 @@ bfd_generic_get_relocated_section_contents (abfd, link_info, link_order, data,
*parent,
(PTR) data,
input_section,
- relocateable ? abfd : (bfd *) NULL,
+ relocatable ? abfd : (bfd *) NULL,
&error_message);
- if (relocateable)
+ if (relocatable)
{
asection *os = input_section->output_section;
diff --git a/bfd/reloc16.c b/bfd/reloc16.c
index 39f36e7b11f..3a4c3d3c936 100644
--- a/bfd/reloc16.c
+++ b/bfd/reloc16.c
@@ -1,6 +1,6 @@
/* 8 and 16 bit COFF relocation functions, for BFD.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001,
- 2002 Free Software Foundation, Inc.
+ 2002, 2003 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -240,13 +240,13 @@ bfd_coff_reloc16_get_relocated_section_contents (in_abfd,
link_info,
link_order,
data,
- relocateable,
+ relocatable,
symbols)
bfd *in_abfd;
struct bfd_link_info *link_info;
struct bfd_link_order *link_order;
bfd_byte *data;
- bfd_boolean relocateable;
+ bfd_boolean relocatable;
asymbol **symbols;
{
/* Get enough memory to hold the stuff. */
@@ -259,11 +259,11 @@ bfd_coff_reloc16_get_relocated_section_contents (in_abfd,
if (reloc_size < 0)
return NULL;
- /* If producing relocateable output, don't bother to relax. */
- if (relocateable)
+ /* If producing relocatable output, don't bother to relax. */
+ if (relocatable)
return bfd_generic_get_relocated_section_contents (in_abfd, link_info,
link_order,
- data, relocateable,
+ data, relocatable,
symbols);
/* Read in the section. */
diff --git a/bfd/section.c b/bfd/section.c
index 04f439e9b4e..44edb073caa 100644
--- a/bfd/section.c
+++ b/bfd/section.c
@@ -399,8 +399,10 @@ CODE_FRAGMENT
. {* Nonzero if this section needs the relax finalize pass. *}
. unsigned int need_finalize_relax:1;
.
+. {* Nonzero if this section has a gp reloc. *}
+. unsigned int has_gp_reloc:1;
+.
. {* Usused bits. *}
-. unsigned int flag12:1;
. unsigned int flag13:1;
. unsigned int flag14:1;
. unsigned int flag15:1;
@@ -491,6 +493,10 @@ CODE_FRAGMENT
. {* Optional information about a COMDAT entry; NULL if not COMDAT. *}
. struct bfd_comdat_info *comdat;
.
+. {* Points to the kept section if this section is a link-once section,
+. and is discarded. *}
+. struct sec *kept_section;
+.
. {* When a section is being output, this value changes as more
. linenumbers are written out. *}
. file_ptr moving_line_filepos;
@@ -617,8 +623,11 @@ static const asymbol global_syms[] =
/* linker_mark, linker_has_input, gc_mark, segment_mark, */ \
0, 0, 1, 0, \
\
- /* sec_info_type, use_rela_p, has_tls_reloc, need_finalize_relax, flag12, */ \
- 0, 0, 0, 0, 0, \
+ /* sec_info_type, use_rela_p, has_tls_reloc, */ \
+ 0, 0, 0, \
+ \
+ /* need_finalize_relax, has_gp_reloc, */ \
+ 0, 0, \
\
/* flag13, flag14, flag15, flag16, flag20, flag24, */ \
0, 0, 0, 0, 0, 0, \
@@ -635,8 +644,8 @@ static const asymbol global_syms[] =
/* line_filepos, userdata, contents, lineno, lineno_count, */ \
0, NULL, NULL, NULL, 0, \
\
- /* entsize, comdat, moving_line_filepos, */ \
- 0, NULL, 0, \
+ /* entsize, comdat, kept_section, moving_line_filepos, */ \
+ 0, NULL, NULL, 0, \
\
/* target_index, used_by_bfd, constructor_chain, owner, */ \
0, NULL, NULL, NULL, \
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/sparclinux.c b/bfd/sparclinux.c
index 40e49c85e3e..0a936b1966b 100644
--- a/bfd/sparclinux.c
+++ b/bfd/sparclinux.c
@@ -354,7 +354,7 @@ linux_add_one_symbol (info, abfd, name, flags, section, value, string,
insert = FALSE;
- if (! info->relocateable
+ if (! info->relocatable
&& linux_hash_table (info)->dynobj == NULL
&& strcmp (name, SHARABLE_CONFLICTS) == 0
&& (flags & BSF_CONSTRUCTOR) != 0
diff --git a/bfd/sunos.c b/bfd/sunos.c
index 4569e8065c6..fb8e17bcfd1 100644
--- a/bfd/sunos.c
+++ b/bfd/sunos.c
@@ -1,6 +1,6 @@
/* BFD backend for SunOS binaries.
Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 2000, 2001,
- 2002 Free Software Foundation, Inc.
+ 2002, 2003 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -884,7 +884,7 @@ sunos_add_dynamic_symbols (abfd, info, symsp, sym_countp, stringsp)
{
if (! sunos_create_dynamic_sections (abfd, info,
((abfd->flags & DYNAMIC) != 0
- && !info->relocateable)))
+ && !info->relocatable)))
return FALSE;
}
@@ -911,7 +911,7 @@ sunos_add_dynamic_symbols (abfd, info, symsp, sym_countp, stringsp)
/* The native linker seems to just ignore dynamic objects when -r is
used. */
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
/* There's no hope of using a dynamic object which does not exactly
@@ -1326,7 +1326,7 @@ bfd_sunos_size_dynamic_sections (output_bfd, info, sdynptr, sneedptr,
*sneedptr = NULL;
*srulesptr = NULL;
- if (info->relocateable)
+ if (info->relocatable)
return TRUE;
if (output_bfd->xvec != &MY(vec))
diff --git a/bfd/syms.c b/bfd/syms.c
index d65a8689ca7..d0ffcc727e3 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 '?';
}
@@ -1002,7 +1005,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
(bfd_vma) 0, strsize))
return FALSE;
- /* If this is a relocateable object file, we have to relocate
+ /* If this is a relocatable object file, we have to relocate
the entries in .stab. This should always be simple 32 bit
relocations against symbols defined in this object file, so
this should be no big deal. */
diff --git a/bfd/versados.c b/bfd/versados.c
index 1301c5880a4..ee0897a55ab 100644
--- a/bfd/versados.c
+++ b/bfd/versados.c
@@ -1,5 +1,5 @@
/* BFD back-end for VERSAdos-E objects.
- Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002
+ Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
@@ -23,11 +23,11 @@
/*
SUBSECTION
- VERSAdos-E relocateable object file format
+ VERSAdos-E relocatable object file format
DESCRIPTION
- This module supports reading of VERSAdos relocateable
+ This module supports reading of VERSAdos relocatable
object files.
A VERSAdos file looks like contains
diff --git a/bfd/version.h b/bfd/version.h
index f9de765b097..ae8bcf18aaf 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1,3 +1,3 @@
-#define BFD_VERSION_DATE 20030523
+#define BFD_VERSION_DATE 20030627
#define BFD_VERSION @bfd_version@
#define BFD_VERSION_STRING @bfd_version_string@
diff --git a/bfd/vms.c b/bfd/vms.c
index c98e483e637..175dae0eba7 100644
--- a/bfd/vms.c
+++ b/bfd/vms.c
@@ -1,6 +1,6 @@
/* vms.c -- BFD back-end for VAX (openVMS/VAX) and
EVAX (openVMS/Alpha) files.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Klaus K"ampf (kkaempf@rmi.de)
@@ -132,7 +132,7 @@ static int vms_sizeof_headers
static bfd_byte *vms_bfd_get_relocated_section_contents
PARAMS ((bfd *abfd, struct bfd_link_info *link_info,
struct bfd_link_order *link_order, bfd_byte *data,
- bfd_boolean relocateable, asymbol **symbols));
+ bfd_boolean relocatable, asymbol **symbols));
static bfd_boolean vms_bfd_relax_section
PARAMS ((bfd *abfd, asection *section, struct bfd_link_info *link_info,
bfd_boolean *again));
@@ -1691,17 +1691,17 @@ vms_sizeof_headers (abfd, reloc)
static bfd_byte *
vms_bfd_get_relocated_section_contents (abfd, link_info, link_order, data,
- relocateable, symbols)
+ relocatable, symbols)
bfd *abfd ATTRIBUTE_UNUSED;
struct bfd_link_info *link_info ATTRIBUTE_UNUSED;
struct bfd_link_order *link_order ATTRIBUTE_UNUSED;
bfd_byte *data ATTRIBUTE_UNUSED;
- bfd_boolean relocateable ATTRIBUTE_UNUSED;
+ bfd_boolean relocatable ATTRIBUTE_UNUSED;
asymbol **symbols ATTRIBUTE_UNUSED;
{
#if VMS_DEBUG
vms_debug (1, "vms_bfd_get_relocated_section_contents(%p, %p, %p, %p, %s, %p)\n",
- abfd, link_info, link_order, data, (relocateable)?"True":"False", symbols);
+ abfd, link_info, link_order, data, (relocatable)?"True":"False", symbols);
#endif
return 0;
}
diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c
index 0505c86c999..6f94029914b 100644
--- a/bfd/xcofflink.c
+++ b/bfd/xcofflink.c
@@ -1,5 +1,5 @@
/* POWER/PowerPC XCOFF linker support.
- Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>, Cygnus Support.
@@ -2932,7 +2932,7 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
}
/* Garbage collect unused sections. */
- if (info->relocateable
+ if (info->relocatable
|| ! gc
|| hentry == NULL
|| (hentry->root.type != bfd_link_hash_defined
@@ -5294,7 +5294,7 @@ xcoff_link_input_bfd (finfo, input_bfd)
}
else
{
- if (! finfo->info->relocateable
+ if (! finfo->info->relocatable
&& (h->flags & XCOFF_DEF_DYNAMIC) == 0
&& (h->flags & XCOFF_IMPORT) == 0)
{
diff --git a/config.guess b/config.guess
index 6bdac8d7b61..fa58459974e 100755
--- a/config.guess
+++ b/config.guess
@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-timestamp='2003-05-09'
+timestamp='2003-06-12'
# 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
@@ -106,6 +106,7 @@ trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
dummy=$tmp/dummy ;
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
@@ -282,6 +283,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# 1.2 uses "1.2" for uname -r.
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
exit 0 ;;
+ Alpha*:OpenVMS:*:*)
+ echo alpha-hp-vms
+ exit 0 ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# Should we change UNAME_MACHINE based on the output of uname instead
@@ -320,6 +324,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4
exit 0 ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit 0 ;;
DRS?6000:UNIX_SV:4.2*:7*)
case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7 && exit 0 ;;
@@ -767,8 +774,8 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit 0 ;;
- x86:Interix*:3*)
- echo i586-pc-interix3
+ x86:Interix*:[34]*)
+ echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
exit 0 ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
@@ -797,6 +804,9 @@ EOF
arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+ exit 0 ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
diff --git a/config.sub b/config.sub
index fe4f1edf3c0..725707f709a 100755
--- a/config.sub
+++ b/config.sub
@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-timestamp='2003-05-09'
+timestamp='2003-06-13'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -229,7 +229,7 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
- | clipper \
+ | c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
| fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
@@ -261,7 +261,7 @@ case $basic_machine in
| sh64 | sh64le \
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
| strongarm \
- | tahoe | thumb | tic80 | tron \
+ | tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
| x86 | xscale | xstormy16 | xtensa \
@@ -771,18 +771,24 @@ case $basic_machine in
pentiumpro | p6 | 6x86 | athlon | athlon_*)
basic_machine=i686-pc
;;
- pentiumii | pentium2)
+ pentiumii | pentium2 | pentiumiii | pentium3)
basic_machine=i686-pc
;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
- pentiumii-* | pentium2-*)
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
pn)
basic_machine=pn-gould
;;
@@ -922,10 +928,6 @@ case $basic_machine in
basic_machine=t90-cray
os=-unicos
;;
- tic4x | c4x*)
- basic_machine=tic4x-unknown
- os=-coff
- ;;
tic54x | c54x*)
basic_machine=tic54x-unknown
os=-coff
@@ -1131,7 +1133,7 @@ case $os in
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix*)
+ | -powermax* | -dnix* | -nx6 | -nx7)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1277,6 +1279,9 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
diff --git a/configure b/configure
index e0d5acfb6b2..1d28c641877 100755
--- a/configure
+++ b/configure
@@ -12,10 +12,10 @@ ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
- --disable-serial-[{host,target,build}-]configure
- Don't force sequential configuration of
+ --enable-serial-[{host,target,build}-]configure
+ Force sequential configuration of
sub-packages for the host, target or build
- machine, or of any sub-packages at all"
+ machine, or all sub-packages"
ac_help="$ac_help
--enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer"
@@ -801,7 +801,7 @@ libgcj="target-libffi \
# these libraries are built for the target environment, and are built after
# the host libraries and the host tools (which may be a cross compiler)
#
-target_libs="target-libiberty \
+target_libraries="target-libiberty \
target-libgloss \
target-newlib \
target-libstdc++-v3 \
@@ -809,10 +809,10 @@ target_libs="target-libiberty \
${libgcj} \
target-libobjc"
-# these tools are built using the target libs, and are intended to run only
-# in the target environment
+# these tools are built using the target libraries, and are intended to
+# run only in the target environment
#
-# note: any program that *uses* libraries that are in the "target_libs"
+# note: any program that *uses* libraries that are in the "target_libraries"
# list belongs in this list. those programs are also very likely
# candidates for the "native_only" list which follows
#
@@ -827,7 +827,7 @@ target_tools="target-examples target-groff target-gperf target-rda"
## ${target_configdirs} is directories we build using the target tools.
#
configdirs=`echo ${host_libs} ${host_tools}`
-target_configdirs=`echo ${target_libs} ${target_tools}`
+target_configdirs=`echo ${target_libraries} ${target_tools}`
# Only make build modules if build != host.
# This should be done more generally, but at the moment it doesn't matter.
@@ -1140,22 +1140,22 @@ case "${target}" in
noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} gcc gdb newlib"
;;
cris-*-*)
- noconfigdirs="$noconfigdirs ${libgcj}"
+ noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
;;
d10v-*-*)
noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
;;
d30v-*-*)
- noconfigdirs="$noconfigdirs ${libgcj}"
+ noconfigdirs="$noconfigdirs ${libgcj} gdb"
;;
fr30-*-elf*)
- noconfigdirs="$noconfigdirs ${libgcj}"
+ noconfigdirs="$noconfigdirs ${libgcj} gdb"
;;
frv-*-*)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
h8300*-*-*)
- noconfigdirs="$noconfigdirs target-libgloss"
+ noconfigdirs="$noconfigdirs target-libgloss ${libgcj} target-libf2c"
;;
h8500-*-*)
noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} target-libf2c"
@@ -1179,6 +1179,9 @@ case "${target}" in
# build on HP-UX 10.20.
noconfigdirs="$noconfigdirs ld shellutils ${libgcj}"
;;
+ i960-*-*)
+ noconfigdirs="$noconfigdirs ${libgcj} gdb"
+ ;;
ia64*-*-elf*)
# No gdb support yet.
noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb"
@@ -1256,6 +1259,9 @@ case "${target}" in
i[3456789]86-*-beos*)
noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
;;
+ m32r-*-*)
+ noconfigdirs="$noconfigdirs ${libgcj} gdb"
+ ;;
m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
;;
@@ -1485,7 +1491,7 @@ do
*) add_this_lang=no ;;
esac
if test x"${add_this_lang}" = xyes; then
- eval target_libs='"$target_libs "'\"$this_lang_libs\"
+ :
else
eval noconfigdirs='"$noconfigdirs "'\"$this_lang_libs $this_lang_dirs\"
fi
@@ -1916,10 +1922,6 @@ fi
# Default to using --with-stabs for certain targets.
if test x${with_stabs} = x ; then
case "${target}" in
- mips*-*-irix6*o32)
- with_stabs=yes;
- extra_host_args="${extra_host_args} --with-stabs"
- ;;
mips*-*-irix6*)
;;
mips*-*-* | alpha*-*-osf*)
@@ -2341,7 +2343,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
@@ -2389,13 +2392,20 @@ if test "${enable_serial_configure+set}" = set; then
fi
+case ${enable_serial_configure} in
+ yes)
+ enable_serial_build_configure=yes
+ enable_serial_host_configure=yes
+ enable_serial_target_configure=yes
+ ;;
+esac
+
# These force 'configure's to be done one at a time, to avoid problems
# with contention over a shared config.cache.
rm -f serdep.tmp
echo '# serdep.tmp' > serdep.tmp
olditem=
-test "x${enable_serial_configure}" = xno ||
-test "x${enable_serial_build_configure}" = xno ||
+test "x${enable_serial_build_configure}" = xyes &&
for item in ${build_configdirs} ; do
case ${olditem} in
"") ;;
@@ -2404,8 +2414,7 @@ for item in ${build_configdirs} ; do
olditem=${item}
done
olditem=
-test "x${enable_serial_configure}" = xno ||
-test "x${enable_serial_host_configure}" = xno ||
+test "x${enable_serial_host_configure}" = xyes &&
for item in ${configdirs} ; do
case ${olditem} in
"") ;;
@@ -2414,8 +2423,7 @@ for item in ${configdirs} ; do
olditem=${item}
done
olditem=
-test "x${enable_serial_configure}" = xno ||
-test "x${enable_serial_target_configure}" = xno ||
+test "x${enable_serial_target_configure}" = xyes &&
for item in ${target_configdirs} ; do
case ${olditem} in
"") ;;
@@ -2593,7 +2601,7 @@ fi
GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)'
# Don't use libstdc++-v3's flags to configure/build itself.
-libstdcxx_flags='`test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags --build-includes` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
+libstdcxx_flags='`test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags --build-includes` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
raw_libstdcxx_flags=' -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
if test "x${CXX_FOR_TARGET+set}" = xset; then
@@ -2691,7 +2699,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:2703: 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 +2732,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:2736: 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 +2771,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:2775: 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 +2804,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:2808: 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 +2843,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:2847: 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 +2876,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:2880: 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 +2915,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:2919: 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 +2948,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:2952: 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 +2987,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:2991: 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 +3020,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:3024: 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 +3059,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:3063: 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 +3092,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:3096: 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 +3131,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:3135: 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 +3164,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:3168: 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 +3203,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:3207: 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 +3236,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:3240: 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 +3275,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:3279: 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 +3308,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:3312: 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 +3356,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:3360: 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 +3389,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:3393: 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 +3428,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:3432: 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 +3461,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:3465: 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 +3500,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:3504: 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 +3533,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:3537: 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 +3572,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:3576: 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 +3605,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:3609: 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 +3644,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:3648: 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 +3677,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:3681: 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 +3716,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:3720: 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 +3749,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:3753: 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 +3788,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:3792: 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 +3821,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:3825: 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 +3888,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:3892: 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..463db7a9cea 100644
--- a/configure.in
+++ b/configure.in
@@ -136,7 +136,7 @@ libgcj="target-libffi \
# these libraries are built for the target environment, and are built after
# the host libraries and the host tools (which may be a cross compiler)
#
-target_libs="target-libiberty \
+target_libraries="target-libiberty \
target-libgloss \
target-newlib \
target-libstdc++-v3 \
@@ -144,10 +144,10 @@ target_libs="target-libiberty \
${libgcj} \
target-libobjc"
-# these tools are built using the target libs, and are intended to run only
-# in the target environment
+# these tools are built using the target libraries, and are intended to
+# run only in the target environment
#
-# note: any program that *uses* libraries that are in the "target_libs"
+# note: any program that *uses* libraries that are in the "target_libraries"
# list belongs in this list. those programs are also very likely
# candidates for the "native_only" list which follows
#
@@ -162,7 +162,7 @@ target_tools="target-examples target-groff target-gperf target-rda"
## ${target_configdirs} is directories we build using the target tools.
#
configdirs=`echo ${host_libs} ${host_tools}`
-target_configdirs=`echo ${target_libs} ${target_tools}`
+target_configdirs=`echo ${target_libraries} ${target_tools}`
# Only make build modules if build != host.
# This should be done more generally, but at the moment it doesn't matter.
@@ -454,22 +454,22 @@ case "${target}" in
noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} gcc gdb newlib"
;;
cris-*-*)
- noconfigdirs="$noconfigdirs ${libgcj}"
+ noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
;;
d10v-*-*)
noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
;;
d30v-*-*)
- noconfigdirs="$noconfigdirs ${libgcj}"
+ noconfigdirs="$noconfigdirs ${libgcj} gdb"
;;
fr30-*-elf*)
- noconfigdirs="$noconfigdirs ${libgcj}"
+ noconfigdirs="$noconfigdirs ${libgcj} gdb"
;;
frv-*-*)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
h8300*-*-*)
- noconfigdirs="$noconfigdirs target-libgloss"
+ noconfigdirs="$noconfigdirs target-libgloss ${libgcj} target-libf2c"
;;
h8500-*-*)
noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} target-libf2c"
@@ -493,6 +493,9 @@ case "${target}" in
# build on HP-UX 10.20.
noconfigdirs="$noconfigdirs ld shellutils ${libgcj}"
;;
+ i960-*-*)
+ noconfigdirs="$noconfigdirs ${libgcj} gdb"
+ ;;
ia64*-*-elf*)
# No gdb support yet.
noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb"
@@ -570,6 +573,9 @@ case "${target}" in
i[[3456789]]86-*-beos*)
noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
;;
+ m32r-*-*)
+ noconfigdirs="$noconfigdirs ${libgcj} gdb"
+ ;;
m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
;;
@@ -799,7 +805,7 @@ do
*) add_this_lang=no ;;
esac
if test x"${add_this_lang}" = xyes; then
- eval target_libs='"$target_libs "'\"$this_lang_libs\"
+ :
else
eval noconfigdirs='"$noconfigdirs "'\"$this_lang_libs $this_lang_dirs\"
fi
@@ -1230,10 +1236,6 @@ fi
# Default to using --with-stabs for certain targets.
if test x${with_stabs} = x ; then
case "${target}" in
- mips*-*-irix6*o32)
- with_stabs=yes;
- extra_host_args="${extra_host_args} --with-stabs"
- ;;
mips*-*-irix6*)
;;
mips*-*-* | alpha*-*-osf*)
@@ -1655,7 +1657,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
@@ -1697,18 +1700,25 @@ AC_SUBST_FILE(maybe_dependencies)
# Create the serialization dependencies. This uses a temporary file.
AC_ARG_ENABLE([serial-configure],
-[ --disable-serial-[{host,target,build}-]configure
- Don't force sequential configuration of
+[ --enable-serial-[{host,target,build}-]configure
+ Force sequential configuration of
sub-packages for the host, target or build
- machine, or of any sub-packages at all])
+ machine, or all sub-packages])
+
+case ${enable_serial_configure} in
+ yes)
+ enable_serial_build_configure=yes
+ enable_serial_host_configure=yes
+ enable_serial_target_configure=yes
+ ;;
+esac
# These force 'configure's to be done one at a time, to avoid problems
# with contention over a shared config.cache.
rm -f serdep.tmp
echo '# serdep.tmp' > serdep.tmp
olditem=
-test "x${enable_serial_configure}" = xno ||
-test "x${enable_serial_build_configure}" = xno ||
+test "x${enable_serial_build_configure}" = xyes &&
for item in ${build_configdirs} ; do
case ${olditem} in
"") ;;
@@ -1717,8 +1727,7 @@ for item in ${build_configdirs} ; do
olditem=${item}
done
olditem=
-test "x${enable_serial_configure}" = xno ||
-test "x${enable_serial_host_configure}" = xno ||
+test "x${enable_serial_host_configure}" = xyes &&
for item in ${configdirs} ; do
case ${olditem} in
"") ;;
@@ -1727,8 +1736,7 @@ for item in ${configdirs} ; do
olditem=${item}
done
olditem=
-test "x${enable_serial_configure}" = xno ||
-test "x${enable_serial_target_configure}" = xno ||
+test "x${enable_serial_target_configure}" = xyes &&
for item in ${target_configdirs} ; do
case ${olditem} in
"") ;;
@@ -1906,7 +1914,7 @@ fi
GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)'
# Don't use libstdc++-v3's flags to configure/build itself.
-libstdcxx_flags='`test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags --build-includes` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
+libstdcxx_flags='`test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags --build-includes` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
raw_libstdcxx_flags=' -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
if test "x${CXX_FOR_TARGET+set}" = xset; then
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f25e81b00b3..a55b4546856 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,2877 @@
+2003-06-27 David Carlton <carlton@kealia.com>
+
+ * Merge with mainline; tag is carlton_dictionary-20030627-merge.
+
+2003-06-27 Elena Zannoni <ezannoni@redhat.com>
+
+ * symfile.c (syms_from_objfile): Move variables to inner block.
+ Move the checks for the non-mainline case a bit earlier to avoid
+ doing some useless computations.
+
+2003-06-27 Elena Zannoni <ezannoni@redhat.com>
+
+ * dwarfread.c (decode_modified_type): Gag new compiler warning.
+
+2003-06-26 Elena Zannoni <ezannoni@redhat.com>
+
+ * dwarf2read.c (dwarf2_locate_sections): Ignore empty .eh_frame
+ sections.
+
+2003-06-26 Michael Chastain <mec@shout.net>
+
+ * config/djgpp/fnchange.lst: Add gdb/testsuite/gdb.c++/pr-1210.cc,
+ gdb/testsuite/gdb.c++/pr-1210.exp.
+
+2003-06-26 Andrew Cagney <cagney@redhat.com>
+
+ * config/djgpp/fnchange.lst: Fix 8.3 problem with sim/ppc's
+ altivec_expression.h and altivec_registers.h.
+
+2003-06-26 Andrew Cagney <cagney@redhat.com>
+
+ * mips-tdep.c (gdb_print_insn_mips): Only explicitly set
+ info->mach when MIPS16. Patch suggested by Fred Fish.
+
+2003-06-26 Andrew Cagney <cagney@redhat.com>
+
+ * utils.c (internal_vproblem): Print the problem to a reason
+ buffer and then pass to query. Make the msg variable more local.
+
+2003-06-26 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (FRAME_ARGS_ADDRESS): Add predicate. Deprecate.
+ (FRAME_LOCALS_ADDRESS): Add predicate. Deprecate.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * frame-base.c (default_frame_args_address): Update. Use
+ default_frame_base_address when DEPRECATED_FRAME_ARGS_ADDRESS is
+ not available.
+ (default_frame_locals_address): Ditto for
+ DEPRECATED_FRAME_LOCALS_ADDRESS.
+ * vax-tdep.c (vax_sigtramp_saved_pc): Update.
+ (vax_frame_num_args): Update.
+ (vax_gdbarch_init): Update.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Update.
+ * ns32k-tdep.c (ns32k_gdbarch_init): Update.
+ * mcore-tdep.c (mcore_gdbarch_init): Update.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
+ * ia64-tdep.c (ia64_gdbarch_init): Update.
+ * symtab.h (address_class): Update comments.
+ * ns32k-tdep.c (ns32k_sigtramp_saved_pc): Update.
+ * config/sparc/tm-sparc.h (DEPRECATED_FRAME_ARGS_ADDRESS): Update.
+ (DEPRECATED_FRAME_LOCALS_ADDRESS): Update.
+ * config/pa/tm-hppa64.h (DEPRECATED_FRAME_ARGS_ADDRESS): Update.
+ (DEPRECATED_FRAME_LOCALS_ADDRESS): Update.
+ (DEPRECATED_FRAME_LOCALS_ADDRESS): Update.
+ * config/m68k/tm-delta68.h (DEPRECATED_FRAME_ARGS_ADDRESS): Update.
+ * alpha-mdebug-tdep.c: Update.
+ * ada-lang.c (add_symbols_from_enclosing_procs): Update.
+
+2003-06-26 Andreas Jaeger <aj@suse.de>
+
+ * x86-64-tdep.c (x86_64_push_arguments): Always set %rax to number
+ of SSE registers so that varargs functions work. Rework handling
+ of passing arguments on the stack.
+ (x86_64_store_return_value): Return double and float values in SSE
+ register.
+
+2003-06-24 Michael Chastain <mec@shout.net>
+
+ * PROBLEMS: Document pr gdb/1091 and pr gdb/1193,
+ the "constructor breakpoints ignored" bug.
+
+2003-06-25 David Carlton <carlton@kealia.com>
+
+ * MAINTAINERS: Update e-mail address.
+
+2003-06-24 Jim Blandy <jimb@redhat.com>
+
+ * ppc-linux-tdep.c: More "Linux" -> "GNU/Linux".
+
+ * ppc-linux-tdep.c (ppc64_linux_convert_from_func_ptr_addr): New
+ function.
+ (ppc_linux_init_abi): Register it as the
+ CONVERT_FROM_FUNC_PTR_ADDR method under the PPC64 Linux ABI.
+
+ * ppc-linux-tdep.c (ppc64_call_dummy_address): New function.
+ (ppc_linux_init_abi): Set it as the gdbarch's call_dummy_address
+ method.
+
+ * ppc-linux-tdep.c (ppc64_desc_entry_point): New function.
+ (ppc64_standard_linkage_target): Use it.
+
+2003-06-23 Andrew Cagney <cagney@redhat.com>
+
+ * rs6000-tdep.c (rs6000_register_virtual_type): Add explict cases
+ for 0 "int0" and 4 "int32" sized registers.
+ * gdbtypes.c (builtin_type_int0): Define.
+ (build_gdbtypes): Initialize builtin_type_int0.
+ * gdbtypes.h (builtin_type_int0): Declare.
+
+2003-06-23 Stephane Carrez <stcarrez@nerim.fr>
+
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Clear gdb_arch_char_signed
+ as characters are unsigned.
+
+2003-06-22 Daniel Jacobowitz <drow@mvista.com>
+
+ PR gdb/1179
+ * dwarfread.c (struct_type): Skip static fields without crashing.
+
+2003-06-22 Andrew Cagney <cagney@redhat.com>
+
+ GDB 6.0 branch created.
+ * README: Update.
+ * PROBLEMS: Update. Empty.
+ * NEWS: Update.
+
+2003-06-22 Daniel Jacobowitz <drow@mvista.com>
+
+ * symfile.c (add_symbol_file_command): Use parse_and_eval_address.
+ Suggested by Nick Hibma <n_hibma@webweaving.org>.
+
+2003-06-22 Andrew Cagney <cagney@redhat.com>
+
+ * osabi.c (generic_elf_osabi_sniff_abi_tag_sections): Handle
+ GNU_ABI_TAG_FREEBSD and GNU_ABI_TAG_NETBSD. Suggested by Momchil
+ Velikov.
+
+2003-06-22 Daniel Jacobowitz <drow@mvista.com>
+
+ * cli/cli-cmds.c (shell_escape): Silence warnings from old
+ compilers.
+
+2003-06-21 Daniel Jacobowitz <drow@mvista.com>
+
+ * c-valprint.c (c_value_print): Add VALUE_OFFSET to the address
+ argument of val_print.
+ * cp-valprint.c (cp_print_value): Don't add the offset parameter
+ to the address argument of baseclass_offset or target_read_memory.
+ Do add it to the argument of cp_print_value_fields.
+
+2003-06-21 Andrew Cagney <cagney@redhat.com>
+
+ * mips-tdep.c: Include "reggroups.h" and "sim-regno.h".
+ (mips_register_name): Return names for NUM_REGS..2*NUM_REGS
+ instead of 0..NUM_REGS.
+ (mips_register_reggroup_p): New function.
+ (mips_pseudo_register_write): New function.
+ (mips_pseudo_register_read): New function.
+ (mips_register_raw_size): For NUM_REGS..2*NUM_REGS return the size
+ based on the register's type.
+ (read_next_frame_reg): Simplify. Assert that REGNO is a pseudo /
+ cooked.
+ (mips_get_saved_register): Simplify. Assert that REGNO is a
+ pseudo / cooked.
+ (mips_register_byte): New function. Use MIPS_REGISTER_BYTE.
+ (mips_register_type): Replace mips_register_virtual_type. Map
+ NUM_REGS..2*NUM_REGS onto 0..NUM_REGS. Use MIPS_REGISTER_TYPE
+ when available.
+ (read_next_frame_reg): Simplify, but handle SP_REGNUM. Assert
+ that the register is cooked / virtual.
+ (mips_frame_saved_pc): Fetch the cooked PC, and not the raw PC.
+ Only get the extra info when needed.
+ (set_reg_offset): Save the offset in NUM_REGS..2*NUM_REGS as well.
+ (mips32_heuristic_proc_desc): Fetch the cooked register.
+ (heuristic_proc_desc, mips_pop_frame, get_frame_pointer): Ditto.
+ (mips_init_extra_frame_info, get_frame_pointer): Ditto.
+ (mips_print_register): Use gdbarch_register_type, instead of
+ REGISTER_VIRTUAL_TYPE.
+ (print_gp_register_row): Use gdbarch_register_type, instead of
+ REGISTER_VIRTUAL_TYPE. Allow for a pseudo / cooked REGNUM.
+ (mips_print_registers_info): Assert REGNO is pseodo / cooked.
+ Print the pseudo / cooked registers.
+ (mips_print_registers_info): Assert REGNO is pseodo / cooked.
+ Print the pseudo / cooked registers.
+ (mips_xfer_register): Use regcache_cooked_read_part. Assert that
+ REG_NUM is pseudo / cooked.
+ (mips_o32_xfer_return_value): Xfer the pseudo / cooked register.
+ (mips_n32n64_xfer_return_value): Ditto.
+ (mips_stab_reg_to_regnum): Map onto NUM_REGS..2*NUM_REGS.
+ (mips_dwarf_dwarf2_ecoff_reg_to_regnum): Ditto.
+ (mips_register_sim_regno): New function.
+ (mips_gdbarch_init): Set deprecated_register_byte,
+ register_group_p, pseudo_register_write, pseudo_register_read,
+ register_sim_regno, and num_pseudo_regs. Set register_type,
+ instead of register_virtual_type.
+ * Makefile.in (mips-tdep.o): Update dependencies.
+ * config/mips/tm-mips64.h (MIPS_REGISTER_TYPE): Rename
+ REGISTER_VIRTUAL_TYPE.
+ * config/mips/tm-mips.h (MIPS_REGISTER_TYPE): Ditto.
+ * config/mips/tm-irix5.h (MIPS_REGISTER_TYPE): Ditto.
+ * config/mips/tm-mips.h (MIPS_REGISTER_BYTE): Rename REGISTER_BYTE.
+ * config/mips/tm-irix6.h (MIPS_REGISTER_BYTE): Ditto.
+ * config/mips/tm-irix5.h (MIPS_REGISTER_BYTE): Ditto.
+
+2003-06-21 Daniel Jacobowitz <drow@mvista.com>
+
+ * Makefile.in (cli-cmds.o): Depend on $(gdb_vfork_h)
+ * cli/cli-cmds.c: Include "gdb_vfork.h".
+ (shell_escape): Use vfork.
+
+2003-06-21 Andrew Cagney <cagney@redhat.com>
+
+ * mips-tdep.c (mips_find_saved_regs): Rewrite mdebug code handling
+ 32 bit floating-point register saves.
+
+ * frame.h (deprecated_unwind_get_saved_register): Delete.
+ * frame.c (deprecated_unwind_get_saved_register): Delete function.
+ * mips-tdep.c (mips_get_saved_register): Use frame_register_unwind
+ and deprecated_get_next_frame_hack instead of
+ deprecated_unwind_get_saved_register.
+
+ * mips-tdep.c (mips_dump_tdep): Do not print
+ REGISTER_CONVERT_FROM_TYPE or REGISTER_CONVERT_TO_TYPE.
+
+ * frame.c (get_frame_register): New function.
+ (frame_unwind_register_signed): New function.
+ (get_frame_register_signed): New function.
+ (frame_unwind_register_unsigned): New function.
+ (get_frame_register_unsigned): New function.
+ * frame.h: Add comments on naming schema.
+ (get_frame_register, frame_unwind_register_signed): Declare.
+ (get_frame_register_signed, get_frame_register_signed): Declare.
+ (frame_unwind_register_unsigned): Declare.
+ (get_frame_register_unsigned): Declare.
+
+2003-06-20 Theodore A. Roth <troth@openavr.org>
+
+ * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_bfd_vma_bit.
+
+2003-06-20 Theodore A. Roth <troth@openavr.org>
+
+ * avr-tdep.c (avr_read_pc): Use regcache instead of read_register.
+ (avr_read_sp): Ditto.
+
+2003-06-20 Daniel Jacobowitz <drow@mvista.com>
+
+ * config/arm/linux.mt: Remove code protected by GDBSERVER define.
+ * config/arm/nm-linux.h: Likewise.
+ * config/arm/tm-linux.h: Likewise.
+ * config/ia64/nm-linux.h: Likewise.
+ * config/ia64/tm-ia64.h: Likewise.
+ * config/s390/tm-linux.h: Likewise.
+ * config/s390/tm-s390.h: Likewise.
+ * s390-nat.c: Likewise.
+ * s390-tdep.c: Likewise.
+
+ * config/i386/linux.mt: Don't set GDBSERVER_DEPFILES.
+ * config/ia64/linux.mt: Likewise.
+ * config/m68k/linux.mh: Likewise.
+ * config/mips/linux.mt: Likewise.
+ * config/powerpc/linux.mh: Likewise.
+ * config/sh/linux.mt: Likewise.
+
+2003-06-19 Kris Warkentin <kewarken@qnx.com>
+
+ * solib.c (solib_open): Change tests for whether to search
+ LD_LIBRARY_PATH and PATH to better deal with remotes. Update
+ comments.
+
+2003-06-19 Theodore A. Roth <troth@openavr.org>
+
+ * avr-tdep.c (avr_frame_address): Delete function.
+ (avr_gdbarch_init): Don't call set_gdbarch_frame_args_address,
+ set_gdbarch_frame_args_address.
+
+2003-06-19 Andrew Cagney <cagney@redhat.com>
+
+ * config/mips/tm-mips.h (REGISTER_CONVERT_TO_TYPE): Delete.
+ (REGISTER_CONVERT_FROM_TYPE): Delete.
+ (mips_register_convert_to_type): Delete declaration.
+ (mips_register_convert_from_type): Delete declaration.
+ * linux-nat.h (struct target_ops): Declare opaque. s/Linux/Linux
+ kernel/.
+
+2003-06-19 Michael Snyder <msnyder@redhat.com>
+
+ * linux-nat.h: New file.
+ * linux-nat.c: Include linux-nat.h.
+ * lin-lwp.c: Include linux-nat.h.
+ Move struct lwp_info def to linux-nat.h.
+ * linux-proc.c: Include linux-nat.h.
+ (linux_make_note_section): Iterate over lwps instead of threads.
+ (linux_do_thread_registers): Use lwp instead of merged pid.
+ * config/nm-linux.h: Move miscelaneous def'ns to linux-nat.h.
+ * Makefile.in (lin-lwp.o, linux-proc.o, linux-nat.o):
+ Add dependency on linux_nat_h.
+
+2003-06-19 Theodore A. Roth <troth@openavr.org>
+
+ * avr-tdep.c (avr_extract_return_value): Delete debugging fprintf.
+
+2003-06-19 Daniel Jacobowitz <drow@mvista.com>
+
+ * varobj.c (get_type, get_target_type): Use check_typedef.
+
+2003-06-19 Daniel Jacobowitz <drow@mvista.com>
+
+ * breakpoint.c (insert_catchpoint): Call internal_error.
+
+2003-06-19 Theodore A. Roth <troth@openavr.org>
+
+ * avr-tdep.c (avr_push_dummy_code): Delete function.
+ (avr_gdbarch_init): Don't call set_gdbarch_push_dummy_code.
+
+2003-06-19 Daniel Jacobowitz <drow@mvista.com>
+
+ * arch-utils.c (default_prepare_to_proceed): Remove.
+ (generic_prepare_to_proceed): Remove.
+ * arch-utils.h (default_prepare_to_proceed): Remove prototype.
+ (generic_prepare_to_proceed): Remove prototype.
+ * gdbarch.sh (PREPARE_TO_PROCEED): Remove.
+ * gdbarch.c: Regenerate.
+ * gdbarch.h: Regenerate.
+ * hppa-tdep.c (hppa_prepare_to_proceed): Remove dangling prototype.
+ * hppah-nat.c (hppa_switched_threads): Remove.
+ * infrun.c (prepare_to_proceed): New static function, copied from
+ generic_prepare_to_proceed. Remove select_it argument.
+ (proceed): Call prepare_to_proceed.
+ * infttrace.c (old_gdb_pid, reported_pid, reported_bpt): Remove
+ variables.
+ (ptrace_wait): Don't set the removed variables.
+ (hppa_switched_threads): Remove.
+ * lin-lwp.c (lin_lwp_prepare_to_proceed): Remove.
+ * config/nm-linux.h (PREPARE_TO_PROCEED): Don't define.
+ (lin_lwp_prepare_to_proceed): Remove prototype.
+ * config/i386/nm-x86-64linux.h (PREPARE_TO_PROCEED): Don't undefine.
+ * config/pa/nm-hppah.h (PREPARE_TO_PROCEED): Don't define.
+
+2003-06-18 Theodore A. Roth <troth@openavr.org>
+
+ * avr-tdep.c: Include frame.h, frame-unwind.h, frame-base.h, and
+ trad-frame.h.
+ (AVR_MAX_PROLOGUE_SIZE): Increase from 56 to 64.
+ (AVR_ARG1_REGNUM, AVR_ARGN_REGNUM): Define.
+ (AVR_RET1_REGNUM, AVR_RETN_REGNUM): Define.
+ (AVR_PROLOGUE_*): Enumerate prologue types.
+ (struct frame_extra_info): Remove.
+ (struct avr_unwind_cache): Define.
+ (avr_write_sp): Delete function.
+ (avr_read_fp): Ditto.
+ (avr_init_extra_frame_info): Ditto.
+ (avr_pop_frame): Ditto.
+ (avr_frame_saved_pc): Ditto.
+ (avr_saved_pc_after_call): Ditto.
+ (avr_push_return_address): Ditto.
+ (avr_frame_chain): Ditto.
+ (avr_store_struct_return): Ditto.
+ (avr_push_arguments): Ditto.
+ (avr_scan_prologue): Update comments. Changed to set up the info for
+ cache unwinding. Now returns end of prologue PC.
+ (avr_skip_prologue): Better handling of functions lacking a prologue
+ by using avr_scan_prologue.
+ (avr_scan_arg_moves): New function.
+ (avr_saved_regs_unwinder): Ditto.
+ (avr_frame_unwind_cache): Ditto.
+ (avr_unwind_pc): Ditto.
+ (avr_frame_this_id): Ditto.
+ (avr_frame_prev_register): Ditto.
+ (avr_frame_p): Ditto.
+ (avr_frame_base_address ): Ditto.
+ (avr_unwind_dummy_id): Ditto.
+ (avr_push_dummy_code): Ditto.
+ (push_stack_item): Ditto.
+ (pop_stack_item): Ditto.
+ (avr_push_dummy_call): Ditto.
+ (struct stack_item): Define.
+ (avr_frame_unwind): Declare structure.
+ (avr_frame_base): Ditto.
+ (avr_gdbarch_init): Remove calls to
+ set_gdbarch_deprecated_init_frame_pc,
+ set_gdbarch_deprecated_target_read_fp,
+ set_gdbarch_deprecated_dummy_write_sp,
+ set_gdbarch_deprecated_fp_regnum,
+ set_gdbarch_deprecated_push_arguments,
+ set_gdbarch_deprecated_push_return_address,
+ set_gdbarch_deprecated_pop_frame,
+ set_gdbarch_deprecated_store_struct_return,
+ set_gdbarch_deprecated_frame_init_saved_regs,
+ set_gdbarch_deprecated_init_extra_frame_info,
+ set_gdbarch_deprecated_frame_chain,
+ set_gdbarch_deprecated_frame_saved_pc,
+ set_gdbarch_deprecated_saved_pc_after_call.
+ Add calls to set_gdbarch_push_dummy_call,
+ set_gdbarch_push_dummy_code,
+ frame_unwind_append_predicate,
+ frame_base_set_default,
+ set_gdbarch_unwind_dummy_id,
+ set_gdbarch_unwind_pc.
+ Wrap a long line.
+
+2003-06-18 Corinna Vinschen <vinschen@redhat.com>
+
+ * h8300-tdep.c (h8300s_register_name): Enable MACH and MACL
+ registers for H8/300S.
+ (h8300_print_registers_info): Ditto.
+ (h8300_gdbarch_init): Accommodate register count for H8/300S.
+
+2003-06-18 Daniel Jacobowitz <drow@mvista.com>
+
+ * config/nm-linux.h (linux_record_stopped_pid): New prototype.
+ * lin-lwp.c (child_wait): Call linux_record_stopped_pid.
+ (lin_lwp_wait): Likewise. Update comments.
+ * linux-nat.c (struct simple_pid_list, add_to_pid_list)
+ (pull_pid_from_list, linux_record_stopped_pid): New.
+
+2003-06-17 Stephane Carrez <stcarrez@nerim.fr>
+
+ * ada-lang.c (scan_discrim_bound): Name first argument.
+ (ada_add_block_symbols): Remove BLOCK_SYM to use local variable
+ declared by ALL_BLOCK_SYMBOLS.
+
+2003-06-17 Stephane Carrez <stcarrez@nerim.fr>
+
+ * ada-tasks.c (find_function_in_inferior): Don't declare it.
+ ("regcache.h"): Include it.
+ * ada-lex.l (block_lookup): Replace VAR_NAMESPACE with VAR_DOMAIN.
+
+2003-06-17 Daniel Jacobowitz <drow@mvista.com>
+
+ * NEWS: Mention gdbserver detach change and "disconnect" command.
+ * infcmd.c (disconnect_command): New function.
+ (_initialize_infcmd): Add ``disconnect'' command.
+ * remote.c (remote_async_detach): Delete.
+ (remote_detach): Merge remote_async_detach.
+ (remote_disconnect): New.
+ (init_remote_ops): Set to_disconnect.
+ (init_remote_cisco_ops): Likewise.
+ (init_remote_async_ops): Likewise. Use remote_detach.
+ * target.c (cleanup_target): Default to_disconnect.
+ (update_current_target): Inherit to_disconnect.
+ (target_disconnect, debug_to_disconnect): New functions.
+ (setup_target_debug): Set to_disconnect.
+ * target.h (struct target_ops): Add to_disconnect.
+ (target_disconnect): Add prototype.
+
+2003-06-17 Daniel Jacobowitz <drow@mvista.com>
+
+ * breakpoint.c (insert_catchpoint): New function.
+ (insert_breakpoints): Use catch_exceptions to call
+ insert_catchpoint. Disable catchpoints if they fail to insert.
+
+2003-06-17 Daniel Jacobowitz <drow@mvista.com>
+
+ * symfile.c (reread_symbols): Clear sym_private.
+
+2003-06-17 Andrew Cagney <cagney@redhat.com>
+
+ * trad-frame.h (struct frame_info): Add opaque declaration.
+ * remote-fileio.h (struct cmd_list_element): Add opaque
+ declaration.
+ * h8300-tdep.c (h8300s_register_name): Avoid C++ // style
+ comments.
+
+2003-06-17 Daniel Jacobowitz <drow@mvista.com>
+
+ * remote.c (remote_prepare_to_store): Replace call to
+ deprecated_read_register_bytes with multiple regcache_raw_read
+ calls.
+
+2003-06-17 Kris Warkentin <kewarken@qnx.com>
+
+ * nto-tdep.c (nto_map_arch_to_cputype): Recognize "powerpc".
+ (nto_find_and_open_solib): Likewise.
+ (nto_init_solib_absolute_prefix): Likewise.
+ (_initialize_nto_tdep): Fix indentation.
+
+2003-06-17 Kris Warkentin <kewarken@qnx.com>
+
+ * i386-nto-tdep.c (i386nto_sigcontext_addr): Make sp a CORE_ADDR.
+
+2003-06-17 Kris Warkentin <kewarken@qnx.com>
+
+ * i386-nto-tdep.c (i386nto_sigcontext_addr): Declare sp before using.
+
+2003-06-17 Jim Blandy <jimb@redhat.com>
+
+ * ppc-linux-tdep.c: "Linux" -> "GNU/Linux"
+
+2003-06-16 Theodore A. Roth <troth@openavr.org>
+
+ * avr-tdep.c (avr_extract_return_value): New function.
+ (avr_gdbarch_init): Set extract_return_value method.
+
+2003-06-16 Andrew Cagney <cagney@redhat.com>
+
+ * frame.h (deprecated_get_next_frame_hack): Declare.
+ * frame.c (legacy_saved_regs_prev_register): Only require
+ DEPRECATED_FRAME_INIT_SAVED_REGS when it is needed. Assert that
+ there are always saved regs.
+ (deprecated_generic_get_saved_register): Do not require
+ DEPRECATED_FRAME_INIT_SAVED_REGS.
+ (legacy_get_prev_frame): Do not require DEPRECATED_FRAME_CHAIN,
+ use frame ID unwind instead.
+ (deprecated_get_next_frame_hack): New function.
+
+2003-06-16 Corinna Vinschen <vinschen@redhat.com>
+
+ * h8300-tdep.c (h8300_push_arguments): Remove. Substitute by...
+ (h8300_push_dummy_call): ...this function. Some minor optimization.
+ (h8300_push_return_address): Remove.
+ (h8300_gdbarch_init): Remove calls to
+ set_gdbarch_deprecated_dummy_write_sp,
+ set_gdbarch_deprecated_push_arguments and
+ set_gdbarch_deprecated_push_return_address.
+ Add call to set_gdbarch_push_dummy_call.
+
+2003-06-16 Corinna Vinschen <vinschen@redhat.com>
+
+ * h8300-tdep.c (E_PSEUDO_CCR_REGNUM): New define.
+ (E_PSEUDO_EXR_REGNUM): Ditto.
+ (h8300_is_argument_spill): Check for instructions moving argument
+ registers into safe registers.
+ (h8300_skip_prologue): Check for stm instruction to push registers
+ used for register variables onto stack.
+ (gdb_print_insn_h8300): Remove.
+ (h8300_examine_prologue): Add a comment.
+ (h8300_register_name): Take pseudo registers into account.
+ (h8300s_register_name): Ditto.
+ (h8300sx_register_name): Ditto.
+ (h8300_print_register): Ditto.
+ (h8300_print_registers_info): Define "nice" printing order.
+ (h8300_saved_pc_after_call): Take pseudo registers into account.
+ (h8300_register_type): Ditto. Return type used for remote connection
+ when requesting real CCR or EXR register, return actual type when
+ requesting pseudo CCR or EXR.
+ (h8300_pseudo_register_read): New function.
+ (h8300_pseudo_register_write): Ditto.
+ (h8300_dbg_reg_to_regnum): Ditto.
+ (h8300s_dbg_reg_to_regnum): Ditto.
+ (h8300_gdbarch_init): Call set_gdbarch_num_pseudo_regs,
+ set_gdbarch_ecoff_reg_to_regnum, set_gdbarch_dwarf_reg_to_regnum,
+ set_gdbarch_dwarf2_reg_to_regnum, set_gdbarch_stab_reg_to_regnum and
+ set_gdbarch_print_insn architecture dependent.
+ Call set_gdbarch_pseudo_register_read and
+ set_gdbarch_pseudo_register_write.
+ (_initialize_h8300_tdep): Remove assignment to deprecated_tm_print_insn.
+
+2003-06-16 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (SAVE_DUMMY_FRAME_TOS): Deprecate.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Update.
+ * s390-tdep.c (s390_gdbarch_init): Update.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Update.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Update.
+ * mips-tdep.c (mips_gdbarch_init): Update.
+ * mcore-tdep.c (mcore_gdbarch_init): Update.
+ * cris-tdep.c (cris_gdbarch_init): Update.
+ * infcall.c (call_function_by_hand): Update.
+ * ia64-tdep.c (ia64_push_arguments): Update comment.
+ * frame.c (legacy_get_prev_frame): Do not assume
+ SAVE_DUMMY_FRAME_TOS_P.
+ * dummy-frame.c (find_dummy_frame): Update comment.
+
+2003-06-16 Andrew Cagney <cagney@redhat.com>
+
+ * regcache.c (do_cooked_read): Do not use register_valid_p.
+
+2003-06-15 Theodore A. Roth <troth@openavr.org>
+
+ * avr-tdep.c (avr_register_type): Remove a blank line.
+ (avr_scan_prologue): Correct some comments.
+
+2003-06-15 Theodore A. Roth <troth@openavr.org>
+
+ * avr-tdep.c (avr_scan_prologue): Update comment describing the various
+ prologue types.
+ Properly scan prologues generated by gcc with the -mcall-prologues
+ option.
+ Add code to scan -mcall-prologues for mega devices.
+
+2003-06-15 Theodore A. Roth <troth@openavr.org>
+
+ * avr-tdep.c (avr_register_byte): Delete function.
+ (avr_register_raw_size): Delete function.
+ (avr_register_virtual_size): Delete function.
+ (avr_register_virtual_type): Delete function.
+ (avr_register_type): New function.
+ (avr_address_to_pointer): Remove unused code.
+ (avr_read_fp): Need to read FP as two separate bytes due to change to
+ avr_register_type() usage.
+ (avr_gdbarch_init): Don't set deprecated_register_size.
+ Don't set deprecated_register_bytes.
+ Don't set deprecated_register_byte.
+ Don't set deprecated_register_raw_size.
+ Don't set deprecated_max_register_raw_size.
+ Don't set deprecated_register_virtual_size.
+ Don't set deprecated_max_register_virtual_size.
+ Don't set deprecated_register_virtual_type.
+ Set register_type method.
+
+2003-06-15 Daniel Jacobowitz <drow@mvista.com>
+
+ * Makefile.in (linux-nat.o): Add rule.
+ * linux-nat.c: New file.
+ * config/nm-linux.h (CHILD_INSERT_FORK_CATCHPOINT): Define.
+ (CHILD_INSERT_VFORK_CATCHPOINT): Define.
+ (CHILD_INSERT_EXEC_CATCHPOINT): Define.
+ * config/alpha/alpha-linux.mh (NATDEPFILES): Add linux-nat.o.
+ * config/arm/linux.mh (NATDEPFILES): Likewise.
+ * config/i386/linux.mh (NATDEPFILES): Likewise.
+ * config/i386/x86-64linux.mh (NATDEPFILES): Likewise.
+ * config/ia64/linux.mh (NATDEPFILES): Likewise.
+ * config/m68k/linux.mh (NATDEPFILES): Likewise.
+ * config/mips/linux.mh (NATDEPFILES): Likewise.
+ * config/powerpc/linux.mh (NATDEPFILES): Likewise.
+ * config/s390/s390.mh (NATDEPFILES): Likewise.
+ * config/sparc/linux.mh (NATDEPFILES): Likewise.
+
+2003-06-15 Mark Kettenis <kettenis@gnu.org>
+
+ * i387-tdep.c: Reorder includes, fix some whitespace issues and
+ replace out-of-date comment.
+
+2003-06-15 Andrew Cagney <cagney@redhat.com>
+
+ * rdi-share/host.h (Fail): Change to a varargs function.
+ * remote-rdi.c (Fail): Update.
+
+2003-06-15 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.c (i386_next_regnum): Fix bounds checking.
+ (i386_convert_register_p, i386_register_to_value,
+ i386_register_from_value): Handle types longer than 8 bytes.
+
+2003-06-15 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.c (i386_register_to_value, i386_value_to_register):
+ Move floating-point code to new function in i387-tdep.c.
+ * i387-tdep.c (i387_register_to_value, i387_value_to_register):
+ New functions containing code moved here from i386-tdep.c.
+ * i387-tdep.h: Add opaque declaration for `struct type'.
+ (i387_register_to_value, i387_value_to_register): New prototypes.
+ * x86-64-tdep.c (x86_64_convert_register_p): New function.
+ (x86_64_init_abi): Set convert_register_p, register_to_value and
+ value_to_register here.
+
+2003-06-14 Andrew Cagney <cagney@redhat.com>
+
+ * mips-tdep.c (mips_register_to_value): Make static.
+ (mips_value_to_register): Make static.
+ * i386-tdep.c (i386_fetch_pointer_argument): Make static.
+ * ia64-tdep.c (ia64_register_raw_size): Make static.
+ (ia64_register_virtual_size): Make static.
+ (ia64_register_byte): Make static.
+ * i387-tdep.c: Include "i387-tdep.h".
+ (print_387_control_word): Delete function.
+ (print_387_status_word): Delete function.
+ (print_387_status_bits): Delete function.
+ (print_387_control_bits): Delete function.
+ * Makefile.in (i387-tdep.o): Update dependencies.
+ * rdi-share/host.h (Fail): Declare.
+ * remote-rdi.c (Fail): Update to match declaration.
+
+2003-06-14 Andrew Cagney <cagney@redhat.com>
+
+ * config/mips/embedl64.mt (TDEPFILES): Delete "remote-array.o".
+ * config/mips/embedl.mt (TDEPFILES): Delete "remote-array.o".
+ * config/mips/embed64.mt (TDEPFILES): Delete "remote-array.o".
+ * config/djgpp/fnchange.lst: Delete "remote-array.c".
+ * README: Delete reference to remote-array.
+ * Makefile.in (ALLDEPFILES): Remove "remote-array.c".
+ (remote-array.o): Delete target.
+ * config/mips/embed.mt (TDEPFILES): Delete "remote-array.o".
+ * remote-array.c: Delete file.
+
+2003-06-14 Andrew Cagney <cagney@redhat.com>
+ Mark Kettenis <kettenis@gnu.org>
+
+ * gdbarch.sh (CONVERT_REGISTER_P): Add "type" parameter.
+ (REGISTER_TO_VALUE, VALUE_TO_REGISTER): Replace raw buffer
+ parameter with "frame".
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * frame.h (put_frame_register): Declare.
+ * frame.c (put_frame_register): New function.
+ * arch-utils.c (legacy_convert_register_p): Add "type" parameter.
+ (legacy_register_to_value): Rewrite, use "frame" to get the
+ register value.
+ (legacy_value_to_register): Rewrite, use "frame" to find the
+ register's location before storing.
+ * arch-utils.h (legacy_convert_register_p): Update.
+ (legacy_register_to_value, legacy_value_to_register): Update.
+ * findvar.c (value_from_register): Rewrite, eliminate use of
+ REGISTER_CONVERT_TO_TYPE, pass "type" to CONVERT_REGISTER_P, pass
+ "frame" to REGISTER_TO_VALUE.
+ * valops.c (value_assign): Move the CONVERT_REGISTER code to the
+ lval_reg_frame_relative + lval_register branch of the switch. Do
+ not use REGISTER_CONVERT_FROM_TYPE. Use put_frame_register.
+ * i386-tdep.c (I386_EBX_REGNUM, I386_ECX_REGNUM, I386_ESI_REGNUM,
+ I386_EDI_REGNUM): New defines.
+ (i386_next_regnum, i386_convert_register_p,
+ i386_register_to_value, i386_value_to_register): New functions.
+ (i386_register_convertible, i386_register_convert_to_virtual,
+ i386_convert_to_raw): Remove functions.
+ (i386_gdbarch_init): Set convert_register_p, register_to_value and
+ value_to_register instead of register_convertible,
+ register_convert_to_virtual and register_convert_to_raw.
+ * mips-tdep.c (mips_convert_register_p): New function.
+ (mips_value_to_register): Replace mips_register_convert_from_type.
+ (mips_register_to_value): Replace mips_register_convert_to_type.
+ (mips_gdbarch_init): Set conver_register_p, value_to_register and
+ register_to_value.
+ * alpha-tdep.c (alpha_convert_register_p): Update.
+ (alpha_value_to_register): Update, store the register.
+ (alpha_register_to_value): Update, fetch the register.
+
+2003-06-14 Theodore A. Roth <troth@openavr.org>
+
+ * avr-tdep.c (avr_remote_translate_xfer_address): Delete function.
+ (avr_gdbarch_init): Remove avr_call_dummy_words variable.
+ Don't set deprecated_call_dummy_words.
+ Remove commented out set_gdbarch_believe_pcc_promotion() call.
+ Don't set remote_translate_xfer_address.
+ (avr_io_reg_read_command): Remove commented out debug printf.
+ Wrap a long line.
+
+2003-06-14 Theodore A. Roth <troth@openavr.org>
+
+ * avr-tdep.c (avr_scan_prologue): Fix to avoid a buffer over run which
+ causes gdb to seg fault.
+
+2003-06-14 Daniel Jacobowitz <drow@mvista.com>
+
+ * sparc-nat.c (fetch_inferior_registers): Correct
+ a reference to "registers".
+
+2003-06-14 Jeroen Dekkers <jeroen@dekkers.cx>
+
+ * Makefile.in (exc_request_U_h): Define
+ (exc_request_S_h): Likewise.
+ (msg_reply_S_h): Likewise.
+ (msg_U_h): Likewise.
+ (notify_S_h): Likewise.
+ (process_reply_S_h): Likewise.
+ (gnu-nat.o): Depend on gdb_obstack_h
+ * gnu-nat.c: Include "gdb_obstack.h".
+
+2003-06-13 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh: Document what PUSH_DUMMY_CALL replaces.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+2003-06-13 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh: Document what UNWIND_DUMMY_ID replaces. Clarify
+ when deprecated REGISTER macros can be deleted.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+2003-06-13 Jim Blandy <jimb@redhat.com>
+
+ * solib-svr4.c (solib_break_names): Recognize the 64-bit PowerPC
+ Linux entry point symbols for _dl_debug_state, too.
+
+2003-06-13 Andrew Cagney <cagney@redhat.com>
+
+ * infcall.c (call_function_by_hand): When UNWIND_DUMMY_ID is
+ available, do not use the FP register, and always save the TOS.
+ * dummy-frame.c (dummy_frame_this_id): Do not assert
+ SAVE_DUMMY_FRAME_TOS.
+ * i386-tdep.c (i386_save_dummy_frame_tos): Delete function.
+ (i386_gdbarch_init): Do not set save_dummy_frame_tos.
+ (i386_push_dummy_call): Add 8 to the returned SP.
+ * frame.c (legacy_frame_p): Do not require SAVE_DUMMY_FRAME_TOS.
+ * d10v-tdep.c (d10v_unwind_dummy_id): Use d10v_unwind_sp.
+ (d10v_gdbarch_init): Do not set save_dummy_frame_tos.
+ * x86-64-tdep.c (x86_64_save_dummy_frame_tos): Delete function.
+ (x86_64_push_dummy_call): Return "sp + 16".
+ (x86_64_init_abi): Do not set save_dummy_frame_tos.
+ * alpha-tdep.c (alpha_gdbarch_init): Do not set
+ save_dummy_frame_tos.
+
+2003-06-13 Jim Blandy <jimb@redhat.com>
+
+ * frv-tdep.c (frv_use_struct_convention): Delete static
+ declaration for function deleted in my change of 2003-06-12.
+
+2003-06-13 Theodore A. Roth <troth@openavr.org>
+
+ * avr-tdep.c (avr_address_to_pointer): Shift code addrs right 1 bit.
+ (avr_pointer_to_address): Shift code addrs left 1 bit.
+ (avr_convert_from_func_ptr_addr): Delete function since operation is
+ better handled by avr_address_to_pointer and avr_pointer_to_address.
+ (avr_gdbarch_init): Don't set convert_from_func_ptr_add method.
+
+2003-06-13 Mark Kettenis <kettenis@gnu.org>
+
+ From Kelley Cook <kelleycook@wideopenwest.com>:
+ * configure.host: Accept i[34567]86 variants.
+ * configure.tgt: Likewise.
+ * nlm/configure.in: Likewise.
+ * nlm/configure: Regenerated.
+
+2003-06-13 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm-tdep.c (solib-svr4.h): Dont' include it.
+ (arm_linux_svr4_fetch_link_map_offsets): Move to ...
+ * arm-linux-tdep.c: ... here. Make static.
+ (arm_linux_init_abi): Register it.
+ (solib-svr4.h): Include it.
+ * Makefile.in: Update dependencies.
+ * config/arm/tm-linux.h (SVR4_FETCH_LINK_MAP_OFFSETS): Delete.
+ (arm_linux_svr4_fetch_link_map_offsets): Delete declaration.
+
+2003-06-13 Corinna Vinschen <vinschen@redhat.com>
+
+ * h8300-tdep.c: Add definitions E_RET0_REGNUM and E_RET1_REGNUM to
+ indicate registers used for return values.
+ (struct frame_extra_info): Drop args_pointer and locals_pointer.
+ (h8300_examine_prologue): Remove initializing dropped frame_extra_info
+ members.
+ (h8300_init_extra_frame_info): Ditto.
+ (h8300_frame_locals_address): Removed.
+ (h8300_frame_args_address): Removed.
+ (h8300_extract_return_value): Use new regcache structure. Only care
+ for 16 bit CPUs.
+ (h8300h_extract_return_value): Same function for 32 bit CPUs.
+ (h8300_store_return_value): Use new regcache structure. Only care
+ for 16 bit CPUs.
+ (h8300h_store_return_value): Same function for 32 bit CPUs.
+ (h8300_store_struct_return): Removed.
+ (h8300_extract_struct_value_address): Use new regcache structure.
+ (h8300h_extract_struct_value_address): Removed.
+ (h8300_push_dummy_code): New function.
+ (h8300_gdbarch_init): Slightly rearranged to stress deprecated calls.
+ Remove call_dummy_words. Call set_gdbarch_extract_return_value and
+ set_gdbarch_store_return_value architecture dependent.
+ Call set_gdbarch_push_dummy_code and
+ set_gdbarch_extract_struct_value_address.
+ Remove calls to set_gdbarch_frame_args_address,
+ set_gdbarch_frame_locals_address,
+ set_gdbarch_deprecated_store_struct_return,
+ set_gdbarch_deprecated_extract_return_value,
+ set_gdbarch_deprecated_extract_struct_value_address,
+ set_gdbarch_deprecated_call_dummy_words and
+ set_gdbarch_deprecated_sizeof_call_dummy_words.
+
+2003-06-13 Corinna Vinschen <vinschen@redhat.com>
+
+ * h8300-tdep.c (h8300_register_byte): Remove.
+ (h8300h_register_byte): Remove.
+ (h8300_register_virtual_type): Remove. Substitute by...
+ (h8300_register_type): New function.
+ (h8300_extract_struct_value_address): Drop usage of h8300_register_byte.
+ (h8300h_extract_struct_value_address): Ditto.
+ (h8300_gdbarch_init): Drop calls to
+ set_gdbarch_deprecated_register_byte and
+ set_gdbarch_deprecated_register_virtual_type.
+ Add call to set_gdbarch_register_type.
+
+2003-06-13 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh: Update comments on registers.
+ (deprecated_register_byte): Rename register_byte.
+ (deprecated_register_raw_size): Rename register_raw_size.
+ (deprecated_register_virtual_size): Rename register_virtual_size.
+ (deprecated_register_virtual_type): Rename register_virtual_type.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Update.
+ * vax-tdep.c (vax_gdbarch_init): Update.
+ * v850-tdep.c (v850_gdbarch_init): Update.
+ * sparc-tdep.c (sparc_gdbarch_init): Update.
+ * sh-tdep.c (sh_gdbarch_init): Update.
+ * s390-tdep.c (s390_gdbarch_init): Update.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Update.
+ * ns32k-tdep.c: Update.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Update.
+ * mips-tdep.c (mips_gdbarch_init): Update.
+ * mcore-tdep.c (mcore_gdbarch_init): Update.
+ * m68k-tdep.c (m68k_gdbarch_init): Update.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
+ * ia64-tdep.c (ia64_gdbarch_init): Update.
+ * hppa-tdep.c (hppa_gdbarch_init): Update.
+ * h8300-tdep.c (h8300_gdbarch_init): Update.
+ * frv-tdep.c (frv_gdbarch_init): Update.
+ * cris-tdep.c (cris_gdbarch_init): Update.
+ * avr-tdep.c (avr_gdbarch_init): Update.
+ * alpha-tdep.c (alpha_gdbarch_init): Update.
+ * arm-tdep.c (arm_gdbarch_init): Update.
+
+2003-06-13 Andrew Cagney <cagney@redhat.com>
+
+ * mips-tdep.c (mips_gdbarch_init): Replace remaining instances of
+ mips_o32_use_struct_convention with always_use_struct_convention.
+
+2003-06-12 David Carlton <carlton@kealia.com>
+
+ * cp-namespace.c (cp_set_block_scope): Comment out
+ processing_has_namespace_info branch.
+
+2003-06-12 Jim Blandy <jimb@redhat.com>
+
+ Recognize and skip 64-bit PowerPC Linux linkage functions.
+ * ppc-linux-tdep.c (insn_d, insn_ds, insn_xfx, read_insn, struct
+ insn_pattern, insns_match_pattern, d_field, ds_field): New
+ functions, macros, and types for working with PPC instructions.
+ (ppc64_standard_linkage, PPC64_STANDARD_LINKAGE_LEN,
+ ppc64_in_solib_call_trampoline, ppc64_standard_linkage_target,
+ ppc64_skip_trampoline_code): New functions, variables, and macros
+ for recognizing and skipping linkage functions.
+ (ppc_linux_init_abi): Use ppc64_in_solib_call_trampoline and
+ ppc64_skip_trampoline_code for the 64-bit PowerPC Linux ABI.
+
+ * ppc-linux-nat.c (ppc_register_u_addr): Correctly compute u-area
+ register offsets for both the 32- and 64-bit interfaces.
+
+ Actually finish the job started by my change of 2003-05-29.
+ * config/powerpc/tm-linux.h (SKIP_TRAMPOLINE_CODE): Remove the
+ other #definition of this.
+ (ppc_linux_skip_trampoline_code): Remove declaration.
+ * ppc-linux-tdep.c (ppc_linux_skip_trampoline_code): Make this
+ static.
+ (ppc_linux_init_abi): Register it as the skip_trampoline_code
+ method for GDBARCH.
+
+ * config/powerpc/nm-ppc64-linux.h (PTRACE_XFER_TYPE): This is
+ 'long' on ppc64-*-linux*.
+
+ * ppc-linux-nat.c (ppc_register_u_addr, fill_gregset): If PT_MQ
+ isn't #defined, assume the register doesn't exist: act as if
+ tdep->ppc_mq_regnum were -1.
+
+ * configure.host, configure.tgt: Add entries for
+ powerpc64-*-linux, selecting powerpc/ppc64-linux.mh and
+ powerpc/linux.mt.
+ * config/powerpc/ppc64-linux.mh, config/powerpc/nm-ppc64-linux.mh:
+ New files.
+
+ * arch-utils.c (always_use_struct_convention): New function.
+ * arch-utils.h (always_use_struct_convention): New prototype.
+ * alpha-tdep.c (alpha_use_struct_convention): Delete.
+ (alpha_gdbarch_init): Register always_use_struct_convention,
+ instead of alpha_use_struct_convention.
+ * cris-tdep.c (cris_use_struct_convention): Delete.
+ (cris_gdbarch_init): Register always_use_struct_convention,
+ instead of cris_use_struct_convention.
+ * frv-tdep.c (frv_use_struct_convention): Delete.
+ (frv_gdbarch_init): Register always_use_struct_convention,
+ instead of frv_use_struct_convention.
+ * h8300-tdep.c (h8300_use_struct_convention): Delete.
+ (h8300_gdbarch_init): Register always_use_struct_convention,
+ instead of h8300_use_struct_convention.
+ * mips-tdep.c (mips_o32_use_struct_convention): Delete.
+ (mips_o32_gdbarch_init): Register always_use_struct_convention,
+ instead of mips_o32_use_struct_convention.
+
+2003-06-12 Andrew Cagney <cagney@redhat.com>
+
+ * wince.c: Include "mips-tdep.h".
+ * mips-tdep.h (mips_next_pc): Declare.
+ * mcore-tdep.c: Make more local functions static.
+ * Makefile.in (wince.o): Update dependencies.
+
+2003-06-12 David Carlton <carlton@kealia.com>
+
+ * symtab.c (lookup_symbol_aux_minsyms): Replace
+ DEPRECATED_SYMBOL_NAME by SYMBOL_LINKAGE_NAME.
+ (find_pc_sect_line, search_symbols, rbreak_command): Ditto.
+ (COMPLETION_LIST_ADD_SYMBOL): Rewrite in terms of
+ SYMBOL_NATURAL_NAME.
+
+2003-06-12 Andreas Schwab <schwab@suse.de>
+
+ * Makefile.in (tuiDisassem.o): Update dependencies.
+
+2003-06-12 David Carlton <carlton@bactrian.org>
+
+ * symtab.h: Delete declaration of make_symbol_overload_list.
+ Add declaration of lookup_partial_symbol.
+ * symtab.c (remove_params): Move to cp-support.c.
+ (overload_list_add_symbol, make_symbol_overload_list)
+ (sym_return_val_size, sym_return_val_index): Ditto.
+ (lookup_partial_symbol): Make extern.
+ * cp-support.h: Add declaration of make_symbol_overload_list.
+ * cp-support.c: Include dictionary.h, objfiles.h, frame.h,
+ symtab.h, and block.h.
+ (remove_params): Move here from symtab.c.
+ (overload_list_add_symbol, make_symbol_overload_list)
+ (sym_return_val_size, sym_return_val_index): Ditto.
+ * valops.c: Include cp-support.h.
+ * Makefile.in (cp-support.o): Depend on dictionary_h, objfiles_h,
+ frame_h, and block_h.
+ (valops.o): Depend on cp_support_h.
+
+2003-06-12 Corinna Vinschen <vinschen@redhat.com>
+
+ * h8300-tdep.c: Add H8SX registers. Drop E_NUM_REGS entirely,
+ substitute by NUM_REGS throughout.
+ (h8300_register_name): Only care for H8/300 and H8/300H registers.
+ (h8300s_register_name): New function for H8S registers.
+ (h8300sx_register_name): Ditto for H8SX registers.
+ (h8300_print_register): Revise register printing, avoid depending
+ on 32 bit long.
+ (h8300_register_byte): Only care for H8/300 registers.
+ (h8300h_register_byte): New function for any other architecture.
+ (h8300_register_raw_size): Remove.
+ (h8300_register_virtual_type): Revise to return actually useful
+ type.
+ (h8300_extract_struct_value_address): Only care for H8/300 registers.
+ (h8300h_extract_struct_value_address): New function for any other
+ architecture.
+ (h8300_gdbarch_init): Add h8300sxn. Call set_gdbarch_num_regs,
+ set_gdbarch_register_name, set_gdbarch_register_byte,
+ set_gdbarch_ptr_bit and set_gdbarch_addr_bit architecture dependent.
+ Remove calls to set_gdbarch_deprecated_register_size,
+ set_gdbarch_deprecated_register_bytes, set_gdbarch_register_raw_size,
+ set_gdbarch_deprecated_max_register_raw_size,
+ set_gdbarch_register_virtual_size and
+ set_gdbarch_deprecated_max_register_virtual_size entirely.
+ Call set_gdbarch_long_long_bit, set_gdbarch_double_bit and
+ set_gdbarch_long_double_bit.
+
+2003-06-11 Jeff Johnston <jjohnstn@redhat.com>
+
+ * doublest.c (convert_doublest_to_floatformat): When dealing
+ with the implied integer bit, only alter mant_bits if we are
+ processing a full 32 bits of mantissa.
+
+2003-06-11 David Carlton <carlton@bactrian.org>
+
+ * dictionary.h: New.
+ * dictionary.c: New.
+ * block.h: Add opaque declaration for struct dictionary.
+ (struct block): Add 'dict' member; delete 'hashtable', 'nsyms',
+ 'sym' members.
+ (BLOCK_DICT): New macro.
+ Delete macros BLOCK_HASHTABLE, BLOCK_NSYMS, BLOCK_SYM,
+ BLOCK_BUCKETS, BLOCK_BUCKET, BLOCK_HASHTABLE_SIZE,
+ BLOCK_SHOULD_SORT.
+ (ALL_BLOCK_SYMBOLS): Update definition.
+ * Makefile.in (SFILES): Add dictionary.c.
+ (dictionary_h): New.
+ (COMMON_OBS): Add dictionary.o.
+ (dictionary.o): New.
+ (ada-lang.o): Depend on dictionary_h.
+ (buildsym.o, coffread.o, jv-lang.o, mdebugread.o, objfiles.o)
+ (stack.o, symmisc.o, symtab.o, tracepoint.o, valops.o)
+ (mi-cmd-stack.o): Ditto.
+ (gdbtk-cmds.o): Update dependencies.
+ (gdbtk-stack.o): Ditto.
+ * ada-lang.c: Include dictionary.h.
+ (symtab_for_sym): Update uses of ALL_BLOCK_SYMBOLS.
+ (fill_in_ada_prototype, debug_print_block): Ditto.
+ (ada_add_block_symbols): Update uses of ALL_BLOCK_SYMBOLS; replace
+ explicit iteration by use of ALL_BLOCK_SYMBOLS. Delete variable
+ 'is_sorted'.
+ * mdebugread.c: Include dictionary.h.
+ (struct parse_stack): Delete 'maxsyms' member.
+ (parse_symbol): Update calls to new_block. Delete calls to
+ shrink_block. Use dictionary methods.
+ (psymtab_to_symtab_1): Delete calls to sort_symtab_syms.
+ Update calls to new_symtab. Don't maintain maxsyms data.
+ (mylookup_symbol): Update use of ALL_BLOCK_SYMBOLS.
+ (add_symbol): Just call dict_add_symbol.
+ (new_symtab): Delete 'maxsyms' argument.
+ (new_symtab): Update calls to new_block.
+ (new_block): Delete 'maxsyms' argument; add 'function' argument.
+ (shrink_block): Delete function.
+ (fixup_sigtramp): Update call to new_block. Add symbol via
+ dict_add_symbol.
+ * jv-lang.c: Include dictionary.h.
+ (get_java_class_symtab): Set the BLOCK_DICT of the blocks
+ appropriately. Set class_symtab->free_func. Make sure the
+ blockvector is big enough to hold two blocks.
+ (add_class_symtab_symbol): Use dictionary methods.
+ (free_class_block): New function.
+ (type_from_class): Replace explicit iteration by
+ ALL_BLOCK_SYMBOLS.
+ * symtab.h (struct symtab): Replace 'free_ptr' method by
+ 'free_func'.
+ * dwarf2read.c (psymtab_to_symtab_1): Delete call to
+ sort_symtab_syms.
+ * dwarfread.c (psymtab_to_symtab_1): Delete call to
+ sort_symtab_syms.
+ * coffread.c (coff_symfile_read): Delete call to sort_symtab_syms.
+ Include dictionary.h.
+ (patch_opaque_types): Update use of ALL_BLOCK_SYMBOLS.
+ * dbxread.c (dbx_psymtab_to_symtab_1): Delete call to
+ sort_symtab_syms.
+ * objfiles.c: Include dictionary.h.
+ (objfile_relocate): Update use of ALL_BLOCK_SYMBOLS.
+ * buildsym.c: Include dictionary.h.
+ (finish_block): Use dictionary methods.
+ (end_symtab): Set free_func to NULL, not free_ptr.
+ * tracepoint.c: Include dictionary.h.
+ (add_local_symbols): Update use of ALL_BLOCK_SYMBOLS.
+ (scope_info): Ditto.
+ * stack.c: Include dictionary.h.
+ (print_block_frame_locals): Update use of ALL_BLOCK_SYMBOLS.
+ (print_block_frame_labels, print_frame_arg_vars)
+ (print_frame_args): Ditto.
+ * symmisc.c (free_symtab_block): Use dictionary methods.
+ (dump_symtab): Ditto.
+ (free_symtab): Replace use of 'free_ptr' by 'free_func'.
+ Include dictionary.h.
+ * symfile.h: Delete declarations of sort_block_syms,
+ sort_symtab_syms.
+ * symfile.c (sort_block_syms): Delete.
+ (sort_symtab_syms): Delete.
+ * symtab.c: Include dictionary.h.
+ (lookup_block_symbol): Use dictionary iterators.
+ (find_pc_sect_symtab): Update use of ALL_BLOCK_SYMBOLS.
+ (search_symbols, make_symbol_completion_list): Ditto.
+ (make_symbol_overload_list): Ditto.
+ * valops.c (value_of_local): Use dict_empty.
+ Include dictionary.h.
+
+2003-06-11 J. Brobecker <brobecker@gnat.com>
+
+ * win32-nat.c (solib_symbols_add): Fix a small compilation error.
+
+2003-06-11 David Carlton <carlton@bactrian.org>
+
+ * block.h (BLOCK_SHOULD_SORT): Delete.
+ * symtab.c (lookup_block_symbol): Don't worry about sorted linear
+ blocks.
+ * ada-lang.c (ada_add_block_symbols): Ditto.
+ * symfile.c (sort_block_syms): Delete.
+ (sort_symtab_syms): Ditto.
+ * symfile.h: Delete sort_symtabs_syms and sort_block_syms
+ declarations.
+ * coffread.c (coff_symfile_read): Don't call sort_symtab_syms.
+ * dbxread.c (dbx_psymtab_to_symtab_1): Ditto.
+ * dwarf2read.c (psymtab_to_symtab_1): Ditto.
+ * dwarfread.c (psymtab_to_symtab_1): Ditto.
+ * hpread.c (hpread_psymtab_to_symtab_1): Ditto.
+ * mdebugread.c (psymtab_to_symtab_1): Ditto.
+ * xcoffread.c (xcoff_psymtab_to_symtab_1): Ditto.
+
+2003-06-11 Jeff Johnston <jjohnstn@redhat.com>
+
+ * ia64-tdep.c (ia64_gdbarch_init): Set number of long double
+ bits to 128.
+
+2003-06-11 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (DEPRECATED_REGISTER_CONVERTIBLE): Deprecate
+ REGISTER_CONVERTIBLE.
+ (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL): Same.
+ (DEPRECATED_REGISTER_CONVERT_TO_RAW): Same, make "from" constant.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * arch-utils.h (deprecated_register_convertible_not): Rename
+ generic_register_convertible_not.
+ * arch-utils.c (deprecated_register_convertible_not): Rename
+ generic_register_convertible.
+ (legacy_convert_register_p, legacy_register_to_value): Update.
+ * sh-tdep.c (sh64_push_arguments): Update.
+ * m68klinux-tdep.c (m68k_linux_extract_return_value): Update.
+ * config/m68k/tm-delta68.h (DEPRECATED_EXTRACT_RETURN_VALUE): Update.
+ * m68klinux-tdep.c (m68k_linux_store_return_value): Update.
+ * config/m68k/tm-delta68.h (DEPRECATED_STORE_RETURN_VALUE): Update.
+ * arch-utils.c (legacy_value_to_register): Update.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Update.
+ (rs6000_register_convert_to_raw): Make parameter "from" const.
+ * mips-tdep.c (mips_gdbarch_init): Update.
+ (mips_register_convert_to_raw): Make parameter"virt_buf" const.
+ * infcmd.c (default_print_registers_info): Update.
+ * ia64-tdep.c (ia64_gdbarch_init): Update.
+ (ia64_register_convert_to_raw): Make parameter "from" const.
+ * i386-tdep.c (i386_gdbarch_init): Update.
+ (i386_register_convert_to_raw): Update.
+
+2003-06-11 Andrew Cagney <cagney@redhat.com>
+
+ * remote-fileio.c: Include "remote-fileio.h".
+ * Makefile.in (remote-fileio.o): Update dependencies.
+ (remote_fileio_h): Fix typo.
+
+2003-06-11 Andrew Cagney <cagney@redhat.com>
+
+ * xstormy16-tdep.c (xstormy16_push_return_address): Make static.
+ (xstormy16_save_dummy_frame_tos): Make static.
+ (_initialize_xstormy16_tdep): Add declaration.
+ * vax-tdep.c (_initialize_vax_tdep): Add declaration.
+ * v850-tdep.c: Make local functions static.
+ (_initialize_v850_tdep): Add declaration.
+ * sparc-tdep.c: Make local functions static.
+ (_initialize_sparc_tdep): Add declaration.
+ * sh-tdep.c: Make local functions static.
+ (_initialize_sh_tdep): Add declaration.
+ * sh3-rom.c (_initialize_sh3_rom): Add declaration.
+ * s390-tdep.c: Make local functions static.
+ (_initialize_s390_tdep): Add declaration.
+ * dbxread.c (find_stab_function_addr): Make static.
+ * ppc-bdm.c (_initialize_bdm_ppc): Add declaration.
+ * ocd.c (_initialize_remote_ocd): Add declaration.
+ * dink32-rom.c (_initialize_dink32_rom): Add declaration.
+ * ppcbug-rom.c (_initialize_ppcbug_rom): Add declaration.
+ * ns32k-tdep.c (_initialize_ns32k_tdep): Add declaration.
+ * ns32knbsd-tdep.c (_initialize_ns32knbsd_tdep): Add declaration.
+ * mips-tdep.c (_initialize_mips_tdep): Add declaration.
+ * remote-array.c (_initialize_array): Add declaration.
+ (_initialize_remote_monitors): Add declaration.
+ * remote-mips.c: Make local functions static.
+ (_initialize_remote_mips): Add declaration.
+ * mcore-tdep.c: Make all local functions static.
+ (_initialize_mcore_tdep): Add declaration.
+ * dbug-rom.c (_initialize_dbug_rom): Add declaration.
+ * abug-rom.c (_initialize_abug_rom): Add declaration.
+ * rom68k-rom.c (_initialize_rom68k): Add declaration.
+ * cpu32bug-rom.c (_initialize_cpu32bug_rom): Add declaration.
+ * m68k-tdep.c (_initialize_m68k_tdep): Add declaration.
+ * remote-est.c (_initialize_est): Add declaration.
+ * m68hc11-tdep.c (_initialize_m68hc11_tdep): Add declaration.
+ (m68hc11_call_dummy_address): Make static.
+ * ia64-tdep.c: Make local functions static.
+ (_initialize_ia64_tdep): Add declaration.
+ * solib-legacy.c (_initialize_svr4_lm): Add declaration.
+ * monitor.c (monitor_wait_filter): Make static.
+ (_initialize_remote_monitors): Add declaration.
+ * remote-hms.c (_initialize_remote_hms): Add declaration.
+ * remote-e7000.c (fetch_regs_from_dump): Make static.
+ (expect_n): Make static.
+ (_initialize_remote_e7000): Add declaration.
+ * ser-e7kpc.c: Always include "defs.h".
+ (_initialize_ser_e7000pc): Add declaration.
+ * h8300-tdep.c (_initialize_h8300_tdep): Add declaration.
+ * cris-tdep.c: Make all but one function static.
+ (_initialize_cris_tdep): Add declaration.
+ * solib-svr4.c (_initialize_svr4_solib): Add declaration.
+ * solib.c (update_solib_list): Make static.
+ (_initialize_solib): Add declaration.
+ * avr-tdep.c (avr_breakpoint_from_pc): Make static.
+ (_initialize_avr_tdep): Add declaration.
+ * remote-rdi.c (voiddummy): Make static.
+ (_initialize_remote_rdi): Add declaration.
+ * arm-tdep.c (_initialize_arm_tdep): Add declaration.
+ * remote-rdp.c (send_rdp): Make static.
+ (_initialize_remote_rdp): Add declaration.
+ * alpha-tdep.c (_initialize_alpha_tdep): Add declaration.
+
+2003-06-11 Corinna Vinschen <vinschen@redhat.com>
+
+ * remote-fileio.c: Make ari happy.
+
+2003-06-10 J. Brobecker <brobecker@gnat.com>
+
+ * rs6000-nat.c (child_xfer_memory): Compute the right address when
+ fetching the trailing bytes of the buffer we are about to write.
+
+2003-06-10 Andrew Cagney <cagney@redhat.com>
+
+ * remote-fileio.h (REMOTE_FILEIO_H): Replace FILEIO_H.
+ * Makefile.in (remote-fileio.o): Update dependencies.
+ * remote-fileio.c: Include "gdb_wait.h" and "gdb_stat.h". Do not
+ include <setjmp.h>, or <sys/types.h> conditional on USG.
+ (remote_fio_jmp_buf): Delete global variable.
+
+2003-06-10 Corinna Vinschen <vinschen@redhat.com>
+ Martin M. Hunt <hunt@redhat.com>
+
+ * Makefile.in (REMOTE_OBS): Add remote-fileio.o
+ (SFILES): Add remote-fileio.c.
+ Add dependencies for building remote-fileio.o. Add remote-fileio.h to
+ dependencies for building remote.o.
+ * remote-fileio.c: New file implementing the remote File-I/O protocol.
+ * remote-fileio.h: New header file defining remote File-I/O interface.
+ * remote.c (remote_write_bytes, remote_read_bytes): Remove
+ static storage class.
+ (remote_wait, remote_async_wait): Call remote_fileio_request() on
+ 'F' packet.
+ (_initialize_remote): Call initialize_remote_fileio().
+ * remote.h: Declare remote_write_bytes() and remote_read_bytes().
+ * defs.h: Declare gdb_stdin, gdb_stdtargerr and gdb_stdtargin.
+ * main.c: New ui_file gdb_stdin, gdb_stdtargerr and gdb_stdtargin.
+ (captured_main): Initialize new ui_files.
+ * ui-file.c: Add read and fgets input functions.
+ (ui_file_new): set ui_file_fputs and ui_file_read to null functions.
+ (null_file_read): New function.
+ (ui_file_read): New function.
+ (set_ui_file_read): New function.
+ (stdio_file_read): New function.
+ * ui-file.h: New type ui_file_read_ftype.
+ (set_ui_file_read): Declare.
+ (ui_file_read): Declare.
+
+2003-06-09 Andrew Cagney <cagney@redhat.com>
+
+ * frame.h (deprecated_unwind_get_saved_register): Rename
+ generic_unwind_get_saved_register, update comments.
+ * mips-tdep.c (mips_get_saved_register): Update.
+ * frame.c (deprecated_unwind_get_saved_register): Update.
+
+2003-06-09 Andrew Cagney <cagney@redhat.com>
+
+ * vax-tdep.c (vax_frame_locals_address): Delete function.
+ (vax_gdbarch_init): Do not set frame_locals_address.
+ * m68hc11-tdep.c (m68hc11_frame_locals_address): Delete function.
+ (m68hc11_gdbarch_init): Do not set frame_locals_address.
+ * s390-tdep.c (s390_frame_args_address): Delete function.
+ (s390_gdbarch_init): Do not set frame_args_address or
+ frame_locals_address.
+ * ns32k-tdep.c (ns32k_frame_locals_address): Delete.
+ (ns32k_gdbarch_init): Do not set frame_locals_address.
+ * hppa-tdep.c (hppa_frame_args_address): Delete function.
+ (hppa_frame_locals_address): Delete function.
+ (hppa_gdbarch_init): Do not set frame_args_address, or
+ frame_locals_address.
+ * arm-tdep.c (arm_frame_args_address): Delete.
+ (arm_frame_locals_address): Delete.
+ (arm_gdbarch_init): Do not set frame_args_address, or
+ frame_locals_address.
+
+2003-06-09 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (FRAME_NUM_ARGS): Change to function with predicate.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * arch-utils.h (frame_num_args_unknown): Delete both declarations.
+ * arch-utils.c (frame_num_args_unknown): Delete function.
+ * stack.c (print_args_stub): Use FRAME_NUM_ARGS_P.
+ (frame_info): Use FRAME_NUM_ARGS_P.
+ * arm-tdep.c (arm_frame_num_args): Delete function.
+ (arm_gdbarch_init): Do not set frame_num_args.
+ * config/pa/tm-hppa64.h (FRAME_NUM_ARGS): Delete.
+ * hppa-tdep.c (hppa_frame_num_args): Delete function.
+ (hppa_gdbarch_init): Do not set frame_num_args.
+ * config/sparc/tm-sparc.h (FRAME_NUM_ARGS): Delete.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Do not set
+ frame_num_args to default frame_num_args_unknown.
+ * v850-tdep.c (v850_gdbarch_init): Ditto.
+ * sparc-tdep.c (sparc_gdbarch_init): Ditto.
+ * sh-tdep.c (sh_gdbarch_init): Ditto.
+ * s390-tdep.c (s390_gdbarch_init): Ditto.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
+ * mips-tdep.c (mips_gdbarch_init): Ditto.
+ * mcore-tdep.c (mcore_gdbarch_init): Ditto.
+ * m68k-tdep.c (m68k_gdbarch_init): Ditto.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
+ * ia64-tdep.c (ia64_gdbarch_init): Ditto.
+ * i386-tdep.c (i386_gdbarch_init): Ditto.
+ * h8300-tdep.c (h8300_gdbarch_init): Ditto.
+ * frv-tdep.c (frv_gdbarch_init): Ditto.
+ * d10v-tdep.c (d10v_gdbarch_init): Ditto.
+ * cris-tdep.c (cris_gdbarch_init): Ditto.
+ * avr-tdep.c (avr_gdbarch_init): Ditto.
+ * alpha-tdep.c (alpha_gdbarch_init): Ditto.
+
+2003-06-09 Andrew Cagney <cagney@redhat.com>
+
+ * printcmd.c (print_frame_nameless_args): Moved to "stack.c".
+ (print_frame_args): Moved to "stack.c".
+ * stack.c: Include "gdb_assert.h".
+ (print_frame_nameless_args): Moved from "printcmd.c", made static.
+ (print_frame_args): Moved from "printcmd.c".
+ * frame.h (print_frame_args): Delete declaration.
+ * Makefile.in (stack.o): Update dependencies.
+
+2003-06-08 Andrew Cagney <cagney@redhat.com>
+
+ * frame.c (get_prev_frame): Remove reference to
+ frame_args_address_correct in comments.
+ * frame-base.c (default_frame_args_address): Delete code
+ conditional on FRAME_ARGS_ADDRESS_CORRECT.
+ * vax-tdep.c (vax_frame_args_address_correct): Delete.
+ (vax_frame_args_address): Merge in vax_frame_args_address_correct.
+ * config/vax/tm-vax.h (FRAME_ARGS_ADDRESS_CORRECT): Delete
+ (vax_frame_args_address_correct): Delete declaration.
+
+2003-06-08 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (UNWIND_SP): Add.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * frame.c (frame_sp_unwind): New function.
+ (get_frame_sp): New function.
+ * frame.h (get_frame_sp, frame_sp_unwind): Declare.
+ * regcache.c (read_sp): Rewrite, try each of TARGET_READ_SP,
+ gdbarch_unwind_sp and SP_REGNUM when looking for the SP register
+ value.
+ * d10v-tdep.c (d10v_unwind_sp): Replace d10v_read_sp.
+ (d10v_gdbarch_init): Set unwind_sp instead of read_sp.
+
+2003-06-08 Andrew Cagney <cagney@redhat.com>
+
+ Deprecate BIG_REMOTE_BREAKPOINT, LITTLE_REMOTE_BREAKPOINT and
+ REMOTE_BREAKPOINT.
+ * remote.c: Update.
+ * config/sh/tm-sh.h (DEPRECATED_BIG_REMOTE_BREAKPOINT): Update.
+ (DEPRECATED_LITTLE_REMOTE_BREAKPOINT): Update.
+ * config/m68k/tm-sun3.h: Update.
+ * config/m68k/tm-m68klynx.h: Update.
+ * config/h8300/tm-h8300.h (DEPRECATED_REMOTE_BREAKPOINT): Update.
+
+ * trad-frame.h (struct trad_frame_saved_reg): Rename "struct
+ trad_frame". Update comments.
+ * d10v-tdep.c (struct d10v_unwind_cache): Update.
+ * trad-frame.c (trad_frame_alloc_saved_regs): Update.
+ (trad_frame_register_value, trad_frame_prev_register): Update.
+
+2003-06-08 Andrew Cagney <cagney@redhat.com>
+
+ * acinclude.m4 (gcc_AC_CHECK_DECL, (gcc_AC_CHECK_DECL): Stolen
+ from GCC's acinclude.m4.
+ * configure.in: Check for getopt's delcaration.
+ * aclocal.m4, config.in, configure: Re-generate.
+ * main.c (error_init): Delete declaration.
+ * defs.h (error_init): Declare.
+ * rs6000-tdep.c (rs6000_fetch_pointer_argument): Make static.
+ (rs6000_convert_from_func_ptr_addr): Make static.
+ (_initialize_rs6000_tdep): Add declaration.
+ * cli/cli-cmds.c (dont_repeat): Delete declaration.
+ (show_commands, set_verbose, show_history): Delete declaration.
+ * top.h (set_verbose): Add declaration.
+ (show_history, set_history, show_commands): Add declaration.
+ (do_restore_instream_cleanup): Add declaration.
+ * objc-lang.c (specialcmp): Make static.
+ (print_object_command): Make static.
+ (find_objc_msgsend): Make static.
+ (find_objc_msgcall_submethod_helper): Make static.
+ (find_objc_msgcall_submethod): Make static.
+ (_initialize_objc_language): Add declaration.
+ (find_implementation_from_class): Make static.
+ (find_implementation): Make static.
+ * objc-exp.y (yylex): Delete lookup_struct_typedef declaration.
+ * objc-lang.h (lookup_struct_typedef): Add declaration.
+ * cli/cli-interp.c (_initialize_cli_interp): Add declaration.
+ * cli/cli-script.c (clear_hook_in_cleanup): Make static.
+ (do_restore_user_call_depth): Make static.
+ (do_restore_instream_cleanup): Delete declaration.
+ (dont_repeat): Delete declaration.
+ * cli/cli-decode.c (add_abbrev_cmd): Delete function.
+ * cli/cli-dump.c (_initialize_cli_dump): Add declaration.
+ * reggroups.c (_initialize_reggroup): Add declaration.
+ * cp-support.c (_initialize_cp_support): Add declaration.
+ * cp-abi.c (_initialize_cp_abi): Add declaration.
+ * hpacc-abi.c (_initialize_hpacc_abi): Add declaration.
+ * gnu-v3-abi.c (gnuv3_baseclass_offset): Make static.
+ (_initialize_gnu_v3_abi): Add declaration.
+ * gnu-v2-abi.c (gnuv2_value_rtti_type): Make static.
+ (_initialize_gnu_v2_abi): Add declaration.
+ * frame-base.c (_initialize_frame_base): Add declaration.
+ * doublest.c (floatformat_from_length): Make static.
+ * frame-unwind.c (_initialize_frame_unwind): Add declaration.
+ * frame.c (create_sentinel_frame): Make static.
+ (_initialize_frame): Add declaration.
+ * top.c (do_catch_errors): Make static.
+ (gdb_rl_operate_and_get_next_completion): Make static.
+ * typeprint.c: Include "typeprint.h".
+ * sentinel-frame.c (sentinel_frame_prev_register): Make static.
+ (sentinel_frame_this_id): Make static.
+ * p-valprint.c (_initialize_pascal_valprint): Add declaration.
+ * ui-out.c (make_cleanup_ui_out_begin_end): Delete function.
+ * dwarf2-frame.c (dwarf2_frame_cache): Make static.
+ * p-exp.y (push_current_type, pop_current_type): ISO C declaration.
+ * dwarf2expr.h (dwarf_expr_context): ISO C declaration.
+ * maint.c (maintenance_print_architecture): Make static.
+ * signals/signals.c (_initialize_signals): Add declaration.
+ * std-regs.c (_initialize_frame_reg): Add declaration.
+ * jv-exp.y (push_variable): ISO C definition.
+ (push_qualified_expression_name): Ditto.
+ * memattr.c (_initialize_mem): Add declaration.
+ * remote.c (remote_check_watch_resources): Make static.
+ (remote_stopped_by_watchpoint): Make static.
+ (remote_stopped_data_address): Make static.
+ * d10v-tdep.c (nr_dmap_regs): Make static.
+ (a0_regnum): Make static.
+ (d10v_frame_unwind_cache): Make static.
+ (d10v_frame_p): Make static.
+ * osabi.c (show_osabi): Make static.
+ (_initialize_gdb_osabi): Add extern declaration.
+ * gdbtypes.c (make_qualified_type): Make static.
+ (safe_parse_type): Make static.
+ * macrocmd.c (_initialize_macrocmd): Add extern declaration.
+ * macrotab.c (macro_bcache_free): Make static.
+ * interps.c (interp_set_quiet): Make static.
+ (interpreter_exec_cmd): Make static.
+ * stack.h (select_frame_command): New file.
+ * stack.c: Include "stack.h".
+ (select_frame_command_wrapper): Delete function.
+ (select_frame_command): Make global.
+ * infcall.c: Include "infcall.h".
+ * linespec.c: Include "linespec.h".
+ * symfile.c (sections_overlap): Make static.
+ * cp-support.h (cp_initialize_namespace): ISO C declaration.
+ * charset.c (_initialize_charset): Add missing prototype.
+ * regcache.c (init_legacy_regcache_descr): Make static.
+ (do_regcache_xfree): Make static.
+ (regcache_xfer_part): Make static.
+ (_initialize_regcache): Add missing prototype.
+ * breakpoint.c (parse_breakpoint_sals): Make static.
+ (breakpoint_sals_to_pc): Make static.
+ * interps.h (clear_interpreter_hooks): ISO C declaration.
+ * Makefile.in (stack_h): Define.
+ (stack.o, typeprint.o, mi-main.o): Update dependencies.
+ (mi-cmd-stack.o, infcall.o, linespec.o): Update dependencies.
+
+2003-06-08 Andrew Cagney <cagney@redhat.com>
+
+ * Makefile.in (d10v-tdep.o): Update dependencies.
+ (SFILES): Add trad-frame.c.
+ (trad_frame_h): Define.
+ (COMMON_OBS): Add trad-frame.o.
+ (trad-frame.o): Specify dependencies.
+ * d10v-tdep.c: Include "trad-frame.h".
+ (saved_regs_unwinder): Delete function.
+ (d10v_frame_prev_register): Use trad_frame_prev_register.
+ (struct d10v_unwind_cache): Change type of "saved_regs" to "struct
+ trad_frame", delete "regs" and "prev_sp".
+ (prologue_find_regs): Use trad-frame.
+ * trad-frame.h, trad-frame.c: New files.
+
+2003-06-08 Mark Kettenis <kettenis@gnu.org>
+
+ * dwarf2cfi.c, dwarf2cfi.h: Remove.
+
+2003-06-07 Adam Fedor <fedor@gnu.org>
+
+ * gdb/objc-lang.c (FETCH_ARGUMENT): Remove macro.
+ (OBJC_FETCH_POINTER_ARGUMENT): Shorthand macro for
+ using FETCH_POINTER_ARGUMENT with Objective-C method arguments.
+ (find_implementation, resolve_msgsend, resolve_msgsend_stret,
+ resolve_msgsend_super, resolve_msgsend_super_stret):
+ Use it.
+
+2003-06-07 Andrew Cagney <cagney@redhat.com>
+
+ * symfile.h: Re-indent, clean up comments.
+
+2003-06-07 Andrew Cagney <cagney@redhat.com>
+
+ * inferior.h (deprecated_write_sp): Replace
+ generic_target_write_sp.
+ * regcache.c (deprecated_write_sp): Replace
+ generic_target_write_sp.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Update.
+ * vax-tdep.c (vax_gdbarch_init): Update.
+ * v850-tdep.c (v850_gdbarch_init): Update.
+ * sparc-tdep.c (sparc_gdbarch_init): Update.
+ * sh-tdep.c (sh_gdbarch_init): Update.
+ * s390-tdep.c (s390_gdbarch_init): Update.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Update.
+ * ns32k-tdep.c (ns32k_gdbarch_init): Update.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Update.
+ * mcore-tdep.c (mcore_gdbarch_init): Update.
+ * m68k-tdep.c (m68k_gdbarch_init): Update.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
+ * ia64-tdep.c (ia64_gdbarch_init): Update.
+ * h8300-tdep.c (h8300_gdbarch_init): Update.
+ * frv-tdep.c (frv_gdbarch_init): Update.
+ * cris-tdep.c (cris_gdbarch_init): Update.
+ * config/pa/tm-hppa.h (DEPRECATED_DUMMY_WRITE_SP): Update.
+
+2003-06-07 Andrew Cagney <cagney@redhat.com>
+
+ * dwarf2-frame.c (dwarf2_frame_cache): Add comments on PC_REGNUM.
+ Assert that PC_REGNUM is valid.
+ (dwarf2_frame_prev_register): Add comments on SP_REGNUM.
+
+2003-06-07 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (TARGET_READ_SP): Add predicate, delete default.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * mn10300-tdep.c: Include "gdb_assert.h".
+ (mn10300_read_fp): New function.
+ (mn10300_gdbarch_init): Set deprecated_target_read_fp to
+ mn10300_read_fp. Do not set read_sp to generic_target_read_sp.
+ * ia64-tdep.c: Include "gdb_assert.h".
+ (ia64_read_fp): New function.
+ (ia64_gdbarch_init): Set deprecated_target_read_fp to
+ ia64_read_sp. Do not set read_sp to generic_target_read_sp.
+ * regcache.c (generic_target_read_sp): Delete function.
+ (read_sp): Try TARGET_READ_SP and SP_REGNUM for the SP register.
+ * inferior.h (generic_target_read_sp): Delete declaration.
+ * frv-tdep.c (frv_gdbarch_init): Do not set read_sp to
+ generic_target_read_sp.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
+ * sparc-tdep.c (sparc_gdbarch_init): Ditto
+ * sh-tdep.c (sh_gdbarch_init): Ditto.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
+ * Makefile.in (mn10300-tdep.o, ia64-tdep.o): Update dependencies.
+
+2003-06-07 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh: Comment each field of startup_gdbarch.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+2003-06-07 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (TARGET_READ_PC): Add predicate, remove default.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * regcache.c: Update comments on read_pc et.al.
+ (generic_target_read_pc): Delete function.
+ (read_pc_pid): Try TARGET_READ_PC and PC_REGNUM for a PC register.
+ * inferior.h (generic_target_read_pc): Delete declaration.
+ * frv-tdep.c (frv_gdbarch_init): Do not set read_pc to
+ generic_target_read_pc.
+ * sparc-tdep.c (sparc_gdbarch_init): Ditto.
+ * sh-tdep.c (sh_gdbarch_init): Ditto.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
+
+2003-06-07 Andrew Cagney <cagney@redhat.com>
+
+ * elfread.c (elf_symtab_read): Replace "special_local_sym_p" and
+ "index" with "special_local_sect". Use strcmp instead of STREQ.
+ Append period to coments.
+
+2003-06-06 Mark Mitchell <mark@codesourcery.com>
+
+ * elfread.c (elf_symtab_read): Avoid use of SECT_OFF_MAX.
+ (elfstab_offset_sections): Likewise.
+ * gdb-stabs.h (stab_section_info): Likewise.
+ * i386-interix-tdep.c (pei_adjust_objfile_offsets): Likewise.
+ * objfiles.c (objfile_relocate): Likewise.
+ * pa64solib.c (pa64_solib_add_solib_objfile): Likewise.
+ * remote.c (get_offsets): Likewise.
+ (remote_cisco_objfile_relocate): Likewise.
+ * somread.c (som_symfile_offsets): Likewise.
+ * symfile.c (alloc_section_addr_info): New function.
+ (build_section_addr_info_from_section_tab): Use it.
+ (free_section_addr_info): Adjust.
+ (default_symfile_offsets): Avoid use of SECT_OFF_MAX.
+ (syms_from_objfile): Allocate local_addr dynamically.
+ (symbol_file_add_with_addrs_or_offsets): Allocate orig_addrs
+ dynamically.
+ (add_symbol_file_command): Allocate sect_opts dynamically.
+ (reread_symbols): Avoid use of SECT_OFF_MAX.
+ * symfile.h (section_addr_info): Do not use MAX_SECTIONS.
+ (alloc_section_addr_info): Declare it.
+ * symtab.h (SIZEOF_SECTION_OFFSETS): Remove.
+ * win32-nat.c (solib_symbols_add): Allocate section_addrs
+ dynamically.
+ * xcoffread.c (xcoff_symfile_offsets): Avoid use of SECT_OFF_MAX.
+
+2003-06-06 Andrew Cagney <cagney@redhat.com>
+
+ * d10v-tdep.c (struct d10v_unwind_cache): Delete "return_pc".
+ (d10v_frame_unwind_cache): Do not set "return_pc".
+
+2003-06-06 Michael Snyder <msnyder@redhat.com>
+
+ * h8300-tdep.c: Make tidy (long lines).
+
+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>
+
+ * 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.
+ (read_type): Ditto.
+ (add_undefined_type): Ditto.
+ * stabsread.h (dbx_lookup_type, read_type, add_undefined_type): Do
+ not export.
+
+2003-05-26 Elena Zannoni <ezannoni@redhat.com>
+
+ * hpread.c (hpread_has_name): Make static.
+ (hpread_psymtab_to_symtab): Ditto.
+ (file_exists): Ditto.
+ (hpread_call_pxdb): Ditto.
+ (hpread_pxdb_needed): Ditto.
+ (hpread_quick_traverse): Ditto.
+ (hpread_get_header): Ditto.
+ (hpread_get_lntt): Ditto.
+ (hpread_get_slt): Ditto.
+ (class_of): Ditto.
+
+2003-05-25 Andreas Schwab <schwab@suse.de>
+
+ * m68k-tdep.c (m68k_gdbarch_init): Set parm_boundary instead of
+ stack_align and deprecated_extra_stack_alignment_needed.
+ (m68k_stack_align): Delete.
+
+ * m68k-tdep.c (m68k_register_raw_size): Remove cast.
+ (m68k_register_virtual_size): Likewise.
+ (altos_skip_prologue): Remove obsolete function.
+ (isi_frame_num_args): Likewise.
+ (news_frame_num_args): Likewise.
+ (m68k_fix_call_dummy): Make static.
+ (m68k_push_dummy_frame): Likewise.
+ (m68k_pop_frame): Likewise.
+ (m68k_skip_prologue): Likewise.
+ (m68k_frame_init_saved_regs): Likewise.
+ (m68k_saved_pc_after_call): Likewise.
+ (m68k_get_longjmp_target): Make multi-arch.
+ (m68k_gdbarch_init): Allocate and initialize gdbarch_tdep
+ structure. Register m68k_get_longjmp_target if enabled.
+ * m68k-tdep.h (struct gdbarch_tdep): Define.
+ * config/m68k/tm-m68k.h: Don't include "regcache.h".
+
+ * Makefile.in (config.status): Also depend on configure.tgt
+ and configure.host.
+ (m68klinux-tdep.o): Update dependencies.
+ * configure.tgt (m68*-*-linux*): Set gdb_multi_arch to 1.
+ * m68klinux-tdep.c (M68K_LINUX_JB_ELEMENT_SIZE): Define.
+ (M68K_LINUX_JB_PC): Define.
+ (m68k_linux_pc_in_sigtramp): Renamed from m68k_linux_in_sigtramp
+ and take additional parameter.
+ (m68k_linux_sigtramp_saved_pc): Update.
+ (m68k_linux_init_abi): Set jb_pc and jb_elt_size. Register
+ m68k_linux_pc_in_sigtramp, in_plt_section,
+ find_solib_trampoline_target.
+ * config/m68k/tm-linux.h: Don't include any tm headers.
+ (START_INFERIOR_TRAPS_EXPECTED): Remove definition.
+ (JB_ELEMENT_SIZE): Likewise.
+ (JB_PC): Likewise.
+ (GET_LONGJMP_TARGET): Likewise.
+ (IN_SIGTRAMP): Likewise.
+ (SVR4_SHARED_LIBS): Define this and include "solib.h".
+
+2003-05-25 Mark Kettenis <kettenis@gnu.org>
+
+ * sparc-tdep.c (sparc32_do_push_arguments): New function.
+ (sparc32_push_arguments): Re-implement by calling
+ sparc32_do_push_arguments.
+
+2003-05-25 Mark Kettenis <kettenis@gnu.org>
+
+ * sparc-tdep.c (SPARC_F0_REGNUM, SPARC_F1_REGNUM, SPARC_O0_REGNUM,
+ SPARC_O1_REGNUM): New defines.
+ (sparc32_extract_return_value): Rewrite to operate on a regcache.
+ (sparc32_store_return_value): New function.
+ (sparc_extract_struct_value_address): Rewrite to operate on a
+ regcache.
+ (sparc_gdbarch_init): Don't set
+ deprecated_extract_struct_value_address. Set
+ extract_struct_value_address instead. Don't set
+ deprecated_extract_return_value and deprecated_store_return_value
+ for 32-bit targets. Set extract_return_value and
+ store_return_value instead.
+ * config/sparc/tm-sparc.h (DEPRECATED_STORE_RETURN_VALUE,
+ DEPRECTAED_EXTRACT_RETURN_VALUE,
+ DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS): Don't define these.
+ (STORE_RETURN_VALUE, EXTRACT_RETURN_VALUE,
+ EXTRACT_STRUCT_VALUE_ADDRESS): Define these instead.
+ (sparc_store_return_value): Remove prototype.
+ (sparc32_store_return_value): New prototype.
+ (sparc32_extract_return_value, sparc_extract_struct_value_address):
+ Adjust prototypes.
+
+2003-05-24 Mark Kettenis <kettenis@gnu.org>
+
+ * sparcnbsd-tdep.c: Include "gdb_string.h".
+
+2003-05-23 Andrew Cagney <cagney@redhat.com>
+
+ * p-valprint.c (pascal_val_print): Replace extract_address with
+ the inline equivalent extract_unsigned_integer.
+ * jv-valprint.c (java_value_print): Ditto.
+ * ada-valprint.c (ada_val_print_1): Ditto.
+ * ada-lang.h (EXTRACT_ADDRESS): Ditto.
+
+2003-05-23 Theodore A. Roth <troth@openavr.org>
+
+ * blockframe.c (frameless_look_for_prologue): Remove unused
+ after_prologue variable.
+
+2003-05-23 Mark Kettenis <kettenis@gnu.org>
+
+ * blockframe.c (get_pc_function_start): Rewrite to avoid
+ asignments in if-statements.
+
+2003-05-23 Raoul Gough <RaoulGough@yahoo.co.uk>
+
+ Committed by Elena Zannoni <ezannoni@redhat.com>.
+ * coffread.c(coff_symtab_read): Do relocate static symbols from PE
+ files, don't relocate absolute symbols (and do use mst_abs).
+
+2003-05-23 Andrew Cagney <cagney@redhat.com>
+
+ * objc-lang.c: Include "gdb_assert.h".
+ (objc_op_print_tab): Use OP_NULL and PREC_NULL instead of 0.
+ (CHECK, CHECK_FATAL, __CHECK_FUNCTION): Delete macros.
+ (gdb_check, gdb_check_fatal): Delete functions.
+ (read_objc_methlist_method): Replace CHECK and CHECK_FATAL with
+ gdb_assert.
+ (parse_selector, parse_method, find_methods, find_imps): Ditto.
+ * Makefile.in (objc-lang.o): Update dependencies.
+
2003-06-16 David Carlton <carlton@kealia.com>
* symfile.h: Change formatting.
@@ -213,7 +3087,7 @@
* c-exp.y (typebase): Remove duplicate occurence of
`SIGNED_KEYWORD LONG LONG'. Use builtin_type_long_long instead
- of lookup_signed_typename.
+ of lookup_signed_typename.
2003-05-18 Mark Kettenis <kettenis@gnu.org>
@@ -360,13 +3234,13 @@
* Makefile.in (cp-valprint.o): Update dependencies.
2003-05-15 Jeff Johnston <jjohnstn@redhat.com>
-
+
* ia64-tdep.c: Increase max_skip_non_prologue_insns to 40.
(examine_prologue): Support looking through leaf functions, knowing
- they start with mov r2,r12. Support skipping over indirect stores
- of the input registers. Upon hitting a non-nop branch instruction
- or predicated instruction, bail out by setting lim_pc to the current
- pc value in the loop. At the end, if the lim_pc value is still
+ they start with mov r2,r12. Support skipping over indirect stores
+ of the input registers. Upon hitting a non-nop branch instruction
+ or predicated instruction, bail out by setting lim_pc to the current
+ pc value in the loop. At the end, if the lim_pc value is still
beyond our calculated value and we have trust_limit set,
use the lim_pc value.
@@ -393,12 +3267,12 @@
declaration.
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.
+
+ 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.
2003-05-14 Kevin Buettner <kevinb@redhat.com>
@@ -595,9 +3469,9 @@
* avr-tdep.c (avr_remote_translate_xfer_address): Ditto.
2003-05-07 Jeff Johnston <jjohnstn@redhat.com>
-
- * dwarf2read.c (dwarf_decode_lines): Only use output of
- check_cu_functions() when calling record_line(). Do not update
+
+ * dwarf2read.c (dwarf_decode_lines): Only use output of
+ check_cu_functions() when calling record_line(). Do not update
the current address.
2003-05-07 Andrew Cagney <cagney@redhat.com>
@@ -637,7 +3511,7 @@
* gdbarch.h, gdbarch.c: Re-generate.
* remote.c (remote_xfer_memory): Use
gdbarch_remote_translate_xfer_address.
-
+
2003-05-07 Jeff Johnston <jjohnstn@redhat.com>
* infrun.c (prev_pc): Move declaration ahead of proceed().
@@ -703,7 +3577,7 @@
* config/tm-qnxnto.h: New file.
* config/i386/i386nto.mt: New file.
* config/i386/tm-i386nto.h: New file.
-
+
2003-05-04 Andrew Cagney <cagney@redhat.com>
* gdbthread.h (save_infrun_state): Drop prev_func_name parameter.
@@ -726,7 +3600,7 @@
that REGISTER_BYTE is consistent with the regcache.
* gdbarch.sh (REGISTER_BYTE): Add a predicate.
* gdbarch.h, gdbarch.c: Regenerate.
-
+
2003-05-04 Mark Kettenis <kettenis@gnu.org>
* i387-tdep.c (fxsave_offset): Add entries for %xmm8-%xmm15.
@@ -775,7 +3649,7 @@
(print_formatted): Call gdb_print_insn, instead of print_insn.
* Makefile.in (printcmd.o): Update dependencies.
(mcore-tdep.o, d10v-tdep.o): Ditto.
-
+
2003-05-02 Andrew Cagney <cagney@redhat.com>
* std-regs.c (value_of_builtin_frame_pc_reg): Delete #ifdef
@@ -1174,7 +4048,7 @@
2003-04-24 Adam Fedor <fedor@gnu.org>
- * objc-lang.c (FETCH_ARGUMENT, CONVERT_FUNCPTR): Remove
+ * objc-lang.c (FETCH_ARGUMENT, CONVERT_FUNCPTR): Remove
architecture dependant compilation and mark as unimplemented
(until they get put in the gdbarch vector).
@@ -1188,7 +4062,7 @@
* infcall.c (call_function_by_hand): Eliminate redundant
indentation. Move "saved_async" and "old_cleanups" to where they
are needed.
-
+
2003-04-23 Andrew Cagney <cagney@redhat.com>
* infcall.c (call_function_by_hand): Eliminate the variables "rc"
@@ -1199,7 +4073,7 @@
* infcall.c (call_function_by_hand): Move variables "start_sp",
"dummy", "sizeof_dummy1" and "dummy1" and corresponding dummy call
code to ON_STACK switch branch.
-
+
2003-04-23 Andrew Cagney <cagney@redhat.com>
* infcall.c (call_function_by_hand): Make declaration of "i",
@@ -1230,7 +4104,7 @@
* config/pa/tm-hppa.h (SOFT_FLOAT): Delete this macro.
Update all the tests using SOFT_FLOAT considering the fact that
- this macro was always set to 0.
+ this macro was always set to 0.
* config/pa/tm-hppa64.h: Update all the tests using SOFT_FLOAT
considering the fact that this macro was always set to 0.
* hppa-tdep.h (hppa_store_return_value): Likewise.
@@ -1312,7 +4186,7 @@
(i386_fp_regnum_p, i386_fpc_regnum_p, i386_sse_regnum_p,
i386_mxcsr_regnum_p): Remove redundant parentheses.
(i386_register_name): Use i386_num_register_names.
-
+
* i386-tdep.c (i386_extract_return_value,
i386_store_return_value): Correct check for availability of
floating-point registers.
@@ -1338,7 +4212,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>
@@ -1349,22 +4223,46 @@
Committed by Elena Zannoni <ezannoni@redhat.com>
* gdb_gcore.sh: New script to create a core dump of a process.
-
+
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>
* thread-db.c: Reindented.
-
+
2003-04-17 Jeff Johnston <jjohnstn@redhat.com>
-
- * gdb_indent.sh: Recognize td_thrhandle_t, td_event_msg_t,
- td_thr_events_t, td_notify_t, td_thr_iter_f, and td_thrinfo_t
+
+ * gdb_indent.sh: Recognize td_thrhandle_t, td_event_msg_t,
+ 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
@@ -1737,7 +4635,7 @@
* alpha-tdep.c (alpha_init_frame_pc_first): Update.
* x86-64-tdep.h (x86_64_linux_saved_pc_after_call): Update
declaration.
-
+
2003-04-11 Andrew Cagney <cagney@redhat.com>
* i387-tdep.c: Update copyright.
@@ -1913,7 +4811,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.
@@ -1922,7 +4820,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.
@@ -1956,11 +4854,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>
@@ -2100,7 +4998,7 @@
* frame-unwind.h: Include "frame.h".
(struct frame_unwind): Add "type" field.
* Makefile.in (frame_unwind_h): Add $(frame_h).
-
+
2003-04-04 Andrew Cagney <cagney@redhat.com>
* x86-64-tdep.c (x86_64_unwind_dummy_id): Use frame_id_build.
@@ -2121,9 +5019,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>
@@ -2161,15 +5059,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.
@@ -2196,13 +5094,13 @@
(d10v_frame_this_id): Use the previous frame's inner most stack
address and this frame's func address for the frame ID. Use
frame_id_build. Don't analyze beyond the current instruction.
-
+
2003-04-01 Andrew Cagney <cagney@redhat.com>
* frame.h (get_frame_locals_address, get_frame_args_address):
Refer to the base address, instead of the address of the first
local or parameter.
-
+
2003-04-01 Andrew Cagney <cagney@redhat.com>
Add frame debug info addresses:
@@ -2403,7 +5301,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>
@@ -2452,7 +5350,7 @@
* valops.c (hand_function_call): Replace TARGET_WRITE_SP with
DEPRECATED_DUMMY_WRITE_SP. Call when the method is available,
instead of when push_dummy_call is not available.
-
+
2003-03-30 Andrew Cagney <cagney@redhat.com>
* infttrace.c: Include "gdbthread.h".
@@ -2492,7 +5390,7 @@
* gdbarch.sh (CALL_DUMMY_WORDS, SIZEOF_CALL_DUMMY_WORDS): Always
define.
* gdbarch.h: Regenerate.
-
+
2003-03-29 Andrew Cagney <cagney@redhat.com>
* infttrace.h: New file.
@@ -2562,7 +5460,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>
@@ -2576,7 +5474,7 @@
TARGET_WRITE_SP.
* sparc-tdep.c (sparc_push_dummy_frame): Ditto.
(sparc_pop_frame): Ditto.
-
+
2003-03-27 Andrew Cagney <cagney@redhat.com>
* NEWS: Mention removal of support for hppa*-*-bsd* and
@@ -2718,7 +5616,7 @@
* cris-tdep.c (cris_gdbarch_init): Ditto.
* m68k-tdep.c (m68k_gdbarch_init): Ditto.
* m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
-
+
2003-03-25 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (DEPRECATED_STORE_STRUCT_RETURN): Replace
@@ -2750,7 +5648,7 @@
* avr-tdep.c (avr_gdbarch_init): Update.
* arm-tdep.c (arm_gdbarch_init): Update.
* alpha-tdep.c (alpha_gdbarch_init): Update.
-
+
2003-03-25 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (CALL_DUMMY_STACK_ADJUST_P): Delete.
@@ -2884,7 +5782,7 @@
* arm-tdep.c (show_arm_command): Don't print out help. Instead, show
the current setting of each value.
(_initialize_arm_tdep): Delete variable new_cmd and add new vars
- new_set and new_show. Use add_setshow_cmd_full and
+ new_set and new_show. Use add_setshow_cmd_full and
add_setshow_boolean_cmd as appropriate. Deprecate "set/show apcs32"
commands and add new version as subcommands of "set/show arm".
@@ -2896,7 +5794,7 @@
(num_disassembly_options): Renamed from num_flavor_options.
(valid_disassembly_styles): Renamed from valid_flavors.
(disassembly_style): Renamed from disassembly_flavor.
- (set_disassembly_style_sfunc): Renamed from
+ (set_disassembly_style_sfunc): Renamed from
set_disassembly_flavor_sfunc.
(set_disassembly_style): Renamed from set_disassembly_flavor.
(arm_othernames): Updated.
@@ -3150,7 +6048,7 @@
* frame.c (frame_register): Update.
(get_saved_register): Update.
* config/sparc/tm-sparc.h (DEPRECATED_GET_SAVED_REGISTER): Update.
-
+
2003-03-13 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (DEPRECATED_POP_FRAME): Replace POP_FRAME.
@@ -3191,12 +6089,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>
@@ -3297,7 +6195,7 @@
* config/pa/tm-hppa.h (DEPRECATED_FRAME_SAVED_PC): Update.
* config/m68k/tm-delta68.h (DEPRECATED_FRAME_SAVED_PC): Update.
* config/m68k/tm-linux.h (DEPRECATED_FRAME_SAVED_PC): Update.
-
+
2003-03-12 Andrew Cagney <cagney@redhat.com>
Eliminate the need for POP_FRAME.
@@ -3442,7 +6340,7 @@
* config/pa/tm-hppa.h (DEPRECATED_FRAME_SAVED_PC): Update.
* config/m68k/tm-delta68.h (DEPRECATED_FRAME_SAVED_PC): Update.
* config/m68k/tm-linux.h (DEPRECATED_FRAME_SAVED_PC): Update.
-
+
2003-03-10 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (gdbarch_unwind_pc): New method.
@@ -3490,7 +6388,7 @@
* gdbarch.sh: Don't generate two macro definitions when an
undefined macro taking no arguments.
* gdbarch.h: Regenerate.
-
+
2002-03-07 Michal Ludvig <mludvig@suse.cz>
* x86-64-tdep.c (x86_64_save_dummy_frame_tos)
@@ -3500,7 +6398,7 @@
2003-03-07 Michal Ludvig <mludvig@suse.cz>
* x86-64-tdep.c (x86_64_function_has_prologue): New function.
- (x86_64_skip_prologue): Move prologue detection to
+ (x86_64_skip_prologue): Move prologue detection to
separate function.
* x86-64-tdep.h (x86_64_function_has_prologue): New prototype.
@@ -3513,7 +6411,7 @@
* gdbarch.sh (unwind_dummy_id): New multi-arch method with
predicate.
* gdbarch.h, gdbarch.c: Regneerate.
-
+
2003-03-05 Andrew Cagney <cagney@redhat.com>
* d10v-tdep.c (struct d10v_unwind_cache): Add field "base".
@@ -3761,7 +6659,7 @@
2003-03-02 Stephane Carrez <stcarrez@nerim.fr>
- * arch-utils.c (generic_register_byte): Fix to use the loop index
+ * arch-utils.c (generic_register_byte): Fix to use the loop index
and not regnum when summing the size of all registers up to regnum.
2003-03-01 Andrew Cagney <cagney@redhat.com>
@@ -3810,13 +6708,13 @@
* avr-tdep.c (avr_gdbarch_init): Update.
* arm-tdep.c (arm_gdbarch_init): Update.
* alpha-tdep.c (alpha_gdbarch_init): Update.
-
+
2003-03-01 Andrew Cagney <cagney@redhat.com>
* main.c (captured_main): Add OPT_WINDOWS and OPT_NOWINDOWS to
option enum and switch. When no windows, set the interpreter to
INTERP_CONSOLE.
-
+
2003-03-01 Andrew Cagney <cagney@redhat.com>
* main.c (captured_main): Replace magic option characters with an
@@ -3985,7 +6883,7 @@
* cris-tdep.c (cris_gdbarch_init): Ditto.
* avr-tdep.c (avr_gdbarch_init): Ditto.
* arm-tdep.c (arm_gdbarch_init): Ditto.
-
+
2003-02-26 Kevin Buettner <kevinb@redhat.com>
* mips-tdep.c (show_mips_abi): New function.
@@ -3993,9 +6891,9 @@
command ``show mips abi''.
2003-02-26 Jeff Johnston <jjohnstn@redhat.com>
-
+
From Elena Zannoni <ezannoni@redhat.com>
- * dbxread.c (process_one_symbol): Only record line 0 if one or
+ * dbxread.c (process_one_symbol): Only record line 0 if one or
more sline entries have been seen for the function.
2003-02-26 Michael Chastain <mec@shout.net>
@@ -4194,7 +7092,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>
@@ -4248,24 +7146,24 @@
* c-valprint.c (c_val_print): Ditto.
* expprint.c (print_subexp): Ditto.
* findvar.c (locate_var_value): Ditto.
- * infcmd.c (jump_command): Ditto.
- * linespec.c (decode_line_2, decode_compound): Ditto.
- * maint.c (maintenance_translate_address): Ditto.
- * objc-lang.c (compare_selectors, compare_classes): Ditto.
+ * infcmd.c (jump_command): Ditto.
+ * linespec.c (decode_line_2, decode_compound): Ditto.
+ * maint.c (maintenance_translate_address): Ditto.
+ * objc-lang.c (compare_selectors, compare_classes): Ditto.
* printcmd.c (build_address_symbolic, sym_info, print_frame_args):
Ditto.
- * p-valprint.c (pascal_val_print): Ditto.
- * stabsread.c (define_symbol): Ditto.
+ * p-valprint.c (pascal_val_print): Ditto.
+ * stabsread.c (define_symbol): Ditto.
* stack.c (print_frame, frame_info, print_block_frame_locals)
- (print_frame_arg_vars, return_command): Ditto.
- * symfile.c (compare_symbols, compare_psymbols): Ditto.
- * symmisc.c (print_symbol): Ditto.
+ (print_frame_arg_vars, return_command): Ditto.
+ * symfile.c (compare_symbols, compare_psymbols): Ditto.
+ * symmisc.c (print_symbol): Ditto.
* symtab.c (lookup_partial_symbol, lookup_block_symbol)
(compare_search_syms, print_symbol_info, print_msymbol_info)
- (rbreak_command): Ditto.
- * tracepoint.c (tracepoints_info): Ditto.
- * typeprint.c (typedef_print): Ditto.
- * valops.c (value_of_variable, hand_function_call): Ditto.
+ (rbreak_command): Ditto.
+ * tracepoint.c (tracepoints_info): Ditto.
+ * typeprint.c (typedef_print): Ditto.
+ * valops.c (value_of_variable, hand_function_call): Ditto.
* cli/cli-cmds.c (edit_command, list_command): Ditto.
* ada-typeprint.c: Update Copyright.
* infcmd.c, objc-lang.c, p-valprint.c, symmisc.c: Ditto.
@@ -4390,10 +7288,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>
@@ -4405,10 +7303,10 @@
instead of the absence of the "nm.h" file, to determine of the
configuration non-native.
* configure: Regenerate.
-
+
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.
@@ -4446,8 +7344,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>
@@ -4675,7 +7573,7 @@
* sol-thread.c, hpux-thread.c: Include "gdb_stat.h" instead of
<sys/stat.h>.
* Makefile.in (sol-thread.o, hpux-thread.o): Update dependencies.
-
+
2003-02-06 Andrew Cagney <ac131313@redhat.com>
* Makefile.in (symm-nat.o): Update dependencies.
@@ -4731,11 +7629,11 @@
* infttrace.c (threads_continue_all_but_one): Fix precedence problem
with '&' and '!='.
(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".
@@ -4826,7 +7724,7 @@
2003-02-04 Andrew Cagney <ac131313@redhat.com>
- * NEWS: Note that the m32r-*-elf* is obsolete.
+ * NEWS: Note that the m32r-*-elf* is obsolete.
* monitor.c (monitor_expect): Obsolete reference to m32r.
* configure.tgt: Mark m32r-*-elf* as obsolete.
* MAINTAINERS: Mark m32k as obsolete.
@@ -4950,7 +7848,7 @@
(allocate_objfile): Call it.
* objfiles.h (terminate_minimal_symbol_table): New declaration.
(ALL_MSYMBOLS): No need to test whether (objfile)->msymbols is
- non-NULL.
+ non-NULL.
* minsyms.c (lookup_minimal_symbol_by_pc_section): To see whether
objfile has minimal symbols, compare minimal_symbol_count to zero,
instead of comparing msymbols with NULL.
@@ -4958,7 +7856,7 @@
* solib-sunos.c (solib_add_common_symbols): Call
terminate_minimal_symbol_table.
* symfile.c (reread_symbols): Same.
-
+
2003-02-03 Kevin Buettner <kevinb@redhat.com>
* s390-tdep.c (s390_address_class_type_flags)
@@ -4975,7 +7873,7 @@
* dwarf2cfi.c (pointer_encoding): Added new parameter.
* dwarf2cfi.c, dwarf2read.c: Changed all warnings and
- error messages to contain BFD filename.
+ error messages to contain BFD filename.
2003-02-02 Elena Zannoni <ezannoni@redhat.com>
@@ -4994,14 +7892,14 @@
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.
-
+
2003-02-02 Andrew Cagney <ac131313@redhat.com>
* frame.c (frame_unwind_register): New function.
@@ -5035,8 +7933,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>
@@ -5088,7 +7986,7 @@
(som_solib_add): Use.
* hppa-tdep.c (hppa_pointer_to_address_hack): New function.
* hppa-tdep.c (unwind_command): Use.
-
+
2003-02-01 Andrew Cagney <ac131313@redhat.com>
* gdb_dirent.h: Mark up valid uses of <dirent.h>, d_namelen and
@@ -5140,7 +8038,7 @@
* objc-exp.y, c-exp.y, f-exp.y: Remove PTR casts.
* utils.c: Update comments documenting legitimate uses of PTR.
-
+
* utils.c: Re-indent.
* config/djgpp/fnchange.lst: Delete nindy files.
@@ -5185,7 +8083,7 @@
elfstab_build_psymtabs.
* gdb-stabs.h (struct dbx_symfile_info): Add stab_section.
(DBX_STAB_SECTION): New macro.
- * stabsread.h (elfstab_build_psymtabs): Update prototype.
+ * stabsread.h (elfstab_build_psymtabs): Update prototype.
* symfile.c (symfile_dummy_outputs): New function.
(symfile_relocate_debug_section): New function.
* symfile.h (symfile_relocate_debug_section): Add prototype.
@@ -5270,7 +8168,7 @@
Daniel Jacobowitz <drow@mvista.com>
Fix PR gdb/961.
- * dwarf2read.c (dwarf_ranges_offset, dwarf_ranges_size): New
+ * dwarf2read.c (dwarf_ranges_offset, dwarf_ranges_size): New
variables.
(RANGES_SECTION): New.
(dwarf_ranges_buffer): New variable.
@@ -5423,7 +8321,7 @@
now pass in either a `struct section_addr_info' list to say where
each section is loaded, or a `struct section_offsets' table. Pass
these new arguments through to syms_from_objfile as appropriate.
- (symbol_file_add): Just call symbol_file_add_with_addrs_or_offsets,
+ (symbol_file_add): Just call symbol_file_add_with_addrs_or_offsets,
with the appropriate quiescent values for the new arguments.
* symfile.c: #include "gdb_assert.h".
@@ -5573,7 +8471,7 @@
(COMMON_OBS): Add frame-unwind.o.
(frame-unwind.o): Specify dependencies.
(frame.o, dummy-frame.o): Update dependencies.
-
+
2003-01-18 Andrew Cagney <ac131313@redhat.com>
* ada-valprint.c: Eliminate PTR.
@@ -5584,7 +8482,7 @@
* remote-mips.c, remote-sds.c, remote-vx.c: Ditto.
* solib-svr4.c, solib.c, stack.c, symfile.c, symfile.h: Ditto.
* symmisc.c, v850ice.c, xcoffread.c, cli/cli-script.c: Ditto.
-
+
2003-01-17 Andrew Cagney <ac131313@redhat.com>
* main.c (captured_main): Don't use PTR.
@@ -5629,7 +8527,7 @@
* breakpoint.c (until_break_command): Add new argument. Use it to
decide whether to stop only at the current frame or not.
* breakpoint.h (until_break_command): Update prototype.
- * infcmd.c (until_command): Add new argument to until_break_command
+ * infcmd.c (until_command): Add new argument to until_break_command
call.
(advance_command): New function.
(_initialize_infcmd): Update help string for 'until' command.
@@ -5670,7 +8568,7 @@
* buildsym.c (start_subfile): Obsolete comment pertinent to Cfront.
Update copyright year.
* dbxread.c(struct cont_elem): Obsolete.
- (process_later, process_now): Obsolete functions.
+ (process_later, process_now): Obsolete functions.
(read_dbx_symtab, read_ofile_symtab): Obsolete cfront support.
Update copyright year.
* gdbtypes.c (INIT_EXTRA, ADD_EXTRA): Obsolete macros.
@@ -5960,7 +8858,7 @@
* ns32k-tdep.c, s390-tdep.c, sh-tdep.c, sparc-tdep.c: Ditto.
* v850-tdep.c, vax-tdep.c, x86-64-linux-tdep.c: Ditto.
* xstormy16-tdep.c: Ditto.
-
+
2003-01-07 Andrew Cagney <cagney@redhat.com>
* alpha-tdep.c: Use get_frame_base.
@@ -5972,7 +8870,7 @@
* x86-64-linux-tdep.c, xstormy16-tdep.c: Ditto.
* config/h8500/tm-h8500.h, config/mn10200/tm-mn10200.h: Ditto.
* config/sparc/tm-sparc.h: Ditto.
-
+
2003-01-07 Andrew Cagney <cagney@redhat.com>
* frame.c (deprecated_get_frame_context): New function.
@@ -5981,7 +8879,7 @@
(deprecated_set_frame_context): Declare.
* dwarf2cfi.c (UNWIND_CONTEXT): Use deprecated_get_frame_context.
(cfi_init_extra_frame_info): Use deprecated_set_frame_context.
-
+
2003-01-07 Andrew Cagney <cagney@redhat.com>
* frame.c (deprecated_set_frame_next_hack): New function.
@@ -6087,7 +8985,7 @@
2003-01-06 Michal Ludvig <mludvig@suse.cz>
- * x86-64-linux-nat.c (i386_sse_regnum_p): Deleted. Not needed anymore
+ * x86-64-linux-nat.c (i386_sse_regnum_p): Deleted. Not needed anymore
since it is in i386-tdep.c.
2003-01-06 J. Brobecker <brobecker@gnat.com>
@@ -6418,7 +9316,7 @@
* avr-tdep.c, cris-tdep.c: Ditto.
* mcore-tdep.c, mips-tdep.c, mn10200-tdep.c: Ditto.
* sh-tdep.c, sparc-tdep.c, v850-tdep.c: Ditto.
-
+
2003-01-03 Mark Kettenis <kettenis@gnu.org>
* configure.in: Remove --enable-netrom option.
@@ -6441,7 +9339,7 @@
subscripts. Remove evil changequotes here.
* acconfig.h (TARGET_CPU_DEFAULT): Remove.
* config.in, configure: Regenerated.
-
+
* acconfig.h (DEFAULT_BFD_ARCH, DEFAULT_BFD_VEC): Remove.
* configure.in: Cleanup section that sources GDB and BFD configure
subscripts. Remove evil changequotes here.
@@ -6458,7 +9356,7 @@
* s390-tdep.c, sh-tdep.c, sparc-tdep.c, v850-tdep.c: Ditto.
* vax-tdep.c, x86-64-linux-tdep.c, xstormy16-tdep.c: Ditto.
* z8k-tdep.c: Ditto.
-
+
2003-01-02 Mark Kettenis <kettenis@gnu.org>
* configure.in: Remove UI_OUT configuration code.
diff --git a/gdb/MAINTAINERS b/gdb/MAINTAINERS
index 08af70eac6f..078038eb081 100644
--- a/gdb/MAINTAINERS
+++ b/gdb/MAINTAINERS
@@ -252,7 +252,7 @@ testsuite (Global Maintainers)
Mark Salter msalter@redhat.com
gdbtk (gdb.gdbtk) Keith Seitz keiths@redhat.com
c++ (gdb.c++) Michael Chastain mec@shout.net
- David Carlton carlton@math.stanford.edu
+ David Carlton carlton@kealia.com
mi tests (gdb.mi) Elena Zannoni ezannoni@redhat.com
Andrew Cagney cagney@redhat.com
stabs (gdb.stabs) Elena Zannoni ezannoni@redhat.com
@@ -315,7 +315,7 @@ Joel Brobecker brobecker@act-europe.fr
Dave Brolley brolley@redhat.com
Kevin Buettner kevinb@redhat.com
Andrew Cagney ac131313@redhat.com
-David Carlton carlton@math.stanford.edu
+David Carlton carlton@kealia.com
Stephane Carrez stcarrez@nerim.fr
Michael Chastain mec@shout.net
Eric Christopher echristo@redhat.com
@@ -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 efa3a7ba1e5..bd09ea57b37 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -400,7 +400,7 @@ SER_HARDWIRE = @SER_HARDWIRE@
# The `remote' debugging target is supported for most architectures,
# but not all (e.g. 960)
-REMOTE_OBS = remote.o dcache.o remote-utils.o tracepoint.o ax-general.o ax-gdb.o
+REMOTE_OBS = remote.o dcache.o remote-utils.o tracepoint.o ax-general.o ax-gdb.o remote-fileio.o
# This is remote-sim.o if a simulator is to be linked in.
SIM_OBS =
@@ -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 dictionary.c disasm.c doublest.c \
- dummy-frame.c dwarfread.c dwarf2expr.c dwarf2loc.c dwarf2read.c \
+ dbxread.c demangle.c dictionary.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 \
@@ -535,12 +535,14 @@ SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \
objc-exp.y objc-lang.c \
objfiles.c osabi.c observer.c \
p-exp.y p-lang.c p-typeprint.c p-valprint.c parse.c printcmd.c \
- regcache.c reggroups.c remote.c \
+ regcache.c reggroups.c remote.c remote-fileio.c \
scm-exp.c scm-lang.c scm-valprint.c \
sentinel-frame.c \
serial.c ser-unix.c source.c \
stabsread.c stack.c std-regs.c symfile.c symmisc.c symtab.c \
- target.c thread.c top.c tracepoint.c typeprint.c \
+ target.c thread.c top.c tracepoint.c \
+ trad-frame.c \
+ typeprint.c \
tui/tui.c tui/tui.h tui/tuiCommand.c tui/tuiCommand.h \
tui/tuiData.c tui/tuiData.h tui/tuiDataWin.c tui/tuiDataWin.h \
tui/tuiDisassem.c tui/tuiDisassem.h tui/tuiGeneralWin.c \
@@ -639,9 +641,12 @@ 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
+exc_request_U_h = exc_request_U.h
+exc_request_S_h = exc_request_S.h
expression_h = expression.h $(symtab_h) $(doublest_h)
f_lang_h = f-lang.h
frame_h = frame.h
@@ -680,6 +685,7 @@ jv_lang_h = jv-lang.h
kod_h = kod.h
language_h = language.h
linespec_h = linespec.h
+linux_nat_h = linux-nat.h
m2_lang_h = m2-lang.h
m68k_tdep_h = m68k-tdep.h
macroexp_h = macroexp.h
@@ -691,7 +697,10 @@ minimon_h = minimon.h
mips_tdep_h = mips-tdep.h
mipsnbsd_tdep_h = mipsnbsd-tdep.h
monitor_h = monitor.h
+msg_reply_S_h = msg_reply_S.h
+msg_U_h = msg_U.h
nbsd_tdep_h = nbsd-tdep.h
+notify_S_h = notify_S.h
ns32k_tdep_h = ns32k-tdep.h
objc_lang_h = objc-lang.h
objfiles_h = objfiles.h $(gdb_obstack_h) $(symfile_h)
@@ -704,10 +713,12 @@ parser_defs_h = parser-defs.h $(doublest_h)
ppc_tdep_h = ppc-tdep.h
ppcnbsd_tdep_h = ppcnbsd-tdep.h
proc_utils_h = proc-utils.h
+process_reply_S_h = process_reply_S.h
regcache_h = regcache.h
reggroups_h = reggroups.h
remote_utils_h = remote-utils.h $(target_h)
remote_h = remote.h
+remote_fileio_h = remote-fileio.h
scm_lang_h = scm-lang.h $(scm_tags_h)
scm_tags_h = scm-tags.h
sentinel_frame_h = sentinel-frame.h
@@ -724,18 +735,20 @@ source_h = source.h
sparcnbsd_tdep_h = sparcnbsd-tdep.h
srec_h = srec.h
stabsread_h = stabsread.h
+stack_h = stack.h
symfile_h = symfile.h
symtab_h = symtab.h
target_h = target.h $(bfd_h) $(symtab_h) $(dcache_h) $(memattr_h)
terminal_h = terminal.h
top_h = top.h
+trad_frame_h = trad-frame.h
infttrace_h = infttrace.h
tracepoint_h = tracepoint.h
typeprint_h = typeprint.h
ui_file_h = ui-file.h
ui_out_h = ui-out.h
valprint_h = valprint.h
-value_h = value.h $(doublest_h) $(symtab_h) $(gdbtypes_h) $(expression_h)
+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
@@ -838,7 +851,7 @@ TAGFILES_WITH_SRCDIR = $(HFILES_WITH_SRCDIR)
COMMON_OBS = version.o block.o blockframe.o breakpoint.o findvar.o regcache.o \
charset.o dictionary.o disasm.o dummy-frame.o \
source.o values.o eval.o valops.o valarith.o valprint.o printcmd.o \
- block.o symtab.o symfile.o symmisc.o linespec.o \
+ block.o symtab.o symfile.o symmisc.o linespec.o dictionary.o \
infcall.o \
infcmd.o infrun.o \
expprint.o environ.o stack.o thread.o \
@@ -854,7 +867,7 @@ COMMON_OBS = version.o block.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 \
@@ -871,7 +884,8 @@ COMMON_OBS = version.o block.o blockframe.o breakpoint.o findvar.o regcache.o \
frame-base.o \
gnu-v2-abi.o gnu-v3-abi.o hpacc-abi.o cp-abi.o cp-support.o \
cp-namespace.o \
- reggroups.o
+ reggroups.o \
+ trad-frame.o
OBS = $(COMMON_OBS) $(ANNOTATE_OBS)
@@ -1158,7 +1172,7 @@ config.h: stamp-h ; @true
stamp-h: config.in config.status
CONFIG_HEADERS=config.h:config.in $(SHELL) config.status
-config.status: configure
+config.status: configure configure.tgt configure.host
$(SHELL) config.status --recheck
force:
@@ -1356,7 +1370,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 \
@@ -1389,7 +1403,7 @@ ALLDEPFILES = \
ppc-sysv-tdep.o ppc-linux-nat.c ppc-linux-tdep.c \
ppcnbsd-nat.o ppcnbsd-tdep.o \
procfs.c \
- remote-array.c remote-e7000.c \
+ remote-e7000.c \
remote-hms.c remote-mips.c \
remote-rdp.c remote-sim.c \
remote-st.c remote-utils.c dcache.c \
@@ -1509,17 +1523,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) \
@@ -1541,10 +1559,10 @@ arm-linux-nat.o: arm-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
arm-linux-tdep.o: arm-linux-tdep.c $(defs_h) $(target_h) $(value_h) \
$(gdbtypes_h) $(floatformat_h) $(gdbcore_h) $(frame_h) $(regcache_h) \
$(doublest_h) $(arm_tdep_h) $(symtab_h) $(symfile_h) $(objfiles_h) \
- $(osabi_h)
+ $(solib_svr4_h) $(osabi_h)
arm-tdep.o: arm-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(gdbcmd_h) \
$(gdbcore_h) $(symfile_h) $(gdb_string_h) $(dis_asm_h) $(regcache_h) \
- $(doublest_h) $(value_h) $(arch_utils_h) $(solib_svr4_h) $(osabi_h) \
+ $(doublest_h) $(value_h) $(arch_utils_h) $(osabi_h) \
$(arm_tdep_h) $(sim_arm_h) $(elf_bfd_h) $(coff_internal_h) \
$(elf_arm_h) $(gdb_assert_h)
armnbsd-nat.o: armnbsd-nat.c $(defs_h) $(arm_tdep_h) $(inferior_h) \
@@ -1576,7 +1594,7 @@ buildsym.o: buildsym.c $(defs_h) $(bfd_h) $(gdb_obstack_h) $(symtab_h) \
$(symfile_h) $(objfiles_h) $(gdbtypes_h) $(gdb_assert_h) \
$(complaints_h) $(gdb_string_h) $(expression_h) $(language_h) \
$(bcache_h) $(filenames_h) $(macrotab_h) $(demangle_h) $(buildsym_h) \
- $(stabsread_h) $(block_h) $(dictionary_h) $(cp_support_h)
+ $(stabsread_h) $(block_h) $(cp_support_h) $(dictionary_h)
builtin-regs.o: builtin-regs.c $(defs_h) $(builtin_regs_h) $(gdbtypes_h) \
$(gdb_string_h) $(gdb_assert_h)
c-lang.o: c-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
@@ -1600,8 +1618,8 @@ coffread.o: coffread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(demangle_h) \
$(breakpoint_h) $(bfd_h) $(gdb_obstack_h) $(gdb_string_h) \
$(coff_internal_h) $(libcoff_h) $(symfile_h) $(objfiles_h) \
$(buildsym_h) $(gdb_stabs_h) $(stabsread_h) $(complaints_h) \
- $(target_h) $(gdb_assert_h) $(block_h) $(coff_pe_read_h) \
- $(dictionary_h)
+ $(target_h) $(gdb_assert_h) $(block_h) $(dictionary_h) \
+ $(coff_pe_read_h)
coff-pe-read.o: coff-pe-read.c $(bfd_h) $(defs_h) $(symtab_h) \
$(gdbtypes_h) $(symfile_h) $(objfiles_h) $(coff_pe_read_h)
complaints.o: complaints.c $(defs_h) $(complaints_h) $(gdb_assert_h) \
@@ -1627,7 +1645,8 @@ cp-namespace.o: cp-namespace.c $(defs_h) $(cp_support_h) $(gdb_obstack_h) \
$(symtab_h) $(symfile_h) $(gdb_assert_h) $(block_h) $(objfiles_h) \
$(gdbtypes_h) $(dictionary_h) $(command_h) $(frame_h)
cp-support.o: cp-support.c $(defs_h) $(cp_support_h) $(gdb_string_h) \
- $(demangle_h) $(gdb_assert_h) $(symtab_h) $(gdbcmd_h)
+ $(demangle_h) $(gdb_assert_h) $(gdbcmd_h) $(dictionary_h) \
+ $(objfiles_h) $(frame_h) $(block_h)
cp-valprint.o: cp-valprint.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \
$(gdbtypes_h) $(expression_h) $(value_h) $(command_h) $(gdbcmd_h) \
$(demangle_h) $(annotate_h) $(gdb_string_h) $(c_lang_h) $(target_h) \
@@ -1641,9 +1660,9 @@ cris-tdep.o: cris-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(inferior_h) \
d10v-tdep.o: d10v-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \
$(frame_base_h) $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) \
$(gdb_string_h) $(value_h) $(inferior_h) $(dis_asm_h) $(symfile_h) \
- $(objfiles_h) $(language_h) $(arch_utils_h) $(regcache_h) \
- $(remote_h) $(floatformat_h) $(gdb_sim_d10v_h) $(sim_regno_h) \
- $(gdb_assert_h) $(disasm_h)
+ $(objfiles_h) $(language_h) $(arch_utils_h) $(regcache_h) $(remote_h) \
+ $(floatformat_h) $(gdb_sim_d10v_h) $(sim_regno_h) $(disasm_h) \
+ $(trad_frame_h) $(gdb_assert_h)
dbug-rom.o: dbug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
$(serial_h) $(regcache_h) $(m68k_tdep_h)
dbxread.o: dbxread.c $(defs_h) $(gdb_string_h) $(gdb_obstack_h) \
@@ -1656,8 +1675,8 @@ dcache.o: dcache.c $(defs_h) $(dcache_h) $(gdbcmd_h) $(gdb_string_h) \
delta68-nat.o: delta68-nat.c $(defs_h)
demangle.o: demangle.c $(defs_h) $(command_h) $(gdbcmd_h) $(demangle_h) \
$(gdb_string_h)
-dictionary.o: dictionary.c $(defs_h) $(dictionary_h) $(gdb_obstack_h) \
- $(symtab_h) $(buildsym_h) $(gdb_assert_h)
+dictionary.o: dictionary.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \
+ $(buildsym_h) $(gdb_assert_h) $(dictionary_h)
dink32-rom.o: dink32-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
$(serial_h) $(symfile_h) $(inferior_h) $(regcache_h)
disasm.o: disasm.c $(defs_h) $(gdb_string_h) $(target_h) $(value_h) \
@@ -1679,6 +1698,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) \
@@ -1752,7 +1775,7 @@ gnu-nat.o: gnu-nat.c $(gdb_string_h) $(defs_h) $(inferior_h) $(symtab_h) \
$(value_h) $(language_h) $(target_h) $(gdb_wait_h) $(gdbcmd_h) \
$(gdbcore_h) $(gdbthread_h) $(gdb_assert_h) $(gnu_nat_h) \
$(exc_request_S_h) $(notify_S_h) $(process_reply_S_h) \
- $(msg_reply_S_h) $(exc_request_U_h) $(msg_U_h)
+ $(msg_reply_S_h) $(exc_request_U_h) $(msg_U_h) $(gdb_obstack_h)
gnu-v2-abi.o: gnu-v2-abi.c $(defs_h) $(gdb_string_h) $(symtab_h) \
$(gdbtypes_h) $(value_h) $(demangle_h) $(cp_abi_h)
gnu-v3-abi.o: gnu-v3-abi.c $(defs_h) $(value_h) $(cp_abi_h) $(demangle_h) \
@@ -1797,11 +1820,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) \
@@ -1816,7 +1840,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)
@@ -1829,7 +1853,8 @@ i386v4-nat.o: i386v4-nat.c $(defs_h) $(value_h) $(inferior_h) $(regcache_h) \
$(i386_tdep_h) $(i387_tdep_h) $(gregset_h)
i387-tdep.o: i387-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(language_h) \
$(value_h) $(gdbcore_h) $(floatformat_h) $(regcache_h) \
- $(gdb_assert_h) $(gdb_string_h) $(doublest_h) $(i386_tdep_h)
+ $(gdb_assert_h) $(gdb_string_h) $(doublest_h) $(i386_tdep_h) \
+ $(i387_tdep_h)
ia64-aix-nat.o: ia64-aix-nat.c $(defs_h) $(inferior_h) $(target_h) \
$(gdbcore_h) $(regcache_h) $(symtab_h) $(bfd_h) $(symfile_h) \
$(objfiles_h) $(gdb_stat_h)
@@ -1839,7 +1864,7 @@ ia64-linux-nat.o: ia64-linux-nat.c $(defs_h) $(gdb_string_h) $(inferior_h) \
ia64-linux-tdep.o: ia64-linux-tdep.c $(defs_h) $(arch_utils_h)
ia64-tdep.o: ia64-tdep.c $(defs_h) $(inferior_h) $(symfile_h) $(gdbcore_h) \
$(arch_utils_h) $(floatformat_h) $(regcache_h) $(doublest_h) \
- $(value_h) $(objfiles_h) $(elf_common_h) $(elf_bfd_h)
+ $(value_h) $(gdb_assert_h) $(objfiles_h) $(elf_common_h) $(elf_bfd_h)
inf-loop.o: inf-loop.c $(defs_h) $(inferior_h) $(target_h) $(event_loop_h) \
$(event_top_h) $(inf_loop_h) $(remote_h)
infcall.o: infcall.c $(defs_h) $(breakpoint_h) $(target_h) $(regcache_h) \
@@ -1875,7 +1900,7 @@ irix5-nat.o: irix5-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \
jv-lang.o: jv-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
$(parser_defs_h) $(language_h) $(gdbtypes_h) $(symtab_h) \
$(symfile_h) $(objfiles_h) $(gdb_string_h) $(value_h) $(c_lang_h) \
- $(jv_lang_h) $(gdbcore_h) $(dictionary_h) $(block_h) $(demangle_h)
+ $(jv_lang_h) $(gdbcore_h) $(block_h) $(demangle_h) $(dictionary_h)
jv-typeprint.o: jv-typeprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \
$(value_h) $(demangle_h) $(jv_lang_h) $(gdb_string_h) $(typeprint_h) \
$(c_lang_h) $(cp_abi_h)
@@ -1889,14 +1914,17 @@ language.o: language.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
$(value_h) $(gdbcmd_h) $(expression_h) $(language_h) $(target_h) \
$(parser_defs_h) $(jv_lang_h) $(demangle_h)
lin-lwp.o: lin-lwp.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(gdb_wait_h) \
- $(gdbthread_h) $(inferior_h) $(target_h) $(regcache_h) $(gdbcmd_h)
+ $(gdbthread_h) $(inferior_h) $(target_h) $(regcache_h) $(gdbcmd_h) \
+ $(linux_nat_h)
linespec.o: linespec.c $(defs_h) $(symtab_h) $(frame_h) $(command_h) \
- $(symfile_h) $(objfiles_h) $(demangle_h) $(value_h) $(completer_h) \
- $(cp_abi_h) $(source_h) $(parser_defs_h) $(block_h) $(objc_lang_h) \
+ $(symfile_h) $(objfiles_h) $(source_h) $(demangle_h) $(value_h) \
+ $(completer_h) $(cp_abi_h) $(parser_defs_h) $(block_h) $(objc_lang_h) \
$(cp_support_h)
+linux-nat.o: linux-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdb_wait_h) \
+ $(linux_nat_h)
linux-proc.o: linux-proc.c $(defs_h) $(inferior_h) $(regcache_h) \
$(gregset_h) $(gdbcore_h) $(gdbthread_h) $(elf_bfd_h) \
- $(cli_decode_h) $(gdb_string_h)
+ $(cli_decode_h) $(gdb_string_h) $(linux_nat_h)
lynx-nat.o: lynx-nat.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
$(gdbcore_h) $(regcache_h)
m2-lang.o: m2-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
@@ -1929,7 +1957,8 @@ m68klinux-nat.o: m68klinux-nat.c $(defs_h) $(frame_h) $(inferior_h) \
$(language_h) $(gdbcore_h) $(gdb_string_h) $(regcache_h) \
$(m68k_tdep_h) $(gdb_stat_h) $(floatformat_h) $(target_h)
m68klinux-tdep.o: m68klinux-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \
- $(target_h) $(gdb_string_h) $(gdbtypes_h) $(osabi_h) $(m68k_tdep_t)
+ $(target_h) $(gdb_string_h) $(gdbtypes_h) $(osabi_h) $(regcache_h) \
+ $(objfiles_h) $(symtab_h) $(m68k_tdep_t)
m68knbsd-nat.o: m68knbsd-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
$(regcache_h)
m68knbsd-tdep.o: m68knbsd-tdep.c $(defs_h) $(gdbtypes_h) $(regcache_h)
@@ -1956,7 +1985,7 @@ mcore-tdep.o: mcore-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(value_h) \
mdebugread.o: mdebugread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \
$(symfile_h) $(objfiles_h) $(gdb_obstack_h) $(buildsym_h) \
$(stabsread_h) $(complaints_h) $(demangle_h) $(gdb_assert_h) \
- $(block_h) \
+ $(block_h) $(dictionary_h) \
$(coff_sym_h) $(coff_symconst_h) $(gdb_stat_h) $(gdb_string_h) \
$(bfd_h) $(coff_ecoff_h) $(libaout_h) $(aout_aout64_h) \
$(aout_stab_gnu_h) $(expression_h) $(language_h) $(dictionary_h) \
@@ -1975,10 +2004,10 @@ mips-linux-tdep.o: mips-linux-tdep.c $(defs_h) $(gdbcore_h) $(target_h) \
mips-nat.o: mips-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(regcache_h)
mips-tdep.o: mips-tdep.c $(defs_h) $(gdb_string_h) $(gdb_assert_h) \
$(frame_h) $(inferior_h) $(symtab_h) $(value_h) $(gdbcmd_h) \
- $(language_h) $(gdbcore_h) $(symfile_h) $(objfiles_h) \
- $(gdbtypes_h) $(target_h) $(arch_utils_h) $(regcache_h) \
- $(osabi_h) $(mips_tdep_h) $(block_h) $(opcode_mips_h) \
- $(elf_mips_h) $(elf_bfd_h) $(symcat_h)
+ $(language_h) $(gdbcore_h) $(symfile_h) $(objfiles_h) $(gdbtypes_h) \
+ $(target_h) $(arch_utils_h) $(regcache_h) $(osabi_h) $(mips_tdep_h) \
+ $(block_h) $(reggroups_h) $(opcode_mips_h) $(elf_mips_h) \
+ $(elf_bfd_h) $(symcat_h)
mipsm3-nat.o: mipsm3-nat.c $(defs_h) $(inferior_h) $(regcache_h)
mipsnbsd-nat.o: mipsnbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
$(mipsnbsd_tdep_h)
@@ -1994,9 +2023,9 @@ mipsv4-nat.o: mipsv4-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \
mn10200-tdep.o: mn10200-tdep.c $(defs_h) $(frame_h) $(inferior_h) \
$(target_h) $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) \
$(symfile_h) $(regcache_h)
-mn10300-tdep.o: mn10300-tdep.c $(defs_h) $(frame_h) $(inferior_h) \
- $(target_h) $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) \
- $(symfile_h) $(regcache_h) $(arch_utils_h)
+mn10300-tdep.o: mn10300-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
+ $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) $(symfile_h) \
+ $(regcache_h) $(arch_utils_h) $(gdb_assert_h)
monitor.o: monitor.c $(defs_h) $(gdbcore_h) $(target_h) $(gdb_string_h) \
$(command_h) $(serial_h) $(monitor_h) $(gdbcmd_h) $(inferior_h) \
$(gdb_regex_h) $(srec_h) $(regcache_h)
@@ -2014,11 +2043,11 @@ objc-lang.o: objc-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
$(parser_defs_h) $(language_h) $(c_lang_h) $(objc_lang_h) \
$(complaints_h) $(value_h) $(symfile_h) $(objfiles_h) $(gdb_string_h) \
$(target_h) $(gdbcore_h) $(gdbcmd_h) $(frame_h) $(gdb_regex_h) \
- $(regcache_h) $(block_h) $(infcall_h) $(valprint_h)
+ $(regcache_h) $(block_h) $(infcall_h) $(valprint_h) $(gdb_assert_h)
objfiles.o: objfiles.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \
$(objfiles_h) $(gdb_stabs_h) $(target_h) $(bcache_h) $(gdb_stat_h) \
$(gdb_obstack_h) $(gdb_string_h) $(breakpoint_h) $(mmalloc_h) \
- $(dictionary_h) $(block_h)
+ $(block_h) $(dictionary_h)
observer.o: observer.c $(observer_h) $(defs_h)
ocd.o: ocd.c $(defs_h) $(gdbcore_h) $(gdb_string_h) $(frame_h) $(inferior_h) \
$(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) $(objfiles_h) \
@@ -2086,9 +2115,6 @@ regcache.o: regcache.c $(defs_h) $(inferior_h) $(target_h) $(gdbarch_h) \
$(gdb_string_h) $(gdbcmd_h)
reggroups.o: reggroups.c $(defs_h) $(reggroups_h) $(gdbtypes_h) \
$(gdb_assert_h) $(regcache_h) $(command_h) $(gdbcmd_h)
-remote-array.o: remote-array.c $(defs_h) $(gdbcore_h) $(target_h) \
- $(gdb_string_h) $(command_h) $(serial_h) $(monitor_h) \
- $(remote_utils_h) $(inferior_h) $(version_h) $(regcache_h)
remote-e7000.o: remote-e7000.c $(defs_h) $(gdbcore_h) $(gdbarch_h) \
$(inferior_h) $(target_h) $(value_h) $(command_h) $(gdb_string_h) \
$(gdbcmd_h) $(serial_h) $(remote_utils_h) $(symfile_h) $(regcache_h)
@@ -2144,7 +2170,10 @@ remote.o: remote.c $(defs_h) $(gdb_string_h) $(inferior_h) $(bfd_h) \
$(symfile_h) $(target_h) $(gdbcmd_h) $(objfiles_h) $(gdb_stabs_h) \
$(gdbthread_h) $(remote_h) $(regcache_h) $(value_h) $(gdb_assert_h) \
$(event_loop_h) $(event_top_h) $(inf_loop_h) $(serial_h) \
- $(gdbcore_h) $(solib_h)
+ $(gdbcore_h) $(solib_h) $(remote-fileio_h)
+remote-fileio.o: remote-fileio.c $(defs_h) $(gdb_string_h) $(gdbcmd_h) \
+ $(remote_h) $(gdb_fileio_h) $(gdb_wait_h) $(gdb_stat_h) \
+ $(remote_fileio_h)
rom68k-rom.o: rom68k-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
$(serial_h) $(regcache_h) $(value_h) $(m68k_tdep_h)
rs6000-nat.o: rs6000-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \
@@ -2255,8 +2284,9 @@ stabsread.o: stabsread.c $(defs_h) $(gdb_string_h) $(bfd_h) $(gdb_obstack_h) \
$(doublest_h) $(stabsread_h) $(cp_abi_h) $(cp_support_h)
stack.o: stack.c $(defs_h) $(gdb_string_h) $(value_h) $(symtab_h) \
$(gdbtypes_h) $(expression_h) $(language_h) $(frame_h) $(gdbcmd_h) \
- $(gdbcore_h) $(target_h) $(breakpoint_h) $(demangle_h) $(inferior_h) \
- $(annotate_h) $(ui_out_h) $(source_h) $(dictionary_h) $(block_h)
+ $(gdbcore_h) $(target_h) $(source_h) $(breakpoint_h) $(demangle_h) \
+ $(inferior_h) $(annotate_h) $(ui_out_h) $(block_h) $(stack_h) \
+ $(gdb_assert_h) $(dictionary_h)
standalone.o: standalone.c $(gdb_stat_h) $(defs_h) $(symtab_h) $(frame_h) \
$(inferior_h) $(gdb_wait_h)
std-regs.o: std-regs.c $(defs_h) $(builtin_regs_h) $(frame_h) $(gdbtypes_h) \
@@ -2305,10 +2335,12 @@ tracepoint.o: tracepoint.c $(defs_h) $(symtab_h) $(frame_h) $(gdbtypes_h) \
$(expression_h) $(gdbcmd_h) $(value_h) $(target_h) $(language_h) \
$(gdb_string_h) $(inferior_h) $(tracepoint_h) $(remote_h) \
$(linespec_h) $(regcache_h) $(completer_h) $(gdb_events_h) \
- $(block_h) $(ax_h) $(ax_gdb_h) $(readline_h)
+ $(block_h) $(ax_h) $(ax_gdb_h) $(readline_h) $(dictionary_h)
+trad-frame.o: trad-frame.c $(defs_h) $(frame_h) $(trad_frame_h) $(regcache_h)
typeprint.o: typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
$(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(command_h) \
- $(gdbcmd_h) $(target_h) $(language_h) $(cp_abi_h) $(gdb_string_h)
+ $(gdbcmd_h) $(target_h) $(language_h) $(cp_abi_h) $(typeprint_h) \
+ $(gdb_string_h)
ui-file.o: ui-file.c $(defs_h) $(ui_file_h) $(gdb_string_h)
ui-out.o: ui-out.c $(defs_h) $(gdb_string_h) $(expression_h) $(language_h) \
$(ui_out_h) $(gdb_assert_h)
@@ -2351,18 +2383,19 @@ win32-nat.o: win32-nat.c $(defs_h) $(tm_h) $(frame_h) $(inferior_h) \
$(gdb_string_h) $(gdbthread_h) $(gdbcmd_h)
wince-stub.o: wince-stub.c $(wince_stub_h)
wince.o: wince.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) $(gdbcore_h) \
- $(command_h) $(buildsym_h) $(symfile_h) $(objfiles_h) \
- $(gdb_string_h) $(gdbthread_h) $(gdbcmd_h) $(wince_stub_h) \
- $(regcache_h)
+ $(command_h) $(buildsym_h) $(symfile_h) $(objfiles_h) $(gdb_string_h) \
+ $(gdbthread_h) $(gdbcmd_h) $(wince_stub_h) $(regcache_h) $(mips_tdep_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) \
@@ -2387,7 +2420,7 @@ cli-cmds.o: $(srcdir)/cli/cli-cmds.c $(defs_h) $(completer_h) $(target_h) \
$(gdb_wait_h) $(gdb_regex_h) $(gdb_string_h) $(filenames_h) \
$(ui_out_h) $(top_h) $(cli_decode_h) $(cli_script_h) \
$(cli_setshow_h) $(cli_cmds_h) $(source_h) $(linespec_h) \
- $(expression_h) $(language_h) $(objfiles_h)
+ $(expression_h) $(language_h) $(objfiles_h) $(gdb_vfork_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-cmds.c
cli-decode.o: $(srcdir)/cli/cli-decode.c $(defs_h) $(symtab_h) \
$(gdb_regex_h) $(gdb_string_h) $(ui_out_h) $(cli_cmds_h) \
@@ -2497,9 +2530,10 @@ gdbtk-bp.o: $(srcdir)/gdbtk/generic/gdbtk-bp.c \
gdbtk-cmds.o: $(srcdir)/gdbtk/generic/gdbtk-cmds.c \
$(srcdir)/gdbtk/generic/gdbtk.h $(srcdir)/gdbtk/generic/gdbtk-cmds.h \
- $(defs_h) $(symtab_h) $(inferior_h) \
- $(command_h) $(bfd_h) $(top_h) $(symfile_h) $(objfiles_h) $(target_h) \
- $(gdb_string_h) $(tracepoint_h) $(source_h) $(regcache_h)
+ $(defs_h) $(inferior_h) $(source_h) $(symfile_h) $(objfiles_h) \
+ $(gdbcore_h) $(demangle_h) $(linespec_h) $(tui_file_h) $(top_h) \
+ $(annotate_h) $(block_h) $(dictionary_h) $(gdb_string_h) \
+ $(dis_asm_h) $(gdbcmd_h)
$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
$(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \
$(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-cmds.c \
@@ -2540,8 +2574,8 @@ gdbtk-register.o: $(srcdir)/gdbtk/generic/gdbtk-register.c \
gdbtk-stack.o: $(srcdir)/gdbtk/generic/gdbtk-stack.c \
$(srcdir)/gdbtk/generic/gdbtk.h $(srcdir)/gdbtk/generic/gdbtk-cmds.h \
$(srcdir)/gdbtk/generic/gdbtk-wrapper.h \
- $(defs_h) $(frame_h) $(value_h) $(target_h) $(breakpoint_h) \
- $(linespec_h)
+ $(defs_h) $(target_h) $(breakpoint_h) $(linespec_h) \
+ $(block_h) $(dictionary_h)
$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
$(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \
$(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-stack.c \
@@ -2582,8 +2616,8 @@ mi-cmd-env.o: $(srcdir)/mi/mi-cmd-env.c $(defs_h) $(inferior_h) $(value_h) \
$(environ_h) $(command_h) $(ui_out_h) $(top_h) $(gdb_string_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-env.c
mi-cmd-stack.o: $(srcdir)/mi/mi-cmd-stack.c $(defs_h) $(target_h) $(frame_h) \
- $(value_h) $(mi_cmds_h) $(ui_out_h) $(symtab_h) $(dictionary_h) \
- $(block_h)
+ $(value_h) $(mi_cmds_h) $(ui_out_h) $(symtab_h) $(block_h) $(stack_h) \
+ $(dictionary_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-stack.c
mi-cmd-var.o: $(srcdir)/mi/mi-cmd-var.c $(defs_h) $(mi_cmds_h) $(ui_out_h) \
$(mi_out_h) $(varobj_h) $(value_h) $(gdb_string_h)
@@ -2681,7 +2715,7 @@ tuiDataWin.o: $(srcdir)/tui/tuiDataWin.c $(config_h) $(defs_h) $(tui_h) \
tuiDisassem.o: $(srcdir)/tui/tuiDisassem.c $(config_h) $(defs_h) $(symtab_h) \
$(breakpoint_h) $(frame_h) $(value_h) $(tui_h) $(tuiData_h) \
$(tuiWin_h) $(tuiLayout_h) $(tuiSourceWin_h) $(tuiStack_h) \
- $(tui_file_h)
+ $(tui_file_h) $(disasm_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tuiDisassem.c
tuiGeneralWin.o: $(srcdir)/tui/tuiGeneralWin.c $(config_h) $(defs_h) \
$(tui_h) $(tuiData_h) $(tuiGeneralWin_h) $(tuiWin_h)
diff --git a/gdb/NEWS b/gdb/NEWS
index 98aab4fe1e8..604f085cc9d 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -1,7 +1,16 @@
What has changed in GDB?
(Organized release by release)
-*** Changes since GDB 5.3:
+*** Changes since GDB 6.0:
+
+
+*** Changes in GDB 6.0:
+
+* The meaning of "detach" has changed for gdbserver
+
+The "detach" command will now resume the application, as documented. To
+disconnect from gdbserver and leave it stopped, use the new "disconnect"
+command.
* d10v `regs' command deprecated
diff --git a/gdb/PROBLEMS b/gdb/PROBLEMS
index 85112637828..74806333035 100644
--- a/gdb/PROBLEMS
+++ b/gdb/PROBLEMS
@@ -1,80 +1,21 @@
- Known problems in GDB 5.3
+ Known problems in GDB 6.0
See also: http://www.gnu.org/software/gdb/bugs/
-
-*-*-freebsd*
----------------
-
-Due to a kernel bug (kern/35175), detaching from an attached process
-will very likely cause the process to be stop or die with a Trace/BPT
-trap.
-
-
-i386-*-freebsd[34]*
--------------------
-
-There is a bug (bin/41671) in FreeBSD's gcc that causes it to emit bad
-debug information when using the stabs format (which is the default).
-As a result GDB tends to place breakpoints on functions before the
-function prologue, and information about function parameters and local
-variables is lost. In earlier versions of GDB the effects were rather
-limited, but starting with GDB 5.3 the influence is much more
-prominent. As a workaround, compile your code with -gdwarf-2.
-
-
-hppa2.0-hp-hpux10.20
---------------------
-
-gdb/487: The top level make files used to build GDB are not compatible
-with HP/UX make. As a workaround, use GNU make.
-
-gdb/486: The HP/UX C compiler defaults to K&R mode but GDB only builds
-with an ISO C compiler. The top level configuration incorrectly sets
-CC to `cc' instead of `cc -Ae'. As a workaround, the correct compiler
-can be specified as part of the configuration vis:
-
- $ 'CC=cc -Ae' ./configure
-
-
-s390*-*-*
----------
-
-gdb/513: GDB does not build on s390 GNU/Linux. The problem should be
-fixed in more recent sources.
-
-
-i386-*-freebsd4.4*
-------------------
-
-gdb/455: GDB doesn't build on a FreeBSD 4.4-STABLE system. The
-problem is still being investigated.
-
-alpha*-*-osf*
--------------
-
-gdb/816: When building GDB with GCC 3.0.1, GDB is unable to load a core
-file properly. It generates several errors and warnings regarding
-unhandled core file section types, incorrect endianness, the failure to
-load the registers. Are also incorrectly reported: The program name, the
-cause of the program death, and the call stack at the moment of the
-death. This problem has been reported on alpha-osf4.0f and alpha-osf5.1a.
-To work-around the problem, add -D__digital__ to the CFLAGS when
-building GDB vis:
-
- $ make CFLAGS='-O2 -D__digital__'
-
-
-i[3456]86-*-linux*
-------------------
-
-gdb/660: gdb does not build with GNU/Linux libc5. The symptom is a
-parse error before `uintptr_t' or an error message about `uintptr_t'.
-Upgrade to glibc 2.1.3 or later, which defines uintptr_t.
-
-gdb/1030: GNU binutils 2.12.1 and earlier versions do not work properly
-with gdb. If you use GNU binutils, upgrade to version 2.13 or later.
-You can check the version of binutils with the command:
-
- $ ld --version
+gdb/1091: Constructor breakpoints ignored
+gdb/1193: g++ 3.3 creates multiple constructors: gdb 5.3 can't set breakpoints
+
+When gcc 3.x compiles a C++ constructor or C++ destructor, it generates
+2 or 3 different versions of the object code. These versions have
+unique mangled names (they have to, in order for linking to work), but
+they have identical source code names, which leads to a great deal of
+confusion. Specifically, if you set a breakpoint in a constructor or a
+destructor, gdb will put a breakpoint in one of the versions, but your
+program may execute the other version. This makes it impossible to set
+breakpoints reliably in constructors or destructors.
+
+gcc 3.x generates these multiple object code functions in order to
+implement virtual base classes. gcc 2.x generated just one object code
+function with a hidden parameter, but gcc 3.x conforms to a multi-vendor
+ABI for C++ which requires multiple object code functions.
diff --git a/gdb/README b/gdb/README
index a8b4b82f3ef..bae1a2e37b9 100644
--- a/gdb/README
+++ b/gdb/README
@@ -1,5 +1,5 @@
- README for gdb-5.3 release
- Updated 5th September, 2002 by Andrew Cagney
+ README for gdb-6.0 release
+ Updated 23th June, 2003 by Andrew Cagney
This is GDB, the GNU source-level debugger.
@@ -20,7 +20,7 @@ Unpacking and Installation -- quick overview
In this release, the GDB debugger sources, the generic GNU include
files, the BFD ("binary file description") library, the readline
library, and other libraries all have directories of their own
-underneath the gdb-5.3 directory. The idea is that a variety of GNU
+underneath the gdb-6.0 directory. The idea is that a variety of GNU
tools can share a common copy of these things. Be aware of variation
over time--for example don't try to build gdb with a copy of bfd from
a release other than the gdb release (such as a binutils release),
@@ -29,8 +29,8 @@ Configuration scripts and makefiles exist to cruise up and down this
directory tree and automatically build all the pieces in the right
order.
- When you unpack the gdb-5.3.tar.gz file, you'll find a directory
-called `gdb-5.3', which contains:
+ When you unpack the gdb-6.0.tar.gz file, you'll find a directory
+called `gdb-6.0', which contains:
COPYING config.sub intl missing opcodes
COPYING.LIB configure libiberty mkinstalldirs readline
@@ -44,7 +44,7 @@ called `gdb-5.3', which contains:
You can build GDB right in the source directory:
- cd gdb-5.3
+ cd gdb-6.0
./configure
make
cp gdb/gdb /usr/local/bin/gdb (or wherever you want)
@@ -58,25 +58,25 @@ You can build GDB in any empty build directory:
mkdir build
cd build
- <full path to your sources>/gdb-5.3/configure
+ <full path to your sources>/gdb-6.0/configure
make
cp gdb/gdb /usr/local/bin/gdb (or wherever you want)
(Building GDB with DJGPP tools for MS-DOS/MS-Windows is slightly
-different; see the file gdb-5.3/gdb/config/djgpp/README for details.)
+different; see the file gdb-6.0/gdb/config/djgpp/README for details.)
This will configure and build all the libraries as well as GDB. If
`configure' can't determine your system type, specify one as its
argument, e.g., `./configure sun4' or `./configure decstation'.
- Make sure that your 'configure' line ends in 'gdb-5.3/configure':
+ Make sure that your 'configure' line ends in 'gdb-6.0/configure':
- /berman/migchain/source/gdb-5.3/configure # RIGHT
- /berman/migchain/source/gdb-5.3/gdb/configure # WRONG
+ /berman/migchain/source/gdb-6.0/configure # RIGHT
+ /berman/migchain/source/gdb-6.0/gdb/configure # WRONG
The gdb package contains several subdirectories, such as 'gdb',
'bfd', and 'readline'. If your 'configure' line ends in
-'gdb-5.3/gdb/configure', then you are configuring only the gdb
+'gdb-6.0/gdb/configure', then you are configuring only the gdb
subdirectory, not the whole gdb package. This leads to build errors
such as:
@@ -107,7 +107,7 @@ documentation and TeX (or `texi2roff') to typeset the printed version.
GDB includes an already formatted copy of the on-line Info version
of this manual in the `gdb/doc' subdirectory. The main Info file is
-`gdb-5.3/gdb/doc/gdb.info', and it refers to subordinate files
+`gdb-6.0/gdb/doc/gdb.info', and it refers to subordinate files
matching `gdb.info*' in the same directory. If necessary, you can
print out these files, or read them with any editor; but they are
easier to read using the `info' subsystem in GNU Emacs or the
@@ -119,7 +119,7 @@ Info formatting programs, such as `texinfo-format-buffer' or
`makeinfo'.
If you have `makeinfo' installed, and are in the top level GDB
-source directory (`gdb-5.3', in the case of version 5.3), you can make
+source directory (`gdb-6.0', in the case of version 6.0), you can make
the Info file by typing:
cd gdb/doc
@@ -128,7 +128,7 @@ the Info file by typing:
If you want to typeset and print copies of this manual, you need
TeX, a program to print its DVI output files, and `texinfo.tex', the
Texinfo definitions file. This file is included in the GDB
-distribution, in the directory `gdb-5.3/texinfo'.
+distribution, in the directory `gdb-6.0/texinfo'.
TeX is a typesetting program; it does not print files directly, but
produces output files called DVI files. To print a typeset document,
@@ -142,11 +142,11 @@ without any extension or a `.dvi' extension.
This file tells TeX how to typeset a document written in Texinfo
format. On its own, TeX cannot read, much less typeset a Texinfo file.
`texinfo.tex' is distributed with GDB and is located in the
-`gdb-5.3/texinfo' directory.
+`gdb-6.0/texinfo' directory.
If you have TeX and a DVI printer program installed, you can typeset
and print this manual. First switch to the the `gdb' subdirectory of
-the main source directory (for example, to `gdb-5.3/gdb') and then type:
+the main source directory (for example, to `gdb-6.0/gdb') and then type:
make doc/gdb.dvi
@@ -169,55 +169,55 @@ preparing GDB for installation; you can then use `make' to build the
a single directory, whose name is usually composed by appending the
version number to `gdb'.
- For example, the GDB version 5.3 distribution is in the `gdb-5.3'
+ For example, the GDB version 6.0 distribution is in the `gdb-6.0'
directory. That directory contains:
-`gdb-5.3/{COPYING,COPYING.LIB}'
+`gdb-6.0/{COPYING,COPYING.LIB}'
Standard GNU license files. Please read them.
-`gdb-5.3/bfd'
+`gdb-6.0/bfd'
source for the Binary File Descriptor library
-`gdb-5.3/config*'
+`gdb-6.0/config*'
script for configuring GDB, along with other support files
-`gdb-5.3/gdb'
+`gdb-6.0/gdb'
the source specific to GDB itself
-`gdb-5.3/include'
+`gdb-6.0/include'
GNU include files
-`gdb-5.3/libiberty'
+`gdb-6.0/libiberty'
source for the `-liberty' free software library
-`gdb-5.3/mmalloc'
+`gdb-6.0/mmalloc'
source for the GNU memory-mapped malloc package
-`gdb-5.3/opcodes'
+`gdb-6.0/opcodes'
source for the library of opcode tables and disassemblers
-`gdb-5.3/readline'
+`gdb-6.0/readline'
source for the GNU command-line interface
NOTE: The readline library is compiled for use by GDB, but will
not be installed on your system when "make install" is issued.
-`gdb-5.3/sim'
+`gdb-6.0/sim'
source for some simulators (ARM, D10V, SPARC, M32R, MIPS, PPC, V850, etc)
-`gdb-5.3/intl'
+`gdb-6.0/intl'
source for the GNU gettext library, for internationalization.
This is slightly modified from the standalone gettext
distribution you can get from GNU.
-`gdb-5.3/texinfo'
+`gdb-6.0/texinfo'
The `texinfo.tex' file, which you need in order to make a printed
manual using TeX.
-`gdb-5.3/etc'
+`gdb-6.0/etc'
Coding standards, useful files for editing GDB, and other
miscellanea.
-`gdb-5.3/utils'
+`gdb-6.0/utils'
A grab bag of random utilities.
Note: the following instructions are for building GDB on Unix or
@@ -226,14 +226,14 @@ MS-DOS/MS-Windows are in the file gdb/config/djgpp/README.
The simplest way to configure and build GDB is to run `configure'
from the `gdb-VERSION-NUMBER' source directory, which in this example
-is the `gdb-5.3' directory.
+is the `gdb-6.0' directory.
First switch to the `gdb-VERSION-NUMBER' source directory if you are
not already in it; then run `configure'.
For example:
- cd gdb-5.3
+ cd gdb-6.0
./configure
make
@@ -249,8 +249,8 @@ you may need to run `sh' on it explicitly:
sh configure
If you run `configure' from a directory that contains source
-directories for multiple libraries or programs, such as the `gdb-5.3'
-source directory for version 5.3, `configure' creates configuration
+directories for multiple libraries or programs, such as the `gdb-6.0'
+source directory for version 6.0, `configure' creates configuration
files for every directory level underneath (unless you tell it not to,
with the `--norecursion' option).
@@ -258,10 +258,10 @@ with the `--norecursion' option).
directories in the GDB distribution, if you only want to configure that
subdirectory; but be sure to specify a path to it.
- For example, with version 5.3, type the following to configure only
+ For example, with version 6.0, type the following to configure only
the `bfd' subdirectory:
- cd gdb-5.3/bfd
+ cd gdb-6.0/bfd
../configure
You can install `gdb' anywhere; it has no hardwired paths. However,
@@ -290,13 +290,13 @@ directory. If the path to `configure' would be the same as the
argument to `--srcdir', you can leave out the `--srcdir' option; it
will be assumed.)
- For example, with version 5.3, you can build GDB in a separate
+ For example, with version 6.0, you can build GDB in a separate
directory for a Sun 4 like this:
- cd gdb-5.3
+ cd gdb-6.0
mkdir ../gdb-sun4
cd ../gdb-sun4
- ../gdb-5.3/configure
+ ../gdb-6.0/configure
make
When `configure' builds a configuration using a remote source
@@ -317,8 +317,8 @@ called `configure' (or one of its subdirectories).
The `Makefile' that `configure' generates in each source directory
also runs recursively. If you type `make' in a source directory such
-as `gdb-5.3' (or in a separate configured directory configured with
-`--srcdir=PATH/gdb-5.3'), you will build all the required libraries,
+as `gdb-6.0' (or in a separate configured directory configured with
+`--srcdir=PATH/gdb-6.0'), you will build all the required libraries,
and then build GDB.
When you have multiple hosts or targets configured in separate
@@ -361,7 +361,7 @@ you can use it to test your guesses on abbreviations--for example:
Invalid configuration `i786v': machine `i786v' not recognized
`config.sub' is also distributed in the GDB source directory
-(`gdb-5.3', for version 5.3).
+(`gdb-6.0', for version 6.0).
`configure' options
@@ -462,7 +462,6 @@ Linux.
There are a number of remote interfaces for talking to existing ROM
monitors and other hardware:
- remote-array.c Array Tech RAID controller
remote-e7000.c Hitachi E7000 ICE
remote-est.c EST emulator
remote-hms.c Hitachi Micro Systems H8/300 monitor
@@ -492,7 +491,7 @@ As an alternative, the bug report can be submitted, via e-mail, to the
address "bug-gdb@gnu.org".
When submitting a bug, please include the GDB version number (e.g.,
-gdb-5.3), and how you configured it (e.g., "sun4" or "mach386 host,
+gdb-6.0), and how you configured it (e.g., "sun4" or "mach386 host,
i586-intel-synopsys target"). Since GDB now supports so many
different configurations, it is important that you be precise about
this. If at all possible, you should include the actual banner that
@@ -547,17 +546,17 @@ ftp://sources.redhat.com/pub/dejagnu/ will contain a recent snapshot.
Once DejaGNU is installed, you can run the tests in one of the
following ways:
- (1) cd gdb-5.3
+ (1) cd gdb-6.0
make check-gdb
or
- (2) cd gdb-5.3/gdb
+ (2) cd gdb-6.0/gdb
make check
or
- (3) cd gdb-5.3/gdb/testsuite
+ (3) cd gdb-6.0/gdb/testsuite
make site.exp (builds the site specific file)
runtest -tool gdb GDB=../gdb (or GDB=<somepath> as appropriate)
diff --git a/gdb/abug-rom.c b/gdb/abug-rom.c
index d3a9c2e82df..543f70213f4 100644
--- a/gdb/abug-rom.c
+++ b/gdb/abug-rom.c
@@ -164,6 +164,8 @@ abug_open (char *args, int from_tty)
monitor_open (args, &abug_cmds, from_tty);
}
+extern initialize_file_ftype _initialize_abug_rom; /* -Wmissing-prototypes */
+
void
_initialize_abug_rom (void)
{
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/acinclude.m4 b/gdb/acinclude.m4
index d3c00aeca26..a85ce024f2f 100644
--- a/gdb/acinclude.m4
+++ b/gdb/acinclude.m4
@@ -943,3 +943,56 @@ AC_DEFUN([AC_DEFINE_DIR], [
AC_DEFINE_UNQUOTED($1, "$ac_define_dir", $3))
])
+dnl See whether we need a declaration for a function.
+dnl The result is highly dependent on the INCLUDES passed in, so make sure
+dnl to use a different cache variable name in this macro if it is invoked
+dnl in a different context somewhere else.
+dnl gcc_AC_CHECK_DECL(SYMBOL,
+dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, INCLUDES]]])
+AC_DEFUN(gcc_AC_CHECK_DECL,
+[AC_MSG_CHECKING([whether $1 is declared])
+AC_CACHE_VAL(gcc_cv_have_decl_$1,
+[AC_TRY_COMPILE([$4],
+[#ifndef $1
+char *(*pfn) = (char *(*)) $1 ;
+#endif], eval "gcc_cv_have_decl_$1=yes", eval "gcc_cv_have_decl_$1=no")])
+if eval "test \"`echo '$gcc_cv_have_decl_'$1`\" = yes"; then
+ AC_MSG_RESULT(yes) ; ifelse([$2], , :, [$2])
+else
+ AC_MSG_RESULT(no) ; ifelse([$3], , :, [$3])
+fi
+])dnl
+
+dnl Check multiple functions to see whether each needs a declaration.
+dnl Arrange to define HAVE_DECL_<FUNCTION> to 0 or 1 as appropriate.
+dnl gcc_AC_CHECK_DECLS(SYMBOLS,
+dnl [ACTION-IF-NEEDED [, ACTION-IF-NOT-NEEDED [, INCLUDES]]])
+AC_DEFUN(gcc_AC_CHECK_DECLS,
+[for ac_func in $1
+do
+changequote(, )dnl
+ ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+changequote([, ])dnl
+gcc_AC_CHECK_DECL($ac_func,
+ [AC_DEFINE_UNQUOTED($ac_tr_decl, 1) $2],
+ [AC_DEFINE_UNQUOTED($ac_tr_decl, 0) $3],
+dnl It is possible that the include files passed in here are local headers
+dnl which supply a backup declaration for the relevant prototype based on
+dnl the definition of (or lack of) the HAVE_DECL_ macro. If so, this test
+dnl will always return success. E.g. see libiberty.h's handling of
+dnl `basename'. To avoid this, we define the relevant HAVE_DECL_ macro to
+dnl 1 so that any local headers used do not provide their own prototype
+dnl during this test.
+#undef $ac_tr_decl
+#define $ac_tr_decl 1
+ $4
+)
+done
+dnl Automatically generate config.h entries via autoheader.
+if test x = y ; then
+ patsubst(translit([$1], [a-z], [A-Z]), [\w+],
+ [AC_DEFINE([HAVE_DECL_\&], 1,
+ [Define to 1 if we found this declaration otherwise define to 0.])])dnl
+fi
+])
+
diff --git a/gdb/aclocal.m4 b/gdb/aclocal.m4
index 51e94f29ee4..40399a65d09 100644
--- a/gdb/aclocal.m4
+++ b/gdb/aclocal.m4
@@ -951,6 +951,59 @@ AC_DEFUN([AC_DEFINE_DIR], [
AC_DEFINE_UNQUOTED($1, "$ac_define_dir", $3))
])
+dnl See whether we need a declaration for a function.
+dnl The result is highly dependent on the INCLUDES passed in, so make sure
+dnl to use a different cache variable name in this macro if it is invoked
+dnl in a different context somewhere else.
+dnl gcc_AC_CHECK_DECL(SYMBOL,
+dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, INCLUDES]]])
+AC_DEFUN(gcc_AC_CHECK_DECL,
+[AC_MSG_CHECKING([whether $1 is declared])
+AC_CACHE_VAL(gcc_cv_have_decl_$1,
+[AC_TRY_COMPILE([$4],
+[#ifndef $1
+char *(*pfn) = (char *(*)) $1 ;
+#endif], eval "gcc_cv_have_decl_$1=yes", eval "gcc_cv_have_decl_$1=no")])
+if eval "test \"`echo '$gcc_cv_have_decl_'$1`\" = yes"; then
+ AC_MSG_RESULT(yes) ; ifelse([$2], , :, [$2])
+else
+ AC_MSG_RESULT(no) ; ifelse([$3], , :, [$3])
+fi
+])dnl
+
+dnl Check multiple functions to see whether each needs a declaration.
+dnl Arrange to define HAVE_DECL_<FUNCTION> to 0 or 1 as appropriate.
+dnl gcc_AC_CHECK_DECLS(SYMBOLS,
+dnl [ACTION-IF-NEEDED [, ACTION-IF-NOT-NEEDED [, INCLUDES]]])
+AC_DEFUN(gcc_AC_CHECK_DECLS,
+[for ac_func in $1
+do
+changequote(, )dnl
+ ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+changequote([, ])dnl
+gcc_AC_CHECK_DECL($ac_func,
+ [AC_DEFINE_UNQUOTED($ac_tr_decl, 1) $2],
+ [AC_DEFINE_UNQUOTED($ac_tr_decl, 0) $3],
+dnl It is possible that the include files passed in here are local headers
+dnl which supply a backup declaration for the relevant prototype based on
+dnl the definition of (or lack of) the HAVE_DECL_ macro. If so, this test
+dnl will always return success. E.g. see libiberty.h's handling of
+dnl `basename'. To avoid this, we define the relevant HAVE_DECL_ macro to
+dnl 1 so that any local headers used do not provide their own prototype
+dnl during this test.
+#undef $ac_tr_decl
+#define $ac_tr_decl 1
+ $4
+)
+done
+dnl Automatically generate config.h entries via autoheader.
+if test x = y ; then
+ patsubst(translit([$1], [a-z], [A-Z]), [\w+],
+ [AC_DEFINE([HAVE_DECL_\&], 1,
+ [Define to 1 if we found this declaration otherwise define to 0.])])dnl
+fi
+])
+
# Add --enable-maintainer-mode option to configure.
# From Jim Meyering
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 5c1e9068a29..e691b2cafee 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -41,6 +41,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "ui-out.h"
#include "block.h"
#include "infcall.h"
+#include "dictionary.h"
struct cleanup *unresolved_names;
@@ -3186,7 +3187,6 @@ static struct symbol *
standard_lookup (const char *name, domain_enum domain)
{
struct symbol *sym;
-
sym = lookup_symbol (name, (struct block *) NULL, domain, 0, NULL);
return sym;
}
@@ -3439,8 +3439,8 @@ symtab_for_sym (struct symbol *sym)
struct objfile *objfile;
struct block *b;
struct symbol *tmp_sym;
- int j;
struct dict_iterator iter;
+ int j;
ALL_SYMTABS (objfile, s)
{
@@ -3454,13 +3454,11 @@ symtab_for_sym (struct symbol *sym)
case LOC_BLOCK:
case LOC_CONST_BYTES:
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK);
- ALL_BLOCK_SYMBOLS (b, iter, tmp_sym)
- if (sym == tmp_sym)
- return s;
+ ALL_BLOCK_SYMBOLS (b, iter, tmp_sym) if (sym == tmp_sym)
+ return s;
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK);
- ALL_BLOCK_SYMBOLS (b, iter, tmp_sym)
- if (sym == tmp_sym)
- return s;
+ ALL_BLOCK_SYMBOLS (b, iter, tmp_sym) if (sym == tmp_sym)
+ return s;
break;
default:
break;
@@ -3483,9 +3481,8 @@ symtab_for_sym (struct symbol *sym)
j < BLOCKVECTOR_NBLOCKS (BLOCKVECTOR (s)); j += 1)
{
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), j);
- ALL_BLOCK_SYMBOLS (b, iter, tmp_sym)
- if (sym == tmp_sym)
- return s;
+ ALL_BLOCK_SYMBOLS (b, iter, tmp_sym) if (sym == tmp_sym)
+ return s;
}
break;
default:
@@ -3567,7 +3564,7 @@ add_symbols_from_enclosing_procs (const char *name, domain_enum domain,
QUIT;
frame = get_prev_frame (frame);
}
- while (frame != NULL && FRAME_LOCALS_ADDRESS (frame) != target_link);
+ while (frame != NULL && DEPRECATED_FRAME_LOCALS_ADDRESS (frame) != target_link);
if (frame == NULL)
break;
@@ -4717,8 +4714,6 @@ debug_print_block (struct block *b)
fprintf (stderr, "\t Symbols:");
ALL_BLOCK_SYMBOLS (b, iter, sym)
{
- if (i > 0 && i % 4 == 0)
- fprintf (stderr, "\n\t\t ");
fprintf (stderr, " %s", DEPRECATED_SYMBOL_NAME (sym));
}
fprintf (stderr, "\n");
@@ -7718,7 +7713,7 @@ ada_vax_float_print_function (struct type *type)
not alter *PX and *PNEW_K if unsuccessful. */
static int
-scan_discrim_bound (char *, int k, struct value *dval, LONGEST * px,
+scan_discrim_bound (char *str, int k, struct value *dval, LONGEST * px,
int *pnew_k)
{
static char *bound_buffer = NULL;
diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h
index ae863bd0557..54e56bb0529 100644
--- a/gdb/ada-lang.h
+++ b/gdb/ada-lang.h
@@ -27,9 +27,9 @@ struct partial_symbol;
struct block;
-/* A macro to reorder the bytes of an address depending on the endiannes
- of the target */
-#define EXTRACT_ADDRESS(x) ((void *) extract_address (&(x), sizeof (x)))
+/* A macro to reorder the bytes of an address depending on the
+ endiannes of the target. */
+#define EXTRACT_ADDRESS(x) ((void *) extract_unsigned_integer (&(x), sizeof (x)))
/* A macro to reorder the bytes of an int depending on the endiannes
of the target */
#define EXTRACT_INT(x) ((int) extract_signed_integer (&(x), sizeof (x)))
diff --git a/gdb/ada-lex.l b/gdb/ada-lex.l
index 2252d526a52..d8bc78952bf 100644
--- a/gdb/ada-lex.l
+++ b/gdb/ada-lex.l
@@ -627,7 +627,7 @@ block_lookup (name, err_name)
int nsyms;
struct symtab *symtab;
nsyms = ada_lookup_symbol_list (name, left_block_context,
- VAR_NAMESPACE, &syms, &blocks);
+ VAR_DOMAIN, &syms, &blocks);
if (left_block_context == NULL &&
(nsyms == 0 || SYMBOL_CLASS (syms[0]) != LOC_BLOCK))
symtab = lookup_symtab (name);
@@ -652,7 +652,7 @@ block_lookup (name, err_name)
}
}
-/* Look up NAME0 (assumed to be mangled) as a name in VAR_NAMESPACE,
+/* Look up NAME0 (assumed to be mangled) as a name in VAR_DOMAIN,
setting *TOKEN_TYPE to NAME or TYPENAME, depending on what is
found. Try first the entire name, then the name without the last
segment (i.e., after the last .id), etc., and return the number of
@@ -685,10 +685,10 @@ name_lookup (name0, err_name, token_type)
if (left_block_context == NULL)
nsyms = ada_lookup_symbol_list (name, expression_context_block,
- VAR_NAMESPACE, &syms, &blocks);
+ VAR_DOMAIN, &syms, &blocks);
else
nsyms = ada_lookup_symbol_list (name, left_block_context,
- VAR_NAMESPACE, &syms, &blocks);
+ VAR_DOMAIN, &syms, &blocks);
/* Check for a type definition. */
diff --git a/gdb/ada-tasks.c b/gdb/ada-tasks.c
index 5125637fc18..0cf4d832532 100644
--- a/gdb/ada-tasks.c
+++ b/gdb/ada-tasks.c
@@ -4,7 +4,7 @@
.
This file is part of GDB.
- [$Id: ada-tasks.c,v 1.5 2002/09/08 17:43:40 aidan Exp $]
+ [$Id$]
Authors: Roch-Alexandre Nomine Beguin, Arnaud Charlet <charlet@gnat.com>
This program is free software; you can redistribute it and/or modify
@@ -22,6 +22,7 @@
#include "inferior.h"
#include "symtab.h"
#include "target.h"
+#include "regcache.h"
#include "gdbcore.h"
#if (defined(__alpha__) && defined(__osf__) && !defined(__alpha_vxworks))
@@ -90,8 +91,6 @@ extern void *GET_CURRENT_THREAD ();
#define READ_MEMORY(addr, var) read_memory (addr, (char*) &var, sizeof (var))
/* external declarations */
-extern struct value *find_function_in_inferior (char *);
-
/* Global visible variables */
struct task_entry *task_list = NULL;
diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c
index 11c42bf9e67..f5f411898b2 100644
--- a/gdb/ada-valprint.c
+++ b/gdb/ada-valprint.c
@@ -742,9 +742,11 @@ ada_val_print_1 (struct type *type, char *valaddr0, int embedded_offset,
if (addressprint)
{
fprintf_filtered (stream, "@");
+ /* Extract an address, assume that the address is unsigned. */
print_address_numeric
- (extract_address (valaddr,
- TARGET_PTR_BIT / HOST_CHAR_BIT), 1, stream);
+ (extract_unsigned_integer (valaddr,
+ TARGET_PTR_BIT / HOST_CHAR_BIT),
+ 1, stream);
if (deref_ref)
fputs_filtered (": ", stream);
}
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..9eb9c62c7da
--- /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 | |
+ | | | --- |-------------------------------|<-- 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..fb2ca1851b5 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,242 @@ 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);
- if (tdep->sigcontext_addr)
- return (tdep->sigcontext_addr (fi));
+/* Is REGNUM a member of REGGROUP? */
- 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;
+ ULONGEST reg, mem;
- /* 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;
+ 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, struct type *type)
{
- 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 (struct frame_info *frame, int regnum,
+ struct type *valtype, void *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)
- {
- /* 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
+ char in[MAX_REGISTER_SIZE];
+ frame_register_read (frame, regnum, in);
+ switch (TYPE_LENGTH (valtype))
{
- 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 frame_info *frame, int regnum,
+ struct type *valtype, const void *in)
{
- /* 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)
+ char out[MAX_REGISTER_SIZE];
+ 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");
}
+ put_frame_register (frame, regnum, out);
}
-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 +303,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 +379,268 @@ 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;
- alpha_extra_func_info_t proc_desc = get_frame_extra_info (frame)->proc_desc;
+ case 8:
+ regcache_cooked_read (regcache, ALPHA_FP0_REGNUM, valbuf);
+ 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 16:
+ regcache_cooked_read_unsigned (regcache, ALPHA_V0_REGNUM, &l);
+ read_memory (l, valbuf, 16);
+ 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... */
+ default:
+ internal_error (__FILE__, __LINE__, "unknown floating point width");
+ }
+ 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 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;
+
+ case 16:
+ regcache_cooked_read (regcache, ALPHA_FP0_REGNUM, valbuf);
+ regcache_cooked_read (regcache, ALPHA_FP0_REGNUM+1,
+ (char *)valbuf + 8);
+ break;
+
+ 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.");
+
+ default:
+ internal_error (__FILE__, __LINE__, "unknown floating point width");
+ }
+ break;
- xfree (pi_ptr);
+ 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 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 +661,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 +673,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 +684,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 +699,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 +1234,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 +1364,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 +1427,8 @@ alpha_next_pc (CORE_ADDR pc)
if (rav >= 0)
goto branch_taken;
break;
+
+ /* ??? Missing floating-point branches. */
}
}
@@ -1753,7 +1460,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 +1489,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 +1511,48 @@ 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_deprecated_register_byte (gdbarch, alpha_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, alpha_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, alpha_register_virtual_size);
+ 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);
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
+ /* Disassembler. */
+ set_gdbarch_print_insn (gdbarch, print_insn_alpha);
+
+ /* Call info. */
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_use_struct_convention (gdbarch, always_use_struct_convention);
+ 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);
+
+ /* 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,37 +1572,30 @@ 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);
}
+extern initialize_file_ftype _initialize_alpha_tdep; /* -Wmissing-prototypes */
+
void
_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/arch-utils.c b/gdb/arch-utils.c
index 48f7f7ebe05..043600e9848 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -73,6 +73,13 @@ legacy_store_return_value (struct type *type, struct regcache *regcache,
int
+always_use_struct_convention (int gcc_p, struct type *value_type)
+{
+ return 1;
+}
+
+
+int
legacy_register_sim_regno (int regnum)
{
/* Only makes sense to supply raw registers. */
@@ -232,14 +239,7 @@ default_double_format (struct gdbarch *gdbarch)
/* Misc helper functions for targets. */
int
-frame_num_args_unknown (struct frame_info *fi)
-{
- return -1;
-}
-
-
-int
-generic_register_convertible_not (int num)
+deprecated_register_convertible_not (int num)
{
return 0;
}
@@ -272,66 +272,6 @@ no_op_reg_to_regnum (int reg)
return reg;
}
-/* Default prepare_to_procced(). */
-int
-default_prepare_to_proceed (int select_it)
-{
- return 0;
-}
-
-/* Generic prepare_to_proceed(). This one should be suitable for most
- targets that support threads. */
-int
-generic_prepare_to_proceed (int select_it)
-{
- ptid_t wait_ptid;
- struct target_waitstatus wait_status;
-
- /* Get the last target status returned by target_wait(). */
- get_last_target_status (&wait_ptid, &wait_status);
-
- /* Make sure we were stopped either at a breakpoint, or because
- of a Ctrl-C. */
- if (wait_status.kind != TARGET_WAITKIND_STOPPED
- || (wait_status.value.sig != TARGET_SIGNAL_TRAP &&
- wait_status.value.sig != TARGET_SIGNAL_INT))
- {
- return 0;
- }
-
- if (!ptid_equal (wait_ptid, minus_one_ptid)
- && !ptid_equal (inferior_ptid, wait_ptid))
- {
- /* Switched over from WAIT_PID. */
- CORE_ADDR wait_pc = read_pc_pid (wait_ptid);
-
- if (wait_pc != read_pc ())
- {
- if (select_it)
- {
- /* Switch back to WAIT_PID thread. */
- inferior_ptid = wait_ptid;
-
- /* FIXME: This stuff came from switch_to_thread() in
- thread.c (which should probably be a public function). */
- flush_cached_frames ();
- registers_changed ();
- stop_pc = wait_pc;
- select_frame (get_current_frame ());
- }
- /* We return 1 to indicate that there is a breakpoint here,
- so we need to step over it before continuing to avoid
- hitting it straight away. */
- if (breakpoint_here_p (wait_pc))
- {
- return 1;
- }
- }
- }
- return 0;
-
-}
-
CORE_ADDR
init_frame_pc_noop (int fromleaf, struct frame_info *prev)
{
@@ -440,23 +380,29 @@ legacy_pc_in_sigtramp (CORE_ADDR pc, char *name)
}
int
-legacy_convert_register_p (int regnum)
+legacy_convert_register_p (int regnum, struct type *type)
{
- return REGISTER_CONVERTIBLE (regnum);
+ return DEPRECATED_REGISTER_CONVERTIBLE (regnum);
}
void
-legacy_register_to_value (int regnum, struct type *type,
- char *from, char *to)
+legacy_register_to_value (struct frame_info *frame, int regnum,
+ struct type *type, void *to)
{
- REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to);
+ char from[MAX_REGISTER_SIZE];
+ frame_read_register (frame, regnum, from);
+ DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to);
}
void
-legacy_value_to_register (struct type *type, int regnum,
- char *from, char *to)
+legacy_value_to_register (struct frame_info *frame, int regnum,
+ struct type *type, const void *tmp)
{
- REGISTER_CONVERT_TO_RAW (type, regnum, from, to);
+ char to[MAX_REGISTER_SIZE];
+ char *from = alloca (TYPE_LENGTH (type));
+ memcpy (from, from, TYPE_LENGTH (type));
+ DEPRECATED_REGISTER_CONVERT_TO_RAW (type, regnum, from, to);
+ put_frame_register (frame, regnum, to);
}
@@ -882,7 +828,7 @@ gdbarch_info_init (struct gdbarch_info *info)
/* */
-extern initialize_file_ftype _initialize_gdbarch_utils;
+extern initialize_file_ftype _initialize_gdbarch_utils; /* -Wmissing-prototypes */
void
_initialize_gdbarch_utils (void)
diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h
index 27f219b0be9..234257d97b2 100644
--- a/gdb/arch-utils.h
+++ b/gdb/arch-utils.h
@@ -32,14 +32,10 @@ struct gdbarch_info;
extern int gdbarch_debug;
/* Fallback for register convertible. */
-extern gdbarch_register_convertible_ftype generic_register_convertible_not;
+extern gdbarch_deprecated_register_convertible_ftype deprecated_register_convertible_not;
extern CORE_ADDR generic_cannot_extract_struct_value_address (char *dummy);
-/* Helper function for targets that don't know how my arguments are
- being passed */
-extern gdbarch_frame_num_args_ftype frame_num_args_unknown;
-
/* Implementation of extract return value that grubs around in the
register cache. */
extern gdbarch_extract_return_value_ftype legacy_extract_return_value;
@@ -47,6 +43,10 @@ extern gdbarch_extract_return_value_ftype legacy_extract_return_value;
/* Implementation of store return value that grubs the register cache. */
extern gdbarch_store_return_value_ftype legacy_store_return_value;
+/* To return any structure or union type by value, store it at the
+ address passed as an invisible first argument to the function. */
+extern gdbarch_use_struct_convention_ftype always_use_struct_convention;
+
/* Frameless functions not identifable. */
extern gdbarch_frameless_function_invocation_ftype generic_frameless_function_invocation_not;
@@ -81,11 +81,6 @@ extern int core_addr_greaterthan (CORE_ADDR lhs, CORE_ADDR rhs);
extern const struct floatformat *default_float_format (struct gdbarch *gdbarch);
extern const struct floatformat *default_double_format (struct gdbarch *gdbarch);
-/* Helper function for targets that don't know how my arguments are
- being passed */
-extern int frame_num_args_unknown (struct frame_info *fi);
-
-
/* The following DEPRECATED interfaces are for pre- multi-arch legacy
targets. */
@@ -110,12 +105,6 @@ extern CORE_ADDR core_addr_identity (CORE_ADDR addr);
extern int no_op_reg_to_regnum (int reg);
-/* Default prepare_to_procced. */
-
-extern int default_prepare_to_proceed (int select_it);
-
-extern int generic_prepare_to_proceed (int select_it);
-
/* Versions of init_frame_pc(). Do nothing; do the default. */
extern CORE_ADDR init_frame_pc_noop (int fromleaf, struct frame_info *prev);
@@ -165,9 +154,11 @@ extern int legacy_pc_in_sigtramp (CORE_ADDR pc, char *name);
(something that is discouraged); and to convert a register to the
type of a corresponding variable. These legacy functions preserve
that overloaded behavour in existing targets. */
-extern int legacy_convert_register_p (int regnum);
-extern void legacy_register_to_value (int regnum, struct type *type, char *from, char *to);
-extern void legacy_value_to_register (struct type *type, int regnum, char *from, char *to);
+extern int legacy_convert_register_p (int regnum, struct type *type);
+extern void legacy_register_to_value (struct frame_info *frame, int regnum,
+ struct type *type, void *to);
+extern void legacy_value_to_register (struct frame_info *frame, int regnum,
+ struct type *type, const void *from);
/* For compatibility with older architectures, returns
(LEGACY_SIM_REGNO_IGNORE) when the register doesn't have a valid
diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c
index a2ea4935303..5ea3ef2f982 100644
--- a/gdb/arm-linux-tdep.c
+++ b/gdb/arm-linux-tdep.c
@@ -27,6 +27,7 @@
#include "frame.h"
#include "regcache.h"
#include "doublest.h"
+#include "solib-svr4.h"
#include "osabi.h"
#include "arm-tdep.h"
@@ -193,7 +194,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 +209,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
@@ -376,6 +377,49 @@ find_minsym_and_objfile (char *name, struct objfile **objfile_p)
}
+/* Fetch, and possibly build, an appropriate link_map_offsets structure
+ for ARM linux targets using the struct offsets defined in <link.h>.
+ Note, however, that link.h is not actually referred to in this file.
+ Instead, the relevant structs offsets were obtained from examining
+ link.h. (We can't refer to link.h from this file because the host
+ system won't necessarily have it, or if it does, the structs which
+ it defines will refer to the host system, not the target). */
+
+static struct link_map_offsets *
+arm_linux_svr4_fetch_link_map_offsets (void)
+{
+ static struct link_map_offsets lmo;
+ static struct link_map_offsets *lmp = 0;
+
+ if (lmp == 0)
+ {
+ lmp = &lmo;
+
+ lmo.r_debug_size = 8; /* Actual size is 20, but this is all we
+ need. */
+
+ lmo.r_map_offset = 4;
+ lmo.r_map_size = 4;
+
+ lmo.link_map_size = 20; /* Actual size is 552, but this is all we
+ need. */
+
+ lmo.l_addr_offset = 0;
+ lmo.l_addr_size = 4;
+
+ lmo.l_name_offset = 4;
+ lmo.l_name_size = 4;
+
+ lmo.l_next_offset = 12;
+ lmo.l_next_size = 4;
+
+ lmo.l_prev_offset = 16;
+ lmo.l_prev_size = 4;
+ }
+
+ return lmp;
+}
+
static CORE_ADDR
skip_hurd_resolver (CORE_ADDR pc)
{
@@ -530,6 +574,9 @@ arm_linux_init_abi (struct gdbarch_info info,
tdep->jb_pc = ARM_LINUX_JB_PC;
tdep->jb_elt_size = ARM_LINUX_JB_ELEMENT_SIZE;
+ set_solib_svr4_fetch_link_map_offsets
+ (gdbarch, arm_linux_svr4_fetch_link_map_offsets);
+
set_gdbarch_deprecated_call_dummy_words (gdbarch, arm_linux_call_dummy_words);
set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (arm_linux_call_dummy_words));
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index c0e2408c886..3f2f13c3bb6 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -33,7 +33,6 @@
#include "doublest.h"
#include "value.h"
#include "arch-utils.h"
-#include "solib-svr4.h"
#include "osabi.h"
#include "arm-tdep.h"
@@ -306,28 +305,6 @@ arm_frameless_function_invocation (struct frame_info *fi)
return frameless;
}
-/* The address of the arguments in the frame. */
-static CORE_ADDR
-arm_frame_args_address (struct frame_info *fi)
-{
- return get_frame_base (fi);
-}
-
-/* The address of the local variables in the frame. */
-static CORE_ADDR
-arm_frame_locals_address (struct frame_info *fi)
-{
- return get_frame_base (fi);
-}
-
-/* The number of arguments being passed in the frame. */
-static int
-arm_frame_num_args (struct frame_info *fi)
-{
- /* We have no way of knowing. */
- return -1;
-}
-
/* A typical Thumb prologue looks like this:
push {r7, lr}
add sp, sp, #-28
@@ -1405,19 +1382,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 +1442,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 +1461,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 +2471,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;
}
@@ -2689,49 +2667,6 @@ arm_othernames (char *names, int n)
set_disassembly_style ();
}
-/* Fetch, and possibly build, an appropriate link_map_offsets structure
- for ARM linux targets using the struct offsets defined in <link.h>.
- Note, however, that link.h is not actually referred to in this file.
- Instead, the relevant structs offsets were obtained from examining
- link.h. (We can't refer to link.h from this file because the host
- system won't necessarily have it, or if it does, the structs which
- it defines will refer to the host system, not the target). */
-
-struct link_map_offsets *
-arm_linux_svr4_fetch_link_map_offsets (void)
-{
- static struct link_map_offsets lmo;
- static struct link_map_offsets *lmp = 0;
-
- if (lmp == 0)
- {
- lmp = &lmo;
-
- lmo.r_debug_size = 8; /* Actual size is 20, but this is all we
- need. */
-
- lmo.r_map_offset = 4;
- lmo.r_map_size = 4;
-
- lmo.link_map_size = 20; /* Actual size is 552, but this is all we
- need. */
-
- lmo.l_addr_offset = 0;
- lmo.l_addr_size = 4;
-
- lmo.l_name_offset = 4;
- lmo.l_name_size = 4;
-
- lmo.l_next_offset = 12;
- lmo.l_next_size = 4;
-
- lmo.l_prev_offset = 16;
- lmo.l_prev_size = 4;
- }
-
- return lmp;
-}
-
/* Test whether the coff symbol specific value corresponds to a Thumb
function. */
@@ -2943,9 +2878,6 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frameless_function_invocation
(gdbarch, arm_frameless_function_invocation);
set_gdbarch_deprecated_frame_saved_pc (gdbarch, arm_frame_saved_pc);
- set_gdbarch_frame_args_address (gdbarch, arm_frame_args_address);
- set_gdbarch_frame_locals_address (gdbarch, arm_frame_locals_address);
- set_gdbarch_frame_num_args (gdbarch, arm_frame_num_args);
set_gdbarch_frame_args_skip (gdbarch, 0);
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, arm_frame_init_saved_regs);
set_gdbarch_deprecated_pop_frame (gdbarch, arm_pop_frame);
@@ -2975,17 +2907,17 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_fp_regnum (gdbarch, ARM_FP_REGNUM); /* ??? */
set_gdbarch_sp_regnum (gdbarch, ARM_SP_REGNUM);
set_gdbarch_pc_regnum (gdbarch, ARM_PC_REGNUM);
- set_gdbarch_register_byte (gdbarch, arm_register_byte);
+ set_gdbarch_deprecated_register_byte (gdbarch, arm_register_byte);
set_gdbarch_deprecated_register_bytes (gdbarch,
(NUM_GREGS * INT_REGISTER_RAW_SIZE
+ NUM_FREGS * FP_REGISTER_RAW_SIZE
+ NUM_SREGS * STATUS_REGISTER_SIZE));
set_gdbarch_num_regs (gdbarch, NUM_GREGS + NUM_FREGS + NUM_SREGS);
- set_gdbarch_register_raw_size (gdbarch, arm_register_raw_size);
- set_gdbarch_register_virtual_size (gdbarch, arm_register_virtual_size);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, arm_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, arm_register_virtual_size);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, FP_REGISTER_RAW_SIZE);
set_gdbarch_deprecated_max_register_virtual_size (gdbarch, FP_REGISTER_VIRTUAL_SIZE);
- set_gdbarch_register_virtual_type (gdbarch, arm_register_type);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, arm_register_type);
/* Internal <-> external register number maps. */
set_gdbarch_register_sim_regno (gdbarch, arm_register_sim_regno);
@@ -3078,6 +3010,8 @@ arm_init_abi_apcs (struct gdbarch_info info,
/* Place-holder. */
}
+extern initialize_file_ftype _initialize_arm_tdep; /* -Wmissing-prototypes */
+
void
_initialize_arm_tdep (void)
{
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index 4ade2ab41ec..c5d6ffe769d 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -25,6 +25,10 @@
by Denis Chertykov, denisc@overta.ru */
#include "defs.h"
+#include "frame.h"
+#include "frame-unwind.h"
+#include "frame-base.h"
+#include "trad-frame.h"
#include "gdbcmd.h"
#include "gdbcore.h"
#include "inferior.h"
@@ -89,7 +93,7 @@ enum
AVR_PC_REG_INDEX = 35, /* index into array of registers */
- AVR_MAX_PROLOGUE_SIZE = 56, /* bytes */
+ AVR_MAX_PROLOGUE_SIZE = 64, /* bytes */
/* Count of pushed registers. From r2 to r17 (inclusively), r28, r29 */
AVR_MAX_PUSHES = 18,
@@ -97,6 +101,12 @@ enum
/* Number of the last pushed register. r17 for current avr-gcc */
AVR_LAST_PUSHED_REGNUM = 17,
+ AVR_ARG1_REGNUM = 24, /* Single byte argument */
+ AVR_ARGN_REGNUM = 25, /* Multi byte argments */
+
+ AVR_RET1_REGNUM = 24, /* Single byte return value */
+ AVR_RETN_REGNUM = 25, /* Multi byte return value */
+
/* FIXME: TRoth/2002-01-??: Can we shift all these memory masks left 8
bits? Do these have to match the bfd vma values?. It sure would make
things easier in the future if they didn't need to match.
@@ -130,6 +140,20 @@ enum
#endif
};
+/* Prologue types:
+
+ NORMAL and CALL are the typical types (the -mcall-prologues gcc option
+ causes the generation of the CALL type prologues). */
+
+enum {
+ AVR_PROLOGUE_NONE, /* No prologue */
+ AVR_PROLOGUE_NORMAL,
+ AVR_PROLOGUE_CALL, /* -mcall-prologues */
+ AVR_PROLOGUE_MAIN,
+ AVR_PROLOGUE_INTR, /* interrupt handler */
+ AVR_PROLOGUE_SIG, /* signal handler */
+};
+
/* Any function with a frame looks like this
....... <-SP POINTS HERE
LOCALS1 <-FP POINTS HERE
@@ -141,14 +165,17 @@ enum
FIRST ARG
SECOND ARG */
-struct frame_extra_info
+struct avr_unwind_cache
{
- CORE_ADDR return_pc;
- CORE_ADDR args_pointer;
- int locals_size;
- int framereg;
- int framesize;
- int is_main;
+ /* The previous frame's inner most stack address. Used as this
+ frame ID's stack_addr. */
+ CORE_ADDR prev_sp;
+ /* The frame's base, optionally used by the high-level debug info. */
+ CORE_ADDR base;
+ int size;
+ int prologue_type;
+ /* Table indicating the location of each and every register. */
+ struct trad_frame_saved_reg *saved_regs;
};
struct gdbarch_tdep
@@ -176,60 +203,18 @@ avr_register_name (int regnum)
return register_names[regnum];
}
-/* Index within `registers' of the first byte of the space for
- register REGNUM. */
-
-static int
-avr_register_byte (int regnum)
-{
- if (regnum < AVR_PC_REGNUM)
- return regnum;
- else
- return AVR_PC_REG_INDEX;
-}
-
-/* Number of bytes of storage in the actual machine representation for
- register REGNUM. */
-
-static int
-avr_register_raw_size (int regnum)
-{
- switch (regnum)
- {
- case AVR_PC_REGNUM:
- return 4;
- case AVR_SP_REGNUM:
- case AVR_FP_REGNUM:
- return 2;
- default:
- return 1;
- }
-}
-
-/* Number of bytes of storage in the program's representation
- for register N. */
-
-static int
-avr_register_virtual_size (int regnum)
-{
- return TYPE_LENGTH (REGISTER_VIRTUAL_TYPE (regnum));
-}
-
/* Return the GDB type object for the "standard" data type
of data in register N. */
static struct type *
-avr_register_virtual_type (int regnum)
+avr_register_type (struct gdbarch *gdbarch, int reg_nr)
{
- switch (regnum)
- {
- case AVR_PC_REGNUM:
- return builtin_type_unsigned_long;
- case AVR_SP_REGNUM:
- return builtin_type_unsigned_short;
- default:
- return builtin_type_unsigned_char;
- }
+ if (reg_nr == AVR_PC_REGNUM)
+ return builtin_type_uint32;
+ if (reg_nr == AVR_SP_REGNUM)
+ return builtin_type_void_data_ptr;
+ else
+ return builtin_type_uint8;
}
/* Instruction address checks and convertions. */
@@ -311,7 +296,7 @@ avr_address_to_pointer (struct type *type, void *buf, CORE_ADDR addr)
|| TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_METHOD)
{
store_unsigned_integer (buf, TYPE_LENGTH (type),
- avr_convert_iaddr_to_raw (addr));
+ avr_convert_iaddr_to_raw (addr >> 1));
}
else
{
@@ -324,21 +309,13 @@ 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));
-
- if (TYPE_CODE_SPACE (TYPE_TARGET_TYPE (type)))
- {
- fprintf_unfiltered (gdb_stderr, "CODE_SPACE ---->> ptr->addr: 0x%lx\n",
- addr);
- fprintf_unfiltered (gdb_stderr,
- "+++ If you see this, please send me an email <troth@openavr.org>\n");
- }
+ CORE_ADDR addr = extract_unsigned_integer (buf, TYPE_LENGTH (type));
/* Is it a code address? */
if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_FUNC
|| TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_METHOD
|| TYPE_CODE_SPACE (TYPE_TARGET_TYPE (type)))
- return avr_make_iaddr (addr);
+ return avr_make_iaddr (addr << 1);
else
return avr_make_saddr (addr);
}
@@ -347,12 +324,12 @@ static CORE_ADDR
avr_read_pc (ptid_t ptid)
{
ptid_t save_ptid;
- CORE_ADDR pc;
+ ULONGEST pc;
CORE_ADDR retval;
save_ptid = inferior_ptid;
inferior_ptid = ptid;
- pc = (int) read_register (AVR_PC_REGNUM);
+ regcache_cooked_read_unsigned (current_regcache, AVR_PC_REGNUM, &pc);
inferior_ptid = save_ptid;
retval = avr_make_iaddr (pc);
return retval;
@@ -372,131 +349,141 @@ avr_write_pc (CORE_ADDR val, ptid_t ptid)
static CORE_ADDR
avr_read_sp (void)
{
- return (avr_make_saddr (read_register (AVR_SP_REGNUM)));
-}
-
-static void
-avr_write_sp (CORE_ADDR val)
-{
- write_register (AVR_SP_REGNUM, avr_convert_saddr_to_raw (val));
-}
+ ULONGEST sp;
-static CORE_ADDR
-avr_read_fp (void)
-{
- return (avr_make_saddr (read_register (AVR_FP_REGNUM)));
+ regcache_cooked_read_unsigned (current_regcache, AVR_SP_REGNUM, &sp);
+ return (avr_make_saddr (sp));
}
-/* Translate a GDB virtual ADDR/LEN into a format the remote target
- understands. Returns number of bytes that can be transfered
- starting at TARG_ADDR. Return ZERO if no bytes can be transfered
- (segmentation fault).
-
- TRoth/2002-04-08: Could this be used to check for dereferencing an invalid
- pointer? */
-
-static void
-avr_remote_translate_xfer_address (struct gdbarch *gdbarch,
- struct regcache *regcache,
- CORE_ADDR memaddr, int nr_bytes,
- CORE_ADDR *targ_addr, int *targ_len)
+static int
+avr_scan_arg_moves (int vpc, unsigned char *prologue)
{
- long out_addr;
- long out_len;
-
- /* FIXME: TRoth: Do nothing for now. Will need to examine memaddr at this
- point and see if the high bit are set with the masks that we want. */
-
- *targ_addr = memaddr;
- *targ_len = nr_bytes;
-}
-
-/* Function pointers obtained from the target are half of what gdb expects so
- multiply by 2. */
+ unsigned short insn;
-static CORE_ADDR
-avr_convert_from_func_ptr_addr (CORE_ADDR addr)
-{
- return addr * 2;
+ for (; vpc < AVR_MAX_PROLOGUE_SIZE; vpc += 2)
+ {
+ insn = EXTRACT_INSN (&prologue[vpc]);
+ if ((insn & 0xff00) == 0x0100) /* movw rXX, rYY */
+ continue;
+ else if ((insn & 0xfc00) == 0x2c00) /* mov rXX, rYY */
+ continue;
+ else
+ break;
+ }
+
+ return vpc;
}
-/* avr_scan_prologue is also used as the
- deprecated_frame_init_saved_regs().
+/* Function: avr_scan_prologue
- Put here the code to store, into fi->saved_regs, the addresses of
- the saved registers of frame described by FRAME_INFO. This
- includes special registers such as pc and fp saved in special ways
- in the stack frame. sp is even more special: the address we return
- for it IS the sp for the next frame. */
-
-/* Function: avr_scan_prologue (helper function for avr_init_extra_frame_info)
- This function decodes a AVR function prologue to determine:
+ This function decodes an AVR function prologue to determine:
1) the size of the stack frame
2) which registers are saved on it
3) the offsets of saved regs
- This information is stored in the "extra_info" field of the frame_info.
-
- A typical AVR function prologue might look like this:
- push rXX
- push r28
- push r29
- in r28,__SP_L__
- in r29,__SP_H__
- sbiw r28,<LOCALS_SIZE>
- in __tmp_reg__,__SREG__
+ This information is stored in the avr_unwind_cache structure.
+
+ Some devices lack the sbiw instruction, so on those replace this:
+ sbiw r28, XX
+ with this:
+ subi r28,lo8(XX)
+ sbci r29,hi8(XX)
+
+ A typical AVR function prologue with a frame pointer might look like this:
+ push rXX ; saved regs
+ ...
+ push r28
+ push r29
+ in r28,__SP_L__
+ in r29,__SP_H__
+ sbiw r28,<LOCALS_SIZE>
+ in __tmp_reg__,__SREG__
cli
- out __SP_L__,r28
- out __SREG__,__tmp_reg__
- out __SP_H__,r29
-
- A `-mcall-prologues' prologue look like this:
- ldi r26,<LOCALS_SIZE>
- ldi r27,<LOCALS_SIZE>/265
- ldi r30,pm_lo8(.L_foo_body)
- ldi r31,pm_hi8(.L_foo_body)
- rjmp __prologue_saves__+RRR
- .L_foo_body: */
+ out __SP_H__,r29
+ out __SREG__,__tmp_reg__
+ out __SP_L__,r28
+
+ A typical AVR function prologue without a frame pointer might look like
+ this:
+ push rXX ; saved regs
+ ...
+
+ A main function prologue looks like this:
+ ldi r28,lo8(<RAM_ADDR> - <LOCALS_SIZE>)
+ ldi r29,hi8(<RAM_ADDR> - <LOCALS_SIZE>)
+ out __SP_H__,r29
+ out __SP_L__,r28
+
+ A signal handler prologue looks like this:
+ push __zero_reg__
+ push __tmp_reg__
+ in __tmp_reg__, __SREG__
+ push __tmp_reg__
+ clr __zero_reg__
+ push rXX ; save registers r18:r27, r30:r31
+ ...
+ push r28 ; save frame pointer
+ push r29
+ in r28, __SP_L__
+ in r29, __SP_H__
+ sbiw r28, <LOCALS_SIZE>
+ out __SP_H__, r29
+ out __SP_L__, r28
+
+ A interrupt handler prologue looks like this:
+ sei
+ push __zero_reg__
+ push __tmp_reg__
+ in __tmp_reg__, __SREG__
+ push __tmp_reg__
+ clr __zero_reg__
+ push rXX ; save registers r18:r27, r30:r31
+ ...
+ push r28 ; save frame pointer
+ push r29
+ in r28, __SP_L__
+ in r29, __SP_H__
+ sbiw r28, <LOCALS_SIZE>
+ cli
+ out __SP_H__, r29
+ sei
+ out __SP_L__, r28
+
+ A `-mcall-prologues' prologue looks like this (Note that the megas use a
+ jmp instead of a rjmp, thus the prologue is one word larger since jmp is a
+ 32 bit insn and rjmp is a 16 bit insn):
+ ldi r26,lo8(<LOCALS_SIZE>)
+ ldi r27,hi8(<LOCALS_SIZE>)
+ ldi r30,pm_lo8(.L_foo_body)
+ ldi r31,pm_hi8(.L_foo_body)
+ rjmp __prologue_saves__+RRR
+ .L_foo_body: */
+
+/* Not really part of a prologue, but still need to scan for it, is when a
+ function prologue moves values passed via registers as arguments to new
+ registers. In this case, all local variables live in registers, so there
+ may be some register saves. This is what it looks like:
+ movw rMM, rNN
+ ...
+
+ There could be multiple movw's. If the target doesn't have a movw insn, it
+ will use two mov insns. This could be done after any of the above prologue
+ types. */
-static void
-avr_scan_prologue (struct frame_info *fi)
+static CORE_ADDR
+avr_scan_prologue (CORE_ADDR pc, struct avr_unwind_cache *info)
{
- CORE_ADDR prologue_start;
- CORE_ADDR prologue_end;
int i;
unsigned short insn;
- int regno;
int scan_stage = 0;
- char *name;
struct minimal_symbol *msymbol;
- int prologue_len;
unsigned char prologue[AVR_MAX_PROLOGUE_SIZE];
int vpc = 0;
- get_frame_extra_info (fi)->framereg = AVR_SP_REGNUM;
-
- if (find_pc_partial_function
- (get_frame_pc (fi), &name, &prologue_start, &prologue_end))
- {
- struct symtab_and_line sal = find_pc_line (prologue_start, 0);
-
- if (sal.line == 0) /* no line info, use current PC */
- prologue_end = get_frame_pc (fi);
- else if (sal.end < prologue_end) /* next line begins after fn end */
- prologue_end = sal.end; /* (probably means no prologue) */
- }
- else
- /* We're in the boondocks: allow for */
- /* 19 pushes, an add, and "mv fp,sp" */
- prologue_end = prologue_start + AVR_MAX_PROLOGUE_SIZE;
-
- prologue_end = min (prologue_end, get_frame_pc (fi));
-
- /* Search the prologue looking for instructions that set up the
- frame pointer, adjust the stack pointer, and save registers. */
-
- get_frame_extra_info (fi)->framesize = 0;
- prologue_len = prologue_end - prologue_start;
- read_memory (prologue_start, prologue, prologue_len);
+ /* FIXME: TRoth/2003-06-11: This could be made more efficient by only
+ reading in the bytes of the prologue. The problem is that the figuring
+ out where the end of the prologue is is a bit difficult. The old code
+ tried to do that, but failed quite often. */
+ read_memory (pc, prologue, AVR_MAX_PROLOGUE_SIZE);
/* Scanning main()'s prologue
ldi r28,lo8(<RAM_ADDR> - <LOCALS_SIZE>)
@@ -504,7 +491,7 @@ avr_scan_prologue (struct frame_info *fi)
out __SP_H__,r29
out __SP_L__,r28 */
- if (name && strcmp ("main", name) == 0 && prologue_len == 8)
+ if (1)
{
CORE_ADDR locals;
unsigned char img[] = {
@@ -512,7 +499,6 @@ avr_scan_prologue (struct frame_info *fi)
0xcd, 0xbf /* out __SP_L__,r28 */
};
- get_frame_extra_info (fi)->framereg = AVR_FP_REGNUM;
insn = EXTRACT_INSN (&prologue[vpc]);
/* ldi r28,lo8(<RAM_ADDR> - <LOCALS_SIZE>) */
if ((insn & 0xf0f0) == 0xe0c0)
@@ -525,94 +511,124 @@ avr_scan_prologue (struct frame_info *fi)
locals |= ((insn & 0xf) | ((insn & 0x0f00) >> 4)) << 8;
if (memcmp (prologue + vpc + 4, img, sizeof (img)) == 0)
{
- deprecated_update_frame_base_hack (fi, locals);
-
- get_frame_extra_info (fi)->is_main = 1;
- return;
+ info->prologue_type = AVR_PROLOGUE_MAIN;
+ info->base = locals;
+ return pc + 4;
}
}
}
}
/* Scanning `-mcall-prologues' prologue
- FIXME: mega prologue have a 12 bytes long */
+ Classic prologue is 10 bytes, mega prologue is a 12 bytes long */
- while (prologue_len <= 12) /* I'm use while to avoit many goto's */
+ while (1) /* Using a while to avoid many goto's */
{
int loc_size;
int body_addr;
unsigned num_pushes;
+ int pc_offset = 0;
insn = EXTRACT_INSN (&prologue[vpc]);
/* ldi r26,<LOCALS_SIZE> */
if ((insn & 0xf0f0) != 0xe0a0)
break;
loc_size = (insn & 0xf) | ((insn & 0x0f00) >> 4);
+ pc_offset += 2;
insn = EXTRACT_INSN (&prologue[vpc + 2]);
/* ldi r27,<LOCALS_SIZE> / 256 */
if ((insn & 0xf0f0) != 0xe0b0)
break;
loc_size |= ((insn & 0xf) | ((insn & 0x0f00) >> 4)) << 8;
+ pc_offset += 2;
insn = EXTRACT_INSN (&prologue[vpc + 4]);
/* ldi r30,pm_lo8(.L_foo_body) */
if ((insn & 0xf0f0) != 0xe0e0)
break;
body_addr = (insn & 0xf) | ((insn & 0x0f00) >> 4);
+ pc_offset += 2;
insn = EXTRACT_INSN (&prologue[vpc + 6]);
/* ldi r31,pm_hi8(.L_foo_body) */
if ((insn & 0xf0f0) != 0xe0f0)
break;
body_addr |= ((insn & 0xf) | ((insn & 0x0f00) >> 4)) << 8;
-
- if (body_addr != (prologue_start + 10) / 2)
- break;
+ pc_offset += 2;
msymbol = lookup_minimal_symbol ("__prologue_saves__", NULL, NULL);
if (!msymbol)
break;
- /* FIXME: prologue for mega have a JMP instead of RJMP */
insn = EXTRACT_INSN (&prologue[vpc + 8]);
/* rjmp __prologue_saves__+RRR */
- if ((insn & 0xf000) != 0xc000)
- break;
+ if ((insn & 0xf000) == 0xc000)
+ {
+ /* Extract PC relative offset from RJMP */
+ i = (insn & 0xfff) | (insn & 0x800 ? (-1 ^ 0xfff) : 0);
+ /* Convert offset to byte addressable mode */
+ i *= 2;
+ /* Destination address */
+ i += pc + 10;
+
+ if (body_addr != (pc + 10)/2)
+ break;
+
+ pc_offset += 2;
+ }
+ else if ((insn & 0xfe0e) == 0x940c)
+ {
+ /* Extract absolute PC address from JMP */
+ i = (((insn & 0x1) | ((insn & 0x1f0) >> 3) << 16)
+ | (EXTRACT_INSN (&prologue[vpc + 10]) & 0xffff));
+ /* Convert address to byte addressable mode */
+ i *= 2;
+
+ if (body_addr != (pc + 12)/2)
+ break;
+
+ pc_offset += 4;
+ }
+ else
+ break;
- /* Extract PC relative offset from RJMP */
- i = (insn & 0xfff) | (insn & 0x800 ? (-1 ^ 0xfff) : 0);
- /* Convert offset to byte addressable mode */
- i *= 2;
- /* Destination address */
- i += vpc + prologue_start + 10;
- /* Resovle offset (in words) from __prologue_saves__ symbol.
+ /* Resolve offset (in words) from __prologue_saves__ symbol.
Which is a pushes count in `-mcall-prologues' mode */
num_pushes = AVR_MAX_PUSHES - (i - SYMBOL_VALUE_ADDRESS (msymbol)) / 2;
if (num_pushes > AVR_MAX_PUSHES)
- num_pushes = 0;
+ {
+ fprintf_unfiltered (gdb_stderr, "Num pushes too large: %d\n",
+ num_pushes);
+ num_pushes = 0;
+ }
if (num_pushes)
{
int from;
- get_frame_saved_regs (fi)[AVR_FP_REGNUM + 1] = num_pushes;
+
+ info->saved_regs[AVR_FP_REGNUM + 1].addr = num_pushes;
if (num_pushes >= 2)
- get_frame_saved_regs (fi)[AVR_FP_REGNUM] = num_pushes - 1;
+ info->saved_regs[AVR_FP_REGNUM].addr = num_pushes - 1;
+
i = 0;
for (from = AVR_LAST_PUSHED_REGNUM + 1 - (num_pushes - 2);
from <= AVR_LAST_PUSHED_REGNUM; ++from)
- get_frame_saved_regs (fi)[from] = ++i;
+ info->saved_regs [from].addr = ++i;
}
- get_frame_extra_info (fi)->locals_size = loc_size;
- get_frame_extra_info (fi)->framesize = loc_size + num_pushes;
- get_frame_extra_info (fi)->framereg = AVR_FP_REGNUM;
- return;
+ info->size = loc_size + num_pushes;
+ info->prologue_type = AVR_PROLOGUE_CALL;
+
+ return pc + pc_offset;
}
- /* Scan interrupt or signal function */
+ /* Scan for the beginning of the prologue for an interrupt or signal
+ function. Note that we have to set the prologue type here since the
+ third stage of the prologue may not be present (e.g. no saved registered
+ or changing of the SP register). */
- if (prologue_len >= 12)
+ if (1)
{
unsigned char img[] = {
0x78, 0x94, /* sei */
@@ -624,44 +640,52 @@ avr_scan_prologue (struct frame_info *fi)
};
if (memcmp (prologue, img, sizeof (img)) == 0)
{
+ info->prologue_type = AVR_PROLOGUE_INTR;
vpc += sizeof (img);
- get_frame_saved_regs (fi)[0] = 2;
- get_frame_saved_regs (fi)[1] = 1;
- get_frame_extra_info (fi)->framesize += 3;
+ info->saved_regs[AVR_SREG_REGNUM].addr = 3;
+ info->saved_regs[0].addr = 2;
+ info->saved_regs[1].addr = 1;
+ info->size += 3;
}
- else if (memcmp (img + 1, prologue, sizeof (img) - 1) == 0)
+ else if (memcmp (img + 2, prologue, sizeof (img) - 2) == 0)
{
- vpc += sizeof (img) - 1;
- get_frame_saved_regs (fi)[0] = 2;
- get_frame_saved_regs (fi)[1] = 1;
- get_frame_extra_info (fi)->framesize += 3;
+ info->prologue_type = AVR_PROLOGUE_SIG;
+ vpc += sizeof (img) - 2;
+ info->saved_regs[AVR_SREG_REGNUM].addr = 3;
+ info->saved_regs[0].addr = 2;
+ info->saved_regs[1].addr = 1;
+ info->size += 3;
}
}
/* First stage of the prologue scanning.
- Scan pushes */
+ Scan pushes (saved registers) */
- for (; vpc <= prologue_len; vpc += 2)
+ for (; vpc < AVR_MAX_PROLOGUE_SIZE; vpc += 2)
{
insn = EXTRACT_INSN (&prologue[vpc]);
if ((insn & 0xfe0f) == 0x920f) /* push rXX */
{
/* Bits 4-9 contain a mask for registers R0-R32. */
- regno = (insn & 0x1f0) >> 4;
- ++get_frame_extra_info (fi)->framesize;
- get_frame_saved_regs (fi)[regno] = get_frame_extra_info (fi)->framesize;
+ int regno = (insn & 0x1f0) >> 4;
+ info->size++;
+ info->saved_regs[regno].addr = info->size;
scan_stage = 1;
}
else
break;
}
+ if (vpc >= AVR_MAX_PROLOGUE_SIZE)
+ fprintf_unfiltered (gdb_stderr,
+ "Hit end of prologue while scanning pushes\n");
+
/* Second stage of the prologue scanning.
Scan:
in r28,__SP_L__
in r29,__SP_H__ */
- if (scan_stage == 1 && vpc + 4 <= prologue_len)
+ if (scan_stage == 1 && vpc < AVR_MAX_PROLOGUE_SIZE)
{
unsigned char img[] = {
0xcd, 0xb7, /* in r28,__SP_L__ */
@@ -672,7 +696,6 @@ avr_scan_prologue (struct frame_info *fi)
if (memcmp (prologue + vpc, img, sizeof (img)) == 0)
{
vpc += 4;
- get_frame_extra_info (fi)->framereg = AVR_FP_REGNUM;
scan_stage = 2;
}
}
@@ -680,32 +703,32 @@ avr_scan_prologue (struct frame_info *fi)
/* Third stage of the prologue scanning. (Really two stages)
Scan for:
sbiw r28,XX or subi r28,lo8(XX)
- sbci r29,hi8(XX)
+ sbci r29,hi8(XX)
in __tmp_reg__,__SREG__
cli
- out __SP_L__,r28
+ out __SP_H__,r29
out __SREG__,__tmp_reg__
- out __SP_H__,r29 */
+ out __SP_L__,r28 */
- if (scan_stage == 2 && vpc + 12 <= prologue_len)
+ if (scan_stage == 2 && vpc < AVR_MAX_PROLOGUE_SIZE)
{
int locals_size = 0;
unsigned char img[] = {
0x0f, 0xb6, /* in r0,0x3f */
0xf8, 0x94, /* cli */
- 0xcd, 0xbf, /* out 0x3d,r28 ; SPL */
+ 0xde, 0xbf, /* out 0x3e,r29 ; SPH */
0x0f, 0xbe, /* out 0x3f,r0 ; SREG */
- 0xde, 0xbf /* out 0x3e,r29 ; SPH */
+ 0xcd, 0xbf /* out 0x3d,r28 ; SPL */
};
unsigned char img_sig[] = {
- 0xcd, 0xbf, /* out 0x3d,r28 ; SPL */
- 0xde, 0xbf /* out 0x3e,r29 ; SPH */
+ 0xde, 0xbf, /* out 0x3e,r29 ; SPH */
+ 0xcd, 0xbf /* out 0x3d,r28 ; SPL */
};
unsigned char img_int[] = {
0xf8, 0x94, /* cli */
- 0xcd, 0xbf, /* out 0x3d,r28 ; SPL */
+ 0xde, 0xbf, /* out 0x3e,r29 ; SPH */
0x78, 0x94, /* sei */
- 0xde, 0xbf /* out 0x3e,r29 ; SPH */
+ 0xcd, 0xbf /* out 0x3d,r28 ; SPL */
};
insn = EXTRACT_INSN (&prologue[vpc]);
@@ -720,297 +743,419 @@ avr_scan_prologue (struct frame_info *fi)
locals_size += ((insn & 0xf) | ((insn & 0xf00) >> 4) << 8);
}
else
- return;
- get_frame_extra_info (fi)->locals_size = locals_size;
- get_frame_extra_info (fi)->framesize += locals_size;
+ return pc + vpc;
+
+ /* Scan the last part of the prologue. May not be present for interrupt
+ or signal handler functions, which is why we set the prologue type
+ when we saw the beginning of the prologue previously. */
+
+ if (memcmp (prologue + vpc, img_sig, sizeof (img_sig)) == 0)
+ {
+ vpc += sizeof (img_sig);
+ }
+ else if (memcmp (prologue + vpc, img_int, sizeof (img_int)) == 0)
+ {
+ vpc += sizeof (img_int);
+ }
+ if (memcmp (prologue + vpc, img, sizeof (img)) == 0)
+ {
+ info->prologue_type = AVR_PROLOGUE_NORMAL;
+ vpc += sizeof (img);
+ }
+
+ info->size += locals_size;
+
+ return pc + avr_scan_arg_moves (vpc, prologue);
}
-}
-/* This function actually figures out the frame address for a given pc and
- sp. This is tricky because we sometimes don't use an explicit
- frame pointer, and the previous stack pointer isn't necessarily recorded
- on the stack. The only reliable way to get this info is to
- examine the prologue. */
+ /* If we got this far, we could not scan the prologue, so just return the pc
+ of the frame plus an adjustment for argument move insns. */
-static void
-avr_init_extra_frame_info (int fromleaf, struct frame_info *fi)
-{
- int reg;
+ return pc + avr_scan_arg_moves (vpc, prologue);;
+}
- if (get_next_frame (fi))
- deprecated_update_frame_pc_hack (fi, DEPRECATED_FRAME_SAVED_PC (get_next_frame (fi)));
+/* Returns the return address for a dummy. */
- frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
- frame_saved_regs_zalloc (fi);
+static CORE_ADDR
+avr_call_dummy_address (void)
+{
+ return entry_point_address ();
+}
- get_frame_extra_info (fi)->return_pc = 0;
- get_frame_extra_info (fi)->args_pointer = 0;
- get_frame_extra_info (fi)->locals_size = 0;
- get_frame_extra_info (fi)->framereg = 0;
- get_frame_extra_info (fi)->framesize = 0;
- get_frame_extra_info (fi)->is_main = 0;
+static CORE_ADDR
+avr_skip_prologue (CORE_ADDR pc)
+{
+ CORE_ADDR func_addr, func_end;
+ CORE_ADDR prologue_end = pc;
- avr_scan_prologue (fi);
+ /* See what the symbol table says */
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
- get_frame_base (fi)))
- {
- /* We need to setup fi->frame here because call_function_by_hand
- gets it wrong by assuming it's always FP. */
- deprecated_update_frame_base_hack (fi, deprecated_read_register_dummy (get_frame_pc (fi), get_frame_base (fi),
- AVR_PC_REGNUM));
- }
- else if (!get_next_frame (fi))
- /* this is the innermost frame? */
- deprecated_update_frame_base_hack (fi, read_register (get_frame_extra_info (fi)->framereg));
- else if (get_frame_extra_info (fi)->is_main != 1)
- /* not the innermost frame, not `main' */
- /* If we have an next frame, the callee saved it. */
+ if (find_pc_partial_function (pc, NULL, &func_addr, &func_end))
{
- struct frame_info *next_fi = get_next_frame (fi);
- if (get_frame_extra_info (fi)->framereg == AVR_SP_REGNUM)
- deprecated_update_frame_base_hack (fi, (get_frame_base (next_fi)
- + 2 /* ret addr */
- + get_frame_extra_info (next_fi)->framesize));
- /* FIXME: I don't analyse va_args functions */
- else
- {
- CORE_ADDR fp = 0;
- CORE_ADDR fp1 = 0;
- unsigned int fp_low, fp_high;
+ struct symtab_and_line sal;
+ struct avr_unwind_cache info = {0};
+ struct trad_frame_saved_reg saved_regs[AVR_NUM_REGS];
- /* Scan all frames */
- for (; next_fi; next_fi = get_next_frame (next_fi))
- {
- /* look for saved AVR_FP_REGNUM */
- if (get_frame_saved_regs (next_fi)[AVR_FP_REGNUM] && !fp)
- fp = get_frame_saved_regs (next_fi)[AVR_FP_REGNUM];
- /* look for saved AVR_FP_REGNUM + 1 */
- if (get_frame_saved_regs (next_fi)[AVR_FP_REGNUM + 1] && !fp1)
- fp1 = get_frame_saved_regs (next_fi)[AVR_FP_REGNUM + 1];
- }
- fp_low = (fp ? read_memory_unsigned_integer (avr_make_saddr (fp), 1)
- : read_register (AVR_FP_REGNUM)) & 0xff;
- fp_high =
- (fp1 ? read_memory_unsigned_integer (avr_make_saddr (fp1), 1) :
- read_register (AVR_FP_REGNUM + 1)) & 0xff;
- deprecated_update_frame_base_hack (fi, fp_low | (fp_high << 8));
- }
- }
+ info.saved_regs = saved_regs;
- /* TRoth: Do we want to do this if we are in main? I don't think we should
- since return_pc makes no sense when we are in main. */
+ /* Need to run the prologue scanner to figure out if the function has a
+ prologue and possibly skip over moving arguments passed via registers
+ to other registers. */
- if ((get_frame_pc (fi)) && (get_frame_extra_info (fi)->is_main == 0))
- /* We are not in CALL_DUMMY */
- {
- CORE_ADDR addr;
- int i;
+ prologue_end = avr_scan_prologue (pc, &info);
- addr = get_frame_base (fi) + get_frame_extra_info (fi)->framesize + 1;
+ if (info.prologue_type != AVR_PROLOGUE_NONE)
+ {
+ sal = find_pc_line (func_addr, 0);
- /* Return address in stack in different endianness */
+ if (sal.line != 0 && sal.end < func_end)
+ return sal.end;
+ }
+ }
- get_frame_extra_info (fi)->return_pc =
- read_memory_unsigned_integer (avr_make_saddr (addr), 1) << 8;
- get_frame_extra_info (fi)->return_pc |=
- read_memory_unsigned_integer (avr_make_saddr (addr + 1), 1);
+/* Either we didn't find the start of this function (nothing we can do),
+ or there's no line info, or the line after the prologue is after
+ the end of the function (there probably isn't a prologue). */
- /* This return address in words,
- must be converted to the bytes address */
- get_frame_extra_info (fi)->return_pc *= 2;
+ return prologue_end;
+}
- /* Resolve a pushed registers addresses */
- for (i = 0; i < NUM_REGS; i++)
- {
- if (get_frame_saved_regs (fi)[i])
- get_frame_saved_regs (fi)[i] = addr - get_frame_saved_regs (fi)[i];
- }
- }
+/* Not all avr devices support the BREAK insn. Those that don't should treat
+ it as a NOP. Thus, it should be ok. Since the avr is currently a remote
+ only target, this shouldn't be a problem (I hope). TRoth/2003-05-14 */
+
+static const unsigned char *
+avr_breakpoint_from_pc (CORE_ADDR * pcptr, int *lenptr)
+{
+ static unsigned char avr_break_insn [] = { 0x98, 0x95 };
+ *lenptr = sizeof (avr_break_insn);
+ return avr_break_insn;
}
-/* Restore the machine to the state it had before the current frame was
- created. Usually used either by the "RETURN" command, or by
- call_function_by_hand after the dummy_frame is finished. */
+/* Given a return value in `regbuf' with a type `valtype',
+ extract and copy its value into `valbuf'.
+
+ Return values are always passed via registers r25:r24:... */
static void
-avr_pop_frame (void)
+avr_extract_return_value (struct type *type, struct regcache *regcache,
+ void *valbuf)
{
- unsigned regnum;
- CORE_ADDR saddr;
- struct frame_info *frame = get_current_frame ();
-
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
- get_frame_base (frame),
- get_frame_base (frame)))
+ ULONGEST r24, r25;
+ ULONGEST c;
+ int len;
+ if (TYPE_LENGTH (type) == 1)
{
- generic_pop_dummy_frame ();
+ regcache_cooked_read_unsigned (regcache, 24, &c);
+ store_unsigned_integer (valbuf, 1, c);
}
else
{
- /* TRoth: Why only loop over 8 registers? */
-
- for (regnum = 0; regnum < 8; regnum++)
- {
- /* Don't forget AVR_SP_REGNUM in a frame_saved_regs struct is the
- actual value we want, not the address of the value we want. */
- if (get_frame_saved_regs (frame)[regnum] && regnum != AVR_SP_REGNUM)
- {
- saddr = avr_make_saddr (get_frame_saved_regs (frame)[regnum]);
- write_register (regnum,
- read_memory_unsigned_integer (saddr, 1));
- }
- else if (get_frame_saved_regs (frame)[regnum] && regnum == AVR_SP_REGNUM)
- write_register (regnum, get_frame_base (frame) + 2);
- }
-
- /* Don't forget the update the PC too! */
- write_pc (get_frame_extra_info (frame)->return_pc);
+ int i;
+ /* The MSB of the return value is always in r25, calculate which
+ register holds the LSB. */
+ int lsb_reg = 25 - TYPE_LENGTH (type) + 1;
+
+ for (i=0; i< TYPE_LENGTH (type); i++)
+ {
+ regcache_cooked_read (regcache, lsb_reg + i,
+ (bfd_byte *) valbuf + i);
+ }
}
- flush_cached_frames ();
}
-/* Return the saved PC from this frame. */
-
-static CORE_ADDR
-avr_frame_saved_pc (struct frame_info *frame)
+static void
+avr_saved_regs_unwinder (struct frame_info *next_frame,
+ struct trad_frame_saved_reg *this_saved_regs,
+ int regnum, int *optimizedp,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realnump, void *bufferp)
{
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
- get_frame_base (frame),
- get_frame_base (frame)))
- return deprecated_read_register_dummy (get_frame_pc (frame),
- get_frame_base (frame),
- AVR_PC_REGNUM);
- else
- return get_frame_extra_info (frame)->return_pc;
-}
+ if (this_saved_regs[regnum].addr != 0)
+ {
+ *optimizedp = 0;
+ *lvalp = lval_memory;
+ *addrp = this_saved_regs[regnum].addr;
+ *realnump = -1;
+ if (bufferp != NULL)
+ {
+ /* Read the value in from memory. */
+
+ if (regnum == AVR_PC_REGNUM)
+ {
+ /* Reading the return PC from the PC register is slightly
+ abnormal. register_size(AVR_PC_REGNUM) says it is 4 bytes,
+ but in reality, only two bytes (3 in upcoming mega256) are
+ stored on the stack.
+
+ Also, note that the value on the stack is an addr to a word
+ not a byte, so we will need to multiply it by two at some
+ point.
+
+ And to confuse matters even more, the return address stored
+ on the stack is in big endian byte order, even though most
+ everything else about the avr is little endian. Ick! */
+
+ /* FIXME: number of bytes read here will need updated for the
+ mega256 when it is available. */
+
+ ULONGEST pc;
+ unsigned char tmp;
+ unsigned char buf[2];
+
+ read_memory (this_saved_regs[regnum].addr, buf, 2);
+
+ /* Convert the PC read from memory as a big-endian to
+ little-endian order. */
+ tmp = buf[0];
+ buf[0] = buf[1];
+ buf[1] = tmp;
+
+ pc = (extract_unsigned_integer (buf, 2) * 2);
+ store_unsigned_integer (bufferp,
+ register_size (current_gdbarch, regnum),
+ pc);
+ }
+ else
+ {
+ read_memory (this_saved_regs[regnum].addr, bufferp,
+ register_size (current_gdbarch, regnum));
+ }
+ }
-static CORE_ADDR
-avr_saved_pc_after_call (struct frame_info *frame)
-{
- unsigned char m1, m2;
- unsigned int sp = read_register (AVR_SP_REGNUM);
- m1 = read_memory_unsigned_integer (avr_make_saddr (sp + 1), 1);
- m2 = read_memory_unsigned_integer (avr_make_saddr (sp + 2), 1);
- return (m2 | (m1 << 8)) * 2;
+ return;
+ }
+
+ /* No luck, assume this and the next frame have the same register
+ value. If a value is needed, pass the request on down the chain;
+ otherwise just return an indication that the value is in the same
+ register as the next frame. */
+ frame_register_unwind (next_frame, regnum, optimizedp, lvalp, addrp,
+ realnump, bufferp);
}
-/* Returns the return address for a dummy. */
+/* Put here the code to store, into fi->saved_regs, the addresses of
+ the saved registers of frame described by FRAME_INFO. This
+ includes special registers such as pc and fp saved in special ways
+ in the stack frame. sp is even more special: the address we return
+ for it IS the sp for the next frame. */
-static CORE_ADDR
-avr_call_dummy_address (void)
+struct avr_unwind_cache *
+avr_frame_unwind_cache (struct frame_info *next_frame,
+ void **this_prologue_cache)
{
- return entry_point_address ();
-}
+ CORE_ADDR pc;
+ ULONGEST prev_sp;
+ ULONGEST this_base;
+ struct avr_unwind_cache *info;
+ int i;
-/* Setup the return address for a dummy frame, as called by
- call_function_by_hand. Only necessary when you are using an empty
- CALL_DUMMY. */
+ if ((*this_prologue_cache))
+ return (*this_prologue_cache);
-static CORE_ADDR
-avr_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
-{
- unsigned char buf[2];
- int wordsize = 2;
-#if 0
- struct minimal_symbol *msymbol;
- CORE_ADDR mon_brk;
-#endif
+ info = FRAME_OBSTACK_ZALLOC (struct avr_unwind_cache);
+ (*this_prologue_cache) = info;
+ info->saved_regs = trad_frame_alloc_saved_regs (next_frame);
- buf[0] = 0;
- buf[1] = 0;
- sp -= wordsize;
- write_memory (sp + 1, buf, 2);
+ info->size = 0;
+ info->prologue_type = AVR_PROLOGUE_NONE;
-#if 0
- /* FIXME: TRoth/2002-02-18: This should probably be removed since it's a
- left-over from Denis' original patch which used avr-mon for the target
- instead of the generic remote target. */
- if ((strcmp (target_shortname, "avr-mon") == 0)
- && (msymbol = lookup_minimal_symbol ("gdb_break", NULL, NULL)))
+ pc = frame_func_unwind (next_frame);
+
+ if ((pc > 0) && (pc < frame_pc_unwind (next_frame)))
+ avr_scan_prologue (pc, info);
+
+ if (info->prologue_type != AVR_PROLOGUE_NONE)
+ {
+ ULONGEST high_base; /* High byte of FP */
+
+ /* The SP was moved to the FP. This indicates that a new frame
+ was created. Get THIS frame's FP value by unwinding it from
+ the next frame. */
+ frame_unwind_unsigned_register (next_frame, AVR_FP_REGNUM, &this_base);
+ frame_unwind_unsigned_register (next_frame, AVR_FP_REGNUM+1, &high_base);
+ this_base += (high_base << 8);
+
+ /* The FP points at the last saved register. Adjust the FP back
+ to before the first saved register giving the SP. */
+ prev_sp = this_base + info->size;
+ }
+ else
{
- mon_brk = SYMBOL_VALUE_ADDRESS (msymbol);
- store_unsigned_integer (buf, wordsize, mon_brk / 2);
- sp -= wordsize;
- write_memory (sp + 1, buf + 1, 1);
- write_memory (sp + 2, buf, 1);
+ /* Assume that the FP is this frame's SP but with that pushed
+ stack space added back. */
+ frame_unwind_unsigned_register (next_frame, AVR_SP_REGNUM, &this_base);
+ prev_sp = this_base + info->size;
}
-#endif
- return sp;
+
+ /* Add 1 here to adjust for the post-decrement nature of the push
+ instruction.*/
+ info->prev_sp = avr_make_saddr (prev_sp+1);
+
+ info->base = avr_make_saddr (this_base);
+
+ /* Adjust all the saved registers so that they contain addresses and not
+ offsets. We need to add one to the addresses since push ops are post
+ decrement on the avr. */
+ for (i = 0; i < NUM_REGS - 1; i++)
+ if (info->saved_regs[i].addr)
+ {
+ info->saved_regs[i].addr = (info->prev_sp - info->saved_regs[i].addr);
+ }
+
+ /* Except for the main and startup code, the return PC is always saved on
+ the stack and is at the base of the frame. */
+
+ if (info->prologue_type != AVR_PROLOGUE_MAIN)
+ {
+ info->saved_regs[AVR_PC_REGNUM].addr = info->prev_sp;
+ }
+
+ return info;
}
static CORE_ADDR
-avr_skip_prologue (CORE_ADDR pc)
+avr_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
- CORE_ADDR func_addr, func_end;
- struct symtab_and_line sal;
+ ULONGEST pc;
- /* See what the symbol table says */
+ frame_unwind_unsigned_register (next_frame, AVR_PC_REGNUM, &pc);
- if (find_pc_partial_function (pc, NULL, &func_addr, &func_end))
- {
- sal = find_pc_line (func_addr, 0);
+ return avr_make_iaddr (pc);
+}
- /* troth/2002-08-05: For some very simple functions, gcc doesn't
- generate a prologue and the sal.end ends up being the 2-byte ``ret''
- instruction at the end of the function, but func_end ends up being
- the address of the first instruction of the _next_ function. By
- adjusting func_end by 2 bytes, we can catch these functions and not
- return sal.end if it is the ``ret'' instruction. */
+/* Given a GDB frame, determine the address of the calling function's
+ frame. This will be used to create a new GDB frame struct. */
- if (sal.line != 0 && sal.end < (func_end-2))
- return sal.end;
- }
+static void
+avr_frame_this_id (struct frame_info *next_frame,
+ void **this_prologue_cache,
+ struct frame_id *this_id)
+{
+ struct avr_unwind_cache *info
+ = avr_frame_unwind_cache (next_frame, this_prologue_cache);
+ CORE_ADDR base;
+ CORE_ADDR func;
+ struct frame_id id;
+
+ /* The FUNC is easy. */
+ func = frame_func_unwind (next_frame);
+
+ /* 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 (func))
+ return;
+
+ /* Hopefully the prologue analysis either correctly determined the
+ frame's base (which is the SP from the previous frame), or set
+ that base to "NULL". */
+ base = info->prev_sp;
+ if (base == 0)
+ return;
+
+ id = frame_id_build (base, func);
+
+ /* Check that we're not going round in circles with the same frame
+ ID (but avoid applying the test to sentinel frames which do go
+ round in circles). Can't use frame_id_eq() as that doesn't yet
+ compare the frame's PC value. */
+ if (frame_relative_level (next_frame) >= 0
+ && get_frame_type (next_frame) != DUMMY_FRAME
+ && frame_id_eq (get_frame_id (next_frame), id))
+ return;
+
+ (*this_id) = id;
+}
-/* Either we didn't find the start of this function (nothing we can do),
- or there's no line info, or the line after the prologue is after
- the end of the function (there probably isn't a prologue). */
+static void
+avr_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 avr_unwind_cache *info
+ = avr_frame_unwind_cache (next_frame, this_prologue_cache);
+
+ avr_saved_regs_unwinder (next_frame, info->saved_regs, regnum, optimizedp,
+ lvalp, addrp, realnump, bufferp);
+}
- return pc;
+static const struct frame_unwind avr_frame_unwind = {
+ NORMAL_FRAME,
+ avr_frame_this_id,
+ avr_frame_prev_register
+};
+
+const struct frame_unwind *
+avr_frame_p (CORE_ADDR pc)
+{
+ return &avr_frame_unwind;
}
static CORE_ADDR
-avr_frame_address (struct frame_info *fi)
+avr_frame_base_address (struct frame_info *next_frame, void **this_cache)
{
- return avr_make_saddr (get_frame_base (fi));
+ struct avr_unwind_cache *info
+ = avr_frame_unwind_cache (next_frame, this_cache);
+
+ return info->base;
}
-/* Given a GDB frame, determine the address of the calling function's
- frame. This will be used to create a new GDB frame struct, and
- then DEPRECATED_INIT_EXTRA_FRAME_INFO and DEPRECATED_INIT_FRAME_PC
- will be called for the new frame.
+static const struct frame_base avr_frame_base = {
+ &avr_frame_unwind,
+ avr_frame_base_address,
+ avr_frame_base_address,
+ avr_frame_base_address
+};
- For us, the frame address is its stack pointer value, so we look up
- the function prologue to determine the caller's sp value, and return it. */
+/* 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 CORE_ADDR
-avr_frame_chain (struct frame_info *frame)
+static struct frame_id
+avr_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
- get_frame_base (frame),
- get_frame_base (frame)))
- {
- /* initialize the return_pc now */
- get_frame_extra_info (frame)->return_pc
- = deprecated_read_register_dummy (get_frame_pc (frame),
- get_frame_base (frame),
- AVR_PC_REGNUM);
- return get_frame_base (frame);
- }
- return (get_frame_extra_info (frame)->is_main ? 0
- : get_frame_base (frame) + get_frame_extra_info (frame)->framesize + 2 /* ret addr */ );
+ ULONGEST base;
+
+ frame_unwind_unsigned_register (next_frame, AVR_SP_REGNUM, &base);
+ return frame_id_build (avr_make_saddr (base), frame_pc_unwind (next_frame));
}
-/* Store the address of the place in which to copy the structure the
- subroutine will return. This is called from call_function.
+/* When arguments must be pushed onto the stack, they go on in reverse
+ order. The below implements a FILO (stack) to do this. */
- We store structs through a pointer passed in the first Argument
- register. */
+struct stack_item
+{
+ int len;
+ struct stack_item *prev;
+ void *data;
+};
-static void
-avr_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
+static struct stack_item *push_stack_item (struct stack_item *prev,
+ void *contents, int len);
+static struct stack_item *
+push_stack_item (struct stack_item *prev, void *contents, int len)
{
- write_register (0, addr);
+ struct stack_item *si;
+ si = xmalloc (sizeof (struct stack_item));
+ si->data = xmalloc (len);
+ si->len = len;
+ si->prev = prev;
+ memcpy (si->data, contents, len);
+ return si;
+}
+
+static struct stack_item *pop_stack_item (struct stack_item *si);
+static struct stack_item *
+pop_stack_item (struct stack_item *si)
+{
+ struct stack_item *dead = si;
+ si = si->prev;
+ xfree (dead->data);
+ xfree (dead);
+ return si;
}
/* Setup the function arguments for calling a function in the inferior.
@@ -1019,9 +1164,20 @@ avr_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
dedicated for passing function arguments. Up to the first 18 arguments
(depending on size) may go into these registers. The rest go on the stack.
- Arguments that are larger than WORDSIZE bytes will be split between two or
- more registers as available, but will NOT be split between a register and
- the stack.
+ All arguments are aligned to start in even-numbered registers (odd-sized
+ arguments, including char, have one free register above them). For example,
+ an int in arg1 and a char in arg2 would be passed as such:
+
+ arg1 -> r25:r24
+ arg2 -> r22
+
+ Arguments that are larger than 2 bytes will be split between two or more
+ registers as available, but will NOT be split between a register and the
+ stack. Arguments that go onto the stack are pushed last arg first (this is
+ similar to the d10v). */
+
+/* NOTE: TRoth/2003-06-17: The rest of this comment is old looks to be
+ inaccurate.
An exceptional case exists for struct arguments (and possibly other
aggregates such as arrays) -- if the size is larger than WORDSIZE bytes but
@@ -1042,65 +1198,87 @@ avr_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
registers R0 to R2. */
static CORE_ADDR
-avr_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
- int struct_return, CORE_ADDR struct_addr)
+avr_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 stack_alloc, stack_offset;
- int wordsize;
- int argreg;
- int argnum;
- struct type *type;
- CORE_ADDR regval;
- char *val;
- char valbuf[4];
- int len;
+ int i;
+ unsigned char buf[2];
+ CORE_ADDR return_pc = avr_convert_iaddr_to_raw (bp_addr);
+ int regnum = AVR_ARGN_REGNUM;
+ struct stack_item *si = NULL;
- wordsize = 1;
#if 0
- /* Now make sure there's space on the stack */
- for (argnum = 0, stack_alloc = 0; argnum < nargs; argnum++)
- stack_alloc += TYPE_LENGTH (VALUE_TYPE (args[argnum]));
- sp -= stack_alloc; /* make room on stack for args */
- /* we may over-allocate a little here, but that won't hurt anything */
-#endif
- argreg = 25;
- if (struct_return) /* "struct return" pointer takes up one argreg */
+ /* FIXME: TRoth/2003-06-18: Not sure what to do when returning a struct. */
+ if (struct_return)
{
- write_register (--argreg, struct_addr);
+ fprintf_unfiltered (gdb_stderr, "struct_return: 0x%lx\n", struct_addr);
+ write_register (argreg--, struct_addr & 0xff);
+ write_register (argreg--, (struct_addr >>8) & 0xff);
}
+#endif
- /* Now load as many as possible of the first arguments into registers, and
- push the rest onto the stack. There are 3N bytes in three registers
- available. Loop thru args from first to last. */
+ for (i = 0; i < nargs; i++)
+ {
+ int last_regnum;
+ int j;
+ struct value *arg = args[i];
+ struct type *type = check_typedef (VALUE_TYPE (arg));
+ char *contents = VALUE_CONTENTS (arg);
+ int len = TYPE_LENGTH (type);
+
+ /* Calculate the potential last register needed. */
+ last_regnum = regnum - (len + (len & 1));
+
+ /* If there are registers available, use them. Once we start putting
+ stuff on the stack, all subsequent args go on stack. */
+ if ((si == NULL) && (last_regnum >= 8))
+ {
+ ULONGEST val;
+
+ /* Skip a register for odd length args. */
+ if (len & 1)
+ regnum--;
+
+ val = extract_unsigned_integer (contents, len);
+ for (j=0; j<len; j++)
+ {
+ regcache_cooked_write_unsigned (regcache, regnum--,
+ val >> (8*(len-j-1)));
+ }
+ }
+ /* No registers available, push the args onto the stack. */
+ else
+ {
+ /* From here on, we don't care about regnum. */
+ si = push_stack_item (si, contents, len);
+ }
+ }
- for (argnum = 0, stack_offset = 0; argnum < nargs; argnum++)
+ /* Push args onto the stack. */
+ while (si)
{
- type = VALUE_TYPE (args[argnum]);
- len = TYPE_LENGTH (type);
- val = (char *) VALUE_CONTENTS (args[argnum]);
-
- /* NOTE WELL!!!!! This is not an "else if" clause!!! That's because
- some *&^%$ things get passed on the stack AND in the registers! */
- while (len > 0)
- { /* there's room in registers */
- len -= wordsize;
- regval = extract_address (val + len, wordsize);
- write_register (argreg--, regval);
- }
+ sp -= si->len;
+ /* Add 1 to sp here to account for post decr nature of pushes. */
+ write_memory (sp+1, si->data, si->len);
+ si = pop_stack_item (si);
}
- return sp;
-}
-/* Not all avr devices support the BREAK insn. Those that don't should treat
- it as a NOP. Thus, it should be ok. Since the avr is currently a remote
- only target, this shouldn't be a problem (I hope). TRoth/2003-05-14 */
+ /* Set the return address. For the avr, the return address is the BP_ADDR.
+ Need to push the return address onto the stack noting that it needs to be
+ in big-endian order on the stack. */
+ buf[0] = (return_pc >> 8) & 0xff;
+ buf[1] = return_pc & 0xff;
-const unsigned char *
-avr_breakpoint_from_pc (CORE_ADDR * pcptr, int *lenptr)
-{
- static unsigned char avr_break_insn [] = { 0x98, 0x95 };
- *lenptr = sizeof (avr_break_insn);
- return avr_break_insn;
+ sp -= 2;
+ write_memory (sp+1, buf, 2); /* Add one since pushes are post decr ops. */
+
+ /* Finally, update the SP register. */
+ regcache_cooked_write_unsigned (regcache, AVR_SP_REGNUM,
+ avr_convert_saddr_to_raw (sp));
+
+ return sp;
}
/* Initialize the gdbarch structure for the AVR's. */
@@ -1108,12 +1286,6 @@ avr_breakpoint_from_pc (CORE_ADDR * pcptr, int *lenptr)
static struct gdbarch *
avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
- /* FIXME: TRoth/2002-02-18: I have no idea if avr_call_dummy_words[] should
- be bigger or not. Initial testing seems to show that `call my_func()`
- works and backtrace from a breakpoint within the call looks correct.
- Admittedly, I haven't tested with more than a very simple program. */
- static LONGEST avr_call_dummy_words[] = { 0 };
-
struct gdbarch *gdbarch;
struct gdbarch_tdep *tdep;
@@ -1126,10 +1298,6 @@ avr_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);
-
/* If we ever need to differentiate the device types, do it here. */
switch (info.bfd_arch_info->mach)
{
@@ -1147,7 +1315,6 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_long_long_bit (gdbarch, 8 * TARGET_CHAR_BIT);
set_gdbarch_ptr_bit (gdbarch, 2 * TARGET_CHAR_BIT);
set_gdbarch_addr_bit (gdbarch, 32);
- set_gdbarch_bfd_vma_bit (gdbarch, 32); /* FIXME: TRoth/2002-02-18: Is this needed? */
set_gdbarch_float_bit (gdbarch, 4 * TARGET_CHAR_BIT);
set_gdbarch_double_bit (gdbarch, 4 * TARGET_CHAR_BIT);
@@ -1159,44 +1326,27 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_read_pc (gdbarch, avr_read_pc);
set_gdbarch_write_pc (gdbarch, avr_write_pc);
- set_gdbarch_deprecated_target_read_fp (gdbarch, avr_read_fp);
set_gdbarch_read_sp (gdbarch, avr_read_sp);
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, avr_write_sp);
set_gdbarch_num_regs (gdbarch, AVR_NUM_REGS);
set_gdbarch_sp_regnum (gdbarch, AVR_SP_REGNUM);
- set_gdbarch_deprecated_fp_regnum (gdbarch, AVR_FP_REGNUM);
set_gdbarch_pc_regnum (gdbarch, AVR_PC_REGNUM);
set_gdbarch_register_name (gdbarch, avr_register_name);
- set_gdbarch_deprecated_register_size (gdbarch, 1);
- set_gdbarch_deprecated_register_bytes (gdbarch, AVR_NUM_REG_BYTES);
- set_gdbarch_register_byte (gdbarch, avr_register_byte);
- set_gdbarch_register_raw_size (gdbarch, avr_register_raw_size);
- set_gdbarch_deprecated_max_register_raw_size (gdbarch, 4);
- set_gdbarch_register_virtual_size (gdbarch, avr_register_virtual_size);
- set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 4);
- set_gdbarch_register_virtual_type (gdbarch, avr_register_virtual_type);
+ set_gdbarch_register_type (gdbarch, avr_register_type);
+ set_gdbarch_extract_return_value (gdbarch, avr_extract_return_value);
set_gdbarch_print_insn (gdbarch, print_insn_avr);
set_gdbarch_call_dummy_address (gdbarch, avr_call_dummy_address);
- set_gdbarch_deprecated_call_dummy_words (gdbarch, avr_call_dummy_words);
-
-/* set_gdbarch_believe_pcc_promotion (gdbarch, 1); // TRoth: should this be set? */
+ set_gdbarch_push_dummy_call (gdbarch, avr_push_dummy_call);
set_gdbarch_address_to_pointer (gdbarch, avr_address_to_pointer);
set_gdbarch_pointer_to_address (gdbarch, avr_pointer_to_address);
- set_gdbarch_deprecated_push_arguments (gdbarch, avr_push_arguments);
- set_gdbarch_deprecated_push_return_address (gdbarch, avr_push_return_address);
- set_gdbarch_deprecated_pop_frame (gdbarch, avr_pop_frame);
set_gdbarch_use_struct_convention (gdbarch, generic_use_struct_convention);
- set_gdbarch_deprecated_store_struct_return (gdbarch, avr_store_struct_return);
- set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, avr_scan_prologue);
- set_gdbarch_deprecated_init_extra_frame_info (gdbarch, avr_init_extra_frame_info);
set_gdbarch_skip_prologue (gdbarch, avr_skip_prologue);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
@@ -1204,19 +1354,17 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_breakpoint_from_pc (gdbarch, avr_breakpoint_from_pc);
set_gdbarch_function_start_offset (gdbarch, 0);
- set_gdbarch_remote_translate_xfer_address (gdbarch,
- avr_remote_translate_xfer_address);
+
set_gdbarch_frame_args_skip (gdbarch, 0);
- set_gdbarch_frameless_function_invocation (gdbarch, frameless_look_for_prologue); /* ??? */
- set_gdbarch_deprecated_frame_chain (gdbarch, avr_frame_chain);
- set_gdbarch_deprecated_frame_saved_pc (gdbarch, avr_frame_saved_pc);
- set_gdbarch_frame_args_address (gdbarch, avr_frame_address);
- set_gdbarch_frame_locals_address (gdbarch, avr_frame_address);
- set_gdbarch_deprecated_saved_pc_after_call (gdbarch, avr_saved_pc_after_call);
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
+ set_gdbarch_frameless_function_invocation (gdbarch,
+ frameless_look_for_prologue);
+
+ frame_unwind_append_predicate (gdbarch, avr_frame_p);
+ frame_base_set_default (gdbarch, &avr_frame_base);
- set_gdbarch_convert_from_func_ptr_addr (gdbarch,
- avr_convert_from_func_ptr_addr);
+ set_gdbarch_unwind_dummy_id (gdbarch, avr_unwind_dummy_id);
+
+ set_gdbarch_unwind_pc (gdbarch, avr_unwind_pc);
return gdbarch;
}
@@ -1245,13 +1393,11 @@ avr_io_reg_read_command (char *args, int from_tty)
unsigned int val;
int i, j, k, step;
-/* fprintf_unfiltered (gdb_stderr, "DEBUG: avr_io_reg_read_command (\"%s\", %d)\n", */
-/* args, from_tty); */
-
if (!current_target.to_query)
{
fprintf_unfiltered (gdb_stderr,
- "ERR: info io_registers NOT supported by current target\n");
+ "ERR: info io_registers NOT supported by current "
+ "target\n");
return;
}
@@ -1311,6 +1457,8 @@ avr_io_reg_read_command (char *args, int from_tty)
}
}
+extern initialize_file_ftype _initialize_avr_tdep; /* -Wmissing-prototypes */
+
void
_initialize_avr_tdep (void)
{
diff --git a/gdb/block.c b/gdb/block.c
index c2bae05dbeb..8729a24b576 100644
--- a/gdb/block.c
+++ b/gdb/block.c
@@ -71,17 +71,18 @@ block_function (const 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/blockframe.c b/gdb/blockframe.c
index 9788409563b..37debe0a952 100644
--- a/gdb/blockframe.c
+++ b/gdb/blockframe.c
@@ -144,7 +144,7 @@ inside_entry_func (CORE_ADDR pc)
int
frameless_look_for_prologue (struct frame_info *frame)
{
- CORE_ADDR func_start, after_prologue;
+ CORE_ADDR func_start;
func_start = get_frame_func (frame);
if (func_start)
@@ -223,28 +223,31 @@ get_frame_block (struct frame_info *frame, CORE_ADDR *addr_in_block)
CORE_ADDR
get_pc_function_start (CORE_ADDR pc)
{
- register struct block *bl;
- register struct symbol *symbol;
- register struct minimal_symbol *msymbol;
- CORE_ADDR fstart;
+ struct block *bl;
+ struct minimal_symbol *msymbol;
- if ((bl = block_for_pc (pc)) != NULL &&
- (symbol = block_function (bl)) != NULL)
- {
- bl = SYMBOL_BLOCK_VALUE (symbol);
- fstart = BLOCK_START (bl);
- }
- else if ((msymbol = lookup_minimal_symbol_by_pc (pc)) != NULL)
+ bl = block_for_pc (pc);
+ if (bl)
{
- fstart = SYMBOL_VALUE_ADDRESS (msymbol);
- if (!find_pc_section (fstart))
- return 0;
+ struct symbol *symbol = block_function (bl);
+
+ if (symbol)
+ {
+ bl = SYMBOL_BLOCK_VALUE (symbol);
+ return BLOCK_START (bl);
+ }
}
- else
+
+ msymbol = lookup_minimal_symbol_by_pc (pc);
+ if (msymbol)
{
- fstart = 0;
+ CORE_ADDR fstart = SYMBOL_VALUE_ADDRESS (msymbol);
+
+ if (find_pc_section (fstart))
+ return fstart;
}
- return (fstart);
+
+ return 0;
}
/* Return the symbol for the function executing in frame FRAME. */
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 3d7935fbcba..79f0071700a 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -704,6 +704,35 @@ read_memory_nobpt (CORE_ADDR memaddr, char *myaddr, unsigned len)
}
+/* A wrapper function for inserting catchpoints. */
+int
+insert_catchpoint (struct ui_out *uo, void *args)
+{
+ struct breakpoint *b = (struct breakpoint *) args;
+ int val = -1;
+
+ switch (b->type)
+ {
+ case bp_catch_fork:
+ val = target_insert_fork_catchpoint (PIDGET (inferior_ptid));
+ break;
+ case bp_catch_vfork:
+ val = target_insert_vfork_catchpoint (PIDGET (inferior_ptid));
+ break;
+ case bp_catch_exec:
+ val = target_insert_exec_catchpoint (PIDGET (inferior_ptid));
+ break;
+ default:
+ internal_error (__FILE__, __LINE__, "unknown breakpoint type");
+ break;
+ }
+
+ if (val < 0)
+ throw_exception (RETURN_ERROR);
+
+ return 0;
+}
+
/* insert_breakpoints is used when starting or continuing the program.
remove_breakpoints is used when the program stops.
Both return zero if successful,
@@ -1055,32 +1084,15 @@ insert_breakpoints (void)
&& !b->inserted
&& !b->duplicate)
{
- val = -1;
- switch (b->type)
- {
- case bp_catch_fork:
- val = target_insert_fork_catchpoint (PIDGET (inferior_ptid));
- break;
- case bp_catch_vfork:
- val = target_insert_vfork_catchpoint (PIDGET (inferior_ptid));
- break;
- case bp_catch_exec:
- val = target_insert_exec_catchpoint (PIDGET (inferior_ptid));
- break;
- default:
- warning ("Internal error, %s line %d.", __FILE__, __LINE__);
- break;
- }
+ char prefix[64];
+
+ sprintf (prefix, "warning: inserting catchpoint %d: ", b->number);
+ val = catch_exceptions (uiout, insert_catchpoint, b, prefix,
+ RETURN_MASK_ERROR);
if (val < 0)
- {
- fprintf_unfiltered (tmp_error_stream,
- "Cannot insert catchpoint %d.", b->number);
- }
+ b->enable_state = bp_disabled;
else
b->inserted = 1;
-
- if (val)
- return_val = val; /* remember failure */
}
}
@@ -4608,7 +4620,7 @@ create_breakpoints (struct symtabs_and_lines sals, char **addr_string,
addresses found. ADDR_STRING contains a vector of (canonical)
address strings. ARG points to the end of the SAL. */
-void
+static void
parse_breakpoint_sals (char **address,
struct symtabs_and_lines *sals,
char ***addr_string)
@@ -4675,7 +4687,7 @@ parse_breakpoint_sals (char **address,
/* Convert each SAL into a real PC. Verify that the PC can be
inserted as a breakpoint. If it can't throw an error. */
-void
+static void
breakpoint_sals_to_pc (struct symtabs_and_lines *sals,
char *address)
{
@@ -6083,7 +6095,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;
}
@@ -6099,7 +6111,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/buildsym.c b/gdb/buildsym.c
index 71980ab5d09..63f60546056 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -309,12 +309,12 @@ finish_block (struct symbol *symbol, struct pending **listhead,
TYPE_FIELDS (ftype) = (struct field *)
TYPE_ALLOC (ftype, nparams * sizeof (struct field));
- for (sym = dict_iterator_first (BLOCK_DICT (block), &iter),
- iparams = 0;
- iparams < nparams;
- sym = dict_iterator_next (&iter))
+ iparams = 0;
+ ALL_BLOCK_SYMBOLS (block, iter, sym)
{
- gdb_assert (sym != NULL);
+ if (iparams == nparams)
+ break;
+
switch (SYMBOL_CLASS (sym))
{
case LOC_ARG:
@@ -439,6 +439,7 @@ finish_block (struct symbol *symbol, struct pending **listhead,
record_pending_block (objfile, block, opblock);
}
+
/* Record BLOCK on the list of all blocks in the file. Put it after
OPBLOCK, or at the beginning if opblock is NULL. This puts the
block in the list after all its subblocks.
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
index 3b4ac2ab3e0..d8b9a264293 100644
--- a/gdb/c-valprint.c
+++ b/gdb/c-valprint.c
@@ -213,6 +213,8 @@ 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 block *block = (struct block *) NULL;
+ int is_this_fld;
if (msymbol != NULL)
wsym = lookup_symbol_minsym (msymbol);
@@ -589,7 +591,8 @@ c_value_print (struct value *val, struct ui_file *stream, int format,
/* Otherwise, we end up at the return outside this "if" */
}
- return val_print (type, VALUE_CONTENTS_ALL (val), VALUE_EMBEDDED_OFFSET (val),
- VALUE_ADDRESS (val),
+ return val_print (type, VALUE_CONTENTS_ALL (val),
+ VALUE_EMBEDDED_OFFSET (val),
+ VALUE_ADDRESS (val) + VALUE_OFFSET (val),
stream, format, 1, 0, pretty);
}
diff --git a/gdb/charset.c b/gdb/charset.c
index 0062e281e99..c311447ea44 100644
--- a/gdb/charset.c
+++ b/gdb/charset.c
@@ -1163,6 +1163,7 @@ target_char_to_host (int target_char, int *host_char)
/* The charset.c module initialization function. */
+extern initialize_file_ftype _initialize_charset; /* -Wmissing-prototype */
void
_initialize_charset (void)
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index 108329a50c7..45794f7599f 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -26,6 +26,7 @@
#include "gdb_wait.h" /* For shell escape implementation */
#include "gdb_regex.h" /* Used by apropos_command */
#include "gdb_string.h"
+#include "gdb_vfork.h"
#include "linespec.h"
#include "expression.h"
#include "frame.h"
@@ -48,18 +49,6 @@
#define GDBINIT_FILENAME ".gdbinit"
#endif
-/* From gdb/top.c */
-
-extern void dont_repeat (void);
-
-extern void set_verbose (char *, int, struct cmd_list_element *);
-
-extern void show_history (char *, int);
-
-extern void set_history (char *, int);
-
-extern void show_commands (char *, int);
-
/* Prototypes for local command functions */
static void complete_command (char *, int);
@@ -510,19 +499,20 @@ shell_escape (char *arg, int from_tty)
#endif
#else /* Can fork. */
int rc, status, pid;
- char *p, *user_shell;
- if ((user_shell = (char *) getenv ("SHELL")) == NULL)
- user_shell = "/bin/sh";
+ if ((pid = vfork ()) == 0)
+ {
+ char *p, *user_shell;
- /* Get the name of the shell for arg0 */
- if ((p = strrchr (user_shell, '/')) == NULL)
- p = user_shell;
- else
- p++; /* Get past '/' */
+ if ((user_shell = (char *) getenv ("SHELL")) == NULL)
+ user_shell = "/bin/sh";
+
+ /* Get the name of the shell for arg0 */
+ if ((p = strrchr (user_shell, '/')) == NULL)
+ p = user_shell;
+ else
+ p++; /* Get past '/' */
- if ((pid = fork ()) == 0)
- {
if (!arg)
execl (user_shell, p, 0);
else
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c
index 2a6d196930e..be516c9a6f3 100644
--- a/gdb/cli/cli-decode.c
+++ b/gdb/cli/cli-decode.c
@@ -183,20 +183,6 @@ add_cmd (char *name, enum command_class class, void (*fun) (char *, int),
return c;
}
-/* Same as above, except that the abbrev_flag is set. */
-/* Note: Doesn't seem to be used anywhere currently. */
-
-struct cmd_list_element *
-add_abbrev_cmd (char *name, enum command_class class, void (*fun) (char *, int),
- char *doc, struct cmd_list_element **list)
-{
- register struct cmd_list_element *c
- = add_cmd (name, class, fun, doc, list);
-
- c->abbrev_flag = 1;
- return c;
-}
-
/* Deprecates a command CMD.
REPLACEMENT is the name of the command which should be used in place
of this command, or NULL if no such command exists.
diff --git a/gdb/cli/cli-dump.c b/gdb/cli/cli-dump.c
index 6bd40e033b1..7b88975c6d4 100644
--- a/gdb/cli/cli-dump.c
+++ b/gdb/cli/cli-dump.c
@@ -698,6 +698,8 @@ binary_append_command (char *cmd, int from_tty)
help_list (binary_append_cmdlist, "append binary ", -1, gdb_stdout);
}
+extern initialize_file_ftype _initialize_cli_dump; /* -Wmissing-prototypes */
+
void
_initialize_cli_dump (void)
{
diff --git a/gdb/cli/cli-interp.c b/gdb/cli/cli-interp.c
index e2116e70c58..45679f07b98 100644
--- a/gdb/cli/cli-interp.c
+++ b/gdb/cli/cli-interp.c
@@ -118,6 +118,8 @@ safe_execute_command (struct ui_out *uiout, char *command, int from_tty)
/* standard gdb initialization hook */
+extern initialize_file_ftype _initialize_cli_interp; /* -Wmissing-prototypes */
+
void
_initialize_cli_interp (void)
{
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index d68c365959d..0f789bb1627 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -34,12 +34,6 @@
#include "cli/cli-decode.h"
#include "cli/cli-script.h"
-/* From gdb/top.c */
-
-extern void dont_repeat (void);
-
-extern void do_restore_instream_cleanup (void *stream);
-
/* Prototypes for local functions */
static struct cleanup *
@@ -216,7 +210,7 @@ print_command_lines (struct ui_out *uiout, struct command_line *cmd,
/* Handle pre-post hooks. */
-void
+static void
clear_hook_in_cleanup (void *data)
{
struct cmd_list_element *c = data;
@@ -248,7 +242,7 @@ execute_cmd_post_hook (struct cmd_list_element *c)
}
/* Execute the command in CMD. */
-void
+static void
do_restore_user_call_depth (void * call_depth)
{
int * depth = call_depth;
diff --git a/gdb/coffread.c b/gdb/coffread.c
index 2b827c70841..00b6b7f14f5 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -45,6 +45,7 @@
#include "target.h"
#include "gdb_assert.h"
#include "block.h"
+#include "dictionary.h"
#include "coff-pe-read.h"
#include "dictionary.h"
@@ -869,7 +870,6 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
print_address_symbolic work right without the (now
gone) "set fast-symbolic-addr off" kludge. */
- /* FIXME: should use mst_abs, and not relocate, if absolute. */
enum minimal_symbol_type ms_type;
int sec;
@@ -891,12 +891,23 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
|| cs->c_sclass == C_THUMBEXT ?
mst_bss : mst_file_bss;
}
+ else if (cs->c_secnum == N_ABS)
+ {
+ /* Use the correct minimal symbol type (and don't
+ relocate) for absolute values. */
+ ms_type = mst_abs;
+ sec = cs_to_section (cs, objfile);
+ tmpaddr = cs->c_value;
+ }
else
{
sec = cs_to_section (cs, objfile);
tmpaddr = cs->c_value;
- if (cs->c_sclass == C_EXT || cs->c_sclass == C_THUMBEXTFUNC
- || cs->c_sclass == C_THUMBEXT)
+ /* Statics in a PE file also get relocated */
+ if (cs->c_sclass == C_EXT
+ || cs->c_sclass == C_THUMBEXTFUNC
+ || cs->c_sclass == C_THUMBEXT
+ || (pe_file && (cs->c_sclass == C_STAT)))
tmpaddr += ANOFFSET (objfile->section_offsets, sec);
if (sec == SECT_OFF_TEXT (objfile))
diff --git a/gdb/config.in b/gdb/config.in
index 450051976a4..787afb26ce4 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
@@ -438,6 +441,9 @@
Solaris 2.[78] when using GCC. */
#undef _MSE_INT_H
+/* Define to 1 if we found this declaration otherwise define to 0. */
+#undef HAVE_DECL_GETOPT
+
/* Define if sigsetjmp is available. */
#undef HAVE_SIGSETJMP
@@ -513,6 +519,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.mh b/gdb/config/alpha/alpha-linux.mh
index 7691d0729eb..d3731795020 100644
--- a/gdb/config/alpha/alpha-linux.mh
+++ b/gdb/config/alpha/alpha-linux.mh
@@ -2,7 +2,8 @@
XM_FILE= xm-alphalinux.h
NAT_FILE= nm-linux.h
NATDEPFILES= infptrace.o inftarg.o corelow.o alpha-nat.o linux-proc.o \
- fork-child.o proc-service.o thread-db.o lin-lwp.o gcore.o
+ fork-child.o proc-service.o thread-db.o lin-lwp.o gcore.o \
+ linux-nat.o
LOADLIBES = -ldl -rdynamic
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/arm/linux.mh b/gdb/config/arm/linux.mh
index fa1eb63d67f..1b0a3ba46d4 100644
--- a/gdb/config/arm/linux.mh
+++ b/gdb/config/arm/linux.mh
@@ -5,7 +5,7 @@ XM_FILE= xm-linux.h
NAT_FILE= nm-linux.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o \
core-regset.o arm-linux-nat.o linux-proc.o gcore.o \
- proc-service.o thread-db.o lin-lwp.o
+ proc-service.o thread-db.o lin-lwp.o linux-nat.o
LOADLIBES= -ldl -rdynamic
diff --git a/gdb/config/arm/linux.mt b/gdb/config/arm/linux.mt
index e1996ab0639..c17b2e5ec53 100644
--- a/gdb/config/arm/linux.mt
+++ b/gdb/config/arm/linux.mt
@@ -1,5 +1,3 @@
# Target: ARM based machine running GNU/Linux
TM_FILE= tm-linux.h
TDEPFILES= arm-tdep.o arm-linux-tdep.o solib.o solib-svr4.o solib-legacy.o
-
-GDBSERVER_DEPFILES = linux-low.o linux-arm-low.o reg-arm.o
diff --git a/gdb/config/arm/nm-linux.h b/gdb/config/arm/nm-linux.h
index 7e0156db43c..3de00c915ca 100644
--- a/gdb/config/arm/nm-linux.h
+++ b/gdb/config/arm/nm-linux.h
@@ -27,11 +27,6 @@
#define U_REGS_OFFSET 0
-#ifdef GDBSERVER
-#define REGISTER_U_ADDR(addr,blockend,regno) \
- (addr) = arm_register_u_addr ((blockend),(regno))
-#endif /* GDBSERVER */
-
/* Return sizeof user struct to callers in less machine dependent routines */
extern int kernel_u_size (void);
#define KERNEL_U_SIZE arm_linux_kernel_u_size()
diff --git a/gdb/config/arm/tm-linux.h b/gdb/config/arm/tm-linux.h
index bbf566d2d83..995ba7312fb 100644
--- a/gdb/config/arm/tm-linux.h
+++ b/gdb/config/arm/tm-linux.h
@@ -21,19 +21,11 @@
#ifndef TM_ARMLINUX_H
#define TM_ARMLINUX_H
-#ifdef GDBSERVER
-#define ARM_GNULINUX_TARGET
-#endif
-
/* Include the common ARM target definitions. */
#include "arm/tm-arm.h"
#include "config/tm-linux.h"
-/* Use target-specific function to define link map offsets. */
-extern struct link_map_offsets *arm_linux_svr4_fetch_link_map_offsets (void);
-#define SVR4_FETCH_LINK_MAP_OFFSETS() arm_linux_svr4_fetch_link_map_offsets ()
-
/* Offset to saved PC in sigcontext structure, from <asm/sigcontext.h> */
#define SIGCONTEXT_PC_OFFSET (sizeof(unsigned long) * 18)
diff --git a/gdb/config/djgpp/fnchange.lst b/gdb/config/djgpp/fnchange.lst
index 386fcf09fe4..96b0c431e45 100644
--- a/gdb/config/djgpp/fnchange.lst
+++ b/gdb/config/djgpp/fnchange.lst
@@ -168,7 +168,6 @@
@V@/gdb/regformats/reg-i386-linux.dat @V@/gdb/regformats/r-i386-lnx.dat
@V@/gdb/regformats/reg-s390x.dat @V@/gdb/regformats/r-s390x.dat
@V@/gdb/remote-adapt.c @V@/gdb/rmt-adapt.c
-@V@/gdb/remote-array.c @V@/gdb/rmt-array.c
@V@/gdb/remote-e7000.c @V@/gdb/rmt-e7000.c
@V@/gdb/remote-eb.c @V@/gdb/rmt-eb.c
@V@/gdb/remote-est.c @V@/gdb/rmt-est.c
@@ -252,6 +251,8 @@
@V@/gdb/testsuite/gdb.c++/ovldbreak.exp @V@/gdb/testsuite/gdb.cxx/ovldbreak.exp
@V@/gdb/testsuite/gdb.c++/pr-1023.cc @V@/gdb/testsuite/gdb.cxx/pr-1023.cc
@V@/gdb/testsuite/gdb.c++/pr-1023.exp @V@/gdb/testsuite/gdb.cxx/pr-1023.exp
+@V@/gdb/testsuite/gdb.c++/pr-1210.cc @V@/gdb/testsuite/gdb.cxx/pr-1210.cc
+@V@/gdb/testsuite/gdb.c++/pr-1210.exp @V@/gdb/testsuite/gdb.cxx/pr-1210.exp
@V@/gdb/testsuite/gdb.c++/pr-574.cc @V@/gdb/testsuite/gdb.cxx/pr-574.cc
@V@/gdb/testsuite/gdb.c++/pr-574.exp @V@/gdb/testsuite/gdb.cxx/pr-574.exp
@V@/gdb/testsuite/gdb.c++/printmethod.cc @V@/gdb/testsuite/gdb.cxx/printmethod.cc
@@ -426,6 +427,8 @@
@V@/sim/mn10300/dv-mn103tim.c @V@/sim/mn10300/dv-mn1tim.c
@V@/sim/ppc/.gdbinit @V@/sim/ppc/gdb.ini
@V@/sim/ppc/corefile-n.h @V@/sim/ppc/corefle-n.h
+@V@/sim/ppc/altivec_expression.h @V@/sim/ppc/av_expression.h
+@V@/sim/ppc/altivec_registers.h @V@/sim/ppc/av_registers.h
@V@/sim/ppc/idecode_branch.h @V@/sim/ppc/idec_branch.h
@V@/sim/ppc/idecode_expression.h @V@/sim/ppc/idec_expression.h
@V@/sim/ppc/idecode_fields.h @V@/sim/ppc/idec_fields.h
diff --git a/gdb/config/h8300/tm-h8300.h b/gdb/config/h8300/tm-h8300.h
index 4e600575045..e560c644c8d 100644
--- a/gdb/config/h8300/tm-h8300.h
+++ b/gdb/config/h8300/tm-h8300.h
@@ -28,10 +28,11 @@
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 */
-#define REMOTE_BREAKPOINT { 0x57, 0x30} /* trapa #3 */
+#define DEPRECATED_REMOTE_BREAKPOINT { 0x57, 0x30} /* trapa #3 */
/* Needed for remote-hms.c */
#define CCR_REGNUM 8
/* Needed for remote-e7000.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/linux.mh b/gdb/config/i386/linux.mh
index 494ccf1a4a4..2a20cdd9749 100644
--- a/gdb/config/i386/linux.mh
+++ b/gdb/config/i386/linux.mh
@@ -5,7 +5,8 @@ XM_FILE= xm-i386.h
NAT_FILE= nm-linux.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o linux-proc.o \
core-aout.o i386-nat.o i386-linux-nat.o \
- proc-service.o thread-db.o lin-lwp.o linux-proc.o gcore.o
+ proc-service.o thread-db.o lin-lwp.o linux-proc.o gcore.o \
+ linux-nat.o
# The dynamically loaded libthread_db needs access to symbols in the
# gdb executable.
diff --git a/gdb/config/i386/linux.mt b/gdb/config/i386/linux.mt
index 43bc2d26b73..2d27a02638e 100644
--- a/gdb/config/i386/linux.mt
+++ b/gdb/config/i386/linux.mt
@@ -2,5 +2,3 @@
TDEPFILES= i386-tdep.o i386-linux-tdep.o i387-tdep.o \
solib.o solib-svr4.o solib-legacy.o
TM_FILE= tm-linux.h
-
-GDBSERVER_DEPFILES = linux-low.o linux-i386-low.o reg-i386.o
diff --git a/gdb/config/i386/nm-x86-64linux.h b/gdb/config/i386/nm-x86-64linux.h
index 4430fcba5db..8ff80957d57 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,13 @@ 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
-#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-i386.h b/gdb/config/i386/tm-i386.h
index e80b258e7d8..395c9b259b1 100644
--- a/gdb/config/i386/tm-i386.h
+++ b/gdb/config/i386/tm-i386.h
@@ -24,8 +24,4 @@
#define GDB_MULTI_ARCH GDB_MULTI_ARCH_PARTIAL
-/* FIXME: kettenis/2000-06-12: These do not belong here. */
-extern void print_387_control_word (unsigned int);
-extern void print_387_status_word (unsigned int);
-
#endif /* ifndef TM_I386_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..0c3c855e018 100644
--- a/gdb/config/i386/x86-64linux.mh
+++ b/gdb/config/i386/x86-64linux.mh
@@ -4,8 +4,10 @@ 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 \
+ 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/ia64/linux.mh b/gdb/config/ia64/linux.mh
index 65f30284e1c..2013af35505 100644
--- a/gdb/config/ia64/linux.mh
+++ b/gdb/config/ia64/linux.mh
@@ -5,6 +5,6 @@ XM_FILE= xm-linux.h
NAT_FILE= nm-linux.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o gcore.o \
core-aout.o core-regset.o ia64-linux-nat.o linux-proc.o \
- proc-service.o thread-db.o lin-lwp.o
+ proc-service.o thread-db.o lin-lwp.o linux-nat.o
LOADLIBES = -ldl -rdynamic
diff --git a/gdb/config/ia64/linux.mt b/gdb/config/ia64/linux.mt
index d841f75f37f..3a661b3d947 100644
--- a/gdb/config/ia64/linux.mt
+++ b/gdb/config/ia64/linux.mt
@@ -2,5 +2,3 @@
TDEPFILES= ia64-tdep.o ia64-aix-tdep.o ia64-linux-tdep.o \
solib.o solib-svr4.o solib-legacy.o
TM_FILE= tm-linux.h
-
-GDBSERVER_DEPFILES = linux-low.o linux-ia64-low.o reg-ia64.o
diff --git a/gdb/config/ia64/nm-linux.h b/gdb/config/ia64/nm-linux.h
index e00d561b6a3..0418495c111 100644
--- a/gdb/config/ia64/nm-linux.h
+++ b/gdb/config/ia64/nm-linux.h
@@ -34,13 +34,6 @@ extern int ia64_cannot_fetch_register (int regno);
#define CANNOT_STORE_REGISTER(regno) ia64_cannot_store_register(regno)
extern int ia64_cannot_store_register (int regno);
-#ifdef GDBSERVER
-#define REGISTER_U_ADDR(addr, blockend, regno) \
- (addr) = ia64_register_u_addr ((blockend),(regno));
-
-extern int ia64_register_u_addr(int, int);
-#endif /* GDBSERVER */
-
#define U_REGS_OFFSET 0
#define PTRACE_ARG3_TYPE long
diff --git a/gdb/config/ia64/tm-ia64.h b/gdb/config/ia64/tm-ia64.h
index 2445395974d..1b2baacd5a0 100644
--- a/gdb/config/ia64/tm-ia64.h
+++ b/gdb/config/ia64/tm-ia64.h
@@ -21,59 +21,8 @@
#ifndef TM_IA64_H
#define TM_IA64_H
-#if !defined(GDBSERVER)
-
#define GDB_MULTI_ARCH 1
-#else /* defines needed for GDBSERVER */
-
-/* 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 8
-
-#undef NUM_REGS
-#define NUM_REGS 590
-
-/* Some pseudo register numbers */
-
-#define PC_REGNUM IA64_IP_REGNUM
-#define SP_REGNUM IA64_GR12_REGNUM
-#define DEPRECATED_FP_REGNUM IA64_VFP_REGNUM
-
-/* Total amount of space needed to store our copies of the machine's
- register state, the array `registers'. On the ia64, all registers
- fit in 64 bits except for the floating point registers which require
- 84 bits. But 84 isn't a nice number, so we'll just allocate 128
- bits for each of these. The expression below says that we
- need 8 bytes for each register, plus an additional 8 bytes for each
- of the 128 floating point registers. */
-
-#define DEPRECATED_REGISTER_BYTES (NUM_REGS*8+128*8)
-
-/* Index within `registers' of the first byte of the space for
- register N. */
-
-#define REGISTER_BYTE(N) (((N) * 8) \
- + ((N) <= IA64_FR0_REGNUM ? 0 : 8 * (((N) > IA64_FR127_REGNUM) ? 128 : (N) - IA64_FR0_REGNUM)))
-
-/* Number of bytes of storage in the actual machine representation
- for register N. */
-
-#define REGISTER_RAW_SIZE(N) \
- ((IA64_FR0_REGNUM <= (N) && (N) <= IA64_FR127_REGNUM) ? 16 : 8)
-
-/* Largest value REGISTER_RAW_SIZE can have. */
-
-#define DEPRECATED_MAX_REGISTER_RAW_SIZE 16
-
-
-#define GDBSERVER_RESUME_REGS { IA64_IP_REGNUM, IA64_PSR_REGNUM, SP_REGNUM, IA64_BSP_REGNUM, IA64_CFM_REGNUM }
-
-#endif /* GDBSERVER */
-
-
/* Register numbers of various important registers */
/* General registers; there are 128 of these 64 bit wide registers. The
diff --git a/gdb/config/m68k/linux.mh b/gdb/config/m68k/linux.mh
index f94df64c104..7de2c3f6e13 100644
--- a/gdb/config/m68k/linux.mh
+++ b/gdb/config/m68k/linux.mh
@@ -5,10 +5,8 @@ XM_FILE= xm-linux.h
NAT_FILE= nm-linux.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o \
corelow.o core-aout.o m68klinux-nat.o linux-proc.o gcore.o \
- proc-service.o thread-db.o lin-lwp.o
+ proc-service.o thread-db.o lin-lwp.o linux-nat.o
# The dynamically loaded libthread_db needs access to symbols in the
# gdb executable.
LOADLIBES = -ldl -rdynamic
-
-GDBSERVER_DEPFILES = linux-low.o linux-m68k-low.o reg-m68k.o
diff --git a/gdb/config/m68k/tm-delta68.h b/gdb/config/m68k/tm-delta68.h
index 03172b0dd75..25b747ec8eb 100644
--- a/gdb/config/m68k/tm-delta68.h
+++ b/gdb/config/m68k/tm-delta68.h
@@ -49,7 +49,7 @@ struct frame_info;
#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
- REGISTER_CONVERT_TO_VIRTUAL (FP0_REGNUM, TYPE, \
+ DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (FP0_REGNUM, TYPE, \
&REGBUF[REGISTER_BYTE (FP0_REGNUM)], \
VALBUF); \
else \
@@ -69,7 +69,7 @@ struct frame_info;
if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
{ \
char raw_buf[REGISTER_RAW_SIZE (FP0_REGNUM)]; \
- REGISTER_CONVERT_TO_RAW (TYPE, FP0_REGNUM, VALBUF, raw_buf); \
+ DEPRECATED_REGISTER_CONVERT_TO_RAW (TYPE, FP0_REGNUM, VALBUF, raw_buf); \
deprecated_write_register_bytes (REGISTER_BYTE (FP0_REGNUM), \
raw_buf, REGISTER_RAW_SIZE (FP0_REGNUM)); \
} \
@@ -105,5 +105,5 @@ extern CORE_ADDR delta68_frame_saved_pc (struct frame_info *fi);
#define DEPRECATED_FRAME_SAVED_PC(fi) delta68_frame_saved_pc (fi)
extern CORE_ADDR delta68_frame_args_address (struct frame_info *fi);
-#undef FRAME_ARGS_ADDRESS
-#define FRAME_ARGS_ADDRESS(fi) delta68_frame_args_address (fi)
+#undef DEPRECATED_FRAME_ARGS_ADDRESS
+#define DEPRECATED_FRAME_ARGS_ADDRESS(fi) delta68_frame_args_address (fi)
diff --git a/gdb/config/m68k/tm-linux.h b/gdb/config/m68k/tm-linux.h
index 636df0bb733..fc191b16404 100644
--- a/gdb/config/m68k/tm-linux.h
+++ b/gdb/config/m68k/tm-linux.h
@@ -20,28 +20,11 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "config/tm-linux.h"
-#include "m68k/tm-m68k.h"
-
-#include "regcache.h"
-
-/* Number of traps that happen between exec'ing the shell to run an
- inferior, and when we finally get to the inferior code. This is 2
- on most implementations. */
-
-#define START_INFERIOR_TRAPS_EXPECTED 2
-
-/* Offsets (in target ints) into jmp_buf. */
-
-#define JB_ELEMENT_SIZE 4
-#define JB_PC 7
-
-/* Figure out where the longjmp will land. Slurp the args out of the stack.
- We expect the first arg to be a pointer to the jmp_buf structure from which
- we extract the pc (JB_PC) that we will land at. The pc is copied into ADDR.
- This routine returns true on success */
-
-#define GET_LONGJMP_TARGET(ADDR) m68k_get_longjmp_target(ADDR)
-
-#define IN_SIGTRAMP(pc,name) m68k_linux_in_sigtramp (pc)
-extern int m68k_linux_in_sigtramp (CORE_ADDR pc);
+/* We define SVR4_SHARED_LIBS unconditionally, on the assumption that
+ link.h is available on all linux platforms. For I386 and SH3/4,
+ we hard-code the information rather than use link.h anyway (for
+ the benefit of cross-debugging). We may move to doing that for
+ other architectures as well. */
+
+#define SVR4_SHARED_LIBS
+#include "solib.h" /* Support for shared libraries. */
diff --git a/gdb/config/m68k/tm-m68k.h b/gdb/config/m68k/tm-m68k.h
index cb72c982f80..f773428a2f0 100644
--- a/gdb/config/m68k/tm-m68k.h
+++ b/gdb/config/m68k/tm-m68k.h
@@ -1,6 +1,6 @@
/* Parameters for execution on a 68000 series machine.
Copyright 1986, 1987, 1989, 1990, 1992, 1993, 1994, 1995, 1996, 1998,
- 1999, 2000 Free Software Foundation, Inc.
+ 1999, 2000, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -19,8 +19,6 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "regcache.h"
-
#define GDB_MULTI_ARCH GDB_MULTI_ARCH_PARTIAL
extern int m68k_get_longjmp_target (CORE_ADDR *);
diff --git a/gdb/config/m68k/tm-m68klynx.h b/gdb/config/m68k/tm-m68klynx.h
index ed1f6f0f05e..71ed690545c 100644
--- a/gdb/config/m68k/tm-m68klynx.h
+++ b/gdb/config/m68k/tm-m68klynx.h
@@ -34,6 +34,6 @@
#include "m68k/tm-m68k.h"
/* Disable dumbshit alternate breakpoint mechanism needed by 68k stub. */
-#undef REMOTE_BREAKPOINT
+#undef DEPRECATED_REMOTE_BREAKPOINT
#endif /* TM_M68KLYNX_H */
diff --git a/gdb/config/m68k/tm-sun3.h b/gdb/config/m68k/tm-sun3.h
index 6e978cf5bdf..f721dcf6fdb 100644
--- a/gdb/config/m68k/tm-sun3.h
+++ b/gdb/config/m68k/tm-sun3.h
@@ -46,7 +46,7 @@
#include "m68k/tm-m68k.h"
/* Disable alternate breakpoint mechanism needed by 68k stub. */
-#undef REMOTE_BREAKPOINT
+#undef DEPRECATED_REMOTE_BREAKPOINT
/* Offsets (in target ints) into jmp_buf. Not defined by Sun, but at least
documented in a comment in <machine/setjmp.h>! */
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/embed.mt b/gdb/config/mips/embed.mt
index 42ab4aa47b9..e17c5c2d4ff 100644
--- a/gdb/config/mips/embed.mt
+++ b/gdb/config/mips/embed.mt
@@ -1,5 +1,5 @@
# Target: Big-endian mips board, typically an IDT.
-TDEPFILES= mips-tdep.o remote-mips.o remote-array.o
+TDEPFILES= mips-tdep.o remote-mips.o
TM_FILE= tm-embed.h
SIM_OBS = remote-sim.o
SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/mips/embed64.mt b/gdb/config/mips/embed64.mt
index ed60fd25031..aee68aeb335 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
+TDEPFILES= mips-tdep.o remote-mips.o
+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..bbc9b7d1b95 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
+TDEPFILES= mips-tdep.o remote-mips.o
+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..aee68aeb335 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
+TDEPFILES= mips-tdep.o remote-mips.o
+TM_FILE= tm-mips64.h
SIM_OBS = remote-sim.o
SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/mips/linux.mh b/gdb/config/mips/linux.mh
index 991fd6c0dee..38f87256689 100644
--- a/gdb/config/mips/linux.mh
+++ b/gdb/config/mips/linux.mh
@@ -2,6 +2,7 @@
XM_FILE= xm-linux.h
NAT_FILE= nm-linux.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o mips-linux-nat.o \
- thread-db.o lin-lwp.o proc-service.o linux-proc.o gcore.o
+ thread-db.o lin-lwp.o proc-service.o linux-proc.o gcore.o \
+ linux-nat.o
LOADLIBES = -ldl -rdynamic
diff --git a/gdb/config/mips/linux.mt b/gdb/config/mips/linux.mt
index 60bbfb25212..25d99b370ca 100644
--- a/gdb/config/mips/linux.mt
+++ b/gdb/config/mips/linux.mt
@@ -3,7 +3,5 @@ TDEPFILES= mips-tdep.o mips-linux-tdep.o corelow.o \
solib.o solib-svr4.o
TM_FILE= tm-linux.h
-GDBSERVER_DEPFILES = linux-low.o linux-mips-low.o reg-mips.o
-
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/vr4100.mt b/gdb/config/mips/mips.mt
index c5ae4f94a6d..2d08bcb6eff 100644
--- a/gdb/config/mips/vr4100.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-vr4100.h
+TM_FILE= tm-mips.h
SIM_OBS = remote-sim.o
SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/mips/vr4300.mt b/gdb/config/mips/mips64.mt
index 22cb25eb425..e6a19d8d974 100644
--- a/gdb/config/mips/vr4300.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-vr4300.h
+TM_FILE= tm-mips64.h
SIM_OBS = remote-sim.o
SIM = ../sim/mips/libsim.a
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..932852ea487 100644
--- a/gdb/config/mips/tm-irix5.h
+++ b/gdb/config/mips/tm-irix5.h
@@ -30,19 +30,16 @@
* 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) \
+#undef MIPS_REGISTER_BYTE
+#define MIPS_REGISTER_BYTE(N) \
(((N) < FP0_REGNUM) ? (N) * MIPS_REGSIZE : \
((N) < FP0_REGNUM + 32) ? \
FP0_REGNUM * MIPS_REGSIZE + \
((N) - FP0_REGNUM) * sizeof(double) : \
32 * sizeof(double) + ((N) - 32) * MIPS_REGSIZE)
-#undef REGISTER_VIRTUAL_TYPE
-#define REGISTER_VIRTUAL_TYPE(N) \
+#undef MIPS_REGISTER_TYPE
+#define MIPS_REGISTER_TYPE(N) \
(((N) >= FP0_REGNUM && (N) < FP0_REGNUM+32) ? builtin_type_double \
: ((N) == 32 /*SR*/) ? builtin_type_uint32 \
: ((N) >= 70 && (N) <= 89) ? builtin_type_uint32 \
diff --git a/gdb/config/mips/tm-irix6.h b/gdb/config/mips/tm-irix6.h
index 812aed5a25d..e6395ae6ef9 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,11 +62,8 @@
#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) \
+#undef MIPS_REGISTER_BYTE
+#define MIPS_REGISTER_BYTE(N) \
(((N) < FP0_REGNUM) ? (N) * MIPS_REGSIZE : \
((N) < FP0_REGNUM + 32) ? \
FP0_REGNUM * 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
+#undef MIPS_REGISTER_TYPE
diff --git a/gdb/config/mips/tm-mips.h b/gdb/config/mips/tm-mips.h
index 540db163080..51a6a7dbaeb 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,46 +95,22 @@ 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. */
-#define REGISTER_BYTE(N) ((N) * MIPS_REGSIZE)
+#define MIPS_REGISTER_BYTE(N) ((N) * MIPS_REGSIZE)
/* Return the GDB type object for the "standard" data type of data in
register N. */
-#ifndef REGISTER_VIRTUAL_TYPE
-#define REGISTER_VIRTUAL_TYPE(N) \
+#ifndef MIPS_REGISTER_TYPE
+#define MIPS_REGISTER_TYPE(N) \
(((N) >= FP0_REGNUM && (N) < FP0_REGNUM+32) ? builtin_type_float \
: ((N) == 32 /*SR*/) ? builtin_type_uint32 \
: ((N) >= 70 && (N) <= 89) ? builtin_type_uint32 \
: builtin_type_int)
#endif
-/* All mips targets store doubles in a register pair with the least
- significant register in the lower numbered register.
- If the target is big endian, double register values need conversion
- between memory and register formats. */
-
-extern void mips_register_convert_to_type (int regnum,
- struct type *type,
- char *buffer);
-extern void mips_register_convert_from_type (int regnum,
- struct type *type,
- char *buffer);
-
-#define REGISTER_CONVERT_TO_TYPE(n, type, buffer) \
- mips_register_convert_to_type ((n), (type), (buffer))
-
-#define REGISTER_CONVERT_FROM_TYPE(n, type, buffer) \
- mips_register_convert_from_type ((n), (type), (buffer))
-
-
/* Special symbol found in blocks associated with routines. We can hang
mips_extra_func_info_t's off of this. */
@@ -182,10 +150,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 +161,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-mips64.h b/gdb/config/mips/tm-mips64.h
index 13e62d2acf3..2547e86f482 100644
--- a/gdb/config/mips/tm-mips64.h
+++ b/gdb/config/mips/tm-mips64.h
@@ -23,7 +23,7 @@
#define MIPS_REGSIZE 8
/* define 8 byte register type */
-#define REGISTER_VIRTUAL_TYPE(N) \
+#define MIPS_REGISTER_TYPE(N) \
(((N) >= FP0_REGNUM && (N) < FP0_REGNUM+32) ? builtin_type_double \
: ((N) == 32 /*SR*/) ? builtin_type_uint32 \
: ((N) >= 70 && (N) <= 89) ? builtin_type_uint32 \
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/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/vr5000.mt b/gdb/config/mips/vr5000.mt
deleted file mode 100644
index 7a4a915a12c..00000000000
--- a/gdb/config/mips/vr5000.mt
+++ /dev/null
@@ -1,5 +0,0 @@
-# Target: Big-endian SIM monitor board.
-TDEPFILES= mips-tdep.o remote-mips.o
-TM_FILE= tm-vr5000.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/nm-linux.h b/gdb/config/nm-linux.h
index 0fb56271473..9a04cf71cf1 100644
--- a/gdb/config/nm-linux.h
+++ b/gdb/config/nm-linux.h
@@ -51,9 +51,6 @@ struct target_waitstatus;
extern ptid_t child_wait (ptid_t ptid, struct target_waitstatus *ourstatus);
#define CHILD_WAIT
-extern int lin_lwp_prepare_to_proceed (void);
-#define PREPARE_TO_PROCEED(select_it) lin_lwp_prepare_to_proceed ()
-
extern void lin_lwp_attach_lwp (ptid_t ptid, int verbose);
#define ATTACH_LWP(ptid, verbose) lin_lwp_attach_lwp ((ptid), (verbose))
@@ -73,7 +70,6 @@ extern void lin_thread_get_thread_signals (sigset_t *mask);
/* Override child_pid_to_exec_file in 'inftarg.c'. */
#define CHILD_PID_TO_EXEC_FILE
-struct mem_attrib;
-extern int linux_proc_xfer_memory (CORE_ADDR addr, char *myaddr, int len,
- int write, struct mem_attrib *attrib,
- struct target_ops *target);
+#define CHILD_INSERT_FORK_CATCHPOINT
+#define CHILD_INSERT_VFORK_CATCHPOINT
+#define CHILD_INSERT_EXEC_CATCHPOINT
diff --git a/gdb/config/pa/nm-hppah.h b/gdb/config/pa/nm-hppah.h
index f8a2a117fa2..05e7db2b91f 100644
--- a/gdb/config/pa/nm-hppah.h
+++ b/gdb/config/pa/nm-hppah.h
@@ -53,11 +53,6 @@
#define CHILD_XFER_MEMORY
#define CHILD_FOLLOW_FORK
-/* 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);
-
/* In infptrace.c or infttrace.c: */
#define CHILD_PID_TO_EXEC_FILE
#define CHILD_POST_STARTUP_INFERIOR
diff --git a/gdb/config/pa/tm-hppa.h b/gdb/config/pa/tm-hppa.h
index 988b790561f..1ec91d453f6 100644
--- a/gdb/config/pa/tm-hppa.h
+++ b/gdb/config/pa/tm-hppa.h
@@ -25,7 +25,7 @@
#include "regcache.h"
/* Wonder if this is correct? Should be using push_dummy_call(). */
-#define DEPRECATED_DUMMY_WRITE_SP(SP) generic_target_write_sp (SP)
+#define DEPRECATED_DUMMY_WRITE_SP(SP) deprecated_write_sp (SP)
#ifndef GDB_MULTI_ARCH
#define GDB_MULTI_ARCH 1
@@ -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..2e5e039d7f3 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);
@@ -278,17 +283,12 @@ extern CORE_ADDR hppa_frame_saved_pc (struct frame_info *frame);
#if !GDB_MULTI_ARCH
extern CORE_ADDR hppa_frame_args_address (struct frame_info *fi);
-#define FRAME_ARGS_ADDRESS(fi) hppa_frame_args_address (fi)
+#define DEPRECATED_FRAME_ARGS_ADDRESS(fi) hppa_frame_args_address (fi)
#endif
#if !GDB_MULTI_ARCH
extern CORE_ADDR hppa_frame_locals_address (struct frame_info *fi);
-#define FRAME_LOCALS_ADDRESS(fi) hppa_frame_locals_address (fi)
-#endif
-
-#if !GDB_MULTI_ARCH
-extern int hppa_frame_num_args (struct frame_info *frame);
-#define FRAME_NUM_ARGS(fi) hppa_frame_num_args (fi)
+#define DEPRECATED_FRAME_LOCALS_ADDRESS(fi) hppa_frame_locals_address (fi)
#endif
#if !GDB_MULTI_ARCH
@@ -445,8 +445,8 @@ extern CORE_ADDR hppa_target_read_fp (void);
/* We access locals from SP. This may not work for frames which call
alloca; for those, we may need to consult unwind tables.
jimb: FIXME. */
-#undef FRAME_LOCALS_ADDRESS
-#define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
+#undef DEPRECATED_FRAME_LOCALS_ADDRESS
+#define DEPRECATED_FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
/* For a number of horrible reasons we may have to adjust the location
of variables on the stack. Ugh. jimb: why? */
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/linux.mh b/gdb/config/powerpc/linux.mh
index d0a2104bd89..925650dd272 100644
--- a/gdb/config/powerpc/linux.mh
+++ b/gdb/config/powerpc/linux.mh
@@ -6,8 +6,6 @@ XM_CLIBS=
NAT_FILE= nm-linux.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o linux-proc.o \
ppc-linux-nat.o proc-service.o thread-db.o lin-lwp.o \
- gcore.o
+ gcore.o linux-nat.o
LOADLIBES = -ldl -rdynamic
-
-GDBSERVER_DEPFILES = linux-low.o linux-ppc-low.o reg-ppc.o
diff --git a/gdb/config/powerpc/nm-ppc64-linux.h b/gdb/config/powerpc/nm-ppc64-linux.h
new file mode 100644
index 00000000000..5d1c7b6d9e0
--- /dev/null
+++ b/gdb/config/powerpc/nm-ppc64-linux.h
@@ -0,0 +1,27 @@
+/* IBM PowerPC64 native-dependent macros for GDB, the GNU debugger.
+ Copyright 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., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef NM_PPC64_LINUX_H
+
+#include "config/powerpc/nm-linux.h"
+
+#define PTRACE_ARG3_TYPE void *
+#define PTRACE_XFER_TYPE long
+
+#endif /* NM_PPC64_LINUX_H */
diff --git a/gdb/config/powerpc/ppc64-linux.mh b/gdb/config/powerpc/ppc64-linux.mh
new file mode 100644
index 00000000000..c7a69ea073c
--- /dev/null
+++ b/gdb/config/powerpc/ppc64-linux.mh
@@ -0,0 +1,19 @@
+# Host: PowerPC64, running Linux
+
+XM_FILE= xm-linux.h
+XM_CLIBS=
+
+NAT_FILE= nm-ppc64-linux.h
+NATDEPFILES= infptrace.o inftarg.o fork-child.o linux-proc.o \
+ ppc-linux-nat.o proc-service.o thread-db.o lin-lwp.o \
+ gcore.o
+
+# The PowerPC has severe limitations on TOC size, and uses them even
+# for non-PIC code. GDB overflows those tables when compiling with
+# -mfull-toc (the default), so we need to ask GCC to use as few TOC
+# entries as possible.
+MH_CFLAGS= -mminimal-toc
+
+# The dynamically loaded libthread_db needs access to symbols in the
+# gdb executable.
+LOADLIBES= -ldl -rdynamic
diff --git a/gdb/config/powerpc/tm-linux.h b/gdb/config/powerpc/tm-linux.h
index d69dfc1f5bf..34d95cadca4 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!")
@@ -43,10 +48,6 @@ extern int at_subroutine_call_instruction_target();
in symfile.c) */
#undef IBM6000_TARGET
-extern CORE_ADDR ppc_linux_skip_trampoline_code (CORE_ADDR pc);
-#undef SKIP_TRAMPOLINE_CODE
-#define SKIP_TRAMPOLINE_CODE(pc) ppc_linux_skip_trampoline_code (pc)
-
extern int ppc_linux_in_sigtramp (CORE_ADDR pc, char *func_name);
#undef IN_SIGTRAMP
#define IN_SIGTRAMP(pc,func_name) ppc_linux_in_sigtramp (pc,func_name)
diff --git a/gdb/config/s390/s390.mh b/gdb/config/s390/s390.mh
index 300a5e3c1ce..ab3350fdb47 100644
--- a/gdb/config/s390/s390.mh
+++ b/gdb/config/s390/s390.mh
@@ -6,7 +6,7 @@ XM_CLIBS=
NAT_FILE= nm-linux.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o s390-nat.o \
core-aout.o core-regset.o linux-proc.o gcore.o thread-db.o lin-lwp.o \
- proc-service.o
+ proc-service.o linux-nat.o
LOADLIBES = -ldl -rdynamic
diff --git a/gdb/config/s390/tm-linux.h b/gdb/config/s390/tm-linux.h
index c1b4a294ad8..7b406e0dc0a 100644
--- a/gdb/config/s390/tm-linux.h
+++ b/gdb/config/s390/tm-linux.h
@@ -24,9 +24,7 @@
#ifndef TM_LINUX_H
#define TM_LINUX_H
-#ifdef GDBSERVER
-#define S390_GNULINUX_TARGET
-#endif /* GDBSERVER */
+
#undef TARGET_ELF64
#define TARGET_ELF64 (gdbarch_tdep (current_gdbarch)->intreg_size==8)
diff --git a/gdb/config/s390/tm-s390.h b/gdb/config/s390/tm-s390.h
index c8a6e8d0323..d36c2798f4f 100644
--- a/gdb/config/s390/tm-s390.h
+++ b/gdb/config/s390/tm-s390.h
@@ -73,43 +73,6 @@
#define S390X_REGISTER_BYTES ((8+8)+(8*S390_NUM_GPRS)+(4*S390_NUM_ACRS)+ \
(8*S390_NUM_CRS)+(S390_FPC_SIZE+S390_FPC_PAD_SIZE)+(S390_FPR_SIZE*S390_NUM_FPRS))
-#ifdef GDBSERVER
-
-int s390_register_byte (int reg_nr);
-#define REGISTER_BYTE(reg_nr) s390_register_byte(reg_nr)
-#define PC_REGNUM S390_PC_REGNUM
-#define NUM_REGS S390_NUM_REGS
-#define NUM_FREGS S390_NUM_FPRS
-#define DEPRECATED_FP_REGNUM S390_FP_REGNUM
-#define SP_REGNUM S390_SP_REGNUM
-/* Obviously ptrace for user program tracing cannot be allowed
- mess with control registers (except per registers for hardware watchpoints),
- when we add kernel debugging we may need to alter these macros. */
-int s390_cannot_fetch_register (int regno);
-#define CANNOT_FETCH_REGISTER(regno) s390_cannot_fetch_register(regno)
-#define CANNOT_STORE_REGISTER(regno) s390_cannot_fetch_register(regno)
-
-#if CONFIG_ARCH_S390X
-
-int s390x_register_raw_size (int reg_nr);
-#define REGISTER_RAW_SIZE(reg_nr) s390x_register_raw_size(reg_nr)
-#define GDB_TARGET_IS_ESAME (1)
-#define DEPRECATED_REGISTER_SIZE (8)
-#define DEPRECATED_REGISTER_BYTES S390X_REGISTER_BYTES
-
-#else /* CONFIG_ARCH_S390X */
-
-int s390_register_raw_size (int reg_nr);
-#define REGISTER_RAW_SIZE(reg_nr) s390_register_raw_size(reg_nr)
-#define GDB_TARGET_IS_ESAME (0)
-#define DEPRECATED_REGISTER_SIZE (4)
-#define DEPRECATED_REGISTER_BYTES S390_REGISTER_BYTES
-
-#endif /* CONFIG_ARCH_S390X */
-
-#else /* GDBSERVER */
-
#define GDB_TARGET_IS_ESAME (TARGET_ARCHITECTURE->mach == bfd_mach_s390_64)
-#endif /* GDBSERVER */
#endif /* ifndef TM_S390_H */
diff --git a/gdb/config/sh/linux.mt b/gdb/config/sh/linux.mt
index ea8460cdee9..8f217cccb21 100644
--- a/gdb/config/sh/linux.mt
+++ b/gdb/config/sh/linux.mt
@@ -4,5 +4,3 @@ TM_FILE= tm-linux.h
SIM_OBS = remote-sim.o
SIM = ../sim/sh/libsim.a
-
-GDBSERVER_DEPFILES = linux-low.o linux-sh-low.o reg-sh.o
diff --git a/gdb/config/sh/tm-sh.h b/gdb/config/sh/tm-sh.h
index 6ae6085d9b7..dfd96c139dd 100644
--- a/gdb/config/sh/tm-sh.h
+++ b/gdb/config/sh/tm-sh.h
@@ -27,7 +27,7 @@
#define REGISTER_TYPE long /* used in standalone.c */
-#define BIG_REMOTE_BREAKPOINT { 0xc3, 0x20 } /* Used in remote.c */
-#define LITTLE_REMOTE_BREAKPOINT { 0x20, 0xc3 } /* Used in remote.c */
+#define DEPRECATED_BIG_REMOTE_BREAKPOINT { 0xc3, 0x20 } /* Used in remote.c */
+#define DEPRECATED_LITTLE_REMOTE_BREAKPOINT { 0x20, 0xc3 } /* Used in remote.c */
/*#define NOP {0x20, 0x0b}*/ /* Who uses this???*/
diff --git a/gdb/config/sparc/linux.mh b/gdb/config/sparc/linux.mh
index 4a2c41f38c4..f36dbb1ae34 100644
--- a/gdb/config/sparc/linux.mh
+++ b/gdb/config/sparc/linux.mh
@@ -5,7 +5,7 @@ XM_FILE= xm-linux.h
NAT_FILE= nm-linux.h
NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o sparc-nat.o \
proc-service.o thread-db.o lin-lwp.o sparc-linux-nat.o \
- linux-proc.o gcore.o
+ linux-proc.o gcore.o linux-nat.o
# The dynamically loaded libthread_db needs access to symbols in the
# gdb executable.
diff --git a/gdb/config/sparc/tm-sparc.h b/gdb/config/sparc/tm-sparc.h
index ab18477fab9..64ce5c72cbd 100644
--- a/gdb/config/sparc/tm-sparc.h
+++ b/gdb/config/sparc/tm-sparc.h
@@ -267,18 +267,17 @@ extern CORE_ADDR sparc_skip_prologue (CORE_ADDR);
/* Write into appropriate registers a function return value of type
TYPE, given in virtual format. */
-#define DEPRECATED_STORE_RETURN_VALUE(TYPE, VALBUF) \
- sparc_store_return_value (TYPE, VALBUF)
-extern void sparc_store_return_value (struct type *, char *);
+#define STORE_RETURN_VALUE(TYPE, REGCACHE, VALBUF) \
+ sparc32_store_return_value (TYPE, REGCACHE, VALBUF)
+extern void sparc32_store_return_value (struct type *, struct regcache *,
+ const void *);
-/* Extract from an array REGBUF containing the (raw) register state
- the address in which a function should return its structure value,
- as a CORE_ADDR (or an expression that can be used as one). */
+/* Extract from REGCACHE the address in which a function should return
+ its structure value. */
-#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
- sparc_extract_struct_value_address (REGBUF)
-
-extern CORE_ADDR sparc_extract_struct_value_address (char *);
+#define EXTRACT_STRUCT_VALUE_ADDRESS(REGCACHE) \
+ sparc_extract_struct_value_address (REGCACHE)
+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). */
@@ -442,17 +441,13 @@ extern CORE_ADDR sparc_frame_chain (struct frame_info *);
extern CORE_ADDR sparc_frame_saved_pc (struct frame_info *);
/* If the argument is on the stack, it will be here. */
-#define FRAME_ARGS_ADDRESS(FI) (get_frame_base (FI))
+#define DEPRECATED_FRAME_ARGS_ADDRESS(FI) (get_frame_base (FI))
-#define FRAME_LOCALS_ADDRESS(FI) (get_frame_base (FI))
+#define DEPRECATED_FRAME_LOCALS_ADDRESS(FI) (get_frame_base (FI))
/* Set VAL to the number of args passed to frame described by FI.
Can set VAL to -1, meaning no way to tell. */
-/* We can't tell how many args there are
- now that the C compiler delays popping them. */
-#define FRAME_NUM_ARGS(FI) (-1)
-
/* Return number of bytes at start of arglist that are not really args. */
#define FRAME_ARGS_SKIP 68
@@ -668,9 +663,10 @@ extern CORE_ADDR sparc32_push_arguments (int, struct value **, CORE_ADDR, int,
function return value of type TYPE, and copy that, in virtual
format, into VALBUF. */
-#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) \
- sparc32_extract_return_value (TYPE, REGBUF, VALBUF)
-extern void sparc32_extract_return_value (struct type *, char[], char *);
+#define EXTRACT_RETURN_VALUE(TYPE, REGCACHE, VALBUF) \
+ sparc32_extract_return_value (TYPE, REGCACHE, VALBUF)
+extern void sparc32_extract_return_value (struct type *, struct regcache *,
+ void *valbuf);
#endif /* GDB_MULTI_ARCH */
diff --git a/gdb/config/vax/tm-vax.h b/gdb/config/vax/tm-vax.h
index 22e60a09fda..f1ed146fe8e 100644
--- a/gdb/config/vax/tm-vax.h
+++ b/gdb/config/vax/tm-vax.h
@@ -24,8 +24,4 @@
#define GDB_MULTI_ARCH GDB_MULTI_ARCH_PARTIAL
-/* XXXJRT not yet under gdbarch control */
-#define FRAME_ARGS_ADDRESS_CORRECT(fi) vax_frame_args_address_correct ((fi))
-extern CORE_ADDR vax_frame_args_address_correct (struct frame_info *);
-
#endif /* TM_VAX_H */
diff --git a/gdb/configure b/gdb/configure
index 207381adefb..e27294cf577 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -5304,17 +5304,74 @@ fi
done
+# ------------------------- #
+# Checks for declarations. #
+# ------------------------- #
+
+for ac_func in getopt
+do
+ ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
+echo "configure:5316: checking whether $ac_func is declared" >&5
+if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 5321 "configure"
+#include "confdefs.h"
+#undef $ac_tr_decl
+#define $ac_tr_decl 1
+
+
+int main() {
+#ifndef $ac_func
+char *(*pfn) = (char *(*)) $ac_func ;
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:5333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ eval "gcc_cv_have_decl_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "gcc_cv_have_decl_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
+#define $ac_tr_decl 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
+#define $ac_tr_decl 0
+EOF
+
+fi
+
+done
+if test x = y ; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_DECL_GETOPT 1
+EOF
+fi
+
+
# ------------------ #
# Checks for types. #
# ------------------ #
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:5313: checking return type of signal handlers" >&5
+echo "configure:5370: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5318 "configure"
+#line 5375 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -5331,7 +5388,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:5335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -5355,12 +5412,12 @@ EOF
# ------------------------------------- #
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:5359: checking for working const" >&5
+echo "configure:5416: 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 5364 "configure"
+#line 5421 "configure"
#include "confdefs.h"
int main() {
@@ -5409,7 +5466,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:5413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -5430,21 +5487,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:5434: checking for inline" >&5
+echo "configure:5491: 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 5441 "configure"
+#line 5498 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:5448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -5477,19 +5534,19 @@ esac
# 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:5481: checking for working alloca.h" >&5
+echo "configure:5538: 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 5486 "configure"
+#line 5543 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:5493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5550: \"$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
@@ -5510,12 +5567,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:5514: checking for alloca" >&5
+echo "configure:5571: 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 5519 "configure"
+#line 5576 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -5543,7 +5600,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:5547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5604: \"$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
@@ -5575,12 +5632,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:5579: checking whether alloca needs Cray hooks" >&5
+echo "configure:5636: 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 5584 "configure"
+#line 5641 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -5605,12 +5662,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:5609: checking for $ac_func" >&5
+echo "configure:5666: 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 5614 "configure"
+#line 5671 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5633,7 +5690,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5694: \"$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
@@ -5660,7 +5717,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:5664: checking stack direction for C alloca" >&5
+echo "configure:5721: 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
@@ -5668,7 +5725,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 5672 "configure"
+#line 5729 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -5687,7 +5744,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:5691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5748: \"$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
@@ -5712,17 +5769,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:5716: checking for $ac_hdr" >&5
+echo "configure:5773: 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 5721 "configure"
+#line 5778 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5783: \"$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*
@@ -5751,12 +5808,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5755: checking for $ac_func" >&5
+echo "configure:5812: 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 5760 "configure"
+#line 5817 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5779,7 +5836,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5840: \"$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
@@ -5804,7 +5861,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:5808: checking for working mmap" >&5
+echo "configure:5865: 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
@@ -5812,7 +5869,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 5816 "configure"
+#line 5873 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -5952,7 +6009,7 @@ main()
}
EOF
-if { (eval echo configure:5956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6013: \"$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
@@ -5975,12 +6032,12 @@ EOF
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:5979: checking for pid_t" >&5
+echo "configure:6036: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5984 "configure"
+#line 6041 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -6009,17 +6066,17 @@ fi
ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:6013: checking for vfork.h" >&5
+echo "configure:6070: checking for vfork.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6018 "configure"
+#line 6075 "configure"
#include "confdefs.h"
#include <vfork.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6080: \"$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*
@@ -6044,18 +6101,18 @@ else
fi
echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:6048: checking for working vfork" >&5
+echo "configure:6105: checking for working vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
echo $ac_n "checking for vfork""... $ac_c" 1>&6
-echo "configure:6054: checking for vfork" >&5
+echo "configure:6111: checking for vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6059 "configure"
+#line 6116 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vfork(); below. */
@@ -6078,7 +6135,7 @@ vfork();
; return 0; }
EOF
-if { (eval echo configure:6082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_vfork=yes"
else
@@ -6100,7 +6157,7 @@ fi
ac_cv_func_vfork_works=$ac_cv_func_vfork
else
cat > conftest.$ac_ext <<EOF
-#line 6104 "configure"
+#line 6161 "configure"
#include "confdefs.h"
/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
@@ -6195,7 +6252,7 @@ main() {
}
}
EOF
-if { (eval echo configure:6199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_vfork_works=yes
else
@@ -6220,12 +6277,12 @@ fi
for ac_func in canonicalize_file_name realpath
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6224: checking for $ac_func" >&5
+echo "configure:6281: 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 6229 "configure"
+#line 6286 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6248,7 +6305,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6309: \"$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
@@ -6275,12 +6332,12 @@ done
for ac_func in poll
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6279: checking for $ac_func" >&5
+echo "configure:6336: 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 6284 "configure"
+#line 6341 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6303,7 +6360,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6364: \"$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
@@ -6330,12 +6387,12 @@ done
for ac_func in pread64
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6334: checking for $ac_func" >&5
+echo "configure:6391: 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 6339 "configure"
+#line 6396 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6358,7 +6415,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6419: \"$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
@@ -6385,12 +6442,12 @@ done
for ac_func in sbrk
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6389: checking for $ac_func" >&5
+echo "configure:6446: 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 6394 "configure"
+#line 6451 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6413,7 +6470,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6474: \"$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
@@ -6440,12 +6497,12 @@ done
for ac_func in setpgid setpgrp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6444: checking for $ac_func" >&5
+echo "configure:6501: 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 6449 "configure"
+#line 6506 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6468,7 +6525,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6529: \"$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
@@ -6495,12 +6552,12 @@ done
for ac_func in sigaction sigprocmask sigsetmask
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6499: checking for $ac_func" >&5
+echo "configure:6556: 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 6504 "configure"
+#line 6561 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6523,7 +6580,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6584: \"$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
@@ -6550,12 +6607,12 @@ done
for ac_func in socketpair
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6554: checking for $ac_func" >&5
+echo "configure:6611: 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 6559 "configure"
+#line 6616 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6578,7 +6635,62 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6639: \"$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
+
+for ac_func in syscall
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:6666: 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 6671 "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:6694: \"$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
@@ -6605,7 +6717,7 @@ 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:6721: 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 +6725,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 6729 "configure"
#include "confdefs.h"
#ifdef HAVE_UNISTD_H
@@ -6633,7 +6745,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:6749: \"$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 +6770,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:6774: 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 6779 "configure"
#include "confdefs.h"
#include <unistd.h>
@@ -6677,7 +6789,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:6793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_func_setpgrp_void=no
else
@@ -6701,12 +6813,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:6817: 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 6822 "configure"
#include "confdefs.h"
#include <setjmp.h>
@@ -6715,7 +6827,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:6831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_func_sigsetjmp=yes
else
@@ -6741,12 +6853,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:6857: 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 6862 "configure"
#include "confdefs.h"
#include <gnu-versions.h>
int main() {
@@ -6756,7 +6868,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:6872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_gnu_regex=yes
else
@@ -6791,19 +6903,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:6907: 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 6912 "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:6919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_struct_reg_r_fs=yes
else
@@ -6823,19 +6935,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:6939: 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 6944 "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:6951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_struct_reg_r_gs=yes
else
@@ -6857,19 +6969,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:6973: 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 6978 "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:6985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_ptrace_getregs=yes
else
@@ -6891,19 +7003,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:7007: 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 7012 "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:7019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_ptrace_getfpxregs=yes
else
@@ -6925,12 +7037,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:7041: 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 7046 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/ptrace.h>
@@ -6938,7 +7050,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:7054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_pt_getdbregs=yes
else
@@ -6960,12 +7072,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:7076: 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 7081 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/ptrace.h>
@@ -6973,7 +7085,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:7089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_pt_getxmmregs=yes
else
@@ -6996,19 +7108,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:7112: 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 7117 "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:7124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_uintptr_t=yes
else
@@ -7030,12 +7142,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:7146: 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 7151 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7056,7 +7168,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:7172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_malloc=no
else
@@ -7077,12 +7189,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:7193: 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 7198 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7103,7 +7215,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:7219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_realloc=no
else
@@ -7124,12 +7236,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:7240: 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 7245 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7150,7 +7262,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:7266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_free=no
else
@@ -7171,12 +7283,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:7287: 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 7292 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7197,7 +7309,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:7313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strerror=no
else
@@ -7218,12 +7330,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:7334: 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 7339 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7244,7 +7356,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:7360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strdup=no
else
@@ -7265,12 +7377,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:7381: 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 7386 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7291,7 +7403,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:7407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strstr=no
else
@@ -7312,12 +7424,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:7428: 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 7433 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7338,7 +7450,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:7454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_canonicalize_file_name=no
else
@@ -7364,9 +7476,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:7480: checking for HPUX save_state structure" >&5
cat > conftest.$ac_ext <<EOF
-#line 7370 "configure"
+#line 7482 "configure"
#include "confdefs.h"
#include <machine/save_state.h>
EOF
@@ -7381,7 +7493,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 7385 "configure"
+#line 7497 "configure"
#include "confdefs.h"
#include <machine/save_state.h>
EOF
@@ -7451,12 +7563,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:7567: 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 7572 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7465,7 +7577,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:7581: \"$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 +7599,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:7603: 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 7608 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7501,7 +7613,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:7617: \"$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 +7635,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:7639: 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 7644 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7537,7 +7649,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:7653: \"$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 +7671,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:7675: 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 7680 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7573,7 +7685,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:7689: \"$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 +7707,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:7711: 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 7716 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7609,7 +7721,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:7725: \"$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 +7743,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:7747: 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 7752 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7645,7 +7757,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:7761: \"$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 +7779,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:7783: 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 7788 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7681,7 +7793,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:7797: \"$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 +7815,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:7819: 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 7824 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7717,7 +7829,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:7833: \"$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 +7851,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:7855: 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 7860 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7753,7 +7865,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:7869: \"$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 +7887,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:7891: 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 7896 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7789,7 +7901,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:7905: \"$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 +7923,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:7927: 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 7932 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7825,7 +7937,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:7941: \"$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 +7959,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:7963: 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 7968 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7861,7 +7973,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:7977: \"$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 +7995,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:7999: 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 8004 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7897,7 +8009,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:8013: \"$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 +8031,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:8035: 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 8040 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7933,7 +8045,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:8049: \"$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 +8072,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:8076: 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 +8080,7 @@ else
gdb_cv_prfpregset_t_broken=yes
else
cat > conftest.$ac_ext <<EOF
-#line 7972 "configure"
+#line 8084 "configure"
#include "confdefs.h"
#include <sys/procfs.h>
int main ()
@@ -7978,7 +8090,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:8094: \"$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 +8115,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:8119: 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 8124 "configure"
#include "confdefs.h"
#include <unistd.h>
#include <sys/types.h>
@@ -8021,7 +8133,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:8137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_procfs_piocset=yes
else
@@ -8045,19 +8157,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:8161: 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 8166 "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:8173: \"$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 +8191,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:8195: 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 8200 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <link.h>
@@ -8092,7 +8204,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:8208: \"$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 +8226,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:8230: 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 8235 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_NLIST_H
@@ -8130,7 +8242,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:8246: \"$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 +8264,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:8268: 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 8273 "configure"
#include "confdefs.h"
#define _SYSCALL32
#include <sys/link.h>
@@ -8165,7 +8277,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:8281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_link_map32=yes
else
@@ -8192,12 +8304,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:8308: 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 8313 "configure"
#include "confdefs.h"
int main() {
@@ -8207,7 +8319,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:8323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_c_long_long=yes
else
@@ -8229,7 +8341,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:8345: 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 +8349,7 @@ else
gdb_cv_printf_has_long_long=no
else
cat > conftest.$ac_ext <<EOF
-#line 8241 "configure"
+#line 8353 "configure"
#include "confdefs.h"
int main () {
@@ -8251,7 +8363,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:8367: \"$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 +8387,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:8391: 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 8396 "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:8403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_long_double=yes
else
@@ -8309,7 +8421,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:8425: 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 +8429,7 @@ else
gdb_cv_printf_has_long_double=no
else
cat > conftest.$ac_ext <<EOF
-#line 8321 "configure"
+#line 8433 "configure"
#include "confdefs.h"
int main () {
@@ -8327,7 +8439,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:8443: \"$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 +8463,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:8467: 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 +8471,7 @@ else
gdb_cv_scanf_has_long_double=no
else
cat > conftest.$ac_ext <<EOF
-#line 8363 "configure"
+#line 8475 "configure"
#include "confdefs.h"
int main () {
@@ -8369,7 +8481,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:8485: \"$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 +8506,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:8510: 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 +8520,14 @@ else
LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
cat > conftest.$ac_ext <<EOF
-#line 8412 "configure"
+#line 8524 "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:8531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
:
else
echo "configure: failed program was:" >&5
@@ -8438,7 +8550,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:8554: 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 +8573,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:8577: 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 +8583,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:8587: 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 +8591,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 8483 "configure"
+#line 8595 "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 +8602,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:8606: \"$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 +8634,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:8638: checking for the ld -export-dynamic flag" >&5
LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
cat > conftest.$ac_ext <<EOF
-#line 8529 "configure"
+#line 8641 "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:8648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
found=yes
else
@@ -8551,13 +8663,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:8667: 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 8673 "configure"
#include "confdefs.h"
#include <proc_service.h>
@@ -8568,7 +8680,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:8684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_proc_service_is_old=no
else
@@ -8594,12 +8706,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:8710: 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 8715 "configure"
#include "confdefs.h"
#include <sys/pthdebug.h>
int main() {
@@ -8608,7 +8720,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:8724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_aix_thread_debug=yes
else
@@ -8633,19 +8745,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:8749: 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 8754 "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:8761: \"$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 +8780,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:8786: 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 8791 "configure"
+#include "confdefs.h"
+#include <sys/syscall.h>
+int main() {
+int i = __NR_tkill;
+; return 0; }
+EOF
+if { (eval echo configure:8798: \"$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 +8905,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:8909: 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 +8915,14 @@ echo "configure:8760: checking compiler warning flags" >&5
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $w"
cat > conftest.$ac_ext <<EOF
-#line 8770 "configure"
+#line 8919 "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:8926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
WARN_CFLAGS="${WARN_CFLAGS} $w"
else
@@ -8821,12 +8970,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:8974: 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 8979 "configure"
#include "confdefs.h"
#if defined (__CYGWIN__) || defined (__CYGWIN32__)
@@ -8904,7 +9053,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:9057: 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 +9162,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:9166: 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 +9271,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:9275: 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 +9337,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:9341: 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 9346 "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:9351: \"$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 +9407,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:9411: 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 +9473,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:9477: 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 9482 "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:9487: \"$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 +9529,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:9533: 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 +9552,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:9556: 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 +9607,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:9611: 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 +9710,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:9714: 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 +9853,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:9857: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
@@ -9766,12 +9915,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 9919 "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:9924: \"$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 +9989,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 9993 "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:10000: \"$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 +10244,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:10248: 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 +10308,12 @@ fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:10163: checking for Cygwin environment" >&5
+echo "configure:10312: 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 10317 "configure"
#include "confdefs.h"
int main() {
@@ -10175,7 +10324,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:10328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
@@ -10192,19 +10341,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:10345: 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 10350 "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:10357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
@@ -10223,7 +10372,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:10376: 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 +10382,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:10386: \"$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 +10424,7 @@ fi
echo $ac_n "checking for iconv""... $ac_c" 1>&6
-echo "configure:10279: checking for iconv" >&5
+echo "configure:10428: 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 +10432,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 10436 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
@@ -10293,7 +10442,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:10446: \"$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 +10454,7 @@ rm -f conftest*
am_save_LIBS="$LIBS"
LIBS="$LIBS -liconv"
cat > conftest.$ac_ext <<EOF
-#line 10309 "configure"
+#line 10458 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
@@ -10315,7 +10464,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:10468: \"$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 +10485,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:10489: 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 10495 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -10361,7 +10510,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:10514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_proto_iconv_arg1=""
else
diff --git a/gdb/configure.host b/gdb/configure.host
index 8f96b0a842c..0c88533f785 100644
--- a/gdb/configure.host
+++ b/gdb/configure.host
@@ -13,7 +13,7 @@ case "${host_cpu}" in
alpha*) gdb_host_cpu=alpha ;;
arm*) gdb_host_cpu=arm ;;
hppa*) gdb_host_cpu=pa ;;
-i[3456]86*) gdb_host_cpu=i386 ;;
+i[34567]86*) gdb_host_cpu=i386 ;;
m68*) gdb_host_cpu=m68k ;;
mips*) gdb_host_cpu=mips ;;
powerpc*) gdb_host_cpu=powerpc ;;
@@ -48,34 +48,34 @@ hppa*-*-hpux11*) gdb_host=hpux11 ;;
hppa*-*-hpux*) gdb_host=hppahpux ;;
# OBSOLETE hppa*-*-osf*) gdb_host=hppaosf ;;
-i[3456]86-ncr-*) gdb_host=ncr3000 ;;
+i[34567]86-ncr-*) gdb_host=ncr3000 ;;
# OBSOLETE i[3456]86-sequent-bsd*) gdb_host=symmetry ;; # dynix
# OBSOLETE i[3456]86-sequent-sysv4*) gdb_host=ptx4 ;;
# OBSOLETE i[3456]86-sequent-sysv*) gdb_host=ptx ;;
-i[3456]86-*-bsd*) gdb_host=i386bsd ;;
-i[3456]86-*-dgux*) gdb_host=i386v4 ;;
-i[3456]86-*-freebsd*) gdb_host=fbsd ;;
-i[3456]86-*-netbsdelf*) gdb_host=nbsdelf ;;
-i[3456]86-*-netbsdaout*) gdb_host=nbsdaout ;;
-i[3456]86-*-netbsd*) gdb_host=nbsdaout ;;
-i[3456]86-*-go32*) gdb_host=go32 ;;
-i[3456]86-*-msdosdjgpp*) gdb_host=go32 ;;
-i[3456]86-*-linux*) gdb_host=linux ;;
-i[3456]86-*-lynxos*) gdb_host=i386lynx ;;
-i[3456]86-*-gnu*) gdb_host=i386gnu ;;
-i[3456]86-*-openbsd*) gdb_host=obsd ;;
-i[3456]86-*-sco3.2v5*) gdb_host=i386sco5 ;;
-i[3456]86-*-sco3.2v4*) gdb_host=i386sco4 ;;
-i[3456]86-*-sco*) gdb_host=i386sco ;;
-i[3456]86-*-solaris*) gdb_host=i386sol2 ;;
-i[3456]86-*-sysv4.2*) gdb_host=i386v42mp ;;
-i[3456]86-*-sysv4*) gdb_host=i386v4 ;;
-i[3456]86-*-sysv5*) gdb_host=i386v42mp ;;
-i[3456]86-*-unixware2*) gdb_host=i386v42mp ;;
-i[3456]86-*-unixware*) gdb_host=i386v4 ;;
-i[3456]86-*-sysv*) gdb_host=i386v ;;
-i[3456]86-*-isc*) gdb_host=i386v ;;
-i[3456]86-*-cygwin*) gdb_host=cygwin ;;
+i[34567]86-*-bsd*) gdb_host=i386bsd ;;
+i[34567]86-*-dgux*) gdb_host=i386v4 ;;
+i[34567]86-*-freebsd*) gdb_host=fbsd ;;
+i[34567]86-*-netbsdelf*) gdb_host=nbsdelf ;;
+i[34567]86-*-netbsdaout*) gdb_host=nbsdaout ;;
+i[34567]86-*-netbsd*) gdb_host=nbsdaout ;;
+i[34567]86-*-go32*) gdb_host=go32 ;;
+i[34567]86-*-msdosdjgpp*) gdb_host=go32 ;;
+i[34567]86-*-linux*) gdb_host=linux ;;
+i[34567]86-*-lynxos*) gdb_host=i386lynx ;;
+i[34567]86-*-gnu*) gdb_host=i386gnu ;;
+i[34567]86-*-openbsd*) gdb_host=obsd ;;
+i[34567]86-*-sco3.2v5*) gdb_host=i386sco5 ;;
+i[34567]86-*-sco3.2v4*) gdb_host=i386sco4 ;;
+i[34567]86-*-sco*) gdb_host=i386sco ;;
+i[34567]86-*-solaris*) gdb_host=i386sol2 ;;
+i[34567]86-*-sysv4.2*) gdb_host=i386v42mp ;;
+i[34567]86-*-sysv4*) gdb_host=i386v4 ;;
+i[34567]86-*-sysv5*) gdb_host=i386v42mp ;;
+i[34567]86-*-unixware2*) gdb_host=i386v42mp ;;
+i[34567]86-*-unixware*) gdb_host=i386v4 ;;
+i[34567]86-*-sysv*) gdb_host=i386v ;;
+i[34567]86-*-isc*) gdb_host=i386v ;;
+i[34567]86-*-cygwin*) gdb_host=cygwin ;;
ia64-*-aix*) gdb_host=aix ;;
ia64-*-linux*) gdb_host=linux ;;
@@ -120,6 +120,8 @@ powerpc-*-aix*) gdb_host=aix432 ;;
powerpc-*-linux*) gdb_host=linux ;;
powerpc-*-netbsd*) gdb_host=nbsd ;;
+powerpc64-*-linux*) gdb_host=ppc64-linux ;;
+
rs6000-*-lynxos*) gdb_host=rs6000lynx ;;
rs6000-*-aix4*) gdb_host=aix4 ;;
rs6000-*-*) gdb_host=rs6000 ;;
diff --git a/gdb/configure.in b/gdb/configure.in
index 07aab351423..38792e03396 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -357,6 +357,12 @@ AC_CHECK_HEADERS(curses.h ncurses.h term.h)
# unconditionally, so what's the point in checking these?
AC_CHECK_HEADERS(ctype.h time.h)
+# ------------------------- #
+# Checks for declarations. #
+# ------------------------- #
+
+gcc_AC_CHECK_DECLS(getopt)
+
# ------------------ #
# Checks for types. #
# ------------------ #
@@ -384,6 +390,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 +918,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 fe4cc5d4856..21945c5f314 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -16,7 +16,7 @@ alpha*) gdb_target_cpu=alpha ;;
arm*) gdb_target_cpu=arm ;;
avr*) gdb_target_cpu=avr ;;
hppa*) gdb_target_cpu=pa ;;
-i[3456]86*) gdb_target_cpu=i386 ;;
+i[34567]86*) gdb_target_cpu=i386 ;;
m68hc11*|m6811*) gdb_target_cpu=m68hc11 ;;
m68*) gdb_target_cpu=m68k ;;
mips*) gdb_target_cpu=mips ;;
@@ -85,27 +85,27 @@ hppa*-*-*) gdb_target=hppa ;;
# OBSOLETE i[3456]86-sequent-bsd*) gdb_target=symmetry ;;
# OBSOLETE i[3456]86-sequent-sysv4*) gdb_target=ptx4 ;;
# OBSOLETE i[3456]86-sequent-sysv*) gdb_target=ptx ;;
-i[3456]86-ncr-*) gdb_target=ncr3000 ;;
-i[3456]86-*-bsd*) gdb_target=i386bsd ;;
-i[3456]86-*-netbsd*) gdb_target=nbsd ;;
-i[3456]86-*-openbsd*) gdb_target=obsd ;;
-i[3456]86-*-go32*) gdb_target=i386aout ;;
-i[3456]86-*-msdosdjgpp*) gdb_target=go32 ;;
-i[3456]86-*-nto*) gdb_target=nto ;;
-i[3456]86-*-lynxos*) gdb_target=i386lynx ;;
-i[3456]86-*-solaris*) gdb_target=i386sol2 ;;
-i[3456]86-*-sco*) gdb_target=i386v ;;
-i[3456]86-*-sysv*) gdb_target=i386v ;;
-i[3456]86-*-linux*) gdb_target=linux
+i[34567]86-ncr-*) gdb_target=ncr3000 ;;
+i[34567]86-*-bsd*) gdb_target=i386bsd ;;
+i[34567]86-*-netbsd*) gdb_target=nbsd ;;
+i[34567]86-*-openbsd*) gdb_target=obsd ;;
+i[34567]86-*-go32*) gdb_target=i386aout ;;
+i[34567]86-*-msdosdjgpp*) gdb_target=go32 ;;
+i[34567]86-*-nto*) gdb_target=nto ;;
+i[34567]86-*-lynxos*) gdb_target=i386lynx ;;
+i[34567]86-*-solaris*) gdb_target=i386sol2 ;;
+i[34567]86-*-sco*) gdb_target=i386v ;;
+i[34567]86-*-sysv*) gdb_target=i386v ;;
+i[34567]86-*-linux*) gdb_target=linux
build_gdbserver=yes
;;
-i[3456]86-*-isc*) gdb_target=i386v ;;
-i[3456]86-*-gnu*) gdb_target=i386gnu ;;
-i[3456]86-*-netware*) gdb_target=i386nw
+i[34567]86-*-isc*) gdb_target=i386v ;;
+i[34567]86-*-gnu*) gdb_target=i386gnu ;;
+i[34567]86-*-netware*) gdb_target=i386nw
configdirs="${configdirs} nlm" ;;
-i[3456]86-*-cygwin*) gdb_target=cygwin ;;
-i[3456]86-*-vxworks*) gdb_target=vxworks ;;
-i[3456]86-*-*) gdb_target=embed ;;
+i[34567]86-*-cygwin*) gdb_target=cygwin ;;
+i[34567]86-*-vxworks*) gdb_target=vxworks ;;
+i[34567]86-*-*) gdb_target=embed ;;
ia64-*-aix*) gdb_target=aix ;;
ia64-*-linux*) gdb_target=linux
@@ -130,6 +130,7 @@ m68*-*-aout*) gdb_target=monitor ;;
m68*-*-coff*) gdb_target=monitor ;;
m68*-*-elf*) gdb_target=monitor ;;
m68*-*-linux*) gdb_target=linux
+ gdb_multi_arch=1
build_gdbserver=yes
;;
m68*-*-lynxos*) gdb_target=m68klynx ;;
@@ -141,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 ;;
@@ -164,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 ;;
@@ -193,6 +186,7 @@ powerpc-*-aix*) gdb_target=aix ;;
powerpc-*-linux*) gdb_target=linux
build_gdbserver=yes
;;
+powerpc64-*-linux*) gdb_target=linux ;;
powerpc-*-vxworks*) gdb_target=vxworks ;;
powerpc*-*-*) if test -f ../sim/ppc/Makefile; then
gdb_target=ppc-sim
diff --git a/gdb/cp-abi.c b/gdb/cp-abi.c
index 3aa9966433f..43361fca2ea 100644
--- a/gdb/cp-abi.c
+++ b/gdb/cp-abi.c
@@ -234,6 +234,8 @@ show_cp_abi_cmd (char *args, int from_tty)
ui_out_text (uiout, ").\n");
}
+extern initialize_file_ftype _initialize_cp_abi; /* -Wmissing-prototypes */
+
void
_initialize_cp_abi (void)
{
diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c
index 9142e13159c..131e6aa6976 100644
--- a/gdb/cp-namespace.c
+++ b/gdb/cp-namespace.c
@@ -43,6 +43,9 @@ unsigned char processing_has_namespace_info;
contain the name of the current namespace. The string is
temporary; copy it if you need it. */
+/* FIXME: carlton/2003-06-12: This isn't entirely reliable: currently,
+ we get mislead by DW_AT_specification. */
+
const char *processing_current_prefix;
/* List of using directives that are active in the current file. */
@@ -232,6 +235,12 @@ cp_set_block_scope (const struct symbol *symbol,
if (SYMBOL_CPLUS_DEMANGLED_NAME (symbol) != NULL)
{
+#if 0
+ /* FIXME: carlton/2003-06-12: As mentioned above,
+ 'processing_has_namespace_info' currently isn't entirely
+ reliable, so let's always use demangled names to get this
+ information for now. */
+
if (processing_has_namespace_info)
{
block_set_scope
@@ -241,6 +250,7 @@ cp_set_block_scope (const struct symbol *symbol,
obstack);
}
else
+#endif
{
/* Try to figure out the appropriate namespace from the
demangled name. */
diff --git a/gdb/cp-support.c b/gdb/cp-support.c
index c4c45f5780e..14374f34ebb 100644
--- a/gdb/cp-support.c
+++ b/gdb/cp-support.c
@@ -28,6 +28,28 @@
#include "gdb_assert.h"
#include "symtab.h"
#include "gdbcmd.h"
+#include "dictionary.h"
+#include "objfiles.h"
+#include "frame.h"
+#include "symtab.h"
+#include "block.h"
+
+/* Functions/variables related to overload resolution. */
+
+static int sym_return_val_size;
+static int sym_return_val_index;
+static struct symbol **sym_return_val;
+
+static void overload_list_add_symbol (struct symbol *sym,
+ const char *oload_name);
+
+static void make_symbol_overload_list_using (const char *func_name,
+ const char *namespace,
+ const struct block *block);
+
+static void make_symbol_overload_list_qualified (const char *func_name);
+
+static void read_in_psymtabs (const char *oload_name);
/* The list of "maint cplus" commands. */
@@ -355,6 +377,278 @@ cp_func_name (const char *full_name)
return remove_params (previous_component);
}
+/* Overload resolution functions. */
+
+char *
+remove_params (const char *demangled_name)
+{
+ const char *argp;
+ char *new_name;
+ int depth;
+
+ if (demangled_name == NULL)
+ return NULL;
+
+ /* First find the end of the arg list. */
+ argp = strrchr (demangled_name, ')');
+ if (argp == NULL)
+ return NULL;
+
+ /* Back up to the beginning. */
+ depth = 1;
+
+ while (argp-- > demangled_name)
+ {
+ if (*argp == ')')
+ depth ++;
+ else if (*argp == '(')
+ {
+ depth --;
+
+ if (depth == 0)
+ break;
+ }
+ }
+ if (depth != 0)
+ internal_error (__FILE__, __LINE__,
+ "bad demangled name %s\n", demangled_name);
+ while (argp[-1] == ' ' && argp > demangled_name)
+ argp --;
+
+ new_name = xmalloc (argp - demangled_name + 1);
+ memcpy (new_name, demangled_name, argp - demangled_name);
+ new_name[argp - demangled_name] = '\0';
+ return new_name;
+}
+
+/* Helper routine for make_symbol_completion_list. */
+
+static int sym_return_val_size;
+static int sym_return_val_index;
+static struct symbol **sym_return_val;
+
+/* Test to see if the symbol specified by SYMNAME (which is already
+ demangled for C++ symbols) matches SYM_TEXT in the first SYM_TEXT_LEN
+ characters. If so, add it to the current completion list. */
+
+static void
+overload_list_add_symbol (struct symbol *sym, const char *oload_name)
+{
+ int newsize;
+ int i;
+ char *sym_name;
+
+ /* If there is no type information, we can't do anything, so skip */
+ if (SYMBOL_TYPE (sym) == NULL)
+ return;
+
+ /* skip any symbols that we've already considered. */
+ for (i = 0; i < sym_return_val_index; ++i)
+ if (!strcmp (DEPRECATED_SYMBOL_NAME (sym), DEPRECATED_SYMBOL_NAME (sym_return_val[i])))
+ return;
+
+ /* Get the demangled name without parameters */
+ sym_name = remove_params (SYMBOL_DEMANGLED_NAME (sym));
+ if (!sym_name)
+ return;
+
+ /* skip symbols that cannot match */
+ if (strcmp (sym_name, oload_name) != 0)
+ {
+ xfree (sym_name);
+ return;
+ }
+
+ xfree (sym_name);
+
+ /* We have a match for an overload instance, so add SYM to the current list
+ * of overload instances */
+ if (sym_return_val_index + 3 > sym_return_val_size)
+ {
+ newsize = (sym_return_val_size *= 2) * sizeof (struct symbol *);
+ sym_return_val = (struct symbol **) xrealloc ((char *) sym_return_val, newsize);
+ }
+ sym_return_val[sym_return_val_index++] = sym;
+ sym_return_val[sym_return_val_index] = NULL;
+}
+
+/* Return a null-terminated list of pointers to function symbols that
+ match name of the supplied symbol FSYM and that occur within the
+ namespace given by the initial substring of NAMESPACE_NAME of
+ length NAMESPACE_LEN. Apply using directives from BLOCK. This is
+ used in finding all overloaded instances of a function name. This
+ has been modified from make_symbol_completion_list. */
+
+/* FIXME: carlton/2003-01-30: Should BLOCK be here? Maybe it's better
+ to use get_selected_block (0). */
+
+struct symbol **
+make_symbol_overload_list (const char *func_name,
+ const char *namespace,
+ const struct block *block)
+{
+ struct cleanup *old_cleanups;
+
+ sym_return_val_size = 100;
+ sym_return_val_index = 0;
+ sym_return_val = xmalloc ((sym_return_val_size + 1) *
+ sizeof (struct symbol *));
+ sym_return_val[0] = NULL;
+
+ old_cleanups = make_cleanup (xfree, sym_return_val);
+
+ make_symbol_overload_list_using (func_name, namespace,
+ block);
+
+ discard_cleanups (old_cleanups);
+
+ return sym_return_val;
+}
+
+/* This applies the using directives to add namespaces to search in,
+ and then searches for overloads in all of those namespaces. It
+ adds the symbols found to sym_return_val. Arguments are as in
+ make_symbol_overload_list. */
+
+static void
+make_symbol_overload_list_using (const char *func_name,
+ const char *namespace,
+ const struct block *block)
+{
+ const struct using_direct *current;
+
+ /* First, go through the using directives. If any of them apply,
+ look in the appropriate namespaces for new functions to match
+ on. */
+
+ for (current = block_using (block);
+ current != NULL;
+ current = current->next)
+ {
+ if (strcmp (namespace, current->outer) == 0)
+ {
+ make_symbol_overload_list_using (func_name,
+ current->inner,
+ block);
+ }
+ }
+
+ /* Now, add names for this namespace. */
+
+ if (namespace[0] == '\0')
+ {
+ make_symbol_overload_list_qualified (func_name);
+ }
+ else
+ {
+ char *concatenated_name
+ = alloca (strlen (namespace) + 2 + strlen (func_name) + 1);
+ strcpy (concatenated_name, namespace);
+ strcat (concatenated_name, "::");
+ strcat (concatenated_name, func_name);
+ make_symbol_overload_list_qualified (concatenated_name);
+ }
+}
+
+/* This does the bulk of the work of finding overloaded symbols.
+ FUNC_NAME is the name of the overloaded function we're looking for
+ (possibly including namespace info); NEW_LIST is 1 if we should
+ allocate a new list of overloads and 0 if we should continue using
+ the same old list. */
+
+static void
+make_symbol_overload_list_qualified (const char *func_name)
+{
+ struct symbol *sym;
+ struct symtab *s;
+ struct objfile *objfile;
+ const struct block *b, *surrounding_static_block = 0;
+ struct dict_iterator iter;
+ const struct dictionary *dict;
+
+ /* Look through the partial symtabs for all symbols which begin
+ by matching FUNC_NAME. Make sure we read that symbol table in. */
+
+ read_in_psymtabs (func_name);
+
+ /* Search upwards from currently selected frame (so that we can
+ complete on local vars. */
+
+ for (b = get_selected_block (0); b != NULL; b = BLOCK_SUPERBLOCK (b))
+ {
+ dict = BLOCK_DICT (b);
+
+ for (sym = dict_iter_name_first (dict, func_name, &iter);
+ sym;
+ sym = dict_iter_name_next (func_name, &iter))
+ {
+ overload_list_add_symbol (sym, func_name);
+ }
+ }
+
+ surrounding_static_block = block_static_block (get_selected_block (0));
+
+ /* Go through the symtabs and check the externs and statics for
+ symbols which match. */
+
+ /* FIXME: carlton/2003-01-30: Why are we checking all the statics?
+ Also, this shouldn't check all the globals if there's an
+ anonymous namespace involved somewhere. */
+
+ ALL_SYMTABS (objfile, s)
+ {
+ QUIT;
+ b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK);
+ dict = BLOCK_DICT (b);
+
+ for (sym = dict_iter_name_first (dict, func_name, &iter);
+ sym;
+ sym = dict_iter_name_next (func_name, &iter))
+ {
+ overload_list_add_symbol (sym, func_name);
+ }
+ }
+
+ ALL_SYMTABS (objfile, s)
+ {
+ QUIT;
+ b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK);
+ /* Don't do this block twice. */
+ if (b == surrounding_static_block)
+ continue;
+ dict = BLOCK_DICT (b);
+
+ for (sym = dict_iter_name_first (dict, func_name, &iter);
+ sym;
+ sym = dict_iter_name_next (func_name, &iter))
+ {
+ overload_list_add_symbol (sym, func_name);
+ }
+ }
+}
+
+/* Look through the partial symtabs for all symbols which begin
+ by matching FUNC_NAME. Make sure we read that symbol table in. */
+
+static void
+read_in_psymtabs (const char *func_name)
+{
+ struct partial_symtab *ps;
+ struct objfile *objfile;
+
+ ALL_PSYMTABS (objfile, ps)
+ {
+ if (ps->readin)
+ continue;
+
+ if ((lookup_partial_symbol (ps, func_name, NULL, 1, VAR_DOMAIN)
+ != NULL)
+ || (lookup_partial_symbol (ps, func_name, NULL, 0, VAR_DOMAIN)
+ != NULL))
+ psymtab_to_symtab (ps);
+ }
+}
+
/* Don't allow just "maintenance cplus". */
static void
@@ -380,6 +674,8 @@ first_component_command (char *arg, int from_tty)
printf_unfiltered ("%s\n", prefix);
}
+extern initialize_file_ftype _initialize_cp_support; /* -Wmissing-prototypes */
+
void
_initialize_cp_support (void)
{
diff --git a/gdb/cp-support.h b/gdb/cp-support.h
index 9cfee7cce6b..0686c4a0714 100644
--- a/gdb/cp-support.h
+++ b/gdb/cp-support.h
@@ -30,6 +30,7 @@
/* Opaque declarations. */
+struct symbol;
struct obstack;
struct block;
@@ -59,6 +60,12 @@ extern unsigned int cp_entire_prefix_len (const char *name);
extern char *cp_func_name (const char *full_name);
+extern char *remove_params (const char *demangled_name);
+
+extern struct symbol **make_symbol_overload_list (const char *,
+ const char *,
+ const struct block *);
+
/* Functions/variables from cp-namespace.c. */
extern unsigned char processing_has_namespace_info;
@@ -71,7 +78,7 @@ extern void cp_add_using_directive (const char *name,
unsigned int outer_length,
unsigned int inner_length);
-extern void cp_initialize_namespace ();
+extern void cp_initialize_namespace (void);
extern void cp_finalize_namespace (struct block *static_block,
struct obstack *obstack);
diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c
index 6749f8e59e5..e5984b4e86b 100644
--- a/gdb/cp-valprint.c
+++ b/gdb/cp-valprint.c
@@ -554,7 +554,7 @@ cp_print_value (struct type *type, struct type *real_type, char *valaddr,
{
boffset = baseclass_offset (type, i,
valaddr + offset,
- address + offset);
+ address);
skip = ((boffset == -1) || (boffset + offset) < 0) ? 1 : -1;
if (BASETYPE_VIA_VIRTUAL (type, i))
@@ -569,9 +569,10 @@ cp_print_value (struct type *type, struct type *real_type, char *valaddr,
{
/* FIXME (alloca): unsafe if baseclass is really really large. */
base_valaddr = (char *) alloca (TYPE_LENGTH (baseclass));
- if (target_read_memory (address + offset + boffset, base_valaddr,
+ if (target_read_memory (address + boffset, base_valaddr,
TYPE_LENGTH (baseclass)) != 0)
skip = 1;
+ address = address + boffset;
thisoffset = 0;
boffset = 0;
thistype = baseclass;
@@ -600,7 +601,8 @@ cp_print_value (struct type *type, struct type *real_type, char *valaddr,
fprintf_filtered (stream, "<invalid address>");
else
cp_print_value_fields (baseclass, thistype, base_valaddr,
- thisoffset + boffset, address, stream, format,
+ thisoffset + boffset, address + boffset,
+ stream, format,
recurse, pretty,
((struct type **)
obstack_base (&dont_print_vb_obstack)),
diff --git a/gdb/cpu32bug-rom.c b/gdb/cpu32bug-rom.c
index 4341789e165..03b31321577 100644
--- a/gdb/cpu32bug-rom.c
+++ b/gdb/cpu32bug-rom.c
@@ -162,6 +162,8 @@ cpu32bug_open (char *args, int from_tty)
monitor_open (args, &cpu32bug_cmds, from_tty);
}
+extern initialize_file_ftype _initialize_cpu32bug_rom; /* -Wmissing-prototypes */
+
void
_initialize_cpu32bug_rom (void)
{
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index 2fbfde53b0e..3c7bf60a96a 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -464,7 +464,7 @@ static CORE_ADDR bfd_lookup_symbol (bfd *, const char *);
the entire prologue is examined (0) or just enough instructions to
determine that it is a prologue (1). */
-CORE_ADDR
+static CORE_ADDR
cris_examine (CORE_ADDR ip, CORE_ADDR limit, struct frame_info *fi,
int frameless_p)
{
@@ -712,7 +712,7 @@ cris_examine (CORE_ADDR ip, CORE_ADDR limit, struct frame_info *fi,
/* Advance pc beyond any function entry prologue instructions at pc
to reach some "real" code. */
-CORE_ADDR
+static CORE_ADDR
cris_skip_prologue (CORE_ADDR pc)
{
return cris_skip_prologue_main (pc, 0);
@@ -722,7 +722,7 @@ cris_skip_prologue (CORE_ADDR pc)
has a frame. Its result is equal to its input pc if the function is
frameless, unequal otherwise. */
-CORE_ADDR
+static CORE_ADDR
cris_skip_prologue_frameless_p (CORE_ADDR pc)
{
return cris_skip_prologue_main (pc, 1);
@@ -731,7 +731,7 @@ cris_skip_prologue_frameless_p (CORE_ADDR pc)
/* Given a PC value corresponding to the start of a function, return the PC
of the first instruction after the function prologue. */
-CORE_ADDR
+static CORE_ADDR
cris_skip_prologue_main (CORE_ADDR pc, int frameless_p)
{
struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
@@ -763,7 +763,7 @@ cris_skip_prologue_main (CORE_ADDR pc, int frameless_p)
adjusts pcptr (if necessary) to point to the actual memory location where
the breakpoint should be inserted. */
-const unsigned char *
+static const unsigned char *
cris_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
{
static unsigned char break_insn[] = {0x38, 0xe9};
@@ -784,7 +784,7 @@ cris_saved_pc_after_call (struct frame_info *frame)
/* Returns 1 if spec_reg is applicable to the current gdbarch's CRIS version,
0 otherwise. */
-int
+static int
cris_spec_reg_applicable (struct cris_spec_reg spec_reg)
{
int version = cris_version ();
@@ -818,7 +818,7 @@ cris_spec_reg_applicable (struct cris_spec_reg spec_reg)
/* Returns the register size in unit byte. Returns 0 for an unimplemented
register, -1 for an invalid register. */
-int
+static int
cris_register_size (int regno)
{
int i;
@@ -857,7 +857,7 @@ cris_register_size (int regno)
/* Nonzero if regno should not be fetched from the target. This is the case
for unimplemented (size 0) and non-existant registers. */
-int
+static int
cris_cannot_fetch_register (int regno)
{
return ((regno < 0 || regno >= NUM_REGS)
@@ -867,7 +867,7 @@ cris_cannot_fetch_register (int regno)
/* Nonzero if regno should not be written to the target, for various
reasons. */
-int
+static int
cris_cannot_store_register (int regno)
{
/* There are three kinds of registers we refuse to write to.
@@ -903,7 +903,7 @@ cris_cannot_store_register (int regno)
in the saved register state. Returns -1 for an invalid or unimplemented
register. */
-int
+static int
cris_register_offset (int regno)
{
int i;
@@ -929,7 +929,7 @@ cris_register_offset (int regno)
/* Return the GDB type (defined in gdbtypes.c) for the "standard" data type
of data in register regno. */
-struct type *
+static struct type *
cris_register_virtual_type (int regno)
{
if (regno == SP_REGNUM || regno == PC_REGNUM
@@ -966,7 +966,7 @@ cris_register_virtual_type (int regno)
/* In the original CRIS ABI, R10 is used to store return values. */
-void
+static void
cris_abi_original_store_return_value (struct type *type, char *valbuf)
{
int len = TYPE_LENGTH (type);
@@ -979,7 +979,7 @@ cris_abi_original_store_return_value (struct type *type, char *valbuf)
/* In the CRIS ABI V2, R10 and R11 are used to store return values. */
-void
+static void
cris_abi_v2_store_return_value (struct type *type, char *valbuf)
{
int len = TYPE_LENGTH (type);
@@ -997,7 +997,7 @@ cris_abi_v2_store_return_value (struct type *type, char *valbuf)
/* Return the name of register regno as a string. Return NULL for an invalid or
unimplemented register. */
-const char *
+static const char *
cris_register_name (int regno)
{
static char *cris_genreg_names[] =
@@ -1039,7 +1039,7 @@ cris_register_name (int regno)
}
}
-int
+static int
cris_register_bytes_ok (long bytes)
{
return (bytes == DEPRECATED_REGISTER_BYTES);
@@ -1051,7 +1051,7 @@ cris_register_bytes_ok (long bytes)
/* In the original CRIS ABI, R10 is used to return values. */
-void
+static void
cris_abi_original_extract_return_value (struct type *type, char *regbuf,
char *valbuf)
{
@@ -1065,7 +1065,7 @@ cris_abi_original_extract_return_value (struct type *type, char *regbuf,
/* In the CRIS ABI V2, R10 and R11 are used to store return values. */
-void
+static void
cris_abi_v2_extract_return_value (struct type *type, char *regbuf,
char *valbuf)
{
@@ -1083,7 +1083,7 @@ cris_abi_v2_extract_return_value (struct type *type, char *regbuf,
be stored. R9 is call-clobbered, which means we must save it here for
later use. */
-void
+static void
cris_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
{
write_register (STR_REGNUM, addr);
@@ -1094,32 +1094,19 @@ cris_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
structure value. It's not there in the CRIS ABI, so we must do it another
way. */
-CORE_ADDR
+static CORE_ADDR
cris_extract_struct_value_address (char *regbuf)
{
return struct_return_address;
}
-/* Returns 1 if a value of the given type being returned from a function
- must have space allocated for it on the stack. gcc_p is true if the
- function being considered is known to have been compiled by GCC.
- In the CRIS ABI, structure return values are passed to the called
- function by reference in register R9 to a caller-allocated area, so
- this is always true. */
-
-int
-cris_use_struct_convention (int gcc_p, struct type *type)
-{
- return 1;
-}
-
/* Returns 1 if the given type will be passed by pointer rather than
directly. */
/* In the original CRIS ABI, arguments shorter than or equal to 32 bits are
passed by value. */
-int
+static int
cris_abi_original_reg_struct_has_addr (int gcc_p, struct type *type)
{
return (TYPE_LENGTH (type) > 4);
@@ -1128,7 +1115,7 @@ cris_abi_original_reg_struct_has_addr (int gcc_p, struct type *type)
/* In the CRIS ABI V2, arguments shorter than or equal to 64 bits are passed
by value. */
-int
+static int
cris_abi_v2_reg_struct_has_addr (int gcc_p, struct type *type)
{
return (TYPE_LENGTH (type) > 8);
@@ -1137,7 +1124,7 @@ cris_abi_v2_reg_struct_has_addr (int gcc_p, struct type *type)
/* Returns 1 if the function invocation represented by fi does not have a
stack frame associated with it. Otherwise return 0. */
-int
+static int
cris_frameless_function_invocation (struct frame_info *fi)
{
if ((get_frame_type (fi) == SIGTRAMP_FRAME))
@@ -1151,7 +1138,7 @@ cris_frameless_function_invocation (struct frame_info *fi)
frame->saved_regs shall be allocated by
DEPRECATED_FRAME_INIT_SAVED_REGS using frame_saved_regs_zalloc. */
-void
+static void
cris_frame_init_saved_regs (struct frame_info *fi)
{
CORE_ADDR ip;
@@ -1198,7 +1185,7 @@ cris_frame_init_saved_regs (struct frame_info *fi)
When the call is from get_prev_frame_info, fromleaf is determined by
cris_frameless_function_invocation. */
-void
+static void
cris_init_extra_frame_info (int fromleaf, struct frame_info *fi)
{
if (get_next_frame (fi))
@@ -1252,7 +1239,7 @@ cris_init_extra_frame_info (int fromleaf, struct frame_info *fi)
/* Return the content of the frame pointer in the present frame. In other
words, determine the address of the calling function's frame. */
-CORE_ADDR
+static CORE_ADDR
cris_frame_chain (struct frame_info *fi)
{
if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi),
@@ -1273,7 +1260,7 @@ cris_frame_chain (struct frame_info *fi)
/* Return the saved PC (which equals the return address) of this frame. */
-CORE_ADDR
+static CORE_ADDR
cris_frame_saved_pc (struct frame_info *fi)
{
return get_frame_extra_info (fi)->return_pc;
@@ -1281,7 +1268,7 @@ cris_frame_saved_pc (struct frame_info *fi)
/* Setup the function arguments for calling a function in the inferior. */
-CORE_ADDR
+static CORE_ADDR
cris_abi_original_push_arguments (int nargs, struct value **args,
CORE_ADDR sp, int struct_return,
CORE_ADDR struct_addr)
@@ -1367,7 +1354,7 @@ cris_abi_original_push_arguments (int nargs, struct value **args,
return sp;
}
-CORE_ADDR
+static CORE_ADDR
cris_abi_v2_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
{
@@ -1499,7 +1486,7 @@ cris_abi_v2_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
by the called function unless it is a leaf-function. Due to the BRP
register the PC will change when continue is sent. */
-CORE_ADDR
+static CORE_ADDR
cris_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
{
write_register (SRP_REGNUM, CALL_DUMMY_ADDRESS ());
@@ -1510,7 +1497,7 @@ cris_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
was created. Discard the innermost frame from the stack and restore
all saved registers. */
-void
+static void
cris_pop_frame (void)
{
register struct frame_info *fi = get_current_frame ();
@@ -1772,7 +1759,7 @@ find_step_target (inst_env_type *inst_env)
digs through the opcodes in order to find all possible targets.
Either one ordinary target or two targets for branches may be found. */
-void
+static void
cris_software_single_step (enum target_signal ignore, int insert_breakpoints)
{
inst_env_type inst_env;
@@ -1816,7 +1803,7 @@ cris_software_single_step (enum target_signal ignore, int insert_breakpoints)
/* Calculates the prefix value for quick offset addressing mode. */
-void
+static void
quick_mode_bdap_prefix (unsigned short inst, inst_env_type *inst_env)
{
/* It's invalid to be in a delay slot. You can't have a prefix to this
@@ -1840,7 +1827,7 @@ quick_mode_bdap_prefix (unsigned short inst, inst_env_type *inst_env)
from the size of the operation. The PC is always kept aligned on even
word addresses. */
-void
+static void
process_autoincrement (int size, unsigned short inst, inst_env_type *inst_env)
{
if (size == INST_BYTE_SIZE)
@@ -1871,12 +1858,13 @@ process_autoincrement (int size, unsigned short inst, inst_env_type *inst_env)
/* Just a forward declaration. */
-unsigned long get_data_from_address (unsigned short *inst, CORE_ADDR address);
+static unsigned long get_data_from_address (unsigned short *inst,
+ CORE_ADDR address);
/* Calculates the prefix value for the general case of offset addressing
mode. */
-void
+static void
bdap_prefix (unsigned short inst, inst_env_type *inst_env)
{
@@ -1912,7 +1900,7 @@ bdap_prefix (unsigned short inst, inst_env_type *inst_env)
/* Calculates the prefix value for the index addressing mode. */
-void
+static void
biap_prefix (unsigned short inst, inst_env_type *inst_env)
{
/* It's invalid to be in a delay slot. I can't see that it's possible to
@@ -1947,7 +1935,7 @@ biap_prefix (unsigned short inst, inst_env_type *inst_env)
/* Calculates the prefix value for the double indirect addressing mode. */
-void
+static void
dip_prefix (unsigned short inst, inst_env_type *inst_env)
{
@@ -1980,7 +1968,7 @@ dip_prefix (unsigned short inst, inst_env_type *inst_env)
/* Finds the destination for a branch with 8-bits offset. */
-void
+static void
eight_bit_offset_branch_op (unsigned short inst, inst_env_type *inst_env)
{
@@ -2017,7 +2005,7 @@ eight_bit_offset_branch_op (unsigned short inst, inst_env_type *inst_env)
/* Finds the destination for a branch with 16-bits offset. */
-void
+static void
sixteen_bit_offset_branch_op (unsigned short inst, inst_env_type *inst_env)
{
short offset;
@@ -2048,7 +2036,7 @@ sixteen_bit_offset_branch_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the ABS instruction. */
-void
+static void
abs_op (unsigned short inst, inst_env_type *inst_env)
{
@@ -2090,7 +2078,7 @@ abs_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the ADDI instruction. */
-void
+static void
addi_op (unsigned short inst, inst_env_type *inst_env)
{
/* It's invalid to have the PC as base register. And ADDI can't have
@@ -2109,7 +2097,7 @@ addi_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the ASR instruction. */
-void
+static void
asr_op (unsigned short inst, inst_env_type *inst_env)
{
int shift_steps;
@@ -2186,7 +2174,7 @@ asr_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the ASRQ instruction. */
-void
+static void
asrq_op (unsigned short inst, inst_env_type *inst_env)
{
@@ -2233,7 +2221,7 @@ asrq_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the AX, EI and SETF instruction. */
-void
+static void
ax_ei_setf_op (unsigned short inst, inst_env_type *inst_env)
{
if (inst_env->prefix_found)
@@ -2259,7 +2247,7 @@ ax_ei_setf_op (unsigned short inst, inst_env_type *inst_env)
register. Note that check_assign assumes that the caller has checked that
there is a prefix to this instruction. The mode check depends on this. */
-void
+static void
check_assign (unsigned short inst, inst_env_type *inst_env)
{
/* Check if it's an assign addressing mode. */
@@ -2272,7 +2260,7 @@ check_assign (unsigned short inst, inst_env_type *inst_env)
/* Handles the 2-operand BOUND instruction. */
-void
+static void
two_operand_bound_op (unsigned short inst, inst_env_type *inst_env)
{
/* It's invalid to have the PC as the index operand. */
@@ -2305,7 +2293,7 @@ two_operand_bound_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the 3-operand BOUND instruction. */
-void
+static void
three_operand_bound_op (unsigned short inst, inst_env_type *inst_env)
{
/* It's an error if we haven't got a prefix. And it's also an error
@@ -2323,7 +2311,7 @@ three_operand_bound_op (unsigned short inst, inst_env_type *inst_env)
/* Clears the status flags in inst_env. */
-void
+static void
btst_nop_op (unsigned short inst, inst_env_type *inst_env)
{
/* It's an error if we have got a prefix. */
@@ -2341,7 +2329,7 @@ btst_nop_op (unsigned short inst, inst_env_type *inst_env)
/* Clears the status flags in inst_env. */
-void
+static void
clearf_di_op (unsigned short inst, inst_env_type *inst_env)
{
/* It's an error if we have got a prefix. */
@@ -2359,7 +2347,7 @@ clearf_di_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the CLEAR instruction if it's in register mode. */
-void
+static void
reg_mode_clear_op (unsigned short inst, inst_env_type *inst_env)
{
/* Check if the target is the PC. */
@@ -2396,7 +2384,7 @@ reg_mode_clear_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the TEST instruction if it's in register mode. */
-void
+static void
reg_mode_test_op (unsigned short inst, inst_env_type *inst_env)
{
/* It's an error if we have got a prefix. */
@@ -2415,7 +2403,7 @@ reg_mode_test_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the CLEAR and TEST instruction if the instruction isn't
in register mode. */
-void
+static void
none_reg_mode_clear_test_op (unsigned short inst, inst_env_type *inst_env)
{
/* Check if we are in a prefix mode. */
@@ -2440,7 +2428,7 @@ none_reg_mode_clear_test_op (unsigned short inst, inst_env_type *inst_env)
/* Checks that the PC isn't the destination register or the instructions has
a prefix. */
-void
+static void
dstep_logshift_mstep_neg_not_op (unsigned short inst, inst_env_type *inst_env)
{
/* It's invalid to have the PC as the destination. The instruction can't
@@ -2459,7 +2447,7 @@ dstep_logshift_mstep_neg_not_op (unsigned short inst, inst_env_type *inst_env)
/* Checks that the instruction doesn't have a prefix. */
-void
+static void
break_op (unsigned short inst, inst_env_type *inst_env)
{
/* The instruction can't have a prefix. */
@@ -2478,7 +2466,7 @@ break_op (unsigned short inst, inst_env_type *inst_env)
/* Checks that the PC isn't the destination register and that the instruction
doesn't have a prefix. */
-void
+static void
scc_op (unsigned short inst, inst_env_type *inst_env)
{
/* It's invalid to have the PC as the destination. The instruction can't
@@ -2497,7 +2485,7 @@ scc_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the register mode JUMP instruction. */
-void
+static void
reg_mode_jump_op (unsigned short inst, inst_env_type *inst_env)
{
/* It's invalid to do a JUMP in a delay slot. The mode is register, so
@@ -2518,7 +2506,8 @@ reg_mode_jump_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the JUMP instruction for all modes except register. */
-void none_reg_mode_jump_op (unsigned short inst, inst_env_type *inst_env)
+static void
+none_reg_mode_jump_op (unsigned short inst, inst_env_type *inst_env)
{
unsigned long newpc;
CORE_ADDR address;
@@ -2562,7 +2551,7 @@ void none_reg_mode_jump_op (unsigned short inst, inst_env_type *inst_env)
/* Handles moves to special registers (aka P-register) for all modes. */
-void
+static void
move_to_preg_op (unsigned short inst, inst_env_type *inst_env)
{
if (inst_env->prefix_found)
@@ -2617,7 +2606,7 @@ move_to_preg_op (unsigned short inst, inst_env_type *inst_env)
/* Handles moves from special registers (aka P-register) for all modes
except register. */
-void
+static void
none_reg_mode_move_from_preg_op (unsigned short inst, inst_env_type *inst_env)
{
if (inst_env->prefix_found)
@@ -2672,7 +2661,7 @@ none_reg_mode_move_from_preg_op (unsigned short inst, inst_env_type *inst_env)
/* Handles moves from special registers (aka P-register) when the mode
is register. */
-void
+static void
reg_mode_move_from_preg_op (unsigned short inst, inst_env_type *inst_env)
{
/* Register mode move from special register can't have a prefix. */
@@ -2707,7 +2696,7 @@ reg_mode_move_from_preg_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the MOVEM from memory to general register instruction. */
-void
+static void
move_mem_to_reg_movem_op (unsigned short inst, inst_env_type *inst_env)
{
if (inst_env->prefix_found)
@@ -2764,7 +2753,7 @@ move_mem_to_reg_movem_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the MOVEM to memory from general register instruction. */
-void
+static void
move_reg_to_mem_movem_op (unsigned short inst, inst_env_type *inst_env)
{
if (inst_env->prefix_found)
@@ -2803,7 +2792,7 @@ move_reg_to_mem_movem_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the pop instruction to a general register.
POP is a assembler macro for MOVE.D [SP+], Rd. */
-void
+static void
reg_pop_op (unsigned short inst, inst_env_type *inst_env)
{
/* POP can't have a prefix. */
@@ -2831,7 +2820,7 @@ reg_pop_op (unsigned short inst, inst_env_type *inst_env)
/* Handles moves from register to memory. */
-void
+static void
move_reg_to_mem_index_inc_op (unsigned short inst, inst_env_type *inst_env)
{
/* Check if we have a prefix. */
@@ -2860,7 +2849,7 @@ move_reg_to_mem_index_inc_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the intructions that's not yet implemented, by setting
inst_env->invalid to true. */
-void
+static void
not_implemented_op (unsigned short inst, inst_env_type *inst_env)
{
inst_env->invalid = 1;
@@ -2868,7 +2857,7 @@ not_implemented_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the XOR instruction. */
-void
+static void
xor_op (unsigned short inst, inst_env_type *inst_env)
{
/* XOR can't have a prefix. */
@@ -2897,7 +2886,7 @@ xor_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the MULS instruction. */
-void
+static void
muls_op (unsigned short inst, inst_env_type *inst_env)
{
/* MULS/U can't have a prefix. */
@@ -2921,7 +2910,7 @@ muls_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the MULU instruction. */
-void
+static void
mulu_op (unsigned short inst, inst_env_type *inst_env)
{
/* MULS/U can't have a prefix. */
@@ -2946,7 +2935,7 @@ mulu_op (unsigned short inst, inst_env_type *inst_env)
/* Calculate the result of the instruction for ADD, SUB, CMP AND, OR and MOVE.
The MOVE instruction is the move from source to register. */
-void
+static void
add_sub_cmp_and_or_move_action (unsigned short inst, inst_env_type *inst_env,
unsigned long source1, unsigned long source2)
{
@@ -3028,7 +3017,7 @@ add_sub_cmp_and_or_move_action (unsigned short inst, inst_env_type *inst_env,
is zero extend then the value is extended with zero. If instead the mode
is signed extend the sign bit of the value is taken into consideration. */
-unsigned long
+static unsigned long
do_sign_or_zero_extend (unsigned long value, unsigned short *inst)
{
/* The size can be either byte or word, check which one it is.
@@ -3066,7 +3055,7 @@ do_sign_or_zero_extend (unsigned long value, unsigned short *inst)
/* Handles the register mode for the ADD, SUB, CMP, AND, OR and MOVE
instruction. The MOVE instruction is the move from source to register. */
-void
+static void
reg_mode_add_sub_cmp_and_or_move_op (unsigned short inst,
inst_env_type *inst_env)
{
@@ -3111,7 +3100,7 @@ reg_mode_add_sub_cmp_and_or_move_op (unsigned short inst,
the size of the operation. If the instruction is a zero or signed
extend instruction, the size field is changed in instruction. */
-unsigned long
+static unsigned long
get_data_from_address (unsigned short *inst, CORE_ADDR address)
{
int size = cris_get_size (*inst);
@@ -3139,7 +3128,7 @@ get_data_from_address (unsigned short *inst, CORE_ADDR address)
/* Handles the assign addresing mode for the ADD, SUB, CMP, AND, OR and MOVE
instructions. The MOVE instruction is the move from source to register. */
-void
+static void
handle_prefix_assign_mode_for_aritm_op (unsigned short inst,
inst_env_type *inst_env)
{
@@ -3168,7 +3157,7 @@ handle_prefix_assign_mode_for_aritm_op (unsigned short inst,
OR instructions. Note that for this to work as expected, the calling
function must have made sure that there is a prefix to this instruction. */
-void
+static void
three_operand_add_sub_cmp_and_or_op (unsigned short inst,
inst_env_type *inst_env)
{
@@ -3196,7 +3185,7 @@ three_operand_add_sub_cmp_and_or_op (unsigned short inst,
/* Handles the index addresing mode for the ADD, SUB, CMP, AND, OR and MOVE
instructions. The MOVE instruction is the move from source to register. */
-void
+static void
handle_prefix_index_mode_for_aritm_op (unsigned short inst,
inst_env_type *inst_env)
{
@@ -3224,7 +3213,7 @@ handle_prefix_index_mode_for_aritm_op (unsigned short inst,
CMP, AND OR and MOVE instruction. The MOVE instruction is the move from
source to register. */
-void
+static void
handle_inc_and_index_mode_for_aritm_op (unsigned short inst,
inst_env_type *inst_env)
{
@@ -3274,7 +3263,7 @@ handle_inc_and_index_mode_for_aritm_op (unsigned short inst,
/* Handles the two-operand addressing mode, all modes except register, for
the ADD, SUB CMP, AND and OR instruction. */
-void
+static void
none_reg_mode_add_sub_cmp_and_or_move_op (unsigned short inst,
inst_env_type *inst_env)
{
@@ -3303,7 +3292,7 @@ none_reg_mode_add_sub_cmp_and_or_move_op (unsigned short inst,
/* Handles the quick addressing mode for the ADD and SUB instruction. */
-void
+static void
quick_mode_add_sub_op (unsigned short inst, inst_env_type *inst_env)
{
unsigned long operand1;
@@ -3343,7 +3332,7 @@ quick_mode_add_sub_op (unsigned short inst, inst_env_type *inst_env)
/* Handles the quick addressing mode for the CMP, AND and OR instruction. */
-void
+static void
quick_mode_and_cmp_move_or_op (unsigned short inst, inst_env_type *inst_env)
{
unsigned long operand1;
@@ -3389,8 +3378,9 @@ quick_mode_and_cmp_move_or_op (unsigned short inst, inst_env_type *inst_env)
/* Translate op_type to a function and call it. */
-static void cris_gdb_func (enum cris_op_type op_type, unsigned short inst,
- inst_env_type *inst_env)
+static void
+cris_gdb_func (enum cris_op_type op_type, unsigned short inst,
+ inst_env_type *inst_env)
{
switch (op_type)
{
@@ -3562,7 +3552,7 @@ typedef elf_greg_t elf_gregset_t[35];
/* Unpack an elf_gregset_t into GDB's register cache. */
-void
+static void
supply_gregset (elf_gregset_t *gregsetp)
{
int i;
@@ -3627,7 +3617,7 @@ static struct core_fns cris_elf_core_fns =
See gdb/solib-svr4.h for an explanation of these fields. */
-struct link_map_offsets *
+static struct link_map_offsets *
cris_linux_svr4_fetch_link_map_offsets (void)
{
static struct link_map_offsets lmo;
@@ -3855,6 +3845,8 @@ cris_fpless_backtrace (char *noargs, int from_tty)
}
}
+extern initialize_file_ftype _initialize_cris_tdep; /* -Wmissing-prototypes */
+
void
_initialize_cris_tdep (void)
{
@@ -4239,21 +4231,21 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Returns the register offset for the first byte of register regno's space
in the saved register state. */
- set_gdbarch_register_byte (gdbarch, cris_register_offset);
+ set_gdbarch_deprecated_register_byte (gdbarch, cris_register_offset);
/* The length of the registers in the actual machine representation. */
- set_gdbarch_register_raw_size (gdbarch, cris_register_size);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, cris_register_size);
/* The largest value REGISTER_RAW_SIZE can have. */
set_gdbarch_deprecated_max_register_raw_size (gdbarch, 32);
/* The length of the registers in the program's representation. */
- set_gdbarch_register_virtual_size (gdbarch, cris_register_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, cris_register_size);
/* The largest value REGISTER_VIRTUAL_SIZE can have. */
set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 32);
- set_gdbarch_register_virtual_type (gdbarch, cris_register_virtual_type);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, cris_register_virtual_type);
/* Use generic dummy frames. */
@@ -4267,16 +4259,13 @@ 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);
set_gdbarch_deprecated_store_struct_return (gdbarch, cris_store_struct_return);
set_gdbarch_deprecated_extract_struct_value_address
(gdbarch, cris_extract_struct_value_address);
- set_gdbarch_use_struct_convention (gdbarch, cris_use_struct_convention);
+ set_gdbarch_use_struct_convention (gdbarch, always_use_struct_convention);
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, cris_frame_init_saved_regs);
set_gdbarch_deprecated_init_extra_frame_info (gdbarch, cris_init_extra_frame_info);
@@ -4305,13 +4294,11 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_frame_saved_pc (gdbarch, cris_frame_saved_pc);
set_gdbarch_deprecated_saved_pc_after_call (gdbarch, cris_saved_pc_after_call);
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
-
/* Helpful for backtracing and returning in a call dummy. */
- set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
+ set_gdbarch_deprecated_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
/* Should be using push_dummy_call. */
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
/* Use target_specific function to define link map offsets. */
set_solib_svr4_fetch_link_map_offsets
diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c
index c184b4457e7..d522580c76c 100644
--- a/gdb/d10v-tdep.c
+++ b/gdb/d10v-tdep.c
@@ -44,6 +44,7 @@
#include "gdb/sim-d10v.h"
#include "sim-regno.h"
#include "disasm.h"
+#include "trad-frame.h"
#include "gdb_assert.h"
@@ -85,13 +86,13 @@ enum
RET1_REGNUM = R0_REGNUM,
};
-int
+static int
nr_dmap_regs (struct gdbarch *gdbarch)
{
return gdbarch_tdep (gdbarch)->nr_dmap_regs;
}
-int
+static int
a0_regnum (struct gdbarch *gdbarch)
{
return gdbarch_tdep (gdbarch)->a0_regnum;
@@ -101,8 +102,6 @@ a0_regnum (struct gdbarch *gdbarch)
extern void _initialize_d10v_tdep (void);
-static CORE_ADDR d10v_read_sp (void);
-
static void d10v_eva_prepare_to_trace (void);
static void d10v_eva_get_trace_data (void);
@@ -563,21 +562,20 @@ d10v_skip_prologue (CORE_ADDR pc)
struct d10v_unwind_cache
{
- CORE_ADDR return_pc;
/* The previous frame's inner most stack address. Used as this
frame ID's stack_addr. */
CORE_ADDR prev_sp;
/* The frame's base, optionally used by the high-level debug info. */
CORE_ADDR base;
int size;
- CORE_ADDR *saved_regs;
/* How far the SP and r11 (FP) have been offset from the start of
the stack frame (as defined by the previous frame's stack
pointer). */
LONGEST sp_offset;
LONGEST r11_offset;
int uses_frame;
- void **regs;
+ /* Table indicating the location of each and every register. */
+ struct trad_frame_saved_reg *saved_regs;
};
static int
@@ -591,7 +589,7 @@ prologue_find_regs (struct d10v_unwind_cache *info, unsigned short op,
{
n = (op & 0x1E0) >> 5;
info->sp_offset -= 2;
- info->saved_regs[n] = info->sp_offset;
+ info->saved_regs[n].addr = info->sp_offset;
return 1;
}
@@ -600,8 +598,8 @@ prologue_find_regs (struct d10v_unwind_cache *info, unsigned short op,
{
n = (op & 0x1E0) >> 5;
info->sp_offset -= 4;
- info->saved_regs[n] = info->sp_offset;
- info->saved_regs[n + 1] = info->sp_offset + 2;
+ info->saved_regs[n + 0].addr = info->sp_offset + 0;
+ info->saved_regs[n + 1].addr = info->sp_offset + 2;
return 1;
}
@@ -627,7 +625,7 @@ prologue_find_regs (struct d10v_unwind_cache *info, unsigned short op,
if ((op & 0x7E1F) == 0x6816)
{
n = (op & 0x1E0) >> 5;
- info->saved_regs[n] = info->r11_offset;
+ info->saved_regs[n].addr = info->r11_offset;
return 1;
}
@@ -639,7 +637,7 @@ prologue_find_regs (struct d10v_unwind_cache *info, unsigned short op,
if ((op & 0x7E1F) == 0x681E)
{
n = (op & 0x1E0) >> 5;
- info->saved_regs[n] = info->sp_offset;
+ info->saved_regs[n].addr = info->sp_offset;
return 1;
}
@@ -647,8 +645,8 @@ prologue_find_regs (struct d10v_unwind_cache *info, unsigned short op,
if ((op & 0x7E3F) == 0x3A1E)
{
n = (op & 0x1E0) >> 5;
- info->saved_regs[n] = info->sp_offset;
- info->saved_regs[n + 1] = info->sp_offset + 2;
+ info->saved_regs[n + 0].addr = info->sp_offset + 0;
+ info->saved_regs[n + 1].addr = info->sp_offset + 2;
return 1;
}
@@ -661,10 +659,11 @@ prologue_find_regs (struct d10v_unwind_cache *info, unsigned short op,
in the stack frame. sp is even more special: the address we return
for it IS the sp for the next frame. */
-struct d10v_unwind_cache *
+static 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;
@@ -678,10 +677,9 @@ d10v_frame_unwind_cache (struct frame_info *next_frame,
info = FRAME_OBSTACK_ZALLOC (struct d10v_unwind_cache);
(*this_prologue_cache) = info;
- info->saved_regs = FRAME_OBSTACK_CALLOC (NUM_REGS, CORE_ADDR);
+ info->saved_regs = trad_frame_alloc_saved_regs (next_frame);
info->size = 0;
- info->return_pc = 0;
info->sp_offset = 0;
info->uses_frame = 0;
@@ -689,7 +687,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 */
@@ -704,15 +702,15 @@ d10v_frame_unwind_cache (struct frame_info *next_frame,
/* st rn, @(offset,sp) */
short offset = op & 0xFFFF;
short n = (op >> 20) & 0xF;
- info->saved_regs[n] = info->sp_offset + offset;
+ info->saved_regs[n].addr = info->sp_offset + offset;
}
else if ((op & 0x3F1F0000) == 0x350F0000)
{
/* st2w rn, @(offset,sp) */
short offset = op & 0xFFFF;
short n = (op >> 20) & 0xF;
- info->saved_regs[n] = info->sp_offset + offset;
- info->saved_regs[n + 1] = info->sp_offset + offset + 2;
+ info->saved_regs[n + 0].addr = info->sp_offset + offset + 0;
+ info->saved_regs[n + 1].addr = info->sp_offset + offset + 2;
}
else
break;
@@ -738,7 +736,8 @@ d10v_frame_unwind_cache (struct frame_info *next_frame,
info->size = -info->sp_offset;
- /* Compute the frame's base, and the previous frame's SP. */
+ /* Compute the previous frame's stack pointer (which is also the
+ frame's ID's stack address), and this frame's base pointer. */
if (info->uses_frame)
{
/* The SP was moved to the FP. This indicates that a new frame
@@ -749,15 +748,6 @@ d10v_frame_unwind_cache (struct frame_info *next_frame,
to before the first saved register giving the SP. */
prev_sp = this_base + info->size;
}
- else if (info->saved_regs[D10V_SP_REGNUM])
- {
- /* 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));
- prev_sp = this_base;
- }
else
{
/* Assume that the FP is this frame's SP but with that pushed
@@ -766,34 +756,28 @@ d10v_frame_unwind_cache (struct frame_info *next_frame,
prev_sp = this_base + info->size;
}
+ /* Convert that SP/BASE into real addresses. */
+ info->prev_sp = d10v_make_daddr (prev_sp);
info->base = d10v_make_daddr (this_base);
- info->prev_sp = d10v_make_daddr (prev_sp);
/* Adjust all the saved registers so that they contain addresses and
not offsets. */
for (i = 0; i < NUM_REGS - 1; i++)
- if (info->saved_regs[i])
+ if (info->saved_regs[i].addr)
{
- info->saved_regs[i] = (info->prev_sp + info->saved_regs[i]);
+ info->saved_regs[i].addr = (info->prev_sp + info->saved_regs[i].addr);
}
- 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));
- info->return_pc = d10v_make_iaddr (return_pc);
- }
- else
- {
- ULONGEST return_pc;
- frame_unwind_unsigned_register (next_frame, LR_REGNUM, &return_pc);
- info->return_pc = d10v_make_iaddr (return_pc);
- }
+ /* The call instruction moves the caller's PC in the callee's LR.
+ Since this is an unwind, do the reverse. Copy the location of LR
+ into PC (the address / regnum) so that a request for PC will be
+ converted into a request for the LR. */
+ info->saved_regs[D10V_PC_REGNUM] = info->saved_regs[LR_REGNUM];
- /* The D10V_SP_REGNUM is special. Instead of the address of the SP, the
- previous frame's SP value is saved. */
- info->saved_regs[D10V_SP_REGNUM] = info->prev_sp;
+ /* The previous frame's SP needed to be computed. Save the computed
+ value. */
+ trad_frame_register_value (info->saved_regs, D10V_SP_REGNUM,
+ d10v_make_daddr (prev_sp));
return info;
}
@@ -873,7 +857,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));
}
@@ -916,9 +900,11 @@ d10v_write_pc (CORE_ADDR val, ptid_t ptid)
}
static CORE_ADDR
-d10v_read_sp (void)
+d10v_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
- return (d10v_make_daddr (read_register (D10V_SP_REGNUM)));
+ ULONGEST sp;
+ frame_unwind_unsigned_register (next_frame, D10V_SP_REGNUM, &sp);
+ return d10v_make_daddr (sp);
}
/* When arguments must be pushed onto the stack, they go on in reverse
@@ -977,9 +963,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 +974,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.
@@ -1443,54 +1430,6 @@ d10v_frame_this_id (struct frame_info *next_frame,
}
static void
-saved_regs_unwinder (struct frame_info *next_frame,
- CORE_ADDR *this_saved_regs,
- int regnum, int *optimizedp,
- enum lval_type *lvalp, CORE_ADDR *addrp,
- int *realnump, void *bufferp)
-{
- if (this_saved_regs[regnum] != 0)
- {
- if (regnum == D10V_SP_REGNUM)
- {
- /* SP register treated specially. */
- *optimizedp = 0;
- *lvalp = not_lval;
- *addrp = 0;
- *realnump = -1;
- if (bufferp != NULL)
- store_unsigned_integer (bufferp,
- register_size (current_gdbarch, regnum),
- this_saved_regs[regnum]);
- }
- else
- {
- /* Any other register is saved in memory, fetch it but cache
- a local copy of its value. */
- *optimizedp = 0;
- *lvalp = lval_memory;
- *addrp = this_saved_regs[regnum];
- *realnump = -1;
- if (bufferp != NULL)
- {
- /* Read the value in from memory. */
- read_memory (this_saved_regs[regnum], bufferp,
- register_size (current_gdbarch, regnum));
- }
- }
- return;
- }
-
- /* No luck, assume this and the next frame have the same register
- value. If a value is needed, pass the request on down the chain;
- otherwise just return an indication that the value is in the same
- register as the next frame. */
- frame_register_unwind (next_frame, regnum, optimizedp, lvalp, addrp,
- realnump, bufferp);
-}
-
-
-static void
d10v_frame_prev_register (struct frame_info *next_frame,
void **this_prologue_cache,
int regnum, int *optimizedp,
@@ -1499,19 +1438,8 @@ d10v_frame_prev_register (struct frame_info *next_frame,
{
struct d10v_unwind_cache *info
= d10v_frame_unwind_cache (next_frame, this_prologue_cache);
- if (regnum == D10V_PC_REGNUM)
- {
- /* The call instruction saves the caller's PC in LR. The
- function prologue of the callee may then save the LR on the
- stack. Find that possibly saved LR value and return it. */
- saved_regs_unwinder (next_frame, info->saved_regs, LR_REGNUM, optimizedp,
- lvalp, addrp, realnump, bufferp);
- }
- else
- {
- saved_regs_unwinder (next_frame, info->saved_regs, regnum, optimizedp,
- lvalp, addrp, realnump, bufferp);
- }
+ trad_frame_prev_register (next_frame, info->saved_regs, regnum,
+ optimizedp, lvalp, addrp, realnump, bufferp);
}
static const struct frame_unwind d10v_frame_unwind = {
@@ -1520,7 +1448,7 @@ static const struct frame_unwind d10v_frame_unwind = {
d10v_frame_prev_register
};
-const struct frame_unwind *
+static const struct frame_unwind *
d10v_frame_p (CORE_ADDR pc)
{
return &d10v_frame_unwind;
@@ -1549,9 +1477,8 @@ static const struct frame_base d10v_frame_base = {
static struct frame_id
d10v_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
- ULONGEST base;
- frame_unwind_unsigned_register (next_frame, D10V_SP_REGNUM, &base);
- return frame_id_build (d10v_make_daddr (base), frame_pc_unwind (next_frame));
+ return frame_id_build (d10v_unwind_sp (gdbarch, next_frame),
+ frame_pc_unwind (next_frame));
}
static gdbarch_init_ftype d10v_gdbarch_init;
@@ -1600,7 +1527,7 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_read_pc (gdbarch, d10v_read_pc);
set_gdbarch_write_pc (gdbarch, d10v_write_pc);
- set_gdbarch_read_sp (gdbarch, d10v_read_sp);
+ set_gdbarch_unwind_sp (gdbarch, d10v_unwind_sp);
set_gdbarch_num_regs (gdbarch, d10v_num_regs);
set_gdbarch_sp_regnum (gdbarch, D10V_SP_REGNUM);
@@ -1656,7 +1583,6 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frame_args_skip (gdbarch, 0);
set_gdbarch_frameless_function_invocation (gdbarch, frameless_look_for_prologue);
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
set_gdbarch_frame_align (gdbarch, d10v_frame_align);
set_gdbarch_register_sim_regno (gdbarch, d10v_register_sim_regno);
@@ -1666,9 +1592,10 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
frame_unwind_append_predicate (gdbarch, d10v_frame_p);
frame_base_set_default (gdbarch, &d10v_frame_base);
- /* Methods for saving / extracting a dummy frame's ID. */
+ /* Methods for saving / extracting a dummy frame's ID. The ID's
+ stack address must match the SP value returned by
+ PUSH_DUMMY_CALL, and saved by generic_save_dummy_frame_tos. */
set_gdbarch_unwind_dummy_id (gdbarch, d10v_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, d10v_unwind_pc);
diff --git a/gdb/dbug-rom.c b/gdb/dbug-rom.c
index aadab6f5b06..a592334ea05 100644
--- a/gdb/dbug-rom.c
+++ b/gdb/dbug-rom.c
@@ -160,6 +160,8 @@ dbug_open (char *args, int from_tty)
monitor_open (args, &dbug_cmds, from_tty);
}
+extern initialize_file_ftype _initialize_dbug_rom; /* -Wmissing-prototypes */
+
void
_initialize_dbug_rom (void)
{
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index de4ea741b54..7acc01d079d 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -1232,7 +1232,7 @@ read_dbx_dynamic_symtab (struct objfile *objfile)
}
#ifdef SOFUN_ADDRESS_MAYBE_MISSING
-CORE_ADDR
+static CORE_ADDR
find_stab_function_addr (char *namestring, const char *filename,
struct objfile *objfile)
{
diff --git a/gdb/defs.h b/gdb/defs.h
index f9229b32327..a3895407847 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -405,6 +405,8 @@ extern void reinitialize_more_filter (void);
/* Normal results */
extern struct ui_file *gdb_stdout;
+/* Input stream */
+extern struct ui_file *gdb_stdin;
/* Serious error notifications */
extern struct ui_file *gdb_stderr;
/* Log/debug/trace messages that should bypass normal stdout/stderr
@@ -417,6 +419,8 @@ extern struct ui_file *gdb_stdlog;
very near future that restriction shall be removed - either call
shall be unfiltered. (cagney 1999-07-02). */
extern struct ui_file *gdb_stdtarg;
+extern struct ui_file *gdb_stdtargerr;
+extern struct ui_file *gdb_stdtargin;
#if defined(TUI)
#include "tui.h"
@@ -881,6 +885,9 @@ extern NORETURN void error (const char *fmt, ...) ATTR_NORETURN ATTR_FORMAT (pri
extern NORETURN void error_stream (struct ui_file *) ATTR_NORETURN;
+/* Initialize the error buffer. */
+extern void error_init (void);
+
/* Returns a freshly allocate buffer containing the last error
message. */
extern char *error_last_message (void);
@@ -1126,8 +1133,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/dictionary.c b/gdb/dictionary.c
index 68366498f6d..38020007637 100644
--- a/gdb/dictionary.c
+++ b/gdb/dictionary.c
@@ -51,8 +51,8 @@
their structs have the same initial data members. Define accessor
macros for your new data members.
- * Implement all the functions in dict_vtbl as static functions,
- whose name is the same as the corresponding member of dict_vtbl
+ * Implement all the functions in dict_vector as static functions,
+ whose name is the same as the corresponding member of dict_vector
plus _<impl>. You don't have to do this for those members where
you can reuse existing generic functions
(e.g. add_symbol_nonexpandable, free_obstack) or in the case where
@@ -60,7 +60,7 @@
and where the variant doesn't affect the member function in
question.
- * Define a static const struct dict_vtbl dict_<impl>_vtbl.
+ * Define a static const struct dict_vector dict_<impl>_vector.
* Define a function dict_create_<impl> to create these
gizmos. Add its declaration to dictionary.h.
@@ -68,7 +68,7 @@
To add a new operation <op> on all existing implementations, what
you should do is:
- * Add a new member <op> to struct dict_vtbl.
+ * Add a new member <op> to struct dict_vector.
* If there is useful generic behavior <op>, define a static
function <op>_something_informative that implements that behavior.
@@ -78,10 +78,10 @@
behavior for <op>, define a static function <op>_<impl>
implementing it.
- * Modify all existing dict_vtbl_<impl>'s to include the appropriate
+ * Modify all existing dict_vector_<impl>'s to include the appropriate
member.
- * Define a function dict_<op> that looks up <op> in the dict_vtbl
+ * Define a function dict_<op> that looks up <op> in the dict_vector
and calls the appropriate function. Add a declaration for
dict_<op> to dictionary.h.
@@ -104,7 +104,7 @@ enum dict_type
/* The virtual function table. */
-struct dict_vtbl
+struct dict_vector
{
/* The type of the dictionary. This is only here to make debugging
a bit easier; it's not actually used. */
@@ -123,6 +123,8 @@ struct dict_vtbl
struct dict_iterator *iterator);
struct symbol *(*iter_name_next) (const char *name,
struct dict_iterator *iterator);
+ /* A size function, for maint print symtabs. */
+ int (*size) (const struct dictionary *dict);
};
/* Now comes the structs used to store the data for different
@@ -165,7 +167,7 @@ struct dictionary_linear_expandable
struct dictionary
{
- const struct dict_vtbl *vtbl;
+ const struct dict_vector *vector;
union
{
struct dictionary_hashed hashed;
@@ -178,7 +180,7 @@ struct dictionary
/* Accessor macros. */
-#define DICT_VTBL(d) (d)->vtbl
+#define DICT_VECTOR(d) (d)->vector
/* These can be used for DICT_HASHED_EXPANDABLE, too. */
@@ -219,7 +221,7 @@ struct dictionary
otherwise, this is unused. */
#define DICT_ITERATOR_CURRENT(iter) (iter)->current
-/* Declarations of functions for vtbls. */
+/* Declarations of functions for vectors. */
/* Functions that might work across a range of dictionary types. */
@@ -243,6 +245,10 @@ static struct symbol *iter_name_first_hashed (const struct dictionary *dict,
static struct symbol *iter_name_next_hashed (const char *name,
struct dict_iterator *iterator);
+/* Functions only for DICT_HASHED. */
+
+static int size_hashed (const struct dictionary *dict);
+
/* Functions only for DICT_HASHED_EXPANDABLE. */
static void free_hashed_expandable (struct dictionary *dict);
@@ -250,6 +256,8 @@ static void free_hashed_expandable (struct dictionary *dict);
static void add_symbol_hashed_expandable (struct dictionary *dict,
struct symbol *sym);
+static int size_hashed_expandable (const struct dictionary *dict);
+
/* Functions for DICT_LINEAR and DICT_LINEAR_EXPANDABLE
dictionaries. */
@@ -265,6 +273,7 @@ static struct symbol *iter_name_first_linear (const struct dictionary *dict,
static struct symbol *iter_name_next_linear (const char *name,
struct dict_iterator *iterator);
+static int size_linear (const struct dictionary *dict);
/* Functions only for DICT_LINEAR_EXPANDABLE. */
@@ -273,40 +282,58 @@ static void free_linear_expandable (struct dictionary *dict);
static void add_symbol_linear_expandable (struct dictionary *dict,
struct symbol *sym);
-/* Various vtbls that we'll actually use. */
+/* Various vectors that we'll actually use. */
-static const struct dict_vtbl dict_hashed_vtbl =
+static const struct dict_vector dict_hashed_vector =
{
- DICT_HASHED, free_obstack, add_symbol_nonexpandable,
- iterator_first_hashed, iterator_next_hashed,
- iter_name_first_hashed, iter_name_next_hashed,
+ DICT_HASHED, /* type */
+ free_obstack, /* free */
+ add_symbol_nonexpandable, /* add_symbol */
+ iterator_first_hashed, /* iteractor_first */
+ iterator_next_hashed, /* iterator_next */
+ iter_name_first_hashed, /* iter_name_first */
+ iter_name_next_hashed, /* iter_name_next */
+ size_hashed, /* size */
};
-static const struct dict_vtbl dict_hashed_expandable_vtbl =
+static const struct dict_vector dict_hashed_expandable_vector =
{
- DICT_HASHED_EXPANDABLE, free_hashed_expandable,
- add_symbol_hashed_expandable,
- iterator_first_hashed, iterator_next_hashed,
- iter_name_first_hashed, iter_name_next_hashed,
+ DICT_HASHED_EXPANDABLE, /* type */
+ free_hashed_expandable, /* free */
+ add_symbol_hashed_expandable, /* add_symbol */
+ iterator_first_hashed, /* iteractor_first */
+ iterator_next_hashed, /* iterator_next */
+ iter_name_first_hashed, /* iter_name_first */
+ iter_name_next_hashed, /* iter_name_next */
+ size_hashed_expandable, /* size */
};
-static const struct dict_vtbl dict_linear_vtbl =
+static const struct dict_vector dict_linear_vector =
{
- DICT_LINEAR, free_obstack, add_symbol_nonexpandable,
- iterator_first_linear, iterator_next_linear,
- iter_name_first_linear, iter_name_next_linear,
+ DICT_LINEAR, /* type */
+ free_obstack, /* free */
+ add_symbol_nonexpandable, /* add_symbol */
+ iterator_first_linear, /* iteractor_first */
+ iterator_next_linear, /* iterator_next */
+ iter_name_first_linear, /* iter_name_first */
+ iter_name_next_linear, /* iter_name_next */
+ size_linear, /* size */
};
-static const struct dict_vtbl dict_linear_expandable_vtbl =
+static const struct dict_vector dict_linear_expandable_vector =
{
- DICT_LINEAR_EXPANDABLE, free_linear_expandable,
- add_symbol_linear_expandable,
- iterator_first_linear, iterator_next_linear,
- iter_name_first_linear, iter_name_next_linear,
+ DICT_LINEAR_EXPANDABLE, /* type */
+ free_linear_expandable, /* free */
+ add_symbol_linear_expandable, /* add_symbol */
+ iterator_first_linear, /* iteractor_first */
+ iterator_next_linear, /* iterator_next */
+ iter_name_first_linear, /* iter_name_first */
+ iter_name_next_linear, /* iter_name_next */
+ size_linear, /* size */
};
/* Declarations of helper functions (i.e. ones that don't go into
- vtbls). */
+ vectors). */
static struct symbol *iterator_hashed_advance (struct dict_iterator *iter);
@@ -331,7 +358,7 @@ dict_create_hashed (struct obstack *obstack,
const struct pending *list_counter;
retval = obstack_alloc (obstack, sizeof (struct dictionary));
- DICT_VTBL (retval) = &dict_hashed_vtbl;
+ DICT_VECTOR (retval) = &dict_hashed_vector;
/* Calculate the number of symbols, and allocate space for them. */
for (list_counter = symbol_list;
@@ -371,7 +398,7 @@ dict_create_hashed_expandable (void)
struct dictionary *retval;
retval = xmalloc (sizeof (struct dictionary));
- DICT_VTBL (retval) = &dict_hashed_expandable_vtbl;
+ DICT_VECTOR (retval) = &dict_hashed_expandable_vector;
DICT_HASHED_NBUCKETS (retval) = DICT_EXPANDABLE_INITIAL_CAPACITY;
DICT_HASHED_BUCKETS (retval) = xcalloc (DICT_EXPANDABLE_INITIAL_CAPACITY,
sizeof (struct symbol *));
@@ -395,7 +422,7 @@ dict_create_linear (struct obstack *obstack,
const struct pending *list_counter;
retval = obstack_alloc (obstack, sizeof (struct dictionary));
- DICT_VTBL (retval) = &dict_linear_vtbl;
+ DICT_VECTOR (retval) = &dict_linear_vector;
/* Calculate the number of symbols, and allocate space for them. */
for (list_counter = symbol_list;
@@ -436,7 +463,7 @@ dict_create_linear_expandable (void)
struct dictionary *retval;
retval = xmalloc (sizeof (struct dictionary));
- DICT_VTBL (retval) = &dict_linear_expandable_vtbl;
+ DICT_VECTOR (retval) = &dict_linear_expandable_vector;
DICT_LINEAR_NSYMS (retval) = 0;
DICT_LINEAR_EXPANDABLE_CAPACITY (retval)
= DICT_EXPANDABLE_INITIAL_CAPACITY;
@@ -455,7 +482,7 @@ dict_create_linear_expandable (void)
void
dict_free (struct dictionary *dict)
{
- (DICT_VTBL (dict))->free (dict);
+ (DICT_VECTOR (dict))->free (dict);
}
/* Add SYM to DICT. DICT had better be expandable. */
@@ -463,7 +490,7 @@ dict_free (struct dictionary *dict)
void
dict_add_symbol (struct dictionary *dict, struct symbol *sym)
{
- (DICT_VTBL (dict))->add_symbol (dict, sym);
+ (DICT_VECTOR (dict))->add_symbol (dict, sym);
}
/* Initialize ITERATOR to point at the first symbol in DICT, and
@@ -473,7 +500,7 @@ struct symbol *
dict_iterator_first (const struct dictionary *dict,
struct dict_iterator *iterator)
{
- return (DICT_VTBL (dict))->iterator_first (dict, iterator);
+ return (DICT_VECTOR (dict))->iterator_first (dict, iterator);
}
/* Advance ITERATOR, and return the next symbol, or NULL if there are
@@ -482,7 +509,7 @@ dict_iterator_first (const struct dictionary *dict,
struct symbol *
dict_iterator_next (struct dict_iterator *iterator)
{
- return (DICT_VTBL (DICT_ITERATOR_DICT (iterator)))
+ return (DICT_VECTOR (DICT_ITERATOR_DICT (iterator)))
->iterator_next (iterator);
}
@@ -491,15 +518,21 @@ dict_iter_name_first (const struct dictionary *dict,
const char *name,
struct dict_iterator *iterator)
{
- return (DICT_VTBL (dict))->iter_name_first (dict, name, iterator);
+ return (DICT_VECTOR (dict))->iter_name_first (dict, name, iterator);
}
struct symbol *
dict_iter_name_next (const char *name, struct dict_iterator *iterator)
{
- return (DICT_VTBL (DICT_ITERATOR_DICT (iterator)))
+ return (DICT_VECTOR (DICT_ITERATOR_DICT (iterator)))
->iter_name_next (name, iterator);
}
+
+int
+dict_size (const struct dictionary *dict)
+{
+ return (DICT_VECTOR (dict))->size (dict);
+}
/* Now come functions (well, one function, currently) that are
implemented generically by means of the vtable. Typically, they're
@@ -643,11 +676,16 @@ insert_symbol_hashed (struct dictionary *dict,
hash_index = (msymbol_hash_iw (SYMBOL_NATURAL_NAME (sym))
% DICT_HASHED_NBUCKETS (dict));
- gdb_assert (sym != buckets[hash_index]);
sym->hash_next = buckets[hash_index];
buckets[hash_index] = sym;
}
+static int
+size_hashed (const struct dictionary *dict)
+{
+ return DICT_HASHED_NBUCKETS (dict);
+}
+
/* Functions only for DICT_HASHED_EXPANDABLE. */
static void
@@ -670,6 +708,12 @@ add_symbol_hashed_expandable (struct dictionary *dict,
DICT_HASHED_EXPANDABLE_NSYMS (dict) = nsyms;
}
+static int
+size_hashed_expandable (const struct dictionary *dict)
+{
+ return DICT_HASHED_EXPANDABLE_NSYMS (dict);
+}
+
static void
expand_hashtable (struct dictionary *dict)
{
@@ -757,6 +801,12 @@ iter_name_next_linear (const char *name, struct dict_iterator *iterator)
return retval;
}
+static int
+size_linear (const struct dictionary *dict)
+{
+ return DICT_LINEAR_NSYMS (dict);
+}
+
/* Functions only for DICT_LINEAR_EXPANDABLE. */
static void
diff --git a/gdb/dictionary.h b/gdb/dictionary.h
index eea273b4793..75edd7fb67a 100644
--- a/gdb/dictionary.h
+++ b/gdb/dictionary.h
@@ -136,6 +136,10 @@ extern struct symbol *dict_iter_name_first (const struct dictionary *dict,
extern struct symbol *dict_iter_name_next (const char *name,
struct dict_iterator *iterator);
+/* Return some notion of the size of the dictionary: the number of
+ symbols if we have that, the number of hash buckets otherwise. */
+
+extern int dict_size (const struct dictionary *dict);
/* Macro to loop through all symbols in a dictionary DICT, in no
particular order. ITER is a struct dict_iterator (NOTE: __not__ a
diff --git a/gdb/dink32-rom.c b/gdb/dink32-rom.c
index f62e7129c36..3b10c7caa2e 100644
--- a/gdb/dink32-rom.c
+++ b/gdb/dink32-rom.c
@@ -142,6 +142,8 @@ dink32_open (char *args, int from_tty)
monitor_open (args, &dink32_cmds, from_tty);
}
+extern initialize_file_ftype _initialize_dink32_rom; /* -Wmissing-prototypes */
+
void
_initialize_dink32_rom (void)
{
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 2cd0984205b..3d396013241 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,65 @@
+2003-06-24 Joel Brobecker <brobecker@gnat.com>
+
+ * gdb.texinfo (Unsupported languages): New section.
+ (Languages): Add link to new section.
+
+2003-06-22 Andrew Cagney <cagney@redhat.com>
+
+ * gdb.texinfo (Contributors): Mention 6.0 release engineer.
+
+2003-06-22 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbint.texinfo (Coding): Clarify use of gdb_XXX.h headers.
+
+2003-06-22 Daniel Jacobowitz <drow@mvista.com>
+
+ * Makefile.in (SFILES_INCLUDED): Add agentexpr.texi.
+ * agentexpr.texi: Retitle section, and change it to an appendix.
+ Comment out texinfo initialization. Factor a @var{} into two
+ pieces to prevent makeinfo warnings.
+ * gdb.texinfo: Add Agent Expressions appendix.
+
+2003-06-19 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbint.texinfo (Native Conditionals): Remove PREPARE_TO_PROCEED.
+
+2003-06-18 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.texinfo (Remote Debugging): New section "Connecting to a
+ remote target". Document the "detach" and "disconnect" commands.
+ (Server, Netware, Debug Session): Reference "Connecting to a
+ remote target".
+ (GDB/MI Target Manipulation): Document "-target-disconnect".
+
+2003-06-13 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Deprecate
+ REMOTE_BREAKPOINT, LITTLE_REMOTE_BREAKPOINT, and
+ BIG_REMOTE_BREAKPOINT. Cross reference BREAKPOINT_FROM_PC.
+
+2003-06-09 Jim Blandy <jimb@redhat.com>
+
+ * gdb.texinfo (Separate Debug Files): Remove extra semicolon.
+
+2003-06-08 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Delete
+ documentation on FRAME_ARGS_ADDRESS_CORRECT.
+
+2003-06-08 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Document
+ "unwind_sp". Cross reference "unwind_sp" and TARGET_READ_SP.
+
+2003-06-07 Adam Fedor <fedor@gnu.org>
+
+ * gdb.texinfo: Add Objective-C documentation.
+
+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/Makefile.in b/gdb/doc/Makefile.in
index fcdabc5bf1a..eda637cf19d 100644
--- a/gdb/doc/Makefile.in
+++ b/gdb/doc/Makefile.in
@@ -1,4 +1,4 @@
-##Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2002
+##Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2002, 2003
##Free Software Foundation, Inc.
# Makefile for GDB documentation.
@@ -100,6 +100,7 @@ DVIPS = dvips
GDB_DOC_SOURCE_INCLUDES = \
$(srcdir)/fdl.texi \
$(srcdir)/gpl.texi \
+ $(srcdir)/agentexpr.texi \
$(READLINE_DIR)/rluser.texinfo \
$(READLINE_DIR)/inc-hist.texinfo
GDB_DOC_BUILD_INCLUDES = \
diff --git a/gdb/doc/agentexpr.texi b/gdb/doc/agentexpr.texi
index f71004a5a5a..79985b7a0ec 100644
--- a/gdb/doc/agentexpr.texi
+++ b/gdb/doc/agentexpr.texi
@@ -1,14 +1,14 @@
-\input texinfo
+@c \input texinfo
@c %**start of header
-@setfilename agentexpr.info
-@settitle GDB Agent Expressions
-@setchapternewpage off
+@c @setfilename agentexpr.info
+@c @settitle GDB Agent Expressions
+@c @setchapternewpage off
@c %**end of header
-Revision: $Id: agentexpr.texi,v 1.2 1998/12/09 21:23:46 jimb Exp $
+@c Revision: $Id$
-@node The GDB Agent Expression Mechanism
-@chapter The GDB Agent Expression Mechanism
+@node Agent Expressions
+@appendix The GDB Agent Expression Mechanism
In some applications, it is not feasable for the debugger to interrupt
the program's execution long enough for the developer to learn anything
@@ -299,7 +299,7 @@ Pop two integers from the stack; let @var{a} be the next-to-top value,
and @var{b} be the top value. Shift @var{a} left by @var{b} bits, and
push the result.
-@item @code{rsh_signed} (0x0a): @var{a} @var{b} @result{} @var{@code{(signed)}a>>b}
+@item @code{rsh_signed} (0x0a): @var{a} @var{b} @result{} @code{(signed)}@var{a>>b}
Pop two integers from the stack; let @var{a} be the next-to-top value,
and @var{b} be the top value. Shift @var{a} right by @var{b} bits,
inserting copies of the top bit at the high end, and push the result.
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 9136e653773..05715e137df 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -156,6 +156,7 @@ Copyright (C) 1988-2003 Free Software Foundation, Inc.
* Installing GDB:: Installing GDB
* Maintenance Commands:: Maintenance Commands
* Remote Protocol:: GDB Remote Serial Protocol
+* Agent Expressions:: The GDB Agent Expression Mechanism
* Copying:: GNU General Public License says
how you can copy and share GDB
* GNU Free Documentation License:: The license for this documentation
@@ -210,6 +211,9 @@ syntax.
it may be necessary to refer to some variables with a trailing
underscore.
+@value{GDBN} can be used to debug programs written in Objective-C,
+using either the Apple/NeXT or the GNU Objective-C runtime.
+
@menu
* Free Software:: Freely redistributable software
* Contributors:: Contributors to GDB
@@ -343,7 +347,7 @@ omitted from this list, we would like to add your names!
So that they may not regard their many labors as thankless, we
particularly thank those who shepherded @value{GDBN} through major
releases:
-Andrew Cagney (releases 5.3, 5.2, 5.1 and 5.0);
+Andrew Cagney (releases 6.0, 5.3, 5.2, 5.1 and 5.0);
Jim Blandy (release 4.18);
Jason Molenda (release 4.17);
Stan Shebs (release 4.14);
@@ -3180,7 +3184,8 @@ end
@cindex overloading
@cindex symbol overloading
-Some programming languages (notably C@t{++}) permit a single function name
+Some programming languages (notably C@t{++} and Objective-C) permit a
+single function name
to be defined several times, for application in different contexts.
This is called @dfn{overloading}. When a function name is overloaded,
@samp{break @var{function}} is not enough to tell @value{GDBN} where you want
@@ -7432,6 +7437,7 @@ language}.
* Show:: Displaying the language
* Checks:: Type and range checks
* Support:: Supported languages
+* Unsupported languages:: Unsupported languages
@end menu
@node Setting
@@ -7487,6 +7493,9 @@ C source file
@itemx .c++
C@t{++} source file
+@item .m
+Objective-C source file
+
@item .f
@itemx .F
Fortran source file
@@ -7762,7 +7771,7 @@ being set automatically by @value{GDBN}.
@node Support
@section Supported languages
-@value{GDBN} supports C, C@t{++}, Fortran, Java, assembly, and Modula-2.
+@value{GDBN} supports C, C@t{++}, Objective-C, Fortran, Java, assembly, and Modula-2.
@c This is false ...
Some @value{GDBN} features may be used in expressions regardless of the
language you use: the @value{GDBN} @code{@@} and @code{::} operators,
@@ -7779,8 +7788,9 @@ books written on each of these languages; please look to these for a
language reference or tutorial.
@menu
-* C:: C and C@t{++}
-* Modula-2:: Modula-2
+* C:: C and C@t{++}
+* Objective-C:: Objective-C
+* Modula-2:: Modula-2
@end menu
@node C
@@ -8297,7 +8307,101 @@ available choices, or to finish the type list for you.
@xref{Completion,, Command completion}, for details on how to do this.
@end table
-@node Modula-2
+@node Objective-C
+@subsection Objective-C
+
+@cindex Objective-C
+This section provides information about some commands and command
+options that are useful for debugging Objective-C code.
+
+@menu
+* Method Names in Commands::
+* The Print Command with Objective-C::
+@end menu
+
+@node Method Names in Commands, The Print Command with Objective-C, Objective-C, Objective-C
+@subsubsection Method Names in Commands
+
+The following commands have been extended to accept Objective-C method
+names as line specifications:
+
+@kindex clear@r{, and Objective-C}
+@kindex break@r{, and Objective-C}
+@kindex info line@r{, and Objective-C}
+@kindex jump@r{, and Objective-C}
+@kindex list@r{, and Objective-C}
+@itemize
+@item @code{clear}
+@item @code{break}
+@item @code{info line}
+@item @code{jump}
+@item @code{list}
+@end itemize
+
+A fully qualified Objective-C method name is specified as
+
+@smallexample
+-[@var{Class} @var{methodName}]
+@end smallexample
+
+where the minus sign is used to indicate an instance method and a plus
+sign (not shown) is used to indicate a class method. The
+class name @var{Class} and method name @var{methoName} are enclosed in
+brackets, similar to the way messages are specified in Objective-C source
+code. For example, to set a breakpoint at the @code{create} instance method of
+class @code{Fruit} in the program currently being debugged, enter:
+
+@smallexample
+break -[Fruit create]
+@end smallexample
+
+To list ten program lines around the @code{initialize} class method,
+enter:
+
+@smallexample
+list +[NSText initialize]
+@end smallexample
+
+In the current version of GDB, the plus or minus sign is required. In
+future versions of GDB, the plus or minus sign will be optional, but you
+can use it to narrow the search. It is also possible to specify just a
+method name:
+
+@smallexample
+break create
+@end smallexample
+
+You must specify the complete method name, including any colons. If
+your program's source files contain more than one @code{create} method,
+you'll be presented with a numbered list of classes that implement that
+method. Indicate your choice by number, or type @samp{0} to exit if
+none apply.
+
+As another example, to clear a breakpoint established at the
+@code{makeKeyAndOrderFront:} method of the @code{NSWindow} class, enter:
+
+@smallexample
+clear -[NSWindow makeKeyAndOrderFront:]
+@end smallexample
+
+@node The Print Command with Objective-C
+@subsubsection The Print Command With Objective-C
+
+The print command has also been extended to accept methods. For example:
+
+@smallexample
+print -[object hash]
+@end smallexample
+
+@cindex print an Objective-C object description
+will tell gdb to send the -hash message to object and print the
+result. Also an additional command has been added, @code{print-object}
+or @code{po} for short, which is meant to print the description of an
+object. However, this command may only work with certain Objective-C
+libraries that have a particular hook function, called
+@code{_NSPrintForDebugger} defined.
+
+@node Modula-2, , Objective-C, Support
@subsection Modula-2
@cindex Modula-2, @value{GDBN} support
@@ -8740,6 +8844,22 @@ address can be specified by an integral constant, the construct
In @value{GDBN} scripts, the Modula-2 inequality operator @code{#} is
interpreted as the beginning of a comment. Use @code{<>} instead.
+@node Unsupported languages
+@section Unsupported languages
+
+@cindex unsupported languages
+@cindex minimal language
+In addition to the other fully-supported programming languages,
+@value{GDBN} also provides a pseudo-language, called @code{minimal}.
+It does not represent a real programming language, but provides a set
+of capabilities close to what the C or assembly languages provide.
+This should allow most simple operations to be performed while debugging
+an application that uses a language currently not supported by @value{GDBN}.
+
+If the language is set to @code{auto}, @value{GDBN} will automatically
+select this language if the current frame corresponds to an unsupported
+language.
+
@node Symbols
@chapter Examining the Symbol Table
@@ -8937,6 +9057,20 @@ Print the names and data types of all variables (except for local
variables) whose names contain a match for regular expression
@var{regexp}.
+@kindex info classes
+@item info classes
+@itemx info classes @var{regexp}
+Display all Objective-C classes in your program, or
+(with the @var{regexp} argument) all those matching a particular regular
+expression.
+
+@kindex info selectors
+@item info selectors
+@itemx info selectors @var{regexp}
+Display all Objective-C selectors in your program, or
+(with the @var{regexp} argument) all those matching a particular regular
+expression.
+
@ignore
This was never implemented.
@kindex info methods
@@ -10011,7 +10145,7 @@ gnu_debuglink_crc32 (unsigned long crc,
crc = ~crc & 0xffffffff;
for (end = buf + len; buf < end; ++buf)
crc = crc32_table[(crc ^ *buf) & 0xff] ^ (crc >> 8);
- return ~crc & 0xffffffff;;
+ return ~crc & 0xffffffff;
@}
@end smallexample
@@ -10397,12 +10531,112 @@ is supported other than to try it.
@chapter Debugging remote programs
@menu
+* Connecting:: Connecting to a remote target
* Server:: Using the gdbserver program
* NetWare:: Using the gdbserve.nlm program
* Remote configuration:: Remote configuration
* remote stub:: Implementing a remote stub
@end menu
+@node Connecting
+@section Connecting to a remote target
+
+On the @value{GDBN} host machine, you will need an unstripped copy of
+your program, since @value{GDBN} needs symobl and debugging information.
+Start up @value{GDBN} as usual, using the name of the local copy of your
+program as the first argument.
+
+@cindex serial line, @code{target remote}
+If you're using a serial line, you may want to give @value{GDBN} the
+@w{@samp{--baud}} option, or use the @code{set remotebaud} command
+before the @code{target} command.
+
+After that, use @code{target remote} to establish communications with
+the target machine. Its argument specifies how to communicate---either
+via a devicename attached to a direct serial line, or a TCP or UDP port
+(possibly to a terminal server which in turn has a serial line to the
+target). For example, to use a serial line connected to the device
+named @file{/dev/ttyb}:
+
+@smallexample
+target remote /dev/ttyb
+@end smallexample
+
+@cindex TCP port, @code{target remote}
+To use a TCP connection, use an argument of the form
+@code{@var{host}:@var{port}} or @code{tcp:@var{host}:@var{port}}.
+For example, to connect to port 2828 on a
+terminal server named @code{manyfarms}:
+
+@smallexample
+target remote manyfarms:2828
+@end smallexample
+
+If your remote target is actually running on the same machine as
+your debugger session (e.g.@: a simulator of your target running on
+the same host), you can omit the hostname. For example, to connect
+to port 1234 on your local machine:
+
+@smallexample
+target remote :1234
+@end smallexample
+@noindent
+
+Note that the colon is still required here.
+
+@cindex UDP port, @code{target remote}
+To use a UDP connection, use an argument of the form
+@code{udp:@var{host}:@var{port}}. For example, to connect to UDP port 2828
+on a terminal server named @code{manyfarms}:
+
+@smallexample
+target remote udp:manyfarms:2828
+@end smallexample
+
+When using a UDP connection for remote debugging, you should keep in mind
+that the `U' stands for ``Unreliable''. UDP can silently drop packets on
+busy or unreliable networks, which will cause havoc with your debugging
+session.
+
+Now you can use all the usual commands to examine and change data and to
+step and continue the remote program.
+
+@cindex interrupting remote programs
+@cindex remote programs, interrupting
+Whenever @value{GDBN} is waiting for the remote program, if you type the
+interrupt character (often @key{C-C}), @value{GDBN} attempts to stop the
+program. This may or may not succeed, depending in part on the hardware
+and the serial drivers the remote system uses. If you type the
+interrupt character once again, @value{GDBN} displays this prompt:
+
+@smallexample
+Interrupted while waiting for the program.
+Give up (and stop debugging it)? (y or n)
+@end smallexample
+
+If you type @kbd{y}, @value{GDBN} abandons the remote debugging session.
+(If you decide you want to try again later, you can use @samp{target
+remote} again to connect once more.) If you type @kbd{n}, @value{GDBN}
+goes back to waiting.
+
+@table @code
+@kindex detach (remote)
+@item detach
+When you have finished debugging the remote program, you can use the
+@code{detach} command to release it from @value{GDBN} control.
+Detaching from the target normally resumes its execution, but the results
+will depend on your particular remote stub. After the @code{detach}
+command, @value{GDBN} is free to connect to another target.
+
+@kindex disconnect
+@item disconnect
+The @code{disconnect} command behaves like @code{detach}, except that
+the target is generally not resumed. It will wait for @value{GDBN}
+(this instance or another one) to connect and continue debugging. After
+the @code{disconnect} command, @value{GDBN} is again free to connect to
+another target.
+@end table
+
@node Server
@section Using the @code{gdbserver} program
@@ -10485,34 +10719,15 @@ target> gdbserver @var{comm} --attach @var{pid}
@var{pid} is the process ID of a currently running process. It isn't necessary
to point @code{gdbserver} at a binary for the running process.
-@item On the @value{GDBN} host machine,
-you need an unstripped copy of your program, since @value{GDBN} needs
-symbols and debugging information. Start up @value{GDBN} as usual,
-using the name of the local copy of your program as the first argument.
-(You may also need the @w{@samp{--baud}} option if the serial line is
-running at anything other than 9600@dmn{bps}.) After that, use @code{target
-remote} to establish communications with @code{gdbserver}. Its argument
-is either a device name (usually a serial device, like
-@file{/dev/ttyb}), or a TCP port descriptor in the form
-@code{@var{host}:@var{PORT}}. For example:
-
-@smallexample
-(@value{GDBP}) target remote /dev/ttyb
-@end smallexample
-
-@noindent
-communicates with the server via serial line @file{/dev/ttyb}, and
-
-@smallexample
-(@value{GDBP}) target remote the-target:2345
-@end smallexample
-
-@noindent
-communicates via a TCP connection to port 2345 on host @w{@file{the-target}}.
+@item On the host machine,
+connect to your target (@pxref{Connecting,,Connecting to a remote target}).
For TCP connections, you must start up @code{gdbserver} prior to using
the @code{target remote} command. Otherwise you may get an error whose
text depends on the host system, but which usually looks something like
-@samp{Connection refused}.
+@samp{Connection refused}. You don't need to use the @code{load}
+command in @value{GDBN} when using gdbserver, since the program is
+already on the target.
+
@end table
@node NetWare
@@ -10554,22 +10769,10 @@ using a 19200@dmn{bps} connection:
load gdbserve BOARD=1 PORT=2 BAUD=19200 emacs foo.txt
@end smallexample
-@item On the @value{GDBN} host machine,
-you need an unstripped copy of your program, since @value{GDBN} needs
-symbols and debugging information. Start up @value{GDBN} as usual,
-using the name of the local copy of your program as the first argument.
-(You may also need the @w{@samp{--baud}} option if the serial line is
-running at anything other than 9600@dmn{bps}. After that, use @code{target
-remote} to establish communications with @code{gdbserve.nlm}. Its
-argument is a device name (usually a serial device, like
-@file{/dev/ttyb}). For example:
-
-@smallexample
-(@value{GDBP}) target remote /dev/ttyb
-@end smallexample
+@item
+On the @value{GDBN} host machine, connect to your target (@pxref{Connecting,,
+Connecting to a remote target}).
-@noindent
-communications with the server via serial line @file{/dev/ttyb}.
@end table
@node Remote configuration
@@ -10891,87 +11094,11 @@ Download your program to your target machine (or get it there by
whatever means the manufacturer provides), and start it.
@item
-To start remote debugging, run @value{GDBN} on the host machine, and specify
-as an executable file the program that is running in the remote machine.
-This tells @value{GDBN} how to find your program's symbols and the contents
-of its pure text.
-
-@item
-@cindex serial line, @code{target remote}
-Establish communication using the @code{target remote} command.
-Its argument specifies how to communicate with the target
-machine---either via a devicename attached to a direct serial line, or a
-TCP or UDP port (usually to a terminal server which in turn has a serial line
-to the target). For example, to use a serial line connected to the
-device named @file{/dev/ttyb}:
-
-@smallexample
-target remote /dev/ttyb
-@end smallexample
-
-@cindex TCP port, @code{target remote}
-To use a TCP connection, use an argument of the form
-@code{@var{host}:@var{port}} or @code{tcp:@var{host}:@var{port}}.
-For example, to connect to port 2828 on a
-terminal server named @code{manyfarms}:
-
-@smallexample
-target remote manyfarms:2828
-@end smallexample
-
-If your remote target is actually running on the same machine as
-your debugger session (e.g.@: a simulator of your target running on
-the same host), you can omit the hostname. For example, to connect
-to port 1234 on your local machine:
-
-@smallexample
-target remote :1234
-@end smallexample
-@noindent
-
-Note that the colon is still required here.
-
-@cindex UDP port, @code{target remote}
-To use a UDP connection, use an argument of the form
-@code{udp:@var{host}:@var{port}}. For example, to connect to UDP port 2828
-on a terminal server named @code{manyfarms}:
-
-@smallexample
-target remote udp:manyfarms:2828
-@end smallexample
-
-When using a UDP connection for remote debugging, you should keep in mind
-that the `U' stands for ``Unreliable''. UDP can silently drop packets on
-busy or unreliable networks, which will cause havoc with your debugging
-session.
+Start @value{GDBN} on the host, and connect to the target
+(@pxref{Connecting,,Connecting to a remote target}).
@end enumerate
-Now you can use all the usual commands to examine and change data and to
-step and continue the remote program.
-
-To resume the remote program and stop debugging it, use the @code{detach}
-command.
-
-@cindex interrupting remote programs
-@cindex remote programs, interrupting
-Whenever @value{GDBN} is waiting for the remote program, if you type the
-interrupt character (often @key{C-C}), @value{GDBN} attempts to stop the
-program. This may or may not succeed, depending in part on the hardware
-and the serial drivers the remote system uses. If you type the
-interrupt character once again, @value{GDBN} displays this prompt:
-
-@smallexample
-Interrupted while waiting for the program.
-Give up (and stop debugging it)? (y or n)
-@end smallexample
-
-If you type @kbd{y}, @value{GDBN} abandons the remote debugging session.
-(If you decide you want to try again later, you can use @samp{target
-remote} again to connect once more.) If you type @kbd{n}, @value{GDBN}
-goes back to waiting.
-
-
@node Configurations
@chapter Configuration-Specific Information
@@ -17276,6 +17403,31 @@ The corresponding @value{GDBN} command is @samp{detach}.
@end smallexample
+@subheading The @code{-target-disconnect} Command
+@findex -target-disconnect
+
+@subsubheading Synopsis
+
+@example
+ -target-disconnect
+@end example
+
+Disconnect from the remote target. There's no output.
+
+@subsubheading @value{GDBN} command
+
+The corresponding @value{GDBN} command is @samp{disconnect}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-target-disconnect
+^done
+(@value{GDBP})
+@end smallexample
+
+
@subheading The @code{-target-download} Command
@findex -target-download
@@ -19659,7 +19811,7 @@ Toggle debug flag.
@cindex @code{D} packet
Detach @value{GDBN} from the remote system. Sent to the remote target
-before @value{GDBN} disconnects.
+before @value{GDBN} disconnects via the @code{detach} command.
Reply:
@table @samp
@@ -21586,6 +21738,8 @@ host is called:
<- @code{T02}
@end smallexample
+@include agentexpr.texi
+
@include gpl.texi
@include fdl.texi
diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo
index 06a26f67091..dfbee368525 100644
--- a/gdb/doc/gdbint.texinfo
+++ b/gdb/doc/gdbint.texinfo
@@ -41,7 +41,7 @@ Software Foundation raise funds for GNU development.''
@page
@tex
\def\$#1${{#1}} % Kluge: collect RCS revision info without $...$
-\xdef\manvers{\$Revision: 1.102.2.9 $} % For use in headers, footers too
+\xdef\manvers{\$Revision: 1.102.2.10 $} % For use in headers, footers too
{\parskip=0pt
\hfill Cygnus Solutions\par
\hfill \manvers\par
@@ -3012,24 +3012,26 @@ Similar to BREAKPOINT, but used for bi-endian targets.
@code{BIG_BREAKPOINT} and @code{LITTLE_BREAKPOINT} have been deprecated in
favor of @code{BREAKPOINT_FROM_PC}.
-@item REMOTE_BREAKPOINT
-@itemx LITTLE_REMOTE_BREAKPOINT
-@itemx BIG_REMOTE_BREAKPOINT
-@findex BIG_REMOTE_BREAKPOINT
-@findex LITTLE_REMOTE_BREAKPOINT
-@findex REMOTE_BREAKPOINT
-Similar to BREAKPOINT, but used for remote targets.
-
-@code{BIG_REMOTE_BREAKPOINT} and @code{LITTLE_REMOTE_BREAKPOINT} have been
-deprecated in favor of @code{BREAKPOINT_FROM_PC}.
+@item DEPRECATED_REMOTE_BREAKPOINT
+@itemx DEPRECATED_LITTLE_REMOTE_BREAKPOINT
+@itemx DEPRECATED_BIG_REMOTE_BREAKPOINT
+@findex DEPRECATED_BIG_REMOTE_BREAKPOINT
+@findex DEPRECATED_LITTLE_REMOTE_BREAKPOINT
+@findex DEPRECATED_REMOTE_BREAKPOINT
+Specify the breakpoint instruction sequence for a remote target.
+@code{DEPRECATED_REMOTE_BREAKPOINT},
+@code{DEPRECATED_BIG_REMOTE_BREAKPOINT} and
+@code{DEPRECATED_LITTLE_REMOTE_BREAKPOINT} have been deprecated in
+favor of @code{BREAKPOINT_FROM_PC} (@pxref{BREAKPOINT_FROM_PC}).
@item BREAKPOINT_FROM_PC (@var{pcptr}, @var{lenptr})
@findex BREAKPOINT_FROM_PC
-Use the program counter to determine the contents and size of a
-breakpoint instruction. It returns a pointer to a string of bytes
-that encode a breakpoint instruction, stores the length of the string
-to *@var{lenptr}, and adjusts pc (if necessary) to point to the actual
-memory location where the breakpoint should be inserted.
+@anchor{BREAKPOINT_FROM_PC} Use the program counter to determine the
+contents and size of a breakpoint instruction. It returns a pointer to
+a string of bytes that encode a breakpoint instruction, stores the
+length of the string to @code{*@var{lenptr}}, and adjusts the program
+counter (if necessary) to point to the actual memory location where the
+breakpoint should be inserted.
Although it is common to use a trap instruction for a breakpoint, it's
not required; for instance, the bit pattern could be an invalid
@@ -3233,10 +3235,6 @@ the direction of stack growth.
By default, no frame based stack alignment is performed.
-@item FRAME_ARGS_ADDRESS_CORRECT
-@findex FRAME_ARGS_ADDRESS_CORRECT
-See @file{stack.c}.
-
@item DEPRECATED_FRAME_CHAIN(@var{frame})
@findex DEPRECATED_FRAME_CHAIN
Given @var{frame}, return a pointer to the calling frame.
@@ -3291,6 +3289,23 @@ return d10v_make_iaddr (pc);
@noindent
@xref{DEPRECATED_FRAME_SAVED_PC}, which this method replaces.
+@item CORE_ADDR unwind_sp (struct frame_info *@var{this_frame})
+@findex unwind_sp
+@anchor{unwind_sp} Return the frame's inner most stack address. This is
+commonly refered to as the frame's @dfn{stack pointer}.
+
+The implementation, which must be frame agnostic (work with any frame),
+is typically no more than:
+
+@smallexample
+ULONGEST sp;
+frame_unwind_unsigned_register (this_frame, D10V_SP_REGNUM, &sp);
+return d10v_make_daddr (sp);
+@end smallexample
+
+@noindent
+@xref{TARGET_READ_SP}, which this method replaces.
+
@item FUNCTION_EPILOGUE_SIZE
@findex FUNCTION_EPILOGUE_SIZE
For some COFF targets, the @code{x_sym.x_misc.x_fsize} field of the
@@ -3678,14 +3693,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.
@@ -3891,15 +3905,17 @@ Number of bits in a short integer; defaults to @code{2 * TARGET_CHAR_BIT}.
@findex write_pc
@findex read_sp
@findex read_fp
-These change the behavior of @code{read_pc}, @code{write_pc},
-@code{read_sp} and @code{deprecated_read_fp}. For most targets, these
-may be left undefined. @value{GDBN} will call the read and write
-register functions with the relevant @code{_REGNUM} argument.
+@anchor{TARGET_READ_SP} These change the behavior of @code{read_pc},
+@code{write_pc}, @code{read_sp} and @code{deprecated_read_fp}. For most
+targets, these may be left undefined. @value{GDBN} will call the read
+and write register functions with the relevant @code{_REGNUM} argument.
These macros are useful when a target keeps one of these registers in a
hard to get at place; for example, part in a segment register and part
in an ordinary register.
+@xref{unwind_sp}, which replaces @code{TARGET_READ_SP}.
+
@item TARGET_VIRTUAL_FRAME_POINTER(@var{pc}, @var{regp}, @var{offsetp})
@findex TARGET_VIRTUAL_FRAME_POINTER
Returns a @code{(register, offset)} pair representing the virtual frame
@@ -4478,23 +4494,6 @@ root directory.
Define this to be able to, when a breakpoint insertion fails, warn the
user that another process may be running with the same executable.
-@item PREPARE_TO_PROCEED (@var{select_it})
-@findex PREPARE_TO_PROCEED
-This (ugly) macro allows a native configuration to customize the way the
-@code{proceed} function in @file{infrun.c} deals with switching between
-threads.
-
-In a multi-threaded task we may select another thread and then continue
-or step. But if the old thread was stopped at a breakpoint, it will
-immediately cause another breakpoint stop without any execution (i.e. it
-will report a breakpoint hit incorrectly). So @value{GDBN} must step over it
-first.
-
-If defined, @code{PREPARE_TO_PROCEED} should check the current thread
-against the thread that reported the most recent event. If a step-over
-is required, it returns TRUE. If @var{select_it} is non-zero, it should
-reselect the old thread.
-
@item PROC_NAME_FMT
@findex PROC_NAME_FMT
Defines the format for the name of a @file{/proc} device. Should be
@@ -5192,7 +5191,11 @@ of @value{GDBN}) must be added to @file{gdb/config/djgpp/fnchange.lst}.
When @value{GDBN} has a local version of a system header file (ex
@file{string.h}) the file name based on the POSIX header prefixed with
-@file{gdb_} (@file{gdb_string.h}).
+@file{gdb_} (@file{gdb_string.h}). These headers should be relatively
+independent: they should use only macros defined by @file{configure},
+the compiler, or the host; they should include only system headers; they
+should refer only to system types. They may be shared between multiple
+programs, e.g.@: @value{GDBN} and @sc{gdbserver}.
For other files @samp{-} is used as the separator.
diff --git a/gdb/doublest.c b/gdb/doublest.c
index 101240b5b6d..09bb15502ba 100644
--- a/gdb/doublest.c
+++ b/gdb/doublest.c
@@ -404,7 +404,15 @@ convert_doublest_to_floatformat (CONST struct floatformat *fmt,
{
mant_long <<= 1;
mant_long &= 0xffffffffL;
- mant_bits -= 1;
+ /* If we are processing the top 32 mantissa bits of a doublest
+ so as to convert to a float value with implied integer bit,
+ we will only be putting 31 of those 32 bits into the
+ final value due to the discarding of the top bit. In the
+ case of a small float value where the number of mantissa
+ bits is less than 32, discarding the top bit does not alter
+ the number of bits we will be adding to the result. */
+ if (mant_bits == 32)
+ mant_bits -= 1;
}
if (mant_bits < 32)
@@ -625,7 +633,7 @@ floatformat_from_doublest (const struct floatformat *fmt,
target-dependent code, the format of floating-point types is known,
but not passed on by GDB. This should be fixed. */
-const struct floatformat *
+static const struct floatformat *
floatformat_from_length (int len)
{
if (len * TARGET_CHAR_BIT == TARGET_FLOAT_BIT)
diff --git a/gdb/dummy-frame.c b/gdb/dummy-frame.c
index 94413f4baef..9870433c3e1 100644
--- a/gdb/dummy-frame.c
+++ b/gdb/dummy-frame.c
@@ -99,7 +99,7 @@ find_dummy_frame (CORE_ADDR pc, CORE_ADDR fp)
FP against the saved SP and FP. NOTE: If you're trying
to fix a problem with GDB not correctly finding a dummy
frame, check the comments that go with FRAME_ALIGN() and
- SAVE_DUMMY_FRAME_TOS(). */
+ UNWIND_DUMMY_ID(). */
if (fp != dummyframe->fp && fp != dummyframe->sp)
continue;
}
@@ -360,10 +360,6 @@ dummy_frame_this_id (struct frame_info *next_frame,
just asking for trouble. */
if (gdbarch_unwind_dummy_id_p (current_gdbarch))
{
- /* Assume call_function_by_hand(), via SAVE_DUMMY_FRAME_TOS,
- previously saved the dummy frame's ID. Things only work if
- the two return the same value. */
- gdb_assert (SAVE_DUMMY_FRAME_TOS_P ());
/* Use an architecture specific method to extract the prev's
dummy ID from the next frame. Note that this method uses
frame_register_unwind to obtain the register values needed to
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c
new file mode 100644
index 00000000000..999cef7e6cd
--- /dev/null
+++ b/gdb/dwarf2-frame.c
@@ -0,0 +1,1336 @@
+/* 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;
+};
+
+static 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)
+ /* NOTE: cagney/2003-06-07: Is this right? What if the
+ RETADDR_COLUM corresponds to a real register (and, worse,
+ that isn't the PC_REGNUM)? I'm guessing that the PC_REGNUM
+ further down is trying to handle this. That can't be right
+ though - PC_REGNUM may not be valid (it can be -ve). I
+ think, instead when RETADDR_COLUM isn't a real register, it
+ should map itself onto frame_pc_unwind. */
+ 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)
+ {
+ /* See comment above about a possibly -ve PC_REGNUM. If this
+ assertion fails, it's a problem with this code and not the
+ architecture. */
+ gdb_assert (PC_REGNUM >= 0);
+ cache->reg[PC_REGNUM] = fs->regs.reg[fs->retaddr_column];
+ }
+ else
+ {
+ reg = DWARF2_REG_TO_REGNUM (fs->retaddr_column);
+ if (reg != PC_REGNUM)
+ {
+ /* See comment above about PC_REGNUM being -ve. If this
+ assertion fails, it's a problem with this code and not
+ the architecture. */
+ gdb_assert (PC_REGNUM >= 0);
+ 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? */
+ /* DWARF V3 Draft 7 p102: Typically, the CFA is defined to
+ be the value of the stack pointer at the call site in the
+ previous frame (which may be different from its value on
+ entry to the current frame). */
+ /* DWARF V3 Draft 7 p103: The first column of the rules
+ defines the rule which computes the CFA value; it may be
+ either a register and a signed offset that are added
+ together or a DWARF expression that is evaluated. */
+ /* FIXME: cagney/2003-07-07: I don't understand this. The
+ CFI info should have provided unwind information for the
+ SP register and then pointed ->cfa_reg at it, not the
+ reverse. Assuming that SP_REGNUM is !-ve, there is a
+ very real posibility that CFA is an offset from some
+ other register, having nothing to do with the unwound SP
+ value. */
+ *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-bigmips64.h b/gdb/dwarf2-frame.h
index 9f171eef11c..4b4c1a5ab2f 100644
--- a/gdb/config/mips/tm-bigmips64.h
+++ b/gdb/dwarf2-frame.h
@@ -1,6 +1,8 @@
-/* Target machine parameters for MIPS r4000
- Copyright 1994, 2000 Free Software Foundation, Inc.
- Contributed by Ian Lance Taylor (ian@cygnus.com)
+/* 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.
@@ -19,4 +21,23 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "mips/tm-mips64.h"
+#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/dwarf2cfi.c b/gdb/dwarf2cfi.c
deleted file mode 100644
index 085c91cd311..00000000000
--- a/gdb/dwarf2cfi.c
+++ /dev/null
@@ -1,1970 +0,0 @@
-/* Stack unwinding code based on dwarf2 frame info for GDB, the GNU debugger.
-
- Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
-
- Contributed by Jiri Smid, SuSE Labs.
- Based on code written by Daniel Berlin (dan@dberlin.org).
-
- 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 "gdbcore.h"
-#include "symtab.h"
-#include "symfile.h"
-#include "objfiles.h"
-#include "target.h"
-#include "elf/dwarf2.h"
-#include "inferior.h"
-#include "regcache.h"
-#include "dwarf2cfi.h"
-#include "gdb_assert.h"
-
-/* Common Information Entry - holds information that is shared among many
- Frame Descriptors. */
-struct cie_unit
-{
- /* Offset of this unit in .debug_frame or .eh_frame. */
- ULONGEST offset;
-
- /* A null-terminated string that identifies the augmentation to this CIE or
- to the FDEs that use it. */
- char *augmentation;
-
- /* A constant that is factored out of all advance location instructions. */
- unsigned int code_align;
-
- /* A constant that is factored out of all offset instructions. */
- int data_align;
-
- /* A constant that indicates which regiter represents the return address
- of a function. */
- unsigned char ra;
-
- /* Indicates how addresses are encoded. */
- unsigned char addr_encoding;
-
- /* Pointer and length of the cie program. */
- char *data;
- unsigned int data_length;
-
- struct objfile *objfile;
-
- /* Next in chain. */
- struct cie_unit *next;
-};
-
-/* Frame Description Entry. */
-struct fde_unit
-{
- /* Address of the first location associated with this entry. */
- CORE_ADDR initial_location;
-
- /* Length of program section described by this entry. */
- CORE_ADDR address_range;
-
- /* Pointer to asociated CIE. */
- struct cie_unit *cie_ptr;
-
- /* Pointer and length of the cie program. */
- char *data;
- unsigned int data_length;
-};
-
-struct fde_array
-{
- struct fde_unit **array;
- int elems;
- int array_size;
-};
-
-struct frame_state_reg
-{
- union
- {
- unsigned int reg;
- long offset;
- unsigned char *exp;
- }
- loc;
- enum
- {
- REG_UNSAVED,
- REG_SAVED_OFFSET,
- REG_SAVED_REG,
- REG_SAVED_EXP,
- }
- how;
-};
-
-struct frame_state
-{
- /* Each register save state can be described in terms of a CFA slot,
- another register, or a location expression. */
- struct frame_state_regs
- {
- struct frame_state_reg *reg;
-
- /* Used to implement DW_CFA_remember_state. */
- struct frame_state_regs *prev;
- }
- regs;
-
- /* The CFA can be described in terms of a reg+offset or a
- location expression. */
- long cfa_offset;
- int 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;
-
- /* The information we care about from the CIE/FDE. */
- int data_align;
- unsigned int code_align;
- unsigned char retaddr_column;
- unsigned char addr_encoding;
-
- struct objfile *objfile;
-};
-
-enum ptr_encoding
-{
- PE_absptr = DW_EH_PE_absptr,
- PE_pcrel = DW_EH_PE_pcrel,
- PE_textrel = DW_EH_PE_textrel,
- PE_datarel = DW_EH_PE_datarel,
- PE_funcrel = DW_EH_PE_funcrel
-};
-
-#define UNWIND_CONTEXT(fi) ((struct context *) (deprecated_get_frame_context (fi)))
-
-
-static struct cie_unit *cie_chunks;
-static struct fde_array fde_chunks;
-/* Obstack for allocating temporary storage used during unwind operations. */
-static struct obstack unwind_tmp_obstack;
-
-extern file_ptr dwarf_frame_offset;
-extern unsigned int dwarf_frame_size;
-extern file_ptr dwarf_eh_frame_offset;
-extern unsigned int dwarf_eh_frame_size;
-extern asection *dwarf_frame_section;
-extern asection *dwarf_eh_frame_section;
-
-
-
-extern char *dwarf2_read_section (struct objfile *objfile, file_ptr offset,
- unsigned int size, asection *sectp);
-
-static struct fde_unit *fde_unit_alloc (void);
-static struct cie_unit *cie_unit_alloc (void);
-static void fde_chunks_need_space ();
-
-static void unwind_tmp_obstack_init ();
-static void unwind_tmp_obstack_free ();
-
-static unsigned int read_1u (bfd *abfd, char **p);
-static int read_1s (bfd *abfd, char **p);
-static unsigned int read_2u (bfd *abfd, char **p);
-static int read_2s (bfd *abfd, char **p);
-static unsigned int read_4u (bfd *abfd, char **p);
-static int read_4s (bfd *abfd, char **p);
-static ULONGEST read_8u (bfd *abfd, char **p);
-static LONGEST read_8s (bfd *abfd, char **p);
-
-static ULONGEST read_uleb128 (bfd *abfd, char **p);
-static LONGEST read_sleb128 (bfd *abfd, char **p);
-static CORE_ADDR read_pointer (bfd *abfd, char **p);
-static CORE_ADDR read_encoded_pointer (bfd *abfd, char **p,
- unsigned char encoding);
-static enum ptr_encoding pointer_encoding (unsigned char encoding,
- struct objfile *objfile);
-
-static LONGEST read_initial_length (bfd *abfd, char *buf, int *bytes_read);
-static ULONGEST read_length (bfd *abfd, char *buf, int *bytes_read,
- int dwarf64);
-
-static int is_cie (ULONGEST cie_id, int dwarf64);
-static int compare_fde_unit (const void *a, const void *b);
-void dwarf2_build_frame_info (struct objfile *objfile);
-
-static void execute_cfa_program (struct objfile *objfile, char *insn_ptr,
- char *insn_end, struct context *context,
- struct frame_state *fs);
-static struct fde_unit *get_fde_for_addr (CORE_ADDR pc);
-static void frame_state_for (struct context *context, struct frame_state *fs);
-static void get_reg (char *reg, struct context *context, int regnum);
-static CORE_ADDR execute_stack_op (struct objfile *objfile,
- char *op_ptr, char *op_end,
- struct context *context,
- CORE_ADDR initial);
-static void update_context (struct context *context, struct frame_state *fs,
- int chain);
-
-
-/* Memory allocation functions. */
-static struct fde_unit *
-fde_unit_alloc (void)
-{
- struct fde_unit *fde;
-
- fde = (struct fde_unit *) xmalloc (sizeof (struct fde_unit));
- memset (fde, 0, sizeof (struct fde_unit));
- return fde;
-}
-
-static struct cie_unit *
-cie_unit_alloc (void)
-{
- struct cie_unit *cie;
-
- cie = (struct cie_unit *) xmalloc (sizeof (struct cie_unit));
- memset (cie, 0, sizeof (struct cie_unit));
- return cie;
-}
-
-static void
-fde_chunks_need_space (void)
-{
- if (fde_chunks.elems < fde_chunks.array_size)
- return;
- fde_chunks.array_size =
- fde_chunks.array_size ? 2 * fde_chunks.array_size : 1024;
- fde_chunks.array =
- xrealloc (fde_chunks.array,
- sizeof (struct fde_unit) * fde_chunks.array_size);
-}
-
-/* Alocate a new `struct context' on temporary obstack. */
-struct context *
-context_alloc (void)
-{
- struct context *context;
-
- int regs_size = sizeof (struct context_reg) * NUM_REGS;
-
- context = (struct context *) obstack_alloc (&unwind_tmp_obstack,
- sizeof (struct context));
- memset (context, 0, sizeof (struct context));
- context->reg = (struct context_reg *) obstack_alloc (&unwind_tmp_obstack,
- regs_size);
- memset (context->reg, 0, regs_size);
- return context;
-}
-
-/* Alocate a new `struct frame_state' on temporary obstack. */
-struct frame_state *
-frame_state_alloc (void)
-{
- struct frame_state *fs;
-
- int regs_size = sizeof (struct frame_state_reg) * NUM_REGS;
-
- fs = (struct frame_state *) obstack_alloc (&unwind_tmp_obstack,
- sizeof (struct frame_state));
- memset (fs, 0, sizeof (struct frame_state));
- fs->regs.reg =
- (struct frame_state_reg *) obstack_alloc (&unwind_tmp_obstack, regs_size);
- memset (fs->regs.reg, 0, regs_size);
- return fs;
-}
-
-static void
-unwind_tmp_obstack_init (void)
-{
- obstack_init (&unwind_tmp_obstack);
-}
-
-static void
-unwind_tmp_obstack_free (void)
-{
- obstack_free (&unwind_tmp_obstack, NULL);
- unwind_tmp_obstack_init ();
-}
-
-void
-context_cpy (struct context *dst, struct context *src)
-{
- int regs_size = sizeof (struct context_reg) * NUM_REGS;
- struct context_reg *dreg;
-
- /* Since `struct context' contains a pointer to an array with
- register values, make sure we end up with a copy of that array,
- and not with a copy of the pointer to that array. */
- dreg = dst->reg;
- *dst = *src;
- dst->reg = dreg;
- memcpy (dst->reg, src->reg, regs_size);
-}
-
-static unsigned int
-read_1u (bfd *abfd, char **p)
-{
- unsigned ret;
-
- ret = bfd_get_8 (abfd, (bfd_byte *) * p);
- (*p)++;
- return ret;
-}
-
-static int
-read_1s (bfd *abfd, char **p)
-{
- int ret;
-
- ret = bfd_get_signed_8 (abfd, (bfd_byte *) * p);
- (*p)++;
- return ret;
-}
-
-static unsigned int
-read_2u (bfd *abfd, char **p)
-{
- unsigned ret;
-
- ret = bfd_get_16 (abfd, (bfd_byte *) * p);
- (*p) += 2;
- return ret;
-}
-
-static int
-read_2s (bfd *abfd, char **p)
-{
- int ret;
-
- ret = bfd_get_signed_16 (abfd, (bfd_byte *) * p);
- (*p) += 2;
- return ret;
-}
-
-static unsigned int
-read_4u (bfd *abfd, char **p)
-{
- unsigned int ret;
-
- ret = bfd_get_32 (abfd, (bfd_byte *) * p);
- (*p) += 4;
- return ret;
-}
-
-static int
-read_4s (bfd *abfd, char **p)
-{
- int ret;
-
- ret = bfd_get_signed_32 (abfd, (bfd_byte *) * p);
- (*p) += 4;
- return ret;
-}
-
-static ULONGEST
-read_8u (bfd *abfd, char **p)
-{
- ULONGEST ret;
-
- ret = bfd_get_64 (abfd, (bfd_byte *) * p);
- (*p) += 8;
- return ret;
-}
-
-static LONGEST
-read_8s (bfd *abfd, char **p)
-{
- LONGEST ret;
-
- ret = bfd_get_signed_64 (abfd, (bfd_byte *) * p);
- (*p) += 8;
- return ret;
-}
-
-static ULONGEST
-read_uleb128 (bfd *abfd, char **p)
-{
- ULONGEST ret;
- int i, shift;
- unsigned char byte;
-
- ret = 0;
- shift = 0;
- i = 0;
- while (1)
- {
- byte = bfd_get_8 (abfd, (bfd_byte *) * p);
- (*p)++;
- ret |= ((unsigned long) (byte & 127) << shift);
- if ((byte & 128) == 0)
- {
- break;
- }
- shift += 7;
- }
- return ret;
-}
-
-static LONGEST
-read_sleb128 (bfd *abfd, char **p)
-{
- LONGEST ret;
- int i, shift, size, num_read;
- unsigned char byte;
-
- ret = 0;
- shift = 0;
- size = 32;
- num_read = 0;
- i = 0;
- while (1)
- {
- byte = bfd_get_8 (abfd, (bfd_byte *) * p);
- (*p)++;
- ret |= ((long) (byte & 127) << shift);
- shift += 7;
- if ((byte & 128) == 0)
- {
- break;
- }
- }
- if ((shift < size) && (byte & 0x40))
- {
- ret |= -(1 << shift);
- }
- return ret;
-}
-
-static CORE_ADDR
-read_pointer (bfd *abfd, char **p)
-{
- switch (TARGET_ADDR_BIT / TARGET_CHAR_BIT)
- {
- case 4:
- return read_4u (abfd, p);
- case 8:
- return read_8u (abfd, p);
- default:
- error
- ("dwarf cfi error: unsupported target address length [in module %s]",
- bfd_get_filename (abfd));
- }
-}
-
-/* Read the appropriate amount of data from *P and return the
- resulting value based on ENCODING, which the calling function must
- provide. */
-static CORE_ADDR
-read_encoded_pointer (bfd *abfd, char **p, unsigned char encoding)
-{
- CORE_ADDR ret;
-
- switch (encoding & 0x0f)
- {
- case DW_EH_PE_absptr:
- ret = read_pointer (abfd, p);
- break;
-
- case DW_EH_PE_uleb128:
- ret = read_uleb128 (abfd, p);
- break;
- case DW_EH_PE_sleb128:
- ret = read_sleb128 (abfd, p);
- break;
-
- case DW_EH_PE_udata2:
- ret = read_2u (abfd, p);
- break;
- case DW_EH_PE_udata4:
- ret = read_4u (abfd, p);
- break;
- case DW_EH_PE_udata8:
- ret = read_8u (abfd, p);
- break;
-
- case DW_EH_PE_sdata2:
- ret = read_2s (abfd, p);
- break;
- case DW_EH_PE_sdata4:
- ret = read_4s (abfd, p);
- break;
- case DW_EH_PE_sdata8:
- ret = read_8s (abfd, p);
- break;
-
- default:
- internal_error (__FILE__, __LINE__,
- "read_encoded_pointer: unknown pointer encoding [in module %s]",
- bfd_get_filename (abfd));
- }
-
- return ret;
-}
-
-/* The variable 'encoding' carries three different flags:
- - encoding & 0x0f : size of the address (handled in read_encoded_pointer())
- - encoding & 0x70 : type (absolute, relative, ...)
- - encoding & 0x80 : indirect flag (DW_EH_PE_indirect == 0x80). */
-enum ptr_encoding
-pointer_encoding (unsigned char encoding, struct objfile *objfile)
-{
- int ret;
-
- if (encoding & DW_EH_PE_indirect)
- warning
- ("CFI: Unsupported pointer encoding: DW_EH_PE_indirect [in module %s]",
- objfile->name);
-
- switch (encoding & 0x70)
- {
- case DW_EH_PE_absptr:
- case DW_EH_PE_pcrel:
- case DW_EH_PE_textrel:
- case DW_EH_PE_datarel:
- case DW_EH_PE_funcrel:
- ret = encoding & 0x70;
- break;
- default:
- internal_error (__FILE__, __LINE__,
- "CFI: unknown pointer encoding [in module %s]",
- objfile->name);
- }
- return ret;
-}
-
-static LONGEST
-read_initial_length (bfd *abfd, char *buf, int *bytes_read)
-{
- LONGEST ret = 0;
-
- ret = bfd_get_32 (abfd, (bfd_byte *) buf);
-
- if (ret == 0xffffffff)
- {
- ret = bfd_get_64 (abfd, (bfd_byte *) buf + 4);
- *bytes_read = 12;
- }
- else
- {
- *bytes_read = 4;
- }
-
- return ret;
-}
-
-static ULONGEST
-read_length (bfd *abfd, char *buf, int *bytes_read, int dwarf64)
-{
- if (dwarf64)
- {
- *bytes_read = 8;
- return read_8u (abfd, &buf);
- }
- else
- {
- *bytes_read = 4;
- return read_4u (abfd, &buf);
- }
-}
-
-static void
-execute_cfa_program (struct objfile *objfile, char *insn_ptr, char *insn_end,
- struct context *context, struct frame_state *fs)
-{
- struct frame_state_regs *unused_rs = NULL;
-
- /* Don't allow remember/restore between CIE and FDE programs. */
- fs->regs.prev = NULL;
-
- while (insn_ptr < insn_end && fs->pc < context->ra)
- {
- unsigned char insn = *insn_ptr++;
- ULONGEST reg, uoffset;
- LONGEST offset;
-
- if (insn & DW_CFA_advance_loc)
- fs->pc += (insn & 0x3f) * fs->code_align;
- else if (insn & DW_CFA_offset)
- {
- reg = insn & 0x3f;
- uoffset = read_uleb128 (objfile->obfd, &insn_ptr);
- offset = (long) uoffset *fs->data_align;
- fs->regs.reg[reg].how = REG_SAVED_OFFSET;
- fs->regs.reg[reg].loc.offset = offset;
- }
- else if (insn & DW_CFA_restore)
- {
- reg = insn & 0x3f;
- fs->regs.reg[reg].how = REG_UNSAVED;
- }
- else
- switch (insn)
- {
- case DW_CFA_set_loc:
- fs->pc = read_encoded_pointer (objfile->obfd, &insn_ptr,
- fs->addr_encoding);
-
- if (pointer_encoding (fs->addr_encoding, objfile) != PE_absptr)
- warning
- ("CFI: DW_CFA_set_loc uses relative addressing [in module %s]",
- objfile->name);
-
- break;
-
- case DW_CFA_advance_loc1:
- fs->pc += read_1u (objfile->obfd, &insn_ptr);
- break;
- case DW_CFA_advance_loc2:
- fs->pc += read_2u (objfile->obfd, &insn_ptr);
- break;
- case DW_CFA_advance_loc4:
- fs->pc += read_4u (objfile->obfd, &insn_ptr);
- break;
-
- case DW_CFA_offset_extended:
- reg = read_uleb128 (objfile->obfd, &insn_ptr);
- uoffset = read_uleb128 (objfile->obfd, &insn_ptr);
- offset = (long) uoffset *fs->data_align;
- fs->regs.reg[reg].how = REG_SAVED_OFFSET;
- fs->regs.reg[reg].loc.offset = offset;
- break;
-
- case DW_CFA_restore_extended:
- reg = read_uleb128 (objfile->obfd, &insn_ptr);
- fs->regs.reg[reg].how = REG_UNSAVED;
- break;
-
- case DW_CFA_undefined:
- case DW_CFA_same_value:
- case DW_CFA_nop:
- break;
-
- case DW_CFA_register:
- {
- ULONGEST reg2;
- reg = read_uleb128 (objfile->obfd, &insn_ptr);
- reg2 = read_uleb128 (objfile->obfd, &insn_ptr);
- fs->regs.reg[reg].how = REG_SAVED_REG;
- fs->regs.reg[reg].loc.reg = reg2;
- }
- break;
-
- case DW_CFA_remember_state:
- {
- struct frame_state_regs *new_rs;
- if (unused_rs)
- {
- new_rs = unused_rs;
- unused_rs = unused_rs->prev;
- }
- else
- new_rs = xmalloc (sizeof (struct frame_state_regs));
-
- *new_rs = fs->regs;
- fs->regs.prev = new_rs;
- }
- break;
-
- case DW_CFA_restore_state:
- {
- struct frame_state_regs *old_rs = fs->regs.prev;
- fs->regs = *old_rs;
- old_rs->prev = unused_rs;
- unused_rs = old_rs;
- }
- break;
-
- case DW_CFA_def_cfa:
- reg = read_uleb128 (objfile->obfd, &insn_ptr);
- uoffset = read_uleb128 (objfile->obfd, &insn_ptr);
- fs->cfa_reg = reg;
- fs->cfa_offset = uoffset;
- fs->cfa_how = CFA_REG_OFFSET;
- break;
-
- case DW_CFA_def_cfa_register:
- reg = read_uleb128 (objfile->obfd, &insn_ptr);
- fs->cfa_reg = reg;
- fs->cfa_how = CFA_REG_OFFSET;
- break;
-
- case DW_CFA_def_cfa_offset:
- uoffset = read_uleb128 (objfile->obfd, &insn_ptr);
- fs->cfa_offset = uoffset;
- break;
-
- case DW_CFA_def_cfa_expression:
- uoffset = read_uleb128 (objfile->obfd, &insn_ptr);
- fs->cfa_exp = insn_ptr;
- fs->cfa_how = CFA_EXP;
- insn_ptr += uoffset;
- break;
-
- case DW_CFA_expression:
- reg = read_uleb128 (objfile->obfd, &insn_ptr);
- uoffset = read_uleb128 (objfile->obfd, &insn_ptr);
- fs->regs.reg[reg].how = REG_SAVED_EXP;
- fs->regs.reg[reg].loc.exp = insn_ptr;
- insn_ptr += uoffset;
- break;
-
- /* From the 2.1 draft. */
- case DW_CFA_offset_extended_sf:
- reg = read_uleb128 (objfile->obfd, &insn_ptr);
- offset = read_sleb128 (objfile->obfd, &insn_ptr);
- offset *= fs->data_align;
- fs->regs.reg[reg].how = REG_SAVED_OFFSET;
- fs->regs.reg[reg].loc.offset = offset;
- break;
-
- case DW_CFA_def_cfa_sf:
- reg = read_uleb128 (objfile->obfd, &insn_ptr);
- offset = read_sleb128 (objfile->obfd, &insn_ptr);
- fs->cfa_offset = offset;
- fs->cfa_reg = reg;
- fs->cfa_how = CFA_REG_OFFSET;
- break;
-
- case DW_CFA_def_cfa_offset_sf:
- uoffset = read_uleb128 (objfile->obfd, &insn_ptr);
- fs->cfa_offset = uoffset;
- /* cfa_how deliberately not set. */
- break;
-
- case DW_CFA_GNU_window_save:
- /* ??? Hardcoded for SPARC register window configuration. */
- for (reg = 16; reg < 32; ++reg)
- {
- fs->regs.reg[reg].how = REG_SAVED_OFFSET;
- fs->regs.reg[reg].loc.offset = (reg - 16) * sizeof (void *);
- }
- break;
-
- case DW_CFA_GNU_args_size:
- uoffset = read_uleb128 (objfile->obfd, &insn_ptr);
- context->args_size = uoffset;
- break;
-
- case DW_CFA_GNU_negative_offset_extended:
- /* Obsoleted by DW_CFA_offset_extended_sf, but used by
- older PowerPC code. */
- reg = read_uleb128 (objfile->obfd, &insn_ptr);
- uoffset = read_uleb128 (objfile->obfd, &insn_ptr);
- offset = (long) uoffset *fs->data_align;
- fs->regs.reg[reg].how = REG_SAVED_OFFSET;
- fs->regs.reg[reg].loc.offset = -offset;
- break;
-
- default:
- error
- ("dwarf cfi error: unknown cfa instruction %d [in module %s]",
- insn, objfile->name);
- }
- }
-}
-
-static struct fde_unit *
-get_fde_for_addr (CORE_ADDR pc)
-{
- size_t lo, hi;
- struct fde_unit *fde = NULL;
- lo = 0;
- hi = fde_chunks.elems;
-
- while (lo < hi)
- {
- size_t i = (lo + hi) / 2;
- fde = fde_chunks.array[i];
- if (pc < fde->initial_location)
- hi = i;
- else if (pc >= fde->initial_location + fde->address_range)
- lo = i + 1;
- else
- return fde;
- }
- return 0;
-}
-
-static void
-frame_state_for (struct context *context, struct frame_state *fs)
-{
- struct fde_unit *fde;
- struct cie_unit *cie;
-
- context->args_size = 0;
- context->lsda = 0;
-
- fde = get_fde_for_addr (context->ra - 1);
-
- if (fde == NULL)
- return;
-
- fs->pc = fde->initial_location;
-
- gdb_assert (fde->cie_ptr != NULL);
-
- cie = fde->cie_ptr;
-
- fs->code_align = cie->code_align;
- fs->data_align = cie->data_align;
- fs->retaddr_column = cie->ra;
- fs->addr_encoding = cie->addr_encoding;
- fs->objfile = cie->objfile;
-
- execute_cfa_program (cie->objfile, cie->data,
- cie->data + cie->data_length, context, fs);
- execute_cfa_program (cie->objfile, fde->data,
- fde->data + fde->data_length, context, fs);
-}
-
-static void
-get_reg (char *reg, struct context *context, int regnum)
-{
- switch (context->reg[regnum].how)
- {
- case REG_CTX_UNSAVED:
- deprecated_read_register_gen (regnum, reg);
- break;
- case REG_CTX_SAVED_OFFSET:
- target_read_memory (context->cfa + context->reg[regnum].loc.offset,
- reg, REGISTER_RAW_SIZE (regnum));
- break;
- case REG_CTX_SAVED_REG:
- deprecated_read_register_gen (context->reg[regnum].loc.reg, reg);
- break;
- case REG_CTX_SAVED_ADDR:
- target_read_memory (context->reg[regnum].loc.addr,
- reg, REGISTER_RAW_SIZE (regnum));
- break;
- case REG_CTX_VALUE:
- memcpy (reg, &context->reg[regnum].loc.addr,
- REGISTER_RAW_SIZE (regnum));
- break;
- default:
- internal_error (__FILE__, __LINE__, "get_reg: unknown register rule");
- }
-}
-
-/* Decode a DW_OP stack program. Return the top of stack. Push INITIAL
- onto the stack to start. */
-static CORE_ADDR
-execute_stack_op (struct objfile *objfile,
- char *op_ptr, char *op_end, struct context *context,
- CORE_ADDR initial)
-{
- CORE_ADDR stack[64]; /* ??? Assume this is enough. */
- int stack_elt;
-
- stack[0] = initial;
- stack_elt = 1;
-
- while (op_ptr < op_end)
- {
- enum dwarf_location_atom op = *op_ptr++;
- CORE_ADDR result;
- ULONGEST reg;
- LONGEST offset;
-
- switch (op)
- {
- case DW_OP_lit0:
- case DW_OP_lit1:
- case DW_OP_lit2:
- case DW_OP_lit3:
- case DW_OP_lit4:
- case DW_OP_lit5:
- case DW_OP_lit6:
- case DW_OP_lit7:
- case DW_OP_lit8:
- case DW_OP_lit9:
- case DW_OP_lit10:
- case DW_OP_lit11:
- case DW_OP_lit12:
- case DW_OP_lit13:
- case DW_OP_lit14:
- case DW_OP_lit15:
- case DW_OP_lit16:
- case DW_OP_lit17:
- case DW_OP_lit18:
- case DW_OP_lit19:
- case DW_OP_lit20:
- case DW_OP_lit21:
- case DW_OP_lit22:
- case DW_OP_lit23:
- case DW_OP_lit24:
- case DW_OP_lit25:
- case DW_OP_lit26:
- case DW_OP_lit27:
- case DW_OP_lit28:
- case DW_OP_lit29:
- case DW_OP_lit30:
- case DW_OP_lit31:
- result = op - DW_OP_lit0;
- break;
-
- case DW_OP_addr:
- result = read_pointer (objfile->obfd, &op_ptr);
- break;
-
- case DW_OP_const1u:
- result = read_1u (objfile->obfd, &op_ptr);
- break;
- case DW_OP_const1s:
- result = read_1s (objfile->obfd, &op_ptr);
- break;
- case DW_OP_const2u:
- result = read_2u (objfile->obfd, &op_ptr);
- break;
- case DW_OP_const2s:
- result = read_2s (objfile->obfd, &op_ptr);
- break;
- case DW_OP_const4u:
- result = read_4u (objfile->obfd, &op_ptr);
- break;
- case DW_OP_const4s:
- result = read_4s (objfile->obfd, &op_ptr);
- break;
- case DW_OP_const8u:
- result = read_8u (objfile->obfd, &op_ptr);
- break;
- case DW_OP_const8s:
- result = read_8s (objfile->obfd, &op_ptr);
- break;
- case DW_OP_constu:
- result = read_uleb128 (objfile->obfd, &op_ptr);
- break;
- case DW_OP_consts:
- result = read_sleb128 (objfile->obfd, &op_ptr);
- break;
-
- case DW_OP_reg0:
- case DW_OP_reg1:
- case DW_OP_reg2:
- case DW_OP_reg3:
- case DW_OP_reg4:
- case DW_OP_reg5:
- case DW_OP_reg6:
- case DW_OP_reg7:
- case DW_OP_reg8:
- case DW_OP_reg9:
- case DW_OP_reg10:
- case DW_OP_reg11:
- case DW_OP_reg12:
- case DW_OP_reg13:
- case DW_OP_reg14:
- case DW_OP_reg15:
- case DW_OP_reg16:
- case DW_OP_reg17:
- case DW_OP_reg18:
- case DW_OP_reg19:
- case DW_OP_reg20:
- case DW_OP_reg21:
- case DW_OP_reg22:
- case DW_OP_reg23:
- case DW_OP_reg24:
- case DW_OP_reg25:
- case DW_OP_reg26:
- case DW_OP_reg27:
- case DW_OP_reg28:
- case DW_OP_reg29:
- case DW_OP_reg30:
- case DW_OP_reg31:
- get_reg ((char *) &result, context, op - DW_OP_reg0);
- break;
- case DW_OP_regx:
- reg = read_uleb128 (objfile->obfd, &op_ptr);
- get_reg ((char *) &result, context, reg);
- break;
-
- case DW_OP_breg0:
- case DW_OP_breg1:
- case DW_OP_breg2:
- case DW_OP_breg3:
- case DW_OP_breg4:
- case DW_OP_breg5:
- case DW_OP_breg6:
- case DW_OP_breg7:
- case DW_OP_breg8:
- case DW_OP_breg9:
- case DW_OP_breg10:
- case DW_OP_breg11:
- case DW_OP_breg12:
- case DW_OP_breg13:
- case DW_OP_breg14:
- case DW_OP_breg15:
- case DW_OP_breg16:
- case DW_OP_breg17:
- case DW_OP_breg18:
- case DW_OP_breg19:
- case DW_OP_breg20:
- case DW_OP_breg21:
- case DW_OP_breg22:
- case DW_OP_breg23:
- case DW_OP_breg24:
- case DW_OP_breg25:
- case DW_OP_breg26:
- case DW_OP_breg27:
- case DW_OP_breg28:
- case DW_OP_breg29:
- case DW_OP_breg30:
- case DW_OP_breg31:
- offset = read_sleb128 (objfile->obfd, &op_ptr);
- get_reg ((char *) &result, context, op - DW_OP_breg0);
- result += offset;
- break;
- case DW_OP_bregx:
- reg = read_uleb128 (objfile->obfd, &op_ptr);
- offset = read_sleb128 (objfile->obfd, &op_ptr);
- get_reg ((char *) &result, context, reg);
- result += offset;
- break;
-
- case DW_OP_dup:
- if (stack_elt < 1)
- internal_error (__FILE__, __LINE__,
- "execute_stack_op error [in module %s]",
- objfile->name);
- result = stack[stack_elt - 1];
- break;
-
- case DW_OP_drop:
- if (--stack_elt < 0)
- internal_error (__FILE__, __LINE__,
- "execute_stack_op error [in module %s]",
- objfile->name);
- goto no_push;
-
- case DW_OP_pick:
- offset = *op_ptr++;
- if (offset >= stack_elt - 1)
- internal_error (__FILE__, __LINE__,
- "execute_stack_op error [in module %s]",
- objfile->name);
- result = stack[stack_elt - 1 - offset];
- break;
-
- case DW_OP_over:
- if (stack_elt < 2)
- internal_error (__FILE__, __LINE__,
- "execute_stack_op error [in module %s]",
- objfile->name);
- result = stack[stack_elt - 2];
- break;
-
- case DW_OP_rot:
- {
- CORE_ADDR t1, t2, t3;
-
- if (stack_elt < 3)
- internal_error (__FILE__, __LINE__,
- "execute_stack_op error [in module %s]",
- objfile->name);
- t1 = stack[stack_elt - 1];
- t2 = stack[stack_elt - 2];
- t3 = stack[stack_elt - 3];
- stack[stack_elt - 1] = t2;
- stack[stack_elt - 2] = t3;
- stack[stack_elt - 3] = t1;
- goto no_push;
- }
-
- case DW_OP_deref:
- case DW_OP_deref_size:
- case DW_OP_abs:
- case DW_OP_neg:
- case DW_OP_not:
- case DW_OP_plus_uconst:
- /* Unary operations. */
- if (--stack_elt < 0)
- internal_error (__FILE__, __LINE__,
- "execute_stack_op error [in module %s]",
- objfile->name);
- result = stack[stack_elt];
-
- switch (op)
- {
- case DW_OP_deref:
- {
- int len = TARGET_ADDR_BIT / TARGET_CHAR_BIT;
- if (len != 4 && len != 8)
- internal_error (__FILE__, __LINE__,
- "execute_stack_op error [in module %s]",
- objfile->name);
- result = read_memory_unsigned_integer (result, len);
- }
- break;
-
- case DW_OP_deref_size:
- {
- int len = *op_ptr++;
- if (len != 1 && len != 2 && len != 4 && len != 8)
- internal_error (__FILE__, __LINE__,
- "execute_stack_op error [in module %s]",
- objfile->name);
- result = read_memory_unsigned_integer (result, len);
- }
- break;
-
- case DW_OP_abs:
- if (result < 0)
- result = -result;
- break;
- case DW_OP_neg:
- result = -result;
- break;
- case DW_OP_not:
- result = ~result;
- break;
- case DW_OP_plus_uconst:
- result += read_uleb128 (objfile->obfd, &op_ptr);
- break;
- default:
- break;
- }
- break;
-
- case DW_OP_and:
- case DW_OP_div:
- case DW_OP_minus:
- case DW_OP_mod:
- case DW_OP_mul:
- case DW_OP_or:
- case DW_OP_plus:
- case DW_OP_le:
- case DW_OP_ge:
- case DW_OP_eq:
- case DW_OP_lt:
- case DW_OP_gt:
- case DW_OP_ne:
- {
- /* Binary operations. */
- CORE_ADDR first, second;
- if ((stack_elt -= 2) < 0)
- internal_error (__FILE__, __LINE__,
- "execute_stack_op error [in module %s]",
- objfile->name);
- second = stack[stack_elt];
- first = stack[stack_elt + 1];
-
- switch (op)
- {
- case DW_OP_and:
- result = second & first;
- break;
- case DW_OP_div:
- result = (LONGEST) second / (LONGEST) first;
- break;
- case DW_OP_minus:
- result = second - first;
- break;
- case DW_OP_mod:
- result = (LONGEST) second % (LONGEST) first;
- break;
- case DW_OP_mul:
- result = second * first;
- break;
- case DW_OP_or:
- result = second | first;
- break;
- case DW_OP_plus:
- result = second + first;
- break;
- case DW_OP_shl:
- result = second << first;
- break;
- case DW_OP_shr:
- result = second >> first;
- break;
- case DW_OP_shra:
- result = (LONGEST) second >> first;
- break;
- case DW_OP_xor:
- result = second ^ first;
- break;
- case DW_OP_le:
- result = (LONGEST) first <= (LONGEST) second;
- break;
- case DW_OP_ge:
- result = (LONGEST) first >= (LONGEST) second;
- break;
- case DW_OP_eq:
- result = (LONGEST) first == (LONGEST) second;
- break;
- case DW_OP_lt:
- result = (LONGEST) first < (LONGEST) second;
- break;
- case DW_OP_gt:
- result = (LONGEST) first > (LONGEST) second;
- break;
- case DW_OP_ne:
- result = (LONGEST) first != (LONGEST) second;
- break;
- default:
- error
- ("execute_stack_op: Unknown DW_OP_ value [in module %s]",
- objfile->name);
- break;
- }
- }
- break;
-
- case DW_OP_skip:
- offset = read_2s (objfile->obfd, &op_ptr);
- op_ptr += offset;
- goto no_push;
-
- case DW_OP_bra:
- if (--stack_elt < 0)
- internal_error (__FILE__, __LINE__,
- "execute_stack_op error [in module %s]",
- objfile->name);
- offset = read_2s (objfile->obfd, &op_ptr);
- if (stack[stack_elt] != 0)
- op_ptr += offset;
- goto no_push;
-
- case DW_OP_nop:
- goto no_push;
-
- default:
- internal_error (__FILE__, __LINE__,
- "execute_stack_op error [in module %s]",
- objfile->name);
- }
-
- /* Most things push a result value. */
- if ((size_t) stack_elt >= sizeof (stack) / sizeof (*stack))
- internal_error (__FILE__, __LINE__,
- "execute_stack_op error [in module %s]",
- objfile->name);
- stack[++stack_elt] = result;
- no_push:;
- }
-
- /* We were executing this program to get a value. It should be
- at top of stack. */
- if (--stack_elt < 0)
- internal_error (__FILE__, __LINE__,
- "execute_stack_op error [in module %s]", objfile->name);
- return stack[stack_elt];
-}
-
-static void
-update_context (struct context *context, struct frame_state *fs, int chain)
-{
- struct context *orig_context;
- CORE_ADDR cfa = 0;
- long i;
-
- unwind_tmp_obstack_init ();
-
- orig_context = context_alloc ();
- context_cpy (orig_context, context);
-
- /* Compute this frame's CFA. */
- switch (fs->cfa_how)
- {
- case CFA_REG_OFFSET:
- get_reg ((char *) &cfa, context, fs->cfa_reg);
- cfa += fs->cfa_offset;
- break;
-
- case CFA_EXP:
- /* ??? No way of knowing what register number is the stack pointer
- to do the same sort of handling as above. Assume that if the
- CFA calculation is so complicated as to require a stack program
- that this will not be a problem. */
- {
- char *exp = fs->cfa_exp;
- ULONGEST len;
-
- len = read_uleb128 (fs->objfile->obfd, &exp);
- cfa = (CORE_ADDR) execute_stack_op (fs->objfile, exp,
- exp + len, context, 0);
- break;
- }
- default:
- break;
- }
- context->cfa = cfa;
-
- if (!chain)
- orig_context->cfa = cfa;
-
- /* Compute the addresses of all registers saved in this frame. */
- for (i = 0; i < NUM_REGS; ++i)
- switch (fs->regs.reg[i].how)
- {
- case REG_UNSAVED:
- if (i == SP_REGNUM)
- {
- context->reg[i].how = REG_CTX_VALUE;
- context->reg[i].loc.addr = cfa;
- }
- else
- context->reg[i].how = REG_CTX_UNSAVED;
- break;
- case REG_SAVED_OFFSET:
- context->reg[i].how = REG_CTX_SAVED_OFFSET;
- context->reg[i].loc.offset = fs->regs.reg[i].loc.offset;
- break;
- case REG_SAVED_REG:
- switch (orig_context->reg[fs->regs.reg[i].loc.reg].how)
- {
- case REG_CTX_UNSAVED:
- context->reg[i].how = REG_CTX_UNSAVED;
- break;
- case REG_CTX_SAVED_OFFSET:
- context->reg[i].how = REG_CTX_SAVED_OFFSET;
- context->reg[i].loc.offset = orig_context->cfa - context->cfa +
- orig_context->reg[fs->regs.reg[i].loc.reg].loc.offset;
- break;
- case REG_CTX_SAVED_REG:
- context->reg[i].how = REG_CTX_SAVED_REG;
- context->reg[i].loc.reg =
- orig_context->reg[fs->regs.reg[i].loc.reg].loc.reg;
- break;
- case REG_CTX_SAVED_ADDR:
- context->reg[i].how = REG_CTX_SAVED_ADDR;
- context->reg[i].loc.addr =
- orig_context->reg[fs->regs.reg[i].loc.reg].loc.addr;
- break;
- default:
- internal_error (__FILE__, __LINE__, "bad switch 0x%02X",
- orig_context->reg[fs->regs.reg[i].loc.reg].how);
- }
- break;
- case REG_SAVED_EXP:
- {
- char *exp = fs->regs.reg[i].loc.exp;
- ULONGEST len;
- CORE_ADDR val;
-
- len = read_uleb128 (fs->objfile->obfd, &exp);
- val = execute_stack_op (fs->objfile, exp, exp + len,
- orig_context, cfa);
- context->reg[i].how = REG_CTX_SAVED_ADDR;
- context->reg[i].loc.addr = val;
- }
- break;
- default:
- internal_error (__FILE__, __LINE__, "bad switch 0x%02X",
- fs->regs.reg[i].how);
- }
- get_reg ((char *) &context->ra, context, fs->retaddr_column);
- unwind_tmp_obstack_free ();
-}
-
-static int
-is_cie (ULONGEST cie_id, int dwarf64)
-{
- return dwarf64 ? (cie_id == 0xffffffffffffffff) : (cie_id == 0xffffffff);
-}
-
-static int
-compare_fde_unit (const void *a, const void *b)
-{
- struct fde_unit **first, **second;
- first = (struct fde_unit **) a;
- second = (struct fde_unit **) b;
- if ((*first)->initial_location > (*second)->initial_location)
- return 1;
- else if ((*first)->initial_location < (*second)->initial_location)
- return -1;
- else
- return 0;
-}
-
-/* Build the cie_chunks and fde_chunks tables from informations
- found in .debug_frame and .eh_frame sections. */
-/* We can handle both of these sections almost in the same way, however there
- are some exceptions:
- - CIE ID is -1 in debug_frame, but 0 in eh_frame
- - eh_frame may contain some more information that are used only by gcc
- (eg. personality pointer, LSDA pointer, ...). Most of them we can ignore.
- - In debug_frame FDE's item cie_id contains offset of it's parent CIE.
- In eh_frame FDE's item cie_id is a relative pointer to the parent CIE.
- Anyway we don't need to bother with this, because we are smart enough
- to keep the pointer to the parent CIE of oncomming FDEs in 'last_cie'.
- - Although debug_frame items can contain Augmentation as well as
- eh_frame ones, I have never seen them non-empty. Thus only in eh_frame
- we can encounter for example non-absolute pointers (Aug. 'R').
- -- mludvig */
-static void
-parse_frame_info (struct objfile *objfile, file_ptr frame_offset,
- unsigned int frame_size, asection *frame_section,
- int eh_frame)
-{
- bfd *abfd = objfile->obfd;
- asection *curr_section_ptr;
- char *start = NULL;
- char *end = NULL;
- char *frame_buffer = NULL;
- char *curr_section_name, *aug_data;
- struct cie_unit *last_cie = NULL;
- int last_dup_fde = 0;
- int aug_len, i;
- CORE_ADDR curr_section_vma = 0;
-
- unwind_tmp_obstack_init ();
-
- frame_buffer = dwarf2_read_section (objfile, frame_offset, frame_size,
- frame_section);
-
- start = frame_buffer;
- end = frame_buffer + frame_size;
-
- curr_section_name = eh_frame ? ".eh_frame" : ".debug_frame";
- curr_section_ptr = bfd_get_section_by_name (abfd, curr_section_name);
- if (curr_section_ptr)
- curr_section_vma = curr_section_ptr->vma;
-
- if (start)
- {
- while (start < end)
- {
- unsigned long length;
- ULONGEST cie_id;
- ULONGEST unit_offset = start - frame_buffer;
- int bytes_read, dwarf64;
- char *block_end;
-
- length = read_initial_length (abfd, start, &bytes_read);
- start += bytes_read;
- dwarf64 = (bytes_read == 12);
- block_end = start + length;
-
- if (length == 0)
- {
- start = block_end;
- continue;
- }
-
- cie_id = read_length (abfd, start, &bytes_read, dwarf64);
- start += bytes_read;
-
- if ((eh_frame && cie_id == 0) || is_cie (cie_id, dwarf64))
- {
- struct cie_unit *cie = cie_unit_alloc ();
- char *aug;
-
- cie->objfile = objfile;
- cie->next = cie_chunks;
- cie_chunks = cie;
-
- cie->objfile = objfile;
-
- cie->offset = unit_offset;
-
- start++; /* version */
-
- cie->augmentation = aug = start;
- while (*start++); /* Skips last NULL as well */
-
- cie->code_align = read_uleb128 (abfd, &start);
- cie->data_align = read_sleb128 (abfd, &start);
- cie->ra = read_1u (abfd, &start);
-
- /* Augmentation:
- z Indicates that a uleb128 is present to size the
- augmentation section.
- L Indicates the encoding (and thus presence) of
- an LSDA pointer in the FDE augmentation.
- R Indicates a non-default pointer encoding for
- FDE code pointers.
- P Indicates the presence of an encoding + language
- personality routine in the CIE augmentation.
-
- [This info comes from GCC's dwarf2out.c]
- */
- if (*aug == 'z')
- {
- aug_len = read_uleb128 (abfd, &start);
- aug_data = start;
- start += aug_len;
- ++aug;
- }
-
- cie->data = start;
- cie->data_length = block_end - cie->data;
-
- while (*aug != '\0')
- {
- if (aug[0] == 'e' && aug[1] == 'h')
- {
- aug_data += sizeof (void *);
- aug++;
- }
- else if (aug[0] == 'R')
- cie->addr_encoding = *aug_data++;
- else if (aug[0] == 'P')
- {
- CORE_ADDR pers_addr;
- int pers_addr_enc;
-
- pers_addr_enc = *aug_data++;
- /* We don't need pers_addr value and so we
- don't care about it's encoding. */
- pers_addr = read_encoded_pointer (abfd, &aug_data,
- pers_addr_enc);
- }
- else if (aug[0] == 'L' && eh_frame)
- {
- int lsda_addr_enc;
-
- /* Perhaps we should save this to CIE for later use?
- Do we need it for something in GDB? */
- lsda_addr_enc = *aug_data++;
- }
- else
- warning ("CFI warning: unknown augmentation \"%c\""
- " in \"%s\" of\n"
- "\t%s", aug[0], curr_section_name,
- objfile->name);
- aug++;
- }
-
- last_cie = cie;
- }
- else
- {
- struct fde_unit *fde;
- struct cie_unit *cie;
- int dup = 0;
- CORE_ADDR init_loc;
-
- /* We assume that debug_frame is in order
- CIE,FDE,CIE,FDE,FDE,... and thus the CIE for this FDE
- should be stored in last_cie pointer. If not, we'll
- try to find it by the older way. */
- if (last_cie)
- cie = last_cie;
- else
- {
- warning ("CFI: last_cie == NULL. "
- "Perhaps a malformed %s section in '%s'...?\n",
- curr_section_name, objfile->name);
-
- cie = cie_chunks;
- while (cie)
- {
- if (cie->objfile == objfile)
- {
- if (eh_frame &&
- (cie->offset ==
- (unit_offset + bytes_read - cie_id)))
- break;
- if (!eh_frame && (cie->offset == cie_id))
- break;
- }
-
- cie = cie->next;
- }
- if (!cie)
- error ("CFI: can't find CIE pointer [in module %s]",
- bfd_get_filename (abfd));
- }
-
- init_loc = read_encoded_pointer (abfd, &start,
- cie->addr_encoding);
-
- switch (pointer_encoding (cie->addr_encoding, objfile))
- {
- case PE_absptr:
- break;
- case PE_pcrel:
- /* start-frame_buffer gives offset from
- the beginning of actual section. */
- init_loc += curr_section_vma + start - frame_buffer;
- break;
- default:
- warning ("CFI: Unsupported pointer encoding [in module %s]",
- bfd_get_filename (abfd));
- }
-
- /* For relocatable objects we must add an offset telling
- where the section is actually mapped in the memory. */
- init_loc += ANOFFSET (objfile->section_offsets,
- SECT_OFF_TEXT (objfile));
-
- /* If we have both .debug_frame and .eh_frame present in
- a file, we must eliminate duplicate FDEs. For now we'll
- run through all entries in fde_chunks and check it one
- by one. Perhaps in the future we can implement a faster
- searching algorithm. */
- /* eh_frame==2 indicates, that this file has an already
- parsed .debug_frame too. When eh_frame==1 it means, that no
- .debug_frame is present and thus we don't need to check for
- duplicities. eh_frame==0 means, that we parse .debug_frame
- and don't need to care about duplicate FDEs, because
- .debug_frame is parsed first. */
- if (eh_frame == 2)
- for (i = 0; eh_frame == 2 && i < fde_chunks.elems; i++)
- {
- /* We assume that FDEs in .debug_frame and .eh_frame
- have the same order (if they are present, of course).
- If we find a duplicate entry for one FDE and save
- it's index to last_dup_fde it's very likely, that
- we'll find an entry for the following FDE right after
- the previous one. Thus in many cases we'll run this
- loop only once. */
- last_dup_fde = (last_dup_fde + i) % fde_chunks.elems;
- if (fde_chunks.array[last_dup_fde]->initial_location
- == init_loc)
- {
- dup = 1;
- break;
- }
- }
-
- /* Allocate a new entry only if this FDE isn't a duplicate of
- something we have already seen. */
- if (!dup)
- {
- fde_chunks_need_space ();
- fde = fde_unit_alloc ();
-
- fde_chunks.array[fde_chunks.elems++] = fde;
-
- fde->initial_location = init_loc;
- fde->address_range = read_encoded_pointer (abfd, &start,
- cie->
- addr_encoding);
-
- fde->cie_ptr = cie;
-
- /* Here we intentionally ignore augmentation data
- from FDE, because we don't need them. */
- if (cie->augmentation[0] == 'z')
- start += read_uleb128 (abfd, &start);
-
- fde->data = start;
- fde->data_length = block_end - start;
- }
- }
- start = block_end;
- }
- qsort (fde_chunks.array, fde_chunks.elems,
- sizeof (struct fde_unit *), compare_fde_unit);
- }
-}
-
-/* We must parse both .debug_frame section and .eh_frame because
- * not all frames must be present in both of these sections. */
-void
-dwarf2_build_frame_info (struct objfile *objfile)
-{
- int after_debug_frame = 0;
-
- /* If we have .debug_frame then the parser is called with
- eh_frame==0 for .debug_frame and eh_frame==2 for .eh_frame,
- otherwise it's only called once for .eh_frame with argument
- eh_frame==1. */
-
- if (dwarf_frame_offset)
- {
- parse_frame_info (objfile, dwarf_frame_offset,
- dwarf_frame_size, dwarf_frame_section,
- 0 /* = debug_frame */ );
- after_debug_frame = 1;
- }
-
- if (dwarf_eh_frame_offset)
- parse_frame_info (objfile, dwarf_eh_frame_offset, dwarf_eh_frame_size,
- dwarf_eh_frame_section,
- 1 /* = eh_frame */ + after_debug_frame);
-}
-
-/* Return the frame address. */
-CORE_ADDR
-cfi_read_fp (void)
-{
- struct context *context;
- struct frame_state *fs;
- CORE_ADDR cfa;
-
- unwind_tmp_obstack_init ();
-
- context = context_alloc ();
- fs = frame_state_alloc ();
-
- context->ra = read_pc () + 1;
-
- frame_state_for (context, fs);
- update_context (context, fs, 0);
-
- cfa = context->cfa;
-
- unwind_tmp_obstack_free ();
-
- return cfa;
-}
-
-/* Store the frame address. This function is not used. */
-
-void
-cfi_write_fp (CORE_ADDR val)
-{
- struct context *context;
- struct frame_state *fs;
-
- unwind_tmp_obstack_init ();
-
- context = context_alloc ();
- fs = frame_state_alloc ();
-
- context->ra = read_pc () + 1;
-
- frame_state_for (context, fs);
-
- if (fs->cfa_how == CFA_REG_OFFSET)
- {
- val -= fs->cfa_offset;
- deprecated_write_register_gen (fs->cfa_reg, (char *) &val);
- }
- else
- warning ("Can't write fp.");
-
- unwind_tmp_obstack_free ();
-}
-
-/* Restore the machine to the state it had before the current frame
- was created. */
-void
-cfi_pop_frame (struct frame_info *fi)
-{
- char regbuf[MAX_REGISTER_SIZE];
- int regnum;
-
- for (regnum = 0; regnum < NUM_REGS; regnum++)
- {
- get_reg (regbuf, UNWIND_CONTEXT (fi), regnum);
- deprecated_write_register_bytes (REGISTER_BYTE (regnum), regbuf,
- REGISTER_RAW_SIZE (regnum));
- }
- write_register (PC_REGNUM, UNWIND_CONTEXT (fi)->ra);
-
- flush_cached_frames ();
-}
-
-/* Determine the address of the calling function's frame. */
-CORE_ADDR
-cfi_frame_chain (struct frame_info *fi)
-{
- struct context *context;
- struct frame_state *fs;
- CORE_ADDR cfa;
-
- unwind_tmp_obstack_init ();
-
- context = context_alloc ();
- fs = frame_state_alloc ();
- context_cpy (context, UNWIND_CONTEXT (fi));
-
- /* outermost frame */
- if (context->ra == 0)
- {
- unwind_tmp_obstack_free ();
- return 0;
- }
-
- frame_state_for (context, fs);
- update_context (context, fs, 1);
-
- cfa = context->cfa;
- unwind_tmp_obstack_free ();
-
- return cfa;
-}
-
-/* Sets the pc of the frame. */
-CORE_ADDR
-cfi_init_frame_pc (int fromleaf, struct frame_info *fi)
-{
- if (get_next_frame (fi))
- {
- CORE_ADDR pc;
- /* FIXME: cagney/2002-12-04: This is straight wrong. It's
- assuming that the PC is CORE_ADDR (a host quantity) in size. */
- get_reg ((void *) &pc, UNWIND_CONTEXT (get_next_frame (fi)), PC_REGNUM);
- return pc;
- }
- else
- return read_pc ();
-}
-
-/* Initialize unwind context informations of the frame. */
-void
-cfi_init_extra_frame_info (int fromleaf, struct frame_info *fi)
-{
- struct frame_state *fs;
-
- unwind_tmp_obstack_init ();
-
- fs = frame_state_alloc ();
- deprecated_set_frame_context (fi,
- frame_obstack_zalloc (sizeof
- (struct context)));
- UNWIND_CONTEXT (fi)->reg =
- frame_obstack_zalloc (sizeof (struct context_reg) * NUM_REGS);
- memset (UNWIND_CONTEXT (fi)->reg, 0,
- sizeof (struct context_reg) * NUM_REGS);
-
- if (get_next_frame (fi))
- {
- context_cpy (UNWIND_CONTEXT (fi), UNWIND_CONTEXT (get_next_frame (fi)));
- frame_state_for (UNWIND_CONTEXT (fi), fs);
- update_context (UNWIND_CONTEXT (fi), fs, 1);
- }
- else
- {
- UNWIND_CONTEXT (fi)->ra = get_frame_pc (fi) + 1;
- frame_state_for (UNWIND_CONTEXT (fi), fs);
- update_context (UNWIND_CONTEXT (fi), fs, 0);
- }
-
- unwind_tmp_obstack_free ();
-}
-
-/* Obtain return address of the frame. */
-CORE_ADDR
-cfi_get_ra (struct frame_info *fi)
-{
- return UNWIND_CONTEXT (fi)->ra;
-}
-
-/* Find register number REGNUM relative to FRAME and put its
- (raw) contents in *RAW_BUFFER. Set *OPTIMIZED if the variable
- was optimized out (and thus can't be fetched). If the variable
- was fetched from memory, set *ADDRP to where it was fetched from,
- otherwise it was fetched from a register.
-
- The argument RAW_BUFFER must point to aligned memory. */
-void
-cfi_get_saved_register (char *raw_buffer,
- int *optimized,
- CORE_ADDR *addrp,
- struct frame_info *frame,
- int regnum, enum lval_type *lval)
-{
- if (!target_has_registers)
- error ("No registers.");
-
- /* Normal systems don't optimize out things with register numbers. */
- if (optimized != NULL)
- *optimized = 0;
-
- if (addrp) /* default assumption: not found in memory */
- *addrp = 0;
-
- if (!get_next_frame (frame))
- {
- deprecated_read_register_gen (regnum, raw_buffer);
- if (lval != NULL)
- *lval = lval_register;
- if (addrp != NULL)
- *addrp = REGISTER_BYTE (regnum);
- }
- else
- {
- frame = get_next_frame (frame);
- switch (UNWIND_CONTEXT (frame)->reg[regnum].how)
- {
- case REG_CTX_UNSAVED:
- deprecated_read_register_gen (regnum, raw_buffer);
- if (lval != NULL)
- *lval = not_lval;
- if (optimized != NULL)
- *optimized = 1;
- break;
- case REG_CTX_SAVED_OFFSET:
- target_read_memory (UNWIND_CONTEXT (frame)->cfa +
- UNWIND_CONTEXT (frame)->reg[regnum].loc.offset,
- raw_buffer, REGISTER_RAW_SIZE (regnum));
- if (lval != NULL)
- *lval = lval_memory;
- if (addrp != NULL)
- *addrp =
- UNWIND_CONTEXT (frame)->cfa +
- UNWIND_CONTEXT (frame)->reg[regnum].loc.offset;
- break;
- case REG_CTX_SAVED_REG:
- deprecated_read_register_gen (UNWIND_CONTEXT (frame)->reg[regnum].
- loc.reg, raw_buffer);
- if (lval != NULL)
- *lval = lval_register;
- if (addrp != NULL)
- *addrp =
- REGISTER_BYTE (UNWIND_CONTEXT (frame)->reg[regnum].loc.reg);
- break;
- case REG_CTX_SAVED_ADDR:
- target_read_memory (UNWIND_CONTEXT (frame)->reg[regnum].loc.addr,
- raw_buffer, REGISTER_RAW_SIZE (regnum));
- if (lval != NULL)
- *lval = lval_memory;
- if (addrp != NULL)
- *addrp = UNWIND_CONTEXT (frame)->reg[regnum].loc.addr;
- break;
- case REG_CTX_VALUE:
- memcpy (raw_buffer, &UNWIND_CONTEXT (frame)->reg[regnum].loc.addr,
- REGISTER_RAW_SIZE (regnum));
- if (lval != NULL)
- *lval = not_lval;
- if (optimized != NULL)
- *optimized = 0;
- break;
- default:
- internal_error (__FILE__, __LINE__,
- "cfi_get_saved_register: unknown register rule 0x%02X",
- UNWIND_CONTEXT (frame)->reg[regnum].how);
- }
- }
-}
-
-/* Return the register that the function uses for a frame pointer,
- plus any necessary offset to be applied to the register before
- any frame pointer offsets. */
-void
-cfi_virtual_frame_pointer (CORE_ADDR pc, int *frame_reg,
- LONGEST * frame_offset)
-{
- struct context *context;
- struct frame_state *fs;
-
- unwind_tmp_obstack_init ();
-
- context = context_alloc ();
- fs = frame_state_alloc ();
-
- context->ra = read_pc () + 1;
-
- frame_state_for (context, fs);
-
- if (fs->cfa_how == CFA_REG_OFFSET)
- {
- *frame_reg = fs->cfa_reg;
- *frame_offset = fs->cfa_offset;
- }
- else
- error ("dwarf cfi error: CFA is not defined as CFA_REG_OFFSET");
-
- unwind_tmp_obstack_free ();
-}
diff --git a/gdb/dwarf2cfi.h b/gdb/dwarf2cfi.h
deleted file mode 100644
index 28a329d2349..00000000000
--- a/gdb/dwarf2cfi.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* Stack unwinding code based on dwarf2 frame info for GDB, the GNU debugger.
- Copyright 2001
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef DWARF2CFI_H
-#define DWARF2CFI_H
-
-struct frame_info;
-
-struct context_reg
-{
- union
- {
- unsigned int reg;
- long offset;
- CORE_ADDR addr;
- }
- loc;
- enum
- {
- REG_CTX_UNSAVED,
- REG_CTX_SAVED_OFFSET,
- REG_CTX_SAVED_REG,
- REG_CTX_SAVED_ADDR,
- REG_CTX_VALUE,
- }
- how;
-};
-
-/* This is the register and unwind state for a particular frame. */
-struct context
-{
- struct context_reg *reg;
-
- CORE_ADDR cfa;
- CORE_ADDR ra;
- void *lsda;
- int args_size;
-};
-
-/* Return the frame address. */
-CORE_ADDR cfi_read_fp ();
-
-/* Store the frame address. */
-void cfi_write_fp (CORE_ADDR val);
-
-/* Restore the machine to the state it had before the current frame
- was created. */
-void cfi_pop_frame (struct frame_info *);
-
-/* Determine the address of the calling function's frame. */
-CORE_ADDR cfi_frame_chain (struct frame_info *fi);
-
-/* Sets the pc of the frame. */
-CORE_ADDR cfi_init_frame_pc (int fromleaf, struct frame_info *fi);
-
-/* Initialize unwind context informations of the frame. */
-void cfi_init_extra_frame_info (int fromleaf, struct frame_info *fi);
-
-/* Obtain return address of the frame. */
-CORE_ADDR cfi_get_ra (struct frame_info *fi);
-
-/* Find register number REGNUM relative to FRAME and put its
- (raw) contents in *RAW_BUFFER. Set *OPTIMIZED if the variable
- was optimized out (and thus can't be fetched). If the variable
- was fetched from memory, set *ADDRP to where it was fetched from,
- otherwise it was fetched from a register.
-
- The argument RAW_BUFFER must point to aligned memory. */
-void cfi_get_saved_register (char *raw_buffer,
- int *optimized,
- CORE_ADDR *addrp,
- struct frame_info *frame,
- int regnum, enum lval_type *lval);
-
-/* Return the register that the function uses for a frame pointer,
- plus any necessary offset to be applied to the register before
- any frame pointer offsets. */
-void cfi_virtual_frame_pointer (CORE_ADDR pc, int *frame_regnum,
- LONGEST * frame_offset);
-
-struct context *context_alloc ();
-void context_cpy (struct context *dst, struct context *src);
-struct frame_state *frame_state_alloc ();
-#endif
diff --git a/gdb/dwarf2expr.h b/gdb/dwarf2expr.h
index 9e6fe808789..0a60edb8237 100644
--- a/gdb/dwarf2expr.h
+++ b/gdb/dwarf2expr.h
@@ -76,7 +76,7 @@ struct dwarf_expr_context
int in_reg;
};
-struct dwarf_expr_context *new_dwarf_expr_context ();
+struct dwarf_expr_context *new_dwarf_expr_context (void);
void free_dwarf_expr_context (struct dwarf_expr_context *ctx);
void dwarf_expr_push (struct dwarf_expr_context *ctx, CORE_ADDR value);
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index f614eb56636..97b117f2008 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -1071,9 +1071,13 @@ dwarf2_locate_sections (bfd *ignore_abfd, asection *sectp, void *ignore_ptr)
}
else if (STREQ (sectp->name, EH_FRAME_SECTION))
{
- dwarf_eh_frame_offset = sectp->filepos;
- dwarf_eh_frame_size = bfd_get_section_size_before_reloc (sectp);
- dwarf_eh_frame_section = sectp;
+ flagword aflag = bfd_get_section_flags (ignore_abfd, sectp);
+ if (aflag & SEC_HAS_CONTENTS)
+ {
+ dwarf_eh_frame_offset = sectp->filepos;
+ dwarf_eh_frame_size = bfd_get_section_size_before_reloc (sectp);
+ dwarf_eh_frame_section = sectp;
+ }
}
else if (STREQ (sectp->name, RANGES_SECTION))
{
@@ -2026,6 +2030,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 2780858883c..e6f2a2e6b7e 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);
@@ -977,6 +979,13 @@ struct_type (struct dieinfo *dip, char *thisdie, char *enddie,
switch (mbr.die_tag)
{
case TAG_member:
+ /* Static fields can be either TAG_global_variable (GCC) or else
+ TAG_member with no location (Diab). We could treat the latter like
+ the former... but since we don't support the former, just avoid
+ crashing on the latter for now. */
+ if (mbr.at_location == NULL)
+ break;
+
/* Get space to record the next field's data. */
new = (struct nextfield *) alloca (sizeof (struct nextfield));
new->next = list;
@@ -1149,7 +1158,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 +1179,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 +1345,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 +1403,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 +1523,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 +1638,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 +1659,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 +1751,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.
@@ -2430,7 +2447,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)
{
@@ -3143,7 +3161,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);
}
@@ -3179,8 +3198,12 @@ decode_modified_type (char *modifiers, unsigned int modcount, int mtype)
DIE_ID, DIE_NAME); /* FIXME */
break;
default:
- if (!(MOD_lo_user <= (unsigned char) modifier
+ if (!(MOD_lo_user <= (unsigned char) modifier))
+#if 0
+/* This part of the test would always be true, and it triggers a compiler
+ warning. */
&& (unsigned char) modifier <= MOD_hi_user))
+#endif
{
complaint (&symfile_complaints,
"DIE @ 0x%x \"%s\", unknown type modifier %u", DIE_ID,
@@ -3492,7 +3515,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/elfread.c b/gdb/elfread.c
index 7aee37cc5db..ff766fb7c26 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -177,7 +177,6 @@ elf_symtab_read (struct objfile *objfile, int dynamic)
asymbol **symbol_table;
long number_of_symbols;
long i;
- int index;
struct cleanup *back_to;
CORE_ADDR symaddr;
CORE_ADDR offset;
@@ -372,34 +371,40 @@ elf_symtab_read (struct objfile *objfile, int dynamic)
}
else if (sym->flags & BSF_LOCAL)
{
- /* Named Local variable in a Data section. Check its
- name for stabs-in-elf. The STREQ macro checks the
- first character inline, so we only actually do a
- strcmp function call on names that start with 'B'
- or 'D' */
- index = SECT_OFF_MAX;
- if (STREQ ("Bbss.bss", sym->name))
- {
- index = SECT_OFF_BSS (objfile);
- }
- else if (STREQ ("Ddata.data", sym->name))
- {
- index = SECT_OFF_DATA (objfile);
- }
- else if (STREQ ("Drodata.rodata", sym->name))
- {
- index = SECT_OFF_RODATA (objfile);
- }
- if (index != SECT_OFF_MAX)
+ /* Named Local variable in a Data section.
+ Check its name for stabs-in-elf. The STREQ
+ macro checks the first character inline, so
+ we only actually do a strcmp function call on
+ names that start with 'B' or 'D'. */
+ int special_local_sect;
+ if (strcmp ("Bbss.bss", sym->name) == 0)
+ special_local_sect = SECT_OFF_BSS (objfile);
+ else if (strcmp ("Ddata.data", sym->name) == 0)
+ special_local_sect = SECT_OFF_DATA (objfile);
+ else if (strcmp ("Drodata.rodata", sym->name) == 0)
+ special_local_sect = SECT_OFF_RODATA (objfile);
+ else
+ special_local_sect = -1;
+ if (special_local_sect >= 0)
{
/* Found a special local symbol. Allocate a
sectinfo, if needed, and fill it in. */
if (sectinfo == NULL)
{
+ int max_index;
+ size_t size;
+
+ max_index
+ = max (SECT_OFF_BSS (objfile),
+ max (SECT_OFF_DATA (objfile),
+ SECT_OFF_RODATA (objfile)));
+ size = (sizeof (struct stab_section_info)
+ + (sizeof (CORE_ADDR)
+ * (max_index - 1)));
sectinfo = (struct stab_section_info *)
- xmmalloc (objfile->md, sizeof (*sectinfo));
- memset (sectinfo, 0,
- sizeof (*sectinfo));
+ xmmalloc (objfile->md, size);
+ memset (sectinfo, 0, size);
+ sectinfo->num_sections = max_index;
if (filesym == NULL)
{
complaint (&symfile_complaints,
@@ -412,36 +417,23 @@ elf_symtab_read (struct objfile *objfile, int dynamic)
(char *) filesym->name;
}
}
- if (index != -1)
- {
- if (sectinfo->sections[index] != 0)
- {
- complaint (&symfile_complaints,
- "duplicated elf/stab section information for %s",
- sectinfo->filename);
- }
- }
- else
- internal_error (__FILE__, __LINE__,
- "Section index uninitialized.");
- /* Bfd symbols are section relative. */
+ if (sectinfo->sections[special_local_sect] != 0)
+ complaint (&symfile_complaints,
+ "duplicated elf/stab section information for %s",
+ sectinfo->filename);
+ /* BFD symbols are section relative. */
symaddr = sym->value + sym->section->vma;
- /* Relocate non-absolute symbols by the section offset. */
+ /* Relocate non-absolute symbols by the
+ section offset. */
if (sym->section != &bfd_abs_section)
- {
- symaddr += offset;
- }
- if (index != -1)
- sectinfo->sections[index] = symaddr;
- else
- internal_error (__FILE__, __LINE__,
- "Section index uninitialized.");
+ symaddr += offset;
+ sectinfo->sections[special_local_sect] = symaddr;
/* The special local symbols don't go in the
- minimal symbol table, so ignore this one. */
+ minimal symbol table, so ignore this one. */
continue;
}
/* Not a special stabs-in-elf symbol, do regular
- symbol processing. */
+ symbol processing. */
if (sym->section->flags & SEC_LOAD)
{
ms_type = mst_file_data;
@@ -740,8 +732,9 @@ elfstab_offset_sections (struct objfile *objfile, struct partial_symtab *pst)
/* Found it! Allocate a new psymtab struct, and fill it in. */
maybe->found++;
pst->section_offsets = (struct section_offsets *)
- obstack_alloc (&objfile->psymbol_obstack, SIZEOF_SECTION_OFFSETS);
- for (i = 0; i < SECT_OFF_MAX; i++)
+ obstack_alloc (&objfile->psymbol_obstack,
+ SIZEOF_N_SECTION_OFFSETS (objfile->num_sections));
+ for (i = 0; i < maybe->num_sections; i++)
(pst->section_offsets)->offsets[i] = maybe->sections[i];
return;
}
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 1cbecc92a30..d379f424c70 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
@@ -306,10 +284,10 @@ value_of_register (int regnum, struct frame_info *frame)
/* Convert raw data to virtual format if necessary. */
- if (REGISTER_CONVERTIBLE (regnum))
+ if (DEPRECATED_REGISTER_CONVERTIBLE (regnum))
{
- REGISTER_CONVERT_TO_VIRTUAL (regnum, register_type (current_gdbarch, regnum),
- raw_buffer, VALUE_CONTENTS_RAW (reg_val));
+ DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum, register_type (current_gdbarch, regnum),
+ raw_buffer, VALUE_CONTENTS_RAW (reg_val));
}
else if (REGISTER_RAW_SIZE (regnum) == REGISTER_VIRTUAL_SIZE (regnum))
memcpy (VALUE_CONTENTS_RAW (reg_val), raw_buffer,
@@ -646,152 +624,82 @@ addresses have not been bound by the dynamic loader. Try again when executable i
struct value *
value_from_register (struct type *type, int regnum, struct frame_info *frame)
{
- char raw_buffer[MAX_REGISTER_SIZE];
- CORE_ADDR addr;
- int optim;
+ struct gdbarch *gdbarch = get_frame_arch (frame);
struct value *v = allocate_value (type);
- char *value_bytes = 0;
- int value_bytes_copied = 0;
- int num_storage_locs;
- enum lval_type lval;
- int len;
-
CHECK_TYPEDEF (type);
- len = TYPE_LENGTH (type);
- VALUE_REGNO (v) = regnum;
-
- num_storage_locs = (len > REGISTER_VIRTUAL_SIZE (regnum) ?
- ((len - 1) / REGISTER_RAW_SIZE (regnum)) + 1 :
- 1);
-
- if (num_storage_locs > 1
-#if 0
- // OBSOLETE #ifdef GDB_TARGET_IS_H8500
- // OBSOLETE || TYPE_CODE (type) == TYPE_CODE_PTR
- // OBSOLETE #endif
-#endif
- )
+ if (CONVERT_REGISTER_P (regnum, type))
+ {
+ /* The ISA/ABI need to something weird when obtaining the
+ specified value from this register. It might need to
+ re-order non-adjacent, starting with REGNUM (see MIPS and
+ i386). It might need to convert the [float] register into
+ the corresponding [integer] type (see Alpha). The assumption
+ is that REGISTER_TO_VALUE populates the entire value
+ including the location. */
+ REGISTER_TO_VALUE (frame, regnum, type, VALUE_CONTENTS_RAW (v));
+ VALUE_LVAL (v) = lval_reg_frame_relative;
+ VALUE_FRAME_ID (v) = get_frame_id (frame);
+ VALUE_FRAME_REGNUM (v) = regnum;
+ }
+ else
{
- /* Value spread across multiple storage locations. */
-
int local_regnum;
int mem_stor = 0, reg_stor = 0;
int mem_tracking = 1;
CORE_ADDR last_addr = 0;
CORE_ADDR first_addr = 0;
-
- value_bytes = (char *) alloca (len + MAX_REGISTER_SIZE);
+ int first_realnum = regnum;
+ int len = TYPE_LENGTH (type);
+ int value_bytes_copied;
+ int optimized = 0;
+ char *value_bytes = (char *) alloca (len + MAX_REGISTER_SIZE);
/* Copy all of the data out, whereever it may be. */
-
-#if 0
- // OBSOLETE #ifdef GDB_TARGET_IS_H8500
- // OBSOLETE /* This piece of hideosity is required because the H8500 treats registers
- // OBSOLETE differently depending upon whether they are used as pointers or not. As a
- // OBSOLETE pointer, a register needs to have a page register tacked onto the front.
- // OBSOLETE An alternate way to do this would be to have gcc output different register
- // OBSOLETE numbers for the pointer & non-pointer form of the register. But, it
- // OBSOLETE doesn't, so we're stuck with this. */
- // OBSOLETE
- // OBSOLETE if (TYPE_CODE (type) == TYPE_CODE_PTR
- // OBSOLETE && len > 2)
- // OBSOLETE {
- // OBSOLETE int page_regnum;
- // OBSOLETE
- // OBSOLETE switch (regnum)
- // OBSOLETE {
- // OBSOLETE case R0_REGNUM:
- // OBSOLETE case R1_REGNUM:
- // OBSOLETE case R2_REGNUM:
- // OBSOLETE case R3_REGNUM:
- // OBSOLETE page_regnum = SEG_D_REGNUM;
- // OBSOLETE break;
- // OBSOLETE case R4_REGNUM:
- // OBSOLETE case R5_REGNUM:
- // OBSOLETE page_regnum = SEG_E_REGNUM;
- // OBSOLETE break;
- // OBSOLETE case R6_REGNUM:
- // OBSOLETE case R7_REGNUM:
- // OBSOLETE page_regnum = SEG_T_REGNUM;
- // OBSOLETE break;
- // OBSOLETE }
- // OBSOLETE
- // OBSOLETE value_bytes[0] = 0;
- // OBSOLETE get_saved_register (value_bytes + 1,
- // OBSOLETE &optim,
- // OBSOLETE &addr,
- // OBSOLETE frame,
- // OBSOLETE page_regnum,
- // OBSOLETE &lval);
- // OBSOLETE
- // OBSOLETE if (register_cached (page_regnum) == -1)
- // OBSOLETE return NULL; /* register value not available */
- // OBSOLETE
- // OBSOLETE if (lval == lval_register)
- // OBSOLETE reg_stor++;
- // OBSOLETE else
- // OBSOLETE mem_stor++;
- // OBSOLETE first_addr = addr;
- // OBSOLETE last_addr = addr;
- // OBSOLETE
- // OBSOLETE get_saved_register (value_bytes + 2,
- // OBSOLETE &optim,
- // OBSOLETE &addr,
- // OBSOLETE frame,
- // OBSOLETE regnum,
- // OBSOLETE &lval);
- // OBSOLETE
- // OBSOLETE if (register_cached (regnum) == -1)
- // OBSOLETE return NULL; /* register value not available */
- // OBSOLETE
- // OBSOLETE if (lval == lval_register)
- // OBSOLETE reg_stor++;
- // OBSOLETE else
- // OBSOLETE {
- // OBSOLETE mem_stor++;
- // OBSOLETE mem_tracking = mem_tracking && (addr == last_addr);
- // OBSOLETE }
- // OBSOLETE last_addr = addr;
- // OBSOLETE }
- // OBSOLETE else
- // OBSOLETE #endif /* GDB_TARGET_IS_H8500 */
-#endif
- for (local_regnum = regnum;
- value_bytes_copied < len;
- (value_bytes_copied += REGISTER_RAW_SIZE (local_regnum),
- ++local_regnum))
- {
- int realnum;
- frame_register (frame, local_regnum, &optim, &lval, &addr,
- &realnum, value_bytes + value_bytes_copied);
-
- if (register_cached (local_regnum) == -1)
- return NULL; /* register value not available */
-
- if (regnum == local_regnum)
+ for (local_regnum = regnum, value_bytes_copied = 0;
+ value_bytes_copied < len;
+ (value_bytes_copied += REGISTER_RAW_SIZE (local_regnum),
+ ++local_regnum))
+ {
+ int realnum;
+ int optim;
+ enum lval_type lval;
+ CORE_ADDR addr;
+ frame_register (frame, local_regnum, &optim, &lval, &addr,
+ &realnum, value_bytes + value_bytes_copied);
+ optimized += optim;
+ if (register_cached (local_regnum) == -1)
+ return NULL; /* register value not available */
+
+ if (regnum == local_regnum)
+ {
first_addr = addr;
- if (lval == lval_register)
- reg_stor++;
- else
- {
- mem_stor++;
-
- mem_tracking =
- (mem_tracking
- && (regnum == local_regnum
- || addr == last_addr));
- }
- last_addr = addr;
- }
-
+ first_realnum = realnum;
+ }
+ if (lval == lval_register)
+ reg_stor++;
+ else
+ {
+ mem_stor++;
+
+ mem_tracking = (mem_tracking
+ && (regnum == local_regnum
+ || addr == last_addr));
+ }
+ last_addr = addr;
+ }
+
+ /* FIXME: cagney/2003-06-04: Shouldn't this always use
+ lval_reg_frame_relative? If it doesn't and the register's
+ location changes (say after a resume) then this value is
+ going to have wrong information. */
if ((reg_stor && mem_stor)
|| (mem_stor && !mem_tracking))
/* Mixed storage; all of the hassle we just went through was
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)
@@ -803,67 +711,29 @@ value_from_register (struct type *type, int regnum, struct frame_info *frame)
{
VALUE_LVAL (v) = lval_register;
VALUE_ADDRESS (v) = first_addr;
+ VALUE_REGNO (v) = first_realnum;
}
else
internal_error (__FILE__, __LINE__,
"value_from_register: Value not stored anywhere!");
-
- VALUE_OPTIMIZED_OUT (v) = optim;
-
+
+ VALUE_OPTIMIZED_OUT (v) = optimized;
+
/* Any structure stored in more than one register will always be
- an integral number of registers. Otherwise, you'd need to do
+ an integral number of registers. Otherwise, you need to do
some fiddling with the last register copied here for little
endian machines. */
-
- /* Copy into the contents section of the value. */
- memcpy (VALUE_CONTENTS_RAW (v), value_bytes, len);
-
- /* Finally do any conversion necessary when extracting this
- type from more than one register. */
-#ifdef REGISTER_CONVERT_TO_TYPE
- REGISTER_CONVERT_TO_TYPE (regnum, type, VALUE_CONTENTS_RAW (v));
-#endif
- return v;
- }
-
- /* Data is completely contained within a single register. Locate the
- register's contents in a real register or in core;
- read the data in raw format. */
-
- {
- int realnum;
- frame_register (frame, regnum, &optim, &lval, &addr, &realnum, raw_buffer);
- }
-
- if (register_cached (regnum) == -1)
- return NULL; /* register value not available */
-
- VALUE_OPTIMIZED_OUT (v) = optim;
- VALUE_LVAL (v) = lval;
- VALUE_ADDRESS (v) = addr;
-
- /* Convert the raw register to the corresponding data value's memory
- format, if necessary. */
-
- if (CONVERT_REGISTER_P (regnum))
- {
- REGISTER_TO_VALUE (regnum, type, raw_buffer, VALUE_CONTENTS_RAW (v));
- }
- else
- {
- /* Raw and virtual formats are the same for this register. */
-
- if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG && len < REGISTER_RAW_SIZE (regnum))
- {
- /* Big-endian, and we want less than full size. */
- VALUE_OFFSET (v) = REGISTER_RAW_SIZE (regnum) - len;
- }
-
- memcpy (VALUE_CONTENTS_RAW (v), raw_buffer + VALUE_OFFSET (v), len);
+ if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
+ && len < REGISTER_RAW_SIZE (regnum))
+ /* Big-endian, and we want less than full size. */
+ VALUE_OFFSET (v) = REGISTER_RAW_SIZE (regnum) - len;
+ else
+ VALUE_OFFSET (v) = 0;
+ memcpy (VALUE_CONTENTS_RAW (v), value_bytes + VALUE_OFFSET (v), len);
}
-
return v;
}
+
/* Given a struct symbol for a variable or function,
and a stack frame id,
diff --git a/gdb/frame-base.c b/gdb/frame-base.c
index f7ba4be1903..0865a0ce6c9 100644
--- a/gdb/frame-base.c
+++ b/gdb/frame-base.c
@@ -24,9 +24,9 @@
#include "frame.h"
/* A default frame base implementations. If it wasn't for the old
- FRAME_LOCALS_ADDRESS and FRAME_ARGS_ADDRESS, these could be
- combined into a single function. All architectures really need to
- override this. */
+ DEPRECATED_FRAME_LOCALS_ADDRESS and DEPRECATED_FRAME_ARGS_ADDRESS,
+ these could be combined into a single function. All architectures
+ really need to override this. */
static CORE_ADDR
default_frame_base_address (struct frame_info *next_frame, void **this_cache)
@@ -38,25 +38,25 @@ default_frame_base_address (struct frame_info *next_frame, void **this_cache)
static CORE_ADDR
default_frame_locals_address (struct frame_info *next_frame, void **this_cache)
{
- struct frame_info *this_frame = get_prev_frame (next_frame);
- return FRAME_LOCALS_ADDRESS (this_frame);
+ if (DEPRECATED_FRAME_LOCALS_ADDRESS_P ())
+ {
+ /* This is bad. The computation of per-frame locals address
+ should use a per-frame frame-base. */
+ struct frame_info *this_frame = get_prev_frame (next_frame);
+ return DEPRECATED_FRAME_LOCALS_ADDRESS (this_frame);
+ }
+ return default_frame_base_address (next_frame, this_cache);
}
static CORE_ADDR
default_frame_args_address (struct frame_info *next_frame, void **this_cache)
{
- struct frame_info *this_frame = get_prev_frame (next_frame);
- /* FRAME_ARGS_ADDRESS_CORRECT is just like FRAME_ARGS_ADDRESS except
- that if it is unsure about the answer, it returns 0 instead of
- guessing (this happens on the VAX and i960, for example).
-
- On most machines, we never have to guess about the args address,
- so FRAME_ARGS_ADDRESS{,_CORRECT} are the same. */
-#ifdef FRAME_ARGS_ADDRESS_CORRECT
- return FRAME_ARGS_ADDRESS_CORRECT (this_frame);
-#else
- return FRAME_ARGS_ADDRESS (this_frame);
-#endif
+ if (DEPRECATED_FRAME_ARGS_ADDRESS_P ())
+ {
+ struct frame_info *this_frame = get_prev_frame (next_frame);
+ return DEPRECATED_FRAME_ARGS_ADDRESS (this_frame);
+ }
+ return default_frame_base_address (next_frame, this_cache);
}
const struct frame_base default_frame_base = {
@@ -146,6 +146,8 @@ frame_base_find_by_pc (struct gdbarch *gdbarch, CORE_ADDR pc)
return table->default_base;
}
+extern initialize_file_ftype _initialize_frame_base; /* -Wmissing-prototypes */
+
void
_initialize_frame_base (void)
{
diff --git a/gdb/frame-unwind.c b/gdb/frame-unwind.c
index c72d24a0b23..921d30b31d5 100644
--- a/gdb/frame-unwind.c
+++ b/gdb/frame-unwind.c
@@ -98,6 +98,8 @@ frame_unwind_find_by_pc (struct gdbarch *gdbarch, CORE_ADDR pc)
return legacy_saved_regs_unwind;
}
+extern initialize_file_ftype _initialize_frame_unwind; /* -Wmissing-prototypes */
+
void
_initialize_frame_unwind (void)
{
diff --git a/gdb/frame.c b/gdb/frame.c
index 07e0e5b15b6..eadb77de4c4 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -615,6 +615,41 @@ frame_unwind_register (struct frame_info *frame, int regnum, void *buf)
}
void
+get_frame_register (struct frame_info *frame,
+ int regnum, void *buf)
+{
+ frame_unwind_register (frame->next, regnum, buf);
+}
+
+LONGEST
+frame_unwind_register_signed (struct frame_info *frame, int regnum)
+{
+ char buf[MAX_REGISTER_SIZE];
+ frame_unwind_register (frame, regnum, buf);
+ return extract_signed_integer (buf, REGISTER_VIRTUAL_SIZE (regnum));
+}
+
+LONGEST
+get_frame_register_signed (struct frame_info *frame, int regnum)
+{
+ return frame_unwind_register_signed (frame->next, regnum);
+}
+
+ULONGEST
+frame_unwind_register_unsigned (struct frame_info *frame, int regnum)
+{
+ char buf[MAX_REGISTER_SIZE];
+ frame_unwind_register (frame, regnum, buf);
+ return extract_unsigned_integer (buf, REGISTER_VIRTUAL_SIZE (regnum));
+}
+
+ULONGEST
+get_frame_register_unsigned (struct frame_info *frame, int regnum)
+{
+ return frame_unwind_register_unsigned (frame->next, regnum);
+}
+
+void
frame_unwind_signed_register (struct frame_info *frame, int regnum,
LONGEST *val)
{
@@ -674,33 +709,33 @@ frame_read_signed_register (struct frame_info *frame, int regnum,
}
void
-generic_unwind_get_saved_register (char *raw_buffer,
- int *optimizedp,
- CORE_ADDR *addrp,
- struct frame_info *frame,
- int regnum,
- enum lval_type *lvalp)
-{
- int optimizedx;
- CORE_ADDR addrx;
- int realnumx;
- enum lval_type lvalx;
-
- if (!target_has_registers)
- error ("No registers.");
-
- /* Keep things simple, ensure that all the pointers (except valuep)
- are non NULL. */
- if (optimizedp == NULL)
- optimizedp = &optimizedx;
- if (lvalp == NULL)
- lvalp = &lvalx;
- if (addrp == NULL)
- addrp = &addrx;
-
- gdb_assert (frame != NULL && frame->next != NULL);
- frame_register_unwind (frame->next, regnum, optimizedp, lvalp, addrp,
- &realnumx, raw_buffer);
+put_frame_register (struct frame_info *frame, int regnum, const void *buf)
+{
+ struct gdbarch *gdbarch = get_frame_arch (frame);
+ int realnum;
+ int optim;
+ enum lval_type lval;
+ CORE_ADDR addr;
+ frame_register (frame, regnum, &optim, &lval, &addr, &realnum, NULL);
+ if (optim)
+ error ("Attempt to assign to a value that was optimized out.");
+ switch (lval)
+ {
+ case lval_memory:
+ {
+ /* FIXME: write_memory doesn't yet take constant buffers.
+ Arrrg! */
+ char tmp[MAX_REGISTER_SIZE];
+ memcpy (tmp, buf, register_size (gdbarch, regnum));
+ write_memory (addr, tmp, register_size (gdbarch, regnum));
+ break;
+ }
+ case lval_register:
+ regcache_cooked_write (current_regcache, realnum, buf);
+ break;
+ default:
+ error ("Attempt to assign to an unmodifiable value.");
+ }
}
/* frame_register_read ()
@@ -778,7 +813,7 @@ frame_map_regnum_to_name (int regnum)
/* Create a sentinel frame. */
-struct frame_info *
+static struct frame_info *
create_sentinel_frame (struct regcache *regcache)
{
struct frame_info *frame = FRAME_OBSTACK_ZALLOC (struct frame_info);
@@ -963,14 +998,13 @@ legacy_saved_regs_prev_register (struct frame_info *next_frame,
struct frame_info *frame = next_frame->prev;
gdb_assert (frame != NULL);
- /* Only (older) architectures that implement the
- DEPRECATED_FRAME_INIT_SAVED_REGS method should be using this
- function. */
- gdb_assert (DEPRECATED_FRAME_INIT_SAVED_REGS_P ());
-
- /* Load the saved_regs register cache. */
if (get_frame_saved_regs (frame) == NULL)
- DEPRECATED_FRAME_INIT_SAVED_REGS (frame);
+ {
+ /* If nothing's initialized the saved regs, do it now. */
+ gdb_assert (DEPRECATED_FRAME_INIT_SAVED_REGS_P ());
+ DEPRECATED_FRAME_INIT_SAVED_REGS (frame);
+ gdb_assert (get_frame_saved_regs (frame) != NULL);
+ }
if (get_frame_saved_regs (frame) != NULL
&& get_frame_saved_regs (frame)[regnum] != 0)
@@ -1082,8 +1116,6 @@ deprecated_generic_get_saved_register (char *raw_buffer, int *optimized,
if (!target_has_registers)
error ("No registers.");
- gdb_assert (DEPRECATED_FRAME_INIT_SAVED_REGS_P ());
-
/* Normal systems don't optimize out things with register numbers. */
if (optimized != NULL)
*optimized = 0;
@@ -1237,6 +1269,12 @@ get_next_frame (struct frame_info *this_frame)
return NULL;
}
+struct frame_info *
+deprecated_get_next_frame_hack (struct frame_info *this_frame)
+{
+ return this_frame->next;
+}
+
/* Flush the entire frame cache. */
void
@@ -1373,10 +1411,6 @@ legacy_get_prev_frame (struct frame_info *this_frame)
or some random address on the stack. Trying to use that
PC to apply standard frame ID unwind techniques is just
asking for trouble. */
- /* Assume call_function_by_hand(), via SAVE_DUMMY_FRAME_TOS,
- previously saved the dummy frame's ID. Things only work
- if the two return the same value. */
- gdb_assert (SAVE_DUMMY_FRAME_TOS_P ());
/* Use an architecture specific method to extract the prev's
dummy ID from the next frame. Note that this method uses
frame_register_unwind to obtain the register values
@@ -1475,6 +1509,12 @@ legacy_get_prev_frame (struct frame_info *this_frame)
/* FIXME: 2002-11-09: There isn't any reason to special case this
edge condition. Instead the per-architecture code should hande
it locally. */
+ /* FIXME: cagney/2003-06-16: This returns the inner most stack
+ address for the previous frame, that, however, is wrong. It
+ should be the inner most stack address for the previous to
+ previous frame. This is because it is the previous to previous
+ frame's innermost stack address that is constant through out
+ the lifetime of the previous frame (trust me :-). */
address = get_frame_base (this_frame);
else
{
@@ -1493,8 +1533,29 @@ legacy_get_prev_frame (struct frame_info *this_frame)
this to after the ffi test; I'd rather have backtraces from
start go curfluy than have an abort called from main not show
main. */
- gdb_assert (DEPRECATED_FRAME_CHAIN_P ());
- address = DEPRECATED_FRAME_CHAIN (this_frame);
+ if (DEPRECATED_FRAME_CHAIN_P ())
+ address = DEPRECATED_FRAME_CHAIN (this_frame);
+ else
+ {
+ /* Someone is part way through coverting an old architecture
+ to the new frame code. Implement FRAME_CHAIN the way the
+ new frame will. */
+ /* Find PREV frame's unwinder. */
+ prev->unwind = frame_unwind_find_by_pc (current_gdbarch,
+ frame_pc_unwind (this_frame));
+ /* FIXME: cagney/2003-04-02: Rather than storing the frame's
+ type in the frame, the unwinder's type should be returned
+ directly. Unfortunatly, legacy code, called by
+ legacy_get_prev_frame, explicitly set the frames type
+ using the method deprecated_set_frame_type(). */
+ prev->type = prev->unwind->type;
+ /* Find PREV frame's ID. */
+ prev->unwind->this_id (this_frame,
+ &prev->prologue_cache,
+ &prev->this_id.value);
+ prev->this_id.p = 1;
+ address = prev->this_id.value.stack_addr;
+ }
if (!legacy_frame_chain_valid (address, this_frame))
{
@@ -1637,9 +1698,13 @@ legacy_get_prev_frame (struct frame_info *this_frame)
/* Initialize the code used to unwind the frame PREV based on the PC
(and probably other architectural information). The PC lets you
check things like the debug info at that point (dwarf2cfi?) and
- use that to decide how the frame should be unwound. */
- prev->unwind = frame_unwind_find_by_pc (current_gdbarch,
- get_frame_pc (prev));
+ use that to decide how the frame should be unwound.
+
+ If there isn't a FRAME_CHAIN, the code above will have already
+ done this. */
+ if (prev->unwind == NULL)
+ prev->unwind = frame_unwind_find_by_pc (current_gdbarch,
+ get_frame_pc (prev));
/* If the unwinder provides a frame type, use it. Otherwize
continue on to that heuristic mess. */
@@ -1647,6 +1712,7 @@ legacy_get_prev_frame (struct frame_info *this_frame)
{
prev->type = prev->unwind->type;
if (prev->type == NORMAL_FRAME)
+ /* FIXME: cagney/2003-06-16: would get_frame_pc() be better? */
prev->this_id.value.code_addr
= get_pc_function_start (prev->this_id.value.code_addr);
if (frame_debug)
@@ -1944,11 +2010,11 @@ get_prev_frame (struct frame_info *this_frame)
Doing this makes it possible for the user to examine a frame that
has an invalid frame ID.
- The very old VAX frame_args_address_correct() method noted: [...]
- For the sake of argument, suppose that the stack is somewhat
- trashed (which is one reason that "info frame" exists). So,
- return 0 (indicating we don't know the address of the arglist) if
- we don't know what frame this frame calls. */
+ Some very old VAX code noted: [...] For the sake of argument,
+ suppose that the stack is somewhat trashed (which is one reason
+ that "info frame" exists). So, return 0 (indicating we don't
+ know the address of the arglist) if we don't know what frame this
+ frame calls. */
/* Link it in. */
this_frame->prev = prev_frame;
@@ -2219,6 +2285,68 @@ 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;
+}
+
+/* Stack pointer methods. */
+
+CORE_ADDR
+get_frame_sp (struct frame_info *this_frame)
+{
+ return frame_sp_unwind (this_frame->next);
+}
+
+CORE_ADDR
+frame_sp_unwind (struct frame_info *next_frame)
+{
+ /* Normality, an architecture that provides a way of obtaining any
+ frame inner-most address. */
+ if (gdbarch_unwind_sp_p (current_gdbarch))
+ return gdbarch_unwind_sp (current_gdbarch, next_frame);
+ /* Things are looking grim. If it's the inner-most frame and there
+ is a TARGET_READ_SP then that can be used. */
+ if (next_frame->level < 0 && TARGET_READ_SP_P ())
+ return TARGET_READ_SP ();
+ /* Now things are really are grim. Hope that the value returned by
+ the SP_REGNUM register is meaningful. */
+ if (SP_REGNUM >= 0)
+ {
+ ULONGEST sp;
+ frame_unwind_unsigned_register (next_frame, SP_REGNUM, &sp);
+ return sp;
+ }
+ internal_error (__FILE__, __LINE__, "Missing unwind SP method");
+}
+
+
int
legacy_frame_p (struct gdbarch *current_gdbarch)
{
@@ -2226,10 +2354,11 @@ legacy_frame_p (struct gdbarch *current_gdbarch)
|| DEPRECATED_INIT_FRAME_PC_FIRST_P ()
|| DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()
|| DEPRECATED_FRAME_CHAIN_P ()
- || !gdbarch_unwind_dummy_id_p (current_gdbarch)
- || !SAVE_DUMMY_FRAME_TOS_P ());
+ || !gdbarch_unwind_dummy_id_p (current_gdbarch));
}
+extern initialize_file_ftype _initialize_frame; /* -Wmissing-prototypes */
+
void
_initialize_frame (void)
{
diff --git a/gdb/frame.h b/gdb/frame.h
index ba7d5ada20a..2208a3f767c 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -23,6 +23,47 @@
#if !defined (FRAME_H)
#define FRAME_H 1
+/* The following is the intended naming schema for frame functions.
+ It isn't 100% consistent, but it is aproaching that. Frame naming
+ schema:
+
+ Prefixes:
+
+ get_frame_WHAT...(): Get WHAT from the THIS frame (functionaly
+ equivalent to THIS->next->unwind->what)
+
+ frame_unwind_WHAT...(): Unwind THIS frame's WHAT from the NEXT
+ frame.
+
+ put_frame_WHAT...(): Put a value into this frame (unsafe, need to
+ invalidate the frame / regcache afterwards) (better name more
+ strongly hinting at its unsafeness)
+
+ safe_....(): Safer version of various functions, doesn't throw an
+ error (leave this for later?). Returns non-zero if the fetch
+ succeeds. Return a freshly allocated error message?
+
+ Suffixes:
+
+ void /frame/_WHAT(): Read WHAT's value into the buffer parameter.
+
+ ULONGEST /frame/_WHAT_unsigned(): Return an unsigned value (the
+ alternative is *frame_unsigned_WHAT).
+
+ LONGEST /frame/_WHAT_signed(): Return WHAT signed value.
+
+ What:
+
+ /frame/_memory* (frame, coreaddr, len [, buf]): Extract/return
+ *memory.
+
+ /frame/_register* (frame, regnum [, buf]): extract/return register.
+
+ CORE_ADDR /frame/_{pc,sp,...} (frame): Resume address, innner most
+ stack *address, ...
+
+ */
+
struct symtab_and_line;
struct frame_unwind;
struct frame_base;
@@ -154,6 +195,13 @@ extern void select_frame (struct frame_info *);
extern struct frame_info *get_prev_frame (struct frame_info *);
extern struct frame_info *get_next_frame (struct frame_info *);
+/* Given a FRAME, return the true next (more inner, younger) frame.
+ This one exposes the sentinel frame and, hence, never returns NULL.
+ It is here strictly to help old targets in their migration path to
+ the new frame code - the new code requires the NEXT, and not THIS
+ frame. */
+extern struct frame_info *deprecated_get_next_frame_hack (struct frame_info *);
+
/* Given a frame's ID, relocate the frame. Returns NULL if the frame
is not found. */
extern struct frame_info *frame_find_by_id (struct frame_id id);
@@ -166,6 +214,13 @@ extern struct frame_info *frame_find_by_id (struct frame_id id);
This replaced: frame->pc; */
extern CORE_ADDR get_frame_pc (struct frame_info *);
+/* The frame's inner-most bound. AKA the stack-pointer. Confusingly
+ known as top-of-stack. */
+
+extern CORE_ADDR get_frame_sp (struct frame_info *);
+extern CORE_ADDR frame_sp_unwind (struct frame_info *);
+
+
/* Following on from the `resume' address. Return the entry point
address of the function containing that resume address, or zero if
that function isn't known. */
@@ -289,16 +344,31 @@ extern void frame_register_unwind (struct frame_info *frame, int regnum,
CORE_ADDR *addrp, int *realnump,
void *valuep);
-/* More convenient interface to frame_register_unwind(). */
-/* NOTE: cagney/2002-09-13: Return void as one day these functions may
- be changed to return an indication that the read succeeded. */
+/* Fetch a register from this, or unwind a register from the next
+ frame. Note that the get_frame methods are wrappers to
+ frame->next->unwind. They all [potentially] throw an error if the
+ fetch fails. */
extern void frame_unwind_register (struct frame_info *frame,
int regnum, void *buf);
+extern void get_frame_register (struct frame_info *frame,
+ int regnum, void *buf);
+extern LONGEST frame_unwind_register_signed (struct frame_info *frame,
+ int regnum);
+extern LONGEST get_frame_register_signed (struct frame_info *frame,
+ int regnum);
+extern ULONGEST frame_unwind_register_unsigned (struct frame_info *frame,
+ int regnum);
+extern ULONGEST get_frame_register_unsigned (struct frame_info *frame,
+ int regnum);
+
+
+/* Use frame_unwind_register_signed. */
extern void frame_unwind_signed_register (struct frame_info *frame,
int regnum, LONGEST *val);
+/* Use frame_unwind_register_signed. */
extern void frame_unwind_unsigned_register (struct frame_info *frame,
int regnum, ULONGEST *val);
@@ -316,15 +386,24 @@ extern void frame_register (struct frame_info *frame, int regnum,
/* NOTE: cagney/2002-09-13: Return void as one day these functions may
be changed to return an indication that the read succeeded. */
+/* Use get_frame_register. */
extern void frame_read_register (struct frame_info *frame, int regnum,
void *buf);
+/* Use get_frame_register_signed. */
extern void frame_read_signed_register (struct frame_info *frame,
int regnum, LONGEST *val);
+/* Use get_frame_register_unsigned. */
extern void frame_read_unsigned_register (struct frame_info *frame,
int regnum, ULONGEST *val);
+/* The reverse. Store a register value relative to the specified
+ frame. Note: this call makes the frame's state undefined. The
+ register and frame caches must be flushed. */
+extern void put_frame_register (struct frame_info *frame, int regnum,
+ const void *buf);
+
/* Map between a frame register number and its name. A frame register
space is a superset of the cooked register space --- it also
includes builtin registers. If NAMELEN is negative, use the NAME's
@@ -343,6 +422,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
{
@@ -426,9 +530,6 @@ extern CORE_ADDR get_pc_function_start (CORE_ADDR);
extern int frameless_look_for_prologue (struct frame_info *);
-extern void print_frame_args (struct symbol *, struct frame_info *,
- int, struct ui_file *);
-
extern struct frame_info *find_relative_frame (struct frame_info *, int *);
extern void show_and_print_stack_frame (struct frame_info *fi, int level,
@@ -463,19 +564,10 @@ extern int generic_pc_in_call_dummy (CORE_ADDR pc,
extern char *deprecated_generic_find_dummy_frame (CORE_ADDR pc, CORE_ADDR fp);
-void generic_unwind_get_saved_register (char *raw_buffer,
- int *optimizedp,
- CORE_ADDR *addrp,
- struct frame_info *frame,
- int regnum,
- enum lval_type *lvalp);
-
-/* The function generic_get_saved_register() has been made obsolete.
- DEPRECATED_GET_SAVED_REGISTER now defaults to the recursive
- equivalent - generic_unwind_get_saved_register() - so there is no
- need to even set DEPRECATED_GET_SAVED_REGISTER. Architectures that
- need to override the register unwind mechanism should modify
- frame->unwind(). */
+
+/* The DEPRECATED_GET_SAVED_REGISTER architecture interface is
+ entirely redundant. New architectures should implement per-frame
+ unwinders (ref "frame-unwind.h"). */
extern void deprecated_generic_get_saved_register (char *, int *, CORE_ADDR *,
struct frame_info *, int,
enum lval_type *);
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
index c26af4d28ee..e4dc885276e 100644
--- a/gdb/frv-tdep.c
+++ b/gdb/frv-tdep.c
@@ -30,15 +30,10 @@ extern void _initialize_frv_tdep (void);
static gdbarch_init_ftype frv_gdbarch_init;
static gdbarch_register_name_ftype frv_register_name;
-static gdbarch_register_raw_size_ftype frv_register_raw_size;
-static gdbarch_register_virtual_size_ftype frv_register_virtual_size;
-static gdbarch_register_virtual_type_ftype frv_register_virtual_type;
-static gdbarch_register_byte_ftype frv_register_byte;
static gdbarch_breakpoint_from_pc_ftype frv_breakpoint_from_pc;
static gdbarch_skip_prologue_ftype frv_skip_prologue;
static gdbarch_deprecated_extract_return_value_ftype frv_extract_return_value;
static gdbarch_deprecated_extract_struct_value_address_ftype frv_extract_struct_value_address;
-static gdbarch_use_struct_convention_ftype frv_use_struct_convention;
static gdbarch_frameless_function_invocation_ftype frv_frameless_function_invocation;
static gdbarch_init_extra_frame_info_ftype stupid_useless_init_extra_frame_info;
static gdbarch_push_arguments_ftype frv_push_arguments;
@@ -738,18 +733,6 @@ frv_frame_init_saved_regs (struct frame_info *frame)
}
}
-/* Should we use EXTRACT_STRUCT_VALUE_ADDRESS instead of
- EXTRACT_RETURN_VALUE? GCC_P is true if compiled with gcc
- and TYPE is the type (which is known to be struct, union or array).
-
- The frv returns all structs in memory. */
-
-static int
-frv_use_struct_convention (int gcc_p, struct type *type)
-{
- return 1;
-}
-
static void
frv_extract_return_value (struct type *type, char *regbuf, char *valbuf)
{
@@ -762,8 +745,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 +842,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);
@@ -1059,17 +1042,16 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_name (gdbarch, frv_register_name);
set_gdbarch_deprecated_register_size (gdbarch, 4);
set_gdbarch_deprecated_register_bytes (gdbarch, frv_num_regs * 4);
- set_gdbarch_register_byte (gdbarch, frv_register_byte);
- set_gdbarch_register_raw_size (gdbarch, frv_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, frv_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, frv_register_raw_size);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, 4);
- set_gdbarch_register_virtual_size (gdbarch, frv_register_virtual_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, frv_register_virtual_size);
set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 4);
- set_gdbarch_register_virtual_type (gdbarch, frv_register_virtual_type);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, frv_register_virtual_type);
set_gdbarch_skip_prologue (gdbarch, frv_skip_prologue);
set_gdbarch_breakpoint_from_pc (gdbarch, frv_breakpoint_from_pc);
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
set_gdbarch_frame_args_skip (gdbarch, 0);
set_gdbarch_frameless_function_invocation (gdbarch, frv_frameless_function_invocation);
@@ -1080,7 +1062,7 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, frv_frame_init_saved_regs);
- set_gdbarch_use_struct_convention (gdbarch, frv_use_struct_convention);
+ set_gdbarch_use_struct_convention (gdbarch, always_use_struct_convention);
set_gdbarch_deprecated_extract_return_value (gdbarch, frv_extract_return_value);
set_gdbarch_deprecated_store_struct_return (gdbarch, frv_store_struct_return);
@@ -1099,16 +1081,13 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Settings that should be unnecessary. */
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
- set_gdbarch_read_pc (gdbarch, generic_target_read_pc);
set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
- set_gdbarch_read_sp (gdbarch, generic_target_read_sp);
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
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-stabs.h b/gdb/gdb-stabs.h
index abe2d3365b6..097f9d94384 100644
--- a/gdb/gdb-stabs.h
+++ b/gdb/gdb-stabs.h
@@ -29,8 +29,6 @@
#if !defined (GDBSTABS_H)
#define GDBSTABS_H
-#define SECT_OFF_MAX 64 /* Count of possible values */
-
/* The stab_section_info chain remembers info from the ELF symbol table,
while psymtabs are being built for the other symbol tables in the
objfile. It is destroyed at the complation of psymtab-reading.
@@ -39,9 +37,10 @@
struct stab_section_info
{
char *filename;
- CORE_ADDR sections[SECT_OFF_MAX];
struct stab_section_info *next;
int found; /* Count of times it's found in searching */
+ size_t num_sections;
+ CORE_ADDR sections[1];
};
/* Information is passed among various dbxread routines for accessing
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..87585dd42c6 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -147,16 +147,13 @@ struct gdbarch
int char_signed;
gdbarch_read_pc_ftype *read_pc;
gdbarch_write_pc_ftype *write_pc;
- gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp;
gdbarch_read_sp_ftype *read_sp;
- gdbarch_deprecated_dummy_write_sp_ftype *deprecated_dummy_write_sp;
gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
gdbarch_pseudo_register_read_ftype *pseudo_register_read;
gdbarch_pseudo_register_write_ftype *pseudo_register_write;
int num_regs;
int num_pseudo_regs;
int sp_regnum;
- int deprecated_fp_regnum;
int pc_regnum;
int ps_regnum;
int fp0_regnum;
@@ -167,44 +164,54 @@ struct gdbarch
gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
gdbarch_register_name_ftype *register_name;
- int deprecated_register_size;
+ gdbarch_register_type_ftype *register_type;
+ gdbarch_deprecated_register_virtual_type_ftype *deprecated_register_virtual_type;
int deprecated_register_bytes;
- gdbarch_register_byte_ftype *register_byte;
- gdbarch_register_raw_size_ftype *register_raw_size;
+ gdbarch_deprecated_register_byte_ftype *deprecated_register_byte;
+ gdbarch_deprecated_register_raw_size_ftype *deprecated_register_raw_size;
+ gdbarch_deprecated_register_virtual_size_ftype *deprecated_register_virtual_size;
int deprecated_max_register_raw_size;
- gdbarch_register_virtual_size_ftype *register_virtual_size;
int deprecated_max_register_virtual_size;
- gdbarch_register_virtual_type_ftype *register_virtual_type;
- gdbarch_register_type_ftype *register_type;
- gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info;
- gdbarch_print_registers_info_ftype *print_registers_info;
- gdbarch_print_float_info_ftype *print_float_info;
- gdbarch_print_vector_info_ftype *print_vector_info;
- gdbarch_register_sim_regno_ftype *register_sim_regno;
- gdbarch_register_bytes_ok_ftype *register_bytes_ok;
- gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
- gdbarch_cannot_store_register_ftype *cannot_store_register;
- gdbarch_get_longjmp_target_ftype *get_longjmp_target;
+ gdbarch_unwind_dummy_id_ftype *unwind_dummy_id;
+ gdbarch_deprecated_save_dummy_frame_tos_ftype *deprecated_save_dummy_frame_tos;
+ int deprecated_fp_regnum;
+ gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp;
+ gdbarch_push_dummy_call_ftype *push_dummy_call;
+ gdbarch_deprecated_push_arguments_ftype *deprecated_push_arguments;
int deprecated_use_generic_dummy_frames;
+ gdbarch_deprecated_push_return_address_ftype *deprecated_push_return_address;
+ gdbarch_deprecated_dummy_write_sp_ftype *deprecated_dummy_write_sp;
+ int deprecated_register_size;
int call_dummy_location;
gdbarch_call_dummy_address_ftype *call_dummy_address;
CORE_ADDR deprecated_call_dummy_start_offset;
CORE_ADDR deprecated_call_dummy_breakpoint_offset;
int deprecated_call_dummy_length;
- gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy;
LONGEST * deprecated_call_dummy_words;
int deprecated_sizeof_call_dummy_words;
int deprecated_call_dummy_stack_adjust;
gdbarch_deprecated_fix_call_dummy_ftype *deprecated_fix_call_dummy;
gdbarch_push_dummy_code_ftype *push_dummy_code;
+ gdbarch_deprecated_push_dummy_frame_ftype *deprecated_push_dummy_frame;
+ int deprecated_extra_stack_alignment_needed;
+ gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info;
+ gdbarch_print_registers_info_ftype *print_registers_info;
+ gdbarch_print_float_info_ftype *print_float_info;
+ gdbarch_print_vector_info_ftype *print_vector_info;
+ gdbarch_register_sim_regno_ftype *register_sim_regno;
+ gdbarch_register_bytes_ok_ftype *register_bytes_ok;
+ gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
+ gdbarch_cannot_store_register_ftype *cannot_store_register;
+ gdbarch_get_longjmp_target_ftype *get_longjmp_target;
+ gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy;
gdbarch_deprecated_init_frame_pc_first_ftype *deprecated_init_frame_pc_first;
gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc;
int believe_pcc_promotion;
int believe_pcc_promotion_type;
gdbarch_deprecated_get_saved_register_ftype *deprecated_get_saved_register;
- gdbarch_register_convertible_ftype *register_convertible;
- gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual;
- gdbarch_register_convert_to_raw_ftype *register_convert_to_raw;
+ gdbarch_deprecated_register_convertible_ftype *deprecated_register_convertible;
+ gdbarch_deprecated_register_convert_to_virtual_ftype *deprecated_register_convert_to_virtual;
+ gdbarch_deprecated_register_convert_to_raw_ftype *deprecated_register_convert_to_raw;
gdbarch_convert_register_p_ftype *convert_register_p;
gdbarch_register_to_value_ftype *register_to_value;
gdbarch_value_to_register_ftype *value_to_register;
@@ -212,10 +219,6 @@ struct gdbarch
gdbarch_address_to_pointer_ftype *address_to_pointer;
gdbarch_integer_to_address_ftype *integer_to_address;
gdbarch_return_value_on_stack_ftype *return_value_on_stack;
- gdbarch_deprecated_push_arguments_ftype *deprecated_push_arguments;
- gdbarch_push_dummy_call_ftype *push_dummy_call;
- gdbarch_deprecated_push_dummy_frame_ftype *deprecated_push_dummy_frame;
- gdbarch_deprecated_push_return_address_ftype *deprecated_push_return_address;
gdbarch_deprecated_pop_frame_ftype *deprecated_pop_frame;
gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return;
gdbarch_extract_return_value_ftype *extract_return_value;
@@ -234,7 +237,6 @@ struct gdbarch
gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
CORE_ADDR decr_pc_after_break;
- gdbarch_prepare_to_proceed_ftype *prepare_to_proceed;
CORE_ADDR function_start_offset;
gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
CORE_ADDR frame_args_skip;
@@ -243,16 +245,14 @@ struct gdbarch
gdbarch_deprecated_frame_chain_valid_ftype *deprecated_frame_chain_valid;
gdbarch_deprecated_frame_saved_pc_ftype *deprecated_frame_saved_pc;
gdbarch_unwind_pc_ftype *unwind_pc;
- gdbarch_frame_args_address_ftype *frame_args_address;
- gdbarch_frame_locals_address_ftype *frame_locals_address;
+ gdbarch_unwind_sp_ftype *unwind_sp;
+ gdbarch_deprecated_frame_args_address_ftype *deprecated_frame_args_address;
+ gdbarch_deprecated_frame_locals_address_ftype *deprecated_frame_locals_address;
gdbarch_deprecated_saved_pc_after_call_ftype *deprecated_saved_pc_after_call;
gdbarch_frame_num_args_ftype *frame_num_args;
gdbarch_stack_align_ftype *stack_align;
gdbarch_frame_align_ftype *frame_align;
- int deprecated_extra_stack_alignment_needed;
gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr;
- gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos;
- gdbarch_unwind_dummy_id_ftype *unwind_dummy_id;
int parm_boundary;
const struct floatformat * float_format;
const struct floatformat * double_format;
@@ -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;
};
@@ -292,160 +293,161 @@ struct gdbarch startup_gdbarch =
{
1, /* Always initialized. */
/* basic architecture information */
- &bfd_default_arch_struct,
- BFD_ENDIAN_BIG,
- GDB_OSABI_UNKNOWN,
+ &bfd_default_arch_struct, /* bfd_arch_info */
+ BFD_ENDIAN_BIG, /* byte_order */
+ GDB_OSABI_UNKNOWN, /* osabi */
/* target specific vector and its dump routine */
NULL, NULL,
/*per-architecture data-pointers and swap regions */
0, NULL, NULL,
/* Multi-arch values */
- 8 * sizeof (short),
- 8 * sizeof (int),
- 8 * sizeof (long),
- 8 * sizeof (LONGEST),
- 8 * sizeof (float),
- 8 * sizeof (double),
- 8 * sizeof (long double),
- 8 * sizeof (void*),
- 8 * sizeof (void*),
- 8 * sizeof (void*),
- 1,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- -1,
- -1,
- -1,
- -1,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- generic_register_byte,
- generic_register_size,
- 0,
- generic_register_size,
- 0,
- 0,
- 0,
- 0,
- default_print_registers_info,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- generic_pc_in_call_dummy,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- generic_remote_translate_xfer_address,
- 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,
- generic_in_function_epilogue_p,
- construct_inferior_arguments,
- 0,
- 0,
- 0,
- "malloc",
- 0,
- 0,
- 0,
- 0,
- 0,
- default_register_reggroup_p,
+ 8 * sizeof (short), /* short_bit */
+ 8 * sizeof (int), /* int_bit */
+ 8 * sizeof (long), /* long_bit */
+ 8 * sizeof (LONGEST), /* long_long_bit */
+ 8 * sizeof (float), /* float_bit */
+ 8 * sizeof (double), /* double_bit */
+ 8 * sizeof (long double), /* long_double_bit */
+ 8 * sizeof (void*), /* ptr_bit */
+ 8 * sizeof (void*), /* addr_bit */
+ 8 * sizeof (void*), /* bfd_vma_bit */
+ 1, /* char_signed */
+ 0, /* read_pc */
+ 0, /* write_pc */
+ 0, /* read_sp */
+ 0, /* virtual_frame_pointer */
+ 0, /* pseudo_register_read */
+ 0, /* pseudo_register_write */
+ 0, /* num_regs */
+ 0, /* num_pseudo_regs */
+ -1, /* sp_regnum */
+ -1, /* pc_regnum */
+ -1, /* ps_regnum */
+ 0, /* fp0_regnum */
+ 0, /* npc_regnum */
+ 0, /* stab_reg_to_regnum */
+ 0, /* ecoff_reg_to_regnum */
+ 0, /* dwarf_reg_to_regnum */
+ 0, /* sdb_reg_to_regnum */
+ 0, /* dwarf2_reg_to_regnum */
+ 0, /* register_name */
+ 0, /* register_type */
+ 0, /* deprecated_register_virtual_type */
+ 0, /* deprecated_register_bytes */
+ generic_register_byte, /* deprecated_register_byte */
+ generic_register_size, /* deprecated_register_raw_size */
+ generic_register_size, /* deprecated_register_virtual_size */
+ 0, /* deprecated_max_register_raw_size */
+ 0, /* deprecated_max_register_virtual_size */
+ 0, /* unwind_dummy_id */
+ 0, /* deprecated_save_dummy_frame_tos */
+ -1, /* deprecated_fp_regnum */
+ 0, /* deprecated_target_read_fp */
+ 0, /* push_dummy_call */
+ 0, /* deprecated_push_arguments */
+ 0, /* deprecated_use_generic_dummy_frames */
+ 0, /* deprecated_push_return_address */
+ 0, /* deprecated_dummy_write_sp */
+ 0, /* deprecated_register_size */
+ 0, /* call_dummy_location */
+ 0, /* call_dummy_address */
+ 0, /* deprecated_call_dummy_start_offset */
+ 0, /* deprecated_call_dummy_breakpoint_offset */
+ 0, /* deprecated_call_dummy_length */
+ 0, /* deprecated_call_dummy_words */
+ 0, /* deprecated_sizeof_call_dummy_words */
+ 0, /* deprecated_call_dummy_stack_adjust */
+ 0, /* deprecated_fix_call_dummy */
+ 0, /* push_dummy_code */
+ 0, /* deprecated_push_dummy_frame */
+ 0, /* deprecated_extra_stack_alignment_needed */
+ 0, /* deprecated_do_registers_info */
+ default_print_registers_info, /* print_registers_info */
+ 0, /* print_float_info */
+ 0, /* print_vector_info */
+ 0, /* register_sim_regno */
+ 0, /* register_bytes_ok */
+ 0, /* cannot_fetch_register */
+ 0, /* cannot_store_register */
+ 0, /* get_longjmp_target */
+ generic_pc_in_call_dummy, /* deprecated_pc_in_call_dummy */
+ 0, /* deprecated_init_frame_pc_first */
+ 0, /* deprecated_init_frame_pc */
+ 0, /* believe_pcc_promotion */
+ 0, /* believe_pcc_promotion_type */
+ 0, /* deprecated_get_saved_register */
+ 0, /* deprecated_register_convertible */
+ 0, /* deprecated_register_convert_to_virtual */
+ 0, /* deprecated_register_convert_to_raw */
+ 0, /* convert_register_p */
+ 0, /* register_to_value */
+ 0, /* value_to_register */
+ 0, /* pointer_to_address */
+ 0, /* address_to_pointer */
+ 0, /* integer_to_address */
+ 0, /* return_value_on_stack */
+ 0, /* deprecated_pop_frame */
+ 0, /* deprecated_store_struct_return */
+ 0, /* extract_return_value */
+ 0, /* store_return_value */
+ 0, /* deprecated_extract_return_value */
+ 0, /* deprecated_store_return_value */
+ 0, /* extract_struct_value_address */
+ 0, /* deprecated_extract_struct_value_address */
+ 0, /* use_struct_convention */
+ 0, /* deprecated_frame_init_saved_regs */
+ 0, /* deprecated_init_extra_frame_info */
+ 0, /* skip_prologue */
+ 0, /* prologue_frameless_p */
+ 0, /* inner_than */
+ 0, /* breakpoint_from_pc */
+ 0, /* memory_insert_breakpoint */
+ 0, /* memory_remove_breakpoint */
+ 0, /* decr_pc_after_break */
+ 0, /* function_start_offset */
+ generic_remote_translate_xfer_address, /* remote_translate_xfer_address */
+ 0, /* frame_args_skip */
+ 0, /* frameless_function_invocation */
+ 0, /* deprecated_frame_chain */
+ 0, /* deprecated_frame_chain_valid */
+ 0, /* deprecated_frame_saved_pc */
+ 0, /* unwind_pc */
+ 0, /* unwind_sp */
+ get_frame_base, /* deprecated_frame_args_address */
+ get_frame_base, /* deprecated_frame_locals_address */
+ 0, /* deprecated_saved_pc_after_call */
+ 0, /* frame_num_args */
+ 0, /* stack_align */
+ 0, /* frame_align */
+ 0, /* reg_struct_has_addr */
+ 0, /* parm_boundary */
+ 0, /* float_format */
+ 0, /* double_format */
+ 0, /* long_double_format */
+ 0, /* convert_from_func_ptr_addr */
+ 0, /* addr_bits_remove */
+ 0, /* smash_text_address */
+ 0, /* software_single_step */
+ 0, /* print_insn */
+ 0, /* skip_trampoline_code */
+ 0, /* in_solib_call_trampoline */
+ 0, /* in_solib_return_trampoline */
+ 0, /* pc_in_sigtramp */
+ 0, /* sigtramp_start */
+ 0, /* sigtramp_end */
+ generic_in_function_epilogue_p, /* in_function_epilogue_p */
+ construct_inferior_arguments, /* construct_inferior_arguments */
+ 0, /* dwarf2_build_frame_info */
+ 0, /* elf_make_msymbol_special */
+ 0, /* coff_make_msymbol_special */
+ "malloc", /* name_of_malloc */
+ 0, /* cannot_step_breakpoint */
+ 0, /* have_nonsteppable_watchpoint */
+ 0, /* address_class_type_flags */
+ 0, /* address_class_type_flags_to_name */
+ 0, /* address_class_name_to_type_flags */
+ default_register_reggroup_p, /* register_reggroup_p */
+ 0, /* fetch_pointer_argument */
/* startup_gdbarch() */
};
@@ -499,13 +501,10 @@ gdbarch_alloc (const struct gdbarch_info *info,
current_gdbarch->ptr_bit = TARGET_INT_BIT;
current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
current_gdbarch->char_signed = -1;
- current_gdbarch->read_pc = generic_target_read_pc;
current_gdbarch->write_pc = generic_target_write_pc;
- current_gdbarch->read_sp = generic_target_read_sp;
current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
current_gdbarch->num_regs = -1;
current_gdbarch->sp_regnum = -1;
- current_gdbarch->deprecated_fp_regnum = -1;
current_gdbarch->pc_regnum = -1;
current_gdbarch->ps_regnum = -1;
current_gdbarch->fp0_regnum = -1;
@@ -516,20 +515,21 @@ gdbarch_alloc (const struct gdbarch_info *info,
current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
current_gdbarch->register_name = legacy_register_name;
- current_gdbarch->register_byte = generic_register_byte;
- current_gdbarch->register_raw_size = generic_register_size;
- current_gdbarch->register_virtual_size = generic_register_size;
- current_gdbarch->print_registers_info = default_print_registers_info;
- current_gdbarch->register_sim_regno = legacy_register_sim_regno;
- current_gdbarch->cannot_fetch_register = cannot_register_not;
- current_gdbarch->cannot_store_register = cannot_register_not;
+ current_gdbarch->deprecated_register_byte = generic_register_byte;
+ current_gdbarch->deprecated_register_raw_size = generic_register_size;
+ current_gdbarch->deprecated_register_virtual_size = generic_register_size;
+ current_gdbarch->deprecated_fp_regnum = -1;
current_gdbarch->deprecated_use_generic_dummy_frames = 1;
current_gdbarch->call_dummy_location = AT_ENTRY_POINT;
current_gdbarch->call_dummy_address = entry_point_address;
- current_gdbarch->deprecated_pc_in_call_dummy = generic_pc_in_call_dummy;
current_gdbarch->deprecated_call_dummy_words = legacy_call_dummy_words;
current_gdbarch->deprecated_sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
- current_gdbarch->register_convertible = generic_register_convertible_not;
+ current_gdbarch->print_registers_info = default_print_registers_info;
+ current_gdbarch->register_sim_regno = legacy_register_sim_regno;
+ current_gdbarch->cannot_fetch_register = cannot_register_not;
+ current_gdbarch->cannot_store_register = cannot_register_not;
+ current_gdbarch->deprecated_pc_in_call_dummy = generic_pc_in_call_dummy;
+ current_gdbarch->deprecated_register_convertible = deprecated_register_convertible_not;
current_gdbarch->convert_register_p = legacy_convert_register_p;
current_gdbarch->register_to_value = legacy_register_to_value;
current_gdbarch->value_to_register = legacy_value_to_register;
@@ -543,13 +543,12 @@ gdbarch_alloc (const struct gdbarch_info *info,
current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
current_gdbarch->decr_pc_after_break = -1;
- current_gdbarch->prepare_to_proceed = default_prepare_to_proceed;
current_gdbarch->function_start_offset = -1;
current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
current_gdbarch->frame_args_skip = -1;
current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
- current_gdbarch->frame_args_address = get_frame_base;
- current_gdbarch->frame_locals_address = get_frame_base;
+ current_gdbarch->deprecated_frame_args_address = get_frame_base;
+ current_gdbarch->deprecated_frame_locals_address = get_frame_base;
current_gdbarch->convert_from_func_ptr_addr = core_addr_identity;
current_gdbarch->addr_bits_remove = core_addr_identity;
current_gdbarch->smash_text_address = core_addr_identity;
@@ -618,11 +617,9 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of bfd_vma_bit, invalid_p == 0 */
if (gdbarch->char_signed == -1)
gdbarch->char_signed = 1;
- /* Skip verify of read_pc, invalid_p == 0 */
+ /* Skip verify of read_pc, has predicate */
/* Skip verify of write_pc, invalid_p == 0 */
- /* Skip verify of deprecated_target_read_fp, has predicate */
- /* Skip verify of read_sp, invalid_p == 0 */
- /* Skip verify of deprecated_dummy_write_sp, has predicate */
+ /* Skip verify of read_sp, has predicate */
/* Skip verify of virtual_frame_pointer, invalid_p == 0 */
/* Skip verify of pseudo_register_read, has predicate */
/* Skip verify of pseudo_register_write, has predicate */
@@ -631,7 +628,6 @@ verify_gdbarch (struct gdbarch *gdbarch)
fprintf_unfiltered (log, "\n\tnum_regs");
/* Skip verify of num_pseudo_regs, invalid_p == 0 */
/* Skip verify of sp_regnum, invalid_p == 0 */
- /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
/* Skip verify of pc_regnum, invalid_p == 0 */
/* Skip verify of ps_regnum, invalid_p == 0 */
/* Skip verify of fp0_regnum, invalid_p == 0 */
@@ -642,13 +638,31 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
/* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
/* Skip verify of register_name, invalid_p == 0 */
- /* Skip verify of register_byte, has predicate */
- /* Skip verify of register_raw_size, invalid_p == 0 */
+ /* Skip verify of register_type, has predicate */
+ /* Skip verify of deprecated_register_virtual_type, has predicate */
+ /* Skip verify of deprecated_register_byte, has predicate */
+ /* Skip verify of deprecated_register_raw_size, invalid_p == 0 */
+ /* Skip verify of deprecated_register_virtual_size, invalid_p == 0 */
/* Skip verify of deprecated_max_register_raw_size, has predicate */
- /* Skip verify of register_virtual_size, invalid_p == 0 */
/* Skip verify of deprecated_max_register_virtual_size, has predicate */
- /* Skip verify of register_virtual_type, has predicate */
- /* Skip verify of register_type, has predicate */
+ /* Skip verify of unwind_dummy_id, has predicate */
+ /* Skip verify of deprecated_save_dummy_frame_tos, has predicate */
+ /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
+ /* Skip verify of deprecated_target_read_fp, has predicate */
+ /* Skip verify of push_dummy_call, has predicate */
+ /* Skip verify of deprecated_push_arguments, has predicate */
+ /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
+ /* Skip verify of deprecated_push_return_address, has predicate */
+ /* Skip verify of deprecated_dummy_write_sp, has predicate */
+ /* Skip verify of call_dummy_location, invalid_p == 0 */
+ /* Skip verify of call_dummy_address, invalid_p == 0 */
+ /* Skip verify of deprecated_call_dummy_words, invalid_p == 0 */
+ /* Skip verify of deprecated_sizeof_call_dummy_words, invalid_p == 0 */
+ /* Skip verify of deprecated_call_dummy_stack_adjust, has predicate */
+ /* Skip verify of deprecated_fix_call_dummy, has predicate */
+ /* Skip verify of push_dummy_code, has predicate */
+ /* Skip verify of deprecated_push_dummy_frame, has predicate */
+ /* Skip verify of deprecated_extra_stack_alignment_needed, invalid_p == 0 */
/* Skip verify of deprecated_do_registers_info, has predicate */
/* Skip verify of print_registers_info, invalid_p == 0 */
/* Skip verify of print_float_info, has predicate */
@@ -658,21 +672,13 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of cannot_fetch_register, invalid_p == 0 */
/* Skip verify of cannot_store_register, invalid_p == 0 */
/* Skip verify of get_longjmp_target, has predicate */
- /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
- /* Skip verify of call_dummy_location, invalid_p == 0 */
- /* Skip verify of call_dummy_address, invalid_p == 0 */
/* Skip verify of deprecated_pc_in_call_dummy, has predicate */
- /* Skip verify of deprecated_call_dummy_words, invalid_p == 0 */
- /* Skip verify of deprecated_sizeof_call_dummy_words, invalid_p == 0 */
- /* Skip verify of deprecated_call_dummy_stack_adjust, has predicate */
- /* Skip verify of deprecated_fix_call_dummy, has predicate */
- /* Skip verify of push_dummy_code, has predicate */
/* Skip verify of deprecated_init_frame_pc_first, has predicate */
/* Skip verify of deprecated_init_frame_pc, has predicate */
/* Skip verify of deprecated_get_saved_register, has predicate */
- /* Skip verify of register_convertible, invalid_p == 0 */
- /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
- /* Skip verify of register_convert_to_raw, invalid_p == 0 */
+ /* Skip verify of deprecated_register_convertible, invalid_p == 0 */
+ /* Skip verify of deprecated_register_convert_to_virtual, invalid_p == 0 */
+ /* Skip verify of deprecated_register_convert_to_raw, invalid_p == 0 */
/* Skip verify of convert_register_p, invalid_p == 0 */
/* Skip verify of register_to_value, invalid_p == 0 */
/* Skip verify of value_to_register, invalid_p == 0 */
@@ -680,10 +686,6 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of address_to_pointer, invalid_p == 0 */
/* Skip verify of integer_to_address, has predicate */
/* Skip verify of return_value_on_stack, invalid_p == 0 */
- /* Skip verify of deprecated_push_arguments, has predicate */
- /* Skip verify of push_dummy_call, has predicate */
- /* Skip verify of deprecated_push_dummy_frame, has predicate */
- /* Skip verify of deprecated_push_return_address, has predicate */
/* Skip verify of deprecated_pop_frame, has predicate */
/* Skip verify of deprecated_store_struct_return, has predicate */
/* Skip verify of extract_return_value, invalid_p == 0 */
@@ -708,7 +710,6 @@ verify_gdbarch (struct gdbarch *gdbarch)
if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
&& (gdbarch->decr_pc_after_break == -1))
fprintf_unfiltered (log, "\n\tdecr_pc_after_break");
- /* Skip verify of prepare_to_proceed, invalid_p == 0 */
if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
&& (gdbarch->function_start_offset == -1))
fprintf_unfiltered (log, "\n\tfunction_start_offset");
@@ -721,18 +722,14 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of deprecated_frame_chain_valid, has predicate */
/* Skip verify of deprecated_frame_saved_pc, has predicate */
/* Skip verify of unwind_pc, has predicate */
- /* Skip verify of frame_args_address, invalid_p == 0 */
- /* Skip verify of frame_locals_address, invalid_p == 0 */
+ /* Skip verify of unwind_sp, has predicate */
+ /* Skip verify of deprecated_frame_args_address, has predicate */
+ /* Skip verify of deprecated_frame_locals_address, has predicate */
/* Skip verify of deprecated_saved_pc_after_call, has predicate */
- if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- && (gdbarch->frame_num_args == 0))
- fprintf_unfiltered (log, "\n\tframe_num_args");
+ /* Skip verify of frame_num_args, has predicate */
/* Skip verify of stack_align, has predicate */
/* Skip verify of frame_align, has predicate */
- /* Skip verify of deprecated_extra_stack_alignment_needed, invalid_p == 0 */
/* Skip verify of reg_struct_has_addr, has predicate */
- /* Skip verify of save_dummy_frame_tos, has predicate */
- /* Skip verify of unwind_dummy_id, has predicate */
if (gdbarch->float_format == 0)
gdbarch->float_format = default_float_format (gdbarch);
if (gdbarch->double_format == 0)
@@ -762,6 +759,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)
@@ -987,8 +985,8 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
#ifdef CONVERT_REGISTER_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
- "CONVERT_REGISTER_P(regnum)",
- XSTRING (CONVERT_REGISTER_P (regnum)));
+ "CONVERT_REGISTER_P(regnum, type)",
+ XSTRING (CONVERT_REGISTER_P (regnum, type)));
if (GDB_MULTI_ARCH)
fprintf_unfiltered (file,
"gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
@@ -1171,6 +1169,26 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
"gdbarch_dump: DEPRECATED_FP_REGNUM = %d\n",
DEPRECATED_FP_REGNUM);
#endif
+#ifdef DEPRECATED_FRAME_ARGS_ADDRESS_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_FRAME_ARGS_ADDRESS_P()",
+ XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS_P ()));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS_P() = %d\n",
+ DEPRECATED_FRAME_ARGS_ADDRESS_P ());
+#endif
+#ifdef DEPRECATED_FRAME_ARGS_ADDRESS
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_FRAME_ARGS_ADDRESS(fi)",
+ XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS (fi)));
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS = <0x%08lx>\n",
+ (long) current_gdbarch->deprecated_frame_args_address
+ /*DEPRECATED_FRAME_ARGS_ADDRESS ()*/);
+#endif
#ifdef DEPRECATED_FRAME_CHAIN_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -1234,6 +1252,26 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->deprecated_frame_init_saved_regs
/*DEPRECATED_FRAME_INIT_SAVED_REGS ()*/);
#endif
+#ifdef DEPRECATED_FRAME_LOCALS_ADDRESS_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_FRAME_LOCALS_ADDRESS_P()",
+ XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS_P ()));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS_P() = %d\n",
+ DEPRECATED_FRAME_LOCALS_ADDRESS_P ());
+#endif
+#ifdef DEPRECATED_FRAME_LOCALS_ADDRESS
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_FRAME_LOCALS_ADDRESS(fi)",
+ XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS (fi)));
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
+ (long) current_gdbarch->deprecated_frame_locals_address
+ /*DEPRECATED_FRAME_LOCALS_ADDRESS ()*/);
+#endif
#ifdef DEPRECATED_FRAME_SAVED_PC_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -1488,6 +1526,45 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
"gdbarch_dump: DEPRECATED_REGISTER_BYTES = %d\n",
DEPRECATED_REGISTER_BYTES);
#endif
+#ifdef DEPRECATED_REGISTER_CONVERTIBLE
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_REGISTER_CONVERTIBLE(nr)",
+ XSTRING (DEPRECATED_REGISTER_CONVERTIBLE (nr)));
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_REGISTER_CONVERTIBLE = <0x%08lx>\n",
+ (long) current_gdbarch->deprecated_register_convertible
+ /*DEPRECATED_REGISTER_CONVERTIBLE ()*/);
+#endif
+#ifdef DEPRECATED_REGISTER_CONVERT_TO_RAW
+#if GDB_MULTI_ARCH
+ /* Macro might contain `[{}]' when not multi-arch */
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
+ XSTRING (DEPRECATED_REGISTER_CONVERT_TO_RAW (type, regnum, from, to)));
+#endif
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_REGISTER_CONVERT_TO_RAW = <0x%08lx>\n",
+ (long) current_gdbarch->deprecated_register_convert_to_raw
+ /*DEPRECATED_REGISTER_CONVERT_TO_RAW ()*/);
+#endif
+#ifdef DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL
+#if GDB_MULTI_ARCH
+ /* Macro might contain `[{}]' when not multi-arch */
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
+ XSTRING (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to)));
+#endif
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n",
+ (long) current_gdbarch->deprecated_register_convert_to_virtual
+ /*DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL ()*/);
+#endif
#ifdef DEPRECATED_REGISTER_SIZE
fprintf_unfiltered (file,
"gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
@@ -1516,6 +1593,29 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->deprecated_saved_pc_after_call
/*DEPRECATED_SAVED_PC_AFTER_CALL ()*/);
#endif
+#ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_SAVE_DUMMY_FRAME_TOS_P()",
+ XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ()));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() = %d\n",
+ DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ());
+#endif
+#ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS
+#if GDB_MULTI_ARCH
+ /* Macro might contain `[{}]' when not multi-arch */
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_SAVE_DUMMY_FRAME_TOS(sp)",
+ XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS (sp)));
+#endif
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
+ (long) current_gdbarch->deprecated_save_dummy_frame_tos
+ /*DEPRECATED_SAVE_DUMMY_FRAME_TOS ()*/);
+#endif
#ifdef DEPRECATED_SIZEOF_CALL_DUMMY_WORDS
fprintf_unfiltered (file,
"gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS # %s\n",
@@ -1693,6 +1793,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",
@@ -1712,17 +1832,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->frameless_function_invocation
/*FRAMELESS_FUNCTION_INVOCATION ()*/);
#endif
-#ifdef FRAME_ARGS_ADDRESS
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "FRAME_ARGS_ADDRESS(fi)",
- XSTRING (FRAME_ARGS_ADDRESS (fi)));
- if (GDB_MULTI_ARCH)
- fprintf_unfiltered (file,
- "gdbarch_dump: FRAME_ARGS_ADDRESS = <0x%08lx>\n",
- (long) current_gdbarch->frame_args_address
- /*FRAME_ARGS_ADDRESS ()*/);
-#endif
#ifdef FRAME_ARGS_SKIP
fprintf_unfiltered (file,
"gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
@@ -1731,16 +1840,14 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
"gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
(long) FRAME_ARGS_SKIP);
#endif
-#ifdef FRAME_LOCALS_ADDRESS
+#ifdef FRAME_NUM_ARGS_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
- "FRAME_LOCALS_ADDRESS(fi)",
- XSTRING (FRAME_LOCALS_ADDRESS (fi)));
- if (GDB_MULTI_ARCH)
- fprintf_unfiltered (file,
- "gdbarch_dump: FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
- (long) current_gdbarch->frame_locals_address
- /*FRAME_LOCALS_ADDRESS ()*/);
+ "FRAME_NUM_ARGS_P()",
+ XSTRING (FRAME_NUM_ARGS_P ()));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: FRAME_NUM_ARGS_P() = %d\n",
+ FRAME_NUM_ARGS_P ());
#endif
#ifdef FRAME_NUM_ARGS
fprintf_unfiltered (file,
@@ -1934,17 +2041,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->pointer_to_address
/*POINTER_TO_ADDRESS ()*/);
#endif
-#ifdef PREPARE_TO_PROCEED
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "PREPARE_TO_PROCEED(select_it)",
- XSTRING (PREPARE_TO_PROCEED (select_it)));
- if (GDB_MULTI_ARCH)
- fprintf_unfiltered (file,
- "gdbarch_dump: PREPARE_TO_PROCEED = <0x%08lx>\n",
- (long) current_gdbarch->prepare_to_proceed
- /*PREPARE_TO_PROCEED ()*/);
-#endif
if (GDB_MULTI_ARCH)
fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
@@ -2017,7 +2113,7 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
if (GDB_MULTI_ARCH)
fprintf_unfiltered (file,
"gdbarch_dump: REGISTER_BYTE = <0x%08lx>\n",
- (long) current_gdbarch->register_byte
+ (long) current_gdbarch->deprecated_register_byte
/*REGISTER_BYTE ()*/);
#endif
#ifdef REGISTER_BYTES_OK_P
@@ -2040,45 +2136,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->register_bytes_ok
/*REGISTER_BYTES_OK ()*/);
#endif
-#ifdef REGISTER_CONVERTIBLE
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "REGISTER_CONVERTIBLE(nr)",
- XSTRING (REGISTER_CONVERTIBLE (nr)));
- if (GDB_MULTI_ARCH)
- fprintf_unfiltered (file,
- "gdbarch_dump: REGISTER_CONVERTIBLE = <0x%08lx>\n",
- (long) current_gdbarch->register_convertible
- /*REGISTER_CONVERTIBLE ()*/);
-#endif
-#ifdef REGISTER_CONVERT_TO_RAW
-#if GDB_MULTI_ARCH
- /* Macro might contain `[{}]' when not multi-arch */
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
- XSTRING (REGISTER_CONVERT_TO_RAW (type, regnum, from, to)));
-#endif
- if (GDB_MULTI_ARCH)
- fprintf_unfiltered (file,
- "gdbarch_dump: REGISTER_CONVERT_TO_RAW = <0x%08lx>\n",
- (long) current_gdbarch->register_convert_to_raw
- /*REGISTER_CONVERT_TO_RAW ()*/);
-#endif
-#ifdef REGISTER_CONVERT_TO_VIRTUAL
-#if GDB_MULTI_ARCH
- /* Macro might contain `[{}]' when not multi-arch */
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
- XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to)));
-#endif
- if (GDB_MULTI_ARCH)
- fprintf_unfiltered (file,
- "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n",
- (long) current_gdbarch->register_convert_to_virtual
- /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
-#endif
#ifdef REGISTER_NAME
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -2098,7 +2155,7 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
if (GDB_MULTI_ARCH)
fprintf_unfiltered (file,
"gdbarch_dump: REGISTER_RAW_SIZE = <0x%08lx>\n",
- (long) current_gdbarch->register_raw_size
+ (long) current_gdbarch->deprecated_register_raw_size
/*REGISTER_RAW_SIZE ()*/);
#endif
#ifdef REGISTER_SIM_REGNO
@@ -2117,8 +2174,8 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
/* Macro might contain `[{}]' when not multi-arch */
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
- "REGISTER_TO_VALUE(regnum, type, from, to)",
- XSTRING (REGISTER_TO_VALUE (regnum, type, from, to)));
+ "REGISTER_TO_VALUE(frame, regnum, type, buf)",
+ XSTRING (REGISTER_TO_VALUE (frame, regnum, type, buf)));
#endif
if (GDB_MULTI_ARCH)
fprintf_unfiltered (file,
@@ -2142,7 +2199,7 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
if (GDB_MULTI_ARCH)
fprintf_unfiltered (file,
"gdbarch_dump: REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
- (long) current_gdbarch->register_virtual_size
+ (long) current_gdbarch->deprecated_register_virtual_size
/*REGISTER_VIRTUAL_SIZE ()*/);
#endif
#ifdef REGISTER_VIRTUAL_TYPE_P
@@ -2162,7 +2219,7 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
if (GDB_MULTI_ARCH)
fprintf_unfiltered (file,
"gdbarch_dump: REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
- (long) current_gdbarch->register_virtual_type
+ (long) current_gdbarch->deprecated_register_virtual_type
/*REGISTER_VIRTUAL_TYPE ()*/);
#endif
#ifdef REG_STRUCT_HAS_ADDR_P
@@ -2200,29 +2257,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->return_value_on_stack
/*RETURN_VALUE_ON_STACK ()*/);
#endif
-#ifdef SAVE_DUMMY_FRAME_TOS_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "SAVE_DUMMY_FRAME_TOS_P()",
- XSTRING (SAVE_DUMMY_FRAME_TOS_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: SAVE_DUMMY_FRAME_TOS_P() = %d\n",
- SAVE_DUMMY_FRAME_TOS_P ());
-#endif
-#ifdef SAVE_DUMMY_FRAME_TOS
-#if GDB_MULTI_ARCH
- /* Macro might contain `[{}]' when not multi-arch */
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "SAVE_DUMMY_FRAME_TOS(sp)",
- XSTRING (SAVE_DUMMY_FRAME_TOS (sp)));
-#endif
- if (GDB_MULTI_ARCH)
- fprintf_unfiltered (file,
- "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
- (long) current_gdbarch->save_dummy_frame_tos
- /*SAVE_DUMMY_FRAME_TOS ()*/);
-#endif
#ifdef SDB_REG_TO_REGNUM
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -2523,6 +2557,15 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
"gdbarch_dump: TARGET_PTR_BIT = %d\n",
TARGET_PTR_BIT);
#endif
+#ifdef TARGET_READ_PC_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "TARGET_READ_PC_P()",
+ XSTRING (TARGET_READ_PC_P ()));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: TARGET_READ_PC_P() = %d\n",
+ TARGET_READ_PC_P ());
+#endif
#ifdef TARGET_READ_PC
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -2534,6 +2577,15 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->read_pc
/*TARGET_READ_PC ()*/);
#endif
+#ifdef TARGET_READ_SP_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "TARGET_READ_SP_P()",
+ XSTRING (TARGET_READ_SP_P ()));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: TARGET_READ_SP_P() = %d\n",
+ TARGET_READ_SP_P ());
+#endif
#ifdef TARGET_READ_SP
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -2597,6 +2649,14 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
fprintf_unfiltered (file,
"gdbarch_dump: unwind_pc = 0x%08lx\n",
(long) current_gdbarch->unwind_pc);
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n",
+ gdbarch_unwind_sp_p (current_gdbarch));
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: unwind_sp = 0x%08lx\n",
+ (long) current_gdbarch->unwind_sp);
#ifdef USE_STRUCT_CONVENTION
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -2613,8 +2673,8 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
/* Macro might contain `[{}]' when not multi-arch */
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
- "VALUE_TO_REGISTER(type, regnum, from, to)",
- XSTRING (VALUE_TO_REGISTER (type, regnum, from, to)));
+ "VALUE_TO_REGISTER(frame, regnum, type, buf)",
+ XSTRING (VALUE_TO_REGISTER (frame, regnum, type, buf)));
#endif
if (GDB_MULTI_ARCH)
fprintf_unfiltered (file,
@@ -2853,6 +2913,13 @@ set_gdbarch_char_signed (struct gdbarch *gdbarch,
gdbarch->char_signed = char_signed;
}
+int
+gdbarch_read_pc_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->read_pc != 0;
+}
+
CORE_ADDR
gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
{
@@ -2892,29 +2959,10 @@ set_gdbarch_write_pc (struct gdbarch *gdbarch,
}
int
-gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_target_read_fp != 0;
-}
-
-CORE_ADDR
-gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch)
+gdbarch_read_sp_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_target_read_fp == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_target_read_fp invalid");
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_target_read_fp called\n");
- return gdbarch->deprecated_target_read_fp ();
-}
-
-void
-set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch,
- gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp)
-{
- gdbarch->deprecated_target_read_fp = deprecated_target_read_fp;
+ return gdbarch->read_sp != 0;
}
CORE_ADDR
@@ -2936,32 +2984,6 @@ set_gdbarch_read_sp (struct gdbarch *gdbarch,
gdbarch->read_sp = read_sp;
}
-int
-gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_dummy_write_sp != 0;
-}
-
-void
-gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
-{
- gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_dummy_write_sp == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_dummy_write_sp invalid");
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_dummy_write_sp called\n");
- gdbarch->deprecated_dummy_write_sp (val);
-}
-
-void
-set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch,
- gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp)
-{
- gdbarch->deprecated_dummy_write_sp = deprecated_dummy_write_sp;
-}
-
void
gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
{
@@ -3087,23 +3109,6 @@ set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
}
int
-gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
- return gdbarch->deprecated_fp_regnum;
-}
-
-void
-set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
- int deprecated_fp_regnum)
-{
- gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
-}
-
-int
gdbarch_pc_regnum (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
@@ -3286,19 +3291,55 @@ set_gdbarch_register_name (struct gdbarch *gdbarch,
}
int
-gdbarch_deprecated_register_size (struct gdbarch *gdbarch)
+gdbarch_register_type_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->register_type != 0;
+}
+
+struct type *
+gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
{
gdb_assert (gdbarch != NULL);
+ if (gdbarch->register_type == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_register_type invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_size called\n");
- return gdbarch->deprecated_register_size;
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
+ return gdbarch->register_type (gdbarch, reg_nr);
}
void
-set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch,
- int deprecated_register_size)
+set_gdbarch_register_type (struct gdbarch *gdbarch,
+ gdbarch_register_type_ftype register_type)
{
- gdbarch->deprecated_register_size = deprecated_register_size;
+ gdbarch->register_type = register_type;
+}
+
+int
+gdbarch_deprecated_register_virtual_type_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->deprecated_register_virtual_type != 0;
+}
+
+struct type *
+gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch->deprecated_register_virtual_type == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_deprecated_register_virtual_type invalid");
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_type called\n");
+ return gdbarch->deprecated_register_virtual_type (reg_nr);
+}
+
+void
+set_gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch,
+ gdbarch_deprecated_register_virtual_type_ftype deprecated_register_virtual_type)
+{
+ gdbarch->deprecated_register_virtual_type = deprecated_register_virtual_type;
}
int
@@ -3318,49 +3359,68 @@ set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch,
}
int
-gdbarch_register_byte_p (struct gdbarch *gdbarch)
+gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->deprecated_register_byte != generic_register_byte;
+}
+
+int
+gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->register_byte != generic_register_byte;
+ if (gdbarch->deprecated_register_byte == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_deprecated_register_byte invalid");
+ /* Ignore predicate (gdbarch->deprecated_register_byte != generic_register_byte). */
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_byte called\n");
+ return gdbarch->deprecated_register_byte (reg_nr);
+}
+
+void
+set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch,
+ gdbarch_deprecated_register_byte_ftype deprecated_register_byte)
+{
+ gdbarch->deprecated_register_byte = deprecated_register_byte;
}
int
-gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr)
+gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->register_byte == 0)
+ if (gdbarch->deprecated_register_raw_size == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_register_byte invalid");
- /* Ignore predicate (gdbarch->register_byte != generic_register_byte). */
+ "gdbarch: gdbarch_deprecated_register_raw_size invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n");
- return gdbarch->register_byte (reg_nr);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_raw_size called\n");
+ return gdbarch->deprecated_register_raw_size (reg_nr);
}
void
-set_gdbarch_register_byte (struct gdbarch *gdbarch,
- gdbarch_register_byte_ftype register_byte)
+set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch,
+ gdbarch_deprecated_register_raw_size_ftype deprecated_register_raw_size)
{
- gdbarch->register_byte = register_byte;
+ gdbarch->deprecated_register_raw_size = deprecated_register_raw_size;
}
int
-gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
+gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->register_raw_size == 0)
+ if (gdbarch->deprecated_register_virtual_size == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_register_raw_size invalid");
+ "gdbarch: gdbarch_deprecated_register_virtual_size invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n");
- return gdbarch->register_raw_size (reg_nr);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_size called\n");
+ return gdbarch->deprecated_register_virtual_size (reg_nr);
}
void
-set_gdbarch_register_raw_size (struct gdbarch *gdbarch,
- gdbarch_register_raw_size_ftype register_raw_size)
+set_gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch,
+ gdbarch_deprecated_register_virtual_size_ftype deprecated_register_virtual_size)
{
- gdbarch->register_raw_size = register_raw_size;
+ gdbarch->deprecated_register_virtual_size = deprecated_register_virtual_size;
}
int
@@ -3387,25 +3447,6 @@ set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch,
}
int
-gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
-{
- gdb_assert (gdbarch != NULL);
- if (gdbarch->register_virtual_size == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_register_virtual_size invalid");
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n");
- return gdbarch->register_virtual_size (reg_nr);
-}
-
-void
-set_gdbarch_register_virtual_size (struct gdbarch *gdbarch,
- gdbarch_register_virtual_size_ftype register_virtual_size)
-{
- gdbarch->register_virtual_size = register_virtual_size;
-}
-
-int
gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
@@ -3429,278 +3470,235 @@ set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch,
}
int
-gdbarch_register_virtual_type_p (struct gdbarch *gdbarch)
+gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->register_virtual_type != 0;
+ return gdbarch->unwind_dummy_id != 0;
}
-struct type *
-gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
+struct frame_id
+gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->register_virtual_type == 0)
+ if (gdbarch->unwind_dummy_id == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_register_virtual_type invalid");
+ "gdbarch: gdbarch_unwind_dummy_id invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n");
- return gdbarch->register_virtual_type (reg_nr);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n");
+ return gdbarch->unwind_dummy_id (gdbarch, info);
}
void
-set_gdbarch_register_virtual_type (struct gdbarch *gdbarch,
- gdbarch_register_virtual_type_ftype register_virtual_type)
+set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch,
+ gdbarch_unwind_dummy_id_ftype unwind_dummy_id)
{
- gdbarch->register_virtual_type = register_virtual_type;
+ gdbarch->unwind_dummy_id = unwind_dummy_id;
}
int
-gdbarch_register_type_p (struct gdbarch *gdbarch)
+gdbarch_deprecated_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->register_type != 0;
+ return gdbarch->deprecated_save_dummy_frame_tos != 0;
}
-struct type *
-gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
+void
+gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->register_type == 0)
+ if (gdbarch->deprecated_save_dummy_frame_tos == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_register_type invalid");
+ "gdbarch: gdbarch_deprecated_save_dummy_frame_tos invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
- return gdbarch->register_type (gdbarch, reg_nr);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_save_dummy_frame_tos called\n");
+ gdbarch->deprecated_save_dummy_frame_tos (sp);
}
void
-set_gdbarch_register_type (struct gdbarch *gdbarch,
- gdbarch_register_type_ftype register_type)
+set_gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch,
+ gdbarch_deprecated_save_dummy_frame_tos_ftype deprecated_save_dummy_frame_tos)
{
- gdbarch->register_type = register_type;
+ gdbarch->deprecated_save_dummy_frame_tos = deprecated_save_dummy_frame_tos;
}
int
-gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
+gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_do_registers_info != 0;
+ /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n");
+ return gdbarch->deprecated_fp_regnum;
}
void
-gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
+set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch,
+ int deprecated_fp_regnum)
{
- gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_do_registers_info == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_do_registers_info invalid");
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n");
- gdbarch->deprecated_do_registers_info (reg_nr, fpregs);
+ gdbarch->deprecated_fp_regnum = deprecated_fp_regnum;
}
-void
-set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch,
- gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info)
+int
+gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch)
{
- gdbarch->deprecated_do_registers_info = deprecated_do_registers_info;
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->deprecated_target_read_fp != 0;
}
-void
-gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
+CORE_ADDR
+gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->print_registers_info == 0)
+ if (gdbarch->deprecated_target_read_fp == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_print_registers_info invalid");
+ "gdbarch: gdbarch_deprecated_target_read_fp invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
- gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_target_read_fp called\n");
+ return gdbarch->deprecated_target_read_fp ();
}
void
-set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
- gdbarch_print_registers_info_ftype print_registers_info)
+set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch,
+ gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp)
{
- gdbarch->print_registers_info = print_registers_info;
+ gdbarch->deprecated_target_read_fp = deprecated_target_read_fp;
}
int
-gdbarch_print_float_info_p (struct gdbarch *gdbarch)
+gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->print_float_info != 0;
+ return gdbarch->push_dummy_call != 0;
}
-void
-gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
+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)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->print_float_info == 0)
+ if (gdbarch->push_dummy_call == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_print_float_info invalid");
+ "gdbarch: gdbarch_push_dummy_call invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
- gdbarch->print_float_info (gdbarch, file, frame, args);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
+ return gdbarch->push_dummy_call (gdbarch, func_addr, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
}
void
-set_gdbarch_print_float_info (struct gdbarch *gdbarch,
- gdbarch_print_float_info_ftype print_float_info)
+set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
+ gdbarch_push_dummy_call_ftype push_dummy_call)
{
- gdbarch->print_float_info = print_float_info;
+ gdbarch->push_dummy_call = push_dummy_call;
}
int
-gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
+gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->print_vector_info != 0;
+ return gdbarch->deprecated_push_arguments != 0;
}
-void
-gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
+CORE_ADDR
+gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->print_vector_info == 0)
+ if (gdbarch->deprecated_push_arguments == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_print_vector_info invalid");
+ "gdbarch: gdbarch_deprecated_push_arguments invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
- gdbarch->print_vector_info (gdbarch, file, frame, args);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_arguments called\n");
+ return gdbarch->deprecated_push_arguments (nargs, args, sp, struct_return, struct_addr);
}
void
-set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
- gdbarch_print_vector_info_ftype print_vector_info)
+set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch,
+ gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments)
{
- gdbarch->print_vector_info = print_vector_info;
+ gdbarch->deprecated_push_arguments = deprecated_push_arguments;
}
int
-gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
+gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->register_sim_regno == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_register_sim_regno invalid");
+ /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
- return gdbarch->register_sim_regno (reg_nr);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_use_generic_dummy_frames called\n");
+ return gdbarch->deprecated_use_generic_dummy_frames;
}
void
-set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
- gdbarch_register_sim_regno_ftype register_sim_regno)
-{
- gdbarch->register_sim_regno = register_sim_regno;
-}
-
-int
-gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
+set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch,
+ int deprecated_use_generic_dummy_frames)
{
- gdb_assert (gdbarch != NULL);
- return gdbarch->register_bytes_ok != 0;
+ gdbarch->deprecated_use_generic_dummy_frames = deprecated_use_generic_dummy_frames;
}
int
-gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
+gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->register_bytes_ok == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_register_bytes_ok invalid");
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
- return gdbarch->register_bytes_ok (nr_bytes);
-}
-
-void
-set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
- gdbarch_register_bytes_ok_ftype register_bytes_ok)
-{
- gdbarch->register_bytes_ok = register_bytes_ok;
+ return gdbarch->deprecated_push_return_address != 0;
}
-int
-gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
+CORE_ADDR
+gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->cannot_fetch_register == 0)
+ if (gdbarch->deprecated_push_return_address == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_cannot_fetch_register invalid");
+ "gdbarch: gdbarch_deprecated_push_return_address invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
- return gdbarch->cannot_fetch_register (regnum);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_return_address called\n");
+ return gdbarch->deprecated_push_return_address (pc, sp);
}
void
-set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
- gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
+set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch,
+ gdbarch_deprecated_push_return_address_ftype deprecated_push_return_address)
{
- gdbarch->cannot_fetch_register = cannot_fetch_register;
+ gdbarch->deprecated_push_return_address = deprecated_push_return_address;
}
int
-gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
+gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->cannot_store_register == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_cannot_store_register invalid");
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
- return gdbarch->cannot_store_register (regnum);
+ return gdbarch->deprecated_dummy_write_sp != 0;
}
void
-set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
- gdbarch_cannot_store_register_ftype cannot_store_register)
-{
- gdbarch->cannot_store_register = cannot_store_register;
-}
-
-int
-gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->get_longjmp_target != 0;
-}
-
-int
-gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
+gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->get_longjmp_target == 0)
+ if (gdbarch->deprecated_dummy_write_sp == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_get_longjmp_target invalid");
+ "gdbarch: gdbarch_deprecated_dummy_write_sp invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
- return gdbarch->get_longjmp_target (pc);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_dummy_write_sp called\n");
+ gdbarch->deprecated_dummy_write_sp (val);
}
void
-set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
- gdbarch_get_longjmp_target_ftype get_longjmp_target)
+set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch,
+ gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp)
{
- gdbarch->get_longjmp_target = get_longjmp_target;
+ gdbarch->deprecated_dummy_write_sp = deprecated_dummy_write_sp;
}
int
-gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch)
+gdbarch_deprecated_register_size (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_use_generic_dummy_frames called\n");
- return gdbarch->deprecated_use_generic_dummy_frames;
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_size called\n");
+ return gdbarch->deprecated_register_size;
}
void
-set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch,
- int deprecated_use_generic_dummy_frames)
+set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch,
+ int deprecated_register_size)
{
- gdbarch->deprecated_use_generic_dummy_frames = deprecated_use_generic_dummy_frames;
+ gdbarch->deprecated_register_size = deprecated_register_size;
}
int
@@ -3787,33 +3785,6 @@ set_gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch,
gdbarch->deprecated_call_dummy_length = deprecated_call_dummy_length;
}
-int
-gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy;
-}
-
-int
-gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
-{
- gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_pc_in_call_dummy == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_pc_in_call_dummy invalid");
- /* Ignore predicate (gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy). */
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pc_in_call_dummy called\n");
- return gdbarch->deprecated_pc_in_call_dummy (pc, sp, frame_address);
-}
-
-void
-set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch,
- gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy)
-{
- gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy;
-}
-
LONGEST *
gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch)
{
@@ -3924,6 +3895,282 @@ set_gdbarch_push_dummy_code (struct gdbarch *gdbarch,
}
int
+gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->deprecated_push_dummy_frame != 0;
+}
+
+void
+gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch->deprecated_push_dummy_frame == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_deprecated_push_dummy_frame invalid");
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_dummy_frame called\n");
+ gdbarch->deprecated_push_dummy_frame ();
+}
+
+void
+set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch,
+ gdbarch_deprecated_push_dummy_frame_ftype deprecated_push_dummy_frame)
+{
+ gdbarch->deprecated_push_dummy_frame = deprecated_push_dummy_frame;
+}
+
+int
+gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ /* Skip verify of deprecated_extra_stack_alignment_needed, invalid_p == 0 */
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extra_stack_alignment_needed called\n");
+ return gdbarch->deprecated_extra_stack_alignment_needed;
+}
+
+void
+set_gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch,
+ int deprecated_extra_stack_alignment_needed)
+{
+ gdbarch->deprecated_extra_stack_alignment_needed = deprecated_extra_stack_alignment_needed;
+}
+
+int
+gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->deprecated_do_registers_info != 0;
+}
+
+void
+gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch->deprecated_do_registers_info == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_deprecated_do_registers_info invalid");
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n");
+ gdbarch->deprecated_do_registers_info (reg_nr, fpregs);
+}
+
+void
+set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch,
+ gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info)
+{
+ gdbarch->deprecated_do_registers_info = deprecated_do_registers_info;
+}
+
+void
+gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch->print_registers_info == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_print_registers_info invalid");
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
+ gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
+}
+
+void
+set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
+ gdbarch_print_registers_info_ftype print_registers_info)
+{
+ gdbarch->print_registers_info = print_registers_info;
+}
+
+int
+gdbarch_print_float_info_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->print_float_info != 0;
+}
+
+void
+gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch->print_float_info == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_print_float_info invalid");
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
+ gdbarch->print_float_info (gdbarch, file, frame, args);
+}
+
+void
+set_gdbarch_print_float_info (struct gdbarch *gdbarch,
+ gdbarch_print_float_info_ftype print_float_info)
+{
+ gdbarch->print_float_info = print_float_info;
+}
+
+int
+gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->print_vector_info != 0;
+}
+
+void
+gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch->print_vector_info == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_print_vector_info invalid");
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
+ gdbarch->print_vector_info (gdbarch, file, frame, args);
+}
+
+void
+set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
+ gdbarch_print_vector_info_ftype print_vector_info)
+{
+ gdbarch->print_vector_info = print_vector_info;
+}
+
+int
+gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch->register_sim_regno == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_register_sim_regno invalid");
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
+ return gdbarch->register_sim_regno (reg_nr);
+}
+
+void
+set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
+ gdbarch_register_sim_regno_ftype register_sim_regno)
+{
+ gdbarch->register_sim_regno = register_sim_regno;
+}
+
+int
+gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->register_bytes_ok != 0;
+}
+
+int
+gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch->register_bytes_ok == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_register_bytes_ok invalid");
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
+ return gdbarch->register_bytes_ok (nr_bytes);
+}
+
+void
+set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
+ gdbarch_register_bytes_ok_ftype register_bytes_ok)
+{
+ gdbarch->register_bytes_ok = register_bytes_ok;
+}
+
+int
+gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch->cannot_fetch_register == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_cannot_fetch_register invalid");
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
+ return gdbarch->cannot_fetch_register (regnum);
+}
+
+void
+set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
+ gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
+{
+ gdbarch->cannot_fetch_register = cannot_fetch_register;
+}
+
+int
+gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch->cannot_store_register == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_cannot_store_register invalid");
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
+ return gdbarch->cannot_store_register (regnum);
+}
+
+void
+set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
+ gdbarch_cannot_store_register_ftype cannot_store_register)
+{
+ gdbarch->cannot_store_register = cannot_store_register;
+}
+
+int
+gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->get_longjmp_target != 0;
+}
+
+int
+gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch->get_longjmp_target == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_get_longjmp_target invalid");
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
+ return gdbarch->get_longjmp_target (pc);
+}
+
+void
+set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
+ gdbarch_get_longjmp_target_ftype get_longjmp_target)
+{
+ gdbarch->get_longjmp_target = get_longjmp_target;
+}
+
+int
+gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy;
+}
+
+int
+gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch->deprecated_pc_in_call_dummy == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_deprecated_pc_in_call_dummy invalid");
+ /* Ignore predicate (gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy). */
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pc_in_call_dummy called\n");
+ return gdbarch->deprecated_pc_in_call_dummy (pc, sp, frame_address);
+}
+
+void
+set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch,
+ gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy)
+{
+ gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy;
+}
+
+int
gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
@@ -4034,64 +4281,64 @@ set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch,
}
int
-gdbarch_register_convertible (struct gdbarch *gdbarch, int nr)
+gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, int nr)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->register_convertible == 0)
+ if (gdbarch->deprecated_register_convertible == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_register_convertible invalid");
+ "gdbarch: gdbarch_deprecated_register_convertible invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n");
- return gdbarch->register_convertible (nr);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convertible called\n");
+ return gdbarch->deprecated_register_convertible (nr);
}
void
-set_gdbarch_register_convertible (struct gdbarch *gdbarch,
- gdbarch_register_convertible_ftype register_convertible)
+set_gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch,
+ gdbarch_deprecated_register_convertible_ftype deprecated_register_convertible)
{
- gdbarch->register_convertible = register_convertible;
+ gdbarch->deprecated_register_convertible = deprecated_register_convertible;
}
void
-gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
+gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->register_convert_to_virtual == 0)
+ if (gdbarch->deprecated_register_convert_to_virtual == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_register_convert_to_virtual invalid");
+ "gdbarch: gdbarch_deprecated_register_convert_to_virtual invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n");
- gdbarch->register_convert_to_virtual (regnum, type, from, to);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convert_to_virtual called\n");
+ gdbarch->deprecated_register_convert_to_virtual (regnum, type, from, to);
}
void
-set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch,
- gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual)
+set_gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch,
+ gdbarch_deprecated_register_convert_to_virtual_ftype deprecated_register_convert_to_virtual)
{
- gdbarch->register_convert_to_virtual = register_convert_to_virtual;
+ gdbarch->deprecated_register_convert_to_virtual = deprecated_register_convert_to_virtual;
}
void
-gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
+gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, const char *from, char *to)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->register_convert_to_raw == 0)
+ if (gdbarch->deprecated_register_convert_to_raw == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_register_convert_to_raw invalid");
+ "gdbarch: gdbarch_deprecated_register_convert_to_raw invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n");
- gdbarch->register_convert_to_raw (type, regnum, from, to);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convert_to_raw called\n");
+ gdbarch->deprecated_register_convert_to_raw (type, regnum, from, to);
}
void
-set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch,
- gdbarch_register_convert_to_raw_ftype register_convert_to_raw)
+set_gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch,
+ gdbarch_deprecated_register_convert_to_raw_ftype deprecated_register_convert_to_raw)
{
- gdbarch->register_convert_to_raw = register_convert_to_raw;
+ gdbarch->deprecated_register_convert_to_raw = deprecated_register_convert_to_raw;
}
int
-gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum)
+gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
{
gdb_assert (gdbarch != NULL);
if (gdbarch->convert_register_p == 0)
@@ -4099,7 +4346,7 @@ gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum)
"gdbarch: gdbarch_convert_register_p invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
- return gdbarch->convert_register_p (regnum);
+ return gdbarch->convert_register_p (regnum, type);
}
void
@@ -4110,7 +4357,7 @@ set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
}
void
-gdbarch_register_to_value (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
+gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, void *buf)
{
gdb_assert (gdbarch != NULL);
if (gdbarch->register_to_value == 0)
@@ -4118,7 +4365,7 @@ gdbarch_register_to_value (struct gdbarch *gdbarch, int regnum, struct type *typ
"gdbarch: gdbarch_register_to_value invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
- gdbarch->register_to_value (regnum, type, from, to);
+ gdbarch->register_to_value (frame, regnum, type, buf);
}
void
@@ -4129,7 +4376,7 @@ set_gdbarch_register_to_value (struct gdbarch *gdbarch,
}
void
-gdbarch_value_to_register (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
+gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const void *buf)
{
gdb_assert (gdbarch != NULL);
if (gdbarch->value_to_register == 0)
@@ -4137,7 +4384,7 @@ gdbarch_value_to_register (struct gdbarch *gdbarch, struct type *type, int regnu
"gdbarch: gdbarch_value_to_register invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
- gdbarch->value_to_register (type, regnum, from, to);
+ gdbarch->value_to_register (frame, regnum, type, buf);
}
void
@@ -4231,110 +4478,6 @@ set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
}
int
-gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_push_arguments != 0;
-}
-
-CORE_ADDR
-gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
-{
- gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_push_arguments == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_push_arguments invalid");
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_arguments called\n");
- return gdbarch->deprecated_push_arguments (nargs, args, sp, struct_return, struct_addr);
-}
-
-void
-set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch,
- gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments)
-{
- gdbarch->deprecated_push_arguments = deprecated_push_arguments;
-}
-
-int
-gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->push_dummy_call != 0;
-}
-
-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)
-{
- gdb_assert (gdbarch != NULL);
- if (gdbarch->push_dummy_call == 0)
- internal_error (__FILE__, __LINE__,
- "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);
-}
-
-void
-set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
- gdbarch_push_dummy_call_ftype push_dummy_call)
-{
- gdbarch->push_dummy_call = push_dummy_call;
-}
-
-int
-gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_push_dummy_frame != 0;
-}
-
-void
-gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_push_dummy_frame == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_push_dummy_frame invalid");
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_dummy_frame called\n");
- gdbarch->deprecated_push_dummy_frame ();
-}
-
-void
-set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch,
- gdbarch_deprecated_push_dummy_frame_ftype deprecated_push_dummy_frame)
-{
- gdbarch->deprecated_push_dummy_frame = deprecated_push_dummy_frame;
-}
-
-int
-gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->deprecated_push_return_address != 0;
-}
-
-CORE_ADDR
-gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
-{
- gdb_assert (gdbarch != NULL);
- if (gdbarch->deprecated_push_return_address == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_deprecated_push_return_address invalid");
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_return_address called\n");
- return gdbarch->deprecated_push_return_address (pc, sp);
-}
-
-void
-set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch,
- gdbarch_deprecated_push_return_address_ftype deprecated_push_return_address)
-{
- gdbarch->deprecated_push_return_address = deprecated_push_return_address;
-}
-
-int
gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
@@ -4718,25 +4861,6 @@ set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
gdbarch->decr_pc_after_break = decr_pc_after_break;
}
-int
-gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it)
-{
- gdb_assert (gdbarch != NULL);
- if (gdbarch->prepare_to_proceed == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_prepare_to_proceed invalid");
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_prepare_to_proceed called\n");
- return gdbarch->prepare_to_proceed (select_it);
-}
-
-void
-set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch,
- gdbarch_prepare_to_proceed_ftype prepare_to_proceed)
-{
- gdbarch->prepare_to_proceed = prepare_to_proceed;
-}
-
CORE_ADDR
gdbarch_function_start_offset (struct gdbarch *gdbarch)
{
@@ -4917,42 +5041,84 @@ set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
gdbarch->unwind_pc = unwind_pc;
}
+int
+gdbarch_unwind_sp_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->unwind_sp != 0;
+}
+
CORE_ADDR
-gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
+gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->frame_args_address == 0)
+ if (gdbarch->unwind_sp == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_frame_args_address invalid");
+ "gdbarch: gdbarch_unwind_sp invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n");
- return gdbarch->frame_args_address (fi);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n");
+ return gdbarch->unwind_sp (gdbarch, next_frame);
}
void
-set_gdbarch_frame_args_address (struct gdbarch *gdbarch,
- gdbarch_frame_args_address_ftype frame_args_address)
+set_gdbarch_unwind_sp (struct gdbarch *gdbarch,
+ gdbarch_unwind_sp_ftype unwind_sp)
{
- gdbarch->frame_args_address = frame_args_address;
+ gdbarch->unwind_sp = unwind_sp;
+}
+
+int
+gdbarch_deprecated_frame_args_address_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->deprecated_frame_args_address != get_frame_base;
}
CORE_ADDR
-gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
+gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->frame_locals_address == 0)
+ if (gdbarch->deprecated_frame_args_address == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_frame_locals_address invalid");
+ "gdbarch: gdbarch_deprecated_frame_args_address invalid");
+ /* Ignore predicate (gdbarch->deprecated_frame_args_address != get_frame_base). */
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n");
- return gdbarch->frame_locals_address (fi);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_args_address called\n");
+ return gdbarch->deprecated_frame_args_address (fi);
}
void
-set_gdbarch_frame_locals_address (struct gdbarch *gdbarch,
- gdbarch_frame_locals_address_ftype frame_locals_address)
+set_gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch,
+ gdbarch_deprecated_frame_args_address_ftype deprecated_frame_args_address)
{
- gdbarch->frame_locals_address = frame_locals_address;
+ gdbarch->deprecated_frame_args_address = deprecated_frame_args_address;
+}
+
+int
+gdbarch_deprecated_frame_locals_address_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->deprecated_frame_locals_address != get_frame_base;
+}
+
+CORE_ADDR
+gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch->deprecated_frame_locals_address == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_deprecated_frame_locals_address invalid");
+ /* Ignore predicate (gdbarch->deprecated_frame_locals_address != get_frame_base). */
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_locals_address called\n");
+ return gdbarch->deprecated_frame_locals_address (fi);
+}
+
+void
+set_gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch,
+ gdbarch_deprecated_frame_locals_address_ftype deprecated_frame_locals_address)
+{
+ gdbarch->deprecated_frame_locals_address = deprecated_frame_locals_address;
}
int
@@ -4982,6 +5148,13 @@ set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch,
}
int
+gdbarch_frame_num_args_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->frame_num_args != 0;
+}
+
+int
gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
{
gdb_assert (gdbarch != NULL);
@@ -5053,23 +5226,6 @@ set_gdbarch_frame_align (struct gdbarch *gdbarch,
}
int
-gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- /* Skip verify of deprecated_extra_stack_alignment_needed, invalid_p == 0 */
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extra_stack_alignment_needed called\n");
- return gdbarch->deprecated_extra_stack_alignment_needed;
-}
-
-void
-set_gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch,
- int deprecated_extra_stack_alignment_needed)
-{
- gdbarch->deprecated_extra_stack_alignment_needed = deprecated_extra_stack_alignment_needed;
-}
-
-int
gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
@@ -5096,58 +5252,6 @@ set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch,
}
int
-gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->save_dummy_frame_tos != 0;
-}
-
-void
-gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
-{
- gdb_assert (gdbarch != NULL);
- if (gdbarch->save_dummy_frame_tos == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_save_dummy_frame_tos invalid");
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_save_dummy_frame_tos called\n");
- gdbarch->save_dummy_frame_tos (sp);
-}
-
-void
-set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch,
- gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos)
-{
- gdbarch->save_dummy_frame_tos = save_dummy_frame_tos;
-}
-
-int
-gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->unwind_dummy_id != 0;
-}
-
-struct frame_id
-gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info)
-{
- gdb_assert (gdbarch != NULL);
- if (gdbarch->unwind_dummy_id == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_unwind_dummy_id invalid");
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n");
- return gdbarch->unwind_dummy_id (gdbarch, info);
-}
-
-void
-set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch,
- gdbarch_unwind_dummy_id_ftype unwind_dummy_id)
-{
- gdbarch->unwind_dummy_id = unwind_dummy_id;
-}
-
-int
gdbarch_parm_boundary (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
@@ -5691,6 +5795,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..4dd7cfa9d7f 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,15 +279,33 @@ 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
+
+#if defined (TARGET_READ_PC)
+/* Legacy for systems yet to multi-arch TARGET_READ_PC */
+#if !defined (TARGET_READ_PC_P)
+#define TARGET_READ_PC_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_PC_P)
+#define TARGET_READ_PC_P() (0)
+#endif
+
+extern int gdbarch_read_pc_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_PC_P)
+#error "Non multi-arch definition of TARGET_READ_PC"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_PC_P)
+#define TARGET_READ_PC_P() (gdbarch_read_pc_p (current_gdbarch))
#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_PC)
-#define TARGET_READ_PC(ptid) (generic_target_read_pc (ptid))
+#define TARGET_READ_PC(ptid) (internal_error (__FILE__, __LINE__, "TARGET_READ_PC"), 0)
#endif
typedef CORE_ADDR (gdbarch_read_pc_ftype) (ptid_t ptid);
@@ -322,11 +314,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,55 +329,35 @@ 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. */
+/* UNWIND_SP is a direct replacement for TARGET_READ_SP. */
-#if defined (DEPRECATED_TARGET_READ_FP)
-/* Legacy for systems yet to multi-arch DEPRECATED_TARGET_READ_FP */
-#if !defined (DEPRECATED_TARGET_READ_FP_P)
-#define DEPRECATED_TARGET_READ_FP_P() (1)
+#if defined (TARGET_READ_SP)
+/* Legacy for systems yet to multi-arch TARGET_READ_SP */
+#if !defined (TARGET_READ_SP_P)
+#define TARGET_READ_SP_P() (1)
#endif
#endif
/* Default predicate for non- multi-arch targets. */
-#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_TARGET_READ_FP_P)
-#define DEPRECATED_TARGET_READ_FP_P() (0)
+#if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_SP_P)
+#define TARGET_READ_SP_P() (0)
#endif
-extern int gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_TARGET_READ_FP_P)
-#error "Non multi-arch definition of DEPRECATED_TARGET_READ_FP"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_TARGET_READ_FP_P)
-#define DEPRECATED_TARGET_READ_FP_P() (gdbarch_deprecated_target_read_fp_p (current_gdbarch))
-#endif
-
-/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_TARGET_READ_FP)
-#define DEPRECATED_TARGET_READ_FP() (internal_error (__FILE__, __LINE__, "DEPRECATED_TARGET_READ_FP"), 0)
-#endif
-
-typedef CORE_ADDR (gdbarch_deprecated_target_read_fp_ftype) (void);
-extern CORE_ADDR gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch);
-extern void set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch, gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp);
-#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)
-#define DEPRECATED_TARGET_READ_FP() (gdbarch_deprecated_target_read_fp (current_gdbarch))
+extern int gdbarch_read_sp_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_SP_P)
+#error "Non multi-arch definition of TARGET_READ_SP"
#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_SP_P)
+#define TARGET_READ_SP_P() (gdbarch_read_sp_p (current_gdbarch))
#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_SP)
-#define TARGET_READ_SP() (generic_target_read_sp ())
+#define TARGET_READ_SP() (internal_error (__FILE__, __LINE__, "TARGET_READ_SP"), 0)
#endif
typedef CORE_ADDR (gdbarch_read_sp_ftype) (void);
@@ -396,50 +366,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. */
-
-#if defined (DEPRECATED_DUMMY_WRITE_SP)
-/* Legacy for systems yet to multi-arch DEPRECATED_DUMMY_WRITE_SP */
-#if !defined (DEPRECATED_DUMMY_WRITE_SP_P)
-#define DEPRECATED_DUMMY_WRITE_SP_P() (1)
-#endif
-#endif
-
-/* Default predicate for non- multi-arch targets. */
-#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DUMMY_WRITE_SP_P)
-#define DEPRECATED_DUMMY_WRITE_SP_P() (0)
-#endif
-
-extern int gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DUMMY_WRITE_SP_P)
-#error "Non multi-arch definition of DEPRECATED_DUMMY_WRITE_SP"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DUMMY_WRITE_SP_P)
-#define DEPRECATED_DUMMY_WRITE_SP_P() (gdbarch_deprecated_dummy_write_sp_p (current_gdbarch))
-#endif
-
-/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DUMMY_WRITE_SP)
-#define DEPRECATED_DUMMY_WRITE_SP(val) (internal_error (__FILE__, __LINE__, "DEPRECATED_DUMMY_WRITE_SP"), 0)
-#endif
-
-typedef void (gdbarch_deprecated_dummy_write_sp_ftype) (CORE_ADDR val);
-extern void gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val);
-extern void set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, gdbarch_deprecated_dummy_write_sp_ftype *deprecated_dummy_write_sp);
-#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)
-#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 +385,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 +406,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,15 +425,14 @@ 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
- all (-1). */
+ all (-1).
+ SP_REGNUM will hopefully be replaced by UNWIND_SP. */
/* Default (value) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (SP_REGNUM)
@@ -520,30 +444,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. */
-
-/* Default (value) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FP_REGNUM)
-#define DEPRECATED_FP_REGNUM (-1)
-#endif
-
-extern int gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch);
-extern void set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch, int deprecated_fp_regnum);
-#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)
-#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 +458,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 +472,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 +486,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 +500,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 +517,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 +534,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 +551,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 +570,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 +585,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,21 +600,58 @@ 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
+
+/* REGISTER_TYPE is a direct replacement for REGISTER_VIRTUAL_TYPE. */
+
+extern int gdbarch_register_type_p (struct gdbarch *gdbarch);
+
+typedef struct type * (gdbarch_register_type_ftype) (struct gdbarch *gdbarch, int reg_nr);
+extern struct type * gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr);
+extern void set_gdbarch_register_type (struct gdbarch *gdbarch, gdbarch_register_type_ftype *register_type);
+
+/* REGISTER_TYPE is a direct replacement for REGISTER_VIRTUAL_TYPE. */
+
+#if defined (REGISTER_VIRTUAL_TYPE)
+/* Legacy for systems yet to multi-arch REGISTER_VIRTUAL_TYPE */
+#if !defined (REGISTER_VIRTUAL_TYPE_P)
+#define REGISTER_VIRTUAL_TYPE_P() (1)
+#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);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_SIZE)
-#error "Non multi-arch definition of DEPRECATED_REGISTER_SIZE"
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_TYPE_P)
+#define REGISTER_VIRTUAL_TYPE_P() (0)
#endif
-#if !defined (DEPRECATED_REGISTER_SIZE)
-#define DEPRECATED_REGISTER_SIZE (gdbarch_deprecated_register_size (current_gdbarch))
+
+extern int gdbarch_deprecated_register_virtual_type_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_TYPE_P)
+#error "Non multi-arch definition of REGISTER_VIRTUAL_TYPE"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_VIRTUAL_TYPE_P)
+#define REGISTER_VIRTUAL_TYPE_P() (gdbarch_deprecated_register_virtual_type_p (current_gdbarch))
+#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_TYPE)
+#define REGISTER_VIRTUAL_TYPE(reg_nr) (internal_error (__FILE__, __LINE__, "REGISTER_VIRTUAL_TYPE"), 0)
+#endif
+
+typedef struct type * (gdbarch_deprecated_register_virtual_type_ftype) (int reg_nr);
+extern struct type * gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, int reg_nr);
+extern void set_gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, gdbarch_deprecated_register_virtual_type_ftype *deprecated_register_virtual_type);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_TYPE)
+#error "Non multi-arch definition of REGISTER_VIRTUAL_TYPE"
+#endif
+#if !defined (REGISTER_VIRTUAL_TYPE)
+#define REGISTER_VIRTUAL_TYPE(reg_nr) (gdbarch_deprecated_register_virtual_type (current_gdbarch, reg_nr))
#endif
+/* DEPRECATED_REGISTER_BYTES can be deleted. The value is computed
+ from REGISTER_TYPE. */
+
extern int gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch);
extern void set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch, int deprecated_register_bytes);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_BYTES)
@@ -739,11 +661,13 @@ extern void set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch, int
#define DEPRECATED_REGISTER_BYTES (gdbarch_deprecated_register_bytes (current_gdbarch))
#endif
-/* NOTE: cagney/2002-05-02: This function with predicate has a valid
- (callable) initial value. As a consequence, even when the predicate
- is false, the corresponding function works. This simplifies the
- migration process - old code, calling REGISTER_BYTE, doesn't need to
- be modified. */
+/* If the value returned by DEPRECATED_REGISTER_BYTE agrees with the
+ register offsets computed using just REGISTER_TYPE, this can be
+ deleted. See: maint print registers. NOTE: cagney/2002-05-02: This
+ function with predicate has a valid (callable) initial value. As a
+ consequence, even when the predicate is false, the corresponding
+ function works. This simplifies the migration process - old code,
+ calling DEPRECATED_REGISTER_BYTE, doesn't need to be modified. */
#if defined (REGISTER_BYTE)
/* Legacy for systems yet to multi-arch REGISTER_BYTE */
@@ -757,12 +681,12 @@ extern void set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch, int
#define REGISTER_BYTE_P() (0)
#endif
-extern int gdbarch_register_byte_p (struct gdbarch *gdbarch);
+extern int gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTE_P)
#error "Non multi-arch definition of REGISTER_BYTE"
#endif
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTE_P)
-#define REGISTER_BYTE_P() (gdbarch_register_byte_p (current_gdbarch))
+#define REGISTER_BYTE_P() (gdbarch_deprecated_register_byte_p (current_gdbarch))
#endif
/* Default (function) for non- multi-arch platforms. */
@@ -770,41 +694,58 @@ extern int gdbarch_register_byte_p (struct gdbarch *gdbarch);
#define REGISTER_BYTE(reg_nr) (generic_register_byte (reg_nr))
#endif
-typedef int (gdbarch_register_byte_ftype) (int reg_nr);
-extern int gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr);
-extern void set_gdbarch_register_byte (struct gdbarch *gdbarch, gdbarch_register_byte_ftype *register_byte);
+typedef int (gdbarch_deprecated_register_byte_ftype) (int reg_nr);
+extern int gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr);
+extern void set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, gdbarch_deprecated_register_byte_ftype *deprecated_register_byte);
#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)
-#define REGISTER_BYTE(reg_nr) (gdbarch_register_byte (current_gdbarch, reg_nr))
-#endif
+#if !defined (REGISTER_BYTE)
+#define REGISTER_BYTE(reg_nr) (gdbarch_deprecated_register_byte (current_gdbarch, reg_nr))
#endif
-/* The methods REGISTER_VIRTUAL_TYPE, REGISTER_VIRTUAL_SIZE and
- REGISTER_RAW_SIZE are all being replaced by REGISTER_TYPE. */
+/* If all registers have identical raw and virtual sizes and those
+ sizes agree with the value computed from REGISTER_TYPE,
+ DEPRECATED_REGISTER_RAW_SIZE can be deleted. See: maint print
+ registers. */
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (REGISTER_RAW_SIZE)
#define REGISTER_RAW_SIZE(reg_nr) (generic_register_size (reg_nr))
#endif
-typedef int (gdbarch_register_raw_size_ftype) (int reg_nr);
-extern int gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr);
-extern void set_gdbarch_register_raw_size (struct gdbarch *gdbarch, gdbarch_register_raw_size_ftype *register_raw_size);
+typedef int (gdbarch_deprecated_register_raw_size_ftype) (int reg_nr);
+extern int gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr);
+extern void set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, gdbarch_deprecated_register_raw_size_ftype *deprecated_register_raw_size);
#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)
-#define REGISTER_RAW_SIZE(reg_nr) (gdbarch_register_raw_size (current_gdbarch, reg_nr))
+#if !defined (REGISTER_RAW_SIZE)
+#define REGISTER_RAW_SIZE(reg_nr) (gdbarch_deprecated_register_raw_size (current_gdbarch, reg_nr))
#endif
+
+/* If all registers have identical raw and virtual sizes and those
+ sizes agree with the value computed from REGISTER_TYPE,
+ DEPRECATED_REGISTER_VIRTUAL_SIZE can be deleted. See: maint print
+ registers. */
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_SIZE)
+#define REGISTER_VIRTUAL_SIZE(reg_nr) (generic_register_size (reg_nr))
+#endif
+
+typedef int (gdbarch_deprecated_register_virtual_size_ftype) (int reg_nr);
+extern int gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr);
+extern void set_gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, gdbarch_deprecated_register_virtual_size_ftype *deprecated_register_virtual_size);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_SIZE)
+#error "Non multi-arch definition of REGISTER_VIRTUAL_SIZE"
+#endif
+#if !defined (REGISTER_VIRTUAL_SIZE)
+#define REGISTER_VIRTUAL_SIZE(reg_nr) (gdbarch_deprecated_register_virtual_size (current_gdbarch, reg_nr))
#endif
-/* The methods DEPRECATED_MAX_REGISTER_RAW_SIZE and
- DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE are all being replaced by
- MAX_REGISTER_SIZE (a constant). */
+/* DEPRECATED_MAX_REGISTER_RAW_SIZE can be deleted. It has been
+ replaced by the constant MAX_REGISTER_SIZE. */
#if defined (DEPRECATED_MAX_REGISTER_RAW_SIZE)
/* Legacy for systems yet to multi-arch DEPRECATED_MAX_REGISTER_RAW_SIZE */
@@ -836,35 +777,12 @@ 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. */
-/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_SIZE)
-#define REGISTER_VIRTUAL_SIZE(reg_nr) (generic_register_size (reg_nr))
-#endif
-
-typedef int (gdbarch_register_virtual_size_ftype) (int reg_nr);
-extern int gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr);
-extern void set_gdbarch_register_virtual_size (struct gdbarch *gdbarch, gdbarch_register_virtual_size_ftype *register_virtual_size);
-#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)
-#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
- MAX_REGISTER_SIZE (a constant). */
+/* DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE can be deleted. It has been
+ replaced by the constant MAX_REGISTER_SIZE. */
#if defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE)
/* Legacy for systems yet to multi-arch DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE */
@@ -896,265 +814,259 @@ 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. */
+/* See gdbint.texinfo, and PUSH_DUMMY_CALL. */
-#if defined (REGISTER_VIRTUAL_TYPE)
-/* Legacy for systems yet to multi-arch REGISTER_VIRTUAL_TYPE */
-#if !defined (REGISTER_VIRTUAL_TYPE_P)
-#define REGISTER_VIRTUAL_TYPE_P() (1)
+extern int gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch);
+
+typedef struct frame_id (gdbarch_unwind_dummy_id_ftype) (struct gdbarch *gdbarch, struct frame_info *info);
+extern struct frame_id gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info);
+extern void set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, gdbarch_unwind_dummy_id_ftype *unwind_dummy_id);
+
+/* Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete
+ SAVE_DUMMY_FRAME_TOS. */
+
+#if defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS)
+/* Legacy for systems yet to multi-arch DEPRECATED_SAVE_DUMMY_FRAME_TOS */
+#if !defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P)
+#define DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() (1)
#endif
#endif
/* Default predicate for non- multi-arch targets. */
-#if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_TYPE_P)
-#define REGISTER_VIRTUAL_TYPE_P() (0)
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P)
+#define DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() (0)
#endif
-extern int gdbarch_register_virtual_type_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_TYPE_P)
-#error "Non multi-arch definition of REGISTER_VIRTUAL_TYPE"
+extern int gdbarch_deprecated_save_dummy_frame_tos_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P)
+#error "Non multi-arch definition of DEPRECATED_SAVE_DUMMY_FRAME_TOS"
#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_VIRTUAL_TYPE_P)
-#define REGISTER_VIRTUAL_TYPE_P() (gdbarch_register_virtual_type_p (current_gdbarch))
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P)
+#define DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() (gdbarch_deprecated_save_dummy_frame_tos_p (current_gdbarch))
#endif
/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (REGISTER_VIRTUAL_TYPE)
-#define REGISTER_VIRTUAL_TYPE(reg_nr) (internal_error (__FILE__, __LINE__, "REGISTER_VIRTUAL_TYPE"), 0)
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS)
+#define DEPRECATED_SAVE_DUMMY_FRAME_TOS(sp) (internal_error (__FILE__, __LINE__, "DEPRECATED_SAVE_DUMMY_FRAME_TOS"), 0)
#endif
-typedef struct type * (gdbarch_register_virtual_type_ftype) (int reg_nr);
-extern struct type * gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr);
-extern void set_gdbarch_register_virtual_type (struct gdbarch *gdbarch, gdbarch_register_virtual_type_ftype *register_virtual_type);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_TYPE)
-#error "Non multi-arch definition of REGISTER_VIRTUAL_TYPE"
+typedef void (gdbarch_deprecated_save_dummy_frame_tos_ftype) (CORE_ADDR sp);
+extern void gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp);
+extern void set_gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, gdbarch_deprecated_save_dummy_frame_tos_ftype *deprecated_save_dummy_frame_tos);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS)
+#error "Non multi-arch definition of DEPRECATED_SAVE_DUMMY_FRAME_TOS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_VIRTUAL_TYPE)
-#define REGISTER_VIRTUAL_TYPE(reg_nr) (gdbarch_register_virtual_type (current_gdbarch, reg_nr))
+#if !defined (DEPRECATED_SAVE_DUMMY_FRAME_TOS)
+#define DEPRECATED_SAVE_DUMMY_FRAME_TOS(sp) (gdbarch_deprecated_save_dummy_frame_tos (current_gdbarch, sp))
#endif
+
+/* Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete
+ DEPRECATED_FP_REGNUM. */
+
+/* Default (value) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FP_REGNUM)
+#define DEPRECATED_FP_REGNUM (-1)
#endif
-extern int gdbarch_register_type_p (struct gdbarch *gdbarch);
+extern int gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch);
+extern void set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch, int deprecated_fp_regnum);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FP_REGNUM)
+#error "Non multi-arch definition of DEPRECATED_FP_REGNUM"
+#endif
+#if !defined (DEPRECATED_FP_REGNUM)
+#define DEPRECATED_FP_REGNUM (gdbarch_deprecated_fp_regnum (current_gdbarch))
+#endif
-typedef struct type * (gdbarch_register_type_ftype) (struct gdbarch *gdbarch, int reg_nr);
-extern struct type * gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr);
-extern void set_gdbarch_register_type (struct gdbarch *gdbarch, gdbarch_register_type_ftype *register_type);
+/* Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete
+ DEPRECATED_TARGET_READ_FP. */
-#if defined (DEPRECATED_DO_REGISTERS_INFO)
-/* Legacy for systems yet to multi-arch DEPRECATED_DO_REGISTERS_INFO */
-#if !defined (DEPRECATED_DO_REGISTERS_INFO_P)
-#define DEPRECATED_DO_REGISTERS_INFO_P() (1)
+#if defined (DEPRECATED_TARGET_READ_FP)
+/* Legacy for systems yet to multi-arch DEPRECATED_TARGET_READ_FP */
+#if !defined (DEPRECATED_TARGET_READ_FP_P)
+#define DEPRECATED_TARGET_READ_FP_P() (1)
#endif
#endif
/* Default predicate for non- multi-arch targets. */
-#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DO_REGISTERS_INFO_P)
-#define DEPRECATED_DO_REGISTERS_INFO_P() (0)
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_TARGET_READ_FP_P)
+#define DEPRECATED_TARGET_READ_FP_P() (0)
#endif
-extern int gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DO_REGISTERS_INFO_P)
-#error "Non multi-arch definition of DEPRECATED_DO_REGISTERS_INFO"
+extern int gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_TARGET_READ_FP_P)
+#error "Non multi-arch definition of DEPRECATED_TARGET_READ_FP"
#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DO_REGISTERS_INFO_P)
-#define DEPRECATED_DO_REGISTERS_INFO_P() (gdbarch_deprecated_do_registers_info_p (current_gdbarch))
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_TARGET_READ_FP_P)
+#define DEPRECATED_TARGET_READ_FP_P() (gdbarch_deprecated_target_read_fp_p (current_gdbarch))
#endif
/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DO_REGISTERS_INFO)
-#define DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs) (internal_error (__FILE__, __LINE__, "DEPRECATED_DO_REGISTERS_INFO"), 0)
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_TARGET_READ_FP)
+#define DEPRECATED_TARGET_READ_FP() (internal_error (__FILE__, __LINE__, "DEPRECATED_TARGET_READ_FP"), 0)
#endif
-typedef void (gdbarch_deprecated_do_registers_info_ftype) (int reg_nr, int fpregs);
-extern void gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs);
-extern void set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info);
-#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)
-#define DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs) (gdbarch_deprecated_do_registers_info (current_gdbarch, reg_nr, fpregs))
+typedef CORE_ADDR (gdbarch_deprecated_target_read_fp_ftype) (void);
+extern CORE_ADDR gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch);
+extern void set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch, gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp);
+#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 !defined (DEPRECATED_TARGET_READ_FP)
+#define DEPRECATED_TARGET_READ_FP() (gdbarch_deprecated_target_read_fp (current_gdbarch))
#endif
-typedef void (gdbarch_print_registers_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all);
-extern void gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all);
-extern void set_gdbarch_print_registers_info (struct gdbarch *gdbarch, gdbarch_print_registers_info_ftype *print_registers_info);
-
-extern int gdbarch_print_float_info_p (struct gdbarch *gdbarch);
+/* See gdbint.texinfo. See infcall.c. New, all singing all dancing,
+ replacement for DEPRECATED_PUSH_ARGUMENTS. */
-typedef void (gdbarch_print_float_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
-extern void gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
-extern void set_gdbarch_print_float_info (struct gdbarch *gdbarch, gdbarch_print_float_info_ftype *print_float_info);
+extern int gdbarch_push_dummy_call_p (struct gdbarch *gdbarch);
-extern int gdbarch_print_vector_info_p (struct gdbarch *gdbarch);
+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);
-typedef void (gdbarch_print_vector_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
-extern void gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
-extern void set_gdbarch_print_vector_info (struct gdbarch *gdbarch, gdbarch_print_vector_info_ftype *print_vector_info);
+/* PUSH_DUMMY_CALL is a direct replacement for DEPRECATED_PUSH_ARGUMENTS. */
-/* MAP a GDB RAW register number onto a simulator register number. See
- also include/...-sim.h. */
+#if defined (DEPRECATED_PUSH_ARGUMENTS)
+/* Legacy for systems yet to multi-arch DEPRECATED_PUSH_ARGUMENTS */
+#if !defined (DEPRECATED_PUSH_ARGUMENTS_P)
+#define DEPRECATED_PUSH_ARGUMENTS_P() (1)
+#endif
+#endif
-/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (REGISTER_SIM_REGNO)
-#define REGISTER_SIM_REGNO(reg_nr) (legacy_register_sim_regno (reg_nr))
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_ARGUMENTS_P)
+#define DEPRECATED_PUSH_ARGUMENTS_P() (0)
#endif
-typedef int (gdbarch_register_sim_regno_ftype) (int reg_nr);
-extern int gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr);
-extern void set_gdbarch_register_sim_regno (struct gdbarch *gdbarch, gdbarch_register_sim_regno_ftype *register_sim_regno);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_SIM_REGNO)
-#error "Non multi-arch definition of REGISTER_SIM_REGNO"
+extern int gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_ARGUMENTS_P)
+#error "Non multi-arch definition of DEPRECATED_PUSH_ARGUMENTS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_SIM_REGNO)
-#define REGISTER_SIM_REGNO(reg_nr) (gdbarch_register_sim_regno (current_gdbarch, reg_nr))
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_ARGUMENTS_P)
+#define DEPRECATED_PUSH_ARGUMENTS_P() (gdbarch_deprecated_push_arguments_p (current_gdbarch))
#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_ARGUMENTS)
+#define DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) (internal_error (__FILE__, __LINE__, "DEPRECATED_PUSH_ARGUMENTS"), 0)
#endif
-#if defined (REGISTER_BYTES_OK)
-/* Legacy for systems yet to multi-arch REGISTER_BYTES_OK */
-#if !defined (REGISTER_BYTES_OK_P)
-#define REGISTER_BYTES_OK_P() (1)
+typedef CORE_ADDR (gdbarch_deprecated_push_arguments_ftype) (int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr);
+extern CORE_ADDR gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr);
+extern void set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, gdbarch_deprecated_push_arguments_ftype *deprecated_push_arguments);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_ARGUMENTS)
+#error "Non multi-arch definition of DEPRECATED_PUSH_ARGUMENTS"
#endif
+#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
-/* Default predicate for non- multi-arch targets. */
-#if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTES_OK_P)
-#define REGISTER_BYTES_OK_P() (0)
+/* DEPRECATED_USE_GENERIC_DUMMY_FRAMES can be deleted. Always true. */
+
+/* Default (value) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
+#define DEPRECATED_USE_GENERIC_DUMMY_FRAMES (1)
#endif
-extern int gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES_OK_P)
-#error "Non multi-arch definition of REGISTER_BYTES_OK"
+extern int gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch);
+extern void set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch, int deprecated_use_generic_dummy_frames);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
+#error "Non multi-arch definition of DEPRECATED_USE_GENERIC_DUMMY_FRAMES"
#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTES_OK_P)
-#define REGISTER_BYTES_OK_P() (gdbarch_register_bytes_ok_p (current_gdbarch))
+#if !defined (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
+#define DEPRECATED_USE_GENERIC_DUMMY_FRAMES (gdbarch_deprecated_use_generic_dummy_frames (current_gdbarch))
#endif
-/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTES_OK)
-#define REGISTER_BYTES_OK(nr_bytes) (internal_error (__FILE__, __LINE__, "REGISTER_BYTES_OK"), 0)
-#endif
+/* Implement PUSH_RETURN_ADDRESS, and then merge in
+ DEPRECATED_PUSH_RETURN_ADDRESS. */
-typedef int (gdbarch_register_bytes_ok_ftype) (long nr_bytes);
-extern int gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes);
-extern void set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch, gdbarch_register_bytes_ok_ftype *register_bytes_ok);
-#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)
-#define REGISTER_BYTES_OK(nr_bytes) (gdbarch_register_bytes_ok (current_gdbarch, nr_bytes))
+#if defined (DEPRECATED_PUSH_RETURN_ADDRESS)
+/* Legacy for systems yet to multi-arch DEPRECATED_PUSH_RETURN_ADDRESS */
+#if !defined (DEPRECATED_PUSH_RETURN_ADDRESS_P)
+#define DEPRECATED_PUSH_RETURN_ADDRESS_P() (1)
#endif
#endif
-/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (CANNOT_FETCH_REGISTER)
-#define CANNOT_FETCH_REGISTER(regnum) (cannot_register_not (regnum))
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_RETURN_ADDRESS_P)
+#define DEPRECATED_PUSH_RETURN_ADDRESS_P() (0)
#endif
-typedef int (gdbarch_cannot_fetch_register_ftype) (int regnum);
-extern int gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum);
-extern void set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, gdbarch_cannot_fetch_register_ftype *cannot_fetch_register);
-#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)
-#define CANNOT_FETCH_REGISTER(regnum) (gdbarch_cannot_fetch_register (current_gdbarch, regnum))
+extern int gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_RETURN_ADDRESS_P)
+#error "Non multi-arch definition of DEPRECATED_PUSH_RETURN_ADDRESS"
#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_RETURN_ADDRESS_P)
+#define DEPRECATED_PUSH_RETURN_ADDRESS_P() (gdbarch_deprecated_push_return_address_p (current_gdbarch))
#endif
/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (CANNOT_STORE_REGISTER)
-#define CANNOT_STORE_REGISTER(regnum) (cannot_register_not (regnum))
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_RETURN_ADDRESS)
+#define DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp) (internal_error (__FILE__, __LINE__, "DEPRECATED_PUSH_RETURN_ADDRESS"), 0)
#endif
-typedef int (gdbarch_cannot_store_register_ftype) (int regnum);
-extern int gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum);
-extern void set_gdbarch_cannot_store_register (struct gdbarch *gdbarch, gdbarch_cannot_store_register_ftype *cannot_store_register);
-#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)
-#define CANNOT_STORE_REGISTER(regnum) (gdbarch_cannot_store_register (current_gdbarch, regnum))
+typedef CORE_ADDR (gdbarch_deprecated_push_return_address_ftype) (CORE_ADDR pc, CORE_ADDR sp);
+extern CORE_ADDR gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp);
+extern void set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, gdbarch_deprecated_push_return_address_ftype *deprecated_push_return_address);
+#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 !defined (DEPRECATED_PUSH_RETURN_ADDRESS)
+#define DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp) (gdbarch_deprecated_push_return_address (current_gdbarch, pc, sp))
#endif
-/* setjmp/longjmp support. */
+/* Implement PUSH_DUMMY_CALL, then merge in DEPRECATED_DUMMY_WRITE_SP. */
-#if defined (GET_LONGJMP_TARGET)
-/* Legacy for systems yet to multi-arch GET_LONGJMP_TARGET */
-#if !defined (GET_LONGJMP_TARGET_P)
-#define GET_LONGJMP_TARGET_P() (1)
+#if defined (DEPRECATED_DUMMY_WRITE_SP)
+/* Legacy for systems yet to multi-arch DEPRECATED_DUMMY_WRITE_SP */
+#if !defined (DEPRECATED_DUMMY_WRITE_SP_P)
+#define DEPRECATED_DUMMY_WRITE_SP_P() (1)
#endif
#endif
/* Default predicate for non- multi-arch targets. */
-#if (!GDB_MULTI_ARCH) && !defined (GET_LONGJMP_TARGET_P)
-#define GET_LONGJMP_TARGET_P() (0)
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DUMMY_WRITE_SP_P)
+#define DEPRECATED_DUMMY_WRITE_SP_P() (0)
#endif
-extern int gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_LONGJMP_TARGET_P)
-#error "Non multi-arch definition of GET_LONGJMP_TARGET"
+extern int gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DUMMY_WRITE_SP_P)
+#error "Non multi-arch definition of DEPRECATED_DUMMY_WRITE_SP"
#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (GET_LONGJMP_TARGET_P)
-#define GET_LONGJMP_TARGET_P() (gdbarch_get_longjmp_target_p (current_gdbarch))
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DUMMY_WRITE_SP_P)
+#define DEPRECATED_DUMMY_WRITE_SP_P() (gdbarch_deprecated_dummy_write_sp_p (current_gdbarch))
#endif
/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (GET_LONGJMP_TARGET)
-#define GET_LONGJMP_TARGET(pc) (internal_error (__FILE__, __LINE__, "GET_LONGJMP_TARGET"), 0)
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DUMMY_WRITE_SP)
+#define DEPRECATED_DUMMY_WRITE_SP(val) (internal_error (__FILE__, __LINE__, "DEPRECATED_DUMMY_WRITE_SP"), 0)
#endif
-typedef int (gdbarch_get_longjmp_target_ftype) (CORE_ADDR *pc);
-extern int gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc);
-extern void set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch, gdbarch_get_longjmp_target_ftype *get_longjmp_target);
-#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)
-#define GET_LONGJMP_TARGET(pc) (gdbarch_get_longjmp_target (current_gdbarch, pc))
+typedef void (gdbarch_deprecated_dummy_write_sp_ftype) (CORE_ADDR val);
+extern void gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val);
+extern void set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, gdbarch_deprecated_dummy_write_sp_ftype *deprecated_dummy_write_sp);
+#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 !defined (DEPRECATED_DUMMY_WRITE_SP)
+#define DEPRECATED_DUMMY_WRITE_SP(val) (gdbarch_deprecated_dummy_write_sp (current_gdbarch, val))
#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
- and body contain convoluted #if/#else sequences for determine how
- things should be compiled. Instead of trying to mimic that
- behaviour here (and hence entrench it further) gdbarch simply
- reqires that these methods be set up from the word go. This also
- avoids any potential problems with moving beyond multi-arch partial. */
+/* DEPRECATED_REGISTER_SIZE can be deleted. */
-/* Default (value) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
-#define DEPRECATED_USE_GENERIC_DUMMY_FRAMES (1)
-#endif
-
-extern int gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch);
-extern void set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch, int deprecated_use_generic_dummy_frames);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
-#error "Non multi-arch definition of DEPRECATED_USE_GENERIC_DUMMY_FRAMES"
+extern int gdbarch_deprecated_register_size (struct gdbarch *gdbarch);
+extern void set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch, int deprecated_register_size);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_SIZE)
+#error "Non multi-arch definition of DEPRECATED_REGISTER_SIZE"
#endif
-#if !defined (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
-#define DEPRECATED_USE_GENERIC_DUMMY_FRAMES (gdbarch_deprecated_use_generic_dummy_frames (current_gdbarch))
+#if !defined (DEPRECATED_REGISTER_SIZE)
+#define DEPRECATED_REGISTER_SIZE (gdbarch_deprecated_register_size (current_gdbarch))
#endif
-/* Replaced by push_dummy_code. */
-
/* Default (value) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (CALL_DUMMY_LOCATION)
#define CALL_DUMMY_LOCATION (AT_ENTRY_POINT)
@@ -1169,8 +1081,6 @@ extern void set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, int call_d
#define CALL_DUMMY_LOCATION (gdbarch_call_dummy_location (current_gdbarch))
#endif
-/* Replaced by push_dummy_code. */
-
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (CALL_DUMMY_ADDRESS)
#define CALL_DUMMY_ADDRESS() (entry_point_address ())
@@ -1182,13 +1092,11 @@ 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. */
+/* DEPRECATED_CALL_DUMMY_START_OFFSET can be deleted. */
extern CORE_ADDR gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch);
extern void set_gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch, CORE_ADDR deprecated_call_dummy_start_offset);
@@ -1199,7 +1107,7 @@ extern void set_gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdba
#define DEPRECATED_CALL_DUMMY_START_OFFSET (gdbarch_deprecated_call_dummy_start_offset (current_gdbarch))
#endif
-/* Replaced by push_dummy_code. */
+/* DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET can be deleted. */
extern CORE_ADDR gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch);
extern void set_gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch, CORE_ADDR deprecated_call_dummy_breakpoint_offset);
@@ -1210,7 +1118,7 @@ extern void set_gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch
#define DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET (gdbarch_deprecated_call_dummy_breakpoint_offset (current_gdbarch))
#endif
-/* Replaced by push_dummy_code. */
+/* DEPRECATED_CALL_DUMMY_LENGTH can be deleted. */
extern int gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch);
extern void set_gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch, int deprecated_call_dummy_length);
@@ -1221,50 +1129,7 @@ extern void set_gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch, i
#define DEPRECATED_CALL_DUMMY_LENGTH (gdbarch_deprecated_call_dummy_length (current_gdbarch))
#endif
-/* NOTE: cagney/2002-11-24: This function with predicate has a valid
- (callable) initial value. As a consequence, even when the predicate
- is false, the corresponding function works. This simplifies the
- migration process - old code, calling DEPRECATED_PC_IN_CALL_DUMMY(),
- doesn't need to be modified. */
-
-#if defined (DEPRECATED_PC_IN_CALL_DUMMY)
-/* Legacy for systems yet to multi-arch DEPRECATED_PC_IN_CALL_DUMMY */
-#if !defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
-#define DEPRECATED_PC_IN_CALL_DUMMY_P() (1)
-#endif
-#endif
-
-/* Default predicate for non- multi-arch targets. */
-#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
-#define DEPRECATED_PC_IN_CALL_DUMMY_P() (0)
-#endif
-
-extern int gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
-#error "Non multi-arch definition of DEPRECATED_PC_IN_CALL_DUMMY"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
-#define DEPRECATED_PC_IN_CALL_DUMMY_P() (gdbarch_deprecated_pc_in_call_dummy_p (current_gdbarch))
-#endif
-
-/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PC_IN_CALL_DUMMY)
-#define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) (generic_pc_in_call_dummy (pc, sp, frame_address))
-#endif
-
-typedef int (gdbarch_deprecated_pc_in_call_dummy_ftype) (CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address);
-extern int gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address);
-extern void set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy);
-#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)
-#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. */
+/* DEPRECATED_CALL_DUMMY_WORDS can be deleted. */
/* Default (value) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_CALL_DUMMY_WORDS)
@@ -1280,7 +1145,7 @@ extern void set_gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch, LO
#define DEPRECATED_CALL_DUMMY_WORDS (gdbarch_deprecated_call_dummy_words (current_gdbarch))
#endif
-/* Replaced by push_dummy_code. */
+/* Implement PUSH_DUMMY_CALL, then delete DEPRECATED_SIZEOF_CALL_DUMMY_WORDS. */
/* Default (value) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS)
@@ -1296,7 +1161,7 @@ extern void set_gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdba
#define DEPRECATED_SIZEOF_CALL_DUMMY_WORDS (gdbarch_deprecated_sizeof_call_dummy_words (current_gdbarch))
#endif
-/* Replaced by push_dummy_code. */
+/* Implement PUSH_DUMMY_CALL, then delete DEPRECATED_CALL_DUMMY_STACK_ADJUST. */
#if defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST)
/* Legacy for systems yet to multi-arch DEPRECATED_CALL_DUMMY_STACK_ADJUST */
@@ -1328,13 +1193,12 @@ 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. */
+/* DEPRECATED_FIX_CALL_DUMMY can be deleted. For the SPARC, implement
+ PUSH_DUMMY_CODE and set CALL_DUMMY_LOCATION to ON_STACK. */
#if defined (DEPRECATED_FIX_CALL_DUMMY)
/* Legacy for systems yet to multi-arch DEPRECATED_FIX_CALL_DUMMY */
@@ -1367,11 +1231,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. */
@@ -1381,6 +1243,272 @@ typedef CORE_ADDR (gdbarch_push_dummy_code_ftype) (struct gdbarch *gdbarch, CORE
extern CORE_ADDR gdbarch_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr);
extern void set_gdbarch_push_dummy_code (struct gdbarch *gdbarch, gdbarch_push_dummy_code_ftype *push_dummy_code);
+/* Implement PUSH_DUMMY_CALL, then delete DEPRECATED_PUSH_DUMMY_FRAME. */
+
+#if defined (DEPRECATED_PUSH_DUMMY_FRAME)
+/* Legacy for systems yet to multi-arch DEPRECATED_PUSH_DUMMY_FRAME */
+#if !defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
+#define DEPRECATED_PUSH_DUMMY_FRAME_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
+#define DEPRECATED_PUSH_DUMMY_FRAME_P() (0)
+#endif
+
+extern int gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
+#error "Non multi-arch definition of DEPRECATED_PUSH_DUMMY_FRAME"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
+#define DEPRECATED_PUSH_DUMMY_FRAME_P() (gdbarch_deprecated_push_dummy_frame_p (current_gdbarch))
+#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_DUMMY_FRAME)
+#define DEPRECATED_PUSH_DUMMY_FRAME (internal_error (__FILE__, __LINE__, "DEPRECATED_PUSH_DUMMY_FRAME"), 0)
+#endif
+
+typedef void (gdbarch_deprecated_push_dummy_frame_ftype) (void);
+extern void gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch);
+extern void set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch, gdbarch_deprecated_push_dummy_frame_ftype *deprecated_push_dummy_frame);
+#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 !defined (DEPRECATED_PUSH_DUMMY_FRAME)
+#define DEPRECATED_PUSH_DUMMY_FRAME (gdbarch_deprecated_push_dummy_frame (current_gdbarch))
+#endif
+
+/* Implement PUSH_DUMMY_CALL, then delete
+ DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED. */
+
+/* Default (value) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED)
+#define DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED (0)
+#endif
+
+extern int gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch);
+extern void set_gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch, int deprecated_extra_stack_alignment_needed);
+#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 !defined (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED)
+#define DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED (gdbarch_deprecated_extra_stack_alignment_needed (current_gdbarch))
+#endif
+
+#if defined (DEPRECATED_DO_REGISTERS_INFO)
+/* Legacy for systems yet to multi-arch DEPRECATED_DO_REGISTERS_INFO */
+#if !defined (DEPRECATED_DO_REGISTERS_INFO_P)
+#define DEPRECATED_DO_REGISTERS_INFO_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DO_REGISTERS_INFO_P)
+#define DEPRECATED_DO_REGISTERS_INFO_P() (0)
+#endif
+
+extern int gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DO_REGISTERS_INFO_P)
+#error "Non multi-arch definition of DEPRECATED_DO_REGISTERS_INFO"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DO_REGISTERS_INFO_P)
+#define DEPRECATED_DO_REGISTERS_INFO_P() (gdbarch_deprecated_do_registers_info_p (current_gdbarch))
+#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DO_REGISTERS_INFO)
+#define DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs) (internal_error (__FILE__, __LINE__, "DEPRECATED_DO_REGISTERS_INFO"), 0)
+#endif
+
+typedef void (gdbarch_deprecated_do_registers_info_ftype) (int reg_nr, int fpregs);
+extern void gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs);
+extern void set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info);
+#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 !defined (DEPRECATED_DO_REGISTERS_INFO)
+#define DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs) (gdbarch_deprecated_do_registers_info (current_gdbarch, reg_nr, fpregs))
+#endif
+
+typedef void (gdbarch_print_registers_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all);
+extern void gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all);
+extern void set_gdbarch_print_registers_info (struct gdbarch *gdbarch, gdbarch_print_registers_info_ftype *print_registers_info);
+
+extern int gdbarch_print_float_info_p (struct gdbarch *gdbarch);
+
+typedef void (gdbarch_print_float_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
+extern void gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
+extern void set_gdbarch_print_float_info (struct gdbarch *gdbarch, gdbarch_print_float_info_ftype *print_float_info);
+
+extern int gdbarch_print_vector_info_p (struct gdbarch *gdbarch);
+
+typedef void (gdbarch_print_vector_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
+extern void gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args);
+extern void set_gdbarch_print_vector_info (struct gdbarch *gdbarch, gdbarch_print_vector_info_ftype *print_vector_info);
+
+/* MAP a GDB RAW register number onto a simulator register number. See
+ also include/...-sim.h. */
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (REGISTER_SIM_REGNO)
+#define REGISTER_SIM_REGNO(reg_nr) (legacy_register_sim_regno (reg_nr))
+#endif
+
+typedef int (gdbarch_register_sim_regno_ftype) (int reg_nr);
+extern int gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr);
+extern void set_gdbarch_register_sim_regno (struct gdbarch *gdbarch, gdbarch_register_sim_regno_ftype *register_sim_regno);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_SIM_REGNO)
+#error "Non multi-arch definition of REGISTER_SIM_REGNO"
+#endif
+#if !defined (REGISTER_SIM_REGNO)
+#define REGISTER_SIM_REGNO(reg_nr) (gdbarch_register_sim_regno (current_gdbarch, reg_nr))
+#endif
+
+#if defined (REGISTER_BYTES_OK)
+/* Legacy for systems yet to multi-arch REGISTER_BYTES_OK */
+#if !defined (REGISTER_BYTES_OK_P)
+#define REGISTER_BYTES_OK_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTES_OK_P)
+#define REGISTER_BYTES_OK_P() (0)
+#endif
+
+extern int gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES_OK_P)
+#error "Non multi-arch definition of REGISTER_BYTES_OK"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTES_OK_P)
+#define REGISTER_BYTES_OK_P() (gdbarch_register_bytes_ok_p (current_gdbarch))
+#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (REGISTER_BYTES_OK)
+#define REGISTER_BYTES_OK(nr_bytes) (internal_error (__FILE__, __LINE__, "REGISTER_BYTES_OK"), 0)
+#endif
+
+typedef int (gdbarch_register_bytes_ok_ftype) (long nr_bytes);
+extern int gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes);
+extern void set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch, gdbarch_register_bytes_ok_ftype *register_bytes_ok);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES_OK)
+#error "Non multi-arch definition of REGISTER_BYTES_OK"
+#endif
+#if !defined (REGISTER_BYTES_OK)
+#define REGISTER_BYTES_OK(nr_bytes) (gdbarch_register_bytes_ok (current_gdbarch, nr_bytes))
+#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (CANNOT_FETCH_REGISTER)
+#define CANNOT_FETCH_REGISTER(regnum) (cannot_register_not (regnum))
+#endif
+
+typedef int (gdbarch_cannot_fetch_register_ftype) (int regnum);
+extern int gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum);
+extern void set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, gdbarch_cannot_fetch_register_ftype *cannot_fetch_register);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_FETCH_REGISTER)
+#error "Non multi-arch definition of CANNOT_FETCH_REGISTER"
+#endif
+#if !defined (CANNOT_FETCH_REGISTER)
+#define CANNOT_FETCH_REGISTER(regnum) (gdbarch_cannot_fetch_register (current_gdbarch, regnum))
+#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (CANNOT_STORE_REGISTER)
+#define CANNOT_STORE_REGISTER(regnum) (cannot_register_not (regnum))
+#endif
+
+typedef int (gdbarch_cannot_store_register_ftype) (int regnum);
+extern int gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum);
+extern void set_gdbarch_cannot_store_register (struct gdbarch *gdbarch, gdbarch_cannot_store_register_ftype *cannot_store_register);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_STORE_REGISTER)
+#error "Non multi-arch definition of CANNOT_STORE_REGISTER"
+#endif
+#if !defined (CANNOT_STORE_REGISTER)
+#define CANNOT_STORE_REGISTER(regnum) (gdbarch_cannot_store_register (current_gdbarch, regnum))
+#endif
+
+/* setjmp/longjmp support. */
+
+#if defined (GET_LONGJMP_TARGET)
+/* Legacy for systems yet to multi-arch GET_LONGJMP_TARGET */
+#if !defined (GET_LONGJMP_TARGET_P)
+#define GET_LONGJMP_TARGET_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (GET_LONGJMP_TARGET_P)
+#define GET_LONGJMP_TARGET_P() (0)
+#endif
+
+extern int gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_LONGJMP_TARGET_P)
+#error "Non multi-arch definition of GET_LONGJMP_TARGET"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (GET_LONGJMP_TARGET_P)
+#define GET_LONGJMP_TARGET_P() (gdbarch_get_longjmp_target_p (current_gdbarch))
+#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (GET_LONGJMP_TARGET)
+#define GET_LONGJMP_TARGET(pc) (internal_error (__FILE__, __LINE__, "GET_LONGJMP_TARGET"), 0)
+#endif
+
+typedef int (gdbarch_get_longjmp_target_ftype) (CORE_ADDR *pc);
+extern int gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc);
+extern void set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch, gdbarch_get_longjmp_target_ftype *get_longjmp_target);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_LONGJMP_TARGET)
+#error "Non multi-arch definition of GET_LONGJMP_TARGET"
+#endif
+#if !defined (GET_LONGJMP_TARGET)
+#define GET_LONGJMP_TARGET(pc) (gdbarch_get_longjmp_target (current_gdbarch, pc))
+#endif
+
+/* NOTE: cagney/2002-11-24: This function with predicate has a valid
+ (callable) initial value. As a consequence, even when the predicate
+ is false, the corresponding function works. This simplifies the
+ migration process - old code, calling DEPRECATED_PC_IN_CALL_DUMMY(),
+ doesn't need to be modified. */
+
+#if defined (DEPRECATED_PC_IN_CALL_DUMMY)
+/* Legacy for systems yet to multi-arch DEPRECATED_PC_IN_CALL_DUMMY */
+#if !defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
+#define DEPRECATED_PC_IN_CALL_DUMMY_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
+#define DEPRECATED_PC_IN_CALL_DUMMY_P() (0)
+#endif
+
+extern int gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
+#error "Non multi-arch definition of DEPRECATED_PC_IN_CALL_DUMMY"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PC_IN_CALL_DUMMY_P)
+#define DEPRECATED_PC_IN_CALL_DUMMY_P() (gdbarch_deprecated_pc_in_call_dummy_p (current_gdbarch))
+#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PC_IN_CALL_DUMMY)
+#define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) (generic_pc_in_call_dummy (pc, sp, frame_address))
+#endif
+
+typedef int (gdbarch_deprecated_pc_in_call_dummy_ftype) (CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address);
+extern int gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address);
+extern void set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy);
+#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 !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
+
#if defined (DEPRECATED_INIT_FRAME_PC_FIRST)
/* Legacy for systems yet to multi-arch DEPRECATED_INIT_FRAME_PC_FIRST */
#if !defined (DEPRECATED_INIT_FRAME_PC_FIRST_P)
@@ -1412,11 +1540,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 +1575,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,112 +1628,107 @@ 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
+
+/* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
+ For raw <-> cooked register conversions, replaced by pseudo registers. */
/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (REGISTER_CONVERTIBLE)
-#define REGISTER_CONVERTIBLE(nr) (generic_register_convertible_not (nr))
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_REGISTER_CONVERTIBLE)
+#define DEPRECATED_REGISTER_CONVERTIBLE(nr) (deprecated_register_convertible_not (nr))
#endif
-typedef int (gdbarch_register_convertible_ftype) (int nr);
-extern int gdbarch_register_convertible (struct gdbarch *gdbarch, int nr);
-extern void set_gdbarch_register_convertible (struct gdbarch *gdbarch, gdbarch_register_convertible_ftype *register_convertible);
-#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)
-#define REGISTER_CONVERTIBLE(nr) (gdbarch_register_convertible (current_gdbarch, nr))
+typedef int (gdbarch_deprecated_register_convertible_ftype) (int nr);
+extern int gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, int nr);
+extern void set_gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, gdbarch_deprecated_register_convertible_ftype *deprecated_register_convertible);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERTIBLE)
+#error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERTIBLE"
#endif
+#if !defined (DEPRECATED_REGISTER_CONVERTIBLE)
+#define DEPRECATED_REGISTER_CONVERTIBLE(nr) (gdbarch_deprecated_register_convertible (current_gdbarch, nr))
#endif
+/* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
+ For raw <-> cooked register conversions, replaced by pseudo registers. */
+
/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (REGISTER_CONVERT_TO_VIRTUAL)
-#define REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (internal_error (__FILE__, __LINE__, "REGISTER_CONVERT_TO_VIRTUAL"), 0)
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL)
+#define DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (internal_error (__FILE__, __LINE__, "DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL"), 0)
#endif
-typedef void (gdbarch_register_convert_to_virtual_ftype) (int regnum, struct type *type, char *from, char *to);
-extern void gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to);
-extern void set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual);
-#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)
-#define REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (gdbarch_register_convert_to_virtual (current_gdbarch, regnum, type, from, to))
+typedef void (gdbarch_deprecated_register_convert_to_virtual_ftype) (int regnum, struct type *type, char *from, char *to);
+extern void gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to);
+extern void set_gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, gdbarch_deprecated_register_convert_to_virtual_ftype *deprecated_register_convert_to_virtual);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL)
+#error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL"
#endif
+#if !defined (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL)
+#define DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (gdbarch_deprecated_register_convert_to_virtual (current_gdbarch, regnum, type, from, to))
#endif
+/* For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
+ For raw <-> cooked register conversions, replaced by pseudo registers. */
+
/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (REGISTER_CONVERT_TO_RAW)
-#define REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (internal_error (__FILE__, __LINE__, "REGISTER_CONVERT_TO_RAW"), 0)
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_REGISTER_CONVERT_TO_RAW)
+#define DEPRECATED_REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (internal_error (__FILE__, __LINE__, "DEPRECATED_REGISTER_CONVERT_TO_RAW"), 0)
#endif
-typedef void (gdbarch_register_convert_to_raw_ftype) (struct type *type, int regnum, char *from, char *to);
-extern void gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to);
-extern void set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, gdbarch_register_convert_to_raw_ftype *register_convert_to_raw);
-#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)
-#define REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (gdbarch_register_convert_to_raw (current_gdbarch, type, regnum, from, to))
+typedef void (gdbarch_deprecated_register_convert_to_raw_ftype) (struct type *type, int regnum, const char *from, char *to);
+extern void gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, const char *from, char *to);
+extern void set_gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, gdbarch_deprecated_register_convert_to_raw_ftype *deprecated_register_convert_to_raw);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_CONVERT_TO_RAW)
+#error "Non multi-arch definition of DEPRECATED_REGISTER_CONVERT_TO_RAW"
#endif
+#if !defined (DEPRECATED_REGISTER_CONVERT_TO_RAW)
+#define DEPRECATED_REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (gdbarch_deprecated_register_convert_to_raw (current_gdbarch, type, regnum, from, to))
#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (CONVERT_REGISTER_P)
-#define CONVERT_REGISTER_P(regnum) (legacy_convert_register_p (regnum))
+#define CONVERT_REGISTER_P(regnum, type) (legacy_convert_register_p (regnum, type))
#endif
-typedef int (gdbarch_convert_register_p_ftype) (int regnum);
-extern int gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum);
+typedef int (gdbarch_convert_register_p_ftype) (int regnum, struct type *type);
+extern int gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type);
extern void set_gdbarch_convert_register_p (struct gdbarch *gdbarch, gdbarch_convert_register_p_ftype *convert_register_p);
#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)
-#define CONVERT_REGISTER_P(regnum) (gdbarch_convert_register_p (current_gdbarch, regnum))
-#endif
+#if !defined (CONVERT_REGISTER_P)
+#define CONVERT_REGISTER_P(regnum, type) (gdbarch_convert_register_p (current_gdbarch, regnum, type))
#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (REGISTER_TO_VALUE)
-#define REGISTER_TO_VALUE(regnum, type, from, to) (legacy_register_to_value (regnum, type, from, to))
+#define REGISTER_TO_VALUE(frame, regnum, type, buf) (legacy_register_to_value (frame, regnum, type, buf))
#endif
-typedef void (gdbarch_register_to_value_ftype) (int regnum, struct type *type, char *from, char *to);
-extern void gdbarch_register_to_value (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to);
+typedef void (gdbarch_register_to_value_ftype) (struct frame_info *frame, int regnum, struct type *type, void *buf);
+extern void gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, void *buf);
extern void set_gdbarch_register_to_value (struct gdbarch *gdbarch, gdbarch_register_to_value_ftype *register_to_value);
#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)
-#define REGISTER_TO_VALUE(regnum, type, from, to) (gdbarch_register_to_value (current_gdbarch, regnum, type, from, to))
-#endif
+#if !defined (REGISTER_TO_VALUE)
+#define REGISTER_TO_VALUE(frame, regnum, type, buf) (gdbarch_register_to_value (current_gdbarch, frame, regnum, type, buf))
#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (VALUE_TO_REGISTER)
-#define VALUE_TO_REGISTER(type, regnum, from, to) (legacy_value_to_register (type, regnum, from, to))
+#define VALUE_TO_REGISTER(frame, regnum, type, buf) (legacy_value_to_register (frame, regnum, type, buf))
#endif
-typedef void (gdbarch_value_to_register_ftype) (struct type *type, int regnum, char *from, char *to);
-extern void gdbarch_value_to_register (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to);
+typedef void (gdbarch_value_to_register_ftype) (struct frame_info *frame, int regnum, struct type *type, const void *buf);
+extern void gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const void *buf);
extern void set_gdbarch_value_to_register (struct gdbarch *gdbarch, gdbarch_value_to_register_ftype *value_to_register);
#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)
-#define VALUE_TO_REGISTER(type, regnum, from, to) (gdbarch_value_to_register (current_gdbarch, type, regnum, from, to))
-#endif
+#if !defined (VALUE_TO_REGISTER)
+#define VALUE_TO_REGISTER(frame, regnum, type, buf) (gdbarch_value_to_register (current_gdbarch, frame, regnum, type, buf))
#endif
/* Default (function) for non- multi-arch platforms. */
@@ -1625,11 +1742,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 +1757,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 +1792,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,132 +1807,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 */
-
-#if defined (DEPRECATED_PUSH_ARGUMENTS)
-/* Legacy for systems yet to multi-arch DEPRECATED_PUSH_ARGUMENTS */
-#if !defined (DEPRECATED_PUSH_ARGUMENTS_P)
-#define DEPRECATED_PUSH_ARGUMENTS_P() (1)
-#endif
-#endif
-
-/* Default predicate for non- multi-arch targets. */
-#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_ARGUMENTS_P)
-#define DEPRECATED_PUSH_ARGUMENTS_P() (0)
-#endif
-
-extern int gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_ARGUMENTS_P)
-#error "Non multi-arch definition of DEPRECATED_PUSH_ARGUMENTS"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_ARGUMENTS_P)
-#define DEPRECATED_PUSH_ARGUMENTS_P() (gdbarch_deprecated_push_arguments_p (current_gdbarch))
-#endif
-
-/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_ARGUMENTS)
-#define DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) (internal_error (__FILE__, __LINE__, "DEPRECATED_PUSH_ARGUMENTS"), 0)
-#endif
-
-typedef CORE_ADDR (gdbarch_deprecated_push_arguments_ftype) (int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr);
-extern CORE_ADDR gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr);
-extern void set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, gdbarch_deprecated_push_arguments_ftype *deprecated_push_arguments);
-#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)
-#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);
-extern void set_gdbarch_push_dummy_call (struct gdbarch *gdbarch, gdbarch_push_dummy_call_ftype *push_dummy_call);
-
-#if defined (DEPRECATED_PUSH_DUMMY_FRAME)
-/* Legacy for systems yet to multi-arch DEPRECATED_PUSH_DUMMY_FRAME */
-#if !defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
-#define DEPRECATED_PUSH_DUMMY_FRAME_P() (1)
-#endif
-#endif
-
-/* Default predicate for non- multi-arch targets. */
-#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
-#define DEPRECATED_PUSH_DUMMY_FRAME_P() (0)
-#endif
-
-extern int gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
-#error "Non multi-arch definition of DEPRECATED_PUSH_DUMMY_FRAME"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_DUMMY_FRAME_P)
-#define DEPRECATED_PUSH_DUMMY_FRAME_P() (gdbarch_deprecated_push_dummy_frame_p (current_gdbarch))
-#endif
-
-/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_DUMMY_FRAME)
-#define DEPRECATED_PUSH_DUMMY_FRAME (internal_error (__FILE__, __LINE__, "DEPRECATED_PUSH_DUMMY_FRAME"), 0)
-#endif
-
-typedef void (gdbarch_deprecated_push_dummy_frame_ftype) (void);
-extern void gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch);
-extern void set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch, gdbarch_deprecated_push_dummy_frame_ftype *deprecated_push_dummy_frame);
-#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)
-#define DEPRECATED_PUSH_DUMMY_FRAME (gdbarch_deprecated_push_dummy_frame (current_gdbarch))
-#endif
-#endif
-
-/* NOTE: This can be handled directly in push_dummy_call. */
-
-#if defined (DEPRECATED_PUSH_RETURN_ADDRESS)
-/* Legacy for systems yet to multi-arch DEPRECATED_PUSH_RETURN_ADDRESS */
-#if !defined (DEPRECATED_PUSH_RETURN_ADDRESS_P)
-#define DEPRECATED_PUSH_RETURN_ADDRESS_P() (1)
-#endif
-#endif
-
-/* Default predicate for non- multi-arch targets. */
-#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_RETURN_ADDRESS_P)
-#define DEPRECATED_PUSH_RETURN_ADDRESS_P() (0)
-#endif
-
-extern int gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_RETURN_ADDRESS_P)
-#error "Non multi-arch definition of DEPRECATED_PUSH_RETURN_ADDRESS"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_RETURN_ADDRESS_P)
-#define DEPRECATED_PUSH_RETURN_ADDRESS_P() (gdbarch_deprecated_push_return_address_p (current_gdbarch))
-#endif
-
-/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_PUSH_RETURN_ADDRESS)
-#define DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp) (internal_error (__FILE__, __LINE__, "DEPRECATED_PUSH_RETURN_ADDRESS"), 0)
-#endif
-
-typedef CORE_ADDR (gdbarch_deprecated_push_return_address_ftype) (CORE_ADDR pc, CORE_ADDR sp);
-extern CORE_ADDR gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp);
-extern void set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, gdbarch_deprecated_push_return_address_ftype *deprecated_push_return_address);
-#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)
-#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 +1842,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 +1879,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 +1894,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 +1909,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 +1919,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 +1929,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 +1964,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 +1999,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 +2014,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 +2049,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 +2084,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 +2094,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 +2109,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 +2119,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 +2129,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 +2144,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,50 +2159,27 @@ 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)
-#define PREPARE_TO_PROCEED(select_it) (default_prepare_to_proceed (select_it))
-#endif
-
-typedef int (gdbarch_prepare_to_proceed_ftype) (int select_it);
-extern int gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it);
-extern void set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, gdbarch_prepare_to_proceed_ftype *prepare_to_proceed);
-#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)
-#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 +2190,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 +2205,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 +2240,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 +2275,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 +2314,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);
@@ -2401,38 +2324,86 @@ typedef CORE_ADDR (gdbarch_unwind_pc_ftype) (struct gdbarch *gdbarch, struct fra
extern CORE_ADDR gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame);
extern void set_gdbarch_unwind_pc (struct gdbarch *gdbarch, gdbarch_unwind_pc_ftype *unwind_pc);
-/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (FRAME_ARGS_ADDRESS)
-#define FRAME_ARGS_ADDRESS(fi) (get_frame_base (fi))
+extern int gdbarch_unwind_sp_p (struct gdbarch *gdbarch);
+
+typedef CORE_ADDR (gdbarch_unwind_sp_ftype) (struct gdbarch *gdbarch, struct frame_info *next_frame);
+extern CORE_ADDR gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame);
+extern void set_gdbarch_unwind_sp (struct gdbarch *gdbarch, gdbarch_unwind_sp_ftype *unwind_sp);
+
+/* DEPRECATED_FRAME_ARGS_ADDRESS as been replaced by the per-frame
+ frame-base. Enable frame-base before frame-unwind. */
+
+#if defined (DEPRECATED_FRAME_ARGS_ADDRESS)
+/* Legacy for systems yet to multi-arch DEPRECATED_FRAME_ARGS_ADDRESS */
+#if !defined (DEPRECATED_FRAME_ARGS_ADDRESS_P)
+#define DEPRECATED_FRAME_ARGS_ADDRESS_P() (1)
+#endif
#endif
-typedef CORE_ADDR (gdbarch_frame_args_address_ftype) (struct frame_info *fi);
-extern CORE_ADDR gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi);
-extern void set_gdbarch_frame_args_address (struct gdbarch *gdbarch, gdbarch_frame_args_address_ftype *frame_args_address);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_ARGS_ADDRESS)
-#error "Non multi-arch definition of FRAME_ARGS_ADDRESS"
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_ARGS_ADDRESS_P)
+#define DEPRECATED_FRAME_ARGS_ADDRESS_P() (0)
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_ARGS_ADDRESS)
-#define FRAME_ARGS_ADDRESS(fi) (gdbarch_frame_args_address (current_gdbarch, fi))
+
+extern int gdbarch_deprecated_frame_args_address_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_ARGS_ADDRESS_P)
+#error "Non multi-arch definition of DEPRECATED_FRAME_ARGS_ADDRESS"
#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_ARGS_ADDRESS_P)
+#define DEPRECATED_FRAME_ARGS_ADDRESS_P() (gdbarch_deprecated_frame_args_address_p (current_gdbarch))
#endif
/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (FRAME_LOCALS_ADDRESS)
-#define FRAME_LOCALS_ADDRESS(fi) (get_frame_base (fi))
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_ARGS_ADDRESS)
+#define DEPRECATED_FRAME_ARGS_ADDRESS(fi) (get_frame_base (fi))
+#endif
+
+typedef CORE_ADDR (gdbarch_deprecated_frame_args_address_ftype) (struct frame_info *fi);
+extern CORE_ADDR gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi);
+extern void set_gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, gdbarch_deprecated_frame_args_address_ftype *deprecated_frame_args_address);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_ARGS_ADDRESS)
+#error "Non multi-arch definition of DEPRECATED_FRAME_ARGS_ADDRESS"
+#endif
+#if !defined (DEPRECATED_FRAME_ARGS_ADDRESS)
+#define DEPRECATED_FRAME_ARGS_ADDRESS(fi) (gdbarch_deprecated_frame_args_address (current_gdbarch, fi))
+#endif
+
+/* DEPRECATED_FRAME_LOCALS_ADDRESS as been replaced by the per-frame
+ frame-base. Enable frame-base before frame-unwind. */
+
+#if defined (DEPRECATED_FRAME_LOCALS_ADDRESS)
+/* Legacy for systems yet to multi-arch DEPRECATED_FRAME_LOCALS_ADDRESS */
+#if !defined (DEPRECATED_FRAME_LOCALS_ADDRESS_P)
+#define DEPRECATED_FRAME_LOCALS_ADDRESS_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_LOCALS_ADDRESS_P)
+#define DEPRECATED_FRAME_LOCALS_ADDRESS_P() (0)
#endif
-typedef CORE_ADDR (gdbarch_frame_locals_address_ftype) (struct frame_info *fi);
-extern CORE_ADDR gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi);
-extern void set_gdbarch_frame_locals_address (struct gdbarch *gdbarch, gdbarch_frame_locals_address_ftype *frame_locals_address);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_LOCALS_ADDRESS)
-#error "Non multi-arch definition of FRAME_LOCALS_ADDRESS"
+extern int gdbarch_deprecated_frame_locals_address_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_LOCALS_ADDRESS_P)
+#error "Non multi-arch definition of DEPRECATED_FRAME_LOCALS_ADDRESS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_LOCALS_ADDRESS)
-#define FRAME_LOCALS_ADDRESS(fi) (gdbarch_frame_locals_address (current_gdbarch, fi))
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_LOCALS_ADDRESS_P)
+#define DEPRECATED_FRAME_LOCALS_ADDRESS_P() (gdbarch_deprecated_frame_locals_address_p (current_gdbarch))
#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FRAME_LOCALS_ADDRESS)
+#define DEPRECATED_FRAME_LOCALS_ADDRESS(fi) (get_frame_base (fi))
+#endif
+
+typedef CORE_ADDR (gdbarch_deprecated_frame_locals_address_ftype) (struct frame_info *fi);
+extern CORE_ADDR gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi);
+extern void set_gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, gdbarch_deprecated_frame_locals_address_ftype *deprecated_frame_locals_address);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_LOCALS_ADDRESS)
+#error "Non multi-arch definition of DEPRECATED_FRAME_LOCALS_ADDRESS"
+#endif
+#if !defined (DEPRECATED_FRAME_LOCALS_ADDRESS)
+#define DEPRECATED_FRAME_LOCALS_ADDRESS(fi) (gdbarch_deprecated_frame_locals_address (current_gdbarch, fi))
#endif
#if defined (DEPRECATED_SAVED_PC_AFTER_CALL)
@@ -2466,10 +2437,33 @@ 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
+
+#if defined (FRAME_NUM_ARGS)
+/* Legacy for systems yet to multi-arch FRAME_NUM_ARGS */
+#if !defined (FRAME_NUM_ARGS_P)
+#define FRAME_NUM_ARGS_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (FRAME_NUM_ARGS_P)
+#define FRAME_NUM_ARGS_P() (0)
+#endif
+
+extern int gdbarch_frame_num_args_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_NUM_ARGS_P)
+#error "Non multi-arch definition of FRAME_NUM_ARGS"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_NUM_ARGS_P)
+#define FRAME_NUM_ARGS_P() (gdbarch_frame_num_args_p (current_gdbarch))
+#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (FRAME_NUM_ARGS)
+#define FRAME_NUM_ARGS(frame) (internal_error (__FILE__, __LINE__, "FRAME_NUM_ARGS"), 0)
#endif
typedef int (gdbarch_frame_num_args_ftype) (struct frame_info *frame);
@@ -2478,11 +2472,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 +2507,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);
@@ -2527,24 +2517,6 @@ typedef CORE_ADDR (gdbarch_frame_align_ftype) (struct gdbarch *gdbarch, CORE_ADD
extern CORE_ADDR gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address);
extern void set_gdbarch_frame_align (struct gdbarch *gdbarch, gdbarch_frame_align_ftype *frame_align);
-/* NOTE: cagney/2003-03-24: This is better handled by PUSH_ARGUMENTS. */
-
-/* Default (value) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED)
-#define DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED (0)
-#endif
-
-extern int gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch);
-extern void set_gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch, int deprecated_extra_stack_alignment_needed);
-#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)
-#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 */
#if !defined (REG_STRUCT_HAS_ADDR_P)
@@ -2576,68 +2548,18 @@ 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. */
-
-#if defined (SAVE_DUMMY_FRAME_TOS)
-/* Legacy for systems yet to multi-arch SAVE_DUMMY_FRAME_TOS */
-#if !defined (SAVE_DUMMY_FRAME_TOS_P)
-#define SAVE_DUMMY_FRAME_TOS_P() (1)
-#endif
-#endif
-
-/* Default predicate for non- multi-arch targets. */
-#if (!GDB_MULTI_ARCH) && !defined (SAVE_DUMMY_FRAME_TOS_P)
-#define SAVE_DUMMY_FRAME_TOS_P() (0)
-#endif
-
-extern int gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SAVE_DUMMY_FRAME_TOS_P)
-#error "Non multi-arch definition of SAVE_DUMMY_FRAME_TOS"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SAVE_DUMMY_FRAME_TOS_P)
-#define SAVE_DUMMY_FRAME_TOS_P() (gdbarch_save_dummy_frame_tos_p (current_gdbarch))
-#endif
-
-/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (SAVE_DUMMY_FRAME_TOS)
-#define SAVE_DUMMY_FRAME_TOS(sp) (internal_error (__FILE__, __LINE__, "SAVE_DUMMY_FRAME_TOS"), 0)
-#endif
-
-typedef void (gdbarch_save_dummy_frame_tos_ftype) (CORE_ADDR sp);
-extern void gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp);
-extern void set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos);
-#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)
-#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);
-
-typedef struct frame_id (gdbarch_unwind_dummy_id_ftype) (struct gdbarch *gdbarch, struct frame_info *info);
-extern struct frame_id gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info);
-extern void set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, gdbarch_unwind_dummy_id_ftype *unwind_dummy_id);
extern int gdbarch_parm_boundary (struct gdbarch *gdbarch);
extern void set_gdbarch_parm_boundary (struct gdbarch *gdbarch, int parm_boundary);
#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 +2571,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 +2585,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 +2599,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 +2614,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 +2639,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 +2657,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 +2701,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 +2716,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 +2731,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 +2750,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 +2767,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 +2803,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 +2838,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 +2873,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 +2935,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 +2950,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 +2965,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 +2979,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 +2993,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 +3007,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 +3042,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 +3064,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..494b916ffe4 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -426,14 +426,10 @@ v:2:TARGET_BFD_VMA_BIT:int:bfd_vma_bit::::8 * sizeof (void*):TARGET_ARCHITECTURE
# One if \`char' acts like \`signed char', zero if \`unsigned char'.
v:2:TARGET_CHAR_SIGNED:int:char_signed::::1:-1:1::::
#
-f:2:TARGET_READ_PC:CORE_ADDR:read_pc:ptid_t ptid:ptid::0:generic_target_read_pc::0
+F:2:TARGET_READ_PC:CORE_ADDR:read_pc:ptid_t ptid:ptid
f:2:TARGET_WRITE_PC:void:write_pc:CORE_ADDR val, ptid_t ptid:val, ptid::0:generic_target_write_pc::0
-# This is simply not needed. See value_of_builtin_frame_fp_reg and
-# call_function_by_hand.
-F::DEPRECATED_TARGET_READ_FP:CORE_ADDR:deprecated_target_read_fp:void
-f:2:TARGET_READ_SP:CORE_ADDR:read_sp:void:::0:generic_target_read_sp::0
-# The dummy call frame SP should be set by push_dummy_call.
-F:2:DEPRECATED_DUMMY_WRITE_SP:void:deprecated_dummy_write_sp:CORE_ADDR val:val
+# UNWIND_SP is a direct replacement for TARGET_READ_SP.
+F:2:TARGET_READ_SP:CORE_ADDR:read_sp:void
# Function for getting target's idea of a frame pointer. FIXME: GDB's
# whole scheme for dealing with "frames" and "frame pointers" needs a
# serious shakedown.
@@ -452,10 +448,8 @@ v:2:NUM_PSEUDO_REGS:int:num_pseudo_regs::::0:0::0:::
# 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
# all (-1).
+# SP_REGNUM will hopefully be replaced by UNWIND_SP.
v:2:SP_REGNUM:int:sp_regnum::::-1:-1::0
-# This is simply not needed. See value_of_builtin_frame_fp_reg and
-# call_function_by_hand.
-v:2:DEPRECATED_FP_REGNUM:int:deprecated_fp_regnum::::-1:-1::0
v:2:PC_REGNUM:int:pc_regnum::::-1:-1::0
v:2:PS_REGNUM:int:ps_regnum::::-1:-1::0
v:2:FP0_REGNUM:int:fp0_regnum::::0:-1::0
@@ -472,33 +466,90 @@ f:2:DWARF_REG_TO_REGNUM:int:dwarf_reg_to_regnum:int dwarf_regnr:dwarf_regnr:::no
f:2:SDB_REG_TO_REGNUM:int:sdb_reg_to_regnum:int sdb_regnr:sdb_regnr:::no_op_reg_to_regnum::0
f:2:DWARF2_REG_TO_REGNUM:int:dwarf2_reg_to_regnum:int dwarf2_regnr:dwarf2_regnr:::no_op_reg_to_regnum::0
f:2:REGISTER_NAME:const char *:register_name:int regnr:regnr:::legacy_register_name::0
-v::DEPRECATED_REGISTER_SIZE:int:deprecated_register_size
+
+# REGISTER_TYPE is a direct replacement for REGISTER_VIRTUAL_TYPE.
+M:2:REGISTER_TYPE:struct type *:register_type:int reg_nr:reg_nr::0:
+# REGISTER_TYPE is a direct replacement for REGISTER_VIRTUAL_TYPE.
+F:2:REGISTER_VIRTUAL_TYPE:struct type *:deprecated_register_virtual_type:int reg_nr:reg_nr::0:0
+# DEPRECATED_REGISTER_BYTES can be deleted. The value is computed
+# from REGISTER_TYPE.
v::DEPRECATED_REGISTER_BYTES:int:deprecated_register_bytes
-# NOTE: cagney/2002-05-02: This function with predicate has a valid
-# (callable) initial value. As a consequence, even when the predicate
-# is false, the corresponding function works. This simplifies the
-# migration process - old code, calling REGISTER_BYTE, doesn't need to
-# be modified.
-F::REGISTER_BYTE:int:register_byte:int reg_nr:reg_nr::generic_register_byte:generic_register_byte
-# The methods REGISTER_VIRTUAL_TYPE, REGISTER_VIRTUAL_SIZE and
-# REGISTER_RAW_SIZE are all being replaced by REGISTER_TYPE.
-f:2:REGISTER_RAW_SIZE:int:register_raw_size:int reg_nr:reg_nr::generic_register_size:generic_register_size::0
-# The methods DEPRECATED_MAX_REGISTER_RAW_SIZE and
-# DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE are all being replaced by
-# MAX_REGISTER_SIZE (a constant).
+# If the value returned by DEPRECATED_REGISTER_BYTE agrees with the
+# register offsets computed using just REGISTER_TYPE, this can be
+# deleted. See: maint print registers. NOTE: cagney/2002-05-02: This
+# function with predicate has a valid (callable) initial value. As a
+# consequence, even when the predicate is false, the corresponding
+# function works. This simplifies the migration process - old code,
+# calling DEPRECATED_REGISTER_BYTE, doesn't need to be modified.
+F::REGISTER_BYTE:int:deprecated_register_byte:int reg_nr:reg_nr::generic_register_byte:generic_register_byte
+# If all registers have identical raw and virtual sizes and those
+# sizes agree with the value computed from REGISTER_TYPE,
+# DEPRECATED_REGISTER_RAW_SIZE can be deleted. See: maint print
+# registers.
+f:2:REGISTER_RAW_SIZE:int:deprecated_register_raw_size:int reg_nr:reg_nr::generic_register_size:generic_register_size::0
+# If all registers have identical raw and virtual sizes and those
+# sizes agree with the value computed from REGISTER_TYPE,
+# DEPRECATED_REGISTER_VIRTUAL_SIZE can be deleted. See: maint print
+# registers.
+f:2:REGISTER_VIRTUAL_SIZE:int:deprecated_register_virtual_size:int reg_nr:reg_nr::generic_register_size:generic_register_size::0
+# DEPRECATED_MAX_REGISTER_RAW_SIZE can be deleted. It has been
+# replaced by the constant MAX_REGISTER_SIZE.
V:2:DEPRECATED_MAX_REGISTER_RAW_SIZE:int:deprecated_max_register_raw_size
-# The methods REGISTER_VIRTUAL_TYPE, REGISTER_VIRTUAL_SIZE and
-# REGISTER_RAW_SIZE are all being replaced by REGISTER_TYPE.
-f:2:REGISTER_VIRTUAL_SIZE:int:register_virtual_size:int reg_nr:reg_nr::generic_register_size:generic_register_size::0
-# The methods DEPRECATED_MAX_REGISTER_RAW_SIZE and
-# DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE are all being replaced by
-# MAX_REGISTER_SIZE (a constant).
+# DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE can be deleted. It has been
+# replaced by the constant MAX_REGISTER_SIZE.
V:2:DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE:int:deprecated_max_register_virtual_size
-# The methods REGISTER_VIRTUAL_TYPE, REGISTER_VIRTUAL_SIZE and
-# REGISTER_RAW_SIZE are all being replaced by REGISTER_TYPE.
-F:2:REGISTER_VIRTUAL_TYPE:struct type *:register_virtual_type:int reg_nr:reg_nr::0:0
-M:2:REGISTER_TYPE:struct type *:register_type:int reg_nr:reg_nr::0:
-#
+
+# See gdbint.texinfo, and PUSH_DUMMY_CALL.
+M::UNWIND_DUMMY_ID:struct frame_id:unwind_dummy_id:struct frame_info *info:info::0:0
+# Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete
+# SAVE_DUMMY_FRAME_TOS.
+F:2:DEPRECATED_SAVE_DUMMY_FRAME_TOS:void:deprecated_save_dummy_frame_tos:CORE_ADDR sp:sp
+# Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete
+# DEPRECATED_FP_REGNUM.
+v:2:DEPRECATED_FP_REGNUM:int:deprecated_fp_regnum::::-1:-1::0
+# Implement UNWIND_DUMMY_ID and PUSH_DUMMY_CALL, then delete
+# DEPRECATED_TARGET_READ_FP.
+F::DEPRECATED_TARGET_READ_FP:CORE_ADDR:deprecated_target_read_fp:void
+
+# See gdbint.texinfo. See infcall.c. New, all singing all dancing,
+# replacement for DEPRECATED_PUSH_ARGUMENTS.
+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
+# PUSH_DUMMY_CALL is a direct replacement for DEPRECATED_PUSH_ARGUMENTS.
+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
+# DEPRECATED_USE_GENERIC_DUMMY_FRAMES can be deleted. Always true.
+v::DEPRECATED_USE_GENERIC_DUMMY_FRAMES:int:deprecated_use_generic_dummy_frames:::::1::0
+# Implement PUSH_RETURN_ADDRESS, and then merge in
+# DEPRECATED_PUSH_RETURN_ADDRESS.
+F:2:DEPRECATED_PUSH_RETURN_ADDRESS:CORE_ADDR:deprecated_push_return_address:CORE_ADDR pc, CORE_ADDR sp:pc, sp:::0
+# Implement PUSH_DUMMY_CALL, then merge in DEPRECATED_DUMMY_WRITE_SP.
+F:2:DEPRECATED_DUMMY_WRITE_SP:void:deprecated_dummy_write_sp:CORE_ADDR val:val
+# DEPRECATED_REGISTER_SIZE can be deleted.
+v::DEPRECATED_REGISTER_SIZE:int:deprecated_register_size
+v::CALL_DUMMY_LOCATION:int:call_dummy_location:::::AT_ENTRY_POINT::0
+f::CALL_DUMMY_ADDRESS:CORE_ADDR:call_dummy_address:void::::entry_point_address::0
+# DEPRECATED_CALL_DUMMY_START_OFFSET can be deleted.
+v::DEPRECATED_CALL_DUMMY_START_OFFSET:CORE_ADDR:deprecated_call_dummy_start_offset
+# DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET can be deleted.
+v::DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET:CORE_ADDR:deprecated_call_dummy_breakpoint_offset
+# DEPRECATED_CALL_DUMMY_LENGTH can be deleted.
+v::DEPRECATED_CALL_DUMMY_LENGTH:int:deprecated_call_dummy_length
+# DEPRECATED_CALL_DUMMY_WORDS can be deleted.
+v::DEPRECATED_CALL_DUMMY_WORDS:LONGEST *:deprecated_call_dummy_words::::0:legacy_call_dummy_words::0:0x%08lx
+# Implement PUSH_DUMMY_CALL, then delete DEPRECATED_SIZEOF_CALL_DUMMY_WORDS.
+v::DEPRECATED_SIZEOF_CALL_DUMMY_WORDS:int:deprecated_sizeof_call_dummy_words::::0:legacy_sizeof_call_dummy_words::0
+# Implement PUSH_DUMMY_CALL, then delete DEPRECATED_CALL_DUMMY_STACK_ADJUST.
+V:2:DEPRECATED_CALL_DUMMY_STACK_ADJUST:int:deprecated_call_dummy_stack_adjust::::0
+# DEPRECATED_FIX_CALL_DUMMY can be deleted. For the SPARC, implement
+# PUSH_DUMMY_CODE and set CALL_DUMMY_LOCATION to ON_STACK.
+F::DEPRECATED_FIX_CALL_DUMMY:void:deprecated_fix_call_dummy:char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p:dummy, pc, fun, nargs, args, type, gcc_p
+# This is a replacement for DEPRECATED_FIX_CALL_DUMMY et.al.
+M::PUSH_DUMMY_CODE:CORE_ADDR:push_dummy_code:CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr:sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr:
+# Implement PUSH_DUMMY_CALL, then delete DEPRECATED_PUSH_DUMMY_FRAME.
+F:2:DEPRECATED_PUSH_DUMMY_FRAME:void:deprecated_push_dummy_frame:void:-:::0
+# Implement PUSH_DUMMY_CALL, then delete
+# DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED.
+v:2:DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED:int:deprecated_extra_stack_alignment_needed::::0:0::0:::
+
F:2:DEPRECATED_DO_REGISTERS_INFO:void:deprecated_do_registers_info:int reg_nr, int fpregs:reg_nr, fpregs
m:2:PRINT_REGISTERS_INFO:void:print_registers_info:struct ui_file *file, struct frame_info *frame, int regnum, int all:file, frame, regnum, all:::default_print_registers_info::0
M:2:PRINT_FLOAT_INFO:void:print_float_info:struct ui_file *file, struct frame_info *frame, const char *args:file, frame, args
@@ -511,41 +562,12 @@ f:2:CANNOT_FETCH_REGISTER:int:cannot_fetch_register:int regnum:regnum:::cannot_r
f:2:CANNOT_STORE_REGISTER:int:cannot_store_register:int regnum:regnum:::cannot_register_not::0
# setjmp/longjmp support.
F:2:GET_LONGJMP_TARGET:int:get_longjmp_target:CORE_ADDR *pc:pc::0:0
-#
-# 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
-# and body contain convoluted #if/#else sequences for determine how
-# things should be compiled. Instead of trying to mimic that
-# behaviour here (and hence entrench it further) gdbarch simply
-# reqires that these methods be set up from the word go. This also
-# avoids any potential problems with moving beyond multi-arch partial.
-v::DEPRECATED_USE_GENERIC_DUMMY_FRAMES:int:deprecated_use_generic_dummy_frames:::::1::0
-# Replaced by push_dummy_code.
-v::CALL_DUMMY_LOCATION:int:call_dummy_location:::::AT_ENTRY_POINT::0
-# Replaced by push_dummy_code.
-f::CALL_DUMMY_ADDRESS:CORE_ADDR:call_dummy_address:void::::entry_point_address::0
-# Replaced by push_dummy_code.
-v::DEPRECATED_CALL_DUMMY_START_OFFSET:CORE_ADDR:deprecated_call_dummy_start_offset
-# Replaced by push_dummy_code.
-v::DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET:CORE_ADDR:deprecated_call_dummy_breakpoint_offset
-# Replaced by push_dummy_code.
-v::DEPRECATED_CALL_DUMMY_LENGTH:int:deprecated_call_dummy_length
# NOTE: cagney/2002-11-24: This function with predicate has a valid
# (callable) initial value. As a consequence, even when the predicate
# is false, the corresponding function works. This simplifies the
# migration process - old code, calling DEPRECATED_PC_IN_CALL_DUMMY(),
# doesn't need to be modified.
F::DEPRECATED_PC_IN_CALL_DUMMY:int:deprecated_pc_in_call_dummy:CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address:pc, sp, frame_address::generic_pc_in_call_dummy:generic_pc_in_call_dummy
-# Replaced by push_dummy_code.
-v::DEPRECATED_CALL_DUMMY_WORDS:LONGEST *:deprecated_call_dummy_words::::0:legacy_call_dummy_words::0:0x%08lx
-# Replaced by push_dummy_code.
-v::DEPRECATED_SIZEOF_CALL_DUMMY_WORDS:int:deprecated_sizeof_call_dummy_words::::0:legacy_sizeof_call_dummy_words::0
-# Replaced by push_dummy_code.
-V:2:DEPRECATED_CALL_DUMMY_STACK_ADJUST:int:deprecated_call_dummy_stack_adjust::::0
-# Replaced by push_dummy_code.
-F::DEPRECATED_FIX_CALL_DUMMY:void:deprecated_fix_call_dummy:char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p:dummy, pc, fun, nargs, args, type, gcc_p
-# This is a replacement for DEPRECATED_FIX_CALL_DUMMY et.al.
-M::PUSH_DUMMY_CODE:CORE_ADDR:push_dummy_code:CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr:sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr:
F:2:DEPRECATED_INIT_FRAME_PC_FIRST:CORE_ADDR:deprecated_init_frame_pc_first:int fromleaf, struct frame_info *prev:fromleaf, prev
F:2:DEPRECATED_INIT_FRAME_PC:CORE_ADDR:deprecated_init_frame_pc:int fromleaf, struct frame_info *prev:fromleaf, prev
#
@@ -553,25 +575,25 @@ v:2:BELIEVE_PCC_PROMOTION:int:believe_pcc_promotion:::::::
v::BELIEVE_PCC_PROMOTION_TYPE:int:believe_pcc_promotion_type:::::::
F:2:DEPRECATED_GET_SAVED_REGISTER:void:deprecated_get_saved_register:char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval:raw_buffer, optimized, addrp, frame, regnum, lval
#
-f:2:REGISTER_CONVERTIBLE:int:register_convertible:int nr:nr:::generic_register_convertible_not::0
-f:2:REGISTER_CONVERT_TO_VIRTUAL:void:register_convert_to_virtual:int regnum, struct type *type, char *from, char *to:regnum, type, from, to:::0::0
-f:2:REGISTER_CONVERT_TO_RAW:void:register_convert_to_raw:struct type *type, int regnum, char *from, char *to:type, regnum, from, to:::0::0
+# For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
+# For raw <-> cooked register conversions, replaced by pseudo registers.
+f:2:DEPRECATED_REGISTER_CONVERTIBLE:int:deprecated_register_convertible:int nr:nr:::deprecated_register_convertible_not::0
+# For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
+# For raw <-> cooked register conversions, replaced by pseudo registers.
+f:2:DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL:void:deprecated_register_convert_to_virtual:int regnum, struct type *type, char *from, char *to:regnum, type, from, to:::0::0
+# For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al.
+# For raw <-> cooked register conversions, replaced by pseudo registers.
+f:2:DEPRECATED_REGISTER_CONVERT_TO_RAW:void:deprecated_register_convert_to_raw:struct type *type, int regnum, const char *from, char *to:type, regnum, from, to:::0::0
#
-f:1:CONVERT_REGISTER_P:int:convert_register_p:int regnum:regnum::0:legacy_convert_register_p::0
-f:1:REGISTER_TO_VALUE:void:register_to_value:int regnum, struct type *type, char *from, char *to:regnum, type, from, to::0:legacy_register_to_value::0
-f:1:VALUE_TO_REGISTER:void:value_to_register:struct type *type, int regnum, char *from, char *to:type, regnum, from, to::0:legacy_value_to_register::0
+f:1:CONVERT_REGISTER_P:int:convert_register_p:int regnum, struct type *type:regnum, type::0:legacy_convert_register_p::0
+f:1:REGISTER_TO_VALUE:void:register_to_value:struct frame_info *frame, int regnum, struct type *type, void *buf:frame, regnum, type, buf::0:legacy_register_to_value::0
+f:1:VALUE_TO_REGISTER:void:value_to_register:struct frame_info *frame, int regnum, struct type *type, const void *buf:frame, regnum, type, buf::0:legacy_value_to_register::0
#
f:2:POINTER_TO_ADDRESS:CORE_ADDR:pointer_to_address:struct type *type, const void *buf:type, buf:::unsigned_pointer_to_address::0
f:2:ADDRESS_TO_POINTER:void:address_to_pointer:struct type *type, void *buf, CORE_ADDR addr:type, buf, addr:::unsigned_address_to_pointer::0
F:2:INTEGER_TO_ADDRESS:CORE_ADDR:integer_to_address:struct type *type, void *buf:type, buf
#
f:2:RETURN_VALUE_ON_STACK:int:return_value_on_stack:struct type *type:type:::generic_return_value_on_stack_not::0
-# 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
-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
F:2:DEPRECATED_POP_FRAME:void:deprecated_pop_frame:void:-:::0
# NOTE: cagney/2003-03-24: Replaced by PUSH_ARGUMENTS.
F:2:DEPRECATED_STORE_STRUCT_RETURN:void:deprecated_store_struct_return:CORE_ADDR addr, CORE_ADDR sp:addr, sp:::0
@@ -595,7 +617,6 @@ f::BREAKPOINT_FROM_PC:const unsigned char *:breakpoint_from_pc:CORE_ADDR *pcptr,
f:2:MEMORY_INSERT_BREAKPOINT:int:memory_insert_breakpoint:CORE_ADDR addr, char *contents_cache:addr, contents_cache::0:default_memory_insert_breakpoint::0
f:2:MEMORY_REMOVE_BREAKPOINT:int:memory_remove_breakpoint:CORE_ADDR addr, char *contents_cache:addr, contents_cache::0:default_memory_remove_breakpoint::0
v:2:DECR_PC_AFTER_BREAK:CORE_ADDR:decr_pc_after_break::::0:-1
-f:2:PREPARE_TO_PROCEED:int:prepare_to_proceed:int select_it:select_it::0:default_prepare_to_proceed::0
v:2:FUNCTION_START_OFFSET:CORE_ADDR:function_start_offset::::0:-1
#
m::REMOTE_TRANSLATE_XFER_ADDRESS:void:remote_translate_xfer_address:struct regcache *regcache, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len:regcache, gdb_addr, gdb_len, rem_addr, rem_len:::generic_remote_translate_xfer_address::0
@@ -609,20 +630,19 @@ F:2:DEPRECATED_FRAME_CHAIN_VALID:int:deprecated_frame_chain_valid:CORE_ADDR chai
# interfaces they have very different underlying implementations.
F:2:DEPRECATED_FRAME_SAVED_PC:CORE_ADDR:deprecated_frame_saved_pc:struct frame_info *fi:fi::0:0
M::UNWIND_PC:CORE_ADDR:unwind_pc:struct frame_info *next_frame:next_frame:
-f:2:FRAME_ARGS_ADDRESS:CORE_ADDR:frame_args_address:struct frame_info *fi:fi::0:get_frame_base::0
-f:2:FRAME_LOCALS_ADDRESS:CORE_ADDR:frame_locals_address:struct frame_info *fi:fi::0:get_frame_base::0
+M::UNWIND_SP:CORE_ADDR:unwind_sp:struct frame_info *next_frame:next_frame:
+# DEPRECATED_FRAME_ARGS_ADDRESS as been replaced by the per-frame
+# frame-base. Enable frame-base before frame-unwind.
+F::DEPRECATED_FRAME_ARGS_ADDRESS:CORE_ADDR:deprecated_frame_args_address:struct frame_info *fi:fi::get_frame_base:get_frame_base
+# DEPRECATED_FRAME_LOCALS_ADDRESS as been replaced by the per-frame
+# frame-base. Enable frame-base before frame-unwind.
+F::DEPRECATED_FRAME_LOCALS_ADDRESS:CORE_ADDR:deprecated_frame_locals_address:struct frame_info *fi:fi::get_frame_base:get_frame_base
F::DEPRECATED_SAVED_PC_AFTER_CALL:CORE_ADDR:deprecated_saved_pc_after_call:struct frame_info *frame:frame
-f:2:FRAME_NUM_ARGS:int:frame_num_args:struct frame_info *frame:frame::0:0
+F:2:FRAME_NUM_ARGS:int:frame_num_args:struct frame_info *frame:frame
#
F:2:STACK_ALIGN:CORE_ADDR:stack_align:CORE_ADDR sp:sp::0:0
M:::CORE_ADDR:frame_align:CORE_ADDR address:address
-# NOTE: cagney/2003-03-24: This is better handled by PUSH_ARGUMENTS.
-v:2:DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED:int:deprecated_extra_stack_alignment_needed::::0:0::0:::
F:2:REG_STRUCT_HAS_ADDR:int:reg_struct_has_addr:int gcc_p, struct type *type:gcc_p, type::0:0
-# FIXME: kettenis/2003-03-08: This should be replaced by a function
-# parametrized with (at least) the regcache.
-F:2:SAVE_DUMMY_FRAME_TOS:void:save_dummy_frame_tos:CORE_ADDR sp:sp::0:0
-M::UNWIND_DUMMY_ID:struct frame_id:unwind_dummy_id:struct frame_info *info:info::0:0
v:2:PARM_BOUNDARY:int:parm_boundary
#
v:2:TARGET_FLOAT_FORMAT:const struct floatformat *:float_format::::::default_float_format (gdbarch)::%s:(TARGET_FLOAT_FORMAT)->name
@@ -716,6 +736,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 +875,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 +944,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 +993,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 +1013,6 @@ do
printf "#define ${macro}(${actual}) (gdbarch_${function} (current_gdbarch, ${actual}))\n"
fi
printf "#endif\n"
- printf "#endif\n"
fi
fi
done
@@ -1403,7 +1421,7 @@ function_list | while do_read
do
if class_is_info_p
then
- printf " ${staticdefault},\n"
+ printf " ${staticdefault}, /* ${function} */\n"
fi
done
cat <<EOF
@@ -1417,7 +1435,7 @@ function_list | while do_read
do
if class_is_function_p || class_is_variable_p
then
- printf " ${staticdefault},\n"
+ printf " ${staticdefault}, /* ${function} */\n"
fi
done
cat <<EOF
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 9df8a2a4807..636b13b2e51 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,7 +1,39 @@
-2003-04-24 Andrew Cagney <cagney@redhat.com>
+2003-06-20 Daniel Jacobowitz <drow@mvista.com>
- * low-nbsd.c (fetch_inferior_registers):
- (store_inferior_registers):
+ * Makefile.in (SFILES): Update.
+ * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
+ low-sun3.c: Remove files.
+
+2003-06-17 Daniel Jacobowitz <drow@mvista.com>
+
+ * linux-low.c: Move comment to linux_thread_alive where it belonged.
+ (linux_detach_one_process, linux_detach): New functions.
+ (linux_target_ops): Add linux_detach.
+ * server.c (main): Handle 'D' packet.
+ * target.h (struct target_ops): Add "detach" member.
+ (detach_inferior): Define.
+
+2003-06-13 Mark Kettenis <kettenis@gnu.org>
+
+ From Kelley Cook <kelleycook@wideopenwest.com>:
+ * configure.srv: Accept i[34567]86 variants.
+
+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-03-26 Daniel Jacobowitz <drow@mvista.com>
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index 763c21ed7b2..80667f9c6ce 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -113,10 +113,16 @@ LINTFLAGS= $(BFD_CFLAGS)
# All source files that go into linking GDB remote server.
-SFILES = $(srcdir)/low-hppabsd.c $(srcdir)/low-linux.c $(srcdir)/low-lynx.c \
- $(srcdir)/low-nbsd.c $(srcdir)/low-sim.c $(srcdir)/low-sparc.c \
- $(srcdir)/low-sun3.c $(srcdir)/utils.c $(srcdir)/server.c \
- $(srcdir)/remote-utils.c
+SFILES= $(srcdir)/gdbreplay.c $(srcdir)/inferiors.c \
+ $(srcdir)/mem-break.c $(srcdir)/proc-service.c $(srcdir)/regcache.c \
+ $(srcdir)/remote-utils.c $(srcdir)/server.c $(srcdir)/target.c \
+ $(srcdir)/thread-db.c $(srcdir)/utils.c \
+ $(srcdir)/linux-arm-low.c $(srcdir)/linux-i386-low.c \
+ $(srcdir)/i387-fp.c \
+ $(srcdir)/linux-ia64-low.c $(srcdir)/linux-low.c \
+ $(srcdir)/linux-m68k-low.c $(srcdir)/linux-mips-low.c \
+ $(srcdir)/linux-ppc-low.c $(srcdir)/linux-s390-low.c \
+ $(srcdir)/linux-sh-low.c $(srcdir)/linux-x86-64-low.c
DEPFILES = @GDBSERVER_DEPFILES@
diff --git a/gdb/gdbserver/configure.srv b/gdb/gdbserver/configure.srv
index 28dc2aad1f6..6ab60e93549 100644
--- a/gdb/gdbserver/configure.srv
+++ b/gdb/gdbserver/configure.srv
@@ -23,7 +23,7 @@ case "${target}" in
srv_linux_usrregs=yes
srv_linux_thread_db=yes
;;
- i[3456]86-*-linux*) srv_regobj=reg-i386-linux.o
+ i[34567]86-*-linux*) srv_regobj=reg-i386-linux.o
srv_tgtobj="linux-low.o linux-i386-low.o i387-fp.o"
srv_linux_usrregs=yes
srv_linux_regsets=yes
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 95bf9697739..c700d40ba3a 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -234,13 +234,28 @@ linux_kill_one_process (struct inferior_list_entry *entry)
} while (WIFSTOPPED (wstat));
}
-/* Return nonzero if the given thread is still alive. */
static void
linux_kill (void)
{
for_each_inferior (&all_threads, linux_kill_one_process);
}
+static void
+linux_detach_one_process (struct inferior_list_entry *entry)
+{
+ struct thread_info *thread = (struct thread_info *) entry;
+ struct process_info *process = get_thread_process (thread);
+
+ ptrace (PTRACE_DETACH, pid_of (process), 0, 0);
+}
+
+static void
+linux_detach (void)
+{
+ for_each_inferior (&all_threads, linux_detach_one_process);
+}
+
+/* Return nonzero if the given thread is still alive. */
static int
linux_thread_alive (int tid)
{
@@ -399,7 +414,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 +556,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 +602,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 +801,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 +991,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 +1004,7 @@ usr_store_inferior_registers (int regno)
return;
}
}
- regaddr += sizeof (int);
+ regaddr += sizeof (PTRACE_XFER_TYPE);
}
}
else
@@ -1228,11 +1243,28 @@ 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,
linux_attach,
linux_kill,
+ linux_detach,
linux_thread_alive,
linux_resume,
linux_wait,
@@ -1241,6 +1273,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/low-hppabsd.c b/gdb/gdbserver/low-hppabsd.c
deleted file mode 100644
index 3287923d113..00000000000
--- a/gdb/gdbserver/low-hppabsd.c
+++ /dev/null
@@ -1,355 +0,0 @@
-/* Low level interface to ptrace, for the remote server for GDB.
- Copyright 1995, 1996, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "server.h"
-#include <sys/wait.h>
-#include "frame.h"
-#include "inferior.h"
-
-#include <stdio.h>
-#include <sys/param.h>
-#include <sys/dir.h>
-#include <sys/user.h>
-#include <signal.h>
-#include <sys/ioctl.h>
-#include <sgtty.h>
-#include <fcntl.h>
-
-/***************Begin MY defs*********************/
-static char my_registers[REGISTER_BYTES];
-char *registers = my_registers;
-/***************End MY defs*********************/
-
-#include <sys/ptrace.h>
-#include <machine/reg.h>
-
-extern int errno;
-
-/* Start an inferior process and returns its pid.
- ALLARGS is a vector of program-name and args. */
-
-int
-create_inferior (char *program, char **allargs)
-{
- int pid;
-
- pid = fork ();
- if (pid < 0)
- perror_with_name ("fork");
-
- if (pid == 0)
- {
- ptrace (PT_TRACE_ME, 0, 0, 0, 0);
-
- execv (program, allargs);
-
- fprintf (stderr, "Cannot exec %s: %s.\n", program,
- errno < sys_nerr ? sys_errlist[errno] : "unknown error");
- fflush (stderr);
- _exit (0177);
- }
-
- return pid;
-}
-
-/* Kill the inferior process. Make us have no inferior. */
-
-void
-kill_inferior (void)
-{
- if (inferior_pid == 0)
- return;
- ptrace (8, inferior_pid, 0, 0, 0);
- wait (0);
-/*************inferior_died ();****VK**************/
-}
-
-/* Attaching is not supported. */
-int
-myattach (int pid)
-{
- return -1;
-}
-
-/* Return nonzero if the given thread is still alive. */
-int
-mythread_alive (int pid)
-{
- return 1;
-}
-
-/* Wait for process, returns status */
-
-unsigned char
-mywait (char *status)
-{
- int pid;
- union wait w;
-
- enable_async_io ();
- pid = waitpid (inferior_pid, &w, 0);
- disable_async_io ();
- if (pid != inferior_pid)
- perror_with_name ("wait");
-
- if (WIFEXITED (w))
- {
- fprintf (stderr, "\nChild exited with retcode = %x \n", WEXITSTATUS (w));
- *status = 'W';
- return ((unsigned char) WEXITSTATUS (w));
- }
- else if (!WIFSTOPPED (w))
- {
- fprintf (stderr, "\nChild terminated with signal = %x \n", WTERMSIG (w));
- *status = 'X';
- return ((unsigned char) WTERMSIG (w));
- }
-
- fetch_inferior_registers (0);
-
- *status = 'T';
- return ((unsigned char) WSTOPSIG (w));
-}
-
-/* Resume execution of the inferior process.
- If STEP is nonzero, single-step it.
- If SIGNAL is nonzero, give it that signal. */
-
-void
-myresume (int step, int signal)
-{
- errno = 0;
- ptrace (step ? PT_STEP : PT_CONTINUE, inferior_pid, 1, signal, 0);
- if (errno)
- perror_with_name ("ptrace");
-}
-
-
-#if !defined (offsetof)
-#define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER)
-#endif
-
-/* U_REGS_OFFSET is the offset of the registers within the u area. */
-#if !defined (U_REGS_OFFSET)
-#define U_REGS_OFFSET \
- ptrace (PT_READ_U, inferior_pid, \
- (PTRACE_ARG3_TYPE) (offsetof (struct user, u_ar0)), 0) \
- - KERNEL_U_ADDR
-#endif
-
-CORE_ADDR
-register_addr (int regno, CORE_ADDR blockend)
-{
- CORE_ADDR addr;
-
- if (regno < 0 || regno >= NUM_REGS)
- error ("Invalid register number %d.", regno);
-
- REGISTER_U_ADDR (addr, blockend, regno);
-
- return addr;
-}
-
-/* Fetch one register. */
-
-static void
-fetch_register (int regno)
-{
- register unsigned int regaddr;
- char buf[MAX_REGISTER_RAW_SIZE];
- register int i;
-
- /* Offset of registers within the u area. */
- unsigned int offset;
-
- offset = U_REGS_OFFSET;
-
- regaddr = register_addr (regno, offset);
- for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
- {
- errno = 0;
- *(int *) &registers[regno * 4 + i] = ptrace (PT_RUREGS, inferior_pid,
- (PTRACE_ARG3_TYPE) regaddr, 0, 0);
- regaddr += sizeof (int);
- if (errno != 0)
- {
- /* Warning, not error, in case we are attached; sometimes the
- kernel doesn't let us at the registers. */
- char *err = strerror (errno);
- char *msg = alloca (strlen (err) + 128);
- sprintf (msg, "reading register %d: %s", regno, err);
- error (msg);
- goto error_exit;
- }
- }
-error_exit:;
-}
-
-/* Fetch all registers, or just one, from the child process. */
-
-void
-fetch_inferior_registers (int regno)
-{
- if (regno == -1 || regno == 0)
- for (regno = 0; regno < NUM_REGS; regno++)
- fetch_register (regno);
- else
- fetch_register (regno);
-}
-
-/* Store our register values back into the inferior.
- If REGNO is -1, do this for all registers.
- Otherwise, REGNO specifies which register (so we can save time). */
-
-void
-store_inferior_registers (int regno)
-{
- register unsigned int regaddr;
- char buf[80];
- extern char registers[];
- register int i;
- unsigned int offset = U_REGS_OFFSET;
- int scratch;
-
- if (regno >= 0)
- {
- if (CANNOT_STORE_REGISTER (regno))
- return;
- regaddr = register_addr (regno, offset);
- errno = 0;
- if (regno == PCOQ_HEAD_REGNUM || regno == PCOQ_TAIL_REGNUM)
- {
- scratch = *(int *) &registers[REGISTER_BYTE (regno)] | 0x3;
- ptrace (PT_WUREGS, inferior_pid, (PTRACE_ARG3_TYPE) regaddr,
- scratch, 0);
- if (errno != 0)
- {
- /* Error, even if attached. Failing to write these two
- registers is pretty serious. */
- sprintf (buf, "writing register number %d", regno);
- perror_with_name (buf);
- }
- }
- else
- for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
- {
- errno = 0;
- ptrace (PT_WUREGS, inferior_pid, (PTRACE_ARG3_TYPE) regaddr,
- *(int *) &registers[REGISTER_BYTE (regno) + i], 0);
- if (errno != 0)
- {
- /* Warning, not error, in case we are attached; sometimes the
- kernel doesn't let us at the registers. */
- char *err = strerror (errno);
- char *msg = alloca (strlen (err) + 128);
- sprintf (msg, "writing register %d: %s",
- regno, err);
- error (msg);
- return;
- }
- regaddr += sizeof (int);
- }
- }
- else
- for (regno = 0; regno < NUM_REGS; regno++)
- store_inferior_registers (regno);
-}
-
-/* NOTE! I tried using PTRACE_READDATA, etc., to read and write memory
- in the NEW_SUN_PTRACE case.
- It ought to be straightforward. But it appears that writing did
- not write the data that I specified. I cannot understand where
- it got the data that it actually did write. */
-
-/* Copy LEN bytes from inferior's memory starting at MEMADDR
- to debugger memory starting at MYADDR. */
-
-void
-read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
-{
- register int i;
- /* Round starting address down to longword boundary. */
- register CORE_ADDR addr = memaddr & -(CORE_ADDR) sizeof (int);
- /* Round ending address up; get number of longwords that makes. */
- register int count
- = (((memaddr + len) - addr) + sizeof (int) - 1) / sizeof (int);
- /* Allocate buffer of that many longwords. */
- register int *buffer = (int *) alloca (count * sizeof (int));
-
- /* Read all the longwords */
- for (i = 0; i < count; i++, addr += sizeof (int))
- {
- buffer[i] = ptrace (1, inferior_pid, addr, 0, 0);
- }
-
- /* Copy appropriate bytes out of the buffer. */
- memcpy (myaddr, (char *) buffer + (memaddr & (sizeof (int) - 1)), len);
-}
-
-/* Copy LEN bytes of data from debugger memory at MYADDR
- to inferior's memory at MEMADDR.
- On failure (cannot write the inferior)
- returns the value of errno. */
-
-int
-write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
-{
- register int i;
- /* Round starting address down to longword boundary. */
- register CORE_ADDR addr = memaddr & -(CORE_ADDR) sizeof (int);
- /* Round ending address up; get number of longwords that makes. */
- register int count
- = (((memaddr + len) - addr) + sizeof (int) - 1) / sizeof (int);
- /* Allocate buffer of that many longwords. */
- register int *buffer = (int *) alloca (count * sizeof (int));
- extern int errno;
-
- /* Fill start and end extra bytes of buffer with existing memory data. */
-
- buffer[0] = ptrace (1, inferior_pid, addr, 0, 0);
-
- if (count > 1)
- {
- buffer[count - 1]
- = ptrace (1, inferior_pid,
- addr + (count - 1) * sizeof (int), 0, 0);
- }
-
- /* Copy data to be written over corresponding part of buffer */
-
- memcpy ((char *) buffer + (memaddr & (sizeof (int) - 1)), myaddr, len);
-
- /* Write the entire buffer. */
-
- for (i = 0; i < count; i++, addr += sizeof (int))
- {
- errno = 0;
- ptrace (4, inferior_pid, addr, buffer[i], 0);
- if (errno)
- return errno;
- }
-
- return 0;
-}
-
-void
-initialize_low (void)
-{
-}
diff --git a/gdb/gdbserver/low-lynx.c b/gdb/gdbserver/low-lynx.c
deleted file mode 100644
index 90e18db5e39..00000000000
--- a/gdb/gdbserver/low-lynx.c
+++ /dev/null
@@ -1,745 +0,0 @@
-/* Low level interface to ptrace, for the remote server for GDB.
- Copyright 1986, 1987, 1993, 1994, 1995, 1999, 2000, 2001, 2002
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "server.h"
-#include "frame.h"
-#include "inferior.h"
-
-#include <stdio.h>
-#include <sys/param.h>
-#include <sys/dir.h>
-#define LYNXOS
-#include <sys/mem.h>
-#include <sys/signal.h>
-#include <sys/file.h>
-#include <sys/kernel.h>
-#ifndef __LYNXOS
-#define __LYNXOS
-#endif
-#include <sys/itimer.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <sys/proc.h>
-#include <signal.h>
-#include <sys/ioctl.h>
-#include <sgtty.h>
-#include <fcntl.h>
-#include <sys/wait.h>
-#include <sys/fpp.h>
-
-static char my_registers[REGISTER_BYTES];
-char *registers = my_registers;
-
-#include <sys/ptrace.h>
-
-/* Start an inferior process and returns its pid.
- ALLARGS is a vector of program-name and args. */
-
-int
-create_inferior (char *program, char **allargs)
-{
- int pid;
-
- pid = fork ();
- if (pid < 0)
- perror_with_name ("fork");
-
- if (pid == 0)
- {
- int pgrp;
-
- /* Switch child to it's own process group so that signals won't
- directly affect gdbserver. */
-
- pgrp = getpid ();
- setpgrp (0, pgrp);
- ioctl (0, TIOCSPGRP, &pgrp);
-
- ptrace (PTRACE_TRACEME, 0, (PTRACE_ARG3_TYPE) 0, 0);
-
- execv (program, allargs);
-
- fprintf (stderr, "GDBserver (process %d): Cannot exec %s: %s.\n",
- getpid (), program,
- errno < sys_nerr ? sys_errlist[errno] : "unknown error");
- fflush (stderr);
- _exit (0177);
- }
-
- return pid;
-}
-
-/* Attaching is not supported. */
-int
-myattach (int pid)
-{
- return -1;
-}
-
-/* Kill the inferior process. Make us have no inferior. */
-
-void
-kill_inferior (void)
-{
- if (inferior_pid == 0)
- return;
- ptrace (PTRACE_KILL, inferior_pid, 0, 0);
- wait (0);
-
- inferior_pid = 0;
-}
-
-/* Return nonzero if the given thread is still alive. */
-int
-mythread_alive (int pid)
-{
- /* Arggh. Apparently pthread_kill only works for threads within
- the process that calls pthread_kill.
-
- We want to avoid the lynx signal extensions as they simply don't
- map well to the generic gdb interface we want to keep.
-
- All we want to do is determine if a particular thread is alive;
- it appears as if we can just make a harmless thread specific
- ptrace call to do that. */
- return (ptrace (PTRACE_THREADUSER,
- BUILDPID (PIDGET (inferior_pid), pid), 0, 0) != -1);
-}
-
-/* Wait for process, returns status */
-
-unsigned char
-mywait (char *status)
-{
- int pid;
- union wait w;
-
- while (1)
- {
- enable_async_io ();
-
- pid = wait (&w);
-
- disable_async_io ();
-
- if (pid != PIDGET (inferior_pid))
- perror_with_name ("wait");
-
- thread_from_wait = w.w_tid;
- inferior_pid = BUILDPID (inferior_pid, w.w_tid);
-
- if (WIFSTOPPED (w)
- && WSTOPSIG (w) == SIGTRAP)
- {
- int realsig;
-
- realsig = ptrace (PTRACE_GETTRACESIG, inferior_pid,
- (PTRACE_ARG3_TYPE) 0, 0);
-
- if (realsig == SIGNEWTHREAD)
- {
- /* It's a new thread notification. Nothing to do here since
- the machine independent code in wait_for_inferior will
- add the thread to the thread list and restart the thread
- when pid != inferior_pid and pid is not in the thread list.
- We don't even want to muck with realsig -- the code in
- wait_for_inferior expects SIGTRAP. */
- ;
- }
- }
- break;
- }
-
- if (WIFEXITED (w))
- {
- *status = 'W';
- return ((unsigned char) WEXITSTATUS (w));
- }
- else if (!WIFSTOPPED (w))
- {
- *status = 'X';
- return ((unsigned char) WTERMSIG (w));
- }
-
- fetch_inferior_registers (0);
-
- *status = 'T';
- return ((unsigned char) WSTOPSIG (w));
-}
-
-/* Resume execution of the inferior process.
- If STEP is nonzero, single-step it.
- If SIGNAL is nonzero, give it that signal. */
-
-void
-myresume (int step, int signal)
-{
- errno = 0;
- ptrace (step ? PTRACE_SINGLESTEP_ONE : PTRACE_CONT,
- BUILDPID (inferior_pid, cont_thread == -1 ? 0 : cont_thread),
- 1, signal);
- if (errno)
- perror_with_name ("ptrace");
-}
-
-#undef offsetof
-#define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER)
-
-/* Mapping between GDB register #s and offsets into econtext. Must be
- consistent with REGISTER_NAMES macro in various tmXXX.h files. */
-
-#define X(ENTRY)(offsetof(struct econtext, ENTRY))
-
-#ifdef I386
-/* Mappings from tm-i386v.h */
-
-static int regmap[] =
-{
- X (eax),
- X (ecx),
- X (edx),
- X (ebx),
- X (esp), /* sp */
- X (ebp), /* fp */
- X (esi),
- X (edi),
- X (eip), /* pc */
- X (flags), /* ps */
- X (cs),
- X (ss),
- X (ds),
- X (es),
- X (ecode), /* Lynx doesn't give us either fs or gs, so */
- X (fault), /* we just substitute these two in the hopes
- that they are useful. */
-};
-#endif
-
-#ifdef M68K
-/* Mappings from tm-m68k.h */
-
-static int regmap[] =
-{
- X (regs[0]), /* d0 */
- X (regs[1]), /* d1 */
- X (regs[2]), /* d2 */
- X (regs[3]), /* d3 */
- X (regs[4]), /* d4 */
- X (regs[5]), /* d5 */
- X (regs[6]), /* d6 */
- X (regs[7]), /* d7 */
- X (regs[8]), /* a0 */
- X (regs[9]), /* a1 */
- X (regs[10]), /* a2 */
- X (regs[11]), /* a3 */
- X (regs[12]), /* a4 */
- X (regs[13]), /* a5 */
- X (regs[14]), /* fp */
- 0, /* sp */
- X (status), /* ps */
- X (pc),
-
- X (fregs[0 * 3]), /* fp0 */
- X (fregs[1 * 3]), /* fp1 */
- X (fregs[2 * 3]), /* fp2 */
- X (fregs[3 * 3]), /* fp3 */
- X (fregs[4 * 3]), /* fp4 */
- X (fregs[5 * 3]), /* fp5 */
- X (fregs[6 * 3]), /* fp6 */
- X (fregs[7 * 3]), /* fp7 */
-
- X (fcregs[0]), /* fpcontrol */
- X (fcregs[1]), /* fpstatus */
- X (fcregs[2]), /* fpiaddr */
- X (ssw), /* fpcode */
- X (fault), /* fpflags */
-};
-#endif
-
-#ifdef SPARC
-/* Mappings from tm-sparc.h */
-
-#define FX(ENTRY)(offsetof(struct fcontext, ENTRY))
-
-static int regmap[] =
-{
- -1, /* g0 */
- X (g1),
- X (g2),
- X (g3),
- X (g4),
- -1, /* g5->g7 aren't saved by Lynx */
- -1,
- -1,
-
- X (o[0]),
- X (o[1]),
- X (o[2]),
- X (o[3]),
- X (o[4]),
- X (o[5]),
- X (o[6]), /* sp */
- X (o[7]), /* ra */
-
- -1, -1, -1, -1, -1, -1, -1, -1, /* l0 -> l7 */
-
- -1, -1, -1, -1, -1, -1, -1, -1, /* i0 -> i7 */
-
- FX (f.fregs[0]), /* f0 */
- FX (f.fregs[1]),
- FX (f.fregs[2]),
- FX (f.fregs[3]),
- FX (f.fregs[4]),
- FX (f.fregs[5]),
- FX (f.fregs[6]),
- FX (f.fregs[7]),
- FX (f.fregs[8]),
- FX (f.fregs[9]),
- FX (f.fregs[10]),
- FX (f.fregs[11]),
- FX (f.fregs[12]),
- FX (f.fregs[13]),
- FX (f.fregs[14]),
- FX (f.fregs[15]),
- FX (f.fregs[16]),
- FX (f.fregs[17]),
- FX (f.fregs[18]),
- FX (f.fregs[19]),
- FX (f.fregs[20]),
- FX (f.fregs[21]),
- FX (f.fregs[22]),
- FX (f.fregs[23]),
- FX (f.fregs[24]),
- FX (f.fregs[25]),
- FX (f.fregs[26]),
- FX (f.fregs[27]),
- FX (f.fregs[28]),
- FX (f.fregs[29]),
- FX (f.fregs[30]),
- FX (f.fregs[31]),
-
- X (y),
- X (psr),
- X (wim),
- X (tbr),
- X (pc),
- X (npc),
- FX (fsr), /* fpsr */
- -1, /* cpsr */
-};
-#endif
-
-#ifdef SPARC
-
-/* This routine handles some oddball cases for Sparc registers and LynxOS.
- In partucular, it causes refs to G0, g5->7, and all fp regs to return zero.
- It also handles knows where to find the I & L regs on the stack. */
-
-void
-fetch_inferior_registers (int regno)
-{
-#if 0
- int whatregs = 0;
-
-#define WHATREGS_FLOAT 1
-#define WHATREGS_GEN 2
-#define WHATREGS_STACK 4
-
- if (regno == -1)
- whatregs = WHATREGS_FLOAT | WHATREGS_GEN | WHATREGS_STACK;
- else if (regno >= L0_REGNUM && regno <= I7_REGNUM)
- whatregs = WHATREGS_STACK;
- else if (regno >= FP0_REGNUM && regno < FP0_REGNUM + 32)
- whatregs = WHATREGS_FLOAT;
- else
- whatregs = WHATREGS_GEN;
-
- if (whatregs & WHATREGS_GEN)
- {
- struct econtext ec; /* general regs */
- char buf[MAX_REGISTER_RAW_SIZE];
- int retval;
- int i;
-
- errno = 0;
- retval = ptrace (PTRACE_GETREGS,
- BUILDPID (inferior_pid, general_thread),
- (PTRACE_ARG3_TYPE) & ec,
- 0);
- if (errno)
- perror_with_name ("Sparc fetch_inferior_registers(ptrace)");
-
- memset (buf, 0, REGISTER_RAW_SIZE (G0_REGNUM));
- supply_register (G0_REGNUM, buf);
- supply_register (TBR_REGNUM, (char *) &ec.tbr);
-
- memcpy (&registers[REGISTER_BYTE (G1_REGNUM)], &ec.g1,
- 4 * REGISTER_RAW_SIZE (G1_REGNUM));
- for (i = G1_REGNUM; i <= G1_REGNUM + 3; i++)
- register_valid[i] = 1;
-
- supply_register (PS_REGNUM, (char *) &ec.psr);
- supply_register (Y_REGNUM, (char *) &ec.y);
- supply_register (PC_REGNUM, (char *) &ec.pc);
- supply_register (NPC_REGNUM, (char *) &ec.npc);
- supply_register (WIM_REGNUM, (char *) &ec.wim);
-
- memcpy (&registers[REGISTER_BYTE (O0_REGNUM)], ec.o,
- 8 * REGISTER_RAW_SIZE (O0_REGNUM));
- for (i = O0_REGNUM; i <= O0_REGNUM + 7; i++)
- register_valid[i] = 1;
- }
-
- if (whatregs & WHATREGS_STACK)
- {
- CORE_ADDR sp;
- int i;
-
- sp = read_register (SP_REGNUM);
-
- target_xfer_memory (sp + FRAME_SAVED_I0,
- &registers[REGISTER_BYTE (I0_REGNUM)],
- 8 * REGISTER_RAW_SIZE (I0_REGNUM), 0);
- for (i = I0_REGNUM; i <= I7_REGNUM; i++)
- register_valid[i] = 1;
-
- target_xfer_memory (sp + FRAME_SAVED_L0,
- &registers[REGISTER_BYTE (L0_REGNUM)],
- 8 * REGISTER_RAW_SIZE (L0_REGNUM), 0);
- for (i = L0_REGNUM; i <= L0_REGNUM + 7; i++)
- register_valid[i] = 1;
- }
-
- if (whatregs & WHATREGS_FLOAT)
- {
- struct fcontext fc; /* fp regs */
- int retval;
- int i;
-
- errno = 0;
- retval = ptrace (PTRACE_GETFPREGS, BUILDPID (inferior_pid, general_thread), (PTRACE_ARG3_TYPE) & fc,
- 0);
- if (errno)
- perror_with_name ("Sparc fetch_inferior_registers(ptrace)");
-
- memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], fc.f.fregs,
- 32 * REGISTER_RAW_SIZE (FP0_REGNUM));
- for (i = FP0_REGNUM; i <= FP0_REGNUM + 31; i++)
- register_valid[i] = 1;
-
- supply_register (FPS_REGNUM, (char *) &fc.fsr);
- }
-#endif
-}
-
-/* This routine handles storing of the I & L regs for the Sparc. The trick
- here is that they actually live on the stack. The really tricky part is
- that when changing the stack pointer, the I & L regs must be written to
- where the new SP points, otherwise the regs will be incorrect when the
- process is started up again. We assume that the I & L regs are valid at
- this point. */
-
-void
-store_inferior_registers (int regno)
-{
-#if 0
- int whatregs = 0;
-
- if (regno == -1)
- whatregs = WHATREGS_FLOAT | WHATREGS_GEN | WHATREGS_STACK;
- else if (regno >= L0_REGNUM && regno <= I7_REGNUM)
- whatregs = WHATREGS_STACK;
- else if (regno >= FP0_REGNUM && regno < FP0_REGNUM + 32)
- whatregs = WHATREGS_FLOAT;
- else if (regno == SP_REGNUM)
- whatregs = WHATREGS_STACK | WHATREGS_GEN;
- else
- whatregs = WHATREGS_GEN;
-
- if (whatregs & WHATREGS_GEN)
- {
- struct econtext ec; /* general regs */
- int retval;
-
- ec.tbr = read_register (TBR_REGNUM);
- memcpy (&ec.g1, &registers[REGISTER_BYTE (G1_REGNUM)],
- 4 * REGISTER_RAW_SIZE (G1_REGNUM));
-
- ec.psr = read_register (PS_REGNUM);
- ec.y = read_register (Y_REGNUM);
- ec.pc = read_register (PC_REGNUM);
- ec.npc = read_register (NPC_REGNUM);
- ec.wim = read_register (WIM_REGNUM);
-
- memcpy (ec.o, &registers[REGISTER_BYTE (O0_REGNUM)],
- 8 * REGISTER_RAW_SIZE (O0_REGNUM));
-
- errno = 0;
- retval = ptrace (PTRACE_SETREGS, BUILDPID (inferior_pid, general_thread), (PTRACE_ARG3_TYPE) & ec,
- 0);
- if (errno)
- perror_with_name ("Sparc fetch_inferior_registers(ptrace)");
- }
-
- if (whatregs & WHATREGS_STACK)
- {
- int regoffset;
- CORE_ADDR sp;
-
- sp = read_register (SP_REGNUM);
-
- if (regno == -1 || regno == SP_REGNUM)
- {
- if (!register_valid[L0_REGNUM + 5])
- abort ();
- target_xfer_memory (sp + FRAME_SAVED_I0,
- &registers[REGISTER_BYTE (I0_REGNUM)],
- 8 * REGISTER_RAW_SIZE (I0_REGNUM), 1);
-
- target_xfer_memory (sp + FRAME_SAVED_L0,
- &registers[REGISTER_BYTE (L0_REGNUM)],
- 8 * REGISTER_RAW_SIZE (L0_REGNUM), 1);
- }
- else if (regno >= L0_REGNUM && regno <= I7_REGNUM)
- {
- if (!register_valid[regno])
- abort ();
- if (regno >= L0_REGNUM && regno <= L0_REGNUM + 7)
- regoffset = REGISTER_BYTE (regno) - REGISTER_BYTE (L0_REGNUM)
- + FRAME_SAVED_L0;
- else
- regoffset = REGISTER_BYTE (regno) - REGISTER_BYTE (I0_REGNUM)
- + FRAME_SAVED_I0;
- target_xfer_memory (sp + regoffset, &registers[REGISTER_BYTE (regno)],
- REGISTER_RAW_SIZE (regno), 1);
- }
- }
-
- if (whatregs & WHATREGS_FLOAT)
- {
- struct fcontext fc; /* fp regs */
- int retval;
-
-/* We read fcontext first so that we can get good values for fq_t... */
- errno = 0;
- retval = ptrace (PTRACE_GETFPREGS, BUILDPID (inferior_pid, general_thread), (PTRACE_ARG3_TYPE) & fc,
- 0);
- if (errno)
- perror_with_name ("Sparc fetch_inferior_registers(ptrace)");
-
- memcpy (fc.f.fregs, &registers[REGISTER_BYTE (FP0_REGNUM)],
- 32 * REGISTER_RAW_SIZE (FP0_REGNUM));
-
- fc.fsr = read_register (FPS_REGNUM);
-
- errno = 0;
- retval = ptrace (PTRACE_SETFPREGS, BUILDPID (inferior_pid, general_thread), (PTRACE_ARG3_TYPE) & fc,
- 0);
- if (errno)
- perror_with_name ("Sparc fetch_inferior_registers(ptrace)");
- }
-#endif
-}
-#endif /* SPARC */
-
-#ifndef SPARC
-
-/* Return the offset relative to the start of the per-thread data to the
- saved context block. */
-
-static unsigned long
-lynx_registers_addr (void)
-{
- CORE_ADDR stblock;
- int ecpoff = offsetof (st_t, ecp);
- CORE_ADDR ecp;
-
- errno = 0;
- stblock = (CORE_ADDR) ptrace (PTRACE_THREADUSER, BUILDPID (inferior_pid, general_thread),
- (PTRACE_ARG3_TYPE) 0, 0);
- if (errno)
- perror_with_name ("PTRACE_THREADUSER");
-
- ecp = (CORE_ADDR) ptrace (PTRACE_PEEKTHREAD, BUILDPID (inferior_pid, general_thread),
- (PTRACE_ARG3_TYPE) ecpoff, 0);
- if (errno)
- perror_with_name ("lynx_registers_addr(PTRACE_PEEKTHREAD)");
-
- return ecp - stblock;
-}
-
-/* Fetch one or more registers from the inferior. REGNO == -1 to get
- them all. We actually fetch more than requested, when convenient,
- marking them as valid so we won't fetch them again. */
-
-void
-fetch_inferior_registers (int ignored)
-{
- int regno;
- unsigned long reg;
- unsigned long ecp;
-
- ecp = lynx_registers_addr ();
-
- for (regno = 0; regno < NUM_REGS; regno++)
- {
- int ptrace_fun = PTRACE_PEEKTHREAD;
-
-#ifdef PTRACE_PEEKUSP
- ptrace_fun = regno == SP_REGNUM ? PTRACE_PEEKUSP : PTRACE_PEEKTHREAD;
-#endif
-
- errno = 0;
- reg = ptrace (ptrace_fun, BUILDPID (inferior_pid, general_thread),
- (PTRACE_ARG3_TYPE) (ecp + regmap[regno]), 0);
- if (errno)
- perror_with_name ("fetch_inferior_registers(PTRACE_PEEKTHREAD)");
-
- *(unsigned long *) &registers[REGISTER_BYTE (regno)] = reg;
- }
-}
-
-/* Store our register values back into the inferior.
- If REGNO is -1, do this for all registers.
- Otherwise, REGNO specifies which register (so we can save time). */
-
-void
-store_inferior_registers (int ignored)
-{
- int regno;
- unsigned long reg;
- unsigned long ecp;
-
- ecp = lynx_registers_addr ();
-
- for (regno = 0; regno < NUM_REGS; regno++)
- {
- int ptrace_fun = PTRACE_POKEUSER;
-
-#ifdef PTRACE_POKEUSP
- ptrace_fun = regno == SP_REGNUM ? PTRACE_POKEUSP : PTRACE_POKEUSER;
-#endif
-
- reg = *(unsigned long *) &registers[REGISTER_BYTE (regno)];
-
- errno = 0;
- ptrace (ptrace_fun, BUILDPID (inferior_pid, general_thread),
- (PTRACE_ARG3_TYPE) (ecp + regmap[regno]), reg);
- if (errno)
- perror_with_name ("PTRACE_POKEUSER");
- }
-}
-
-#endif /* ! SPARC */
-
-/* NOTE! I tried using PTRACE_READDATA, etc., to read and write memory
- in the NEW_SUN_PTRACE case.
- It ought to be straightforward. But it appears that writing did
- not write the data that I specified. I cannot understand where
- it got the data that it actually did write. */
-
-/* Copy LEN bytes from inferior's memory starting at MEMADDR
- to debugger memory starting at MYADDR. */
-
-void
-read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
-{
- register int i;
- /* Round starting address down to longword boundary. */
- register CORE_ADDR addr = memaddr & -(CORE_ADDR) sizeof (int);
- /* Round ending address up; get number of longwords that makes. */
- register int count
- = (((memaddr + len) - addr) + sizeof (int) - 1) / sizeof (int);
- /* Allocate buffer of that many longwords. */
- register int *buffer = (int *) alloca (count * sizeof (int));
-
- /* Read all the longwords */
- for (i = 0; i < count; i++, addr += sizeof (int))
- {
- buffer[i] = ptrace (PTRACE_PEEKTEXT, BUILDPID (inferior_pid, general_thread), addr, 0);
- }
-
- /* Copy appropriate bytes out of the buffer. */
- memcpy (myaddr, (char *) buffer + (memaddr & (sizeof (int) - 1)), len);
-}
-
-/* Copy LEN bytes of data from debugger memory at MYADDR
- to inferior's memory at MEMADDR.
- On failure (cannot write the inferior)
- returns the value of errno. */
-
-int
-write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
-{
- register int i;
- /* Round starting address down to longword boundary. */
- register CORE_ADDR addr = memaddr & -(CORE_ADDR) sizeof (int);
- /* Round ending address up; get number of longwords that makes. */
- register int count
- = (((memaddr + len) - addr) + sizeof (int) - 1) / sizeof (int);
- /* Allocate buffer of that many longwords. */
- register int *buffer = (int *) alloca (count * sizeof (int));
- extern int errno;
-
- /* Fill start and end extra bytes of buffer with existing memory data. */
-
- buffer[0] = ptrace (PTRACE_PEEKTEXT, BUILDPID (inferior_pid, general_thread), addr, 0);
-
- if (count > 1)
- {
- buffer[count - 1]
- = ptrace (PTRACE_PEEKTEXT, BUILDPID (inferior_pid, general_thread),
- addr + (count - 1) * sizeof (int), 0);
- }
-
- /* Copy data to be written over corresponding part of buffer */
-
- memcpy ((char *) buffer + (memaddr & (sizeof (int) - 1)), myaddr, len);
-
- /* Write the entire buffer. */
-
- for (i = 0; i < count; i++, addr += sizeof (int))
- {
- while (1)
- {
- errno = 0;
- ptrace (PTRACE_POKETEXT, BUILDPID (inferior_pid, general_thread), addr, buffer[i]);
- if (errno)
- {
- fprintf (stderr, "\
-ptrace (PTRACE_POKETEXT): errno=%d, pid=0x%x, addr=0x%x, buffer[i] = 0x%x\n",
- errno, BUILDPID (inferior_pid, general_thread),
- addr, buffer[i]);
- fprintf (stderr, "Sleeping for 1 second\n");
- sleep (1);
- }
- else
- break;
- }
- }
-
- return 0;
-}
-
-void
-initialize_low (void)
-{
-}
diff --git a/gdb/gdbserver/low-nbsd.c b/gdb/gdbserver/low-nbsd.c
deleted file mode 100644
index 8bec0d98e57..00000000000
--- a/gdb/gdbserver/low-nbsd.c
+++ /dev/null
@@ -1,599 +0,0 @@
-/* Low level interface to ptrace, for the remote server for GDB.
- Copyright 1986, 1987, 1993, 2000, 2001, 2002 Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "server.h"
-#include <sys/types.h>
-#include <sys/wait.h>
-#include "frame.h"
-#include "inferior.h"
-
-#include <stdio.h>
-#include <errno.h>
-
-/***************Begin MY defs*********************/
-static char my_registers[REGISTER_BYTES];
-char *registers = my_registers;
-/***************End MY defs*********************/
-
-#include <sys/ptrace.h>
-#include <machine/reg.h>
-
-#define RF(dst, src) \
- memcpy(&registers[REGISTER_BYTE(dst)], &src, sizeof(src))
-
-#define RS(src, dst) \
- memcpy(&dst, &registers[REGISTER_BYTE(src)], sizeof(dst))
-
-#ifdef __i386__
-struct env387
- {
- unsigned short control;
- unsigned short r0;
- unsigned short status;
- unsigned short r1;
- unsigned short tag;
- unsigned short r2;
- unsigned long eip;
- unsigned short code_seg;
- unsigned short opcode;
- unsigned long operand;
- unsigned short operand_seg;
- unsigned short r3;
- unsigned char regs[8][10];
- };
-
-/* i386_register_raw_size[i] is the number of bytes of storage in the
- actual machine representation for register i. */
-int i386_register_raw_size[MAX_NUM_REGS] = {
- 4, 4, 4, 4,
- 4, 4, 4, 4,
- 4, 4, 4, 4,
- 4, 4, 4, 4,
- 10, 10, 10, 10,
- 10, 10, 10, 10,
- 4, 4, 4, 4,
- 4, 4, 4, 4,
- 16, 16, 16, 16,
- 16, 16, 16, 16,
- 4
-};
-
-int i386_register_byte[MAX_NUM_REGS];
-
-static void
-initialize_arch (void)
-{
- /* Initialize the table saying where each register starts in the
- register file. */
- {
- int i, offset;
-
- offset = 0;
- for (i = 0; i < MAX_NUM_REGS; i++)
- {
- i386_register_byte[i] = offset;
- offset += i386_register_raw_size[i];
- }
- }
-}
-#endif /* !__i386__ */
-
-#ifdef __m68k__
-static void
-initialize_arch (void)
-{
-}
-#endif /* !__m68k__ */
-
-#ifdef __ns32k__
-static void
-initialize_arch (void)
-{
-}
-#endif /* !__ns32k__ */
-
-#ifdef __powerpc__
-#include "ppc-tdep.h"
-
-static void
-initialize_arch (void)
-{
-}
-#endif /* !__powerpc__ */
-
-
-/* Start an inferior process and returns its pid.
- ALLARGS is a vector of program-name and args. */
-
-int
-create_inferior (char *program, char **allargs)
-{
- int pid;
-
- pid = fork ();
- if (pid < 0)
- perror_with_name ("fork");
-
- if (pid == 0)
- {
- ptrace (PT_TRACE_ME, 0, 0, 0);
-
- execv (program, allargs);
-
- fprintf (stderr, "Cannot exec %s: %s.\n", program,
- errno < sys_nerr ? sys_errlist[errno] : "unknown error");
- fflush (stderr);
- _exit (0177);
- }
-
- return pid;
-}
-
-/* Attaching is not supported. */
-int
-myattach (int pid)
-{
- return -1;
-}
-
-/* Kill the inferior process. Make us have no inferior. */
-
-void
-kill_inferior (void)
-{
- if (inferior_pid == 0)
- return;
- ptrace (PT_KILL, inferior_pid, 0, 0);
- wait (0);
- /*************inferior_died ();****VK**************/
-}
-
-/* Return nonzero if the given thread is still alive. */
-int
-mythread_alive (int pid)
-{
- return 1;
-}
-
-/* Wait for process, returns status */
-
-unsigned char
-mywait (char *status)
-{
- int pid;
- int w;
-
- enable_async_io ();
- pid = waitpid (inferior_pid, &w, 0);
- disable_async_io ();
- if (pid != inferior_pid)
- perror_with_name ("wait");
-
- if (WIFEXITED (w))
- {
- fprintf (stderr, "\nChild exited with retcode = %x \n", WEXITSTATUS (w));
- *status = 'W';
- return ((unsigned char) WEXITSTATUS (w));
- }
- else if (!WIFSTOPPED (w))
- {
- fprintf (stderr, "\nChild terminated with signal = %x \n", WTERMSIG (w));
- *status = 'X';
- return ((unsigned char) WTERMSIG (w));
- }
-
- fetch_inferior_registers (0);
-
- *status = 'T';
- return ((unsigned char) WSTOPSIG (w));
-}
-
-/* Resume execution of the inferior process.
- If STEP is nonzero, single-step it.
- If SIGNAL is nonzero, give it that signal. */
-
-void
-myresume (int step, int signal)
-{
- errno = 0;
- ptrace (step ? PT_STEP : PT_CONTINUE, inferior_pid,
- (PTRACE_ARG3_TYPE) 1, signal);
- if (errno)
- perror_with_name ("ptrace");
-}
-
-
-#ifdef __i386__
-/* Fetch one or more registers from the inferior. REGNO == -1 to get
- them all. We actually fetch more than requested, when convenient,
- marking them as valid so we won't fetch them again. */
-
-void
-fetch_inferior_registers (int ignored)
-{
- struct reg inferior_registers;
- struct env387 inferior_fp_registers;
-
- ptrace (PT_GETREGS, inferior_pid,
- (PTRACE_ARG3_TYPE) &inferior_registers, 0);
- ptrace (PT_GETFPREGS, inferior_pid,
- (PTRACE_ARG3_TYPE) &inferior_fp_registers, 0);
-
- RF ( 0, inferior_registers.r_eax);
- RF ( 1, inferior_registers.r_ecx);
- RF ( 2, inferior_registers.r_edx);
- RF ( 3, inferior_registers.r_ebx);
- RF ( 4, inferior_registers.r_esp);
- RF ( 5, inferior_registers.r_ebp);
- RF ( 6, inferior_registers.r_esi);
- RF ( 7, inferior_registers.r_edi);
- RF ( 8, inferior_registers.r_eip);
- RF ( 9, inferior_registers.r_eflags);
- RF (10, inferior_registers.r_cs);
- RF (11, inferior_registers.r_ss);
- RF (12, inferior_registers.r_ds);
- RF (13, inferior_registers.r_es);
- RF (14, inferior_registers.r_fs);
- RF (15, inferior_registers.r_gs);
-
- RF (FP0_REGNUM, inferior_fp_registers.regs[0]);
- RF (FP0_REGNUM + 1, inferior_fp_registers.regs[1]);
- RF (FP0_REGNUM + 2, inferior_fp_registers.regs[2]);
- RF (FP0_REGNUM + 3, inferior_fp_registers.regs[3]);
- RF (FP0_REGNUM + 4, inferior_fp_registers.regs[4]);
- RF (FP0_REGNUM + 5, inferior_fp_registers.regs[5]);
- RF (FP0_REGNUM + 6, inferior_fp_registers.regs[6]);
- RF (FP0_REGNUM + 7, inferior_fp_registers.regs[7]);
-
- RF (FCTRL_REGNUM, inferior_fp_registers.control);
- RF (FSTAT_REGNUM, inferior_fp_registers.status);
- RF (FTAG_REGNUM, inferior_fp_registers.tag);
- RF (FCS_REGNUM, inferior_fp_registers.code_seg);
- RF (FCOFF_REGNUM, inferior_fp_registers.eip);
- RF (FDS_REGNUM, inferior_fp_registers.operand_seg);
- RF (FDOFF_REGNUM, inferior_fp_registers.operand);
- RF (FOP_REGNUM, inferior_fp_registers.opcode);
-}
-
-/* Store our register values back into the inferior.
- If REGNO is -1, do this for all registers.
- Otherwise, REGNO specifies which register (so we can save time). */
-
-void
-store_inferior_registers (int ignored)
-{
- struct reg inferior_registers;
- struct env387 inferior_fp_registers;
-
- RS ( 0, inferior_registers.r_eax);
- RS ( 1, inferior_registers.r_ecx);
- RS ( 2, inferior_registers.r_edx);
- RS ( 3, inferior_registers.r_ebx);
- RS ( 4, inferior_registers.r_esp);
- RS ( 5, inferior_registers.r_ebp);
- RS ( 6, inferior_registers.r_esi);
- RS ( 7, inferior_registers.r_edi);
- RS ( 8, inferior_registers.r_eip);
- RS ( 9, inferior_registers.r_eflags);
- RS (10, inferior_registers.r_cs);
- RS (11, inferior_registers.r_ss);
- RS (12, inferior_registers.r_ds);
- RS (13, inferior_registers.r_es);
- RS (14, inferior_registers.r_fs);
- RS (15, inferior_registers.r_gs);
-
- RS (FP0_REGNUM, inferior_fp_registers.regs[0]);
- RS (FP0_REGNUM + 1, inferior_fp_registers.regs[1]);
- RS (FP0_REGNUM + 2, inferior_fp_registers.regs[2]);
- RS (FP0_REGNUM + 3, inferior_fp_registers.regs[3]);
- RS (FP0_REGNUM + 4, inferior_fp_registers.regs[4]);
- RS (FP0_REGNUM + 5, inferior_fp_registers.regs[5]);
- RS (FP0_REGNUM + 6, inferior_fp_registers.regs[6]);
- RS (FP0_REGNUM + 7, inferior_fp_registers.regs[7]);
-
- RS (FCTRL_REGNUM, inferior_fp_registers.control);
- RS (FSTAT_REGNUM, inferior_fp_registers.status);
- RS (FTAG_REGNUM, inferior_fp_registers.tag);
- RS (FCS_REGNUM, inferior_fp_registers.code_seg);
- RS (FCOFF_REGNUM, inferior_fp_registers.eip);
- RS (FDS_REGNUM, inferior_fp_registers.operand_seg);
- RS (FDOFF_REGNUM, inferior_fp_registers.operand);
- RS (FOP_REGNUM, inferior_fp_registers.opcode);
-
- ptrace (PT_SETREGS, inferior_pid,
- (PTRACE_ARG3_TYPE) &inferior_registers, 0);
- ptrace (PT_SETFPREGS, inferior_pid,
- (PTRACE_ARG3_TYPE) &inferior_fp_registers, 0);
-}
-#endif /* !__i386__ */
-
-#ifdef __m68k__
-/* Fetch one or more registers from the inferior. REGNO == -1 to get
- them all. We actually fetch more than requested, when convenient,
- marking them as valid so we won't fetch them again. */
-
-void
-fetch_inferior_registers (int regno)
-{
- struct reg inferior_registers;
- struct fpreg inferior_fp_registers;
-
- ptrace (PT_GETREGS, inferior_pid,
- (PTRACE_ARG3_TYPE) & inferior_registers, 0);
- memcpy (&registers[REGISTER_BYTE (0)], &inferior_registers,
- sizeof (inferior_registers));
-
- ptrace (PT_GETFPREGS, inferior_pid,
- (PTRACE_ARG3_TYPE) & inferior_fp_registers, 0);
- memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], &inferior_fp_registers,
- sizeof (inferior_fp_registers));
-}
-
-/* Store our register values back into the inferior.
- If REGNO is -1, do this for all registers.
- Otherwise, REGNO specifies which register (so we can save time). */
-
-void
-store_inferior_registers (int regno)
-{
- struct reg inferior_registers;
- struct fpreg inferior_fp_registers;
-
- memcpy (&inferior_registers, &registers[REGISTER_BYTE (0)],
- sizeof (inferior_registers));
- ptrace (PT_SETREGS, inferior_pid,
- (PTRACE_ARG3_TYPE) & inferior_registers, 0);
-
- memcpy (&inferior_fp_registers, &registers[REGISTER_BYTE (FP0_REGNUM)],
- sizeof (inferior_fp_registers));
- ptrace (PT_SETFPREGS, inferior_pid,
- (PTRACE_ARG3_TYPE) & inferior_fp_registers, 0);
-}
-#endif /* !__m68k__ */
-
-
-#ifdef __ns32k__
-/* Fetch one or more registers from the inferior. REGNO == -1 to get
- them all. We actually fetch more than requested, when convenient,
- marking them as valid so we won't fetch them again. */
-
-void
-fetch_inferior_registers (int regno)
-{
- struct reg inferior_registers;
- struct fpreg inferior_fpregisters;
-
- ptrace (PT_GETREGS, inferior_pid,
- (PTRACE_ARG3_TYPE) & inferior_registers, 0);
- ptrace (PT_GETFPREGS, inferior_pid,
- (PTRACE_ARG3_TYPE) & inferior_fpregisters, 0);
-
- RF (R0_REGNUM + 0, inferior_registers.r_r0);
- RF (R0_REGNUM + 1, inferior_registers.r_r1);
- RF (R0_REGNUM + 2, inferior_registers.r_r2);
- RF (R0_REGNUM + 3, inferior_registers.r_r3);
- RF (R0_REGNUM + 4, inferior_registers.r_r4);
- RF (R0_REGNUM + 5, inferior_registers.r_r5);
- RF (R0_REGNUM + 6, inferior_registers.r_r6);
- RF (R0_REGNUM + 7, inferior_registers.r_r7);
-
- RF (SP_REGNUM, inferior_registers.r_sp);
- RF (DEPRECATED_FP_REGNUM, inferior_registers.r_fp);
- RF (PC_REGNUM, inferior_registers.r_pc);
- RF (PS_REGNUM, inferior_registers.r_psr);
-
- RF (FPS_REGNUM, inferior_fpregisters.r_fsr);
- RF (FP0_REGNUM + 0, inferior_fpregisters.r_freg[0]);
- RF (FP0_REGNUM + 2, inferior_fpregisters.r_freg[2]);
- RF (FP0_REGNUM + 4, inferior_fpregisters.r_freg[4]);
- RF (FP0_REGNUM + 6, inferior_fpregisters.r_freg[6]);
- RF (LP0_REGNUM + 1, inferior_fpregisters.r_freg[1]);
- RF (LP0_REGNUM + 3, inferior_fpregisters.r_freg[3]);
- RF (LP0_REGNUM + 5, inferior_fpregisters.r_freg[5]);
- RF (LP0_REGNUM + 7, inferior_fpregisters.r_freg[7]);
-}
-
-/* Store our register values back into the inferior.
- If REGNO is -1, do this for all registers.
- Otherwise, REGNO specifies which register (so we can save time). */
-
-void
-store_inferior_registers (int regno)
-{
- struct reg inferior_registers;
- struct fpreg inferior_fpregisters;
-
- RS (R0_REGNUM + 0, inferior_registers.r_r0);
- RS (R0_REGNUM + 1, inferior_registers.r_r1);
- RS (R0_REGNUM + 2, inferior_registers.r_r2);
- RS (R0_REGNUM + 3, inferior_registers.r_r3);
- RS (R0_REGNUM + 4, inferior_registers.r_r4);
- RS (R0_REGNUM + 5, inferior_registers.r_r5);
- RS (R0_REGNUM + 6, inferior_registers.r_r6);
- RS (R0_REGNUM + 7, inferior_registers.r_r7);
-
- RS (SP_REGNUM, inferior_registers.r_sp);
- RS (DEPRECATED_FP_REGNUM, inferior_registers.r_fp);
- RS (PC_REGNUM, inferior_registers.r_pc);
- RS (PS_REGNUM, inferior_registers.r_psr);
-
- RS (FPS_REGNUM, inferior_fpregisters.r_fsr);
- RS (FP0_REGNUM + 0, inferior_fpregisters.r_freg[0]);
- RS (FP0_REGNUM + 2, inferior_fpregisters.r_freg[2]);
- RS (FP0_REGNUM + 4, inferior_fpregisters.r_freg[4]);
- RS (FP0_REGNUM + 6, inferior_fpregisters.r_freg[6]);
- RS (LP0_REGNUM + 1, inferior_fpregisters.r_freg[1]);
- RS (LP0_REGNUM + 3, inferior_fpregisters.r_freg[3]);
- RS (LP0_REGNUM + 5, inferior_fpregisters.r_freg[5]);
- RS (LP0_REGNUM + 7, inferior_fpregisters.r_freg[7]);
-
- ptrace (PT_SETREGS, inferior_pid,
- (PTRACE_ARG3_TYPE) & inferior_registers, 0);
- ptrace (PT_SETFPREGS, inferior_pid,
- (PTRACE_ARG3_TYPE) & inferior_fpregisters, 0);
-
-}
-#endif /* !__ns32k__ */
-
-#ifdef __powerpc__
-/* Fetch one or more registers from the inferior. REGNO == -1 to get
- them all. We actually fetch more than requested, when convenient,
- marking them as valid so we won't fetch them again. */
-
-void
-fetch_inferior_registers (int regno)
-{
- struct reg inferior_registers;
-#ifdef PT_GETFPREGS
- struct fpreg inferior_fp_registers;
-#endif
- int i;
-
- ptrace (PT_GETREGS, inferior_pid,
- (PTRACE_ARG3_TYPE) & inferior_registers, 0);
- for (i = 0; i < 32; i++)
- RF (i, inferior_registers.fixreg[i]);
- RF (PPC_LR_REGNUM, inferior_registers.lr);
- RF (PPC_CR_REGNUM, inferior_registers.cr);
- RF (PPC_XER_REGNUM, inferior_registers.xer);
- RF (PPC_CTR_REGNUM, inferior_registers.ctr);
- RF (PC_REGNUM, inferior_registers.pc);
-
-#ifdef PT_GETFPREGS
- ptrace (PT_GETFPREGS, inferior_pid,
- (PTRACE_ARG3_TYPE) & inferior_fp_registers, 0);
- for (i = 0; i < 32; i++)
- RF (FP0_REGNUM + i, inferior_fp_registers.r_regs[i]);
-#endif
-}
-
-/* Store our register values back into the inferior.
- If REGNO is -1, do this for all registers.
- Otherwise, REGNO specifies which register (so we can save time). */
-
-void
-store_inferior_registers (int regno)
-{
- struct reg inferior_registers;
-#ifdef PT_SETFPREGS
- struct fpreg inferior_fp_registers;
-#endif
- int i;
-
- for (i = 0; i < 32; i++)
- RS (i, inferior_registers.fixreg[i]);
- RS (PPC_LR_REGNUM, inferior_registers.lr);
- RS (PPC_CR_REGNUM, inferior_registers.cr);
- RS (PPC_XER_REGNUM, inferior_registers.xer);
- RS (PPC_CTR_REGNUM, inferior_registers.ctr);
- RS (PC_REGNUM, inferior_registers.pc);
- ptrace (PT_SETREGS, inferior_pid,
- (PTRACE_ARG3_TYPE) & inferior_registers, 0);
-
-#ifdef PT_SETFPREGS
- for (i = 0; i < 32; i++)
- RS (FP0_REGNUM + i, inferior_fp_registers.r_regs[i]);
- ptrace (PT_SETFPREGS, inferior_pid,
- (PTRACE_ARG3_TYPE) & inferior_fp_registers, 0);
-#endif
-}
-#endif /* !__powerpc__ */
-
-/* NOTE! I tried using PTRACE_READDATA, etc., to read and write memory
- in the NEW_SUN_PTRACE case.
- It ought to be straightforward. But it appears that writing did
- not write the data that I specified. I cannot understand where
- it got the data that it actually did write. */
-
-/* Copy LEN bytes from inferior's memory starting at MEMADDR
- to debugger memory starting at MYADDR. */
-
-void
-read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
-{
- register int i;
- /* Round starting address down to longword boundary. */
- register CORE_ADDR addr = memaddr & -(CORE_ADDR) sizeof (int);
- /* Round ending address up; get number of longwords that makes. */
- register int count
- = (((memaddr + len) - addr) + sizeof (int) - 1) / sizeof (int);
- /* Allocate buffer of that many longwords. */
- register int *buffer = (int *) alloca (count * sizeof (int));
-
- /* Read all the longwords */
- for (i = 0; i < count; i++, addr += sizeof (int))
- {
- buffer[i] = ptrace (PT_READ_D, inferior_pid, (PTRACE_ARG3_TYPE) addr, 0);
- }
-
- /* Copy appropriate bytes out of the buffer. */
- memcpy (myaddr, (char *) buffer + (memaddr & (sizeof (int) - 1)), len);
-}
-
-/* Copy LEN bytes of data from debugger memory at MYADDR
- to inferior's memory at MEMADDR.
- On failure (cannot write the inferior)
- returns the value of errno. */
-
-int
-write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
-{
- register int i;
- /* Round starting address down to longword boundary. */
- register CORE_ADDR addr = memaddr & -(CORE_ADDR) sizeof (int);
- /* Round ending address up; get number of longwords that makes. */
- register int count
- = (((memaddr + len) - addr) + sizeof (int) - 1) / sizeof (int);
- /* Allocate buffer of that many longwords. */
- register int *buffer = (int *) alloca (count * sizeof (int));
- extern int errno;
-
- /* Fill start and end extra bytes of buffer with existing memory data. */
-
- buffer[0] = ptrace (PT_READ_D, inferior_pid, (PTRACE_ARG3_TYPE) addr, 0);
-
- if (count > 1)
- {
- buffer[count - 1]
- = ptrace (PT_READ_D, inferior_pid,
- (PTRACE_ARG3_TYPE) addr + (count - 1) * sizeof (int), 0);
- }
-
- /* Copy data to be written over corresponding part of buffer */
-
- memcpy ((char *) buffer + (memaddr & (sizeof (int) - 1)), myaddr, len);
-
- /* Write the entire buffer. */
-
- for (i = 0; i < count; i++, addr += sizeof (int))
- {
- errno = 0;
- ptrace (PT_WRITE_D, inferior_pid, (PTRACE_ARG3_TYPE) addr, buffer[i]);
- if (errno)
- return errno;
- }
-
- return 0;
-}
-
-void
-initialize_low (void)
-{
- initialize_arch ();
-}
diff --git a/gdb/gdbserver/low-sim.c b/gdb/gdbserver/low-sim.c
deleted file mode 100644
index 86a040621d9..00000000000
--- a/gdb/gdbserver/low-sim.c
+++ /dev/null
@@ -1,269 +0,0 @@
-/* Low level interface to simulators, for the remote server for GDB.
- Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "server.h"
-#include "bfd.h"
-#include "callback.h" /* GDB simulator callback interface */
-#include "remote-sim.h" /* GDB simulator interface */
-
-extern int remote_debug;
-
-extern host_callback default_callback; /* in sim/common/callback.c */
-
-static char my_registers[REGISTER_BYTES] __attribute__ ((aligned));
-char * registers = my_registers;
-
-int target_byte_order; /* used by simulator */
-
-/* We record the result of sim_open so we can pass it
- back to the other sim_foo routines. */
-static SIM_DESC gdbsim_desc = 0;
-
-/* This version of "load" should be usable for any simulator that
- does not support loading itself. */
-
-static void
-mygeneric_load (bfd *loadfile_bfd)
-{
- asection *s;
-
- for (s = loadfile_bfd->sections; s; s = s->next)
- {
- if (s->flags & SEC_LOAD)
- {
- bfd_size_type size;
-
- size = bfd_get_section_size_before_reloc (s);
- if (size > 0)
- {
- char *buffer;
- bfd_vma lma; /* use load address, not virtual address */
-
- buffer = xmalloc (size);
- lma = s->lma;
-
- /* Is this really necessary? I guess it gives the user something
- to look at during a long download. */
- printf ("Loading section %s, size 0x%lx lma 0x%lx\n",
- bfd_get_section_name (loadfile_bfd, s),
- (unsigned long) size,
- (unsigned long) lma); /* chops high 32 bits. FIXME!! */
-
- bfd_get_section_contents (loadfile_bfd, s, buffer, 0, size);
-
- write_inferior_memory (lma, buffer, size);
- free (buffer);
- }
- }
- }
-
- printf ("Start address 0x%lx\n",
- (unsigned long) loadfile_bfd->start_address);
-
- /* We were doing this in remote-mips.c, I suspect it is right
- for other targets too. */
- /* write_pc (loadfile_bfd->start_address); *//* FIXME!! */
-}
-
-int
-create_inferior (char *program, char **argv)
-{
- bfd *abfd;
- int pid = 0;
- char **new_argv;
- int nargs;
-
- abfd = bfd_openr (program, 0);
- if (!abfd)
- {
- fprintf (stderr, "gdbserver: can't open %s: %s\n",
- program, bfd_errmsg (bfd_get_error ()));
- exit (1);
- }
-
- if (!bfd_check_format (abfd, bfd_object))
- {
- fprintf (stderr, "gdbserver: unknown load format for %s: %s\n",
- program, bfd_errmsg (bfd_get_error ()));
- exit (1);
- }
-
- /* Add "-E big" or "-E little" to the argument list depending on the
- endianness of the program to be loaded. */
- for (nargs = 0; argv[nargs] != NULL; nargs++) /* count the args */
- ;
- new_argv = alloca (sizeof (char *) * (nargs + 3)); /* allocate new args */
- for (nargs = 0; argv[nargs] != NULL; nargs++) /* copy old to new */
- new_argv[nargs] = argv[nargs];
- new_argv[nargs] = "-E";
- new_argv[nargs + 1] = bfd_big_endian (abfd) ? "big" : "little";
- new_argv[nargs + 2] = NULL;
- argv = new_argv;
-
- /* Create an instance of the simulator. */
- default_callback.init (&default_callback);
- gdbsim_desc = sim_open (SIM_OPEN_STANDALONE, &default_callback, abfd, argv);
- if (gdbsim_desc == 0)
- exit (1);
-
- /* Load the program into the simulator. */
- if (abfd)
- if (sim_load (gdbsim_desc, program, NULL, 0) == SIM_RC_FAIL)
- mygeneric_load (abfd);
-
- /* Create an inferior process in the simulator. This initializes SP. */
- sim_create_inferior (gdbsim_desc, abfd, argv, /* env */ NULL);
- sim_resume (gdbsim_desc, 1, 0); /* execute one instr */
- return pid;
-}
-
-/* Attaching is not supported. */
-int
-myattach (int pid)
-{
- return -1;
-}
-
-/* Kill the inferior process. Make us have no inferior. */
-
-void
-kill_inferior (void)
-{
- sim_close (gdbsim_desc, 0);
- default_callback.shutdown (&default_callback);
-}
-
-/* Fetch one register. */
-
-static void
-fetch_register (int regno)
-{
- sim_fetch_register (gdbsim_desc, regno, &registers[REGISTER_BYTE (regno)],
- REGISTER_RAW_SIZE (regno));
-}
-
-/* Fetch all registers, or just one, from the child process. */
-
-void
-fetch_inferior_registers (int regno)
-{
- if (regno == -1 || regno == 0)
- for (regno = 0; regno < NUM_REGS /*-NUM_FREGS*/ ; regno++)
- fetch_register (regno);
- else
- fetch_register (regno);
-}
-
-/* Store our register values back into the inferior.
- If REGNO is -1, do this for all registers.
- Otherwise, REGNO specifies which register (so we can save time). */
-
-void
-store_inferior_registers (int regno)
-{
- if (regno == -1)
- {
- for (regno = 0; regno < NUM_REGS; regno++)
- store_inferior_registers (regno);
- }
- else
- sim_store_register (gdbsim_desc, regno, &registers[REGISTER_BYTE (regno)],
- REGISTER_RAW_SIZE (regno));
-}
-
-/* Return nonzero if the given thread is still alive. */
-int
-mythread_alive (int pid)
-{
- return 1;
-}
-
-/* Wait for process, returns status */
-
-unsigned char
-mywait (char *status)
-{
- int sigrc;
- enum sim_stop reason;
-
- sim_stop_reason (gdbsim_desc, &reason, &sigrc);
- switch (reason)
- {
- case sim_exited:
- if (remote_debug)
- printf ("\nChild exited with retcode = %x \n", sigrc);
- *status = 'W';
- return sigrc;
-
-#if 0
- case sim_stopped:
- if (remote_debug)
- printf ("\nChild terminated with signal = %x \n", sigrc);
- *status = 'X';
- return sigrc;
-#endif
-
- default: /* should this be sim_signalled or sim_stopped? FIXME!! */
- if (remote_debug)
- printf ("\nChild received signal = %x \n", sigrc);
- fetch_inferior_registers (0);
- *status = 'T';
- return (unsigned char) sigrc;
- }
-}
-
-/* Resume execution of the inferior process.
- If STEP is nonzero, single-step it.
- If SIGNAL is nonzero, give it that signal. */
-
-void
-myresume (int step, int signo)
-{
- /* Should be using target_signal_to_host() or signal numbers in target.h
- to convert GDB signal number to target signal number. */
- sim_resume (gdbsim_desc, step, signo);
-}
-
-/* Copy LEN bytes from inferior's memory starting at MEMADDR
- to debugger memory starting at MYADDR. */
-
-void
-read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
-{
- sim_read (gdbsim_desc, memaddr, myaddr, len);
-}
-
-/* Copy LEN bytes of data from debugger memory at MYADDR
- to inferior's memory at MEMADDR.
- On failure (cannot write the inferior)
- returns the value of errno. */
-
-int
-write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
-{
- sim_write (gdbsim_desc, memaddr, myaddr, len); /* should check for error. FIXME!! */
- return 0;
-}
-
-void
-initialize_low (void)
-{
-}
diff --git a/gdb/gdbserver/low-sparc.c b/gdb/gdbserver/low-sparc.c
deleted file mode 100644
index 4b03140e128..00000000000
--- a/gdb/gdbserver/low-sparc.c
+++ /dev/null
@@ -1,314 +0,0 @@
-/* Low level interface to ptrace, for the remote server for GDB.
- Copyright 1986, 1987, 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "server.h"
-#include <sys/wait.h>
-#include "frame.h"
-#include "inferior.h"
-/***************************
-#include "initialize.h"
-****************************/
-
-#include <stdio.h>
-#include <sys/param.h>
-#include <sys/dir.h>
-#include <sys/user.h>
-#include <signal.h>
-#include <sys/ioctl.h>
-#include <sgtty.h>
-#include <fcntl.h>
-
-/***************Begin MY defs*********************/
-static char my_registers[REGISTER_BYTES];
-char *registers = my_registers;
-/***************End MY defs*********************/
-
-#include <sys/ptrace.h>
-#include <sys/reg.h>
-
-extern int sys_nerr;
-extern char **sys_errlist;
-extern int errno;
-
-/* Start an inferior process and returns its pid.
- ALLARGS is a vector of program-name and args. */
-
-int
-create_inferior (char *program, char **allargs)
-{
- int pid;
-
- pid = fork ();
- if (pid < 0)
- perror_with_name ("fork");
-
- if (pid == 0)
- {
- ptrace (PTRACE_TRACEME);
-
- execv (program, allargs);
-
- fprintf (stderr, "Cannot exec %s: %s.\n", program,
- errno < sys_nerr ? sys_errlist[errno] : "unknown error");
- fflush (stderr);
- _exit (0177);
- }
-
- return pid;
-}
-
-/* Attaching is not supported. */
-int
-myattach (int pid)
-{
- return -1;
-}
-
-/* Kill the inferior process. Make us have no inferior. */
-
-void
-kill_inferior (void)
-{
- if (inferior_pid == 0)
- return;
- ptrace (8, inferior_pid, 0, 0);
- wait (0);
-/*************inferior_died ();****VK**************/
-}
-
-/* Return nonzero if the given thread is still alive. */
-int
-mythread_alive (int pid)
-{
- return 1;
-}
-
-/* Wait for process, returns status */
-
-unsigned char
-mywait (char *status)
-{
- int pid;
- union wait w;
-
- enable_async_io ();
- pid = waitpid (inferior_pid, &w, 0);
- disable_async_io ();
- if (pid != inferior_pid)
- perror_with_name ("wait");
-
- if (WIFEXITED (w))
- {
- fprintf (stderr, "\nChild exited with retcode = %x \n", WEXITSTATUS (w));
- *status = 'W';
- return ((unsigned char) WEXITSTATUS (w));
- }
- else if (!WIFSTOPPED (w))
- {
- fprintf (stderr, "\nChild terminated with signal = %x \n", WTERMSIG (w));
- *status = 'X';
- return ((unsigned char) WTERMSIG (w));
- }
-
- fetch_inferior_registers (0);
-
- *status = 'T';
- return ((unsigned char) WSTOPSIG (w));
-}
-
-/* Resume execution of the inferior process.
- If STEP is nonzero, single-step it.
- If SIGNAL is nonzero, give it that signal. */
-
-void
-myresume (int step, int signal)
-{
- errno = 0;
- ptrace (step ? PTRACE_SINGLESTEP : PTRACE_CONT, inferior_pid, 1, signal);
- if (errno)
- perror_with_name ("ptrace");
-}
-
-/* Fetch one or more registers from the inferior. REGNO == -1 to get
- them all. We actually fetch more than requested, when convenient,
- marking them as valid so we won't fetch them again. */
-
-void
-fetch_inferior_registers (int ignored)
-{
- struct regs inferior_registers;
- struct fp_status inferior_fp_registers;
- int i;
-
- /* Global and Out regs are fetched directly, as well as the control
- registers. If we're getting one of the in or local regs,
- and the stack pointer has not yet been fetched,
- we have to do that first, since they're found in memory relative
- to the stack pointer. */
-
- if (ptrace (PTRACE_GETREGS, inferior_pid,
- (PTRACE_ARG3_TYPE) & inferior_registers, 0))
- perror ("ptrace_getregs");
-
- registers[REGISTER_BYTE (0)] = 0;
- memcpy (&registers[REGISTER_BYTE (1)], &inferior_registers.r_g1,
- 15 * REGISTER_RAW_SIZE (G0_REGNUM));
- *(int *) &registers[REGISTER_BYTE (PS_REGNUM)] = inferior_registers.r_ps;
- *(int *) &registers[REGISTER_BYTE (PC_REGNUM)] = inferior_registers.r_pc;
- *(int *) &registers[REGISTER_BYTE (NPC_REGNUM)] = inferior_registers.r_npc;
- *(int *) &registers[REGISTER_BYTE (Y_REGNUM)] = inferior_registers.r_y;
-
- /* Floating point registers */
-
- if (ptrace (PTRACE_GETFPREGS, inferior_pid,
- (PTRACE_ARG3_TYPE) & inferior_fp_registers,
- 0))
- perror ("ptrace_getfpregs");
- memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], &inferior_fp_registers,
- sizeof inferior_fp_registers.fpu_fr);
-
- /* These regs are saved on the stack by the kernel. Only read them
- all (16 ptrace calls!) if we really need them. */
-
- read_inferior_memory (*(CORE_ADDR *) & registers[REGISTER_BYTE (SP_REGNUM)],
- &registers[REGISTER_BYTE (L0_REGNUM)],
- 16 * REGISTER_RAW_SIZE (L0_REGNUM));
-}
-
-/* Store our register values back into the inferior.
- If REGNO is -1, do this for all registers.
- Otherwise, REGNO specifies which register (so we can save time). */
-
-void
-store_inferior_registers (int ignored)
-{
- struct regs inferior_registers;
- struct fp_status inferior_fp_registers;
- CORE_ADDR sp = *(CORE_ADDR *) & registers[REGISTER_BYTE (SP_REGNUM)];
-
- write_inferior_memory (sp, &registers[REGISTER_BYTE (L0_REGNUM)],
- 16 * REGISTER_RAW_SIZE (L0_REGNUM));
-
- memcpy (&inferior_registers.r_g1, &registers[REGISTER_BYTE (G1_REGNUM)],
- 15 * REGISTER_RAW_SIZE (G1_REGNUM));
-
- inferior_registers.r_ps =
- *(int *) &registers[REGISTER_BYTE (PS_REGNUM)];
- inferior_registers.r_pc =
- *(int *) &registers[REGISTER_BYTE (PC_REGNUM)];
- inferior_registers.r_npc =
- *(int *) &registers[REGISTER_BYTE (NPC_REGNUM)];
- inferior_registers.r_y =
- *(int *) &registers[REGISTER_BYTE (Y_REGNUM)];
-
- if (ptrace (PTRACE_SETREGS, inferior_pid,
- (PTRACE_ARG3_TYPE) & inferior_registers, 0))
- perror ("ptrace_setregs");
-
- memcpy (&inferior_fp_registers, &registers[REGISTER_BYTE (FP0_REGNUM)],
- sizeof inferior_fp_registers.fpu_fr);
-
- if (ptrace (PTRACE_SETFPREGS, inferior_pid,
- (PTRACE_ARG3_TYPE) & inferior_fp_registers, 0))
- perror ("ptrace_setfpregs");
-}
-
-/* NOTE! I tried using PTRACE_READDATA, etc., to read and write memory
- in the NEW_SUN_PTRACE case.
- It ought to be straightforward. But it appears that writing did
- not write the data that I specified. I cannot understand where
- it got the data that it actually did write. */
-
-/* Copy LEN bytes from inferior's memory starting at MEMADDR
- to debugger memory starting at MYADDR. */
-
-void
-read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
-{
- register int i;
- /* Round starting address down to longword boundary. */
- register CORE_ADDR addr = memaddr & -(CORE_ADDR) sizeof (int);
- /* Round ending address up; get number of longwords that makes. */
- register int count
- = (((memaddr + len) - addr) + sizeof (int) - 1) / sizeof (int);
- /* Allocate buffer of that many longwords. */
- register int *buffer = (int *) alloca (count * sizeof (int));
-
- /* Read all the longwords */
- for (i = 0; i < count; i++, addr += sizeof (int))
- {
- buffer[i] = ptrace (1, inferior_pid, addr, 0);
- }
-
- /* Copy appropriate bytes out of the buffer. */
- memcpy (myaddr, (char *) buffer + (memaddr & (sizeof (int) - 1)), len);
-}
-
-/* Copy LEN bytes of data from debugger memory at MYADDR
- to inferior's memory at MEMADDR.
- On failure (cannot write the inferior)
- returns the value of errno. */
-
-int
-write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
-{
- register int i;
- /* Round starting address down to longword boundary. */
- register CORE_ADDR addr = memaddr & -(CORE_ADDR) sizeof (int);
- /* Round ending address up; get number of longwords that makes. */
- register int count
- = (((memaddr + len) - addr) + sizeof (int) - 1) / sizeof (int);
- /* Allocate buffer of that many longwords. */
- register int *buffer = (int *) alloca (count * sizeof (int));
- extern int errno;
-
- /* Fill start and end extra bytes of buffer with existing memory data. */
-
- buffer[0] = ptrace (1, inferior_pid, addr, 0);
-
- if (count > 1)
- {
- buffer[count - 1]
- = ptrace (1, inferior_pid,
- addr + (count - 1) * sizeof (int), 0);
- }
-
- /* Copy data to be written over corresponding part of buffer */
-
- bcopy (myaddr, (char *) buffer + (memaddr & (sizeof (int) - 1)), len);
-
- /* Write the entire buffer. */
-
- for (i = 0; i < count; i++, addr += sizeof (int))
- {
- errno = 0;
- ptrace (4, inferior_pid, addr, buffer[i]);
- if (errno)
- return errno;
- }
-
- return 0;
-}
-
-void
-initialize_low (void)
-{
-}
diff --git a/gdb/gdbserver/low-sun3.c b/gdb/gdbserver/low-sun3.c
deleted file mode 100644
index ccaded826cc..00000000000
--- a/gdb/gdbserver/low-sun3.c
+++ /dev/null
@@ -1,291 +0,0 @@
-/* Low level interface to ptrace, for the remote server for GDB.
- Copyright 1986, 1987, 1993, 1994, 1995, 1999, 2000, 2001, 2002
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "server.h"
-#include "<sys/wait.h>"
-#include "frame.h"
-#include "inferior.h"
-
-#include <stdio.h>
-#include <sys/param.h>
-#include <sys/dir.h>
-#include <sys/user.h>
-#include <signal.h>
-#include <sys/ioctl.h>
-#include <sgtty.h>
-#include <fcntl.h>
-
-/***************Begin MY defs*********************/
-static char my_registers[REGISTER_BYTES];
-char *registers = my_registers;
-/***************End MY defs*********************/
-
-#include <sys/ptrace.h>
-#include <machine/reg.h>
-
-extern int sys_nerr;
-extern char **sys_errlist;
-extern int errno;
-
-/* Start an inferior process and returns its pid.
- ALLARGS is a vector of program-name and args. */
-
-int
-create_inferior (char *program, char **allargs)
-{
- int pid;
-
- pid = fork ();
- if (pid < 0)
- perror_with_name ("fork");
-
- if (pid == 0)
- {
- ptrace (PTRACE_TRACEME);
-
- execv (program, allargs);
-
- fprintf (stderr, "Cannot exec %s: %s.\n", program,
- errno < sys_nerr ? sys_errlist[errno] : "unknown error");
- fflush (stderr);
- _exit (0177);
- }
-
- return pid;
-}
-
-/* Attaching is not supported. */
-int
-myattach (int pid)
-{
- return -1;
-}
-
-/* Kill the inferior process. Make us have no inferior. */
-
-void
-kill_inferior (void)
-{
- if (inferior_pid == 0)
- return;
- ptrace (8, inferior_pid, 0, 0);
- wait (0);
-/*************inferior_died ();****VK**************/
-}
-
-/* Return nonzero if the given thread is still alive. */
-int
-mythread_alive (int pid)
-{
- return 1;
-}
-
-/* Wait for process, returns status */
-
-unsigned char
-mywait (char *status)
-{
- int pid;
- union wait w;
-
- pid = wait (&w);
- if (pid != inferior_pid)
- perror_with_name ("wait");
-
- if (WIFEXITED (w))
- {
- fprintf (stderr, "\nChild exited with retcode = %x \n", WEXITSTATUS (w));
- *status = 'W';
- return ((unsigned char) WEXITSTATUS (w));
- }
- else if (!WIFSTOPPED (w))
- {
- fprintf (stderr, "\nChild terminated with signal = %x \n", WTERMSIG (w));
- *status = 'X';
- return ((unsigned char) WTERMSIG (w));
- }
-
- fetch_inferior_registers (0);
-
- *status = 'T';
- return ((unsigned char) WSTOPSIG (w));
-}
-
-/* Resume execution of the inferior process.
- If STEP is nonzero, single-step it.
- If SIGNAL is nonzero, give it that signal. */
-
-void
-myresume (int step, int signal)
-{
- errno = 0;
- ptrace (step ? PTRACE_SINGLESTEP : PTRACE_CONT, inferior_pid, 1, signal);
- if (errno)
- perror_with_name ("ptrace");
-}
-
-/* Fetch one or more registers from the inferior. REGNO == -1 to get
- them all. We actually fetch more than requested, when convenient,
- marking them as valid so we won't fetch them again. */
-
-void
-fetch_inferior_registers (int ignored)
-{
- struct regs inferior_registers;
- struct fp_status inferior_fp_registers;
-
- ptrace (PTRACE_GETREGS, inferior_pid,
- (PTRACE_ARG3_TYPE) & inferior_registers);
-#ifdef FP0_REGNUM
- ptrace (PTRACE_GETFPREGS, inferior_pid,
- (PTRACE_ARG3_TYPE) & inferior_fp_registers);
-#endif
-
- memcpy (registers, &inferior_registers, 16 * 4);
-#ifdef FP0_REGNUM
- memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], &inferior_fp_registers,
- sizeof inferior_fp_registers.fps_regs);
-#endif
- *(int *) &registers[REGISTER_BYTE (PS_REGNUM)] = inferior_registers.r_ps;
- *(int *) &registers[REGISTER_BYTE (PC_REGNUM)] = inferior_registers.r_pc;
-#ifdef FP0_REGNUM
- memcpy
- (&registers[REGISTER_BYTE (FPC_REGNUM)],
- &inferior_fp_registers.fps_control,
- sizeof inferior_fp_registers - sizeof inferior_fp_registers.fps_regs);
-#endif
-}
-
-/* Store our register values back into the inferior.
- If REGNO is -1, do this for all registers.
- Otherwise, REGNO specifies which register (so we can save time). */
-
-void
-store_inferior_registers (int ignored)
-{
- struct regs inferior_registers;
- struct fp_status inferior_fp_registers;
-
- memcpy (&inferior_registers, registers, 16 * 4);
-#ifdef FP0_REGNUM
- memcpy (&inferior_fp_registers,
- &registers[REGISTER_BYTE (FP0_REGNUM)],
- sizeof inferior_fp_registers.fps_regs);
-#endif
- inferior_registers.r_ps = *(int *) &registers[REGISTER_BYTE (PS_REGNUM)];
- inferior_registers.r_pc = *(int *) &registers[REGISTER_BYTE (PC_REGNUM)];
-
-#ifdef FP0_REGNUM
- memcpy (&inferior_fp_registers.fps_control,
- &registers[REGISTER_BYTE (FPC_REGNUM)],
- (sizeof inferior_fp_registers
- - sizeof inferior_fp_registers.fps_regs));
-#endif
-
- ptrace (PTRACE_SETREGS, inferior_pid,
- (PTRACE_ARG3_TYPE) & inferior_registers);
-#if FP0_REGNUM
- ptrace (PTRACE_SETFPREGS, inferior_pid,
- (PTRACE_ARG3_TYPE) & inferior_fp_registers);
-#endif
-}
-
-/* NOTE! I tried using PTRACE_READDATA, etc., to read and write memory
- in the NEW_SUN_PTRACE case.
- It ought to be straightforward. But it appears that writing did
- not write the data that I specified. I cannot understand where
- it got the data that it actually did write. */
-
-/* Copy LEN bytes from inferior's memory starting at MEMADDR
- to debugger memory starting at MYADDR. */
-
-void
-read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
-{
- register int i;
- /* Round starting address down to longword boundary. */
- register CORE_ADDR addr = memaddr & -(CORE_ADDR) sizeof (int);
- /* Round ending address up; get number of longwords that makes. */
- register int count
- = (((memaddr + len) - addr) + sizeof (int) - 1) / sizeof (int);
- /* Allocate buffer of that many longwords. */
- register int *buffer = (int *) alloca (count * sizeof (int));
-
- /* Read all the longwords */
- for (i = 0; i < count; i++, addr += sizeof (int))
- {
- buffer[i] = ptrace (1, inferior_pid, addr, 0);
- }
-
- /* Copy appropriate bytes out of the buffer. */
- memcpy (myaddr, (char *) buffer + (memaddr & (sizeof (int) - 1)), len);
-}
-
-/* Copy LEN bytes of data from debugger memory at MYADDR
- to inferior's memory at MEMADDR.
- On failure (cannot write the inferior)
- returns the value of errno. */
-
-int
-write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
-{
- register int i;
- /* Round starting address down to longword boundary. */
- register CORE_ADDR addr = memaddr & -(CORE_ADDR) sizeof (int);
- /* Round ending address up; get number of longwords that makes. */
- register int count
- = (((memaddr + len) - addr) + sizeof (int) - 1) / sizeof (int);
- /* Allocate buffer of that many longwords. */
- register int *buffer = (int *) alloca (count * sizeof (int));
- extern int errno;
-
- /* Fill start and end extra bytes of buffer with existing memory data. */
-
- buffer[0] = ptrace (1, inferior_pid, addr, 0);
-
- if (count > 1)
- {
- buffer[count - 1]
- = ptrace (1, inferior_pid,
- addr + (count - 1) * sizeof (int), 0);
- }
-
- /* Copy data to be written over corresponding part of buffer */
-
- memcpy ((char *) buffer + (memaddr & (sizeof (int) - 1)), myaddr, len);
-
- /* Write the entire buffer. */
-
- for (i = 0; i < count; i++, addr += sizeof (int))
- {
- errno = 0;
- ptrace (4, inferior_pid, addr, buffer[i]);
- if (errno)
- return errno;
- }
-
- return 0;
-}
-
-void
-initialize_low (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/server.c b/gdb/gdbserver/server.c
index d0963ba9de9..81fde5b7f73 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -217,6 +217,28 @@ main (int argc, char *argv[])
case 'd':
remote_debug = !remote_debug;
break;
+ case 'D':
+ fprintf (stderr, "Detaching from inferior\n");
+ detach_inferior ();
+ write_ok (own_buf);
+ putpkt (own_buf);
+ remote_close ();
+
+ /* If we are attached, then we can exit. Otherwise, we need to
+ hang around doing nothing, until the child is gone. */
+ if (!attached)
+ {
+ int status, ret;
+
+ do {
+ ret = waitpid (signal_pid, &status, 0);
+ if (WIFEXITED (status) || WIFSIGNALED (status))
+ break;
+ } while (ret != -1 || errno != ECHILD);
+ }
+
+ exit (0);
+
case '!':
if (attached == 0)
{
diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h
index e554c0ac7e1..1c47a3aedb3 100644
--- a/gdb/gdbserver/target.h
+++ b/gdb/gdbserver/target.h
@@ -48,6 +48,10 @@ struct target_ops
void (*kill) (void);
+ /* Detach from all inferiors. */
+
+ void (*detach) (void);
+
/* Return 1 iff the thread with process ID PID is alive. */
int (*thread_alive) (int pid);
@@ -104,6 +108,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;
@@ -119,6 +126,9 @@ void set_target_ops (struct target_ops *);
#define kill_inferior() \
(*the_target->kill) ()
+#define detach_inferior() \
+ (*the_target->detach) ()
+
#define mythread_alive(pid) \
(*the_target->thread_alive) (pid)
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 78abf12a9e0..fcefcd4c41a 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -60,6 +60,7 @@ struct type *builtin_type_long_double;
struct type *builtin_type_complex;
struct type *builtin_type_double_complex;
struct type *builtin_type_string;
+struct type *builtin_type_int0;
struct type *builtin_type_int8;
struct type *builtin_type_uint8;
struct type *builtin_type_int16;
@@ -434,7 +435,7 @@ address_space_int_to_name (int space_flag)
/* Create a new type with instance flags NEW_FLAGS, based on TYPE.
If STORAGE is non-NULL, create the new type instance there. */
-struct type *
+static struct type *
make_qualified_type (struct type *type, int new_flags,
struct type *storage)
{
@@ -1668,7 +1669,7 @@ check_typedef (struct type *type)
/* Parse a type expression in the string [P..P+LENGTH). If an error occurs,
silently return builtin_type_void. */
-struct type *
+static struct type *
safe_parse_type (char *p, int length)
{
struct ui_file *saved_gdb_stderr;
@@ -3417,6 +3418,10 @@ build_gdbtypes (void)
init_type (TYPE_CODE_STRING, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
0,
"string", (struct objfile *) NULL);
+ builtin_type_int0 =
+ init_type (TYPE_CODE_INT, 0 / 8,
+ 0,
+ "int0_t", (struct objfile *) NULL);
builtin_type_int8 =
init_type (TYPE_CODE_INT, 8 / 8,
0,
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index 0d173e05df4..caeab83688f 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -957,7 +957,10 @@ extern struct type *builtin_type_CORE_ADDR;
(cf MIPS). */
extern struct type *builtin_type_bfd_vma;
-/* Explicit sizes - see C9X <intypes.h> for naming scheme */
+/* Explicit sizes - see C9X <intypes.h> for naming scheme. The "int0"
+ is for when an architecture needs to describe a register that has
+ no size. */
+extern struct type *builtin_type_int0;
extern struct type *builtin_type_int8;
extern struct type *builtin_type_uint8;
extern struct type *builtin_type_int16;
diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
index 8be456f7ea1..9b63616488c 100644
--- a/gdb/gnu-nat.c
+++ b/gdb/gnu-nat.c
@@ -62,6 +62,7 @@
#include "gdbcore.h"
#include "gdbthread.h"
#include "gdb_assert.h"
+#include "gdb_obstack.h"
#include "gnu-nat.h"
diff --git a/gdb/gnu-v2-abi.c b/gdb/gnu-v2-abi.c
index 47d6e125880..da04c7416c0 100644
--- a/gdb/gnu-v2-abi.c
+++ b/gdb/gnu-v2-abi.c
@@ -184,7 +184,7 @@ gnuv2_virtual_fn_field (struct value **arg1p, struct fn_field * f, int j,
}
-struct type *
+static struct type *
gnuv2_value_rtti_type (struct value *v, int *full, int *top, int *using_enc)
{
struct type *known_type;
@@ -401,6 +401,8 @@ init_gnuv2_ops (void)
gnu_v2_abi_ops.baseclass_offset = gnuv2_baseclass_offset;
}
+extern initialize_file_ftype _initialize_gnu_v2_abi; /* -Wmissing-prototypes */
+
void
_initialize_gnu_v2_abi (void)
{
diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c
index da2a2d60450..bbfd1185201 100644
--- a/gdb/gnu-v3-abi.c
+++ b/gdb/gnu-v3-abi.c
@@ -372,7 +372,7 @@ gnuv3_virtual_fn_field (struct value **value_p,
to (the address of)(ARG) + OFFSET.
-1 is returned on error. */
-int
+static int
gnuv3_baseclass_offset (struct type *type, int index, char *valaddr,
CORE_ADDR address)
{
@@ -447,6 +447,7 @@ init_gnuv3_ops (void)
gnu_v3_abi_ops.baseclass_offset = gnuv3_baseclass_offset;
}
+extern initialize_file_ftype _initialize_gnu_v3_abi; /* -Wmissing-prototypes */
void
_initialize_gnu_v3_abi (void)
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index 0559805da03..1253b4d6ca1 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -40,12 +40,8 @@
struct frame_extra_info
{
CORE_ADDR from_pc;
- CORE_ADDR args_pointer;
- CORE_ADDR locals_pointer;
};
-#define E_NUM_REGS (h8300smode ? 14 : 13)
-
enum
{
h8300_reg_size = 2,
@@ -57,7 +53,8 @@ enum
enum gdb_regnum
{
E_R0_REGNUM, E_ER0_REGNUM = E_R0_REGNUM, E_ARG0_REGNUM = E_R0_REGNUM,
- E_R1_REGNUM, E_ER1_REGNUM = E_R1_REGNUM,
+ E_RET0_REGNUM = E_R0_REGNUM,
+ E_R1_REGNUM, E_ER1_REGNUM = E_R1_REGNUM, E_RET1_REGNUM = E_R1_REGNUM,
E_R2_REGNUM, E_ER2_REGNUM = E_R2_REGNUM, E_ARGLAST_REGNUM = E_R2_REGNUM,
E_R3_REGNUM, E_ER3_REGNUM = E_R3_REGNUM,
E_R4_REGNUM, E_ER4_REGNUM = E_R4_REGNUM,
@@ -69,9 +66,16 @@ enum gdb_regnum
E_CYCLES_REGNUM,
E_TICK_REGNUM, E_EXR_REGNUM = E_TICK_REGNUM,
E_INST_REGNUM, E_TICKS_REGNUM = E_INST_REGNUM,
- E_INSTS_REGNUM
+ E_INSTS_REGNUM,
+ E_MACH_REGNUM,
+ E_MACL_REGNUM,
+ E_SBR_REGNUM,
+ E_VBR_REGNUM
};
+#define E_PSEUDO_CCR_REGNUM (NUM_REGS)
+#define E_PSEUDO_EXR_REGNUM (NUM_REGS+1)
+
#define UNSIGNED_SHORT(X) ((X) & 0xffff)
#define IS_PUSH(x) ((x & 0xfff0)==0x6df0)
@@ -90,13 +94,23 @@ enum gdb_regnum
An argument register spill is an instruction that moves an argument
from the register in which it was passed to the stack slot in which
it really lives. It is a byte, word, or longword move from an
- argument register to a negative offset from the frame pointer. */
+ argument register to a negative offset from the frame pointer.
+
+ CV, 2003-06-16: Or, in optimized code or when the `register' qualifier
+ is used, it could be a byte, word or long move to registers r3-r5. */
static int
h8300_is_argument_spill (CORE_ADDR pc)
{
int w = read_memory_unsigned_integer (pc, 2);
+ if (((w & 0xff88) == 0x0c88 /* mov.b Rsl, Rdl */
+ || (w & 0xff88) == 0x0d00 /* mov.w Rs, Rd */
+ || (w & 0xff88) == 0x0f80) /* mov.l Rs, Rd */
+ && (w & 0x70) <= 0x20 /* Rs is R0, R1 or R2 */
+ && (w & 0x7) >= 0x3 && (w & 0x7) <= 0x5)/* Rd is R3, R4 or R5 */
+ return 2;
+
if ((w & 0xfff0) == 0x6ee0 /* mov.b Rs,@(d:16,er6) */
&& 8 <= (w & 0xf) && (w & 0xf) <= 10) /* Rs is R0L, R1L, or R2L */
{
@@ -239,6 +253,17 @@ h8300_skip_prologue (CORE_ADDR start_pc)
if (IS_SUBL_SP (w))
start_pc += 6 + adjust;
+ /* Skip past another possible stm insn for registers R3 to R5 (possibly used
+ for register qualified arguments. */
+ w = read_memory_unsigned_integer (start_pc, 2);
+ /* First look for push insns. */
+ if (w == 0x0110 || w == 0x0120 || w == 0x0130)
+ {
+ w = read_memory_unsigned_integer (start_pc + 2, 2);
+ if (IS_PUSH (w) && (w & 0xf) >= 0x3 && (w & 0xf) <= 0x5)
+ start_pc += 4;
+ }
+
/* Check for spilling an argument register to the stack frame.
This could also be an initializing store from non-prologue code,
but I don't think there's any harm in skipping that. */
@@ -253,24 +278,15 @@ h8300_skip_prologue (CORE_ADDR start_pc)
return start_pc;
}
-static int
-gdb_print_insn_h8300 (bfd_vma memaddr, disassemble_info * info)
-{
- if (h8300smode)
- return print_insn_h8300s (memaddr, info);
- else if (h8300hmode)
- return print_insn_h8300h (memaddr, info);
- else
- return print_insn_h8300 (memaddr, info);
-}
-
/* Fetch the instruction at ADDR, returning 0 if ADDR is beyond LIM or
is not the address of a valid instruction, the address of the next
instruction beyond ADDR otherwise. *PWORD1 receives the first word
of the instruction. */
static CORE_ADDR
-h8300_next_prologue_insn (CORE_ADDR addr, CORE_ADDR lim, unsigned short* pword1)
+h8300_next_prologue_insn (CORE_ADDR addr,
+ CORE_ADDR lim,
+ unsigned short* pword1)
{
char buf[2];
if (addr < lim + 8)
@@ -338,7 +354,7 @@ h8300_examine_prologue (register CORE_ADDR ip, register CORE_ADDR limit,
next_ip = h8300_next_prologue_insn (ip, limit, &insn_word);
- if (insn_word == 0x0100)
+ if (insn_word == 0x0100) /* mov.l */
{
insn_word = read_memory_unsigned_integer (ip + 2, 2);
adjust = 2;
@@ -439,10 +455,6 @@ h8300_examine_prologue (register CORE_ADDR ip, register CORE_ADDR limit,
break;
}
- /* The args are always reffed based from the stack pointer */
- get_frame_extra_info (fi)->args_pointer = after_prolog_fp;
- /* Locals are always reffed based from the fp */
- get_frame_extra_info (fi)->locals_pointer = after_prolog_fp;
/* The PC is at a known place */
get_frame_extra_info (fi)->from_pc =
read_memory_unsigned_integer (after_prolog_fp + BINWORD, BINWORD);
@@ -452,7 +464,8 @@ h8300_examine_prologue (register CORE_ADDR ip, register CORE_ADDR limit,
if (have_fp)
/* We keep the old FP in the SP spot */
- fsr[E_SP_REGNUM] = read_memory_unsigned_integer (fsr[E_FP_REGNUM], BINWORD);
+ fsr[E_SP_REGNUM] = read_memory_unsigned_integer (fsr[E_FP_REGNUM],
+ BINWORD);
else
fsr[E_SP_REGNUM] = after_prolog_fp + auto_depth;
@@ -470,10 +483,12 @@ h8300_frame_init_saved_regs (struct frame_info *fi)
/* Find the beginning of this function, so we can analyze its
prologue. */
- if (find_pc_partial_function (get_frame_pc (fi), NULL, &func_addr, &func_end))
+ if (find_pc_partial_function (get_frame_pc (fi), NULL,
+ &func_addr, &func_end))
{
struct symtab_and_line sal = find_pc_line (func_addr, 0);
- CORE_ADDR limit = (sal.end && sal.end < get_frame_pc (fi)) ? sal.end : get_frame_pc (fi);
+ CORE_ADDR limit = (sal.end && sal.end < get_frame_pc (fi))
+ ? sal.end : get_frame_pc (fi);
/* This will fill in fields in fi. */
h8300_examine_prologue (func_addr, limit, get_frame_base (fi),
get_frame_saved_regs (fi), fi);
@@ -489,7 +504,8 @@ h8300_frame_init_saved_regs (struct frame_info *fi)
will be called for the new frame.
For us, the frame address is its stack pointer value, so we look up
- the function prologue to determine the caller's sp value, and return it. */
+ the function prologue to determine the caller's sp value, and
+ return it. */
static CORE_ADDR
h8300_frame_chain (struct frame_info *thisframe)
@@ -532,8 +548,6 @@ h8300_init_extra_frame_info (int fromleaf, struct frame_info *fi)
{
frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
get_frame_extra_info (fi)->from_pc = 0;
- get_frame_extra_info (fi)->args_pointer = 0; /* Unknown */
- get_frame_extra_info (fi)->locals_pointer = 0; /* Unknown */
if (!get_frame_pc (fi))
{
@@ -544,34 +558,13 @@ h8300_init_extra_frame_info (int fromleaf, struct frame_info *fi)
}
}
-static CORE_ADDR
-h8300_frame_locals_address (struct frame_info *fi)
-{
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
- get_frame_base (fi)))
- return (CORE_ADDR) 0; /* Not sure what else to do... */
- return get_frame_extra_info (fi)->locals_pointer;
-}
-
-/* Return the address of the argument block for the frame
- described by FI. Returns 0 if the address is unknown. */
-
-static CORE_ADDR
-h8300_frame_args_address (struct frame_info *fi)
-{
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
- get_frame_base (fi)))
- return (CORE_ADDR) 0; /* Not sure what else to do... */
- return get_frame_extra_info (fi)->args_pointer;
-}
-
/* Round N up or down to the nearest multiple of UNIT.
Evaluate N only once, UNIT several times.
UNIT must be a power of two. */
#define round_up(n, unit) (((n) + (unit) - 1) & -(unit))
#define round_down(n, unit) ((n) & -(unit))
-/* Function: push_arguments
+/* Function: push_dummy_call
Setup the function arguments for calling a function in the inferior.
In this discussion, a `word' is 16 bits on the H8/300s, and 32 bits
on the H8/300H.
@@ -636,12 +629,14 @@ h8300_frame_args_address (struct frame_info *fi)
to begin with. */
static CORE_ADDR
-h8300_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
- int struct_return, CORE_ADDR struct_addr)
+h8300_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 stack_align, stack_alloc, stack_offset;
+ int stack_alloc = 0, stack_offset = 0;
int wordsize = BINWORD;
- int reg;
+ int reg = E_ARG0_REGNUM;
int argument;
/* First, make sure the stack is properly aligned. */
@@ -649,22 +644,18 @@ h8300_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
/* Now make sure there's space on the stack for the arguments. We
may over-allocate a little here, but that won't hurt anything. */
- stack_alloc = 0;
for (argument = 0; argument < nargs; argument++)
stack_alloc += round_up (TYPE_LENGTH (VALUE_TYPE (args[argument])),
wordsize);
sp -= stack_alloc;
/* Now load as many arguments as possible into registers, and push
- the rest onto the stack. */
- reg = E_ARG0_REGNUM;
- stack_offset = 0;
-
- /* If we're returning a structure by value, then we must pass a
+ the rest onto the stack.
+ If we're returning a structure by value, then we must pass a
pointer to the buffer for the return value as an invisible first
argument. */
if (struct_return)
- write_register (reg++, struct_addr);
+ regcache_cooked_write_unsigned (regcache, reg++, struct_addr);
for (argument = 0; argument < nargs; argument++)
{
@@ -706,8 +697,9 @@ 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);
- write_register (reg++, word);
+ ULONGEST word = extract_unsigned_integer (padded + offset,
+ wordsize);
+ regcache_cooked_write_unsigned (regcache, reg++, word);
}
}
}
@@ -723,24 +715,13 @@ h8300_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
}
}
- return sp;
-}
+ /* Store return address. */
+ sp -= wordsize;
+ write_memory_unsigned_integer (sp, wordsize, bp_addr);
-/* Function: push_return_address
- Setup the return address for a dummy frame, as called by
- call_function_by_hand. Only necessary when you are using an
- empty CALL_DUMMY, ie. the target will not actually be executing
- a JSR/BSR instruction. */
+ /* Update stack pointer. */
+ regcache_cooked_write_unsigned (regcache, E_SP_REGNUM, sp);
-static CORE_ADDR
-h8300_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
-{
- unsigned char buf[4];
- int wordsize = BINWORD;
-
- sp -= wordsize;
- store_unsigned_integer (buf, wordsize, CALL_DUMMY_ADDRESS ());
- write_memory (sp, buf, wordsize);
return sp;
}
@@ -769,8 +750,8 @@ h8300_pop_frame (void)
actual value we want, not the address of the value we want. */
if (get_frame_saved_regs (frame)[regno] && regno != E_SP_REGNUM)
write_register (regno,
- read_memory_integer (get_frame_saved_regs (frame)[regno],
- BINWORD));
+ read_memory_integer
+ (get_frame_saved_regs (frame)[regno], BINWORD));
else if (get_frame_saved_regs (frame)[regno] && regno == E_SP_REGNUM)
write_register (regno, get_frame_base (frame) + 2 * BINWORD);
}
@@ -786,68 +767,105 @@ h8300_pop_frame (void)
Copy that into VALBUF. Be sure to account for CPU type. */
static void
-h8300_extract_return_value (struct type *type, char *regbuf, char *valbuf)
+h8300_extract_return_value (struct type *type, struct regcache *regcache,
+ void *valbuf)
{
- int wordsize = BINWORD;
int len = TYPE_LENGTH (type);
+ ULONGEST c;
switch (len)
{
- case 1: /* (char) */
- case 2: /* (short), (int) */
- memcpy (valbuf, regbuf + REGISTER_BYTE (0) + (wordsize - len), len);
- break;
- case 4: /* (long), (float) */
- if (wordsize == 4)
- {
- memcpy (valbuf, regbuf + REGISTER_BYTE (0), 4);
- }
- else
- {
- memcpy (valbuf, regbuf + REGISTER_BYTE (0), 2);
- memcpy (valbuf + 2, regbuf + REGISTER_BYTE (1), 2);
- }
- break;
- case 8: /* (double) (doesn't seem to happen, which is good,
- because this almost certainly isn't right. */
- error ("I don't know how a double is returned.");
- break;
+ case 1:
+ case 2:
+ regcache_cooked_read_unsigned (regcache, E_RET0_REGNUM, &c);
+ store_unsigned_integer (valbuf, len, c);
+ break;
+ case 4: /* Needs two registers on plain H8/300 */
+ regcache_cooked_read_unsigned (regcache, E_RET0_REGNUM, &c);
+ store_unsigned_integer (valbuf, 2, c);
+ regcache_cooked_read_unsigned (regcache, E_RET1_REGNUM, &c);
+ store_unsigned_integer ((void*)((char *)valbuf + 2), 2, c);
+ break;
+ case 8: /* long long, double and long double are all defined
+ as 4 byte types so far so this shouldn't happen. */
+ error ("I don't know how a 8 byte value is returned.");
+ break;
}
}
+static void
+h8300h_extract_return_value (struct type *type, struct regcache *regcache,
+ void *valbuf)
+{
+ int len = TYPE_LENGTH (type);
+ ULONGEST c;
+
+ switch (len)
+ {
+ case 1:
+ case 2:
+ case 4:
+ regcache_cooked_read_unsigned (regcache, E_RET0_REGNUM, &c);
+ store_unsigned_integer (valbuf, len, c);
+ break;
+ case 8: /* long long, double and long double are all defined
+ as 4 byte types so far so this shouldn't happen. */
+ error ("I don't know how a 8 byte value is returned.");
+ break;
+ }
+}
+
+
/* Function: store_return_value
Place the appropriate value in the appropriate registers.
Primarily used by the RETURN command. */
static void
-h8300_store_return_value (struct type *type, char *valbuf)
+h8300_store_return_value (struct type *type, struct regcache *regcache,
+ const void *valbuf)
{
- int regval;
- int wordsize = BINWORD;
int len = TYPE_LENGTH (type);
+ ULONGEST val;
switch (len)
{
- case 1: /* char */
- case 2: /* short, int */
- regval = extract_address (valbuf, len);
- write_register (0, regval);
- break;
- case 4: /* long, float */
- regval = extract_address (valbuf, len);
- if (wordsize == 4)
- {
- write_register (0, regval);
- }
- else
- {
- write_register (0, regval >> 16);
- write_register (1, regval & 0xffff);
- }
- break;
- case 8: /* presumeably double, but doesn't seem to happen */
- error ("I don't know how to return a double.");
- break;
+ case 1:
+ case 2:
+ val = extract_unsigned_integer (valbuf, len);
+ regcache_cooked_write_unsigned (regcache, E_RET0_REGNUM, val);
+ break;
+ case 4: /* long, float */
+ val = extract_unsigned_integer (valbuf, len);
+ regcache_cooked_write_unsigned (regcache, E_RET0_REGNUM,
+ (val >> 16) &0xffff);
+ regcache_cooked_write_unsigned (regcache, E_RET1_REGNUM, val & 0xffff);
+ break;
+ case 8: /* long long, double and long double are all defined
+ as 4 byte types so far so this shouldn't happen. */
+ error ("I don't know how to return a 8 byte value.");
+ break;
+ }
+}
+
+static void
+h8300h_store_return_value (struct type *type, struct regcache *regcache,
+ const void *valbuf)
+{
+ int len = TYPE_LENGTH (type);
+ ULONGEST val;
+
+ switch (len)
+ {
+ case 1:
+ case 2:
+ case 4: /* long, float */
+ val = extract_unsigned_integer (valbuf, len);
+ regcache_cooked_write_unsigned (regcache, E_RET0_REGNUM, val);
+ break;
+ case 8: /* long long, double and long double are all defined
+ as 4 byte types so far so this shouldn't happen. */
+ error ("I don't know how to return a 8 byte value.");
+ break;
}
}
@@ -856,21 +874,51 @@ static struct cmd_list_element *setmachinelist;
static const char *
h8300_register_name (int regno)
{
- /* The register names change depending on whether the h8300h processor
+ /* The register names change depending on which h8300 processor
type is selected. */
- static char *h8300_register_names[] = {
+ static char *register_names[] = {
"r0", "r1", "r2", "r3", "r4", "r5", "r6",
- "sp", "ccr","pc","cycles", "tick", "inst", ""
+ "sp", "","pc","cycles", "tick", "inst",
+ "ccr", /* pseudo register */
};
- static char *h8300s_register_names[] = {
+ if (regno < 0
+ || regno >= (sizeof (register_names) / sizeof (*register_names)))
+ internal_error (__FILE__, __LINE__,
+ "h8300_register_name: illegal register number %d", regno);
+ else
+ return register_names[regno];
+}
+
+static const char *
+h8300s_register_name (int regno)
+{
+ static char *register_names[] = {
"er0", "er1", "er2", "er3", "er4", "er5", "er6",
- "sp", "ccr", "pc", "cycles", "exr", "tick", "inst"
+ "sp", "", "pc", "cycles", "", "tick", "inst",
+ "mach", "macl",
+ "ccr", "exr" /* pseudo registers */
};
- char **register_names =
- h8300smode ? h8300s_register_names : h8300_register_names;
- if (regno < 0 || regno >= E_NUM_REGS)
+ if (regno < 0
+ || regno >= (sizeof (register_names) / sizeof (*register_names)))
internal_error (__FILE__, __LINE__,
- "h8300_register_name: illegal register number %d", regno);
+ "h8300s_register_name: illegal register number %d", regno);
+ else
+ return register_names[regno];
+}
+
+static const char *
+h8300sx_register_name (int regno)
+{
+ static char *register_names[] = {
+ "er0", "er1", "er2", "er3", "er4", "er5", "er6",
+ "sp", "", "pc", "cycles", "", "tick", "inst",
+ "mach", "macl", "sbr", "vbr",
+ "ccr", "exr" /* pseudo registers */
+ };
+ if (regno < 0
+ || regno >= (sizeof (register_names) / sizeof (*register_names)))
+ internal_error (__FILE__, __LINE__,
+ "h8300sx_register_name: illegal register number %d", regno);
else
return register_names[regno];
}
@@ -879,44 +927,30 @@ static void
h8300_print_register (struct gdbarch *gdbarch, struct ui_file *file,
struct frame_info *frame, int regno)
{
- ULONGEST rval;
- long val;
- const char *name = h8300_register_name (regno);
+ LONGEST rval;
+ const char *name = gdbarch_register_name (gdbarch, regno);
if (!name || !*name)
return;
- /* FIXME: cagney/2002-10-22: The code below assumes that VAL is at
- least 4 bytes (32 bits) in size and hence is large enough to hold
- the largest h8300 register. Should instead be using ULONGEST and
- the phex() functions. */
- gdb_assert (sizeof (val) >= 4);
- frame_read_unsigned_register (frame, regno, &rval);
- val = rval;
+ frame_read_signed_register (frame, regno, &rval);
fprintf_filtered (file, "%-14s ", name);
- if (h8300hmode)
+ if (regno == E_PSEUDO_CCR_REGNUM || (regno == E_PSEUDO_EXR_REGNUM && h8300smode))
{
- if (val)
- fprintf_filtered (file, "0x%08lx %-8ld", val, val);
- else
- fprintf_filtered (file, "0x%-8lx %-8ld", val, val);
+ fprintf_filtered (file, "0x%02x ", (unsigned char)rval);
+ print_longest (file, 'u', 1, rval);
}
else
{
- if (val)
- fprintf_filtered (file, "0x%04lx %-4ld", val, val);
- else
- fprintf_filtered (file, "0x%-4lx %-4ld", val, val);
+ fprintf_filtered (file, "0x%s ", phex ((ULONGEST)rval, BINWORD));
+ print_longest (file, 'd', 1, rval);
}
- if (regno == E_CCR_REGNUM)
+ if (regno == E_PSEUDO_CCR_REGNUM)
{
/* CCR register */
int C, Z, N, V;
- unsigned char b[h8300h_reg_size];
- unsigned char l;
- frame_register_read (deprecated_selected_frame, regno, b);
- l = b[REGISTER_VIRTUAL_SIZE (E_CCR_REGNUM) - 1];
+ unsigned char l = rval & 0xff;
fprintf_filtered (file, "\t");
fprintf_filtered (file, "I-%d ", (l & 0x80) != 0);
fprintf_filtered (file, "UI-%d ", (l & 0x40) != 0);
@@ -951,13 +985,10 @@ h8300_print_register (struct gdbarch *gdbarch, struct ui_file *file,
if ((Z | (N ^ V)) == 1)
fprintf_filtered (file, "<= ");
}
- else if (regno == E_EXR_REGNUM && h8300smode)
+ else if (regno == E_PSEUDO_EXR_REGNUM && h8300smode)
{
/* EXR register */
- unsigned char b[h8300h_reg_size];
- unsigned char l;
- frame_register_read (deprecated_selected_frame, regno, b);
- l = b[REGISTER_VIRTUAL_SIZE (E_EXR_REGNUM) - 1];
+ unsigned char l = rval & 0xff;
fprintf_filtered (file, "\t");
fprintf_filtered (file, "T-%d - - - ", (l & 0x80) != 0);
fprintf_filtered (file, "I2-%d ", (l & 4) != 0);
@@ -972,10 +1003,41 @@ h8300_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file,
struct frame_info *frame, int regno, int cpregs)
{
if (regno < 0)
- for (regno = 0; regno < E_NUM_REGS; ++regno)
- h8300_print_register (gdbarch, file, frame, regno);
+ {
+ for (regno = E_R0_REGNUM; regno <= E_SP_REGNUM; ++regno)
+ h8300_print_register (gdbarch, file, frame, regno);
+ h8300_print_register (gdbarch, file, frame, E_PSEUDO_CCR_REGNUM);
+ h8300_print_register (gdbarch, file, frame, E_PC_REGNUM);
+ if (h8300smode)
+ {
+ h8300_print_register (gdbarch, file, frame, E_PSEUDO_EXR_REGNUM);
+ if (h8300sxmode)
+ {
+ h8300_print_register (gdbarch, file, frame, E_SBR_REGNUM);
+ h8300_print_register (gdbarch, file, frame, E_VBR_REGNUM);
+ }
+ h8300_print_register (gdbarch, file, frame, E_MACH_REGNUM);
+ h8300_print_register (gdbarch, file, frame, E_MACL_REGNUM);
+ h8300_print_register (gdbarch, file, frame, E_CYCLES_REGNUM);
+ h8300_print_register (gdbarch, file, frame, E_TICKS_REGNUM);
+ h8300_print_register (gdbarch, file, frame, E_INSTS_REGNUM);
+ }
+ else
+ {
+ h8300_print_register (gdbarch, file, frame, E_CYCLES_REGNUM);
+ h8300_print_register (gdbarch, file, frame, E_TICK_REGNUM);
+ h8300_print_register (gdbarch, file, frame, E_INST_REGNUM);
+ }
+ }
else
- h8300_print_register (gdbarch, file, frame, regno);
+ {
+ if (regno == E_CCR_REGNUM)
+ h8300_print_register (gdbarch, file, frame, E_PSEUDO_CCR_REGNUM);
+ else if (regno == E_PSEUDO_EXR_REGNUM && h8300smode)
+ h8300_print_register (gdbarch, file, frame, E_PSEUDO_EXR_REGNUM);
+ else
+ h8300_print_register (gdbarch, file, frame, regno);
+ }
}
static CORE_ADDR
@@ -984,56 +1046,83 @@ h8300_saved_pc_after_call (struct frame_info *ignore)
return read_memory_unsigned_integer (read_register (E_SP_REGNUM), BINWORD);
}
-static int
-h8300_register_byte (int regno)
+static struct type *
+h8300_register_type (struct gdbarch *gdbarch, int regno)
{
- if (regno < 0 || regno >= E_NUM_REGS)
+ if (regno < 0 || regno >= NUM_REGS + NUM_PSEUDO_REGS)
internal_error (__FILE__, __LINE__,
- "h8300_register_byte: illegal register number %d", regno);
+ "h8300_register_type: illegal register number %d",
+ regno);
else
- return regno * BINWORD;
+ {
+ switch (regno)
+ {
+ case E_PC_REGNUM:
+ return builtin_type_void_func_ptr;
+ case E_SP_REGNUM:
+ case E_FP_REGNUM:
+ return builtin_type_void_data_ptr;
+ default:
+ if (regno == E_PSEUDO_CCR_REGNUM)
+ return builtin_type_uint8;
+ else if (regno == E_PSEUDO_EXR_REGNUM)
+ return builtin_type_uint8;
+ else if (h8300hmode)
+ return builtin_type_int32;
+ else
+ return builtin_type_int16;
+ }
+ }
}
-static int
-h8300_register_raw_size (int regno)
+static void
+h8300_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
+ int regno, void *buf)
{
- if (regno < 0 || regno >= E_NUM_REGS)
- internal_error (__FILE__, __LINE__,
- "h8300_register_raw_size: illegal register number %d",
- regno);
+ if (regno == E_PSEUDO_CCR_REGNUM)
+ regcache_raw_read (regcache, E_CCR_REGNUM, buf);
+ else if (regno == E_PSEUDO_EXR_REGNUM)
+ regcache_raw_read (regcache, E_EXR_REGNUM, buf);
else
- return BINWORD;
+ regcache_raw_read (regcache, regno, buf);
}
-static struct type *
-h8300_register_virtual_type (int regno)
+static void
+h8300_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
+ int regno, const void *buf)
{
- if (regno < 0 || regno >= E_NUM_REGS)
- internal_error (__FILE__, __LINE__,
- "h8300_register_virtual_type: illegal register number %d",
- regno);
+ if (regno == E_PSEUDO_CCR_REGNUM)
+ regcache_raw_write (regcache, E_CCR_REGNUM, buf);
+ else if (regno == E_PSEUDO_EXR_REGNUM)
+ regcache_raw_write (regcache, E_EXR_REGNUM, buf);
else
- return h8300hmode ?
- builtin_type_unsigned_long : builtin_type_unsigned_short;
+ regcache_raw_write (regcache, regno, buf);
}
-static void
-h8300_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
-{
- write_register (0, addr);
+static int
+h8300_dbg_reg_to_regnum (int regno)
+{
+ if (regno == E_CCR_REGNUM)
+ return E_PSEUDO_CCR_REGNUM;
+ return regno;
}
static int
-h8300_use_struct_convention (int gcc_p, struct type *type)
+h8300s_dbg_reg_to_regnum (int regno)
{
- return 1;
+ if (regno == E_CCR_REGNUM)
+ return E_PSEUDO_CCR_REGNUM;
+ if (regno == E_EXR_REGNUM)
+ return E_PSEUDO_EXR_REGNUM;
+ return regno;
}
static CORE_ADDR
-h8300_extract_struct_value_address (char *regbuf)
+h8300_extract_struct_value_address (struct regcache *regcache)
{
- return extract_address (regbuf + h8300_register_byte (E_ARG0_REGNUM),
- h8300_register_raw_size (E_ARG0_REGNUM));
+ ULONGEST addr;
+ regcache_cooked_read_unsigned (regcache, E_RET0_REGNUM, &addr);
+ return addr;
}
const static unsigned char *
@@ -1046,6 +1135,22 @@ h8300_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
return breakpoint;
}
+static CORE_ADDR
+h8300_push_dummy_code (struct gdbarch *gdbarch,
+ CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc,
+ struct value **args, int nargs,
+ struct type *value_type,
+ CORE_ADDR *real_pc, CORE_ADDR *bp_addr)
+{
+ /* Allocate space sufficient for a breakpoint. */
+ sp = (sp - 2) & ~1;
+ /* Store the address of that breakpoint */
+ *bp_addr = sp;
+ /* h8300 always starts the call at the callee's entry point. */
+ *real_pc = funaddr;
+ return sp;
+}
+
static void
h8300_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
struct frame_info *frame, const char *args)
@@ -1057,7 +1162,6 @@ No floating-point info available for this processor.\n");
static struct gdbarch *
h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
- static LONGEST call_dummy_words[1] = { 0 };
struct gdbarch_tdep *tdep = NULL;
struct gdbarch *gdbarch;
@@ -1072,23 +1176,85 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
if (info.bfd_arch_info->arch != bfd_arch_h8300)
return NULL;
+ gdbarch = gdbarch_alloc (&info, 0);
+
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;
+ set_gdbarch_num_regs (gdbarch, 13);
+ set_gdbarch_num_pseudo_regs (gdbarch, 1);
+ set_gdbarch_ecoff_reg_to_regnum (gdbarch, h8300_dbg_reg_to_regnum);
+ set_gdbarch_dwarf_reg_to_regnum (gdbarch, h8300_dbg_reg_to_regnum);
+ set_gdbarch_dwarf2_reg_to_regnum (gdbarch, h8300_dbg_reg_to_regnum);
+ set_gdbarch_stab_reg_to_regnum (gdbarch, h8300_dbg_reg_to_regnum);
+ set_gdbarch_register_name (gdbarch, h8300_register_name);
+ set_gdbarch_ptr_bit (gdbarch, 2 * TARGET_CHAR_BIT);
+ set_gdbarch_addr_bit (gdbarch, 2 * TARGET_CHAR_BIT);
+ set_gdbarch_extract_return_value (gdbarch, h8300_extract_return_value);
+ set_gdbarch_store_return_value (gdbarch, h8300_store_return_value);
+ set_gdbarch_print_insn (gdbarch, print_insn_h8300);
+ break;
+ case bfd_mach_h8300h:
+ case bfd_mach_h8300hn:
+ h8300sxmode = 0;
+ h8300smode = 0;
+ h8300hmode = 1;
+ set_gdbarch_num_regs (gdbarch, 13);
+ set_gdbarch_num_pseudo_regs (gdbarch, 1);
+ set_gdbarch_ecoff_reg_to_regnum (gdbarch, h8300_dbg_reg_to_regnum);
+ set_gdbarch_dwarf_reg_to_regnum (gdbarch, h8300_dbg_reg_to_regnum);
+ set_gdbarch_dwarf2_reg_to_regnum (gdbarch, h8300_dbg_reg_to_regnum);
+ set_gdbarch_stab_reg_to_regnum (gdbarch, h8300_dbg_reg_to_regnum);
+ set_gdbarch_register_name (gdbarch, h8300_register_name);
+ set_gdbarch_ptr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
+ set_gdbarch_addr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
+ set_gdbarch_extract_return_value (gdbarch, h8300h_extract_return_value);
+ set_gdbarch_store_return_value (gdbarch, h8300h_store_return_value);
+ set_gdbarch_print_insn (gdbarch, print_insn_h8300h);
+ break;
+ case bfd_mach_h8300s:
+ case bfd_mach_h8300sn:
+ h8300sxmode = 0;
+ h8300smode = 1;
+ h8300hmode = 1;
+ set_gdbarch_num_regs (gdbarch, 16);
+ set_gdbarch_num_pseudo_regs (gdbarch, 2);
+ set_gdbarch_ecoff_reg_to_regnum (gdbarch, h8300s_dbg_reg_to_regnum);
+ set_gdbarch_dwarf_reg_to_regnum (gdbarch, h8300s_dbg_reg_to_regnum);
+ set_gdbarch_dwarf2_reg_to_regnum (gdbarch, h8300s_dbg_reg_to_regnum);
+ set_gdbarch_stab_reg_to_regnum (gdbarch, h8300s_dbg_reg_to_regnum);
+ set_gdbarch_register_name (gdbarch, h8300s_register_name);
+ set_gdbarch_ptr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
+ set_gdbarch_addr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
+ set_gdbarch_extract_return_value (gdbarch, h8300h_extract_return_value);
+ set_gdbarch_store_return_value (gdbarch, h8300h_store_return_value);
+ set_gdbarch_print_insn (gdbarch, print_insn_h8300s);
+ break;
+ case bfd_mach_h8300sx:
+ case bfd_mach_h8300sxn:
+ h8300sxmode = 1;
+ h8300smode = 1;
+ h8300hmode = 1;
+ set_gdbarch_num_regs (gdbarch, 18);
+ set_gdbarch_num_pseudo_regs (gdbarch, 2);
+ set_gdbarch_ecoff_reg_to_regnum (gdbarch, h8300s_dbg_reg_to_regnum);
+ set_gdbarch_dwarf_reg_to_regnum (gdbarch, h8300s_dbg_reg_to_regnum);
+ set_gdbarch_dwarf2_reg_to_regnum (gdbarch, h8300s_dbg_reg_to_regnum);
+ set_gdbarch_stab_reg_to_regnum (gdbarch, h8300s_dbg_reg_to_regnum);
+ set_gdbarch_register_name (gdbarch, h8300sx_register_name);
+ set_gdbarch_ptr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
+ set_gdbarch_addr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
+ set_gdbarch_extract_return_value (gdbarch, h8300h_extract_return_value);
+ set_gdbarch_store_return_value (gdbarch, h8300h_store_return_value);
+ set_gdbarch_print_insn (gdbarch, print_insn_h8300s);
+ break;
}
- gdbarch = gdbarch_alloc (&info, 0);
+ set_gdbarch_pseudo_register_read (gdbarch, h8300_pseudo_register_read);
+ set_gdbarch_pseudo_register_write (gdbarch, h8300_pseudo_register_write);
/* 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()). */
@@ -1098,34 +1264,27 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
* Basic register fields and methods.
*/
- set_gdbarch_num_regs (gdbarch, E_NUM_REGS);
- set_gdbarch_num_pseudo_regs (gdbarch, 0);
set_gdbarch_sp_regnum (gdbarch, E_SP_REGNUM);
set_gdbarch_deprecated_fp_regnum (gdbarch, E_FP_REGNUM);
set_gdbarch_pc_regnum (gdbarch, E_PC_REGNUM);
- set_gdbarch_register_name (gdbarch, h8300_register_name);
- set_gdbarch_deprecated_register_size (gdbarch, BINWORD);
- set_gdbarch_deprecated_register_bytes (gdbarch, E_NUM_REGS * BINWORD);
- set_gdbarch_register_byte (gdbarch, h8300_register_byte);
- set_gdbarch_register_raw_size (gdbarch, h8300_register_raw_size);
- set_gdbarch_deprecated_max_register_raw_size (gdbarch, h8300h_reg_size);
- set_gdbarch_register_virtual_size (gdbarch, h8300_register_raw_size);
- set_gdbarch_deprecated_max_register_virtual_size (gdbarch, h8300h_reg_size);
- set_gdbarch_register_virtual_type (gdbarch, h8300_register_virtual_type);
+ set_gdbarch_register_type (gdbarch, h8300_register_type);
set_gdbarch_print_registers_info (gdbarch, h8300_print_registers_info);
set_gdbarch_print_float_info (gdbarch, h8300_print_float_info);
/*
* Frame Info
*/
- set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, h8300_frame_init_saved_regs);
- set_gdbarch_deprecated_init_extra_frame_info (gdbarch, h8300_init_extra_frame_info);
+ set_gdbarch_skip_prologue (gdbarch, h8300_skip_prologue);
+
+ set_gdbarch_deprecated_frame_init_saved_regs (gdbarch,
+ h8300_frame_init_saved_regs);
+ set_gdbarch_deprecated_init_extra_frame_info (gdbarch,
+ h8300_init_extra_frame_info);
set_gdbarch_deprecated_frame_chain (gdbarch, h8300_frame_chain);
- set_gdbarch_deprecated_saved_pc_after_call (gdbarch, h8300_saved_pc_after_call);
+ set_gdbarch_deprecated_saved_pc_after_call (gdbarch,
+ h8300_saved_pc_after_call);
set_gdbarch_deprecated_frame_saved_pc (gdbarch, h8300_frame_saved_pc);
- set_gdbarch_skip_prologue (gdbarch, h8300_skip_prologue);
- set_gdbarch_frame_args_address (gdbarch, h8300_frame_args_address);
- set_gdbarch_frame_locals_address (gdbarch, h8300_frame_locals_address);
+ set_gdbarch_deprecated_pop_frame (gdbarch, h8300_pop_frame);
/*
* Miscelany
@@ -1139,44 +1298,32 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_function_start_offset (gdbarch, 0);
/* This value is almost never non-zero... */
set_gdbarch_frame_args_skip (gdbarch, 0);
- /* OK to default this value to 'unknown'. */
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
set_gdbarch_frameless_function_invocation (gdbarch,
frameless_look_for_prologue);
- /*
- * Call Dummies
- *
- * These values and methods are used when gdb calls a target function. */
- set_gdbarch_deprecated_push_return_address (gdbarch, h8300_push_return_address);
- set_gdbarch_deprecated_extract_return_value (gdbarch, h8300_extract_return_value);
- set_gdbarch_deprecated_push_arguments (gdbarch, h8300_push_arguments);
- set_gdbarch_deprecated_pop_frame (gdbarch, h8300_pop_frame);
- set_gdbarch_deprecated_store_struct_return (gdbarch, h8300_store_struct_return);
- set_gdbarch_deprecated_store_return_value (gdbarch, h8300_store_return_value);
- set_gdbarch_deprecated_extract_struct_value_address (gdbarch, h8300_extract_struct_value_address);
- set_gdbarch_use_struct_convention (gdbarch, h8300_use_struct_convention);
- set_gdbarch_deprecated_call_dummy_words (gdbarch, call_dummy_words);
- set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, 0);
+ set_gdbarch_extract_struct_value_address (gdbarch,
+ h8300_extract_struct_value_address);
+ set_gdbarch_use_struct_convention (gdbarch, always_use_struct_convention);
set_gdbarch_breakpoint_from_pc (gdbarch, h8300_breakpoint_from_pc);
+ set_gdbarch_push_dummy_code (gdbarch, h8300_push_dummy_code);
+ set_gdbarch_push_dummy_call (gdbarch, h8300_push_dummy_call);
set_gdbarch_int_bit (gdbarch, 2 * TARGET_CHAR_BIT);
set_gdbarch_long_bit (gdbarch, 4 * TARGET_CHAR_BIT);
- set_gdbarch_ptr_bit (gdbarch, BINWORD * TARGET_CHAR_BIT);
- set_gdbarch_addr_bit (gdbarch, BINWORD * TARGET_CHAR_BIT);
+ set_gdbarch_long_long_bit (gdbarch, 4 * TARGET_CHAR_BIT);
+ set_gdbarch_double_bit (gdbarch, 4 * TARGET_CHAR_BIT);
+ set_gdbarch_long_double_bit (gdbarch, 4 * TARGET_CHAR_BIT);
/* set_gdbarch_stack_align (gdbarch, SOME_stack_align); */
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
- /* Should be using push_dummy_call. */
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
-
return gdbarch;
}
+extern initialize_file_ftype _initialize_h8300_tdep; /* -Wmissing-prototypes */
+
void
_initialize_h8300_tdep (void)
{
- deprecated_tm_print_insn = gdb_print_insn_h8300;
register_gdbarch_init (bfd_arch_h8300, h8300_gdbarch_init);
}
diff --git a/gdb/hpacc-abi.c b/gdb/hpacc-abi.c
index 799d4c7e9bf..0fb3adccb12 100644
--- a/gdb/hpacc-abi.c
+++ b/gdb/hpacc-abi.c
@@ -309,6 +309,7 @@ init_hpacc_ops (void)
hpacc_abi_ops.baseclass_offset = gnuv2_baseclass_offset;
}
+extern initialize_file_ftype _initialize_hpacc_abi; /* -Wmissing-prototypes */
void
_initialize_hpacc_abi (void)
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 0b84442f030..2a8ddc7dc31 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -129,9 +129,6 @@ static int restore_pc_queue (CORE_ADDR *);
static int hppa_alignof (struct type *);
-/* To support multi-threading and stepping. */
-int hppa_prepare_to_proceed ();
-
static int prologue_inst_adjust_sp (unsigned long);
static int is_branch (unsigned long);
@@ -4670,92 +4667,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)
{
@@ -4958,26 +4869,6 @@ hppa_cannot_store_register (int regnum)
}
CORE_ADDR
-hppa_frame_args_address (struct frame_info *fi)
-{
- return get_frame_base (fi);
-}
-
-CORE_ADDR
-hppa_frame_locals_address (struct frame_info *fi)
-{
- return get_frame_base (fi);
-}
-
-int
-hppa_frame_num_args (struct frame_info *frame)
-{
- /* We can't tell how many args there are now that the C compiler delays
- popping them. */
- return -1;
-}
-
-CORE_ADDR
hppa_smash_text_address (CORE_ADDR addr)
{
/* The low two bits of the PC on the PA contain the privilege level.
@@ -4990,6 +4881,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)
{
@@ -5032,13 +4933,13 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_fp0_regnum (gdbarch, 64);
set_gdbarch_pc_regnum (gdbarch, PCOQ_HEAD_REGNUM);
set_gdbarch_npc_regnum (gdbarch, PCOQ_TAIL_REGNUM);
- set_gdbarch_register_raw_size (gdbarch, hppa_register_raw_size);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, hppa_register_raw_size);
set_gdbarch_deprecated_register_bytes (gdbarch, hppa_num_regs * 4);
- set_gdbarch_register_byte (gdbarch, hppa_register_byte);
- set_gdbarch_register_virtual_size (gdbarch, hppa_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, hppa_register_byte);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, hppa_register_raw_size);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, 4);
set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 8);
- set_gdbarch_register_virtual_type (gdbarch, hppa_register_virtual_type);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, hppa_register_virtual_type);
set_gdbarch_deprecated_store_struct_return (gdbarch, hppa_store_struct_return);
set_gdbarch_deprecated_extract_return_value (gdbarch,
hppa_extract_return_value);
@@ -5053,9 +4954,6 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frameless_function_invocation
(gdbarch, hppa_frameless_function_invocation);
set_gdbarch_deprecated_frame_saved_pc (gdbarch, hppa_frame_saved_pc);
- set_gdbarch_frame_args_address (gdbarch, hppa_frame_args_address);
- set_gdbarch_frame_locals_address (gdbarch, hppa_frame_locals_address);
- set_gdbarch_frame_num_args (gdbarch, hppa_frame_num_args);
set_gdbarch_frame_args_skip (gdbarch, 0);
set_gdbarch_deprecated_push_dummy_frame (gdbarch, hppa_push_dummy_frame);
set_gdbarch_deprecated_pop_frame (gdbarch, hppa_pop_frame);
@@ -5068,6 +4966,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/hppah-nat.c b/gdb/hppah-nat.c
index 0b8b04f9778..380a901e982 100644
--- a/gdb/hppah-nat.c
+++ b/gdb/hppah-nat.c
@@ -930,16 +930,6 @@ hppa_pid_or_tid_to_str (ptid_t id)
return child_pid_to_str (id);
}
-/* This function has no meaning in a non-threaded world. Thus, we
- return 0 (FALSE). See the use of "hppa_prepare_to_proceed" in
- hppa-tdep.c. */
-
-pid_t
-hppa_switched_threads (pid_t pid)
-{
- return (pid_t) 0;
-}
-
void
hppa_ensure_vforking_parent_remains_stopped (int pid)
{
diff --git a/gdb/hpread.c b/gdb/hpread.c
index 885d4627739..3e2179aac3d 100644
--- a/gdb/hpread.c
+++ b/gdb/hpread.c
@@ -140,9 +140,7 @@ lbrac_mismatch_complaint (int arg1)
/* Forward procedure declarations */
-static void set_namestring (union dnttentry *sym, char **namep,
- struct objfile *objfile);
-
+/* Used in somread.c. */
void hpread_symfile_init (struct objfile *);
void do_pxdb (bfd *);
@@ -151,6 +149,9 @@ void hpread_build_psymtabs (struct objfile *, int);
void hpread_symfile_finish (struct objfile *);
+static void set_namestring (union dnttentry *sym, char **namep,
+ struct objfile *objfile);
+
static union dnttentry *hpread_get_gntt (int, struct objfile *);
static union dnttentry *hpread_get_lntt (int index, struct objfile *objfile);
@@ -172,11 +173,11 @@ static unsigned long hpread_get_line (sltpointer, struct objfile *);
static CORE_ADDR hpread_get_location (sltpointer, struct objfile *);
-int hpread_has_name (enum dntt_entry_type kind);
+static int hpread_has_name (enum dntt_entry_type kind);
static void hpread_psymtab_to_symtab_1 (struct partial_symtab *);
-void hpread_psymtab_to_symtab (struct partial_symtab *);
+static void hpread_psymtab_to_symtab (struct partial_symtab *);
static struct symtab *hpread_expand_symtab
(struct objfile *, int, int, CORE_ADDR, int,
@@ -261,7 +262,7 @@ static struct type *fixup_method = NULL;
#include "gdb_string.h"
/* check for the existence of a file, given its full pathname */
-int
+static int
file_exists (char *filename)
{
if (filename)
@@ -321,7 +322,7 @@ set_namestring (union dnttentry *sym, char **namep, struct objfile *objfile)
NOTE: uses system function and string functions directly.
Return value: 1 if ok, 0 if not */
-int
+static int
hpread_call_pxdb (const char *file_name)
{
char *p;
@@ -354,7 +355,7 @@ hpread_call_pxdb (const char *file_name)
by PXDB, and we have thus called PXDB to do this processing
and the file therefore needs to be re-loaded. Otherwise
return 0. */
-int
+static int
hpread_pxdb_needed (bfd *sym_bfd)
{
asection *pinfo_section, *debug_section, *header_section;
@@ -837,7 +838,7 @@ scan_procs (int *curr_pd_p, quick_procedure_entry *qPD, int max_procs,
a file can result in a compiled object which does not have a module
entry for it, so in such cases we create a psymtab for the file. */
-int
+static int
hpread_quick_traverse (struct objfile *objfile, char *gntt_bits,
char *vt_bits, PXDB_header_ptr pxdb_header_p)
{
@@ -1542,7 +1543,7 @@ hpread_quick_traverse (struct objfile *objfile, char *gntt_bits,
/* Get appropriate header, based on pxdb type.
Return value: 1 if ok, 0 if not */
-int
+static int
hpread_get_header (struct objfile *objfile, PXDB_header_ptr pxdb_header_p)
{
asection *pinfo_section, *debug_section, *header_section;
@@ -2294,7 +2295,7 @@ hpread_symfile_finish (struct objfile *objfile)
/* Various small functions to get entries in the debug symbol sections. */
-union dnttentry *
+static union dnttentry *
hpread_get_lntt (int index, struct objfile *objfile)
{
return (union dnttentry *)
@@ -2308,7 +2309,7 @@ hpread_get_gntt (int index, struct objfile *objfile)
&(GNTT (objfile)[(index * sizeof (struct dntt_type_block))]);
}
-union sltentry *
+static union sltentry *
hpread_get_slt (int index, struct objfile *objfile)
{
return (union sltentry *) &(SLT (objfile)[index * sizeof (union sltentry)]);
@@ -2588,7 +2589,7 @@ hpread_get_location (sltpointer index, struct objfile *objfile)
* leave it here in case it proves useful later on. - RT).
*/
-int
+static int
hpread_has_name (enum dntt_entry_type kind)
{
switch (kind)
@@ -2720,7 +2721,7 @@ hpread_psymtab_to_symtab_1 (struct partial_symtab *pst)
/* Read in all of the symbols for a given psymtab for real.
Be verbose about it if the user wants that. */
-void
+static void
hpread_psymtab_to_symtab (struct partial_symtab *pst)
{
/* Get out quick if given junk. */
@@ -5015,7 +5016,7 @@ hpread_record_lines (struct subfile *subfile, sltpointer s_idx,
* Called from hpread_process_one_debug_symbol()
* If "f" is not a member function, return NULL.
*/
-char *
+static char *
class_of (struct type *functype)
{
struct type *first_param_type;
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-interix-tdep.c b/gdb/i386-interix-tdep.c
index 7713863e4d7..2fced7202cd 100644
--- a/gdb/i386-interix-tdep.c
+++ b/gdb/i386-interix-tdep.c
@@ -90,7 +90,7 @@ pei_adjust_objfile_offsets (struct objfile *objfile,
return;
}
- for (i = 0; i < SECT_OFF_MAX; i++)
+ for (i = 0; i < objfile->num_sections; i++)
{
(objfile->section_offsets)->offsets[i] += symbols_offset;
}
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..f9a2887e044 100644
--- a/gdb/i386-nto-tdep.c
+++ b/gdb/i386-nto-tdep.c
@@ -231,14 +231,21 @@ 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];
+ CORE_ADDR sp;
+
+ 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..3b981806dc2 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. */
+ unsigned char buf[8];
+ unsigned char op;
+
+ op = read_memory_unsigned_integer (pc, 1);
- etc. */
- int pos;
- unsigned char buf[8];
+ 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);
-
- return read_memory_unsigned_integer (read_register (SP_REGNUM), 4);
-}
+/* 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.
-/* 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,350 @@ 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. */
+
+ 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;
- store_unsigned_integer (buf, 4, CALL_DUMMY_ADDRESS ());
- write_memory (sp - 4, buf, 4);
- return sp - 4;
+ 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;
+
+ /* See the end of i386_push_dummy_call. */
+ (*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.
- fp = get_frame_base (frame);
- i386_frame_init_saved_regs (frame);
+ 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.
- for (regnum = 0; regnum < NUM_REGS; regnum++)
+ 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)
{
- 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);
+ 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;
}
- 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 ();
+
+ if (regnum == I386_ESP_REGNUM && cache->saved_sp)
+ {
+ *optimizedp = 0;
+ *lvalp = not_lval;
+ *addrp = 0;
+ *realnump = -1;
+ if (valuep)
+ {
+ /* 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;
+ }
+
+ *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);
+
+ /* See the end of i386_push_dummy_call. */
+ (*this_id) = frame_id_build (cache->base + 8, frame_pc_unwind (next_frame));
}
static void
-i386_pop_frame (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)
{
- generic_pop_current_frame (i386_do_pop_frame);
+ /* 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 struct frame_id
+i386_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame)
+{
+ char buf[4];
+ CORE_ADDR fp;
+
+ frame_unwind_register (next_frame, I386_EBP_REGNUM, buf);
+ fp = extract_unsigned_integer (buf, 4);
+
+ /* See the end of i386_push_dummy_call. */
+ return frame_id_build (fp + 8, frame_pc_unwind (next_frame));
}
@@ -825,7 +980,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 +1011,67 @@ 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);
}
- return sp;
+ /* 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);
+
+ /* MarkK wrote: This "+ 8" is all over the place:
+ (i386_frame_this_id, i386_sigtramp_frame_this_id,
+ i386_unwind_dummy_id). It's there, since all frame unwinders for
+ a given target have to agree (within a certain margin) on the
+ defenition of the stack address of a frame. Otherwise
+ frame_id_inner() won't work correctly. Since DWARF2/GCC uses the
+ stack address *before* the function call as a frame's CFA. On
+ the i386, when %ebp is used as a frame pointer, the offset
+ between the contents %ebp and the CFA as defined by GCC. */
+ return sp + 8;
}
/* 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 +1105,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 +1167,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 +1208,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 +1253,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 +1270,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)
@@ -1127,65 +1324,143 @@ i386_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
else
regcache_raw_write (regcache, regnum, buf);
}
+
+
+/* These registers don't have pervasive standard uses. Move them to
+ i386-tdep.h if necessary. */
+
+#define I386_EBX_REGNUM 3 /* %ebx */
+#define I386_ECX_REGNUM 1 /* %ecx */
+#define I386_ESI_REGNUM 6 /* %esi */
+#define I386_EDI_REGNUM 7 /* %edi */
+
+/* Return the register number of the register allocated by GCC after
+ REGNUM, or -1 if there is no such register. */
+
+static int
+i386_next_regnum (int regnum)
+{
+ /* GCC allocates the registers in the order:
+
+ %eax, %edx, %ecx, %ebx, %esi, %edi, %ebp, %esp, ...
+
+ Since storing a variable in %esp doesn't make any sense we return
+ -1 for %ebp and for %esp itself. */
+ static int next_regnum[] =
+ {
+ I386_EDX_REGNUM, /* Slot for %eax. */
+ I386_EBX_REGNUM, /* Slot for %ecx. */
+ I386_ECX_REGNUM, /* Slot for %edx. */
+ I386_ESI_REGNUM, /* Slot for %ebx. */
+ -1, -1, /* Slots for %esp and %ebp. */
+ I386_EDI_REGNUM, /* Slot for %esi. */
+ I386_EBP_REGNUM /* Slot for %edi. */
+ };
+
+ if (regnum >= 0 && regnum < sizeof (next_regnum) / sizeof (next_regnum[0]))
+ return next_regnum[regnum];
+
+ return -1;
+}
-/* Return true iff register REGNUM's virtual format is different from
- its raw format. Note that this definition assumes that the host
- supports IEEE 32-bit floats, since it doesn't say that SSE
- registers need conversion. Even if we can't find a counterexample,
- this is still sloppy. */
+/* Return nonzero if a value of type TYPE stored in register REGNUM
+ needs any special handling. */
static int
-i386_register_convertible (int regnum)
+i386_convert_register_p (int regnum, struct type *type)
{
+ int len = TYPE_LENGTH (type);
+
+ /* Values may be spread across multiple registers. Most debugging
+ formats aren't expressive enough to specify the locations, so
+ some heuristics is involved. Right now we only handle types that
+ have a length that is a multiple of the word size, since GCC
+ doesn't seem to put any other types into registers. */
+ if (len > 4 && len % 4 == 0)
+ {
+ int last_regnum = regnum;
+
+ while (len > 4)
+ {
+ last_regnum = i386_next_regnum (last_regnum);
+ len -= 4;
+ }
+
+ if (last_regnum != -1)
+ return 1;
+ }
+
return i386_fp_regnum_p (regnum);
}
-/* Convert data from raw format for register REGNUM in buffer FROM to
- virtual format with type TYPE in buffer TO. */
+/* Read a value of type TYPE from register REGNUM in frame FRAME, and
+ return its contents in TO. */
static void
-i386_register_convert_to_virtual (int regnum, struct type *type,
- char *from, char *to)
+i386_register_to_value (struct frame_info *frame, int regnum,
+ struct type *type, void *to)
{
- gdb_assert (i386_fp_regnum_p (regnum));
+ int len = TYPE_LENGTH (type);
+ char *buf = to;
+
+ /* FIXME: kettenis/20030609: What should we do if REGNUM isn't
+ available in FRAME (i.e. if it wasn't saved)? */
- /* We only support floating-point values. */
- if (TYPE_CODE (type) != TYPE_CODE_FLT)
+ if (i386_fp_regnum_p (regnum))
{
- warning ("Cannot convert floating-point register value "
- "to non-floating-point type.");
- memset (to, 0, TYPE_LENGTH (type));
+ i387_register_to_value (frame, regnum, type, to);
return;
}
- /* 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 (from, builtin_type_i387_ext, to, type);
+ /* Read a value spread accross multiple registers. */
+
+ gdb_assert (len > 4 && len % 4 == 0);
+
+ while (len > 0)
+ {
+ gdb_assert (regnum != -1);
+ gdb_assert (register_size (current_gdbarch, regnum) == 4);
+
+ frame_read_register (frame, regnum, buf);
+ regnum = i386_next_regnum (regnum);
+ len -= 4;
+ buf += 4;
+ }
}
-/* Convert data from virtual format with type TYPE in buffer FROM to
- raw format for register REGNUM in buffer TO. */
+/* Write the contents FROM of a value of type TYPE into register
+ REGNUM in frame FRAME. */
static void
-i386_register_convert_to_raw (struct type *type, int regnum,
- char *from, char *to)
+i386_value_to_register (struct frame_info *frame, int regnum,
+ struct type *type, const void *from)
{
- gdb_assert (i386_fp_regnum_p (regnum));
+ int len = TYPE_LENGTH (type);
+ const char *buf = from;
- /* We only support floating-point values. */
- if (TYPE_CODE (type) != TYPE_CODE_FLT)
+ if (i386_fp_regnum_p (regnum))
{
- warning ("Cannot convert non-floating-point type "
- "to floating-point register value.");
- memset (to, 0, TYPE_LENGTH (type));
+ i387_value_to_register (frame, regnum, type, from);
return;
}
- /* Convert from TYPE. This should be a no-op if TYPE is equivalent
- to the extended floating-point format used by the FPU. */
- convert_typed_floating (from, type, to, builtin_type_i387_ext);
+ /* Write a value spread accross multiple registers. */
+
+ gdb_assert (len > 4 && len % 4 == 0);
+
+ while (len > 0)
+ {
+ gdb_assert (regnum != -1);
+ gdb_assert (register_size (current_gdbarch, regnum) == 4);
+
+ put_frame_register (frame, regnum, buf);
+ regnum = i386_next_regnum (regnum);
+ len -= 4;
+ buf += 4;
+ }
}
-
+
+
#ifdef STATIC_TRANSFORM_NAME
/* SunPRO encodes the static variables. This is not related to C++
@@ -1274,36 +1549,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 +1608,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 +1673,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 +1684,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. */
+static 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 +1715,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 +1725,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 +1740,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 +1763,23 @@ 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_register_convertible (gdbarch, i386_register_convertible);
- set_gdbarch_register_convert_to_virtual (gdbarch,
- i386_register_convert_to_virtual);
- set_gdbarch_register_convert_to_raw (gdbarch, i386_register_convert_to_raw);
+ set_gdbarch_push_dummy_call (gdbarch, i386_push_dummy_call);
- /* "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_convert_register_p (gdbarch, i386_convert_register_p);
+ set_gdbarch_register_to_value (gdbarch, i386_register_to_value);
+ set_gdbarch_value_to_register (gdbarch, i386_value_to_register);
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,18 +1789,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);
/* Wire in the MMX registers. */
@@ -1548,16 +1799,29 @@ 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_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/i387-tdep.c b/gdb/i387-tdep.c
index c6a2d5dac84..f7800af6415 100644
--- a/gdb/i387-tdep.c
+++ b/gdb/i387-tdep.c
@@ -21,128 +21,26 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
+#include "doublest.h"
+#include "floatformat.h"
#include "frame.h"
+#include "gdbcore.h"
#include "inferior.h"
#include "language.h"
-#include "value.h"
-#include "gdbcore.h"
-#include "floatformat.h"
#include "regcache.h"
+#include "value.h"
+
#include "gdb_assert.h"
#include "gdb_string.h"
-#include "doublest.h"
#include "i386-tdep.h"
+#include "i387-tdep.h"
-
-/* FIXME: The functions on this page are used by the old `info float'
- implementations that a few of the i386 targets provide. These
- functions should be removed if all of these have been converted to
- use the generic implementation based on the new register file
- layout. */
-
-static void print_387_control_bits (unsigned int control);
-static void print_387_status_bits (unsigned int status);
-
-static void
-print_387_control_bits (unsigned int control)
-{
- switch ((control >> 8) & 3)
- {
- case 0:
- puts_unfiltered (" 24 bit; ");
- break;
- case 1:
- puts_unfiltered (" (bad); ");
- break;
- case 2:
- puts_unfiltered (" 53 bit; ");
- break;
- case 3:
- puts_unfiltered (" 64 bit; ");
- break;
- }
- switch ((control >> 10) & 3)
- {
- case 0:
- puts_unfiltered ("NEAR; ");
- break;
- case 1:
- puts_unfiltered ("DOWN; ");
- break;
- case 2:
- puts_unfiltered ("UP; ");
- break;
- case 3:
- puts_unfiltered ("CHOP; ");
- break;
- }
- if (control & 0x3f)
- {
- puts_unfiltered ("mask");
- if (control & 0x0001)
- puts_unfiltered (" INVAL");
- if (control & 0x0002)
- puts_unfiltered (" DENOR");
- if (control & 0x0004)
- puts_unfiltered (" DIVZ");
- if (control & 0x0008)
- puts_unfiltered (" OVERF");
- if (control & 0x0010)
- puts_unfiltered (" UNDER");
- if (control & 0x0020)
- puts_unfiltered (" LOS");
- puts_unfiltered (";");
- }
-
- if (control & 0xe080)
- warning ("\nreserved bits on: %s",
- local_hex_string (control & 0xe080));
-}
-
-void
-print_387_control_word (unsigned int control)
-{
- printf_filtered ("control %s:", local_hex_string(control & 0xffff));
- print_387_control_bits (control);
- puts_unfiltered ("\n");
-}
-
-static void
-print_387_status_bits (unsigned int status)
-{
- printf_unfiltered (" flags %d%d%d%d; ",
- (status & 0x4000) != 0,
- (status & 0x0400) != 0,
- (status & 0x0200) != 0,
- (status & 0x0100) != 0);
- printf_unfiltered ("top %d; ", (status >> 11) & 7);
- if (status & 0xff)
- {
- puts_unfiltered ("excep");
- if (status & 0x0001) puts_unfiltered (" INVAL");
- if (status & 0x0002) puts_unfiltered (" DENOR");
- if (status & 0x0004) puts_unfiltered (" DIVZ");
- if (status & 0x0008) puts_unfiltered (" OVERF");
- if (status & 0x0010) puts_unfiltered (" UNDER");
- if (status & 0x0020) puts_unfiltered (" LOS");
- if (status & 0x0040) puts_unfiltered (" STACK");
- }
-}
-
-void
-print_387_status_word (unsigned int status)
-{
- printf_filtered ("status %s:", local_hex_string (status & 0xffff));
- print_387_status_bits (status);
- puts_unfiltered ("\n");
-}
-
-
/* Implement the `info float' layout based on the register definitions
in `tm-i386.h'. */
/* Print the floating point number specified by RAW. */
+
static void
print_i387_value (char *raw, struct ui_file *file)
{
@@ -166,6 +64,7 @@ print_i387_value (char *raw, struct ui_file *file)
}
/* Print the classification for the register contents RAW. */
+
static void
print_i387_ext (unsigned char *raw, struct ui_file *file)
{
@@ -217,6 +116,7 @@ print_i387_ext (unsigned char *raw, struct ui_file *file)
}
/* Print the status word STATUS. */
+
static void
print_i387_status_word (unsigned int status, struct ui_file *file)
{
@@ -246,6 +146,7 @@ print_i387_status_word (unsigned int status, struct ui_file *file)
}
/* Print the control word CONTROL. */
+
static void
print_i387_control_word (unsigned int control, struct ui_file *file)
{
@@ -386,12 +287,60 @@ i387_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
fprintf_filtered (file, "Opcode: %s\n",
local_hex_string_custom (fop ? (fop | 0xd800) : 0, "04"));
}
+
+
+/* Read a value of type TYPE from register REGNUM in frame FRAME, and
+ return its contents in TO. */
+
+void
+i387_register_to_value (struct frame_info *frame, int regnum,
+ struct type *type, void *to)
+{
+ char from[I386_MAX_REGISTER_SIZE];
+
+ gdb_assert (i386_fp_regnum_p (regnum));
+
+ /* 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.");
+ return;
+ }
+
+ /* Convert to TYPE. This should be a no-op if TYPE is equivalent to
+ the extended floating-point format used by the FPU. */
+ frame_read_register (frame, regnum, from);
+ convert_typed_floating (from, builtin_type_i387_ext, to, type);
+}
+
+/* Write the contents FROM of a value of type TYPE into register
+ REGNUM in frame FRAME. */
+
+void
+i387_value_to_register (struct frame_info *frame, int regnum,
+ struct type *type, const void *from)
+{
+ char to[I386_MAX_REGISTER_SIZE];
+
+ gdb_assert (i386_fp_regnum_p (regnum));
+
+ /* We only support floating-point values. */
+ if (TYPE_CODE (type) != TYPE_CODE_FLT)
+ {
+ warning ("Cannot convert non-floating-point type "
+ "to floating-point register value.");
+ return;
+ }
+
+ /* Convert from TYPE. This should be a no-op if TYPE is equivalent
+ to the extended floating-point format used by the FPU. */
+ convert_typed_floating (from, type, to, builtin_type_i387_ext);
+ put_frame_register (frame, regnum, to);
+}
+
-/* FIXME: kettenis/2000-05-21: Right now more than a few i386 targets
- define their own routines to manage the floating-point registers in
- GDB's register array. Most (if not all) of these targets use the
- format used by the "fsave" instruction in their communication with
- the OS. They should all be converted to use the routines below. */
+/* Handle FSAVE and FXSAVE formats. */
/* At fsave_offset[REGNUM] you'll find the offset to the location in
the data structure used by the "fsave" instruction where GDB
diff --git a/gdb/i387-tdep.h b/gdb/i387-tdep.h
index 707931016b2..df5c77bdaec 100644
--- a/gdb/i387-tdep.h
+++ b/gdb/i387-tdep.h
@@ -24,6 +24,7 @@
struct gdbarch;
struct ui_file;
struct frame_info;
+struct type;
/* Print out the i387 floating point state. */
@@ -32,6 +33,18 @@ extern void i387_print_float_info (struct gdbarch *gdbarch,
struct frame_info *frame,
const char *args);
+/* Read a value of type TYPE from register REGNUM in frame FRAME, and
+ return its contents in TO. */
+
+extern void i387_register_to_value (struct frame_info *frame, int regnum,
+ struct type *type, void *to);
+
+/* Write the contents FROM of a value of type TYPE into register
+ REGNUM in frame FRAME. */
+
+extern void i387_value_to_register (struct frame_info *frame, int regnum,
+ struct type *type, const void *from);
+
/* Fill register REGNUM in GDB's register array with the appropriate
value from *FSAVE. This function masks off any of the reserved
bits in *FSAVE. */
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index a898f5211ab..0bc4dea0182 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -28,7 +28,7 @@
#include "regcache.h"
#include "doublest.h"
#include "value.h"
-
+#include "gdb_assert.h"
#include "objfiles.h"
#include "elf/common.h" /* for DT_PLTGOT value */
#include "elf-bfd.h"
@@ -86,10 +86,6 @@ extern CORE_ADDR ia64_aix_sigcontext_register_address (CORE_ADDR, int);
static gdbarch_init_ftype ia64_gdbarch_init;
static gdbarch_register_name_ftype ia64_register_name;
-static gdbarch_register_raw_size_ftype ia64_register_raw_size;
-static gdbarch_register_virtual_size_ftype ia64_register_virtual_size;
-static gdbarch_register_virtual_type_ftype ia64_register_virtual_type;
-static gdbarch_register_byte_ftype ia64_register_byte;
static gdbarch_breakpoint_from_pc_ftype ia64_breakpoint_from_pc;
static gdbarch_skip_prologue_ftype ia64_skip_prologue;
static gdbarch_deprecated_extract_return_value_ftype ia64_extract_return_value;
@@ -239,13 +235,13 @@ ia64_register_name (int reg)
return ia64_register_names[reg];
}
-int
+static int
ia64_register_raw_size (int reg)
{
return (IA64_FR0_REGNUM <= reg && reg <= IA64_FR127_REGNUM) ? 16 : 8;
}
-int
+static int
ia64_register_virtual_size (int reg)
{
return (IA64_FR0_REGNUM <= reg && reg <= IA64_FR127_REGNUM) ? 16 : 8;
@@ -253,7 +249,7 @@ ia64_register_virtual_size (int reg)
/* Return true iff register N's virtual format is different from
its raw format. */
-int
+static int
ia64_register_convertible (int nr)
{
return (IA64_FR0_REGNUM <= nr && nr <= IA64_FR127_REGNUM);
@@ -265,7 +261,7 @@ const struct floatformat floatformat_ia64_ext =
floatformat_intbit_yes
};
-void
+static void
ia64_register_convert_to_virtual (int regnum, struct type *type,
char *from, char *to)
{
@@ -279,9 +275,9 @@ ia64_register_convert_to_virtual (int regnum, struct type *type,
error("ia64_register_convert_to_virtual called with non floating point register number");
}
-void
+static void
ia64_register_convert_to_raw (struct type *type, int regnum,
- char *from, char *to)
+ const char *from, char *to)
{
if (regnum >= IA64_FR0_REGNUM && regnum <= IA64_FR127_REGNUM)
{
@@ -301,7 +297,7 @@ ia64_register_virtual_type (int reg)
return builtin_type_long;
}
-int
+static int
ia64_register_byte (int reg)
{
return (8 * reg) +
@@ -623,7 +619,19 @@ ia64_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
return breakpoint;
}
-CORE_ADDR
+static CORE_ADDR
+ia64_read_fp (void)
+{
+ /* We won't necessarily have a frame pointer and even if we do, it
+ winds up being extraordinarly messy when attempting to find the
+ frame chain. So for the purposes of creating frames (which is
+ all deprecated_read_fp() is used for), simply use the stack
+ pointer value instead. */
+ gdb_assert (SP_REGNUM >= 0);
+ return read_register (SP_REGNUM);
+}
+
+static CORE_ADDR
ia64_read_pc (ptid_t ptid)
{
CORE_ADDR psr_value = read_register_pid (IA64_PSR_REGNUM, ptid);
@@ -633,7 +641,7 @@ ia64_read_pc (ptid_t ptid)
return pc_value | (slot_num * SLOT_MULTIPLIER);
}
-void
+static void
ia64_write_pc (CORE_ADDR new_pc, ptid_t ptid)
{
int slot_num = (int) (new_pc & 0xf) / SLOT_MULTIPLIER;
@@ -691,7 +699,7 @@ rse_address_add(CORE_ADDR addr, int nslots)
represent the frame chain as the end of the previous frame instead
of the beginning. */
-CORE_ADDR
+static CORE_ADDR
ia64_frame_chain (struct frame_info *frame)
{
if ((get_frame_type (frame) == SIGTRAMP_FRAME))
@@ -711,7 +719,7 @@ ia64_frame_chain (struct frame_info *frame)
}
}
-CORE_ADDR
+static CORE_ADDR
ia64_frame_saved_pc (struct frame_info *frame)
{
if ((get_frame_type (frame) == SIGTRAMP_FRAME))
@@ -1222,7 +1230,7 @@ ia64_skip_prologue (CORE_ADDR pc)
return examine_prologue (pc, pc+1024, 0);
}
-void
+static void
ia64_frame_init_saved_regs (struct frame_info *frame)
{
if (get_frame_saved_regs (frame))
@@ -1276,7 +1284,7 @@ ia64_frame_init_saved_regs (struct frame_info *frame)
}
}
-void
+static void
ia64_get_saved_register (char *raw_buffer,
int *optimized,
CORE_ADDR *addrp,
@@ -1508,7 +1516,7 @@ ia64_extract_struct_value_address (char *regbuf)
return struct_return_address;
}
-void
+static void
ia64_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
{
/* FIXME: See above. */
@@ -1529,7 +1537,7 @@ ia64_saved_pc_after_call (struct frame_info *frame)
return read_register (IA64_BR0_REGNUM);
}
-CORE_ADDR
+static CORE_ADDR
ia64_frame_args_address (struct frame_info *frame)
{
/* frame->frame points at the SP for this frame; But we want the start
@@ -1537,7 +1545,7 @@ ia64_frame_args_address (struct frame_info *frame)
return ia64_frame_chain (frame);
}
-CORE_ADDR
+static CORE_ADDR
ia64_frame_locals_address (struct frame_info *frame)
{
/* frame->frame points at the SP for this frame; But we want the start
@@ -1545,7 +1553,7 @@ ia64_frame_locals_address (struct frame_info *frame)
return ia64_frame_chain (frame);
}
-void
+static void
ia64_init_extra_frame_info (int fromleaf, struct frame_info *frame)
{
CORE_ADDR bsp, cfm;
@@ -1747,7 +1755,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;
@@ -1844,7 +1852,7 @@ find_func_descr (CORE_ADDR faddr, CORE_ADDR *fdaptr)
return fdesc;
}
-CORE_ADDR
+static CORE_ADDR
ia64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
{
@@ -1929,7 +1937,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);
@@ -1994,14 +2002,15 @@ ia64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
/* Sync gdb's idea of what the registers are with the target. */
target_store_registers (-1);
- /* FIXME: This doesn't belong here! Instead, SAVE_DUMMY_FRAME_TOS needs
- to be defined to call generic_save_dummy_frame_tos(). But at the
- time of this writing, SAVE_DUMMY_FRAME_TOS wasn't gdbarch'd, so
- I chose to put this call here instead of using the old mechanisms.
- Once SAVE_DUMMY_FRAME_TOS is gdbarch'd, all we need to do is add the
- line
+ /* FIXME: This doesn't belong here! Instead,
+ DEPRECATED_SAVE_DUMMY_FRAME_TOS needs to be defined to call
+ generic_save_dummy_frame_tos(). But at the time of this writing,
+ DEPRECATED_SAVE_DUMMY_FRAME_TOS wasn't gdbarch'd, so I chose to
+ put this call here instead of using the old mechanisms. Once
+ DEPRECATED_SAVE_DUMMY_FRAME_TOS is gdbarch'd, all we need to do
+ is add the line
- set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
+ set_gdbarch_deprecated_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
to ia64_gdbarch_init() and remove the line below. */
generic_save_dummy_frame_tos (sp);
@@ -2009,7 +2018,7 @@ ia64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
return sp;
}
-CORE_ADDR
+static CORE_ADDR
ia64_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
{
CORE_ADDR global_pointer = FIND_GLOBAL_POINTER (pc);
@@ -2021,7 +2030,7 @@ ia64_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
return sp;
}
-void
+static void
ia64_store_return_value (struct type *type, char *valbuf)
{
if (TYPE_CODE (type) == TYPE_CODE_FLT)
@@ -2035,7 +2044,7 @@ ia64_store_return_value (struct type *type, char *valbuf)
valbuf, TYPE_LENGTH (type));
}
-void
+static void
ia64_pop_frame (void)
{
generic_pop_current_frame (ia64_pop_frame_regular);
@@ -2231,7 +2240,7 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_long_long_bit (gdbarch, 64);
set_gdbarch_float_bit (gdbarch, 32);
set_gdbarch_double_bit (gdbarch, 64);
- set_gdbarch_long_double_bit (gdbarch, 64);
+ set_gdbarch_long_double_bit (gdbarch, 128);
set_gdbarch_ptr_bit (gdbarch, 64);
set_gdbarch_num_regs (gdbarch, ia64_num_regs);
@@ -2243,16 +2252,15 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_name (gdbarch, ia64_register_name);
set_gdbarch_deprecated_register_size (gdbarch, 8);
set_gdbarch_deprecated_register_bytes (gdbarch, ia64_num_regs * 8 + 128*8);
- set_gdbarch_register_byte (gdbarch, ia64_register_byte);
- set_gdbarch_register_raw_size (gdbarch, ia64_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, ia64_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, ia64_register_raw_size);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, 16);
- set_gdbarch_register_virtual_size (gdbarch, ia64_register_virtual_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, ia64_register_virtual_size);
set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 16);
- set_gdbarch_register_virtual_type (gdbarch, ia64_register_virtual_type);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, ia64_register_virtual_type);
set_gdbarch_skip_prologue (gdbarch, ia64_skip_prologue);
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
set_gdbarch_frameless_function_invocation (gdbarch, ia64_frameless_function_invocation);
set_gdbarch_deprecated_saved_pc_after_call (gdbarch, ia64_saved_pc_after_call);
@@ -2263,9 +2271,9 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, ia64_frame_init_saved_regs);
set_gdbarch_deprecated_get_saved_register (gdbarch, ia64_get_saved_register);
- set_gdbarch_register_convertible (gdbarch, ia64_register_convertible);
- set_gdbarch_register_convert_to_virtual (gdbarch, ia64_register_convert_to_virtual);
- set_gdbarch_register_convert_to_raw (gdbarch, ia64_register_convert_to_raw);
+ set_gdbarch_deprecated_register_convertible (gdbarch, ia64_register_convertible);
+ set_gdbarch_deprecated_register_convert_to_virtual (gdbarch, ia64_register_convert_to_virtual);
+ set_gdbarch_deprecated_register_convert_to_raw (gdbarch, ia64_register_convert_to_raw);
set_gdbarch_use_struct_convention (gdbarch, ia64_use_struct_convention);
set_gdbarch_deprecated_extract_return_value (gdbarch, ia64_extract_return_value);
@@ -2288,21 +2296,20 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_call_dummy_words (gdbarch, ia64_call_dummy_words);
set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (ia64_call_dummy_words));
set_gdbarch_deprecated_init_extra_frame_info (gdbarch, ia64_init_extra_frame_info);
- set_gdbarch_frame_args_address (gdbarch, ia64_frame_args_address);
- set_gdbarch_frame_locals_address (gdbarch, ia64_frame_locals_address);
+ set_gdbarch_deprecated_frame_args_address (gdbarch, ia64_frame_args_address);
+ set_gdbarch_deprecated_frame_locals_address (gdbarch, ia64_frame_locals_address);
/* We won't necessarily have a frame pointer and even if we do, it
winds up being extraordinarly messy when attempting to find the
frame chain. So for the purposes of creating frames (which is
all deprecated_read_fp() is used for), simply use the stack
pointer value instead. */
- set_gdbarch_deprecated_target_read_fp (gdbarch, generic_target_read_sp);
+ set_gdbarch_deprecated_target_read_fp (gdbarch, ia64_read_fp);
/* Settings that should be unnecessary. */
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
- set_gdbarch_read_sp (gdbarch, generic_target_read_sp);
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
set_gdbarch_decr_pc_after_break (gdbarch, 0);
set_gdbarch_function_start_offset (gdbarch, 0);
@@ -2314,6 +2321,8 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
return gdbarch;
}
+extern initialize_file_ftype _initialize_ia64_tdep; /* -Wmissing-prototypes */
+
void
_initialize_ia64_tdep (void)
{
diff --git a/gdb/infcall.c b/gdb/infcall.c
index 5f80e896bbc..123fba067cf 100644
--- a/gdb/infcall.c
+++ b/gdb/infcall.c
@@ -34,6 +34,7 @@
#include "gdbcmd.h"
#include "command.h"
#include "gdb_string.h"
+#include "infcall.h"
/* NOTE: cagney/2003-04-16: What's the future of this code?
@@ -422,11 +423,11 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
A follow-on change is to modify this interface so that it takes
thread OR frame OR tpid as a parameter, and returns a dummy
frame handle. The handle can then be used further down as a
- parameter SAVE_DUMMY_FRAME_TOS. Hmm, thinking about it, since
- everything is ment to be using generic dummy frames, why not
- even use some of the dummy frame code to here - do a regcache
- dup and then pass the duped regcache, along with all the other
- stuff, at one single point.
+ parameter to generic_save_dummy_frame_tos(). Hmm, thinking
+ about it, since everything is ment to be using generic dummy
+ frames, why not even use some of the dummy frame code to here -
+ do a regcache dup and then pass the duped regcache, along with
+ all the other stuff, at one single point.
In fact, you can even save the structure's return address in the
dummy frame and fix one of those nasty lost struct return edge
@@ -473,15 +474,14 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
|| (INNER_THAN (2, 1) && sp >= old_sp));
}
else
- /* FIXME: cagney/2002-09-18: Hey, you loose! Who knows how
- badly aligned the SP is! Further, per comment above, if the
- generic dummy frame ends up empty (because nothing is pushed)
- GDB won't be able to correctly perform back traces. If a
- target is having trouble with backtraces, first thing to do
- is add FRAME_ALIGN() to its architecture vector. After that,
- try adding SAVE_DUMMY_FRAME_TOS() and modifying
- DEPRECATED_FRAME_CHAIN so that when the next outer frame is a
- generic dummy, it returns the current frame's base. */
+ /* FIXME: cagney/2002-09-18: Hey, you loose!
+
+ Who knows how badly aligned the SP is! Further, per comment
+ above, if the generic dummy frame ends up empty (because
+ nothing is pushed) GDB won't be able to correctly perform
+ back traces. If a target is having trouble with backtraces,
+ first thing to do is add FRAME_ALIGN() to the architecture
+ vector. If that fails, try unwind_dummy_id(). */
sp = old_sp;
}
@@ -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,20 +809,29 @@ 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);
- if (SAVE_DUMMY_FRAME_TOS_P ())
- SAVE_DUMMY_FRAME_TOS (sp);
+ if (gdbarch_unwind_dummy_id_p (current_gdbarch))
+ {
+ /* Sanity. The exact same SP value is returned by
+ PUSH_DUMMY_CALL, saved as the dummy-frame TOS, and used by
+ unwind_dummy_id to form the frame ID's stack address. */
+ gdb_assert (DEPRECATED_USE_GENERIC_DUMMY_FRAMES);
+ generic_save_dummy_frame_tos (sp);
+ }
+ else if (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ())
+ DEPRECATED_SAVE_DUMMY_FRAME_TOS (sp);
/* Now proceed, having reached the desired place. */
clear_proceed_status ();
@@ -830,17 +850,29 @@ You must use a pointer to function type variable. Command ignored.", arg_name);
set_momentary_breakpoint. We need to give the breakpoint a
frame ID so that the breakpoint code can correctly re-identify
the dummy breakpoint. */
- /* The assumption here is that push_dummy_call() returned the
- stack part of the frame ID. Unfortunatly, many older
- architectures were, via a convoluted mess, relying on the
- poorly defined and greatly overloaded DEPRECATED_TARGET_READ_FP
- or DEPRECATED_FP_REGNUM to supply the value. */
- if (DEPRECATED_TARGET_READ_FP_P ())
- frame = frame_id_build (DEPRECATED_TARGET_READ_FP (), sal.pc);
- else if (DEPRECATED_FP_REGNUM >= 0)
- frame = frame_id_build (read_register (DEPRECATED_FP_REGNUM), sal.pc);
+ if (gdbarch_unwind_dummy_id_p (current_gdbarch))
+ {
+ /* Sanity. The exact same SP value is returned by
+ PUSH_DUMMY_CALL, saved as the dummy-frame TOS, and used by
+ unwind_dummy_id to form the frame ID's stack address. */
+ gdb_assert (DEPRECATED_USE_GENERIC_DUMMY_FRAMES);
+ frame = frame_id_build (sp, sal.pc);
+ }
else
- frame = frame_id_build (sp, sal.pc);
+ {
+ /* The assumption here is that push_dummy_call() returned the
+ stack part of the frame ID. Unfortunatly, many older
+ architectures were, via a convoluted mess, relying on the
+ poorly defined and greatly overloaded
+ DEPRECATED_TARGET_READ_FP or DEPRECATED_FP_REGNUM to supply
+ the value. */
+ if (DEPRECATED_TARGET_READ_FP_P ())
+ frame = frame_id_build (DEPRECATED_TARGET_READ_FP (), sal.pc);
+ else if (DEPRECATED_FP_REGNUM >= 0)
+ frame = frame_id_build (read_register (DEPRECATED_FP_REGNUM), sal.pc);
+ else
+ frame = frame_id_build (sp, sal.pc);
+ }
bpt = set_momentary_breakpoint (sal, frame, bp_call_dummy);
bpt->disposition = disp_del;
}
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index de6c319608d..911e865cf4e 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -81,6 +81,8 @@ static void float_info (char *, int);
static void detach_command (char *, int);
+static void disconnect_command (char *, int);
+
static void unset_environment_command (char *, int);
static void set_environment_command (char *, int);
@@ -1551,9 +1553,9 @@ default_print_registers_info (struct gdbarch *gdbarch,
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))
+ if (DEPRECATED_REGISTER_CONVERTIBLE (i))
{
- REGISTER_CONVERT_TO_VIRTUAL (i, register_type (current_gdbarch, i),
+ DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (i, register_type (current_gdbarch, i),
raw_buffer, virtual_buffer);
}
else
@@ -1876,6 +1878,26 @@ detach_command (char *args, int from_tty)
detach_hook ();
}
+/* Disconnect from the current target without resuming it (leaving it
+ waiting for a debugger).
+
+ We'd better not have left any breakpoints in the program or the
+ next debugger will get confused. Currently only supported for some
+ remote targets, since the normal attach mechanisms don't work on
+ stopped processes on some native platforms (e.g. GNU/Linux). */
+
+static void
+disconnect_command (char *args, int from_tty)
+{
+ dont_repeat (); /* Not for the faint of heart */
+ target_disconnect (args, from_tty);
+#if defined(SOLIB_RESTART)
+ SOLIB_RESTART ();
+#endif
+ if (detach_hook)
+ detach_hook ();
+}
+
/* Stop the execution of the target while running in async mode, in
the backgound. */
void
@@ -2014,6 +2036,11 @@ to specify the program, and to load its symbol table.");
If a process, it is no longer traced, and it continues its execution. If\n\
you were debugging a file, the file is closed and gdb no longer accesses it.");
+ add_com ("disconnect", class_run, disconnect_command,
+ "Disconnect from a target.\n\
+The target will wait for another debugger to connect. Not available for\n\
+all targets.");
+
add_com ("signal", class_run, signal_command,
"Continue program giving it signal specified by the argument.\n\
An argument of \"0\" means continue program without giving it a signal.");
diff --git a/gdb/inferior.h b/gdb/inferior.h
index 1de3b25e39b..ed49d2315d9 100644
--- a/gdb/inferior.h
+++ b/gdb/inferior.h
@@ -168,8 +168,6 @@ extern CORE_ADDR read_pc (void);
extern CORE_ADDR read_pc_pid (ptid_t);
-extern CORE_ADDR generic_target_read_pc (ptid_t);
-
extern void write_pc (CORE_ADDR);
extern void write_pc_pid (CORE_ADDR, ptid_t);
@@ -178,9 +176,7 @@ extern void generic_target_write_pc (CORE_ADDR, ptid_t);
extern CORE_ADDR read_sp (void);
-extern CORE_ADDR generic_target_read_sp (void);
-
-extern void generic_target_write_sp (CORE_ADDR);
+extern void deprecated_write_sp (CORE_ADDR);
extern CORE_ADDR deprecated_read_fp (void);
diff --git a/gdb/infrun.c b/gdb/infrun.c
index df179682109..b2e371eebb0 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -79,6 +79,8 @@ static int currently_stepping (struct execution_control_state *ecs);
static void xdb_handle_command (char *args, int from_tty);
+static int prepare_to_proceed (void);
+
void _initialize_infrun (void);
int inferior_ignoring_startup_exec_events = 0;
@@ -667,6 +669,55 @@ clear_proceed_status (void)
bpstat_clear (&stop_bpstat);
}
+/* This should be suitable for any targets that support threads. */
+
+static int
+prepare_to_proceed (void)
+{
+ ptid_t wait_ptid;
+ struct target_waitstatus wait_status;
+
+ /* Get the last target status returned by target_wait(). */
+ get_last_target_status (&wait_ptid, &wait_status);
+
+ /* Make sure we were stopped either at a breakpoint, or because
+ of a Ctrl-C. */
+ if (wait_status.kind != TARGET_WAITKIND_STOPPED
+ || (wait_status.value.sig != TARGET_SIGNAL_TRAP &&
+ wait_status.value.sig != TARGET_SIGNAL_INT))
+ {
+ return 0;
+ }
+
+ if (!ptid_equal (wait_ptid, minus_one_ptid)
+ && !ptid_equal (inferior_ptid, wait_ptid))
+ {
+ /* Switched over from WAIT_PID. */
+ CORE_ADDR wait_pc = read_pc_pid (wait_ptid);
+
+ if (wait_pc != read_pc ())
+ {
+ /* Switch back to WAIT_PID thread. */
+ inferior_ptid = wait_ptid;
+
+ /* FIXME: This stuff came from switch_to_thread() in
+ thread.c (which should probably be a public function). */
+ flush_cached_frames ();
+ registers_changed ();
+ stop_pc = wait_pc;
+ select_frame (get_current_frame ());
+ }
+
+ /* We return 1 to indicate that there is a breakpoint here,
+ so we need to step over it before continuing to avoid
+ hitting it straight away. */
+ if (breakpoint_here_p (wait_pc))
+ return 1;
+ }
+
+ return 0;
+
+}
/* Record the pc of the program the last time it stopped. This is
just used internally by wait_for_inferior, but need to be preserved
@@ -722,7 +773,6 @@ proceed (CORE_ADDR addr, enum target_signal siggnal, int step)
write_pc (addr);
}
-#ifdef PREPARE_TO_PROCEED
/* In a multi-threaded task we may select another thread
and then continue or step.
@@ -731,15 +781,11 @@ proceed (CORE_ADDR addr, enum target_signal siggnal, int step)
any execution (i.e. it will report a breakpoint hit
incorrectly). So we must step over it first.
- PREPARE_TO_PROCEED checks the current thread against the thread
+ prepare_to_proceed checks the current thread against the thread
that reported the most recent event. If a step-over is required
it returns TRUE and sets the current thread to the old thread. */
- if (PREPARE_TO_PROCEED (1) && breakpoint_here_p (read_pc ()))
- {
- oneproc = 1;
- }
-
-#endif /* PREPARE_TO_PROCEED */
+ if (prepare_to_proceed () && breakpoint_here_p (read_pc ()))
+ oneproc = 1;
#ifdef HP_OS_BUG
if (trap_expected_after_continue)
diff --git a/gdb/infttrace.c b/gdb/infttrace.c
index f86ab025ef6..e0238e8bc55 100644
--- a/gdb/infttrace.c
+++ b/gdb/infttrace.c
@@ -142,12 +142,6 @@ static startup_semaphore_t startup_semaphore;
static int vforking_child_pid = 0;
static int vfork_in_flight = 0;
-/* To support PREPARE_TO_PROCEED (hppa_prepare_to_proceed).
- */
-static pid_t old_gdb_pid = 0;
-static pid_t reported_pid = 0;
-static int reported_bpt = 0;
-
/* 1 if ok as results of a ttrace or ttrace_wait call, 0 otherwise.
*/
#define TT_OK( _status, _errno ) \
@@ -2912,12 +2906,6 @@ ptrace_wait (ptid_t ptid, int *status)
*/
return_pid = map_to_gdb_tid (real_tid);
- /* Remember this for later use in "hppa_prepare_to_proceed".
- */
- old_gdb_pid = PIDGET (inferior_ptid);
- reported_pid = return_pid;
- reported_bpt = ((tsp.tts_event & TTEVT_SIGNAL) && (5 == tsp.tts_u.tts_signal.tts_signo));
-
if (real_tid == 0 || return_pid == 0)
{
warning ("Internal error: process-wait failed.");
@@ -5536,64 +5524,6 @@ hppa_pid_or_tid_to_str (ptid_t ptid)
}
-/* If the current pid is not the pid this module reported
- * from "ptrace_wait" with the most recent event, then the
- * user has switched threads.
- *
- * If the last reported event was a breakpoint, then return
- * the old thread id, else return 0.
- */
-pid_t
-hppa_switched_threads (pid_t gdb_pid)
-{
- if (gdb_pid == old_gdb_pid)
- {
- /*
- * Core gdb is working with the same pid that it
- * was before we reported the last event. This
- * is ok: e.g. we reported hitting a thread-specific
- * breakpoint, but we were reporting the wrong
- * thread, so the core just ignored the event.
- *
- * No thread switch has happened.
- */
- return (pid_t) 0;
- }
- else if (gdb_pid == reported_pid)
- {
- /*
- * Core gdb is working with the pid we reported, so
- * any continue or step will be able to figure out
- * that it needs to step over any hit breakpoints
- * without our (i.e. PREPARE_TO_PROCEED's) help.
- */
- return (pid_t) 0;
- }
- else if (!reported_bpt)
- {
- /*
- * The core switched, but we didn't just report a
- * breakpoint, so there's no just-hit breakpoint
- * instruction at "reported_pid"'s PC, and thus there
- * is no need to step over it.
- */
- return (pid_t) 0;
- }
- else
- {
- /* There's been a real switch, and we reported
- * a hit breakpoint. Let "hppa_prepare_to_proceed"
- * know, so it can see whether the breakpoint is
- * still active.
- */
- return reported_pid;
- }
-
- /* Keep compiler happy with an obvious return at the end.
- */
- return (pid_t) 0;
-}
-
void
hppa_ensure_vforking_parent_remains_stopped (int pid)
{
diff --git a/gdb/interps.c b/gdb/interps.c
index 748b5b64901..6df1d4bf17f 100644
--- a/gdb/interps.c
+++ b/gdb/interps.c
@@ -290,7 +290,7 @@ interp_quiet_p (struct interp *interp)
return current_interpreter->quiet_p;
}
-int
+static int
interp_set_quiet (struct interp *interp, int quiet)
{
int old_val = interp->quiet_p;
@@ -357,7 +357,7 @@ initialize_interps (void)
/* Don't know if anything needs to be done here... */
}
-void
+static void
interpreter_exec_cmd (char *args, int from_tty)
{
struct interp *old_interp, *interp_to_use;
diff --git a/gdb/interps.h b/gdb/interps.h
index 3954e553671..74008d6c21a 100644
--- a/gdb/interps.h
+++ b/gdb/interps.h
@@ -63,7 +63,7 @@ extern int current_interp_named_p (const char *name);
extern int current_interp_display_prompt_p (void);
extern void current_interp_command_loop (void);
-extern void clear_interpreter_hooks ();
+extern void clear_interpreter_hooks (void);
/* well-known interpreters */
#define INTERP_CONSOLE "console"
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/jv-exp.y b/gdb/jv-exp.y
index 99f7484f433..36589fb6323 100644
--- a/gdb/jv-exp.y
+++ b/gdb/jv-exp.y
@@ -1228,9 +1228,7 @@ java_type_from_name (name)
Otherwise, return 0. */
static int
-push_variable (name)
- struct stoken name;
-
+push_variable (struct stoken name)
{
char *tmp = copy_name (name);
int is_a_field_of_this = 0;
@@ -1302,9 +1300,7 @@ push_fieldnames (name)
Handle a qualified name, where DOT_INDEX is the index of the first '.' */
static void
-push_qualified_expression_name (name, dot_index)
- struct stoken name;
- int dot_index;
+push_qualified_expression_name (struct stoken name, int dot_index)
{
struct stoken token;
char *tmp;
diff --git a/gdb/jv-lang.c b/gdb/jv-lang.c
index 144b3a74aea..82ebadcb3cd 100644
--- a/gdb/jv-lang.c
+++ b/gdb/jv-lang.c
@@ -36,6 +36,7 @@
#include "dictionary.h"
#include "block.h"
#include "demangle.h"
+#include "dictionary.h"
#include <ctype.h>
struct type *java_int_type;
@@ -111,7 +112,8 @@ get_java_class_symtab (void)
to delete this comment. */
class_symtab->free_code = free_nothing;
bv = (struct blockvector *)
- obstack_alloc (&objfile->symbol_obstack, sizeof (struct blockvector));
+ obstack_alloc (&objfile->symbol_obstack,
+ sizeof (struct blockvector) + sizeof (struct block *));
BLOCKVECTOR_NBLOCKS (bv) = 1;
BLOCKVECTOR (class_symtab) = bv;
@@ -260,7 +262,7 @@ type_from_class (struct value *clas)
char *nptr;
CORE_ADDR addr;
struct block *bl;
- int i;
+ struct dict_iterator iter;
int is_array = 0;
type = check_typedef (VALUE_TYPE (clas));
@@ -275,9 +277,8 @@ type_from_class (struct value *clas)
#if 0
get_java_class_symtab ();
bl = BLOCKVECTOR_BLOCK (BLOCKVECTOR (class_symtab), GLOBAL_BLOCK);
- for (i = BLOCK_NSYMS (bl); --i >= 0;)
+ ALL_BLOCK_SYMBOLS (block, iter, sym)
{
- struct symbol *sym = BLOCK_SYM (bl, i);
if (SYMBOL_VALUE_ADDRESS (sym) == addr)
return SYMBOL_TYPE (sym);
}
diff --git a/gdb/jv-valprint.c b/gdb/jv-valprint.c
index 78309c4d8ed..656e33bcbb3 100644
--- a/gdb/jv-valprint.c
+++ b/gdb/jv-valprint.c
@@ -110,14 +110,22 @@ java_value_print (struct value *val, struct ui_file *stream, int format,
{
read_memory (address, buf, sizeof (buf));
address += TARGET_PTR_BIT / HOST_CHAR_BIT;
- element = extract_address (buf, sizeof (buf));
+ /* FIXME: cagney/2003-05-24: Bogus or what. It
+ pulls a host sized pointer out of the target and
+ then extracts that as an address (while assuming
+ that the address is unsigned)! */
+ element = extract_unsigned_integer (buf, sizeof (buf));
}
for (reps = 1; i + reps < length; reps++)
{
read_memory (address, buf, sizeof (buf));
address += TARGET_PTR_BIT / HOST_CHAR_BIT;
- next_element = extract_address (buf, sizeof (buf));
+ /* FIXME: cagney/2003-05-24: Bogus or what. It
+ pulls a host sized pointer out of the target and
+ then extracts that as an address (while assuming
+ that the address is unsigned)! */
+ next_element = extract_unsigned_integer (buf, sizeof (buf));
if (next_element != element)
break;
}
@@ -468,7 +476,8 @@ java_val_print (struct type *type, char *valaddr, int embedded_offset,
/* Print the unmangled name if desired. */
/* Print vtable entry - we only get here if we ARE using
-fvtable_thunks. (Otherwise, look under TYPE_CODE_STRUCT.) */
- print_address_demangle (extract_address (valaddr, TYPE_LENGTH (type)),
+ /* Extract an address, assume that it is unsigned. */
+ print_address_demangle (extract_unsigned_integer (valaddr, TYPE_LENGTH (type)),
stream, demangle);
break;
}
diff --git a/gdb/lin-lwp.c b/gdb/lin-lwp.c
index c36394e87f3..a82adb7ea2a 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"
@@ -36,6 +40,8 @@
static int debug_lin_lwp;
extern char *strsignal (int sig);
+#include "linux-nat.h"
+
/* On GNU/Linux there are no real LWP's. The closest thing to LWP's
are processes sharing the same VM space. A multi-threaded process
is basically a group of such processes. However, such a grouping
@@ -69,43 +75,6 @@ extern char *strsignal (int sig);
threads will run out of processes, even if the threads exit,
because the "zombies" stay around. */
-/* Structure describing a LWP. */
-struct lwp_info
-{
- /* The process id of the LWP. This is a combination of the LWP id
- and overall process id. */
- ptid_t ptid;
-
- /* Non-zero if this LWP is cloned. In this context "cloned" means
- that the LWP is reporting to its parent using a signal other than
- SIGCHLD. */
- int cloned;
-
- /* Non-zero if we sent this LWP a SIGSTOP (but the LWP didn't report
- it back yet). */
- int signalled;
-
- /* Non-zero if this LWP is stopped. */
- int stopped;
-
- /* Non-zero if this LWP will be/has been resumed. Note that an LWP
- can be marked both as stopped and resumed at the same time. This
- happens if we try to resume an LWP that has a wait status
- pending. We shouldn't let the LWP run until that wait status has
- been processed, but we should not report that wait status if GDB
- didn't try to let the LWP run. */
- int resumed;
-
- /* If non-zero, a pending wait status. */
- int status;
-
- /* Non-zero if we were stepping this LWP. */
- int step;
-
- /* Next LWP in list. */
- struct lwp_info *next;
-};
-
/* List of known LWPs. */
static struct lwp_info *lwp_list;
@@ -156,6 +125,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. */
@@ -293,46 +263,6 @@ iterate_over_lwps (int (*callback) (struct lwp_info *, void *), void *data)
}
-/* Implementation of the PREPARE_TO_PROCEED hook for the GNU/Linux LWP
- layer.
-
- 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
-lin_lwp_prepare_to_proceed (void)
-{
- if (!ptid_equal (trap_ptid, null_ptid)
- && !ptid_equal (inferior_ptid, trap_ptid))
- {
- /* Switched over from TRAP_PID. */
- CORE_ADDR stop_pc = read_pc ();
- CORE_ADDR trap_pc;
-
- /* Avoid switching where it wouldn't do any good, i.e. if both
- threads are at the same breakpoint. */
- trap_pc = read_pc_pid (trap_ptid);
- if (trap_pc != stop_pc && breakpoint_here_p (trap_pc))
- {
- /* User hasn't deleted the breakpoint. Return non-zero, and
- switch back to TRAP_PID. */
- inferior_ptid = trap_ptid;
-
- /* FIXME: Is this stuff really necessary? */
- flush_cached_frames ();
- registers_changed ();
-
- return 1;
- }
- }
-
- return 0;
-}
-
-
#if 0
static void
lin_lwp_open (char *args, int from_tty)
@@ -627,6 +557,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 +598,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 +630,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 +658,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 +673,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 +756,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 +807,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;
}
@@ -1027,6 +1034,23 @@ child_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
save_errno = EINTR;
}
+ /* Check for stop events reported by a process we didn't already
+ know about - in this case, anything other than inferior_ptid.
+
+ If we're expecting to receive stopped processes after fork,
+ vfork, and clone events, then we'll just add the new one to
+ our list and go back to waiting for the event to be reported
+ - the stopped process might be returned from waitpid before
+ or after the event is. If we want to handle debugging of
+ CLONE_PTRACE processes we need to do more here, i.e. switch
+ to multi-threaded mode. */
+ if (pid != -1 && WIFSTOPPED (status) && WSTOPSIG (status) == SIGSTOP
+ && pid != GET_PID (inferior_ptid))
+ {
+ pid = -1;
+ save_errno = EINTR;
+ }
+
clear_sigio_trap ();
clear_sigint_trap ();
}
@@ -1049,6 +1073,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)
{
@@ -1171,6 +1214,22 @@ retry:
lp = find_lwp_pid (pid_to_ptid (lwpid));
+ /* Check for stop events reported by a process we didn't
+ already know about - anything not already in our LWP
+ list.
+
+ If we're expecting to receive stopped processes after
+ fork, vfork, and clone events, then we'll just add the
+ new one to our list and go back to waiting for the event
+ to be reported - the stopped process might be returned
+ from waitpid before or after the event is. */
+ if (WIFSTOPPED (status) && !lp)
+ {
+ linux_record_stopped_pid (lwpid);
+ status = 0;
+ continue;
+ }
+
/* Make sure we don't report an event for the exit of an LWP not in
our list, i.e. not part of the current process. This can happen
if we detach from a program we original forked and then it
@@ -1181,6 +1240,13 @@ retry:
continue;
}
+ /* NOTE drow/2003-06-17: This code seems to be meant for debugging
+ CLONE_PTRACE processes which do not use the thread library -
+ otherwise we wouldn't find the new LWP this way. That doesn't
+ currently work, and the following code is currently unreachable
+ due to the two blocks above. If it's fixed some day, this code
+ should be broken out into a function so that we can also pick up
+ LWPs from the new interface. */
if (!lp)
{
lp = add_lwp (BUILD_LWP (lwpid, GET_PID (inferior_ptid)));
@@ -1206,9 +1272,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 +1284,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 1d00d79dc84..0fb4d2eef8f 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -35,6 +35,7 @@
#include "block.h"
#include "objc-lang.h"
#include "cp-support.h"
+#include "linespec.h"
/* Prototypes for local functions. */
@@ -328,8 +329,6 @@ decode_line_1 (char **argptr, int funfirstline, struct symtab *default_symtab,
is_objc_method, paren_pointer, file_symtab);
}
-
-
/* Now, the helper functions. */
/* NOTE: carlton/2002-11-04: Some of these have non-obvious side
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
new file mode 100644
index 00000000000..61931c6d58f
--- /dev/null
+++ b/gdb/linux-nat.c
@@ -0,0 +1,219 @@
+/* GNU/Linux native-dependent code common to multiple platforms.
+ Copyright (C) 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 "inferior.h"
+#include "target.h"
+
+#include "gdb_wait.h"
+#include <sys/ptrace.h>
+
+#include "linux-nat.h"
+
+/* If the system headers did not provide the constants, hard-code the normal
+ values. */
+#ifndef PTRACE_EVENT_FORK
+
+#define PTRACE_SETOPTIONS 0x4200
+#define PTRACE_GETEVENTMSG 0x4201
+
+/* options set using PTRACE_SETOPTIONS */
+#define PTRACE_O_TRACESYSGOOD 0x00000001
+#define PTRACE_O_TRACEFORK 0x00000002
+#define PTRACE_O_TRACEVFORK 0x00000004
+#define PTRACE_O_TRACECLONE 0x00000008
+#define PTRACE_O_TRACEEXEC 0x00000010
+
+/* Wait extended result codes for the above trace options. */
+#define PTRACE_EVENT_FORK 1
+#define PTRACE_EVENT_VFORK 2
+#define PTRACE_EVENT_CLONE 3
+#define PTRACE_EVENT_EXEC 4
+
+#endif /* PTRACE_EVENT_FORK */
+
+/* We can't always assume that this flag is available, but all systems
+ with the ptrace event handlers also have __WALL, so it's safe to use
+ here. */
+#ifndef __WALL
+#define __WALL 0x40000000 /* Wait for any child. */
+#endif
+
+struct simple_pid_list
+{
+ int pid;
+ struct simple_pid_list *next;
+};
+struct simple_pid_list *stopped_pids;
+
+/* This variable is a tri-state flag: -1 for unknown, 0 if PTRACE_O_TRACEFORK
+ can not be used, 1 if it can. */
+
+static int linux_supports_tracefork_flag = -1;
+
+
+/* Trivial list manipulation functions to keep track of a list of
+ new stopped processes. */
+static void
+add_to_pid_list (struct simple_pid_list **listp, int pid)
+{
+ struct simple_pid_list *new_pid = xmalloc (sizeof (struct simple_pid_list));
+ new_pid->pid = pid;
+ new_pid->next = *listp;
+ *listp = new_pid;
+}
+
+static int
+pull_pid_from_list (struct simple_pid_list **listp, int pid)
+{
+ struct simple_pid_list **p;
+
+ for (p = listp; *p != NULL; p = &(*p)->next)
+ if ((*p)->pid == pid)
+ {
+ struct simple_pid_list *next = (*p)->next;
+ xfree (*p);
+ *p = next;
+ return 1;
+ }
+ return 0;
+}
+
+void
+linux_record_stopped_pid (int pid)
+{
+ add_to_pid_list (&stopped_pids, pid);
+}
+
+
+/* A helper function for linux_test_for_tracefork, called after fork (). */
+
+static void
+linux_tracefork_child (void)
+{
+ int ret;
+
+ ptrace (PTRACE_TRACEME, 0, 0, 0);
+ kill (getpid (), SIGSTOP);
+ fork ();
+ exit (0);
+}
+
+/* Determine if PTRACE_O_TRACEFORK can be used to follow fork events. We
+ create a child process, attach to it, use PTRACE_SETOPTIONS to enable
+ fork tracing, and let it fork. If the process exits, we assume that
+ we can't use TRACEFORK; if we get the fork notification, and we can
+ extract the new child's PID, then we assume that we can. */
+
+static void
+linux_test_for_tracefork (void)
+{
+ int child_pid, ret, status;
+ long second_pid;
+
+ child_pid = fork ();
+ if (child_pid == -1)
+ perror_with_name ("linux_test_for_tracefork: fork");
+
+ if (child_pid == 0)
+ linux_tracefork_child ();
+
+ ret = waitpid (child_pid, &status, 0);
+ if (ret == -1)
+ perror_with_name ("linux_test_for_tracefork: waitpid");
+ else if (ret != child_pid)
+ error ("linux_test_for_tracefork: waitpid: unexpected result %d.", ret);
+ if (! WIFSTOPPED (status))
+ error ("linux_test_for_tracefork: waitpid: unexpected status %d.", status);
+
+ linux_supports_tracefork_flag = 0;
+
+ ret = ptrace (PTRACE_SETOPTIONS, child_pid, 0, PTRACE_O_TRACEFORK);
+ if (ret != 0)
+ {
+ ptrace (PTRACE_KILL, child_pid, 0, 0);
+ waitpid (child_pid, &status, 0);
+ return;
+ }
+
+ ptrace (PTRACE_CONT, child_pid, 0, 0);
+ ret = waitpid (child_pid, &status, 0);
+ if (ret == child_pid && WIFSTOPPED (status)
+ && status >> 16 == PTRACE_EVENT_FORK)
+ {
+ second_pid = 0;
+ ret = ptrace (PTRACE_GETEVENTMSG, child_pid, 0, &second_pid);
+ if (ret == 0 && second_pid != 0)
+ {
+ int second_status;
+
+ linux_supports_tracefork_flag = 1;
+ waitpid (second_pid, &second_status, 0);
+ ptrace (PTRACE_DETACH, second_pid, 0, 0);
+ }
+ }
+
+ if (WIFSTOPPED (status))
+ {
+ ptrace (PTRACE_DETACH, child_pid, 0, 0);
+ waitpid (child_pid, &status, 0);
+ }
+}
+
+/* Return non-zero iff we have tracefork functionality available.
+ This function also sets linux_supports_tracefork_flag. */
+
+static int
+linux_supports_tracefork (void)
+{
+ if (linux_supports_tracefork_flag == -1)
+ linux_test_for_tracefork ();
+ return linux_supports_tracefork_flag;
+}
+
+
+int
+child_insert_fork_catchpoint (int pid)
+{
+ if (linux_supports_tracefork ())
+ error ("Fork catchpoints have not been implemented yet.");
+ else
+ error ("Your system does not support fork catchpoints.");
+}
+
+int
+child_insert_vfork_catchpoint (int pid)
+{
+ if (linux_supports_tracefork ())
+ error ("Vfork catchpoints have not been implemented yet.");
+ else
+ error ("Your system does not support vfork catchpoints.");
+}
+
+int
+child_insert_exec_catchpoint (int pid)
+{
+ if (linux_supports_tracefork ())
+ error ("Exec catchpoints have not been implemented yet.");
+ else
+ error ("Your system does not support exec catchpoints.");
+}
+
+
diff --git a/gdb/linux-nat.h b/gdb/linux-nat.h
new file mode 100644
index 00000000000..b0d96002b55
--- /dev/null
+++ b/gdb/linux-nat.h
@@ -0,0 +1,73 @@
+/* Native debugging support for GNU/Linux (LWP layer).
+ Copyright 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. */
+
+/* Structure describing an LWP. */
+
+struct lwp_info
+{
+ /* The process id of the LWP. This is a combination of the LWP id
+ and overall process id. */
+ ptid_t ptid;
+
+ /* Non-zero if this LWP is cloned. In this context "cloned" means
+ that the LWP is reporting to its parent using a signal other than
+ SIGCHLD. */
+ int cloned;
+
+ /* Non-zero if we sent this LWP a SIGSTOP (but the LWP didn't report
+ it back yet). */
+ int signalled;
+
+ /* Non-zero if this LWP is stopped. */
+ int stopped;
+
+ /* Non-zero if this LWP will be/has been resumed. Note that an LWP
+ can be marked both as stopped and resumed at the same time. This
+ happens if we try to resume an LWP that has a wait status
+ pending. We shouldn't let the LWP run until that wait status has
+ been processed, but we should not report that wait status if GDB
+ didn't try to let the LWP run. */
+ int resumed;
+
+ /* If non-zero, a pending wait status. */
+ int status;
+
+ /* Non-zero if we were stepping this LWP. */
+ int step;
+
+ /* Next LWP in list. */
+ struct lwp_info *next;
+};
+
+/* Read/write to target memory via the Linux kernel's "proc file
+ system". */
+struct mem_attrib;
+struct target_ops;
+
+extern int linux_proc_xfer_memory (CORE_ADDR addr, char *myaddr, int len,
+ int write, struct mem_attrib *attrib,
+ struct target_ops *target);
+
+extern void linux_record_stopped_pid (int pid);
+
+/* Iterator function for lin-lwp's lwp list. */
+struct lwp_info *iterate_over_lwps (int (*callback) (struct lwp_info *,
+ void *),
+ void *data);
diff --git a/gdb/linux-proc.c b/gdb/linux-proc.c
index a9512964dab..e4ea747008b 100644
--- a/gdb/linux-proc.c
+++ b/gdb/linux-proc.c
@@ -35,6 +35,8 @@
#include "cli/cli-decode.h" /* for add_info */
#include "gdb_string.h"
+#include "linux-nat.h"
+
#ifndef O_LARGEFILE
#define O_LARGEFILE 0
#endif
@@ -171,13 +173,13 @@ linux_do_thread_registers (bfd *obfd, ptid_t ptid,
#ifdef FILL_FPXREGSET
gdb_fpxregset_t fpxregs;
#endif
- unsigned long merged_pid = ptid_get_tid (ptid) << 16 | ptid_get_pid (ptid);
+ unsigned long lwp = ptid_get_lwp (ptid);
fill_gregset (&gregs, -1);
note_data = (char *) elfcore_write_prstatus (obfd,
note_data,
note_size,
- merged_pid,
+ lwp,
stop_signal, &gregs);
fill_fpregset (&fpregs, -1);
@@ -210,7 +212,7 @@ struct linux_corefile_thread_data
*/
static int
-linux_corefile_thread_callback (struct thread_info *ti, void *data)
+linux_corefile_thread_callback (struct lwp_info *ti, void *data)
{
struct linux_corefile_thread_data *args = data;
ptid_t saved_ptid = inferior_ptid;
@@ -268,7 +270,7 @@ linux_make_note_section (bfd *obfd, int *note_size)
thread_args.note_data = note_data;
thread_args.note_size = note_size;
thread_args.num_notes = 0;
- iterate_over_threads (linux_corefile_thread_callback, &thread_args);
+ iterate_over_lwps (linux_corefile_thread_callback, &thread_args);
if (thread_args.num_notes == 0)
{
/* iterate_over_threads didn't come up with any threads;
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index 5d6e51e756b..f0f4ea59666 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -419,12 +419,6 @@ m68hc11_frame_args_address (struct frame_info *frame)
return addr;
}
-static CORE_ADDR
-m68hc11_frame_locals_address (struct frame_info *frame)
-{
- return get_frame_base (frame);
-}
-
/* Discard from the stack the innermost frame, restoring all saved
registers. */
@@ -1057,7 +1051,7 @@ m68hc11_push_arguments (int nargs,
/* Return a location where we can set a breakpoint that will be hit
when an inferior function call returns. */
-CORE_ADDR
+static CORE_ADDR
m68hc11_call_dummy_address (void)
{
return entry_point_address ();
@@ -1171,8 +1165,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)
@@ -1358,6 +1352,9 @@ m68hc11_gdbarch_init (struct gdbarch_info info,
set_gdbarch_ptr_bit (gdbarch, 16);
set_gdbarch_long_long_bit (gdbarch, 64);
+ /* Characters are unsigned. */
+ set_gdbarch_char_signed (gdbarch, 0);
+
/* Set register info. */
set_gdbarch_fp0_regnum (gdbarch, -1);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, 2);
@@ -1365,17 +1362,15 @@ m68hc11_gdbarch_init (struct gdbarch_info info,
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, m68hc11_frame_init_saved_regs);
set_gdbarch_frame_args_skip (gdbarch, 0);
- set_gdbarch_read_pc (gdbarch, generic_target_read_pc);
set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
- set_gdbarch_read_sp (gdbarch, generic_target_read_sp);
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
set_gdbarch_sp_regnum (gdbarch, HARD_SP_REGNUM);
set_gdbarch_deprecated_fp_regnum (gdbarch, SOFT_FP_REGNUM);
set_gdbarch_register_name (gdbarch, m68hc11_register_name);
set_gdbarch_deprecated_register_size (gdbarch, 2);
set_gdbarch_deprecated_register_bytes (gdbarch, M68HC11_ALL_REGS * 2);
- set_gdbarch_register_virtual_type (gdbarch, m68hc11_register_virtual_type);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, m68hc11_register_virtual_type);
set_gdbarch_pseudo_register_read (gdbarch, m68hc11_pseudo_register_read);
set_gdbarch_pseudo_register_write (gdbarch, m68hc11_pseudo_register_write);
@@ -1391,15 +1386,11 @@ 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);
- set_gdbarch_frame_args_address (gdbarch, m68hc11_frame_args_address);
- set_gdbarch_frame_locals_address (gdbarch, m68hc11_frame_locals_address);
+ set_gdbarch_deprecated_frame_args_address (gdbarch, m68hc11_frame_args_address);
set_gdbarch_deprecated_saved_pc_after_call (gdbarch, m68hc11_saved_pc_after_call);
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
set_gdbarch_deprecated_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
@@ -1431,6 +1422,8 @@ m68hc11_gdbarch_init (struct gdbarch_info info,
return gdbarch;
}
+extern initialize_file_ftype _initialize_m68hc11_tdep; /* -Wmissing-prototypes */
+
void
_initialize_m68hc11_tdep (void)
{
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index 087d0bb2633..c8158c4261c 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -77,13 +77,13 @@
#endif
-void m68k_frame_init_saved_regs (struct frame_info *frame_info);
+static void m68k_frame_init_saved_regs (struct frame_info *frame_info);
/* gdbarch_breakpoint_from_pc is set to m68k_local_breakpoint_from_pc
so m68k_remote_breakpoint_from_pc is currently not used. */
-const static unsigned char *
+static const unsigned char *
m68k_remote_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
{
static unsigned char break_insn[] = {0x4e, (0x40 | REMOTE_BPT_VECTOR)};
@@ -91,7 +91,7 @@ m68k_remote_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
return break_insn;
}
-const static unsigned char *
+static const unsigned char *
m68k_local_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
{
static unsigned char break_insn[] = {0x4e, (0x40 | BPT_VECTOR)};
@@ -110,13 +110,11 @@ m68k_register_bytes_ok (long numbytes)
/* Number of bytes of storage in the actual machine representation
for register regnum. On the 68000, all regs are 4 bytes
except the floating point regs which are 12 bytes. */
-/* Note that the unsigned cast here forces the result of the
- subtraction to very high positive values if regnum < FP0_REGNUM */
static int
m68k_register_raw_size (int regnum)
{
- return (((unsigned) (regnum) - FP0_REGNUM) < 8 ? 12 : 4);
+ return (regnum >= FP0_REGNUM && regnum < FP0_REGNUM + 8 ? 12 : 4);
}
/* Number of bytes of storage in the program's representation
@@ -126,7 +124,7 @@ m68k_register_raw_size (int regnum)
static int
m68k_register_virtual_size (int regnum)
{
- return (((unsigned) (regnum) - FP0_REGNUM) < 8 ? 12 : 4);
+ return (regnum >= FP0_REGNUM && regnum < FP0_REGNUM + 8 ? 12 : 4);
}
/* Return the GDB type object for the "standard" data type of data in
@@ -178,14 +176,6 @@ m68k_register_name (int regnum)
return register_names[regnum];
}
-/* Stack must be kept short aligned when doing function calls. */
-
-static CORE_ADDR
-m68k_stack_align (CORE_ADDR addr)
-{
- return ((addr + 1) & ~1);
-}
-
/* Index within `registers' of the first byte of the space for
register regnum. */
@@ -296,28 +286,6 @@ m68k_frame_saved_pc (struct frame_info *frame)
}
-/* The only reason this is here is the tm-altos.h reference below. It
- was moved back here from tm-m68k.h. FIXME? */
-
-extern CORE_ADDR
-altos_skip_prologue (CORE_ADDR pc)
-{
- register int op = read_memory_unsigned_integer (pc, 2);
- if (op == P_LINKW_FP)
- pc += 4; /* Skip link #word */
- else if (op == P_LINKL_FP)
- pc += 6; /* Skip link #long */
- /* Not sure why branches are here. */
- /* From tm-altos.h */
- else if (op == 0060000)
- pc += 4; /* Skip bra #word */
- else if (op == 00600377)
- pc += 6; /* skip bra #long */
- else if ((op & 0177400) == 0060000)
- pc += 2; /* skip bra #char */
- return pc;
-}
-
int
delta68_in_sigtramp (CORE_ADDR pc, char *name)
{
@@ -353,31 +321,6 @@ delta68_frame_saved_pc (struct frame_info *frame_info)
+ 4, 4);
}
-/* Return number of args passed to a frame.
- Can return -1, meaning no way to tell. */
-
-int
-isi_frame_num_args (struct frame_info *fi)
-{
- int val;
- CORE_ADDR pc = DEPRECATED_FRAME_SAVED_PC (fi);
- int insn = read_memory_unsigned_integer (pc, 2);
- val = 0;
- if (insn == 0047757 || insn == 0157374) /* lea W(sp),sp or addaw #W,sp */
- val = read_memory_integer (pc + 2, 2);
- else if ((insn & 0170777) == 0050217 /* addql #N, sp */
- || (insn & 0170777) == 0050117) /* addqw */
- {
- val = (insn >> 9) & 7;
- if (val == 0)
- val = 8;
- }
- else if (insn == 0157774) /* addal #WW, sp */
- val = read_memory_integer (pc + 2, 4);
- val >>= 2;
- return val;
-}
-
int
delta68_frame_num_args (struct frame_info *fi)
{
@@ -400,33 +343,11 @@ delta68_frame_num_args (struct frame_info *fi)
return val;
}
-int
-news_frame_num_args (struct frame_info *fi)
-{
- int val;
- CORE_ADDR pc = DEPRECATED_FRAME_SAVED_PC (fi);
- int insn = read_memory_unsigned_integer (pc, 2);
- val = 0;
- if (insn == 0047757 || insn == 0157374) /* lea W(sp),sp or addaw #W,sp */
- val = read_memory_integer (pc + 2, 2);
- else if ((insn & 0170777) == 0050217 /* addql #N, sp */
- || (insn & 0170777) == 0050117) /* addqw */
- {
- val = (insn >> 9) & 7;
- if (val == 0)
- val = 8;
- }
- else if (insn == 0157774) /* addal #WW, sp */
- val = read_memory_integer (pc + 2, 4);
- val >>= 2;
- return val;
-}
-
/* Insert the specified number of args and function address
into a call sequence of the above form stored at DUMMYNAME.
We use the BFD routines to store a big-endian value of known size. */
-void
+static void
m68k_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
struct value **args, struct type *type, int gcc_p)
{
@@ -438,7 +359,7 @@ m68k_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
/* Push an empty stack frame, to record the current PC, etc. */
-void
+static void
m68k_push_dummy_frame (void)
{
register CORE_ADDR sp = read_register (SP_REGNUM);
@@ -468,7 +389,7 @@ m68k_push_dummy_frame (void)
/* Discard from the stack the innermost frame,
restoring all saved registers. */
-void
+static void
m68k_pop_frame (void)
{
register struct frame_info *frame = get_current_frame ();
@@ -539,7 +460,7 @@ m68k_pop_frame (void)
*/
-CORE_ADDR
+static CORE_ADDR
m68k_skip_prologue (CORE_ADDR ip)
{
register CORE_ADDR limit;
@@ -580,7 +501,7 @@ m68k_skip_prologue (CORE_ADDR ip)
ways in the stack frame. sp is even more special:
the address we return for it IS the sp for the next frame. */
-void
+static void
m68k_frame_init_saved_regs (struct frame_info *frame_info)
{
register int regnum;
@@ -905,17 +826,19 @@ fill_fpregset (fpregset_t *fpregsetp, int regno)
we extract the pc (JB_PC) that we will land at. The pc is copied into PC.
This routine returns true on success. */
-/* NOTE: cagney/2000-11-08: For this function to be fully multi-arched
- the macro's JB_PC and JB_ELEMENT_SIZE would need to be moved into
- the ``struct gdbarch_tdep'' object and then set on a target ISA/ABI
- dependant basis. */
-
int
m68k_get_longjmp_target (CORE_ADDR *pc)
{
-#if defined (JB_PC) && defined (JB_ELEMENT_SIZE)
char *buf;
CORE_ADDR sp, jb_addr;
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+ if (tdep->jb_pc < 0)
+ {
+ internal_error (__FILE__, __LINE__,
+ "m68k_get_longjmp_target: not implemented");
+ return 0;
+ }
buf = alloca (TARGET_PTR_BIT / TARGET_CHAR_BIT);
sp = read_register (SP_REGNUM);
@@ -924,20 +847,14 @@ 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 + JB_PC * JB_ELEMENT_SIZE, buf,
+ 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;
-#else
- internal_error (__FILE__, __LINE__,
- "m68k_get_longjmp_target: not implemented");
- return 0;
-#endif
}
/* Immediately after a function call, return the saved pc before the frame
@@ -945,7 +862,7 @@ m68k_get_longjmp_target (CORE_ADDR *pc)
system call, and if so, we know that Sun pushes the call # on the stack
prior to doing the trap. */
-CORE_ADDR
+static CORE_ADDR
m68k_saved_pc_after_call (struct frame_info *frame)
{
#ifdef SYSCALL_TRAP
@@ -979,11 +896,8 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
if (arches != NULL)
return (arches->gdbarch);
-#if 0
- tdep = (struct gdbarch_tdep *) xmalloc (sizeof (struct gdbarch_tdep));
-#endif
-
- gdbarch = gdbarch_alloc (&info, 0);
+ tdep = xmalloc (sizeof (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()). */
@@ -1000,8 +914,7 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Stack grows down. */
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
- set_gdbarch_stack_align (gdbarch, m68k_stack_align);
- set_gdbarch_deprecated_extra_stack_alignment_needed (gdbarch, 1);
+ set_gdbarch_parm_boundary (gdbarch, 32);
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
set_gdbarch_decr_pc_after_break (gdbarch, 2);
@@ -1016,18 +929,16 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, m68k_frame_init_saved_regs);
set_gdbarch_frameless_function_invocation (gdbarch,
m68k_frameless_function_invocation);
- /* OK to default this value to 'unknown'. */
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
set_gdbarch_frame_args_skip (gdbarch, 8);
- set_gdbarch_register_raw_size (gdbarch, m68k_register_raw_size);
- set_gdbarch_register_virtual_size (gdbarch, m68k_register_virtual_size);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, m68k_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, m68k_register_virtual_size);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, 12);
set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 12);
- set_gdbarch_register_virtual_type (gdbarch, m68k_register_virtual_type);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, m68k_register_virtual_type);
set_gdbarch_register_name (gdbarch, m68k_register_name);
set_gdbarch_deprecated_register_size (gdbarch, 4);
- set_gdbarch_register_byte (gdbarch, m68k_register_byte);
+ set_gdbarch_deprecated_register_byte (gdbarch, m68k_register_byte);
set_gdbarch_num_regs (gdbarch, 29);
set_gdbarch_register_bytes_ok (gdbarch, m68k_register_bytes_ok);
set_gdbarch_deprecated_register_bytes (gdbarch, (16 * 4 + 8 + 8 * 12 + 3 * 4));
@@ -1051,11 +962,27 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_pop_frame (gdbarch, m68k_pop_frame);
/* Should be using push_dummy_call. */
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_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;
+#else
+ tdep->jb_pc = -1;
+#endif
/* Hook in ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch);
+ /* Now we have tuned the configuration, set a few final things,
+ based on what the OS ABI has told us. */
+
+ if (tdep->jb_pc >= 0)
+ set_gdbarch_get_longjmp_target (gdbarch, m68k_get_longjmp_target);
+
return gdbarch;
}
@@ -1063,12 +990,16 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
static void
m68k_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ if (tdep == NULL)
+ return;
}
+extern initialize_file_ftype _initialize_m68k_tdep; /* -Wmissing-prototypes */
+
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/m68k-tdep.h b/gdb/m68k-tdep.h
index 8da568e6e27..7c499a73ca9 100644
--- a/gdb/m68k-tdep.h
+++ b/gdb/m68k-tdep.h
@@ -1,5 +1,5 @@
/* Common target dependent code for the Motorola 68000 series.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001, 2003
Free Software Foundation, Inc.
This file is part of GDB.
@@ -44,4 +44,14 @@ enum
M68K_FPI_REGNUM = 28
};
+/* Target-dependent structure in gdbarch. */
+struct gdbarch_tdep
+{
+ /* Offset to PC value in the jump buffer. If this is negative,
+ longjmp support will be disabled. */
+ int jb_pc;
+ /* The size of each entry in the jump buffer. */
+ size_t jb_elt_size;
+};
+
#endif /* M68K_TDEP_H */
diff --git a/gdb/m68klinux-tdep.c b/gdb/m68klinux-tdep.c
index 8b9193d2cc3..1fa9f749650 100644
--- a/gdb/m68klinux-tdep.c
+++ b/gdb/m68klinux-tdep.c
@@ -27,8 +27,16 @@
#include "gdb_string.h"
#include "gdbtypes.h"
#include "osabi.h"
+#include "regcache.h"
+#include "objfiles.h"
+#include "symtab.h"
#include "m68k-tdep.h"
+/* Offsets (in target ints) into jmp_buf. */
+
+#define M68K_LINUX_JB_ELEMENT_SIZE 4
+#define M68K_LINUX_JB_PC 7
+
/* Check whether insn1 and insn2 are parts of a signal trampoline. */
#define IS_SIGTRAMP(insn1, insn2) \
@@ -47,8 +55,8 @@
of m68k_linux_frame_saved_pc we also distinguish between non-RT and RT
signal trampolines. */
-int
-m68k_linux_in_sigtramp (CORE_ADDR pc)
+static int
+m68k_linux_pc_in_sigtramp (CORE_ADDR pc, char *name)
{
CORE_ADDR sp;
char buf[12];
@@ -110,7 +118,7 @@ m68k_linux_sigtramp_saved_pc (struct frame_info *frame)
/* Don't cause a memory_error when accessing sigcontext in case the
stack layout has changed or the stack is corrupt. */
- if (m68k_linux_in_sigtramp (get_frame_pc (frame)) == 2)
+ if (m68k_linux_pc_in_sigtramp (get_frame_pc (frame), 0) == 2)
target_read_memory (sigcontext_addr + UCONTEXT_PC_OFFSET, buf, ptrbytes);
else
target_read_memory (sigcontext_addr + SIGCONTEXT_PC_OFFSET, buf, ptrbytes);
@@ -141,9 +149,9 @@ m68k_linux_extract_return_value (struct type *type, char *regbuf, char *valbuf)
{
if (TYPE_CODE (type) == TYPE_CODE_FLT)
{
- REGISTER_CONVERT_TO_VIRTUAL (FP0_REGNUM, type,
- regbuf + REGISTER_BYTE (FP0_REGNUM),
- valbuf);
+ DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (FP0_REGNUM, type,
+ regbuf + REGISTER_BYTE (FP0_REGNUM),
+ valbuf);
}
else if (TYPE_CODE (type) == TYPE_CODE_PTR)
memcpy (valbuf, regbuf + REGISTER_BYTE (M68K_A0_REGNUM),
@@ -163,7 +171,7 @@ m68k_linux_store_return_value (struct type *type, char *valbuf)
if (TYPE_CODE (type) == TYPE_CODE_FLT)
{
char raw_buffer[REGISTER_RAW_SIZE (FP0_REGNUM)];
- REGISTER_CONVERT_TO_RAW (type, FP0_REGNUM, valbuf, raw_buffer);
+ DEPRECATED_REGISTER_CONVERT_TO_RAW (type, FP0_REGNUM, valbuf, raw_buffer);
deprecated_write_register_bytes (REGISTER_BYTE (FP0_REGNUM),
raw_buffer, TYPE_LENGTH (type));
}
@@ -189,6 +197,11 @@ m68k_linux_extract_struct_value_address (char *regbuf)
static void
m68k_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ tdep->jb_pc = M68K_LINUX_JB_PC;
+ tdep->jb_elt_size = M68K_LINUX_JB_ELEMENT_SIZE;
+
set_gdbarch_deprecated_frame_saved_pc (gdbarch,
m68k_linux_frame_saved_pc);
set_gdbarch_deprecated_extract_return_value (gdbarch,
@@ -197,6 +210,12 @@ m68k_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
m68k_linux_store_return_value);
set_gdbarch_deprecated_extract_struct_value_address (gdbarch,
m68k_linux_extract_struct_value_address);
+
+ set_gdbarch_pc_in_sigtramp (gdbarch, m68k_linux_pc_in_sigtramp);
+
+ /* 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/macrocmd.c b/gdb/macrocmd.c
index 02f44fce4cd..7c2ebbea749 100644
--- a/gdb/macrocmd.c
+++ b/gdb/macrocmd.c
@@ -222,6 +222,8 @@ macro_list_command (char *exp, int from_tty)
/* Initializing the `macrocmd' module. */
+extern initialize_file_ftype _initialize_macrocmd; /* -Wmissing-prototypes */
+
void
_initialize_macrocmd (void)
{
diff --git a/gdb/macrotab.c b/gdb/macrotab.c
index 1432847a8e6..4f0761d7dec 100644
--- a/gdb/macrotab.c
+++ b/gdb/macrotab.c
@@ -123,7 +123,7 @@ macro_bcache_str (struct macro_table *t, const char *s)
/* Free a possibly bcached object OBJ. That is, if the macro table T
has a bcache, it's an error; otherwise, xfree OBJ. */
-void
+static void
macro_bcache_free (struct macro_table *t, void *obj)
{
gdb_assert (! t->bcache);
diff --git a/gdb/main.c b/gdb/main.c
index fd25750b94e..5a06017ac88 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -73,10 +73,10 @@ struct ui_file *gdb_stdout;
struct ui_file *gdb_stderr;
struct ui_file *gdb_stdlog;
struct ui_file *gdb_stdtarg;
-
-/* Used to initialize error() - defined in utils.c */
-
-extern void error_init (void);
+struct ui_file *gdb_stdin;
+/* target IO streams */
+struct ui_file *gdb_stdtargin;
+struct ui_file *gdb_stdtargerr;
/* Whether to enable writing into executable and core files */
extern int write_files;
@@ -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)
@@ -193,6 +197,9 @@ captured_main (void *data)
gdb_stderr = stdio_fileopen (stderr);
gdb_stdlog = gdb_stderr; /* for moment */
gdb_stdtarg = gdb_stderr; /* for moment */
+ gdb_stdin = stdio_fileopen (stdin);
+ gdb_stdtargerr = gdb_stderr; /* for moment */
+ gdb_stdtargin = gdb_stdin; /* for moment */
/* initialize error() */
error_init ();
diff --git a/gdb/maint.c b/gdb/maint.c
index aa342390765..b55cb67b4e3 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -407,7 +407,7 @@ maintenance_print_statistics (char *args, int from_tty)
print_symbol_bcache_statistics ();
}
-void
+static void
maintenance_print_architecture (char *args, int from_tty)
{
if (args == NULL)
diff --git a/gdb/mcore-tdep.c b/gdb/mcore-tdep.c
index ea97ec297e4..3c4e7e7d97c 100644
--- a/gdb/mcore-tdep.c
+++ b/gdb/mcore-tdep.c
@@ -30,51 +30,10 @@
#include "gdb_string.h"
#include "disasm.h"
-/* Functions declared and used only in this file */
-
-static CORE_ADDR mcore_analyze_prologue (struct frame_info *fi, CORE_ADDR pc, int skip_prologue);
-
-static struct frame_info *analyze_dummy_frame (CORE_ADDR pc, CORE_ADDR frame);
-
+static CORE_ADDR mcore_analyze_prologue (struct frame_info *fi, CORE_ADDR pc,
+ int skip_prologue);
static int get_insn (CORE_ADDR pc);
-/* Functions exported from this file */
-
-int mcore_use_struct_convention (int gcc_p, struct type *type);
-
-void _initialize_mcore (void);
-
-void mcore_init_extra_frame_info (int fromleaf, struct frame_info *fi);
-
-CORE_ADDR mcore_frame_saved_pc (struct frame_info *fi);
-
-CORE_ADDR mcore_find_callers_reg (struct frame_info *fi, int regnum);
-
-CORE_ADDR mcore_frame_args_address (struct frame_info *fi);
-
-CORE_ADDR mcore_frame_locals_address (struct frame_info *fi);
-
-CORE_ADDR mcore_push_return_address (CORE_ADDR pc, CORE_ADDR sp);
-
-CORE_ADDR mcore_push_arguments (int nargs, struct value ** args, CORE_ADDR sp,
- int struct_return, CORE_ADDR struct_addr);
-
-void mcore_pop_frame ();
-
-CORE_ADDR mcore_skip_prologue (CORE_ADDR pc);
-
-CORE_ADDR mcore_frame_chain (struct frame_info *fi);
-
-const unsigned char *mcore_breakpoint_from_pc (CORE_ADDR * bp_addr, int *bp_size);
-
-int mcore_use_struct_convention (int gcc_p, struct type *type);
-
-void mcore_store_return_value (struct type *type, char *valbuf);
-
-CORE_ADDR mcore_extract_struct_value_address (char *regbuf);
-
-void mcore_extract_return_value (struct type *type, char *regbuf, char *valbuf);
-
#ifdef MCORE_DEBUG
int mcore_debug = 0;
#endif
@@ -243,7 +202,7 @@ mcore_register_name (int regnum)
instructions are 16 bits, this is all we need, regardless of
address. bpkt = 0x0000 */
-const unsigned char *
+static const unsigned char *
mcore_breakpoint_from_pc (CORE_ADDR * bp_addr, int *bp_size)
{
static char breakpoint[] =
@@ -647,7 +606,7 @@ mcore_analyze_prologue (struct frame_info *fi, CORE_ADDR pc, int skip_prologue)
then DEPRECATED_INIT_EXTRA_FRAME_INFO and DEPRECATED_INIT_FRAME_PC
will be called for the new frame. */
-CORE_ADDR
+static CORE_ADDR
mcore_frame_chain (struct frame_info * fi)
{
struct frame_info *dummy;
@@ -705,7 +664,7 @@ mcore_frame_chain (struct frame_info * fi)
/* Skip the prologue of the function at PC. */
-CORE_ADDR
+static CORE_ADDR
mcore_skip_prologue (CORE_ADDR pc)
{
CORE_ADDR func_addr, func_end;
@@ -725,13 +684,13 @@ mcore_skip_prologue (CORE_ADDR pc)
}
/* Return the address at which function arguments are offset. */
-CORE_ADDR
+static CORE_ADDR
mcore_frame_args_address (struct frame_info * fi)
{
return get_frame_base (fi) - get_frame_extra_info (fi)->framesize;
}
-CORE_ADDR
+static CORE_ADDR
mcore_frame_locals_address (struct frame_info * fi)
{
return get_frame_base (fi) - get_frame_extra_info (fi)->framesize;
@@ -739,7 +698,7 @@ mcore_frame_locals_address (struct frame_info * fi)
/* Return the frame pointer in use at address PC. */
-void
+static void
mcore_virtual_frame_pointer (CORE_ADDR pc, int *reg, LONGEST *offset)
{
struct frame_info *dummy = analyze_dummy_frame (pc, 0);
@@ -757,7 +716,7 @@ mcore_virtual_frame_pointer (CORE_ADDR pc, int *reg, LONGEST *offset)
/* Find the value of register REGNUM in frame FI. */
-CORE_ADDR
+static CORE_ADDR
mcore_find_callers_reg (struct frame_info *fi, int regnum)
{
for (; fi != NULL; fi = get_next_frame (fi))
@@ -776,7 +735,7 @@ mcore_find_callers_reg (struct frame_info *fi, int regnum)
/* Find the saved pc in frame FI. */
-CORE_ADDR
+static CORE_ADDR
mcore_frame_saved_pc (struct frame_info * fi)
{
@@ -793,7 +752,7 @@ mcore_frame_saved_pc (struct frame_info * fi)
/* This routine gets called when either the user uses the "return"
command, or the call dummy breakpoint gets hit. */
-void
+static void
mcore_pop_frame (void)
{
int rn;
@@ -843,7 +802,7 @@ mcore_pop_frame (void)
FIRST_ARGREG, since the MCORE treats struct returns (of less than eight
bytes) as hidden first arguments. */
-CORE_ADDR
+static CORE_ADDR
mcore_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
{
@@ -953,7 +912,7 @@ mcore_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
opted to use generic call dummies, so we simply store the
CALL_DUMMY_ADDRESS into the PR register (r15). */
-CORE_ADDR
+static CORE_ADDR
mcore_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
{
write_register (PR_REGNUM, CALL_DUMMY_ADDRESS ());
@@ -979,7 +938,7 @@ mcore_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
EXTRACT_RETURN_VALUE? GCC_P is true if compiled with gcc
and TYPE is the type (which is known to be struct, union or array). */
-int
+static int
mcore_use_struct_convention (int gcc_p, struct type *type)
{
return (TYPE_LENGTH (type) > 8);
@@ -989,17 +948,17 @@ mcore_use_struct_convention (int gcc_p, struct type *type)
this buffer was passed as a hidden first argument, so
just return that address. */
-CORE_ADDR
+static 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
the function's return value and place the result into VALBUF.
REGBUF is the register contents of the target. */
-void
+static void
mcore_extract_return_value (struct type *type, char *regbuf, char *valbuf)
{
/* Copy the return value (starting) in RETVAL_REGNUM to VALBUF. */
@@ -1019,7 +978,7 @@ mcore_extract_return_value (struct type *type, char *regbuf, char *valbuf)
significant word) and r3 (least significant word, left justified).
Note that this includes structures of less than eight bytes, too. */
-void
+static void
mcore_store_return_value (struct type *type, char *valbuf)
{
int value_size;
@@ -1045,7 +1004,7 @@ mcore_store_return_value (struct type *type, char *valbuf)
This includes allocating space for saved registers and analyzing
the prologue of this frame. */
-void
+static void
mcore_init_extra_frame_info (int fromleaf, struct frame_info *fi)
{
if (fi && get_next_frame (fi))
@@ -1106,10 +1065,10 @@ mcore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_max_register_raw_size (gdbarch, MCORE_REG_SIZE);
set_gdbarch_deprecated_max_register_virtual_size (gdbarch, MCORE_REG_SIZE);
set_gdbarch_register_name (gdbarch, mcore_register_name);
- set_gdbarch_register_virtual_type (gdbarch, mcore_register_virtual_type);
- set_gdbarch_register_virtual_size (gdbarch, mcore_register_size);
- set_gdbarch_register_raw_size (gdbarch, mcore_register_size);
- set_gdbarch_register_byte (gdbarch, mcore_register_byte);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, mcore_register_virtual_type);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, mcore_register_size);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, mcore_register_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, mcore_register_byte);
set_gdbarch_deprecated_register_bytes (gdbarch, MCORE_REG_SIZE * MCORE_NUM_REGS);
set_gdbarch_num_regs (gdbarch, MCORE_NUM_REGS);
set_gdbarch_pc_regnum (gdbarch, 64);
@@ -1120,7 +1079,7 @@ mcore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_call_dummy_words (gdbarch, call_dummy_words);
set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, 0);
- set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
+ set_gdbarch_deprecated_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
set_gdbarch_deprecated_saved_pc_after_call (gdbarch, mcore_saved_pc_after_call);
set_gdbarch_function_start_offset (gdbarch, 0);
set_gdbarch_decr_pc_after_break (gdbarch, 0);
@@ -1142,9 +1101,8 @@ mcore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
mcore_extract_struct_value_address);
set_gdbarch_skip_prologue (gdbarch, mcore_skip_prologue);
set_gdbarch_frame_args_skip (gdbarch, 0);
- set_gdbarch_frame_args_address (gdbarch, mcore_frame_args_address);
- set_gdbarch_frame_locals_address (gdbarch, mcore_frame_locals_address);
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
+ set_gdbarch_deprecated_frame_args_address (gdbarch, mcore_frame_args_address);
+ set_gdbarch_deprecated_frame_locals_address (gdbarch, mcore_frame_locals_address);
set_gdbarch_deprecated_pop_frame (gdbarch, mcore_pop_frame);
set_gdbarch_virtual_frame_pointer (gdbarch, mcore_virtual_frame_pointer);
@@ -1159,7 +1117,7 @@ mcore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_reg_struct_has_addr (gdbarch, mcore_reg_struct_has_addr);
/* Should be using push_dummy_call. */
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
return gdbarch;
}
@@ -1170,6 +1128,8 @@ mcore_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
}
+extern initialize_file_ftype _initialize_mcore_tdep; /* -Wmissing-prototypes */
+
void
_initialize_mcore_tdep (void)
{
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index 04eefb5f3cb..bc96b24a121 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -285,7 +285,9 @@ static struct symbol *new_symbol (char *);
static struct type *new_type (char *);
-static struct block *new_block (int function);
+enum block_type { FUNCTION_BLOCK, NON_FUNCTION_BLOCK };
+
+static struct block *new_block (enum block_type);
static struct symtab *new_symtab (char *, int, struct objfile *);
@@ -832,7 +834,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
TYPE_FLAGS (SYMBOL_TYPE (s)) |= TYPE_FLAG_PROTOTYPED;
/* Create and enter a new lexical context */
- b = new_block (1);
+ b = new_block (FUNCTION_BLOCK);
SYMBOL_BLOCK_VALUE (s) = b;
BLOCK_FUNCTION (b) = s;
BLOCK_START (b) = BLOCK_END (b) = sh->value;
@@ -1167,7 +1169,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
}
top_stack->blocktype = stBlock;
- b = new_block (0);
+ b = new_block (NON_FUNCTION_BLOCK);
BLOCK_START (b) = sh->value + top_stack->procadr;
BLOCK_SUPERBLOCK (b) = top_stack->cur_block;
top_stack->cur_block = b;
@@ -1236,12 +1238,12 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
TYPE_FIELDS (ftype) = (struct field *)
TYPE_ALLOC (ftype, nparams * sizeof (struct field));
- for (sym = dict_iterator_first (BLOCK_DICT (b), &iter),
- iparams = 0;
- iparams < nparams;
- sym = dict_iterator_next (&iter))
+ iparams = 0;
+ ALL_BLOCK_SYMBOLS (b, iter, sym)
{
- gdb_assert (sym != NULL);
+ if (iparams == nparams)
+ break;
+
switch (SYMBOL_CLASS (sym))
{
case LOC_ARG:
@@ -4059,8 +4061,6 @@ psymtab_to_symtab_1 (struct partial_symtab *pst, char *filename)
int maxlines;
EXTR *ext_ptr;
- /* How many symbols will we need */
- /* FIXME, this does not count enum values. */
if (fh == 0)
{
maxlines = 0;
@@ -4467,9 +4467,6 @@ mylookup_symbol (char *name, register struct block *block,
static void
add_symbol (struct symbol *s, struct block *b)
{
- struct block *newb;
- struct parse_stack *stackp;
-
dict_add_symbol (BLOCK_DICT (b), s);
}
@@ -4592,8 +4589,8 @@ sort_blocks (struct symtab *s)
/* Constructor/restructor/destructor procedures */
-/* Allocate a new symtab for NAME. Needs an estimate of how many symbols
- and linenumbers MAXLINES we'll put in it */
+/* Allocate a new symtab for NAME. Needs an estimate of how many
+ linenumbers MAXLINES we'll put in it */
static struct symtab *
new_symtab (char *name, int maxlines, struct objfile *objfile)
@@ -4606,11 +4603,12 @@ new_symtab (char *name, int maxlines, struct objfile *objfile)
/* All symtabs must have at least two blocks */
BLOCKVECTOR (s) = new_bvect (2);
- global_block = new_block (0);
- static_block = new_block (0);
- BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK) = global_block;
- BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK) = static_block;
- BLOCK_SUPERBLOCK (static_block) = global_block;
+ BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK)
+ = new_block (NON_FUNCTION_BLOCK);
+ BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK)
+ = new_block (NON_FUNCTION_BLOCK);
+ BLOCK_SUPERBLOCK (BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK)) =
+ BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK);
/* FIXME: carlton/2002-09-24: But how do the blocks get freed?
Oy. */
@@ -4700,11 +4698,11 @@ new_bvect (int nblocks)
hashed. */
static struct block *
-new_block (int function)
+new_block (enum block_type type)
{
struct block *retval = xzalloc (sizeof (struct block));
- if (function)
+ if (type == FUNCTION_BLOCK)
BLOCK_DICT (retval) = dict_create_linear_expandable ();
else
BLOCK_DICT (retval) = dict_create_hashed_expandable ();
@@ -4846,7 +4844,7 @@ fixup_sigtramp (void)
TYPE_TARGET_TYPE (SYMBOL_TYPE (s)) = mdebug_type_void;
/* Need a block to allocate MIPS_EFI_SYMBOL_NAME in */
- b = new_block (0);
+ b = new_block (NON_FUNCTION_BLOCK);
SYMBOL_BLOCK_VALUE (s) = b;
BLOCK_START (b) = sigtramp_address;
BLOCK_END (b) = sigtramp_end;
@@ -4888,8 +4886,6 @@ fixup_sigtramp (void)
}
dict_add_symbol (BLOCK_DICT (b), s);
- add_block (b, st);
- sort_blocks (st);
}
#endif /* TM_MIPS_H */
diff --git a/gdb/memattr.c b/gdb/memattr.c
index 05ad413cc0a..4ab5dbf1009 100644
--- a/gdb/memattr.c
+++ b/gdb/memattr.c
@@ -514,6 +514,8 @@ mem_delete_command (char *args, int from_tty)
dont_repeat ();
}
+extern initialize_file_ftype _initialize_mem; /* -Wmissing-prototype */
+
void
_initialize_mem (void)
{
diff --git a/gdb/mi/ChangeLog b/gdb/mi/ChangeLog
index 4451cb89575..2902629a43e 100644
--- a/gdb/mi/ChangeLog
+++ b/gdb/mi/ChangeLog
@@ -1,3 +1,27 @@
+2003-06-17 Daniel Jacobowitz <drow@mvista.com>
+
+ * mi-cmds.c (mi_cmds): Add "-target-disconnect".
+
+2003-06-11 David Carlton <carlton@bactrian.org>
+
+ * mi-cmd-stack.c: Include dictionary.h.
+ (list_args_or_locals): Update use of ALL_BLOCK_SYMBOLS.
+
+2003-06-11 Andrew Cagney <cagney@redhat.com>
+
+ * mi-main.c (get_register): Replace REGISTER_CONVERTIBLE with
+ DEPRECATED_REGISTER_CONVERTIBLE.
+
+2003-06-08 Andrew Cagney <cagney@redhat.com>
+
+ * mi-parse.c (_initialize_mi_parse): Delete function.
+ * mi-main.c: Include "mi-main.h".
+ * mi-interp.c (_initialize_mi_interp): Add declaration.
+ * mi-cmd-stack.c: Include "stack.h".
+ (select_frame_command_wrapper): Delete extern declaration.
+ (mi_cmd_stack_select_frame): Replace select_frame_command_wrapper
+ with select_frame_command.
+
2003-05-16 Andrew Cagney <cagney@redhat.com>
* mi-main.c (mi_setup_architecture_data):
diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c
index b968d845893..6330cda473c 100644
--- a/gdb/mi/mi-cmd-stack.c
+++ b/gdb/mi/mi-cmd-stack.c
@@ -27,13 +27,9 @@
#include "ui-out.h"
#include "symtab.h"
#include "block.h"
+#include "stack.h"
#include "dictionary.h"
-/* FIXME: these should go in some .h file but stack.c doesn't have a
- corresponding .h file. These wrappers will be obsolete anyway, once
- we pull the plug on the sanitization. */
-extern void select_frame_command_wrapper (char *, int);
-
static void list_args_or_locals (int locals, int values, struct frame_info *fi);
/* Print a list of the stack frames. Args can be none, in which case
@@ -219,6 +215,7 @@ list_args_or_locals (int locals, int values, struct frame_info *fi)
struct block *block;
struct symbol *sym;
struct dict_iterator iter;
+ int nsyms;
struct cleanup *cleanup_list;
static struct ui_stream *stb = NULL;
@@ -312,8 +309,8 @@ mi_cmd_stack_select_frame (char *command, char **argv, int argc)
/* with no args, don't change frame */
if (argc == 0)
- select_frame_command_wrapper (0, 1 /* not used */ );
+ select_frame_command (0, 1 /* not used */ );
else
- select_frame_command_wrapper (argv[0], 1 /* not used */ );
+ select_frame_command (argv[0], 1 /* not used */ );
return MI_CMD_DONE;
}
diff --git a/gdb/mi/mi-cmds.c b/gdb/mi/mi-cmds.c
index 9ec174fd854..91824022278 100644
--- a/gdb/mi/mi-cmds.c
+++ b/gdb/mi/mi-cmds.c
@@ -127,6 +127,7 @@ struct mi_cmd mi_cmds[] =
{"target-attach", 0, 0},
{"target-compare-sections", 0, 0},
{"target-detach", "detach", 0},
+ {"target-disconnect", "disconnect", 0},
{"target-download", 0, mi_cmd_target_download},
{"target-exec-status", 0, 0},
{"target-list-available-targets", 0, 0},
diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c
index 87ed17f16c9..696ae06e24c 100644
--- a/gdb/mi/mi-interp.c
+++ b/gdb/mi/mi-interp.c
@@ -393,6 +393,8 @@ mi_input (char *buf)
return gdb_readline (NULL);
}
+extern initialize_file_ftype _initialize_mi_interp; /* -Wmissing-prototypes */
+
void
_initialize_mi_interp (void)
{
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 0e9cb248a10..5e55913fb94 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -41,6 +41,7 @@
#include "regcache.h"
#include "gdb.h"
#include "frame.h"
+#include "mi-main.h"
#include <ctype.h>
#include <sys/time.h>
@@ -535,9 +536,9 @@ get_register (int regnum, int format)
/* Convert raw data to virtual format if necessary. */
- if (REGISTER_CONVERTIBLE (regnum))
+ if (DEPRECATED_REGISTER_CONVERTIBLE (regnum))
{
- REGISTER_CONVERT_TO_VIRTUAL (regnum,
+ DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum,
register_type (current_gdbarch, regnum),
raw_buffer, virtual_buffer);
}
diff --git a/gdb/mi/mi-parse.c b/gdb/mi/mi-parse.c
index caefd5936a5..ebfddc7ff29 100644
--- a/gdb/mi/mi-parse.c
+++ b/gdb/mi/mi-parse.c
@@ -231,8 +231,3 @@ mi_parse (char *cmd)
parse->op = MI_COMMAND;
return parse;
}
-
-void
-_initialize_mi_parse (void)
-{
-}
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..f39179d3a0f 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -42,11 +42,14 @@
#include "osabi.h"
#include "mips-tdep.h"
#include "block.h"
-
+#include "reggroups.h"
#include "opcode/mips.h"
#include "elf/mips.h"
#include "elf-bfd.h"
#include "symcat.h"
+#include "sim-regno.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. */
@@ -150,6 +153,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
@@ -247,6 +271,7 @@ mips_xfer_register (struct regcache *regcache, int reg_num, int length,
{
bfd_byte reg[MAX_REGISTER_SIZE];
int reg_offset = 0;
+ gdb_assert (reg_num >= NUM_REGS);
/* Need to transfer the left or right part of the register, based on
the targets byte order. */
switch (endian)
@@ -275,9 +300,9 @@ mips_xfer_register (struct regcache *regcache, int reg_num, int length,
fprintf_unfiltered (gdb_stdlog, "%02x", out[buf_offset + i]);
}
if (in != NULL)
- regcache_raw_read_part (regcache, reg_num, reg_offset, length, in + buf_offset);
+ regcache_cooked_read_part (regcache, reg_num, reg_offset, length, in + buf_offset);
if (out != NULL)
- regcache_raw_write_part (regcache, reg_num, reg_offset, length, out + buf_offset);
+ regcache_cooked_write_part (regcache, reg_num, reg_offset, length, out + buf_offset);
if (mips_debug && in != NULL)
{
int i;
@@ -350,8 +375,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 +395,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);
@@ -422,21 +442,27 @@ mips_register_name (int regno)
enum mips_abi abi = mips_abi (current_gdbarch);
+ /* Map [NUM_REGS .. 2*NUM_REGS) onto the raw registers, but then
+ don't make the raw register names visible. */
+ int rawnum = regno % NUM_REGS;
+ if (regno < NUM_REGS)
+ return "";
+
/* The MIPS integer registers are always mapped from 0 to 31. The
names of the registers (which reflects the conventions regarding
register use) vary depending on the ABI. */
- if (0 <= regno && regno < 32)
+ if (0 <= rawnum && rawnum < 32)
{
if (abi == MIPS_ABI_N32 || abi == MIPS_ABI_N64)
- return mips_n32_n64_gpr_names[regno];
+ return mips_n32_n64_gpr_names[rawnum];
else
- return mips_gpr_names[regno];
+ return mips_gpr_names[rawnum];
}
- else if (32 <= regno && regno < NUM_REGS)
- return mips_processor_reg_names[regno - 32];
+ else if (32 <= rawnum && rawnum < NUM_REGS)
+ return mips_processor_reg_names[rawnum - 32];
else
internal_error (__FILE__, __LINE__,
- "mips_register_name: bad register number %d", regno);
+ "mips_register_name: bad register number %d", rawnum);
}
/* *INDENT-OFF* */
@@ -506,8 +532,63 @@ struct {
};
/* *INDENT-ON* */
+/* Return the groups that a MIPS register can be categorised into. */
+static int
+mips_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
+ struct reggroup *reggroup)
+{
+ int vector_p;
+ int float_p;
+ int raw_p;
+ int rawnum = regnum % NUM_REGS;
+ int pseudo = regnum / NUM_REGS;
+ if (reggroup == all_reggroup)
+ return pseudo;
+ vector_p = TYPE_VECTOR (register_type (gdbarch, regnum));
+ float_p = TYPE_CODE (register_type (gdbarch, regnum)) == TYPE_CODE_FLT;
+ /* FIXME: cagney/2003-04-13: Can't yet use gdbarch_num_regs
+ (gdbarch), as not all architectures are multi-arch. */
+ raw_p = rawnum < NUM_REGS;
+ if (REGISTER_NAME (regnum) == NULL
+ || REGISTER_NAME (regnum)[0] == '\0')
+ return 0;
+ if (reggroup == float_reggroup)
+ return float_p && pseudo;
+ if (reggroup == vector_reggroup)
+ return vector_p && pseudo;
+ if (reggroup == general_reggroup)
+ return (!vector_p && !float_p) && pseudo;
+ /* Save the pseudo registers. Need to make certain that any code
+ extracting register values from a saved register cache also uses
+ pseudo registers. */
+ if (reggroup == save_reggroup)
+ return raw_p && pseudo;
+ /* Restore the same pseudo register. */
+ if (reggroup == restore_reggroup)
+ return raw_p && pseudo;
+ return 0;
+}
+
+/* Map the symbol table registers which live in the range [1 *
+ NUM_REGS .. 2 * NUM_REGS) back onto the corresponding raw
+ registers. */
+
+static void
+mips_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
+ int cookednum, void *buf)
+{
+ gdb_assert (cookednum >= NUM_REGS && cookednum < 2 * NUM_REGS);
+ return regcache_raw_read (regcache, cookednum % NUM_REGS, buf);
+}
+static void
+mips_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
+ int cookednum, const void *buf)
+{
+ gdb_assert (cookednum >= NUM_REGS && cookednum < 2 * NUM_REGS);
+ return regcache_raw_write (regcache, cookednum % NUM_REGS, buf);
+}
/* Table to translate MIPS16 register field to actual register number. */
static int mips16_to_32_reg[8] =
@@ -557,22 +638,73 @@ mips_print_extra_frame_info (struct frame_info *fi)
/* Number of bytes of storage in the actual machine representation for
register N. NOTE: This indirectly defines the register size
- transfered by the GDB protocol. */
+ transfered by the GDB protocol. */
static int mips64_transfers_32bit_regs_p = 0;
static int
-mips_register_raw_size (int reg_nr)
+mips_register_raw_size (int regnum)
{
- if (mips64_transfers_32bit_regs_p)
- return REGISTER_VIRTUAL_SIZE (reg_nr);
- else if (reg_nr >= FP0_REGNUM && reg_nr < FP0_REGNUM + 32
- && FP_REGISTER_DOUBLE)
- /* For MIPS_ABI_N32 (for example) we need 8 byte floating point
- registers. */
- return 8;
+ gdb_assert (regnum >= 0);
+ if (regnum < NUM_REGS)
+ {
+ /* For compatibility with old code, implemnt the broken register raw
+ size map for the raw registers.
+
+ NOTE: cagney/2003-06-15: This is so bogus. The register's
+ raw size is changing according to the ABI
+ (FP_REGISTER_DOUBLE). Also, GDB's protocol is defined by a
+ combination of REGISTER_RAW_SIZE and REGISTER_BYTE. */
+ if (mips64_transfers_32bit_regs_p)
+ return REGISTER_VIRTUAL_SIZE (regnum);
+ else if (regnum >= FP0_REGNUM && regnum < FP0_REGNUM + 32
+ && FP_REGISTER_DOUBLE)
+ /* For MIPS_ABI_N32 (for example) we need 8 byte floating point
+ registers. */
+ return 8;
+ else
+ return MIPS_REGSIZE;
+ }
+ else if (regnum < 2 * NUM_REGS)
+ {
+ /* For the moment map [NUM_REGS .. 2*NUM_REGS) onto the same raw
+ registers, but always return the virtual size. */
+ int rawnum = regnum % NUM_REGS;
+ return TYPE_LENGTH (MIPS_REGISTER_TYPE (rawnum));
+ }
else
- return MIPS_REGSIZE;
+ internal_error (__FILE__, __LINE__, "Register %d out of range", regnum);
+}
+
+/* Register offset in a buffer for each register.
+
+ FIXME: cagney/2003-06-15: This is so bogus. Instead REGISTER_TYPE
+ should strictly return the layout of the buffer. Unfortunatly
+ remote.c and the MIPS have come to rely on a custom layout that
+ doesn't 1:1 map onto the register type. */
+
+static int
+mips_register_byte (int regnum)
+{
+ gdb_assert (regnum >= 0);
+ if (regnum < NUM_REGS)
+ /* Pick up the relevant per-tm file register byte method. */
+ return MIPS_REGISTER_BYTE (regnum);
+ else if (regnum < 2 * NUM_REGS)
+ {
+ int reg;
+ int byte;
+ /* Start with the end of the raw register buffer - assum that
+ MIPS_REGISTER_BYTE (NUM_REGS) returns that end. */
+ byte = MIPS_REGISTER_BYTE (NUM_REGS);
+ /* Add space for all the proceeding registers based on their
+ real size. */
+ for (reg = NUM_REGS; reg < regnum; reg++)
+ byte += TYPE_LENGTH (MIPS_REGISTER_TYPE ((reg % NUM_REGS)));
+ return byte;
+ }
+ else
+ internal_error (__FILE__, __LINE__, "Register %d out of range", regnum);
}
/* Convert between RAW and VIRTUAL registers. The RAW register size
@@ -603,7 +735,7 @@ mips_register_convert_to_virtual (int n, struct type *virtual_type,
static void
mips_register_convert_to_raw (struct type *virtual_type, int n,
- char *virt_buf, char *raw_buf)
+ const char *virt_buf, char *raw_buf)
{
memset (raw_buf, 0, REGISTER_RAW_SIZE (n));
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
@@ -616,52 +748,46 @@ mips_register_convert_to_raw (struct type *virtual_type, int n,
TYPE_LENGTH (virtual_type));
}
-void
-mips_register_convert_to_type (int regnum, struct type *type, char *buffer)
+static int
+mips_convert_register_p (int regnum, struct type *type)
{
- if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
- && REGISTER_RAW_SIZE (regnum) == 4
- && (regnum) >= FP0_REGNUM && (regnum) < FP0_REGNUM + 32
- && TYPE_CODE(type) == TYPE_CODE_FLT
- && TYPE_LENGTH(type) == 8)
- {
- char temp[4];
- memcpy (temp, ((char *)(buffer))+4, 4);
- memcpy (((char *)(buffer))+4, (buffer), 4);
- memcpy (((char *)(buffer)), temp, 4);
- }
+ return (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
+ && REGISTER_RAW_SIZE (regnum) == 4
+ && (regnum) >= FP0_REGNUM && (regnum) < FP0_REGNUM + 32
+ && TYPE_CODE(type) == TYPE_CODE_FLT
+ && TYPE_LENGTH(type) == 8);
}
-void
-mips_register_convert_from_type (int regnum, struct type *type, char *buffer)
+static void
+mips_register_to_value (struct frame_info *frame, int regnum,
+ struct type *type, void *to)
{
-if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
- && REGISTER_RAW_SIZE (regnum) == 4
- && (regnum) >= FP0_REGNUM && (regnum) < FP0_REGNUM + 32
- && TYPE_CODE(type) == TYPE_CODE_FLT
- && TYPE_LENGTH(type) == 8)
- {
- char temp[4];
- memcpy (temp, ((char *)(buffer))+4, 4);
- memcpy (((char *)(buffer))+4, (buffer), 4);
- memcpy (((char *)(buffer)), temp, 4);
- }
+ frame_read_register (frame, regnum + 0, (char *) to + 4);
+ frame_read_register (frame, regnum + 1, (char *) to + 0);
}
-/* Return the GDB type object for the "standard" data type
- of data in register REG.
-
- Note: kevinb/2002-08-01: The definition below should faithfully
- reproduce the behavior of each of the REGISTER_VIRTUAL_TYPE
- definitions found in config/mips/tm-*.h. I'm concerned about the
- ``FCRCS_REGNUM <= reg && reg <= LAST_EMBED_REGNUM'' clause though.
- In some cases DEPRECATED_FP_REGNUM is in this range, and I doubt
- that this code is correct for the 64-bit case. */
+static void
+mips_value_to_register (struct frame_info *frame, int regnum,
+ struct type *type, const void *from)
+{
+ put_frame_register (frame, regnum + 0, (const char *) from + 4);
+ put_frame_register (frame, regnum + 1, (const char *) from + 0);
+}
+
+/* Return the GDB type object for the "standard" data type of data in
+ register REG. */
static struct type *
-mips_register_virtual_type (int reg)
-{
- if (FP0_REGNUM <= reg && reg < FP0_REGNUM + 32)
+mips_register_type (struct gdbarch *gdbarch, int regnum)
+{
+ /* For moment, map [NUM_REGS .. 2*NUM_REGS) onto the same raw
+ registers. Even return the same type. */
+ int rawnum = regnum % NUM_REGS;
+ gdb_assert (rawnum >= 0 && rawnum < NUM_REGS);
+#ifdef MIPS_REGISTER_TYPE
+ return MIPS_REGISTER_TYPE (rawnum);
+#else
+ if (FP0_REGNUM <= rawnum && rawnum < FP0_REGNUM + 32)
{
/* Floating point registers... */
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
@@ -669,9 +795,9 @@ mips_register_virtual_type (int reg)
else
return builtin_type_ieee_double_little;
}
- else if (reg == PS_REGNUM /* CR */)
+ else if (rawnum == PS_REGNUM /* CR */)
return builtin_type_uint32;
- else if (FCRCS_REGNUM <= reg && reg <= LAST_EMBED_REGNUM)
+ else if (FCRCS_REGNUM <= rawnum && rawnum <= LAST_EMBED_REGNUM)
return builtin_type_uint32;
else
{
@@ -682,6 +808,7 @@ mips_register_virtual_type (int reg)
else
return builtin_type_uint32;
}
+#endif
}
/* TARGET_READ_SP -- Remove useless bits from the stack pointer. */
@@ -750,12 +877,6 @@ mips_n32n64_use_struct_convention (int gcc_p, struct type *type)
return (TYPE_LENGTH (type) > 2 * MIPS_SAVED_REGSIZE);
}
-static int
-mips_o32_use_struct_convention (int gcc_p, struct type *type)
-{
- return 1; /* Structures are returned by ref in extra arg0. */
-}
-
/* Should call_function pass struct by reference?
For each architecture, structs are passed either by
value or by reference, depending on their size. */
@@ -792,7 +913,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 +1046,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 +1549,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 +1588,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 +1659,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,125 +1674,122 @@ 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.
-
- When the ABI specifies 64 bit saved registers, the FREG_OFFSET
- designates the first saved 64 bit register.
-
- When the ABI specifies 32 bit saved registers, the ``64 bit saved
- DOUBLE'' consists of two adjacent 32 bit registers, Hence
- FREG_OFFSET, designates the address of the lower register of the
- register pair. Adjust the offset so that it designates the upper
- register of the pair -- i.e., the address of the first saved 32
- bit register. */
-
- if (MIPS_SAVED_REGSIZE == 4)
- reg_position += MIPS_SAVED_REGSIZE;
-
- /* Fill in the offsets for the float registers which float_mask says
- 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;
- }
+ /* 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));
- 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)
+ {
+ if (MIPS_SAVED_REGSIZE == 4 && TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+ {
+ /* On a big endian 32 bit ABI, floating point registers
+ are paired to form doubles such that the most
+ significant part is in $f[N+1] and the least
+ significant in $f[N] vis: $f[N+1] ||| $f[N]. The
+ registers are also spilled as a pair and stored as a
+ double.
+
+ When little-endian the least significant part is
+ stored first leading to the memory order $f[N] and
+ then $f[N+1].
+
+ Unfortunatly, when big-endian the most significant
+ part of the double is stored first, and the least
+ significant is stored second. This leads to the
+ registers being ordered in memory as firt $f[N+1] and
+ then $f[N].
+
+ For the big-endian case make certain that the
+ addresses point at the correct (swapped) locations
+ $f[N] and $f[N+1] pair (keep in mind that
+ reg_position is decremented each time through the
+ loop). */
+ if ((ireg & 1))
+ set_reg_offset (saved_regs, FP0_REGNUM + ireg,
+ reg_position - MIPS_SAVED_REGSIZE);
+ else
+ set_reg_offset (saved_regs, FP0_REGNUM + ireg,
+ reg_position + MIPS_SAVED_REGSIZE);
+ }
+ else
+ 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
read_next_frame_reg (struct frame_info *fi, int regno)
{
- int optimized;
- CORE_ADDR addr;
- int realnum;
- enum lval_type lval;
- char raw_buffer[MAX_REGISTER_SIZE];
-
+ /* Always a pseudo. */
+ gdb_assert (regno >= NUM_REGS);
if (fi == NULL)
{
- regcache_cooked_read (current_regcache, regno, raw_buffer);
+ LONGEST val;
+ regcache_cooked_read_signed (current_regcache, regno, &val);
+ return val;
}
+ else if ((regno % NUM_REGS) == SP_REGNUM)
+ /* The SP_REGNUM is special, its value is stored in saved_regs.
+ In fact, it is so special that it can even only be fetched
+ using a raw register number! Once this code as been converted
+ to frame-unwind the problem goes away. */
+ return frame_unwind_register_signed (fi, regno % NUM_REGS);
else
- {
- frame_register_unwind (fi, regno, &optimized, &lval, &addr, &realnum,
- raw_buffer);
- /* FIXME: cagney/2002-09-13: This is just soooo bad. The MIPS
- should have a pseudo register range that correspons to the ABI's,
- rather than the ISA's, view of registers. These registers would
- then implicitly describe their size and hence could be used
- without the below munging. */
- if (lval == lval_memory)
- {
- if (regno < 32)
- {
- /* Only MIPS_SAVED_REGSIZE bytes of GP registers are
- saved. */
- return read_memory_integer (addr, MIPS_SAVED_REGSIZE);
- }
- }
- }
+ return frame_unwind_register_signed (fi, regno);
- return extract_signed_integer (raw_buffer, REGISTER_VIRTUAL_SIZE (regno));
}
/* mips_addr_bits_remove - remove useless address bits */
@@ -1758,23 +1879,29 @@ static CORE_ADDR
mips_frame_saved_pc (struct frame_info *frame)
{
CORE_ADDR saved_pc;
- mips_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
- : (proc_desc ? PROC_PC_REG (proc_desc) : RA_REGNUM);
if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), 0, 0))
{
LONGEST tmp;
- frame_unwind_signed_register (frame, PC_REGNUM, &tmp);
+ /* Always unwind the cooked PC register value. */
+ frame_unwind_signed_register (frame, NUM_REGS + PC_REGNUM, &tmp);
saved_pc = tmp;
}
- else if (proc_desc && PROC_DESC_IS_DUMMY (proc_desc))
- saved_pc = read_memory_integer (get_frame_base (frame) - MIPS_SAVED_REGSIZE, MIPS_SAVED_REGSIZE);
else
- saved_pc = read_next_frame_reg (frame, pcreg);
-
+ {
+ mips_extra_func_info_t proc_desc
+ = get_frame_extra_info (frame)->proc_desc;
+ if (proc_desc && PROC_DESC_IS_DUMMY (proc_desc))
+ saved_pc = read_memory_integer (get_frame_base (frame) - MIPS_SAVED_REGSIZE, MIPS_SAVED_REGSIZE);
+ else
+ {
+ /* 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
+ : proc_desc ? PROC_PC_REG (proc_desc) : RA_REGNUM);
+ saved_pc = read_next_frame_reg (frame, NUM_REGS + pcreg);
+ }
+ }
return ADDR_BITS_REMOVE (saved_pc);
}
@@ -1787,16 +1914,25 @@ 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.
+
+ For simplicity, save the address in both [0 .. NUM_REGS) and
+ [NUM_REGS .. 2*NUM_REGS). Strictly speaking, only the second range
+ is used as it is only second range (the ABI instead of ISA
+ registers) that comes into play when finding saved registers in a
+ frame. */
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 + 0 * NUM_REGS] = offset;
+ saved_regs[regno + 1 * NUM_REGS] = offset;
+ }
}
@@ -1992,26 +2128,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 +2166,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 +2203,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 +2212,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 +2220,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 +2265,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 +2273,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 */
{
@@ -2148,7 +2284,7 @@ restart:
{
unsigned alloca_adjust;
PROC_FRAME_REG (&temp_proc_desc) = 30;
- frame_addr = read_next_frame_reg (next_frame, 30);
+ frame_addr = read_next_frame_reg (next_frame, NUM_REGS + 30);
alloca_adjust = (unsigned) (frame_addr - (sp + low_word));
if (alloca_adjust > 0)
{
@@ -2171,7 +2307,7 @@ restart:
{
unsigned alloca_adjust;
PROC_FRAME_REG (&temp_proc_desc) = 30;
- frame_addr = read_next_frame_reg (next_frame, 30);
+ frame_addr = read_next_frame_reg (next_frame, NUM_REGS + 30);
alloca_adjust = (unsigned) (frame_addr - sp);
if (alloca_adjust > 0)
{
@@ -2187,7 +2323,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);
}
}
}
@@ -2199,7 +2335,7 @@ heuristic_proc_desc (CORE_ADDR start_pc, CORE_ADDR limit_pc,
CORE_ADDR sp;
if (cur_frame)
- sp = read_next_frame_reg (next_frame, SP_REGNUM);
+ sp = read_next_frame_reg (next_frame, NUM_REGS + SP_REGNUM);
else
sp = 0;
@@ -2472,7 +2608,7 @@ static CORE_ADDR
get_frame_pointer (struct frame_info *frame,
mips_extra_func_info_t proc_desc)
{
- return (read_next_frame_reg (frame, PROC_FRAME_REG (proc_desc))
+ return (read_next_frame_reg (frame, NUM_REGS + PROC_FRAME_REG (proc_desc))
+ PROC_FRAME_OFFSET (proc_desc)
- PROC_FRAME_ADJUST (proc_desc));
}
@@ -2558,7 +2694,7 @@ mips_init_extra_frame_info (int fromleaf, struct frame_info *fci)
interrupted by a signal at it's very start. */
if (get_frame_pc (fci) == PROC_LOW_ADDR (proc_desc)
&& !PROC_DESC_IS_DUMMY (proc_desc))
- deprecated_update_frame_base_hack (fci, read_next_frame_reg (get_next_frame (fci), SP_REGNUM));
+ deprecated_update_frame_base_hack (fci, read_next_frame_reg (get_next_frame (fci), NUM_REGS + SP_REGNUM));
else if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fci), 0, 0))
/* Do not ``fix'' fci->frame. It will have the value of the
generic dummy frame's top-of-stack (since the draft
@@ -2586,15 +2722,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 +2836,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 +2847,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 +2874,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 +2886,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 +2905,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 +3089,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 +3109,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 +3134,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 +3146,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 +3165,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 +3320,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 +3340,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 +3365,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 +3377,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 +3397,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 +3628,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 +3648,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 +3673,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 +3685,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 +3705,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 +3936,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 +3959,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 +4015,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 +4067,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 +4099,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 +4108,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 +4122,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,114 +4143,115 @@ 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)
{
+ struct gdbarch *gdbarch = get_frame_arch (frame);
char raw_buffer[MAX_REGISTER_SIZE];
int offset;
- if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (regnum)) == TYPE_CODE_FLT)
+ if (TYPE_CODE (gdbarch_register_type (gdbarch, 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);
else
offset = 0;
- print_scalar_formatted (raw_buffer + offset,
- REGISTER_VIRTUAL_TYPE (regnum),
- 'x', 0, gdb_stdout);
+ print_scalar_formatted (raw_buffer + offset, gdbarch_register_type (gdbarch, regnum),
+ '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,41 +4259,47 @@ 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 start_regnum)
{
+ struct gdbarch *gdbarch = get_frame_arch (frame);
/* do values for GP (int) regs */
char raw_buffer[MAX_REGISTER_SIZE];
int ncols = (MIPS_REGSIZE == 8 ? 4 : 8); /* display cols per row */
int col, byte;
- int start_regnum = regnum;
- int numregs = NUM_REGS;
-
+ int regnum;
/* For GP registers, we print a separate row of names above the vals */
- printf_filtered (" ");
- for (col = 0; col < ncols && regnum < numregs; regnum++)
+ fprintf_filtered (file, " ");
+ for (col = 0, regnum = start_regnum;
+ col < ncols && regnum < NUM_REGS + NUM_PSEUDO_REGS;
+ regnum++)
{
if (*REGISTER_NAME (regnum) == '\0')
continue; /* unused register */
- if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (regnum)) == TYPE_CODE_FLT)
+ if (TYPE_CODE (gdbarch_register_type (gdbarch, 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 */
+ /* print the R0 to R31 names */
+ fprintf_filtered (file,
+ (start_regnum % NUM_REGS) < MIPS_NUMREGS
+ ? "\n R%-4d" : "\n ",
+ start_regnum);
- regnum = start_regnum; /* go back to start of row */
/* now print the values in hex, 4 or 8 to the row */
- for (col = 0; col < ncols && regnum < numregs; regnum++)
+ for (col = 0, regnum = start_regnum;
+ col < ncols && regnum < NUM_REGS + NUM_PSEUDO_REGS;
+ regnum++)
{
if (*REGISTER_NAME (regnum) == '\0')
continue; /* unused register */
- if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (regnum)) == TYPE_CODE_FLT)
+ if (TYPE_CODE (gdbarch_register_type (gdbarch, 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 +4309,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,29 +4327,33 @@ 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 */
{
+ gdb_assert (regnum >= NUM_REGS);
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 */
{
- regnum = 0;
- while (regnum < NUM_REGS)
+ regnum = NUM_REGS;
+ while (regnum < NUM_REGS + NUM_PSEUDO_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 (TYPE_CODE (gdbarch_register_type (gdbarch, regnum)) == TYPE_CODE_FLT)
+ {
+ 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);
}
}
}
@@ -4660,30 +4832,30 @@ mips_o32_xfer_return_value (struct type *type,
least significant part of FP0. */
if (mips_debug)
fprintf_unfiltered (gdb_stderr, "Return float in $fp0\n");
- mips_xfer_register (regcache, FP0_REGNUM, TYPE_LENGTH (type),
+ mips_xfer_register (regcache, NUM_REGS + FP0_REGNUM, TYPE_LENGTH (type),
TARGET_BYTE_ORDER, in, out, 0);
}
else if (TYPE_CODE (type) == TYPE_CODE_FLT
&& TYPE_LENGTH (type) == 8
&& tdep->mips_fpu_type != MIPS_FPU_NONE)
{
- /* A double-precision floating-point value. It fits in the
- least significant part of FP0/FP1 but with byte ordering
- based on the target (???). */
+ /* A double-precision floating-point value. The most
+ significant part goes in FP1, and the least significant in
+ FP0. */
if (mips_debug)
- fprintf_unfiltered (gdb_stderr, "Return float in $fp0/$fp1\n");
+ fprintf_unfiltered (gdb_stderr, "Return float in $fp1/$fp0\n");
switch (TARGET_BYTE_ORDER)
{
case BFD_ENDIAN_LITTLE:
- mips_xfer_register (regcache, FP0_REGNUM + 0, 4,
+ mips_xfer_register (regcache, NUM_REGS + FP0_REGNUM + 0, 4,
TARGET_BYTE_ORDER, in, out, 0);
- mips_xfer_register (regcache, FP0_REGNUM + 1, 4,
+ mips_xfer_register (regcache, NUM_REGS + FP0_REGNUM + 1, 4,
TARGET_BYTE_ORDER, in, out, 4);
break;
case BFD_ENDIAN_BIG:
- mips_xfer_register (regcache, FP0_REGNUM + 1, 4,
+ mips_xfer_register (regcache, NUM_REGS + FP0_REGNUM + 1, 4,
TARGET_BYTE_ORDER, in, out, 0);
- mips_xfer_register (regcache, FP0_REGNUM + 0, 4,
+ mips_xfer_register (regcache, NUM_REGS + FP0_REGNUM + 0, 4,
TARGET_BYTE_ORDER, in, out, 4);
break;
default:
@@ -4718,7 +4890,8 @@ mips_o32_xfer_return_value (struct type *type,
/ TARGET_CHAR_BIT);
if (mips_debug)
fprintf_unfiltered (gdb_stderr, "Return float struct+%d\n", offset);
- mips_xfer_register (regcache, regnum, TYPE_LENGTH (TYPE_FIELD_TYPE (type, field)),
+ mips_xfer_register (regcache, NUM_REGS + regnum,
+ TYPE_LENGTH (TYPE_FIELD_TYPE (type, field)),
TARGET_BYTE_ORDER, in, out, offset);
}
}
@@ -4742,8 +4915,8 @@ mips_o32_xfer_return_value (struct type *type,
if (mips_debug)
fprintf_unfiltered (gdb_stderr, "Return struct+%d:%d in $%d\n",
offset, xfer, regnum);
- mips_xfer_register (regcache, regnum, xfer, BFD_ENDIAN_UNKNOWN,
- in, out, offset);
+ mips_xfer_register (regcache, NUM_REGS + regnum, xfer,
+ BFD_ENDIAN_UNKNOWN, in, out, offset);
}
}
#endif
@@ -4765,8 +4938,8 @@ mips_o32_xfer_return_value (struct type *type,
if (mips_debug)
fprintf_unfiltered (gdb_stderr, "Return scalar+%d:%d in $%d\n",
offset, xfer, regnum);
- mips_xfer_register (regcache, regnum, xfer, TARGET_BYTE_ORDER,
- in, out, offset);
+ mips_xfer_register (regcache, NUM_REGS + regnum, xfer,
+ TARGET_BYTE_ORDER, in, out, offset);
}
}
}
@@ -4800,7 +4973,7 @@ mips_n32n64_xfer_return_value (struct type *type,
of FP0. */
if (mips_debug)
fprintf_unfiltered (gdb_stderr, "Return float in $fp0\n");
- mips_xfer_register (regcache, FP0_REGNUM, TYPE_LENGTH (type),
+ mips_xfer_register (regcache, NUM_REGS + FP0_REGNUM, TYPE_LENGTH (type),
TARGET_BYTE_ORDER, in, out, 0);
}
else if (TYPE_CODE (type) == TYPE_CODE_STRUCT
@@ -4830,7 +5003,8 @@ mips_n32n64_xfer_return_value (struct type *type,
/ TARGET_CHAR_BIT);
if (mips_debug)
fprintf_unfiltered (gdb_stderr, "Return float struct+%d\n", offset);
- mips_xfer_register (regcache, regnum, TYPE_LENGTH (TYPE_FIELD_TYPE (type, field)),
+ mips_xfer_register (regcache, NUM_REGS + regnum,
+ TYPE_LENGTH (TYPE_FIELD_TYPE (type, field)),
TARGET_BYTE_ORDER, in, out, offset);
}
}
@@ -4852,8 +5026,8 @@ mips_n32n64_xfer_return_value (struct type *type,
if (mips_debug)
fprintf_unfiltered (gdb_stderr, "Return struct+%d:%d in $%d\n",
offset, xfer, regnum);
- mips_xfer_register (regcache, regnum, xfer, BFD_ENDIAN_UNKNOWN,
- in, out, offset);
+ mips_xfer_register (regcache, NUM_REGS + regnum, xfer,
+ BFD_ENDIAN_UNKNOWN, in, out, offset);
}
}
else
@@ -4873,8 +5047,8 @@ mips_n32n64_xfer_return_value (struct type *type,
if (mips_debug)
fprintf_unfiltered (gdb_stderr, "Return scalar+%d:%d in $%d\n",
offset, xfer, regnum);
- mips_xfer_register (regcache, regnum, xfer, TARGET_BYTE_ORDER,
- in, out, offset);
+ mips_xfer_register (regcache, NUM_REGS + regnum, xfer,
+ TARGET_BYTE_ORDER, in, out, offset);
}
}
}
@@ -4893,12 +5067,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,18 +5264,26 @@ 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,
it's definitely a 16-bit function. Otherwise, we have to just
guess that if the address passed in is odd, it's 16-bits. */
+ /* FIXME: cagney/2003-06-26: Is this even necessary? The
+ disassembler needs to be able to locally determine the ISA, and
+ not rely on GDB. Otherwize the stand-alone 'objdump -d' will not
+ work. */
if (proc_desc)
- info->mach = pc_is_mips16 (PROC_LOW_ADDR (proc_desc)) ?
- bfd_mach_mips16 : TM_PRINT_INSN_MACH;
+ {
+ if (pc_is_mips16 (PROC_LOW_ADDR (proc_desc)))
+ info->mach = bfd_mach_mips16;
+ }
else
- info->mach = pc_is_mips16 (memaddr) ?
- bfd_mach_mips16 : TM_PRINT_INSN_MACH;
+ {
+ if (pc_is_mips16 (memaddr))
+ info->mach = bfd_mach_mips16;
+ }
/* Round down the instruction address to the appropriate boundary. */
memaddr &= (info->mach == bfd_mach_mips16 ? ~1 : ~3);
@@ -5134,7 +5310,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 +5340,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;
}
@@ -5401,9 +5577,10 @@ mips_get_saved_register (char *raw_buffer,
CORE_ADDR addrx;
enum lval_type lvalx;
int optimizedx;
+ int realnumx;
- if (!target_has_registers)
- error ("No registers.");
+ /* Always a pseudo. */
+ gdb_assert (regnum >= NUM_REGS);
/* Make certain that all needed parameters are present. */
if (addrp == NULL)
@@ -5412,26 +5589,20 @@ mips_get_saved_register (char *raw_buffer,
lvalp = &lvalx;
if (optimizedp == NULL)
optimizedp = &optimizedx;
- generic_unwind_get_saved_register (raw_buffer, optimizedp, addrp, frame,
- regnum, lvalp);
- /* FIXME: cagney/2002-09-13: This is just so bad. The MIPS should
- have a pseudo register range that correspons to the ABI's, rather
- than the ISA's, view of registers. These registers would then
- implicitly describe their size and hence could be used without
- the below munging. */
- if ((*lvalp) == lval_memory)
- {
- if (raw_buffer != NULL)
- {
- if (regnum < 32)
- {
- /* Only MIPS_SAVED_REGSIZE bytes of GP registers are
- saved. */
- LONGEST val = read_memory_integer ((*addrp), MIPS_SAVED_REGSIZE);
- store_unsigned_integer (raw_buffer, REGISTER_RAW_SIZE (regnum), val);
- }
- }
- }
+
+ if ((regnum % NUM_REGS) == SP_REGNUM)
+ /* The SP_REGNUM is special, its value is stored in saved_regs.
+ In fact, it is so special that it can even only be fetched
+ using a raw register number! Once this code as been converted
+ to frame-unwind the problem goes away. */
+ frame_register_unwind (deprecated_get_next_frame_hack (frame),
+ regnum % NUM_REGS, optimizedp, lvalp, addrp,
+ &realnumx, raw_buffer);
+ else
+ /* Get it from the next frame. */
+ frame_register_unwind (deprecated_get_next_frame_hack (frame),
+ regnum, optimizedp, lvalp, addrp,
+ &realnumx, raw_buffer);
}
/* Immediately after a function call, return the saved pc.
@@ -5446,48 +5617,64 @@ mips_saved_pc_after_call (struct frame_info *frame)
}
-/* Convert a dbx stab register number (from `r' declaration) to a gdb
- REGNUM */
+/* Convert a dbx stab register number (from `r' declaration) to a GDB
+ [1 * NUM_REGS .. 2 * NUM_REGS) REGNUM. */
static int
mips_stab_reg_to_regnum (int num)
{
+ int regnum;
if (num >= 0 && num < 32)
- return num;
+ regnum = num;
else if (num >= 38 && num < 70)
- return num + FP0_REGNUM - 38;
+ regnum = num + FP0_REGNUM - 38;
else if (num == 70)
- return HI_REGNUM;
+ regnum = HI_REGNUM;
else if (num == 71)
- return LO_REGNUM;
+ regnum = LO_REGNUM;
else
- {
- /* This will hopefully (eventually) provoke a warning. Should
- we be calling complaint() here? */
- return NUM_REGS + NUM_PSEUDO_REGS;
- }
+ /* This will hopefully (eventually) provoke a warning. Should
+ we be calling complaint() here? */
+ return NUM_REGS + NUM_PSEUDO_REGS;
+ return NUM_REGS + regnum;
}
-/* Convert a dwarf, dwarf2, or ecoff register number to a gdb REGNUM */
+/* Convert a dwarf, dwarf2, or ecoff register number to a GDB [1 *
+ NUM_REGS .. 2 * NUM_REGS) REGNUM. */
static int
mips_dwarf_dwarf2_ecoff_reg_to_regnum (int num)
{
+ int regnum;
if (num >= 0 && num < 32)
- return num;
+ regnum = num;
else if (num >= 32 && num < 64)
- return num + FP0_REGNUM - 32;
+ regnum = num + FP0_REGNUM - 32;
else if (num == 64)
- return HI_REGNUM;
+ regnum = HI_REGNUM;
else if (num == 65)
- return LO_REGNUM;
+ regnum = LO_REGNUM;
else
- {
- /* This will hopefully (eventually) provoke a warning. Should
- we be calling complaint() here? */
- return NUM_REGS + NUM_PSEUDO_REGS;
- }
+ /* This will hopefully (eventually) provoke a warning. Should we
+ be calling complaint() here? */
+ return NUM_REGS + NUM_PSEUDO_REGS;
+ return NUM_REGS + regnum;
+}
+
+static int
+mips_register_sim_regno (int regnum)
+{
+ /* Only makes sense to supply raw registers. */
+ gdb_assert (regnum >= 0 && regnum < NUM_REGS);
+ /* FIXME: cagney/2002-05-13: Need to look at the pseudo register to
+ decide if it is valid. Should instead define a standard sim/gdb
+ register numbering scheme. */
+ if (REGISTER_NAME (NUM_REGS + regnum) != NULL
+ && REGISTER_NAME (NUM_REGS + regnum)[0] != '\0')
+ return regnum;
+ else
+ return LEGACY_SIM_REGNO_IGNORE;
}
@@ -5550,12 +5737,11 @@ 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;
enum mips_abi mips_abi, found_abi, wanted_abi;
+ int num_regs;
/* Reset the disassembly info, in case it was set to something
non-default. */
@@ -5708,24 +5894,29 @@ mips_gdbarch_init (struct gdbarch_info info,
set_gdbarch_float_bit (gdbarch, 32);
set_gdbarch_double_bit (gdbarch, 64);
set_gdbarch_long_double_bit (gdbarch, 64);
- set_gdbarch_register_raw_size (gdbarch, mips_register_raw_size);
- set_gdbarch_deprecated_max_register_raw_size (gdbarch, 8);
- set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 8);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, mips_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, mips_register_byte);
+ set_gdbarch_register_reggroup_p (gdbarch, mips_register_reggroup_p);
+ set_gdbarch_pseudo_register_read (gdbarch, mips_pseudo_register_read);
+ set_gdbarch_pseudo_register_write (gdbarch, mips_pseudo_register_write);
tdep->found_abi = found_abi;
tdep->mips_abi = mips_abi;
set_gdbarch_elf_make_msymbol_special (gdbarch,
mips_elf_make_msymbol_special);
+
if (info.osabi == GDB_OSABI_IRIX)
- set_gdbarch_num_regs (gdbarch, 71);
+ num_regs = 71;
else
- set_gdbarch_num_regs (gdbarch, 90);
+ num_regs = 90;
+ set_gdbarch_num_regs (gdbarch, num_regs);
+ set_gdbarch_num_pseudo_regs (gdbarch, num_regs);
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;
@@ -5741,10 +5932,10 @@ mips_gdbarch_init (struct gdbarch_info info,
set_gdbarch_reg_struct_has_addr (gdbarch,
mips_o32_reg_struct_has_addr);
set_gdbarch_use_struct_convention (gdbarch,
- mips_o32_use_struct_convention);
+ always_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;
@@ -5759,11 +5950,10 @@ mips_gdbarch_init (struct gdbarch_info info,
set_gdbarch_long_long_bit (gdbarch, 64);
set_gdbarch_reg_struct_has_addr (gdbarch,
mips_o32_reg_struct_has_addr);
- set_gdbarch_use_struct_convention (gdbarch,
- mips_o32_use_struct_convention);
+ set_gdbarch_use_struct_convention (gdbarch, always_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 +5972,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 +5991,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 +6010,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 +6088,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. */
@@ -5914,33 +6103,26 @@ mips_gdbarch_init (struct gdbarch_info info,
set_gdbarch_ecoff_reg_to_regnum (gdbarch, mips_dwarf_dwarf2_ecoff_reg_to_regnum);
set_gdbarch_dwarf_reg_to_regnum (gdbarch, mips_dwarf_dwarf2_ecoff_reg_to_regnum);
set_gdbarch_dwarf2_reg_to_regnum (gdbarch, mips_dwarf_dwarf2_ecoff_reg_to_regnum);
+ set_gdbarch_register_sim_regno (gdbarch, mips_register_sim_regno);
/* 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);
- set_gdbarch_register_convert_to_virtual (gdbarch,
- mips_register_convert_to_virtual);
- set_gdbarch_register_convert_to_raw (gdbarch,
- mips_register_convert_to_raw);
+ set_gdbarch_deprecated_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
+ set_gdbarch_deprecated_register_convertible (gdbarch, mips_register_convertible);
+ set_gdbarch_deprecated_register_convert_to_virtual (gdbarch, mips_register_convert_to_virtual);
+ set_gdbarch_deprecated_register_convert_to_raw (gdbarch, mips_register_convert_to_raw);
set_gdbarch_deprecated_frame_chain (gdbarch, mips_frame_chain);
set_gdbarch_frameless_function_invocation (gdbarch,
generic_frameless_function_invocation_not);
set_gdbarch_deprecated_frame_saved_pc (gdbarch, mips_frame_saved_pc);
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
set_gdbarch_frame_args_skip (gdbarch, 0);
set_gdbarch_deprecated_get_saved_register (gdbarch, mips_get_saved_register);
@@ -5958,18 +6140,14 @@ mips_gdbarch_init (struct gdbarch_info info,
set_gdbarch_function_start_offset (gdbarch, 0);
- /* There are MIPS targets which do not yet use this since they still
- define REGISTER_VIRTUAL_TYPE. */
- set_gdbarch_register_virtual_type (gdbarch, mips_register_virtual_type);
- set_gdbarch_register_virtual_size (gdbarch, generic_register_size);
+ set_gdbarch_register_type (gdbarch, mips_register_type);
- 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 +6341,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 +6362,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,
@@ -6250,12 +6424,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
"mips_dump_tdep: RA_REGNUM = %d\n",
RA_REGNUM);
fprintf_unfiltered (file,
- "mips_dump_tdep: REGISTER_CONVERT_FROM_TYPE # %s\n",
- XSTRING (REGISTER_CONVERT_FROM_TYPE (REGNUM, VALTYPE, RAW_BUFFER)));
- fprintf_unfiltered (file,
- "mips_dump_tdep: REGISTER_CONVERT_TO_TYPE # %s\n",
- XSTRING (REGISTER_CONVERT_TO_TYPE (REGNUM, VALTYPE, RAW_BUFFER)));
- fprintf_unfiltered (file,
"mips_dump_tdep: REGISTER_NAMES = delete?\n");
fprintf_unfiltered (file,
"mips_dump_tdep: ROUND_DOWN = function?\n");
@@ -6333,11 +6501,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 +6521,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",
@@ -6384,6 +6545,8 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
_PROC_MAGIC_);
}
+extern initialize_file_ftype _initialize_mips_tdep; /* -Wmissing-prototypes */
+
void
_initialize_mips_tdep (void)
{
diff --git a/gdb/mips-tdep.h b/gdb/mips-tdep.h
index 8e19bcdf266..5d3aa85692d 100644
--- a/gdb/mips-tdep.h
+++ b/gdb/mips-tdep.h
@@ -40,4 +40,7 @@ enum mips_abi
/* Return the MIPS ABI associated with GDBARCH. */
enum mips_abi mips_abi (struct gdbarch *gdbarch);
+/* For wince :-(. */
+extern CORE_ADDR mips_next_pc (CORE_ADDR pc);
+
#endif /* MIPS_TDEP_H */
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..3519495f5f9 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -31,6 +31,7 @@
#include "symfile.h"
#include "regcache.h"
#include "arch-utils.h"
+#include "gdb_assert.h"
#define D0_REGNUM 0
#define D2_REGNUM 2
@@ -131,8 +132,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
@@ -1091,6 +1092,14 @@ mn10300_do_registers_info (int regnum, int fpregs)
}
}
+static CORE_ADDR
+mn10300_read_fp (void)
+{
+ /* That's right, we're using the stack pointer as our frame pointer. */
+ gdb_assert (SP_REGNUM >= 0);
+ return read_register (SP_REGNUM);
+}
+
/* Dump out the mn10300 speciic architecture information. */
static void
@@ -1149,11 +1158,11 @@ mn10300_gdbarch_init (struct gdbarch_info info,
set_gdbarch_deprecated_register_size (gdbarch, 4);
set_gdbarch_deprecated_register_bytes (gdbarch, num_regs * gdbarch_deprecated_register_size (gdbarch));
set_gdbarch_deprecated_max_register_raw_size (gdbarch, 4);
- set_gdbarch_register_raw_size (gdbarch, mn10300_register_raw_size);
- set_gdbarch_register_byte (gdbarch, mn10300_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, mn10300_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, mn10300_register_byte);
set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 4);
- set_gdbarch_register_virtual_size (gdbarch, mn10300_register_virtual_size);
- set_gdbarch_register_virtual_type (gdbarch, mn10300_register_virtual_type);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, mn10300_register_virtual_size);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, mn10300_register_virtual_type);
set_gdbarch_dwarf2_reg_to_regnum (gdbarch, mn10300_dwarf2_reg_to_regnum);
set_gdbarch_deprecated_do_registers_info (gdbarch, mn10300_do_registers_info);
set_gdbarch_sp_regnum (gdbarch, 8);
@@ -1182,9 +1191,8 @@ mn10300_gdbarch_init (struct gdbarch_info info,
set_gdbarch_deprecated_pop_frame (gdbarch, mn10300_pop_frame);
set_gdbarch_skip_prologue (gdbarch, mn10300_skip_prologue);
set_gdbarch_frame_args_skip (gdbarch, 0);
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
/* That's right, we're using the stack pointer as our frame pointer. */
- set_gdbarch_deprecated_target_read_fp (gdbarch, generic_target_read_sp);
+ set_gdbarch_deprecated_target_read_fp (gdbarch, mn10300_read_fp);
/* Calling functions in the inferior from GDB. */
set_gdbarch_deprecated_call_dummy_words (gdbarch, mn10300_call_dummy_words);
@@ -1193,13 +1201,13 @@ mn10300_gdbarch_init (struct gdbarch_info info,
set_gdbarch_deprecated_push_arguments (gdbarch, mn10300_push_arguments);
set_gdbarch_reg_struct_has_addr (gdbarch, mn10300_reg_struct_has_addr);
set_gdbarch_deprecated_push_return_address (gdbarch, mn10300_push_return_address);
- set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
+ set_gdbarch_deprecated_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
set_gdbarch_use_struct_convention (gdbarch, mn10300_use_struct_convention);
tdep->am33_mode = am33_mode;
/* Should be using push_dummy_call. */
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
return gdbarch;
}
diff --git a/gdb/monitor.c b/gdb/monitor.c
index eabbbd938cc..ee2280d968c 100644
--- a/gdb/monitor.c
+++ b/gdb/monitor.c
@@ -1054,12 +1054,11 @@ monitor_wait_cleanup (void *old_timeout)
-void
+static void
monitor_wait_filter (char *buf,
int bufmax,
int *ext_resp_len,
- struct target_waitstatus *status
-)
+ struct target_waitstatus *status)
{
int resp_len;
do
@@ -2335,6 +2334,8 @@ init_monitor_ops (struct target_ops *ops)
/* Define additional commands that are usually only used by monitors. */
+extern initialize_file_ftype _initialize_remote_monitors; /* -Wmissing-prototypes */
+
void
_initialize_remote_monitors (void)
{
diff --git a/gdb/nlm/configure b/gdb/nlm/configure
index 3918fee794c..ca1146a14b4 100755
--- a/gdb/nlm/configure
+++ b/gdb/nlm/configure
@@ -1,7 +1,7 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.12.2
+# Generated automatically using autoconf version 2.13
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
@@ -28,6 +28,7 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
+sitefile=
srcdir=
target=NONE
verbose=
@@ -142,6 +143,7 @@ Configuration:
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
+ --site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
@@ -312,6 +314,11 @@ EOF
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
+ -site-file | --site-file | --site-fil | --site-fi | --site-f)
+ ac_prev=sitefile ;;
+ -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
+ sitefile="$ac_optarg" ;;
+
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@@ -333,7 +340,7 @@ EOF
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.12.2"
+ echo "configure generated by autoconf version 2.13"
exit 0 ;;
-with-* | --with-*)
@@ -477,12 +484,16 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+if test -z "$sitefile"; then
+ if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
fi
+else
+ CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
@@ -569,7 +580,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:573: checking host system type" >&5
+echo "configure:584: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -590,7 +601,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:594: checking target system type" >&5
+echo "configure:605: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -608,7 +619,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:612: checking build system type" >&5
+echo "configure:623: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -662,7 +673,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x,"
# 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:666: checking for a BSD compatible install" >&5
+echo "configure:677: 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
@@ -710,6 +721,8 @@ echo "$ac_t""$INSTALL" 1>&6
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
@@ -719,7 +732,7 @@ case "${target_cpu}" in
alpha) gdb_target_cpu=alpha ;;
c[12]) gdb_target_cpu=convex ;;
hppa*) gdb_target_cpu=pa ;;
-i[3456]86) gdb_target_cpu=i386 ;;
+i[34567]86) gdb_target_cpu=i386 ;;
m68*) gdb_target_cpu=m68k ;;
np1) gdb_target_cpu=gould ;;
pn) gdb_target_cpu=gould ;;
@@ -773,7 +786,7 @@ EOF
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
- case `(ac_space=' '; set) 2>&1 | grep ac_space` in
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
@@ -852,7 +865,7 @@ do
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.12.2"
+ echo "$CONFIG_STATUS generated by autoconf version 2.13"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
@@ -876,6 +889,7 @@ s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g
@@ -910,6 +924,7 @@ s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@target_makefile_frag_path@%$target_makefile_frag_path%g
/@target_makefile_frag@/r $target_makefile_frag
diff --git a/gdb/nlm/configure.in b/gdb/nlm/configure.in
index 845b486e524..ba415aa31e1 100644
--- a/gdb/nlm/configure.in
+++ b/gdb/nlm/configure.in
@@ -15,7 +15,7 @@ case "${target_cpu}" in
alpha) gdb_target_cpu=alpha ;;
c[12]) gdb_target_cpu=convex ;;
hppa*) gdb_target_cpu=pa ;;
-i[3456]86) gdb_target_cpu=i386 ;;
+i[34567]86) gdb_target_cpu=i386 ;;
m68*) gdb_target_cpu=m68k ;;
np1) gdb_target_cpu=gould ;;
pn) gdb_target_cpu=gould ;;
diff --git a/gdb/ns32k-tdep.c b/gdb/ns32k-tdep.c
index 46c175c4b02..7bad91dc3b0 100644
--- a/gdb/ns32k-tdep.c
+++ b/gdb/ns32k-tdep.c
@@ -327,7 +327,7 @@ ns32k_sigtramp_saved_pc (struct frame_info *frame)
/* Get sigcontext address, it is the third parameter on the stack. */
if (get_next_frame (frame))
sigcontext_addr = read_memory_typed_address
- (FRAME_ARGS_ADDRESS (get_next_frame (frame)) + FRAME_ARGS_SKIP + sigcontext_offs,
+ (DEPRECATED_FRAME_ARGS_ADDRESS (get_next_frame (frame)) + FRAME_ARGS_SKIP + sigcontext_offs,
builtin_type_void_data_ptr);
else
sigcontext_addr = read_memory_typed_address
@@ -357,12 +357,6 @@ ns32k_frame_args_address (struct frame_info *frame)
return (read_register (SP_REGNUM) - 4);
}
-static CORE_ADDR
-ns32k_frame_locals_address (struct frame_info *frame)
-{
- return (get_frame_base (frame));
-}
-
/* Code to initialize the addresses of the saved registers of frame described
by FRAME_INFO. This includes special registers such as pc and fp saved in
special ways in the stack frame. sp is even more special: the address we
@@ -503,7 +497,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
@@ -513,7 +507,7 @@ ns32k_gdbarch_init_32082 (struct gdbarch *gdbarch)
set_gdbarch_register_name (gdbarch, ns32k_register_name_32082);
set_gdbarch_deprecated_register_bytes (gdbarch, NS32K_REGISTER_BYTES_32082);
- set_gdbarch_register_byte (gdbarch, ns32k_register_byte_32082);
+ set_gdbarch_deprecated_register_byte (gdbarch, ns32k_register_byte_32082);
}
void
@@ -523,7 +517,7 @@ ns32k_gdbarch_init_32382 (struct gdbarch *gdbarch)
set_gdbarch_register_name (gdbarch, ns32k_register_name_32382);
set_gdbarch_deprecated_register_bytes (gdbarch, NS32K_REGISTER_BYTES_32382);
- set_gdbarch_register_byte (gdbarch, ns32k_register_byte_32382);
+ set_gdbarch_deprecated_register_byte (gdbarch, ns32k_register_byte_32382);
}
/* Initialize the current architecture based on INFO. If possible, re-use an
@@ -557,12 +551,12 @@ ns32k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_num_regs (gdbarch, NS32K_PS_REGNUM);
set_gdbarch_deprecated_register_size (gdbarch, NS32K_REGISTER_SIZE);
- set_gdbarch_register_raw_size (gdbarch, ns32k_register_raw_size);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, ns32k_register_raw_size);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, NS32K_MAX_REGISTER_RAW_SIZE);
- set_gdbarch_register_virtual_size (gdbarch, ns32k_register_virtual_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, ns32k_register_virtual_size);
set_gdbarch_deprecated_max_register_virtual_size (gdbarch,
NS32K_MAX_REGISTER_VIRTUAL_SIZE);
- set_gdbarch_register_virtual_type (gdbarch, ns32k_register_virtual_type);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, ns32k_register_virtual_type);
/* Frame and stack info */
set_gdbarch_skip_prologue (gdbarch, umax_skip_prologue);
@@ -575,8 +569,7 @@ ns32k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_frame_chain (gdbarch, ns32k_frame_chain);
set_gdbarch_deprecated_frame_saved_pc (gdbarch, ns32k_frame_saved_pc);
- set_gdbarch_frame_args_address (gdbarch, ns32k_frame_args_address);
- set_gdbarch_frame_locals_address (gdbarch, ns32k_frame_locals_address);
+ set_gdbarch_deprecated_frame_args_address (gdbarch, ns32k_frame_args_address);
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, ns32k_frame_init_saved_regs);
@@ -611,7 +604,7 @@ ns32k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_function_start_offset (gdbarch, 0);
/* Should be using push_dummy_call. */
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
/* Hook in OS ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch);
@@ -619,6 +612,8 @@ ns32k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
return (gdbarch);
}
+extern initialize_file_ftype _initialize_ns32k_tdep; /* -Wmissing-prototypes */
+
void
_initialize_ns32k_tdep (void)
{
diff --git a/gdb/ns32knbsd-tdep.c b/gdb/ns32knbsd-tdep.c
index 33b99d98094..b241851665f 100644
--- a/gdb/ns32knbsd-tdep.c
+++ b/gdb/ns32knbsd-tdep.c
@@ -61,6 +61,8 @@ ns32knbsd_aout_osabi_sniffer (bfd *abfd)
return GDB_OSABI_UNKNOWN;
}
+extern initialize_file_ftype _initialize_ns32knbsd_tdep; /* -Wmissing-prototypes */
+
void
_initialize_ns32knbsd_tdep (void)
{
diff --git a/gdb/nto-tdep.c b/gdb/nto-tdep.c
index 94f156e571b..056b93f5b1a 100644
--- a/gdb/nto-tdep.c
+++ b/gdb/nto-tdep.c
@@ -72,7 +72,7 @@ nto_map_arch_to_cputype (const char *arch)
{
if (!strcmp (arch, "i386") || !strcmp (arch, "x86"))
return CPUTYPE_X86;
- if (!strcmp (arch, "rs6000") || !strcmp (arch, "ppc"))
+ if (!strcmp (arch, "rs6000") || !strcmp (arch, "powerpc"))
return CPUTYPE_PPC;
if (!strcmp (arch, "mips"))
return CPUTYPE_MIPS;
@@ -97,7 +97,8 @@ nto_find_and_open_solib (char *solib, unsigned o_flags, char **temp_pathname)
arch = "x86";
endian = "";
}
- else if (strcmp (TARGET_ARCHITECTURE->arch_name, "rs6000") == 0)
+ else if (strcmp (TARGET_ARCHITECTURE->arch_name, "rs6000") == 0
+ || strcmp (TARGET_ARCHITECTURE->arch_name, "powerpc") == 0)
{
arch = "ppc";
endian = "be";
@@ -130,7 +131,8 @@ nto_init_solib_absolute_prefix (void)
arch = "x86";
endian = "";
}
- else if (strcmp (TARGET_ARCHITECTURE->arch_name, "rs6000") == 0)
+ else if (strcmp (TARGET_ARCHITECTURE->arch_name, "rs6000") == 0
+ || strcmp (TARGET_ARCHITECTURE->arch_name, "powerpc") == 0)
{
arch = "ppc";
endian = "be";
@@ -269,7 +271,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
int which, CORE_ADDR reg_addr)
{
nto_regset_t regset;
-
+
/* See corelow.c:get_core_registers for values of WHICH. */
if (which == 0)
{
@@ -305,11 +307,11 @@ void
_initialize_nto_tdep (void)
{
add_setshow_cmd ("nto-debug", class_maintenance, var_zinteger,
- &nto_internal_debugging, "Set QNX NTO internal debugging.\n\
+ &nto_internal_debugging, "Set QNX NTO internal debugging.\n\
When non-zero, nto specific debug info is\n\
displayed. Different information is displayed\n\
-for different positive values.", "Show QNX NTO internal debugging.\n",
- NULL, NULL, &setdebuglist, &showdebuglist);
+for different positive values.", "Show QNX NTO internal debugging.\n",
+ NULL, NULL, &setdebuglist, &showdebuglist);
/* We use SIG45 for pulses, or something, so nostop, noprint
and pass them. */
diff --git a/gdb/objc-exp.y b/gdb/objc-exp.y
index cd6fe636334..9931f4dedce 100644
--- a/gdb/objc-exp.y
+++ b/gdb/objc-exp.y
@@ -1779,7 +1779,6 @@ yylex ()
CORE_ADDR Class = lookup_objc_class(tmp);
if (Class)
{
- extern struct symbol *lookup_struct_typedef();
yylval.class.class = Class;
if ((sym = lookup_struct_typedef (tmp,
expression_context_block,
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
index 77fec6a1f65..5f2822c4fe0 100644
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -44,6 +44,7 @@
#include "block.h"
#include "infcall.h"
#include "valprint.h"
+#include "gdb_assert.h"
#include <ctype.h>
@@ -75,38 +76,6 @@ struct objc_method {
CORE_ADDR imp;
};
-/* Complaints about ObjC classes, selectors, etc. */
-
-#if (!defined __GNUC__ || __GNUC__ < 2 || __GNUC_MINOR__ < (defined __cplusplus ? 6 : 4))
-#define __CHECK_FUNCTION ((__const char *) 0)
-#else
-#define __CHECK_FUNCTION __PRETTY_FUNCTION__
-#endif
-
-#define CHECK(expression) \
- ((void) ((expression) ? 0 : gdb_check (#expression, __FILE__, __LINE__, \
- __CHECK_FUNCTION)))
-
-#define CHECK_FATAL(expression) \
- ((void) ((expression) ? 0 : gdb_check_fatal (#expression, __FILE__, \
- __LINE__, __CHECK_FUNCTION)))
-
-static void
-gdb_check (const char *str, const char *file,
- unsigned int line, const char *func)
-{
- error ("assertion failure on line %u of \"%s\" in function \"%s\": %s\n",
- line, file, func, str);
-}
-
-static void
-gdb_check_fatal (const char *str, const char *file,
- unsigned int line, const char *func)
-{
- internal_error (file, line,
- "assertion failure in function \"%s\": %s\n", func, str);
-}
-
/* Lookup a structure type named "struct NAME", visible in lexical
block BLOCK. If NOERR is nonzero, return zero if NAME is not
suitably defined. */
@@ -658,7 +627,7 @@ static const struct op_print objc_op_print_tab[] =
{"sizeof ", UNOP_SIZEOF, PREC_PREFIX, 0},
{"++", UNOP_PREINCREMENT, PREC_PREFIX, 0},
{"--", UNOP_PREDECREMENT, PREC_PREFIX, 0},
- {NULL, 0, 0, 0}
+ {NULL, OP_NULL, PREC_NULL, 0}
};
struct type ** const (objc_builtin_types[]) =
@@ -806,7 +775,8 @@ end_msglist(void)
* Used for qsorting lists of objc methods (either by class or selector).
*/
-int specialcmp(char *a, char *b)
+static int
+specialcmp (char *a, char *b)
{
while (*a && *a != ' ' && *a != ']' && *b && *b != ' ' && *b != ']')
{
@@ -1153,7 +1123,7 @@ parse_selector (char *method, char **selector)
char *nselector = NULL;
- CHECK (selector != NULL);
+ gdb_assert (selector != NULL);
s1 = method;
@@ -1212,10 +1182,10 @@ parse_method (char *method, char *type, char **class,
char *ncategory = NULL;
char *nselector = NULL;
- CHECK (type != NULL);
- CHECK (class != NULL);
- CHECK (category != NULL);
- CHECK (selector != NULL);
+ gdb_assert (type != NULL);
+ gdb_assert (class != NULL);
+ gdb_assert (category != NULL);
+ gdb_assert (selector != NULL);
s1 = method;
@@ -1325,8 +1295,8 @@ find_methods (struct symtab *symtab, char type,
static char *tmp = NULL;
static unsigned int tmplen = 0;
- CHECK (nsym != NULL);
- CHECK (ndebug != NULL);
+ gdb_assert (nsym != NULL);
+ gdb_assert (ndebug != NULL);
if (symtab)
block = BLOCKVECTOR_BLOCK (BLOCKVECTOR (symtab), STATIC_BLOCK);
@@ -1438,8 +1408,8 @@ char *find_imps (struct symtab *symtab, struct block *block,
char *buf = NULL;
char *tmp = NULL;
- CHECK (nsym != NULL);
- CHECK (ndebug != NULL);
+ gdb_assert (nsym != NULL);
+ gdb_assert (ndebug != NULL);
if (nsym != NULL)
*nsym = 0;
@@ -1451,6 +1421,7 @@ char *find_imps (struct symtab *symtab, struct block *block,
tmp = parse_method (buf, &type, &class, &category, &selector);
if (tmp == NULL) {
+
struct symbol *sym = NULL;
struct minimal_symbol *msym = NULL;
@@ -1551,7 +1522,7 @@ char *find_imps (struct symtab *symtab, struct block *block,
return method + (tmp - buf);
}
-void
+static void
print_object_command (char *args, int from_tty)
{
struct value *object, *function, *description;
@@ -1639,7 +1610,7 @@ static struct objc_methcall methcalls[] = {
* case the functions have moved for some reason.
*/
-void
+static void
find_objc_msgsend (void)
{
unsigned int i;
@@ -1686,7 +1657,7 @@ struct objc_submethod_helper_data {
CORE_ADDR *new_pc;
};
-int
+static int
find_objc_msgcall_submethod_helper (void * arg)
{
struct objc_submethod_helper_data *s =
@@ -1698,7 +1669,7 @@ find_objc_msgcall_submethod_helper (void * arg)
return 0;
}
-int
+static int
find_objc_msgcall_submethod (int (*f) (CORE_ADDR, CORE_ADDR *),
CORE_ADDR pc,
CORE_ADDR *new_pc)
@@ -1742,6 +1713,8 @@ find_objc_msgcall (CORE_ADDR pc, CORE_ADDR *new_pc)
return 0;
}
+extern initialize_file_ftype _initialize_objc_language; /* -Wmissing-prototypes */
+
void
_initialize_objc_language (void)
{
@@ -1755,60 +1728,6 @@ _initialize_objc_language (void)
add_com_alias ("po", "print-object", class_vars, 1);
}
-#if 1
-/* Disable these functions until we put them in the gdbarch vector. */
-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)
-{
- return read_register (3 + i);
-}
-#elif defined (__i386__)
-static unsigned long FETCH_ARGUMENT (int i)
-{
- CORE_ADDR stack = read_register (SP_REGNUM);
- return read_memory_unsigned_integer (stack + (4 * (i + 1)), 4);
-}
-#elif defined (__sparc__)
-static unsigned long FETCH_ARGUMENT (int i)
-{
- return read_register (O0_REGNUM + i);
-}
-#elif defined (__hppa__) || defined (__hppa)
-static unsigned long FETCH_ARGUMENT (int i)
-{
- return read_register (R0_REGNUM + 26 - i);
-}
-#else
-#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
read_objc_method (CORE_ADDR addr, struct objc_method *method)
{
@@ -1827,7 +1746,7 @@ static void
read_objc_methlist_method (CORE_ADDR addr, unsigned long num,
struct objc_method *method)
{
- CHECK_FATAL (num < read_objc_methlist_nmethods (addr));
+ gdb_assert (num < read_objc_methlist_nmethods (addr));
read_objc_method (addr + 8 + (12 * num), method);
}
@@ -1859,7 +1778,7 @@ read_objc_class (CORE_ADDR addr, struct objc_class *class)
class->protocols = read_memory_unsigned_integer (addr + 36, 4);
}
-CORE_ADDR
+static CORE_ADDR
find_implementation_from_class (CORE_ADDR class, CORE_ADDR sel)
{
CORE_ADDR subclass = class;
@@ -1897,7 +1816,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++;
}
@@ -1907,7 +1828,7 @@ find_implementation_from_class (CORE_ADDR class, CORE_ADDR sel)
return 0;
}
-CORE_ADDR
+static CORE_ADDR
find_implementation (CORE_ADDR object, CORE_ADDR sel)
{
struct objc_object ostr;
@@ -1921,6 +1842,9 @@ find_implementation (CORE_ADDR object, CORE_ADDR sel)
return find_implementation_from_class (ostr.isa, sel);
}
+#define OBJC_FETCH_POINTER_ARGUMENT(argi) \
+ FETCH_POINTER_ARGUMENT (get_current_frame (), argi, builtin_type_void_func_ptr)
+
static int
resolve_msgsend (CORE_ADDR pc, CORE_ADDR *new_pc)
{
@@ -1928,8 +1852,8 @@ resolve_msgsend (CORE_ADDR pc, CORE_ADDR *new_pc)
CORE_ADDR sel;
CORE_ADDR res;
- object = FETCH_ARGUMENT (0);
- sel = FETCH_ARGUMENT (1);
+ object = OBJC_FETCH_POINTER_ARGUMENT (0);
+ sel = OBJC_FETCH_POINTER_ARGUMENT (1);
res = find_implementation (object, sel);
if (new_pc != 0)
@@ -1946,8 +1870,8 @@ resolve_msgsend_stret (CORE_ADDR pc, CORE_ADDR *new_pc)
CORE_ADDR sel;
CORE_ADDR res;
- object = FETCH_ARGUMENT (1);
- sel = FETCH_ARGUMENT (2);
+ object = OBJC_FETCH_POINTER_ARGUMENT (1);
+ sel = OBJC_FETCH_POINTER_ARGUMENT (2);
res = find_implementation (object, sel);
if (new_pc != 0)
@@ -1966,8 +1890,8 @@ resolve_msgsend_super (CORE_ADDR pc, CORE_ADDR *new_pc)
CORE_ADDR sel;
CORE_ADDR res;
- super = FETCH_ARGUMENT (0);
- sel = FETCH_ARGUMENT (1);
+ super = OBJC_FETCH_POINTER_ARGUMENT (0);
+ sel = OBJC_FETCH_POINTER_ARGUMENT (1);
read_objc_super (super, &sstr);
if (sstr.class == 0)
@@ -1990,8 +1914,8 @@ resolve_msgsend_super_stret (CORE_ADDR pc, CORE_ADDR *new_pc)
CORE_ADDR sel;
CORE_ADDR res;
- super = FETCH_ARGUMENT (1);
- sel = FETCH_ARGUMENT (2);
+ super = OBJC_FETCH_POINTER_ARGUMENT (1);
+ sel = OBJC_FETCH_POINTER_ARGUMENT (2);
read_objc_super (super, &sstr);
if (sstr.class == 0)
diff --git a/gdb/objc-lang.h b/gdb/objc-lang.h
index 0c49bac6382..c88a0f7a5fa 100644
--- a/gdb/objc-lang.h
+++ b/gdb/objc-lang.h
@@ -62,4 +62,7 @@ extern void start_msglist (void);
extern void add_msglist (struct stoken *str, int addcolon);
extern int end_msglist (void);
+struct symbol *lookup_struct_typedef (char *name, struct block *block,
+ int noerr);
+
#endif
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 2c525f61f99..39f5623749d 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -614,7 +614,8 @@ void
objfile_relocate (struct objfile *objfile, struct section_offsets *new_offsets)
{
struct section_offsets *delta =
- (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
+ ((struct section_offsets *)
+ alloca (SIZEOF_N_SECTION_OFFSETS (objfile->num_sections)));
{
int i;
diff --git a/gdb/ocd.c b/gdb/ocd.c
index 4dfda5d6d4b..3c8d5d2936d 100644
--- a/gdb/ocd.c
+++ b/gdb/ocd.c
@@ -1365,6 +1365,8 @@ bdm_read_register_command (char *args, int from_tty)
}
+extern initialize_file_ftype _initialize_remote_ocd; /* -Wmissing-prototypes */
+
void
_initialize_remote_ocd (void)
{
diff --git a/gdb/osabi.c b/gdb/osabi.c
index 22414062705..252129ba7f2 100644
--- a/gdb/osabi.c
+++ b/gdb/osabi.c
@@ -384,6 +384,14 @@ generic_elf_osabi_sniff_abi_tag_sections (bfd *abfd, asection *sect, void *obj)
*os_ident_ptr = GDB_OSABI_SOLARIS;
break;
+ case GNU_ABI_TAG_FREEBSD:
+ *os_ident_ptr = GDB_OSABI_FREEBSD_ELF;
+ break;
+
+ case GNU_ABI_TAG_NETBSD:
+ *os_ident_ptr = GDB_OSABI_NETBSD_ELF;
+ break;
+
default:
internal_error
(__FILE__, __LINE__,
@@ -531,7 +539,7 @@ set_osabi (char *args, int from_tty, struct cmd_list_element *c)
internal_error (__FILE__, __LINE__, "Updating OS ABI failed.");
}
-void
+static void
show_osabi (char *args, int from_tty)
{
if (user_osabi_state == osabi_auto)
@@ -546,6 +554,8 @@ show_osabi (char *args, int from_tty)
gdbarch_osabi_name (GDB_OSABI_DEFAULT));
}
+extern initialize_file_ftype _initialize_gdb_osabi; /* -Wmissing-prototype */
+
void
_initialize_gdb_osabi (void)
{
diff --git a/gdb/p-exp.y b/gdb/p-exp.y
index abb4433171f..9ce3eb6d7d1 100644
--- a/gdb/p-exp.y
+++ b/gdb/p-exp.y
@@ -158,8 +158,8 @@ parse_number (char *, int, int, YYSTYPE *);
static struct type *current_type;
-static void push_current_type ();
-static void pop_current_type ();
+static void push_current_type (void);
+static void pop_current_type (void);
static int search_field;
%}
@@ -995,7 +995,8 @@ struct type_push
static struct type_push *tp_top = NULL;
-static void push_current_type ()
+static void
+push_current_type (void)
{
struct type_push *tpnew;
tpnew = (struct type_push *) malloc (sizeof (struct type_push));
@@ -1005,7 +1006,8 @@ static void push_current_type ()
tp_top = tpnew;
}
-static void pop_current_type ()
+static void
+pop_current_type (void)
{
struct type_push *tp = tp_top;
if (tp)
diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c
index 9cfa4d781c6..a4bbaded9a1 100644
--- a/gdb/p-valprint.c
+++ b/gdb/p-valprint.c
@@ -141,7 +141,8 @@ pascal_val_print (struct type *type, char *valaddr, int embedded_offset,
/* Print the unmangled name if desired. */
/* Print vtable entry - we only get here if we ARE using
-fvtable_thunks. (Otherwise, look under TYPE_CODE_STRUCT.) */
- print_address_demangle (extract_address (valaddr + embedded_offset, TYPE_LENGTH (type)),
+ /* Extract the address, assume that it is unsigned. */
+ print_address_demangle (extract_unsigned_integer (valaddr + embedded_offset, TYPE_LENGTH (type)),
stream, demangle);
break;
}
@@ -271,9 +272,11 @@ pascal_val_print (struct type *type, char *valaddr, int embedded_offset,
if (addressprint)
{
fprintf_filtered (stream, "@");
+ /* Extract the address, assume that it is unsigned. */
print_address_numeric
- (extract_address (valaddr + embedded_offset,
- TARGET_PTR_BIT / HOST_CHAR_BIT), 1, stream);
+ (extract_unsigned_integer (valaddr + embedded_offset,
+ TARGET_PTR_BIT / HOST_CHAR_BIT),
+ 1, stream);
if (deref_ref)
fputs_filtered (": ", stream);
}
@@ -311,10 +314,11 @@ pascal_val_print (struct type *type, char *valaddr, int embedded_offset,
/* Print the unmangled name if desired. */
/* Print vtable entry - we only get here if NOT using
-fvtable_thunks. (Otherwise, look under TYPE_CODE_PTR.) */
- print_address_demangle (extract_address (
- valaddr + embedded_offset + TYPE_FIELD_BITPOS (type, VTBL_FNADDR_OFFSET) / 8,
- TYPE_LENGTH (TYPE_FIELD_TYPE (type, VTBL_FNADDR_OFFSET))),
- stream, demangle);
+ /* Extract the address, assume that it is unsigned. */
+ print_address_demangle
+ (extract_unsigned_integer (valaddr + embedded_offset + TYPE_FIELD_BITPOS (type, VTBL_FNADDR_OFFSET) / 8,
+ TYPE_LENGTH (TYPE_FIELD_TYPE (type, VTBL_FNADDR_OFFSET))),
+ stream, demangle);
}
else
{
@@ -1093,6 +1097,7 @@ pascal_object_print_class_member (char *valaddr, struct type *domain,
fprintf_filtered (stream, "%ld", (long int) (val >> 3));
}
+extern initialize_file_ftype _initialize_pascal_valprint; /* -Wmissing-prototypes */
void
_initialize_pascal_valprint (void)
diff --git a/gdb/pa64solib.c b/gdb/pa64solib.c
index 43910dad46f..b67532d3759 100644
--- a/gdb/pa64solib.c
+++ b/gdb/pa64solib.c
@@ -222,9 +222,9 @@ pa64_solib_add_solib_objfile (struct so_list *so, char *name, int from_tty,
bfd *tmp_bfd;
asection *sec;
obj_private_data_t *obj_private;
- struct section_addr_info section_addrs;
+ struct section_addr_info *section_addrs;
+ struct cleanup *my_cleanups;
- memset (&section_addrs, 0, sizeof (section_addrs));
/* We need the BFD so that we can look at its sections. We open up the
file temporarily, then close it when we are done. */
tmp_bfd = bfd_openr (name, gnutarget);
@@ -262,15 +262,18 @@ pa64_solib_add_solib_objfile (struct so_list *so, char *name, int from_tty,
text_addr += sec->filepos;
}
+ section_addrs = alloc_section_addr_info (bfd_count_sections (tmp_bfd));
+ my_cleanups = make_cleanup (xfree, section_addrs);
+
/* We are done with the temporary bfd. Get rid of it and make sure
nobody else can us it. */
bfd_close (tmp_bfd);
tmp_bfd = NULL;
/* Now let the generic code load up symbols for this library. */
- section_addrs.other[0].addr = text_addr;
- section_addrs.other[0].name = ".text";
- so->objfile = symbol_file_add (name, from_tty, &section_addrs, 0, OBJF_SHARED);
+ section_addrs->other[0].addr = text_addr;
+ section_addrs->other[0].name = ".text";
+ so->objfile = symbol_file_add (name, from_tty, section_addrs, 0, OBJF_SHARED);
so->abfd = so->objfile->obfd;
/* Mark this as a shared library and save private data. */
@@ -289,6 +292,7 @@ pa64_solib_add_solib_objfile (struct so_list *so, char *name, int from_tty,
obj_private = (obj_private_data_t *) so->objfile->obj_private;
obj_private->so_info = so;
obj_private->dp = so->pa64_solib_desc.linkage_ptr;
+ do_cleanups (my_cleanups);
}
/* Load debugging information for a shared library. TARGET may be
diff --git a/gdb/ppc-bdm.c b/gdb/ppc-bdm.c
index 9e7133e10ac..f1898187cf6 100644
--- a/gdb/ppc-bdm.c
+++ b/gdb/ppc-bdm.c
@@ -346,6 +346,8 @@ a wiggler, specify wiggler and then the port it is connected to\n\
bdm_ppc_ops.to_magic = OPS_MAGIC;
} /* init_bdm_ppc_ops */
+extern initialize_file_ftype _initialize_bdm_ppc; /* -Wmissing-prototypes */
+
void
_initialize_bdm_ppc (void)
{
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index 20c8adda44a..d0bff2ef7bd 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -127,32 +127,37 @@ ppc_register_u_addr (int regno)
{
int u_addr = -1;
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ int wordsize = tdep->wordsize;
/* General purpose registers occupy 1 slot each in the buffer */
if (regno >= tdep->ppc_gp0_regnum && regno <= tdep->ppc_gplast_regnum )
- u_addr = ((PT_R0 + regno) * 4);
+ u_addr = ((PT_R0 + regno) * wordsize);
- /* Floating point regs: 2 slots each */
+ /* Floating point regs: eight bytes each in both 32- and 64-bit
+ ptrace interfaces. Thus, two slots each in 32-bit interface, one
+ slot each in 64-bit interface. */
if (regno >= FP0_REGNUM && regno <= FPLAST_REGNUM)
- u_addr = ((PT_FPR0 + (regno - FP0_REGNUM) * 2) * 4);
+ u_addr = (PT_FPR0 * wordsize) + ((regno - FP0_REGNUM) * 8);
/* UISA special purpose registers: 1 slot each */
if (regno == PC_REGNUM)
- u_addr = PT_NIP * 4;
+ u_addr = PT_NIP * wordsize;
if (regno == tdep->ppc_lr_regnum)
- u_addr = PT_LNK * 4;
+ u_addr = PT_LNK * wordsize;
if (regno == tdep->ppc_cr_regnum)
- u_addr = PT_CCR * 4;
+ u_addr = PT_CCR * wordsize;
if (regno == tdep->ppc_xer_regnum)
- u_addr = PT_XER * 4;
+ u_addr = PT_XER * wordsize;
if (regno == tdep->ppc_ctr_regnum)
- u_addr = PT_CTR * 4;
+ u_addr = PT_CTR * wordsize;
+#ifdef PT_MQ
if (regno == tdep->ppc_mq_regnum)
- u_addr = PT_MQ * 4;
+ u_addr = PT_MQ * wordsize;
+#endif
if (regno == tdep->ppc_ps_regnum)
- u_addr = PT_MSR * 4;
+ u_addr = PT_MSR * wordsize;
if (regno == tdep->ppc_fpscr_regnum)
- u_addr = PT_FPSCR * 4;
+ u_addr = PT_FPSCR * wordsize;
return u_addr;
}
@@ -426,7 +431,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 +444,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");
}
@@ -503,9 +508,11 @@ fill_gregset (gdb_gregset_t *gregsetp, int regno)
regcache_collect (tdep->ppc_xer_regnum, regp + PT_XER);
if ((regno == -1) || regno == tdep->ppc_ctr_regnum)
regcache_collect (tdep->ppc_ctr_regnum, regp + PT_CTR);
+#ifdef PT_MQ
if (((regno == -1) || regno == tdep->ppc_mq_regnum)
&& (tdep->ppc_mq_regnum != -1))
regcache_collect (tdep->ppc_mq_regnum, regp + PT_MQ);
+#endif
if ((regno == -1) || regno == tdep->ppc_ps_regnum)
regcache_collect (tdep->ppc_ps_regnum, regp + PT_MSR);
}
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index 9284751fd0c..05b051045bf 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -229,7 +229,7 @@ ppc_linux_at_sigtramp_return_path (CORE_ADDR pc)
&& insn_is_sigreturn (extract_unsigned_integer (buf, 4))));
}
-CORE_ADDR
+static CORE_ADDR
ppc_linux_skip_trampoline_code (CORE_ADDR pc)
{
char buf[4];
@@ -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)
@@ -632,6 +632,315 @@ ppc_linux_svr4_fetch_link_map_offsets (void)
return lmp;
}
+
+/* Macros for matching instructions. Note that, since all the
+ operands are masked off before they're or-ed into the instruction,
+ you can use -1 to make masks. */
+
+#define insn_d(opcd, rts, ra, d) \
+ ((((opcd) & 0x3f) << 26) \
+ | (((rts) & 0x1f) << 21) \
+ | (((ra) & 0x1f) << 16) \
+ | ((d) & 0xffff))
+
+#define insn_ds(opcd, rts, ra, d, xo) \
+ ((((opcd) & 0x3f) << 26) \
+ | (((rts) & 0x1f) << 21) \
+ | (((ra) & 0x1f) << 16) \
+ | ((d) & 0xfffc) \
+ | ((xo) & 0x3))
+
+#define insn_xfx(opcd, rts, spr, xo) \
+ ((((opcd) & 0x3f) << 26) \
+ | (((rts) & 0x1f) << 21) \
+ | (((spr) & 0x1f) << 16) \
+ | (((spr) & 0x3e0) << 6) \
+ | (((xo) & 0x3ff) << 1))
+
+/* Read a PPC instruction from memory. PPC instructions are always
+ big-endian, no matter what endianness the program is running in, so
+ we can't use read_memory_integer or one of its friends here. */
+static unsigned int
+read_insn (CORE_ADDR pc)
+{
+ unsigned char buf[4];
+
+ read_memory (pc, buf, 4);
+ return (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3];
+}
+
+
+/* An instruction to match. */
+struct insn_pattern
+{
+ unsigned int mask; /* mask the insn with this... */
+ unsigned int data; /* ...and see if it matches this. */
+ int optional; /* If non-zero, this insn may be absent. */
+};
+
+/* Return non-zero if the instructions at PC match the series
+ described in PATTERN, or zero otherwise. PATTERN is an array of
+ 'struct insn_pattern' objects, terminated by an entry whose mask is
+ zero.
+
+ When the match is successful, fill INSN[i] with what PATTERN[i]
+ matched. If PATTERN[i] is optional, and the instruction wasn't
+ present, set INSN[i] to 0 (which is not a valid PPC instruction).
+ INSN should have as many elements as PATTERN. Note that, if
+ PATTERN contains optional instructions which aren't present in
+ memory, then INSN will have holes, so INSN[i] isn't necessarily the
+ i'th instruction in memory. */
+static int
+insns_match_pattern (CORE_ADDR pc,
+ struct insn_pattern *pattern,
+ unsigned int *insn)
+{
+ int i;
+
+ for (i = 0; pattern[i].mask; i++)
+ {
+ insn[i] = read_insn (pc);
+ if ((insn[i] & pattern[i].mask) == pattern[i].data)
+ pc += 4;
+ else if (pattern[i].optional)
+ insn[i] = 0;
+ else
+ return 0;
+ }
+
+ return 1;
+}
+
+
+/* Return the 'd' field of the d-form instruction INSN, properly
+ sign-extended. */
+static CORE_ADDR
+insn_d_field (unsigned int insn)
+{
+ return ((((CORE_ADDR) insn & 0xffff) ^ 0x8000) - 0x8000);
+}
+
+
+/* Return the 'ds' field of the ds-form instruction INSN, with the two
+ zero bits concatenated at the right, and properly
+ sign-extended. */
+static CORE_ADDR
+insn_ds_field (unsigned int insn)
+{
+ return ((((CORE_ADDR) insn & 0xfffc) ^ 0x8000) - 0x8000);
+}
+
+
+/* If DESC is the address of a 64-bit PowerPC GNU/Linux function
+ descriptor, return the descriptor's entry point. */
+static CORE_ADDR
+ppc64_desc_entry_point (CORE_ADDR desc)
+{
+ /* The first word of the descriptor is the entry point. */
+ return (CORE_ADDR) read_memory_unsigned_integer (desc, 8);
+}
+
+
+/* Pattern for the standard linkage function. These are built by
+ build_plt_stub in elf64-ppc.c, whose GLINK argument is always
+ zero. */
+static struct insn_pattern ppc64_standard_linkage[] =
+ {
+ /* addis r12, r2, <any> */
+ { insn_d (-1, -1, -1, 0), insn_d (15, 12, 2, 0), 0 },
+
+ /* std r2, 40(r1) */
+ { -1, insn_ds (62, 2, 1, 40, 0), 0 },
+
+ /* ld r11, <any>(r12) */
+ { insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 11, 12, 0, 0), 0 },
+
+ /* addis r12, r12, 1 <optional> */
+ { insn_d (-1, -1, -1, -1), insn_d (15, 12, 2, 1), 1 },
+
+ /* ld r2, <any>(r12) */
+ { insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 2, 12, 0, 0), 0 },
+
+ /* addis r12, r12, 1 <optional> */
+ { insn_d (-1, -1, -1, -1), insn_d (15, 12, 2, 1), 1 },
+
+ /* mtctr r11 */
+ { insn_xfx (-1, -1, -1, -1), insn_xfx (31, 11, 9, 467),
+ 0 },
+
+ /* ld r11, <any>(r12) */
+ { insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 11, 12, 0, 0), 0 },
+
+ /* bctr */
+ { -1, 0x4e800420, 0 },
+
+ { 0, 0, 0 }
+ };
+#define PPC64_STANDARD_LINKAGE_LEN \
+ (sizeof (ppc64_standard_linkage) / sizeof (ppc64_standard_linkage[0]))
+
+
+/* Recognize a 64-bit PowerPC GNU/Linux linkage function --- what GDB
+ calls a "solib trampoline". */
+static int
+ppc64_in_solib_call_trampoline (CORE_ADDR pc, char *name)
+{
+ /* Detecting solib call trampolines on PPC64 GNU/Linux is a pain.
+
+ It's not specifically solib call trampolines that are the issue.
+ Any call from one function to another function that uses a
+ different TOC requires a trampoline, to save the caller's TOC
+ pointer and then load the callee's TOC. An executable or shared
+ library may have more than one TOC, so even intra-object calls
+ may require a trampoline. Since executable and shared libraries
+ will all have their own distinct TOCs, every inter-object call is
+ also an inter-TOC call, and requires a trampoline --- so "solib
+ call trampolines" are just a special case.
+
+ The 64-bit PowerPC GNU/Linux ABI calls these call trampolines
+ "linkage functions". Since they need to be near the functions
+ that call them, they all appear in .text, not in any special
+ section. The .plt section just contains an array of function
+ descriptors, from which the linkage functions load the callee's
+ entry point, TOC value, and environment pointer. So
+ in_plt_section is useless. The linkage functions don't have any
+ special linker symbols to name them, either.
+
+ The only way I can see to recognize them is to actually look at
+ their code. They're generated by ppc_build_one_stub and some
+ other functions in bfd/elf64-ppc.c, so that should show us all
+ the instruction sequences we need to recognize. */
+ unsigned int insn[PPC64_STANDARD_LINKAGE_LEN];
+
+ return insns_match_pattern (pc, ppc64_standard_linkage, insn);
+}
+
+
+/* When the dynamic linker is doing lazy symbol resolution, the first
+ call to a function in another object will go like this:
+
+ - The user's function calls the linkage function:
+
+ 100007c4: 4b ff fc d5 bl 10000498
+ 100007c8: e8 41 00 28 ld r2,40(r1)
+
+ - The linkage function loads the entry point (and other stuff) from
+ the function descriptor in the PLT, and jumps to it:
+
+ 10000498: 3d 82 00 00 addis r12,r2,0
+ 1000049c: f8 41 00 28 std r2,40(r1)
+ 100004a0: e9 6c 80 98 ld r11,-32616(r12)
+ 100004a4: e8 4c 80 a0 ld r2,-32608(r12)
+ 100004a8: 7d 69 03 a6 mtctr r11
+ 100004ac: e9 6c 80 a8 ld r11,-32600(r12)
+ 100004b0: 4e 80 04 20 bctr
+
+ - But since this is the first time that PLT entry has been used, it
+ sends control to its glink entry. That loads the number of the
+ PLT entry and jumps to the common glink0 code:
+
+ 10000c98: 38 00 00 00 li r0,0
+ 10000c9c: 4b ff ff dc b 10000c78
+
+ - The common glink0 code then transfers control to the dynamic
+ linker's fixup code:
+
+ 10000c78: e8 41 00 28 ld r2,40(r1)
+ 10000c7c: 3d 82 00 00 addis r12,r2,0
+ 10000c80: e9 6c 80 80 ld r11,-32640(r12)
+ 10000c84: e8 4c 80 88 ld r2,-32632(r12)
+ 10000c88: 7d 69 03 a6 mtctr r11
+ 10000c8c: e9 6c 80 90 ld r11,-32624(r12)
+ 10000c90: 4e 80 04 20 bctr
+
+ Eventually, this code will figure out how to skip all of this,
+ including the dynamic linker. At the moment, we just get through
+ the linkage function. */
+
+/* If the current thread is about to execute a series of instructions
+ at PC matching the ppc64_standard_linkage pattern, and INSN is the result
+ from that pattern match, return the code address to which the
+ standard linkage function will send them. (This doesn't deal with
+ dynamic linker lazy symbol resolution stubs.) */
+static CORE_ADDR
+ppc64_standard_linkage_target (CORE_ADDR pc, unsigned int *insn)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+ /* The address of the function descriptor this linkage function
+ references. */
+ CORE_ADDR desc
+ = ((CORE_ADDR) read_register (tdep->ppc_gp0_regnum + 2)
+ + (insn_d_field (insn[0]) << 16)
+ + insn_ds_field (insn[2]));
+
+ /* The first word of the descriptor is the entry point. Return that. */
+ return ppc64_desc_entry_point (desc);
+}
+
+
+/* Given that we've begun executing a call trampoline at PC, return
+ the entry point of the function the trampoline will go to. */
+static CORE_ADDR
+ppc64_skip_trampoline_code (CORE_ADDR pc)
+{
+ unsigned int ppc64_standard_linkage_insn[PPC64_STANDARD_LINKAGE_LEN];
+
+ if (insns_match_pattern (pc, ppc64_standard_linkage,
+ ppc64_standard_linkage_insn))
+ return ppc64_standard_linkage_target (pc, ppc64_standard_linkage_insn);
+ else
+ return 0;
+}
+
+
+/* Support for CONVERT_FROM_FUNC_PTR_ADDR(ADDR) on PPC64 GNU/Linux.
+
+ Usually a function pointer's representation is simply the address
+ of the function. On GNU/Linux on the 64-bit PowerPC however, a
+ function pointer is represented by a pointer to a TOC entry. This
+ TOC entry contains three words, the first word is the address of
+ the function, the second word is the TOC pointer (r2), and the
+ third word is the static chain value. Throughout GDB it is
+ currently assumed that a function pointer contains the address of
+ the function, which is not easy to fix. In addition, the
+ conversion of a function address to a function pointer would
+ require allocation of a TOC entry in the inferior's memory space,
+ with all its drawbacks. To be able to call C++ virtual methods in
+ the inferior (which are called via function pointers),
+ find_function_addr uses this function to get the function address
+ from a function pointer. */
+
+/* Return real function address if ADDR (a function pointer) is in the data
+ space and is therefore a special function pointer. */
+
+static CORE_ADDR
+ppc64_linux_convert_from_func_ptr_addr (CORE_ADDR addr)
+{
+ struct obj_section *s;
+
+ s = find_pc_section (addr);
+ if (s && s->the_bfd_section->flags & SEC_CODE)
+ return addr;
+
+ /* ADDR is in the data space, so it's a pointer to a descriptor, not
+ the entry point. */
+ return ppc64_desc_entry_point (addr);
+}
+
+
+/* On 64-bit PowerPC GNU/Linux, the ELF header's e_entry field is the
+ address of a function descriptor for the entry point function, not
+ the actual entry point itself. So to find the actual address at
+ which execution should begin, we need to fetch the function's entry
+ point from that descriptor. */
+static CORE_ADDR
+ppc64_call_dummy_address (void)
+{
+ return ppc64_desc_entry_point (entry_point_address ());
+}
+
+
enum {
ELF_NGREG = 48,
ELF_NFPREG = 33,
@@ -743,9 +1052,27 @@ ppc_linux_init_abi (struct gdbarch_info info,
set_gdbarch_memory_remove_breakpoint (gdbarch,
ppc_linux_memory_remove_breakpoint);
+ /* Shared library handling. */
+ set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section);
+ set_gdbarch_skip_trampoline_code (gdbarch,
+ ppc_linux_skip_trampoline_code);
set_solib_svr4_fetch_link_map_offsets
(gdbarch, ppc_linux_svr4_fetch_link_map_offsets);
}
+
+ if (tdep->wordsize == 8)
+ {
+ /* Handle PPC64 GNU/Linux function pointers (which are really
+ function descriptors). */
+ set_gdbarch_convert_from_func_ptr_addr
+ (gdbarch, ppc64_linux_convert_from_func_ptr_addr);
+
+ set_gdbarch_call_dummy_address (gdbarch, ppc64_call_dummy_address);
+
+ set_gdbarch_in_solib_call_trampoline
+ (gdbarch, ppc64_in_solib_call_trampoline);
+ set_gdbarch_skip_trampoline_code (gdbarch, ppc64_skip_trampoline_code);
+ }
}
void
diff --git a/gdb/ppcbug-rom.c b/gdb/ppcbug-rom.c
index 712af06d3ff..0619964eef3 100644
--- a/gdb/ppcbug-rom.c
+++ b/gdb/ppcbug-rom.c
@@ -196,6 +196,8 @@ ppcbug_open1 (char *args, int from_tty)
monitor_open (args, &ppcbug_cmds1, from_tty);
}
+extern initialize_file_ftype _initialize_ppcbug_rom; /* -Wmissing-prototypes */
+
void
_initialize_ppcbug_rom (void)
{
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 89682344414..9d58507d335 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -141,9 +141,6 @@ static void disable_display_command (char *, int);
static void printf_command (char *, int);
-static void print_frame_nameless_args (struct frame_info *, long,
- int, int, struct ui_file *);
-
static void display_info (char *, int);
static void do_one_display (struct display *);
@@ -1747,225 +1744,6 @@ print_variable_value (struct symbol *var, struct frame_info *frame,
value_print (val, stream, 0, Val_pretty_default);
}
-/* Print the arguments of a stack frame, given the function FUNC
- running in that frame (as a symbol), the info on the frame,
- and the number of args according to the stack frame (or -1 if unknown). */
-
-/* References here and elsewhere to "number of args according to the
- stack frame" appear in all cases to refer to "number of ints of args
- according to the stack frame". At least for VAX, i386, isi. */
-
-void
-print_frame_args (struct symbol *func, struct frame_info *fi, int num,
- struct ui_file *stream)
-{
- struct block *b = NULL;
- int first = 1;
- struct dict_iterator iter;
- register struct symbol *sym;
- struct value *val;
- /* Offset of next stack argument beyond the one we have seen that is
- at the highest offset.
- -1 if we haven't come to a stack argument yet. */
- long highest_offset = -1;
- int arg_size;
- /* Number of ints of arguments that we have printed so far. */
- int args_printed = 0;
- struct cleanup *old_chain, *list_chain;
- struct ui_stream *stb;
-
- stb = ui_out_stream_new (uiout);
- old_chain = make_cleanup_ui_out_stream_delete (stb);
-
- if (func)
- {
- b = SYMBOL_BLOCK_VALUE (func);
-
- ALL_BLOCK_SYMBOLS (b, iter, sym)
- {
- QUIT;
-
- /* Keep track of the highest stack argument offset seen, and
- skip over any kinds of symbols we don't care about. */
-
- switch (SYMBOL_CLASS (sym))
- {
- case LOC_ARG:
- case LOC_REF_ARG:
- {
- long current_offset = SYMBOL_VALUE (sym);
- arg_size = TYPE_LENGTH (SYMBOL_TYPE (sym));
-
- /* Compute address of next argument by adding the size of
- this argument and rounding to an int boundary. */
- current_offset =
- ((current_offset + arg_size + sizeof (int) - 1)
- & ~(sizeof (int) - 1));
-
- /* If this is the highest offset seen yet, set highest_offset. */
- if (highest_offset == -1
- || (current_offset > highest_offset))
- highest_offset = current_offset;
-
- /* Add the number of ints we're about to print to args_printed. */
- args_printed += (arg_size + sizeof (int) - 1) / sizeof (int);
- }
-
- /* We care about types of symbols, but don't need to keep track of
- stack offsets in them. */
- case LOC_REGPARM:
- case LOC_REGPARM_ADDR:
- case LOC_LOCAL_ARG:
- case LOC_BASEREG_ARG:
- case LOC_COMPUTED_ARG:
- break;
-
- /* Other types of symbols we just skip over. */
- default:
- continue;
- }
-
- /* We have to look up the symbol because arguments can have
- two entries (one a parameter, one a local) and the one we
- want is the local, which lookup_symbol will find for us.
- This includes gcc1 (not gcc2) on the sparc when passing a
- small structure and gcc2 when the argument type is float
- and it is passed as a double and converted to float by
- the prologue (in the latter case the type of the LOC_ARG
- symbol is double and the type of the LOC_LOCAL symbol is
- float). */
- /* But if the parameter name is null, don't try it.
- Null parameter names occur on the RS/6000, for traceback tables.
- FIXME, should we even print them? */
-
- if (*DEPRECATED_SYMBOL_NAME (sym))
- {
- struct symbol *nsym;
- nsym = lookup_symbol
- (DEPRECATED_SYMBOL_NAME (sym),
- b, VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL);
- if (SYMBOL_CLASS (nsym) == LOC_REGISTER)
- {
- /* There is a LOC_ARG/LOC_REGISTER pair. This means that
- it was passed on the stack and loaded into a register,
- or passed in a register and stored in a stack slot.
- GDB 3.x used the LOC_ARG; GDB 4.0-4.11 used the LOC_REGISTER.
-
- Reasons for using the LOC_ARG:
- (1) because find_saved_registers may be slow for remote
- debugging,
- (2) because registers are often re-used and stack slots
- rarely (never?) are. Therefore using the stack slot is
- much less likely to print garbage.
-
- Reasons why we might want to use the LOC_REGISTER:
- (1) So that the backtrace prints the same value as
- "print foo". I see no compelling reason why this needs
- to be the case; having the backtrace print the value which
- was passed in, and "print foo" print the value as modified
- within the called function, makes perfect sense to me.
-
- Additional note: It might be nice if "info args" displayed
- both values.
- One more note: There is a case with sparc structure passing
- where we need to use the LOC_REGISTER, but this is dealt with
- by creating a single LOC_REGPARM in symbol reading. */
-
- /* Leave sym (the LOC_ARG) alone. */
- ;
- }
- else
- sym = nsym;
- }
-
- /* Print the current arg. */
- if (!first)
- ui_out_text (uiout, ", ");
- ui_out_wrap_hint (uiout, " ");
-
- annotate_arg_begin ();
-
- list_chain = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
- fprintf_symbol_filtered (stb->stream, SYMBOL_PRINT_NAME (sym),
- SYMBOL_LANGUAGE (sym), DMGL_PARAMS | DMGL_ANSI);
- ui_out_field_stream (uiout, "name", stb);
- annotate_arg_name_end ();
- ui_out_text (uiout, "=");
-
- /* Avoid value_print because it will deref ref parameters. We just
- want to print their addresses. Print ??? for args whose address
- we do not know. We pass 2 as "recurse" to val_print because our
- standard indentation here is 4 spaces, and val_print indents
- 2 for each recurse. */
- val = read_var_value (sym, fi);
-
- annotate_arg_value (val == NULL ? NULL : VALUE_TYPE (val));
-
- if (val)
- {
- val_print (VALUE_TYPE (val), VALUE_CONTENTS (val), 0,
- VALUE_ADDRESS (val),
- stb->stream, 0, 0, 2, Val_no_prettyprint);
- ui_out_field_stream (uiout, "value", stb);
- }
- else
- ui_out_text (uiout, "???");
-
- /* Invoke ui_out_tuple_end. */
- do_cleanups (list_chain);
-
- annotate_arg_end ();
-
- first = 0;
- }
- }
-
- /* Don't print nameless args in situations where we don't know
- enough about the stack to find them. */
- if (num != -1)
- {
- long start;
-
- if (highest_offset == -1)
- start = FRAME_ARGS_SKIP;
- else
- start = highest_offset;
-
- print_frame_nameless_args (fi, start, num - args_printed,
- first, stream);
- }
- do_cleanups (old_chain);
-}
-
-/* Print nameless args on STREAM.
- FI is the frameinfo for this frame, START is the offset
- of the first nameless arg, and NUM is the number of nameless args to
- print. FIRST is nonzero if this is the first argument (not just
- the first nameless arg). */
-
-static void
-print_frame_nameless_args (struct frame_info *fi, long start, int num,
- int first, struct ui_file *stream)
-{
- int i;
- CORE_ADDR argsaddr;
- long arg_value;
-
- for (i = 0; i < num; i++)
- {
- QUIT;
- argsaddr = get_frame_args_address (fi);
- if (!argsaddr)
- return;
- arg_value = read_memory_integer (argsaddr + start, sizeof (int));
- if (!first)
- fprintf_filtered (stream, ", ");
- fprintf_filtered (stream, "%ld", arg_value);
- first = 0;
- start += sizeof (int);
- }
-}
-
/* ARGSUSED */
static void
printf_command (char *arg, int from_tty)
diff --git a/gdb/rdi-share/host.h b/gdb/rdi-share/host.h
index 9944c15b714..121a823fcd9 100644
--- a/gdb/rdi-share/host.h
+++ b/gdb/rdi-share/host.h
@@ -214,4 +214,7 @@ extern double strtod(const char *str, char **ptr);
#endif
+/* Needs to be supplied by the host. */
+extern void Fail (const char *, ...);
+
/* end of host.h */
diff --git a/gdb/regcache.c b/gdb/regcache.c
index 09b48f01054..509390f9172 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -82,7 +82,7 @@ struct regcache_descr
struct type **register_type;
};
-void
+static void
init_legacy_regcache_descr (struct gdbarch *gdbarch,
struct regcache_descr *descr)
{
@@ -340,7 +340,7 @@ regcache_xfree (struct regcache *regcache)
xfree (regcache);
}
-void
+static void
do_regcache_xfree (void *data)
{
regcache_xfree (data);
@@ -423,8 +423,7 @@ static int
do_cooked_read (void *src, int regnum, void *buf)
{
struct regcache *regcache = src;
- if (!regcache_valid_p (regcache, regnum)
- && regcache->readonly_p)
+ if (!regcache->register_valid_p[regnum] && regcache->readonly_p)
/* Don't even think about fetching a register from a read-only
cache when the register isn't yet valid. There isn't a target
from which the register value can be fetched. */
@@ -1064,7 +1063,7 @@ typedef void (regcache_read_ftype) (struct regcache *regcache, int regnum,
typedef void (regcache_write_ftype) (struct regcache *regcache, int regnum,
const void *buf);
-void
+static void
regcache_xfer_part (struct regcache *regcache, int regnum,
int offset, int len, void *in, const void *out,
regcache_read_ftype *read, regcache_write_ftype *write)
@@ -1267,41 +1266,16 @@ regcache_collect (int regnum, void *buf)
/* read_pc, write_pc, read_sp, deprecated_read_fp, etc. Special
handling for registers PC, SP, and FP. */
-/* NOTE: cagney/2001-02-18: The functions generic_target_read_pc(),
- read_pc_pid(), read_pc(), generic_target_write_pc(),
- write_pc_pid(), write_pc(), generic_target_read_sp(), read_sp(),
- generic_target_write_sp(), and deprecated_read_fp(), will
- eventually be moved out of the reg-cache into either frame.[hc] or
- to the multi-arch framework. The are not part of the raw register
- cache. */
-
-/* This routine is getting awfully cluttered with #if's. It's probably
- time to turn this into READ_PC and define it in the tm.h file.
- Ditto for write_pc.
-
- 1999-06-08: The following were re-written so that it assumes the
- existence of a TARGET_READ_PC et.al. macro. A default generic
- version of that macro is made available where needed.
+/* NOTE: cagney/2001-02-18: The functions read_pc_pid(), read_pc(),
+ read_sp(), and deprecated_read_fp(), will eventually be replaced by
+ per-frame methods. Instead of relying on the global INFERIOR_PTID,
+ they will use the contextual information provided by the FRAME.
+ These functions do not belong in the register cache. */
- Since the ``TARGET_READ_PC'' et.al. macro is going to be controlled
- by the multi-arch framework, it will eventually be possible to
- eliminate the intermediate read_pc_pid(). The client would call
- TARGET_READ_PC directly. (cagney). */
-
-CORE_ADDR
-generic_target_read_pc (ptid_t ptid)
-{
-#ifdef PC_REGNUM
- if (PC_REGNUM >= 0)
- {
- CORE_ADDR pc_val = ADDR_BITS_REMOVE ((CORE_ADDR) read_register_pid (PC_REGNUM, ptid));
- return pc_val;
- }
-#endif
- internal_error (__FILE__, __LINE__,
- "generic_target_read_pc");
- return 0;
-}
+/* NOTE: cagney/2003-06-07: The functions generic_target_write_pc(),
+ write_pc_pid(), write_pc(), and deprecated_read_fp(), all need to
+ be replaced by something that does not rely on global state. But
+ what? */
CORE_ADDR
read_pc_pid (ptid_t ptid)
@@ -1313,7 +1287,17 @@ read_pc_pid (ptid_t ptid)
saved_inferior_ptid = inferior_ptid;
inferior_ptid = ptid;
- pc_val = TARGET_READ_PC (ptid);
+ if (TARGET_READ_PC_P ())
+ pc_val = TARGET_READ_PC (ptid);
+ /* Else use per-frame method on get_current_frame. */
+ else if (PC_REGNUM >= 0)
+ {
+ CORE_ADDR raw_val = read_register_pid (PC_REGNUM, ptid);
+ CORE_ADDR pc_val = ADDR_BITS_REMOVE (raw_val);
+ return pc_val;
+ }
+ else
+ internal_error (__FILE__, __LINE__, "read_pc_pid: Unable to find PC");
inferior_ptid = saved_inferior_ptid;
return pc_val;
@@ -1362,34 +1346,24 @@ write_pc (CORE_ADDR pc)
/* Cope with strage ways of getting to the stack and frame pointers */
CORE_ADDR
-generic_target_read_sp (void)
-{
-#ifdef SP_REGNUM
- if (SP_REGNUM >= 0)
- return read_register (SP_REGNUM);
-#endif
- internal_error (__FILE__, __LINE__,
- "generic_target_read_sp");
-}
-
-CORE_ADDR
read_sp (void)
{
- return TARGET_READ_SP ();
+ if (TARGET_READ_SP_P ())
+ return TARGET_READ_SP ();
+ else if (gdbarch_unwind_sp_p (current_gdbarch))
+ return get_frame_sp (get_current_frame ());
+ else if (SP_REGNUM >= 0)
+ /* Try SP_REGNUM last: this makes all sorts of [wrong] assumptions
+ about the architecture so put it at the end. */
+ return read_register (SP_REGNUM);
+ internal_error (__FILE__, __LINE__, "read_sp: Unable to find SP");
}
void
-generic_target_write_sp (CORE_ADDR val)
+deprecated_write_sp (CORE_ADDR val)
{
-#ifdef SP_REGNUM
- if (SP_REGNUM >= 0)
- {
- write_register (SP_REGNUM, val);
- return;
- }
-#endif
- internal_error (__FILE__, __LINE__,
- "generic_target_write_sp");
+ gdb_assert (SP_REGNUM >= 0);
+ write_register (SP_REGNUM, val);
}
CORE_ADDR
@@ -1692,6 +1666,8 @@ maintenance_print_register_groups (char *args, int from_tty)
regcache_print (args, regcache_dump_groups);
}
+extern initialize_file_ftype _initialize_regcache; /* -Wmissing-prototype */
+
void
_initialize_regcache (void)
{
diff --git a/gdb/reggroups.c b/gdb/reggroups.c
index b72140eadee..ea9a9ec921e 100644
--- a/gdb/reggroups.c
+++ b/gdb/reggroups.c
@@ -245,6 +245,8 @@ struct reggroup *const all_reggroup = &all_group;
struct reggroup *const save_reggroup = &save_group;
struct reggroup *const restore_reggroup = &restore_group;
+extern initialize_file_ftype _initialize_reggroup; /* -Wmissing-prototypes */
+
void
_initialize_reggroup (void)
{
diff --git a/gdb/remote-array.c b/gdb/remote-array.c
deleted file mode 100644
index ff568813856..00000000000
--- a/gdb/remote-array.c
+++ /dev/null
@@ -1,1424 +0,0 @@
-/* Remote debugging interface for Array Tech RAID controller..
-
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
-
- Contributed by Cygnus Support. Written by Rob Savoye for Cygnus.
-
- This module talks to a debug monitor called 'MONITOR', which
- We communicate with MONITOR via either a direct serial line, or a TCP
- (or possibly TELNET) stream to a terminal multiplexor,
- which in turn talks to the target board.
-
- 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 "gdbcore.h"
-#include "target.h"
-#include <ctype.h>
-#include <sys/types.h>
-#include "gdb_string.h"
-#include "command.h"
-#include "serial.h"
-#include "monitor.h"
-#include "remote-utils.h"
-#include "inferior.h"
-#include "version.h"
-#include "regcache.h"
-
-extern int baud_rate;
-
-#define ARRAY_PROMPT ">> "
-
-static void debuglogs (int, char *, ...);
-static void array_open ();
-static void array_close ();
-static void array_detach ();
-static void array_attach ();
-static void array_resume (ptid_t ptid, int step, enum target_signal sig);
-static void array_fetch_register ();
-static void array_store_register ();
-static void array_fetch_registers ();
-static void array_store_registers ();
-static void array_prepare_to_store ();
-static void array_files_info ();
-static void array_kill ();
-static void array_create_inferior ();
-static void array_mourn_inferior ();
-static void make_gdb_packet ();
-static int array_xfer_memory ();
-static ptid_t array_wait (ptid_t ptid,
- struct target_waitstatus *status);
-static int array_insert_breakpoint ();
-static int array_remove_breakpoint ();
-static int tohex ();
-static int to_hex ();
-static int from_hex ();
-static int array_send_packet ();
-static int array_get_packet ();
-static unsigned long ascii2hexword ();
-static void hexword2ascii ();
-
-#define LOG_FILE "monitor.log"
-#if defined (LOG_FILE)
-FILE *log_file;
-#endif
-
-static int timeout = 30;
-/* Having this larger than 400 causes us to be incompatible with
- m68k-stub.c and i386-stub.c. Normally, no one would notice because
- it only matters for writing large chunks of memory (e.g. in
- downloads). Also, this needs to be more than 400 if required to
- hold the registers (see below, where we round it up based on
- DEPRECATED_REGISTER_BYTES). */
-#define PBUFSIZ 400
-
-/*
- * Descriptor for I/O to remote machine. Initialize it to NULL so that
- * array_open knows that we don't have a file open when the program starts.
- */
-struct serial *array_desc = NULL;
-
-/*
- * this array of registers need to match the indexes used by GDB. The
- * whole reason this exists is cause the various ROM monitors use
- * different strings than GDB does, and doesn't support all the
- * registers either. So, typing "info reg sp" becomes a "r30".
- */
-extern char *tmp_mips_processor_type;
-extern int mips_set_processor_type ();
-
-static struct target_ops array_ops;
-
-static void
-init_array_ops (void)
-{
- array_ops.to_shortname = "array";
- array_ops.to_longname =
- "Debug using the standard GDB remote protocol for the Array Tech target.",
- array_ops.to_doc =
- "Debug using the standard GDB remote protocol for the Array Tech target.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya).";
- array_ops.to_open = array_open;
- array_ops.to_close = array_close;
- array_ops.to_detach = array_detach;
- array_ops.to_resume = array_resume;
- array_ops.to_wait = array_wait;
- array_ops.to_fetch_registers = array_fetch_registers;
- array_ops.to_store_registers = array_store_registers;
- array_ops.to_prepare_to_store = array_prepare_to_store;
- array_ops.to_xfer_memory = array_xfer_memory;
- array_ops.to_files_info = array_files_info;
- array_ops.to_insert_breakpoint = array_insert_breakpoint;
- array_ops.to_remove_breakpoint = array_remove_breakpoint;
- array_ops.to_kill = array_kill;
- array_ops.to_create_inferior = array_create_inferior;
- array_ops.to_mourn_inferior = array_mourn_inferior;
- array_ops.to_stratum = process_stratum;
- array_ops.to_has_all_memory = 1;
- array_ops.to_has_memory = 1;
- array_ops.to_has_stack = 1;
- array_ops.to_has_registers = 1;
- array_ops.to_has_execution = 1;
- array_ops.to_magic = OPS_MAGIC;
-};
-
-/*
- * printf_monitor -- send data to monitor. Works just like printf.
- */
-static void
-printf_monitor (char *pattern,...)
-{
- va_list args;
- char buf[PBUFSIZ];
- int i;
-
- va_start (args, pattern);
-
- vsprintf (buf, pattern, args);
-
- debuglogs (1, "printf_monitor(), Sending: \"%s\".", buf);
-
- if (strlen (buf) > PBUFSIZ)
- error ("printf_monitor(): string too long");
- if (serial_write (array_desc, buf, strlen (buf)))
- fprintf_unfiltered (gdb_stderr, "serial_write failed: %s\n",
- safe_strerror (errno));
-}
-/*
- * write_monitor -- send raw data to monitor.
- */
-static void
-write_monitor (char data[], int len)
-{
- if (serial_write (array_desc, data, len))
- fprintf_unfiltered (gdb_stderr, "serial_write failed: %s\n",
- safe_strerror (errno));
-
- *(data + len + 1) = '\0';
- debuglogs (1, "write_monitor(), Sending: \"%s\".", data);
-
-}
-
-/*
- * debuglogs -- deal with debugging info to multiple sources. This takes
- * two real args, the first one is the level to be compared against
- * the sr_get_debug() value, the second arg is a printf buffer and args
- * to be formatted and printed. A CR is added after each string is printed.
- */
-static void
-debuglogs (int level, char *pattern,...)
-{
- va_list args;
- char *p;
- unsigned char buf[PBUFSIZ];
- char newbuf[PBUFSIZ];
- int i;
-
- va_start (args, pattern);
-
- if ((level < 0) || (level > 100))
- {
- error ("Bad argument passed to debuglogs(), needs debug level");
- return;
- }
-
- vsprintf (buf, pattern, args); /* format the string */
-
- /* convert some characters so it'll look right in the log */
- p = newbuf;
- for (i = 0; buf[i] != '\0'; i++)
- {
- if (i > PBUFSIZ)
- error ("Debug message too long");
- switch (buf[i])
- {
- case '\n': /* newlines */
- *p++ = '\\';
- *p++ = 'n';
- continue;
- case '\r': /* carriage returns */
- *p++ = '\\';
- *p++ = 'r';
- continue;
- case '\033': /* escape */
- *p++ = '\\';
- *p++ = 'e';
- continue;
- case '\t': /* tab */
- *p++ = '\\';
- *p++ = 't';
- continue;
- case '\b': /* backspace */
- *p++ = '\\';
- *p++ = 'b';
- continue;
- default: /* no change */
- *p++ = buf[i];
- }
-
- if (buf[i] < 26)
- { /* modify control characters */
- *p++ = '^';
- *p++ = buf[i] + 'A';
- continue;
- }
- if (buf[i] >= 128)
- { /* modify control characters */
- *p++ = '!';
- *p++ = buf[i] + 'A';
- continue;
- }
- }
- *p = '\0'; /* terminate the string */
-
- if (sr_get_debug () > level)
- printf_unfiltered ("%s\n", newbuf);
-
-#ifdef LOG_FILE /* write to the monitor log */
- if (log_file != 0x0)
- {
- fputs (newbuf, log_file);
- fputc ('\n', log_file);
- fflush (log_file);
- }
-#endif
-}
-
-/* readchar -- read a character from the remote system, doing all the fancy
- * timeout stuff.
- */
-static int
-readchar (int timeout)
-{
- int c;
-
- c = serial_readchar (array_desc, abs (timeout));
-
- if (sr_get_debug () > 5)
- {
- putchar (c & 0x7f);
- debuglogs (5, "readchar: timeout = %d\n", timeout);
- }
-
-#ifdef LOG_FILE
- if (isascii (c))
- putc (c & 0x7f, log_file);
-#endif
-
- if (c >= 0)
- return c & 0x7f;
-
- if (c == SERIAL_TIMEOUT)
- {
- if (timeout <= 0)
- return c; /* Polls shouldn't generate timeout errors */
- error ("Timeout reading from remote system.");
-#ifdef LOG_FILE
- fputs ("ERROR: Timeout reading from remote system", log_file);
-#endif
- }
- perror_with_name ("readchar");
-}
-
-/*
- * expect -- scan input from the remote system, until STRING is found.
- * If DISCARD is non-zero, then discard non-matching input, else print
- * it out. Let the user break out immediately.
- */
-static void
-expect (char *string, int discard)
-{
- char *p = string;
- int c;
-
-
- debuglogs (1, "Expecting \"%s\".", string);
-
- immediate_quit++;
- while (1)
- {
- c = readchar (timeout);
- if (!isascii (c))
- continue;
- if (c == *p++)
- {
- if (*p == '\0')
- {
- immediate_quit--;
- debuglogs (4, "Matched");
- return;
- }
- }
- else
- {
- if (!discard)
- {
- fputc_unfiltered (c, gdb_stdout);
- }
- p = string;
- }
- }
-}
-
-/* Keep discarding input until we see the MONITOR array_cmds->prompt.
-
- The convention for dealing with the expect_prompt is that you
- o give your command
- o *then* wait for the expect_prompt.
-
- Thus the last thing that a procedure does with the serial line
- will be an expect_prompt(). Exception: array_resume does not
- wait for the expect_prompt, because the terminal is being handed over
- to the inferior. However, the next thing which happens after that
- is a array_wait which does wait for the expect_prompt.
- Note that this includes abnormal exit, e.g. error(). This is
- necessary to prevent getting into states from which we can't
- recover. */
-static void
-expect_prompt (int discard)
-{
- expect (ARRAY_PROMPT, discard);
-}
-
-/*
- * junk -- ignore junk characters. Returns a 1 if junk, 0 otherwise
- */
-static int
-junk (char ch)
-{
- switch (ch)
- {
- case '\0':
- case ' ':
- case '-':
- case '\t':
- case '\r':
- case '\n':
- if (sr_get_debug () > 5)
- debuglogs (5, "Ignoring \'%c\'.", ch);
- return 1;
- default:
- if (sr_get_debug () > 5)
- debuglogs (5, "Accepting \'%c\'.", ch);
- return 0;
- }
-}
-
-/*
- * get_hex_digit -- Get a hex digit from the remote system & return its value.
- * If ignore is nonzero, ignore spaces, newline & tabs.
- */
-static int
-get_hex_digit (int ignore)
-{
- static int ch;
- while (1)
- {
- ch = readchar (timeout);
- if (junk (ch))
- continue;
- if (sr_get_debug () > 4)
- {
- debuglogs (4, "get_hex_digit() got a 0x%x(%c)", ch, ch);
- }
- else
- {
-#ifdef LOG_FILE /* write to the monitor log */
- if (log_file != 0x0)
- {
- fputs ("get_hex_digit() got a 0x", log_file);
- fputc (ch, log_file);
- fputc ('\n', log_file);
- fflush (log_file);
- }
-#endif
- }
-
- if (ch >= '0' && ch <= '9')
- return ch - '0';
- else if (ch >= 'A' && ch <= 'F')
- return ch - 'A' + 10;
- else if (ch >= 'a' && ch <= 'f')
- return ch - 'a' + 10;
- else if (ch == ' ' && ignore)
- ;
- else
- {
- expect_prompt (1);
- debuglogs (4, "Invalid hex digit from remote system. (0x%x)", ch);
- error ("Invalid hex digit from remote system. (0x%x)", ch);
- }
- }
-}
-
-/* get_hex_byte -- Get a byte from monitor and put it in *BYT.
- * Accept any number leading spaces.
- */
-static void
-get_hex_byte (char *byt)
-{
- int val;
-
- val = get_hex_digit (1) << 4;
- debuglogs (4, "get_hex_byte() -- Read first nibble 0x%x", val);
-
- val |= get_hex_digit (0);
- debuglogs (4, "get_hex_byte() -- Read second nibble 0x%x", val);
- *byt = val;
-
- debuglogs (4, "get_hex_byte() -- Read a 0x%x", val);
-}
-
-/*
- * get_hex_word -- Get N 32-bit words from remote, each preceded by a space,
- * and put them in registers starting at REGNO.
- */
-static int
-get_hex_word (void)
-{
- long val, newval;
- int i;
-
- val = 0;
-
- for (i = 0; i < 8; i++)
- val = (val << 4) + get_hex_digit (i == 0);
-
- debuglogs (4, "get_hex_word() got a 0x%x.", val);
-
- return val;
-}
-
-/* This is called not only when we first attach, but also when the
- user types "run" after having attached. */
-static void
-array_create_inferior (char *execfile, char *args, char **env)
-{
- int entry_pt;
-
- if (args && *args)
- error ("Can't pass arguments to remote MONITOR process");
-
- if (execfile == 0 || exec_bfd == 0)
- error ("No executable file specified");
-
- entry_pt = (int) bfd_get_start_address (exec_bfd);
-
-/* The "process" (board) is already stopped awaiting our commands, and
- the program is already downloaded. We just set its PC and go. */
-
- clear_proceed_status ();
-
- /* Tell wait_for_inferior that we've started a new process. */
- init_wait_for_inferior ();
-
- /* Set up the "saved terminal modes" of the inferior
- based on what modes we are starting it with. */
- target_terminal_init ();
-
- /* Install inferior's terminal modes. */
- target_terminal_inferior ();
-
- /* insert_step_breakpoint (); FIXME, do we need this? */
-
- /* Let 'er rip... */
- proceed ((CORE_ADDR) entry_pt, TARGET_SIGNAL_DEFAULT, 0);
-}
-
-/*
- * array_open -- open a connection to a remote debugger.
- * NAME is the filename used for communication.
- */
-static int baudrate = 9600;
-static char dev_name[100];
-
-static void
-array_open (char *args, char *name, int from_tty)
-{
- char packet[PBUFSIZ];
-
- if (args == NULL)
- error ("Use `target %s DEVICE-NAME' to use a serial port, or \n\
-`target %s HOST-NAME:PORT-NUMBER' to use a network connection.", name, name);
-
-/* if (is_open) */
- array_close (0);
-
- target_preopen (from_tty);
- unpush_target (&array_ops);
-
- tmp_mips_processor_type = "lsi33k"; /* change the default from r3051 */
- mips_set_processor_type_command ("lsi33k", 0);
-
- strcpy (dev_name, args);
- array_desc = serial_open (dev_name);
-
- if (array_desc == NULL)
- perror_with_name (dev_name);
-
- if (baud_rate != -1)
- {
- if (serial_setbaudrate (array_desc, baud_rate))
- {
- serial_close (array_desc);
- perror_with_name (name);
- }
- }
-
- serial_raw (array_desc);
-
-#if defined (LOG_FILE)
- log_file = fopen (LOG_FILE, "w");
- if (log_file == NULL)
- perror_with_name (LOG_FILE);
- fprintf (log_file, "GDB %s (%s", version, host_name);
- fprintf (log_file, " --target %s)\n", array_ops.to_shortname);
- fprintf (log_file, "Remote target %s connected to %s\n\n", array_ops.to_shortname, dev_name);
-#endif
-
- /* see if the target is alive. For a ROM monitor, we can just try to force the
- expect_prompt to print a few times. For the GDB remote protocol, the application
- being debugged is sitting at a breakpoint and waiting for GDB to initialize
- the connection. We force it to give us an empty packet to see if it's alive.
- */
- debuglogs (3, "Trying to ACK the target's debug stub");
- /* unless your are on the new hardware, the old board won't initialize
- because the '@' doesn't flush output like it does on the new ROMS.
- */
- printf_monitor ("@"); /* ask for the last signal */
- expect_prompt (1); /* See if we get a expect_prompt */
-#ifdef TEST_ARRAY /* skip packet for testing */
- make_gdb_packet (packet, "?"); /* ask for a bogus packet */
- if (array_send_packet (packet) == 0)
- error ("Couldn't transmit packet\n");
- printf_monitor ("@\n"); /* force it to flush stdout */
- expect_prompt (1); /* See if we get a expect_prompt */
-#endif
- push_target (&array_ops);
- if (from_tty)
- printf ("Remote target %s connected to %s\n", array_ops.to_shortname, dev_name);
-}
-
-/*
- * array_close -- Close out all files and local state before this
- * target loses control.
- */
-
-static void
-array_close (int quitting)
-{
- serial_close (array_desc);
- array_desc = NULL;
-
- debuglogs (1, "array_close (quitting=%d)", quitting);
-
-#if defined (LOG_FILE)
- if (log_file)
- {
- if (ferror (log_file))
- printf_filtered ("Error writing log file.\n");
- if (fclose (log_file) != 0)
- printf_filtered ("Error closing log file.\n");
- }
-#endif
-}
-
-/*
- * array_detach -- terminate the open connection to the remote
- * debugger. Use this when you want to detach and do something
- * else with your gdb.
- */
-static void
-array_detach (int from_tty)
-{
-
- debuglogs (1, "array_detach ()");
-
- pop_target (); /* calls array_close to do the real work */
- if (from_tty)
- printf ("Ending remote %s debugging\n", target_shortname);
-}
-
-/*
- * array_attach -- attach GDB to the target.
- */
-static void
-array_attach (char *args, int from_tty)
-{
- if (from_tty)
- printf ("Starting remote %s debugging\n", target_shortname);
-
- debuglogs (1, "array_attach (args=%s)", args);
-
- printf_monitor ("go %x\n");
- /* swallow the echo. */
- expect ("go %x\n", 1);
-}
-
-/*
- * array_resume -- Tell the remote machine to resume.
- */
-static void
-array_resume (ptid_t ptid, int step, enum target_signal sig)
-{
- debuglogs (1, "array_resume (step=%d, sig=%d)", step, sig);
-
- if (step)
- {
- printf_monitor ("s\n");
- }
- else
- {
- printf_monitor ("go\n");
- }
-}
-
-#define TMPBUFSIZ 5
-
-/*
- * array_wait -- Wait until the remote machine stops, then return,
- * storing status in status just as `wait' would.
- */
-static ptid_t
-array_wait (ptid_t ptid, struct target_waitstatus *status)
-{
- int old_timeout = timeout;
- int result, i;
- char c;
- struct serial *tty_desc;
- serial_ttystate ttystate;
-
- debuglogs (1, "array_wait (), printing extraneous text.");
-
- status->kind = TARGET_WAITKIND_EXITED;
- status->value.integer = 0;
-
- timeout = 0; /* Don't time out -- user program is running. */
-
-#if !defined(__GO32__) && !defined(__MSDOS__) && !defined(_WIN32)
- tty_desc = serial_fdopen (0);
- ttystate = serial_get_tty_state (tty_desc);
- serial_raw (tty_desc);
-
- i = 0;
- /* poll on the serial port and the keyboard. */
- while (1)
- {
- c = readchar (timeout);
- if (c > 0)
- {
- if (c == *(ARRAY_PROMPT + i))
- {
- if (++i >= strlen (ARRAY_PROMPT))
- { /* matched the prompt */
- debuglogs (4, "array_wait(), got the expect_prompt.");
- break;
- }
- }
- else
- { /* not the prompt */
- i = 0;
- }
- fputc_unfiltered (c, gdb_stdout);
- gdb_flush (gdb_stdout);
- }
- c = serial_readchar (tty_desc, timeout);
- if (c > 0)
- {
- serial_write (array_desc, &c, 1);
- /* do this so it looks like there's keyboard echo */
- if (c == 3) /* exit on Control-C */
- break;
-#if 0
- fputc_unfiltered (c, gdb_stdout);
- gdb_flush (gdb_stdout);
-#endif
- }
- }
- serial_set_tty_state (tty_desc, ttystate);
-#else
- expect_prompt (1);
- debuglogs (4, "array_wait(), got the expect_prompt.");
-#endif
-
- status->kind = TARGET_WAITKIND_STOPPED;
- status->value.sig = TARGET_SIGNAL_TRAP;
-
- timeout = old_timeout;
-
- return inferior_ptid;
-}
-
-/*
- * array_fetch_registers -- read the remote registers into the
- * block regs.
- */
-static void
-array_fetch_registers (int ignored)
-{
- char reg[MAX_REGISTER_SIZE];
- int regno;
- char *p;
- char *packet = alloca (PBUFSIZ);
-
- debuglogs (1, "array_fetch_registers (ignored=%d)\n", ignored);
-
- memset (packet, 0, PBUFSIZ);
- make_gdb_packet (packet, "g");
- if (array_send_packet (packet) == 0)
- error ("Couldn't transmit packet\n");
- if (array_get_packet (packet) == 0)
- error ("Couldn't receive packet\n");
- /* FIXME: read bytes from packet */
- debuglogs (4, "array_fetch_registers: Got a \"%s\" back\n", packet);
- for (regno = 0; regno <= PC_REGNUM + 4; regno++)
- {
- /* supply register stores in target byte order, so swap here */
- /* FIXME: convert from ASCII hex to raw bytes */
- LONGEST i = ascii2hexword (packet + (regno * 8));
- debuglogs (5, "Adding register %d = %x\n", regno, i);
- store_unsigned_integer (&reg, REGISTER_RAW_SIZE (regno), i);
- supply_register (regno, (char *) &reg);
- }
-}
-
-/*
- * This is unused by targets like this one that use a
- * protocol based on GDB's remote protocol.
- */
-static void
-array_fetch_register (int ignored)
-{
- array_fetch_registers (0 /* ignored */);
-}
-
-/*
- * Get all the registers from the targets. They come back in a large array.
- */
-static void
-array_store_registers (int ignored)
-{
- int regno;
- unsigned long i;
- char packet[PBUFSIZ];
- char buf[PBUFSIZ];
- char num[9];
-
- debuglogs (1, "array_store_registers()");
-
- memset (packet, 0, PBUFSIZ);
- memset (buf, 0, PBUFSIZ);
- buf[0] = 'G';
-
- /* Unimplemented registers read as all bits zero. */
- /* FIXME: read bytes from packet */
- for (regno = 0; regno < 41; regno++)
- { /* FIXME */
- /* supply register stores in target byte order, so swap here */
- /* FIXME: convert from ASCII hex to raw bytes */
- i = (unsigned long) read_register (regno);
- hexword2ascii (num, i);
- strcpy (buf + (regno * 8) + 1, num);
- }
- *(buf + (regno * 8) + 2) = 0;
- make_gdb_packet (packet, buf);
- if (array_send_packet (packet) == 0)
- error ("Couldn't transmit packet\n");
- if (array_get_packet (packet) == 0)
- error ("Couldn't receive packet\n");
-
- registers_changed ();
-}
-
-/*
- * This is unused by targets like this one that use a
- * protocol based on GDB's remote protocol.
- */
-static void
-array_store_register (int ignored)
-{
- array_store_registers (0 /* ignored */);
-}
-
-/* Get ready to modify the registers array. On machines which store
- individual registers, this doesn't need to do anything. On machines
- which store all the registers in one fell swoop, this makes sure
- that registers contains all the registers from the program being
- debugged. */
-
-static void
-array_prepare_to_store (void)
-{
- /* Do nothing, since we can store individual regs */
-}
-
-static void
-array_files_info (void)
-{
- printf ("\tAttached to %s at %d baud.\n",
- dev_name, baudrate);
-}
-
-/*
- * array_write_inferior_memory -- Copy LEN bytes of data from debugger
- * memory at MYADDR to inferior's memory at MEMADDR. Returns length moved.
- */
-static int
-array_write_inferior_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len)
-{
- unsigned long i;
- int j;
- char packet[PBUFSIZ];
- char buf[PBUFSIZ];
- char num[9];
- char *p;
-
- debuglogs (1, "array_write_inferior_memory (memaddr=0x%x, myaddr=0x%x, len=%d)", memaddr, myaddr, len);
- memset (buf, '\0', PBUFSIZ); /* this also sets the string terminator */
- p = buf;
-
- *p++ = 'M'; /* The command to write memory */
- hexword2ascii (num, memaddr); /* convert the address */
- strcpy (p, num); /* copy the address */
- p += 8;
- *p++ = ','; /* add comma delimeter */
- hexword2ascii (num, len); /* Get the length as a 4 digit number */
- *p++ = num[4];
- *p++ = num[5];
- *p++ = num[6];
- *p++ = num[7];
- *p++ = ':'; /* add the colon delimeter */
- for (j = 0; j < len; j++)
- { /* copy the data in after converting it */
- *p++ = tohex ((myaddr[j] >> 4) & 0xf);
- *p++ = tohex (myaddr[j] & 0xf);
- }
-
- make_gdb_packet (packet, buf);
- if (array_send_packet (packet) == 0)
- error ("Couldn't transmit packet\n");
- if (array_get_packet (packet) == 0)
- error ("Couldn't receive packet\n");
-
- return len;
-}
-
-/*
- * array_read_inferior_memory -- read LEN bytes from inferior memory
- * at MEMADDR. Put the result at debugger address MYADDR. Returns
- * length moved.
- */
-static int
-array_read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
-{
- int j;
- char buf[20];
- char packet[PBUFSIZ];
- int count; /* Number of bytes read so far. */
- unsigned long startaddr; /* Starting address of this pass. */
- int len_this_pass; /* Number of bytes to read in this pass. */
-
- debuglogs (1, "array_read_inferior_memory (memaddr=0x%x, myaddr=0x%x, len=%d)", memaddr, myaddr, len);
-
- /* Note that this code works correctly if startaddr is just less
- than UINT_MAX (well, really CORE_ADDR_MAX if there was such a
- thing). That is, something like
- array_read_bytes (CORE_ADDR_MAX - 4, foo, 4)
- works--it never adds len To memaddr and gets 0. */
- /* However, something like
- array_read_bytes (CORE_ADDR_MAX - 3, foo, 4)
- doesn't need to work. Detect it and give up if there's an attempt
- to do that. */
- if (((memaddr - 1) + len) < memaddr)
- {
- errno = EIO;
- return 0;
- }
-
- for (count = 0, startaddr = memaddr; count < len; startaddr += len_this_pass)
- {
- /* Try to align to 16 byte boundry (why?) */
- len_this_pass = 16;
- if ((startaddr % 16) != 0)
- {
- len_this_pass -= startaddr % 16;
- }
- /* Only transfer bytes we need */
- if (len_this_pass > (len - count))
- {
- len_this_pass = (len - count);
- }
- /* Fetch the bytes */
- debuglogs (3, "read %d bytes from inferior address %x", len_this_pass,
- startaddr);
- sprintf (buf, "m%08lx,%04x", startaddr, len_this_pass);
- make_gdb_packet (packet, buf);
- if (array_send_packet (packet) == 0)
- {
- error ("Couldn't transmit packet\n");
- }
- if (array_get_packet (packet) == 0)
- {
- error ("Couldn't receive packet\n");
- }
- if (*packet == 0)
- {
- error ("Got no data in the GDB packet\n");
- }
- /* Pick packet apart and xfer bytes to myaddr */
- debuglogs (4, "array_read_inferior_memory: Got a \"%s\" back\n", packet);
- for (j = 0; j < len_this_pass; j++)
- {
- /* extract the byte values */
- myaddr[count++] = from_hex (*(packet + (j * 2))) * 16 + from_hex (*(packet + (j * 2) + 1));
- debuglogs (5, "myaddr[%d] set to %x\n", count - 1, myaddr[count - 1]);
- }
- }
- return (count);
-}
-
-/* Transfer LEN bytes between GDB address MYADDR and target address
- MEMADDR. If WRITE is non-zero, transfer them to the target,
- otherwise transfer them from the target. TARGET is unused.
-
- Returns the number of bytes transferred. */
-
-static int
-array_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
- struct mem_attrib *attrib, struct target_ops *target)
-{
- if (write)
- return array_write_inferior_memory (memaddr, myaddr, len);
- else
- return array_read_inferior_memory (memaddr, myaddr, len);
-}
-
-static void
-array_kill (char *args, int from_tty)
-{
- return; /* ignore attempts to kill target system */
-}
-
-/* Clean up when a program exits.
- The program actually lives on in the remote processor's RAM, and may be
- run again without a download. Don't leave it full of breakpoint
- instructions. */
-
-static void
-array_mourn_inferior (void)
-{
- remove_breakpoints ();
- generic_mourn_inferior (); /* Do all the proper things now */
-}
-
-#define MAX_ARRAY_BREAKPOINTS 16
-
-static CORE_ADDR breakaddr[MAX_ARRAY_BREAKPOINTS] =
-{0};
-
-/*
- * array_insert_breakpoint -- add a breakpoint
- */
-static int
-array_insert_breakpoint (CORE_ADDR addr, char *shadow)
-{
- int i;
- int bp_size = 0;
- CORE_ADDR bp_addr = addr;
-
- debuglogs (1, "array_insert_breakpoint() addr = 0x%x", addr);
- BREAKPOINT_FROM_PC (&bp_addr, &bp_size);
-
- for (i = 0; i <= MAX_ARRAY_BREAKPOINTS; i++)
- {
- if (breakaddr[i] == 0)
- {
- breakaddr[i] = addr;
- if (sr_get_debug () > 4)
- printf ("Breakpoint at %s\n", paddr_nz (addr));
- array_read_inferior_memory (bp_addr, shadow, bp_size);
- printf_monitor ("b 0x%x\n", addr);
- expect_prompt (1);
- return 0;
- }
- }
-
- fprintf_unfiltered (gdb_stderr, "Too many breakpoints (> 16) for monitor\n");
- return 1;
-}
-
-/*
- * _remove_breakpoint -- Tell the monitor to remove a breakpoint
- */
-static int
-array_remove_breakpoint (CORE_ADDR addr, char *shadow)
-{
- int i;
-
- debuglogs (1, "array_remove_breakpoint() addr = 0x%x", addr);
-
- for (i = 0; i < MAX_ARRAY_BREAKPOINTS; i++)
- {
- if (breakaddr[i] == addr)
- {
- breakaddr[i] = 0;
- /* some monitors remove breakpoints based on the address */
- printf_monitor ("bd %x\n", i);
- expect_prompt (1);
- return 0;
- }
- }
- fprintf_unfiltered (gdb_stderr,
- "Can't find breakpoint associated with 0x%s\n",
- paddr_nz (addr));
- return 1;
-}
-
-static void
-array_stop (void)
-{
- debuglogs (1, "array_stop()");
- printf_monitor ("\003");
- expect_prompt (1);
-}
-
-/*
- * array_command -- put a command string, in args, out to MONITOR.
- * Output from MONITOR is placed on the users terminal until the
- * expect_prompt is seen. FIXME
- */
-static void
-monitor_command (char *args, int fromtty)
-{
- debuglogs (1, "monitor_command (args=%s)", args);
-
- if (array_desc == NULL)
- error ("monitor target not open.");
-
- if (!args)
- error ("Missing command.");
-
- printf_monitor ("%s\n", args);
- expect_prompt (0);
-}
-
-/*
- * make_gdb_packet -- make a GDB packet. The data is always ASCII.
- * A debug packet whose contents are <data>
- * is encapsulated for transmission in the form:
- *
- * $ <data> # CSUM1 CSUM2
- *
- * <data> must be ASCII alphanumeric and cannot include characters
- * '$' or '#'. If <data> starts with two characters followed by
- * ':', then the existing stubs interpret this as a sequence number.
- *
- * CSUM1 and CSUM2 are ascii hex representation of an 8-bit
- * checksum of <data>, the most significant nibble is sent first.
- * the hex digits 0-9,a-f are used.
- *
- */
-static void
-make_gdb_packet (char *buf, char *data)
-{
- int i;
- unsigned char csum = 0;
- int cnt;
- char *p;
-
- debuglogs (3, "make_gdb_packet(%s)\n", data);
- cnt = strlen (data);
- if (cnt > PBUFSIZ)
- error ("make_gdb_packet(): to much data\n");
-
- /* start with the packet header */
- p = buf;
- *p++ = '$';
-
- /* calculate the checksum */
- for (i = 0; i < cnt; i++)
- {
- csum += data[i];
- *p++ = data[i];
- }
-
- /* terminate the data with a '#' */
- *p++ = '#';
-
- /* add the checksum as two ascii digits */
- *p++ = tohex ((csum >> 4) & 0xf);
- *p++ = tohex (csum & 0xf);
- *p = 0x0; /* Null terminator on string */
-}
-
-/*
- * array_send_packet -- send a GDB packet to the target with error handling. We
- * get a '+' (ACK) back if the packet is received and the checksum
- * matches. Otherwise a '-' (NAK) is returned. It returns a 1 for a
- * successful transmition, or a 0 for a failure.
- */
-static int
-array_send_packet (char *packet)
-{
- int c, retries, i;
- char junk[PBUFSIZ];
-
- retries = 0;
-
-#if 0
- /* scan the packet to make sure it only contains valid characters.
- this may sound silly, but sometimes a garbled packet will hang
- the target board. We scan the whole thing, then print the error
- message.
- */
- for (i = 0; i < strlen (packet); i++)
- {
- debuglogs (5, "array_send_packet(): Scanning \'%c\'\n", packet[i]);
- /* legit hex numbers or command */
- if ((isxdigit (packet[i])) || (isalpha (packet[i])))
- continue;
- switch (packet[i])
- {
- case '+': /* ACK */
- case '-': /* NAK */
- case '#': /* end of packet */
- case '$': /* start of packet */
- continue;
- default: /* bogus character */
- retries++;
- debuglogs (4, "array_send_packet(): Found a non-ascii digit \'%c\' in the packet.\n", packet[i]);
- }
- }
-#endif
-
- if (retries > 0)
- error ("Can't send packet, found %d non-ascii characters", retries);
-
- /* ok, try to send the packet */
- retries = 0;
- while (retries++ <= 10)
- {
- printf_monitor ("%s", packet);
-
- /* read until either a timeout occurs (-2) or '+' is read */
- while (retries <= 10)
- {
- c = readchar (-timeout);
- debuglogs (3, "Reading a GDB protocol packet... Got a '%c'\n", c);
- switch (c)
- {
- case '+':
- debuglogs (3, "Got Ack\n");
- return 1;
- case SERIAL_TIMEOUT:
- debuglogs (3, "Timed out reading serial port\n");
- printf_monitor ("@"); /* resync with the monitor */
- expect_prompt (1); /* See if we get a expect_prompt */
- break; /* Retransmit buffer */
- case '-':
- debuglogs (3, "Got NAK\n");
- printf_monitor ("@"); /* resync with the monitor */
- expect_prompt (1); /* See if we get a expect_prompt */
- break;
- case '$':
- /* it's probably an old response, or the echo of our command.
- * just gobble up the packet and ignore it.
- */
- debuglogs (3, "Got a junk packet\n");
- i = 0;
- do
- {
- c = readchar (timeout);
- junk[i++] = c;
- }
- while (c != '#');
- c = readchar (timeout);
- junk[i++] = c;
- c = readchar (timeout);
- junk[i++] = c;
- junk[i++] = '\0';
- debuglogs (3, "Reading a junk packet, got a \"%s\"\n", junk);
- continue; /* Now, go look for next packet */
- default:
- continue;
- }
- retries++;
- debuglogs (3, "Retransmitting packet \"%s\"\n", packet);
- break; /* Here to retransmit */
- }
- } /* outer while */
- return 0;
-}
-
-/*
- * array_get_packet -- get a GDB packet from the target. Basically we read till we
- * see a '#', then check the checksum. It returns a 1 if it's gotten a
- * packet, or a 0 it the packet wasn't transmitted correctly.
- */
-static int
-array_get_packet (char *packet)
-{
- int c;
- int retries;
- unsigned char csum;
- unsigned char pktcsum;
- char *bp;
-
- csum = 0;
- bp = packet;
-
- memset (packet, 1, PBUFSIZ);
- retries = 0;
- while (retries <= 10)
- {
- do
- {
- c = readchar (timeout);
- if (c == SERIAL_TIMEOUT)
- {
- debuglogs (3, "array_get_packet: got time out from serial port.\n");
- }
- debuglogs (3, "Waiting for a '$', got a %c\n", c);
- }
- while (c != '$');
-
- retries = 0;
- while (retries <= 10)
- {
- c = readchar (timeout);
- debuglogs (3, "array_get_packet: got a '%c'\n", c);
- switch (c)
- {
- case SERIAL_TIMEOUT:
- debuglogs (3, "Timeout in mid-packet, retrying\n");
- return 0;
- case '$':
- debuglogs (3, "Saw new packet start in middle of old one\n");
- return 0; /* Start a new packet, count retries */
- case '#':
- *bp = '\0';
- pktcsum = from_hex (readchar (timeout)) << 4;
- pktcsum |= from_hex (readchar (timeout));
- if (csum == 0)
- debuglogs (3, "\nGDB packet checksum zero, must be a bogus packet\n");
- if (csum == pktcsum)
- {
- debuglogs (3, "\nGDB packet checksum correct, packet data is \"%s\",\n", packet);
- printf_monitor ("@");
- expect_prompt (1);
- return 1;
- }
- debuglogs (3, "Bad checksum, sentsum=0x%x, csum=0x%x\n", pktcsum, csum);
- return 0;
- case '*': /* Run length encoding */
- debuglogs (5, "Run length encoding in packet\n");
- csum += c;
- c = readchar (timeout);
- csum += c;
- c = c - ' ' + 3; /* Compute repeat count */
-
- if (c > 0 && c < 255 && bp + c - 1 < packet + PBUFSIZ - 1)
- {
- memset (bp, *(bp - 1), c);
- bp += c;
- continue;
- }
- *bp = '\0';
- printf_filtered ("Repeat count %d too large for buffer.\n", c);
- return 0;
-
- default:
- if ((!isxdigit (c)) && (!ispunct (c)))
- debuglogs (4, "Got a non-ascii digit \'%c\'.\\n", c);
- if (bp < packet + PBUFSIZ - 1)
- {
- *bp++ = c;
- csum += c;
- continue;
- }
-
- *bp = '\0';
- puts_filtered ("Remote packet too long.\n");
- return 0;
- }
- }
- }
- return 0; /* exceeded retries */
-}
-
-/*
- * ascii2hexword -- convert an ascii number represented by 8 digits to a hex value.
- */
-static unsigned long
-ascii2hexword (unsigned char *mem)
-{
- unsigned long val;
- int i;
- char buf[9];
-
- val = 0;
- for (i = 0; i < 8; i++)
- {
- val <<= 4;
- if (mem[i] >= 'A' && mem[i] <= 'F')
- val = val + mem[i] - 'A' + 10;
- if (mem[i] >= 'a' && mem[i] <= 'f')
- val = val + mem[i] - 'a' + 10;
- if (mem[i] >= '0' && mem[i] <= '9')
- val = val + mem[i] - '0';
- buf[i] = mem[i];
- }
- buf[8] = '\0';
- debuglogs (4, "ascii2hexword() got a 0x%x from %s(%x).\n", val, buf, mem);
- return val;
-}
-
-/*
- * ascii2hexword -- convert a hex value to an ascii number represented by 8
- * digits.
- */
-static void
-hexword2ascii (unsigned char *mem, unsigned long num)
-{
- int i;
- unsigned char ch;
-
- debuglogs (4, "hexword2ascii() converting %x ", num);
- for (i = 7; i >= 0; i--)
- {
- mem[i] = tohex ((num >> 4) & 0xf);
- mem[i] = tohex (num & 0xf);
- num = num >> 4;
- }
- mem[8] = '\0';
- debuglogs (4, "\tto a %s", mem);
-}
-
-/* Convert hex digit A to a number. */
-static int
-from_hex (int a)
-{
- if (a == 0)
- return 0;
-
- debuglogs (4, "from_hex got a 0x%x(%c)\n", a, a);
- if (a >= '0' && a <= '9')
- return a - '0';
- if (a >= 'a' && a <= 'f')
- return a - 'a' + 10;
- if (a >= 'A' && a <= 'F')
- return a - 'A' + 10;
- else
- {
- error ("Reply contains invalid hex digit 0x%x", a);
- }
-}
-
-/* Convert number NIB to a hex digit. */
-static int
-tohex (int nib)
-{
- if (nib < 10)
- return '0' + nib;
- else
- return 'a' + nib - 10;
-}
-
-/*
- * _initialize_remote_monitors -- setup a few addtitional commands that
- * are usually only used by monitors.
- */
-void
-_initialize_remote_monitors (void)
-{
- /* generic monitor command */
- add_com ("monitor", class_obscure, monitor_command,
- "Send a command to the debug monitor.");
-
-}
-
-/*
- * _initialize_array -- do any special init stuff for the target.
- */
-void
-_initialize_array (void)
-{
- init_array_ops ();
- add_target (&array_ops);
-}
diff --git a/gdb/remote-e7000.c b/gdb/remote-e7000.c
index 643c6b6fe1b..94985fe5816 100644
--- a/gdb/remote-e7000.c
+++ b/gdb/remote-e7000.c
@@ -781,7 +781,7 @@ gbyte (void)
return (high << 4) + low;
}
-void
+static void
fetch_regs_from_dump (int (*nextchar) (), char *want)
{
int regno;
@@ -1873,7 +1873,7 @@ why_stop (void)
/* Suck characters, if a string match, then return the strings index
otherwise echo them. */
-int
+static int
expect_n (char **strings)
{
char *(ptr[10]);
@@ -2165,6 +2165,8 @@ target e7000 foobar";
e7000_ops.to_magic = OPS_MAGIC;
};
+extern initialize_file_ftype _initialize_remote_e7000; /* -Wmissing-prototypes */
+
void
_initialize_remote_e7000 (void)
{
diff --git a/gdb/remote-est.c b/gdb/remote-est.c
index 93eddc9d123..a2c0f7ce2af 100644
--- a/gdb/remote-est.c
+++ b/gdb/remote-est.c
@@ -168,6 +168,8 @@ est_open (char *args, int from_tty)
monitor_open (args, &est_cmds, from_tty);
}
+extern initialize_file_ftype _initialize_est; /* -Wmissing-prototypes */
+
void
_initialize_est (void)
{
diff --git a/gdb/remote-fileio.c b/gdb/remote-fileio.c
new file mode 100644
index 00000000000..fd57617acd5
--- /dev/null
+++ b/gdb/remote-fileio.c
@@ -0,0 +1,1379 @@
+/* Remote File-I/O communications
+
+ Copyright 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. */
+
+/* See the GDB User Guide for details of the GDB remote protocol. */
+
+#include "defs.h"
+#include "gdb_string.h"
+#include "gdbcmd.h"
+#include "remote.h"
+#include "gdb/fileio.h"
+#include "gdb_wait.h"
+#include "gdb_stat.h"
+#include "remote-fileio.h"
+
+#include <fcntl.h>
+#include <sys/time.h>
+#ifdef __CYGWIN__
+#include <sys/cygwin.h> /* For cygwin_conv_to_full_posix_path. */
+#endif
+#include <signal.h>
+
+static struct {
+ int *fd_map;
+ int fd_map_size;
+} remote_fio_data;
+
+#define FIO_FD_INVALID -1
+#define FIO_FD_CONSOLE_IN -2
+#define FIO_FD_CONSOLE_OUT -3
+
+static int remote_fio_system_call_allowed = 0;
+
+static int
+remote_fileio_init_fd_map (void)
+{
+ int i;
+
+ if (!remote_fio_data.fd_map)
+ {
+ remote_fio_data.fd_map = (int *) xmalloc (10 * sizeof (int));
+ remote_fio_data.fd_map_size = 10;
+ remote_fio_data.fd_map[0] = FIO_FD_CONSOLE_IN;
+ remote_fio_data.fd_map[1] = FIO_FD_CONSOLE_OUT;
+ remote_fio_data.fd_map[2] = FIO_FD_CONSOLE_OUT;
+ for (i = 3; i < 10; ++i)
+ remote_fio_data.fd_map[i] = FIO_FD_INVALID;
+ }
+ return 3;
+}
+
+static int
+remote_fileio_resize_fd_map (void)
+{
+ if (!remote_fio_data.fd_map)
+ return remote_fileio_init_fd_map ();
+ remote_fio_data.fd_map_size += 10;
+ remote_fio_data.fd_map =
+ (int *) xrealloc (remote_fio_data.fd_map,
+ remote_fio_data.fd_map_size * sizeof (int));
+ return remote_fio_data.fd_map_size - 10;
+}
+
+static int
+remote_fileio_next_free_fd (void)
+{
+ int i;
+
+ for (i = 0; i < remote_fio_data.fd_map_size; ++i)
+ if (remote_fio_data.fd_map[i] == FIO_FD_INVALID)
+ return i;
+ return remote_fileio_resize_fd_map ();
+}
+
+static int
+remote_fileio_fd_to_targetfd (int fd)
+{
+ int target_fd = remote_fileio_next_free_fd ();
+ remote_fio_data.fd_map[target_fd] = fd;
+ return target_fd;
+}
+
+static int
+remote_fileio_map_fd (int target_fd)
+{
+ remote_fileio_init_fd_map ();
+ if (target_fd < 0 || target_fd >= remote_fio_data.fd_map_size)
+ return FIO_FD_INVALID;
+ return remote_fio_data.fd_map[target_fd];
+}
+
+static void
+remote_fileio_close_target_fd (int target_fd)
+{
+ remote_fileio_init_fd_map ();
+ if (target_fd >= 0 && target_fd < remote_fio_data.fd_map_size)
+ remote_fio_data.fd_map[target_fd] = FIO_FD_INVALID;
+}
+
+static int
+remote_fileio_oflags_to_host (long flags)
+{
+ int hflags = 0;
+
+ if (flags & FILEIO_O_CREAT)
+ hflags |= O_CREAT;
+ if (flags & FILEIO_O_EXCL)
+ hflags |= O_EXCL;
+ if (flags & FILEIO_O_TRUNC)
+ hflags |= O_TRUNC;
+ if (flags & FILEIO_O_APPEND)
+ hflags |= O_APPEND;
+ if (flags & FILEIO_O_RDONLY)
+ hflags |= O_RDONLY;
+ if (flags & FILEIO_O_WRONLY)
+ hflags |= O_WRONLY;
+ if (flags & FILEIO_O_RDWR)
+ hflags |= O_RDWR;
+/* On systems supporting binary and text mode, always open files in
+ binary mode. */
+#ifdef O_BINARY
+ hflags |= O_BINARY;
+#endif
+ return hflags;
+}
+
+static mode_t
+remote_fileio_mode_to_host (long mode, int open_call)
+{
+ mode_t hmode = 0;
+
+ if (!open_call)
+ {
+ if (mode & FILEIO_S_IFREG)
+ hmode |= S_IFREG;
+ if (mode & FILEIO_S_IFDIR)
+ hmode |= S_IFDIR;
+ if (mode & FILEIO_S_IFCHR)
+ hmode |= S_IFCHR;
+ }
+ if (mode & FILEIO_S_IRUSR)
+ hmode |= S_IRUSR;
+ if (mode & FILEIO_S_IWUSR)
+ hmode |= S_IWUSR;
+ if (mode & FILEIO_S_IXUSR)
+ hmode |= S_IXUSR;
+ if (mode & FILEIO_S_IRGRP)
+ hmode |= S_IRGRP;
+ if (mode & FILEIO_S_IWGRP)
+ hmode |= S_IWGRP;
+ if (mode & FILEIO_S_IXGRP)
+ hmode |= S_IXGRP;
+ if (mode & FILEIO_S_IROTH)
+ hmode |= S_IROTH;
+ if (mode & FILEIO_S_IWOTH)
+ hmode |= S_IWOTH;
+ if (mode & FILEIO_S_IXOTH)
+ hmode |= S_IXOTH;
+ return hmode;
+}
+
+static LONGEST
+remote_fileio_mode_to_target (mode_t mode)
+{
+ mode_t tmode = 0;
+
+ if (mode & S_IFREG)
+ tmode |= FILEIO_S_IFREG;
+ if (mode & S_IFDIR)
+ tmode |= FILEIO_S_IFDIR;
+ if (mode & S_IFCHR)
+ tmode |= FILEIO_S_IFCHR;
+ if (mode & S_IRUSR)
+ tmode |= FILEIO_S_IRUSR;
+ if (mode & S_IWUSR)
+ tmode |= FILEIO_S_IWUSR;
+ if (mode & S_IXUSR)
+ tmode |= FILEIO_S_IXUSR;
+ if (mode & S_IRGRP)
+ tmode |= FILEIO_S_IRGRP;
+ if (mode & S_IWGRP)
+ tmode |= FILEIO_S_IWGRP;
+ if (mode & S_IXGRP)
+ tmode |= FILEIO_S_IXGRP;
+ if (mode & S_IROTH)
+ tmode |= FILEIO_S_IROTH;
+ if (mode & S_IWOTH)
+ tmode |= FILEIO_S_IWOTH;
+ if (mode & S_IXOTH)
+ tmode |= FILEIO_S_IXOTH;
+ return tmode;
+}
+
+static int
+remote_fileio_errno_to_target (int error)
+{
+ switch (error)
+ {
+ case EPERM:
+ return FILEIO_EPERM;
+ case ENOENT:
+ return FILEIO_ENOENT;
+ case EINTR:
+ return FILEIO_EINTR;
+ case EIO:
+ return FILEIO_EIO;
+ case EBADF:
+ return FILEIO_EBADF;
+ case EACCES:
+ return FILEIO_EACCES;
+ case EFAULT:
+ return FILEIO_EFAULT;
+ case EBUSY:
+ return FILEIO_EBUSY;
+ case EEXIST:
+ return FILEIO_EEXIST;
+ case ENODEV:
+ return FILEIO_ENODEV;
+ case ENOTDIR:
+ return FILEIO_ENOTDIR;
+ case EISDIR:
+ return FILEIO_EISDIR;
+ case EINVAL:
+ return FILEIO_EINVAL;
+ case ENFILE:
+ return FILEIO_ENFILE;
+ case EMFILE:
+ return FILEIO_EMFILE;
+ case EFBIG:
+ return FILEIO_EFBIG;
+ case ENOSPC:
+ return FILEIO_ENOSPC;
+ case ESPIPE:
+ return FILEIO_ESPIPE;
+ case EROFS:
+ return FILEIO_EROFS;
+ case ENOSYS:
+ return FILEIO_ENOSYS;
+ case ENAMETOOLONG:
+ return FILEIO_ENAMETOOLONG;
+ }
+ return FILEIO_EUNKNOWN;
+}
+
+static int
+remote_fileio_seek_flag_to_host (long num, int *flag)
+{
+ if (!flag)
+ return 0;
+ switch (num)
+ {
+ case FILEIO_SEEK_SET:
+ *flag = SEEK_SET;
+ break;
+ case FILEIO_SEEK_CUR:
+ *flag = SEEK_CUR;
+ break;
+ case FILEIO_SEEK_END:
+ *flag = SEEK_END;
+ break;
+ default:
+ return -1;
+ }
+ return 0;
+}
+
+static int
+remote_fileio_extract_long (char **buf, LONGEST *retlong)
+{
+ char *c;
+ int sign = 1;
+
+ if (!buf || !*buf || !**buf || !retlong)
+ return -1;
+ c = strchr (*buf, ',');
+ if (c)
+ *c++ = '\0';
+ else
+ c = strchr (*buf, '\0');
+ while (strchr ("+-", **buf))
+ {
+ if (**buf == '-')
+ sign = -sign;
+ ++*buf;
+ }
+ for (*retlong = 0; **buf; ++*buf)
+ {
+ *retlong <<= 4;
+ if (**buf >= '0' && **buf <= '9')
+ *retlong += **buf - '0';
+ else if (**buf >= 'a' && **buf <= 'f')
+ *retlong += **buf - 'a' + 10;
+ else if (**buf >= 'A' && **buf <= 'F')
+ *retlong += **buf - 'A' + 10;
+ else
+ return -1;
+ }
+ *retlong *= sign;
+ *buf = c;
+ return 0;
+}
+
+static int
+remote_fileio_extract_int (char **buf, long *retint)
+{
+ int ret;
+ LONGEST retlong;
+
+ if (!retint)
+ return -1;
+ ret = remote_fileio_extract_long (buf, &retlong);
+ if (!ret)
+ *retint = (long) retlong;
+ return ret;
+}
+
+static int
+remote_fileio_extract_ptr_w_len (char **buf, CORE_ADDR *ptrval, int *length)
+{
+ char *c;
+ LONGEST retlong;
+
+ if (!buf || !*buf || !**buf || !ptrval || !length)
+ return -1;
+ c = strchr (*buf, '/');
+ if (!c)
+ return -1;
+ *c++ = '\0';
+ if (remote_fileio_extract_long (buf, &retlong))
+ return -1;
+ *ptrval = (CORE_ADDR) retlong;
+ *buf = c;
+ if (remote_fileio_extract_long (buf, &retlong))
+ return -1;
+ *length = (int) retlong;
+ return 0;
+}
+
+/* Convert to big endian */
+static void
+remote_fileio_to_be (LONGEST num, char *buf, int bytes)
+{
+ int i;
+
+ for (i = 0; i < bytes; ++i)
+ buf[i] = (num >> (8 * (bytes - i - 1))) & 0xff;
+}
+
+static void
+remote_fileio_to_fio_int (long num, fio_int_t fnum)
+{
+ remote_fileio_to_be ((LONGEST) num, (char *) fnum, 4);
+}
+
+static void
+remote_fileio_to_fio_uint (long num, fio_uint_t fnum)
+{
+ remote_fileio_to_be ((LONGEST) num, (char *) fnum, 4);
+}
+
+static void
+remote_fileio_to_fio_mode (mode_t num, fio_mode_t fnum)
+{
+ remote_fileio_to_be (remote_fileio_mode_to_target(num), (char *) fnum, 4);
+}
+
+static void
+remote_fileio_to_fio_time (time_t num, fio_time_t fnum)
+{
+ remote_fileio_to_be ((LONGEST) num, (char *) fnum, 4);
+}
+
+static void
+remote_fileio_to_fio_long (LONGEST num, fio_long_t fnum)
+{
+ remote_fileio_to_be (num, (char *) fnum, 8);
+}
+
+static void
+remote_fileio_to_fio_ulong (LONGEST num, fio_ulong_t fnum)
+{
+ remote_fileio_to_be (num, (char *) fnum, 8);
+}
+
+static void
+remote_fileio_to_fio_stat (struct stat *st, struct fio_stat *fst)
+{
+ /* `st_dev' is set in the calling function */
+ remote_fileio_to_fio_uint ((long) st->st_ino, fst->fst_ino);
+ remote_fileio_to_fio_mode (st->st_mode, fst->fst_mode);
+ remote_fileio_to_fio_uint ((long) st->st_nlink, fst->fst_nlink);
+ remote_fileio_to_fio_uint ((long) st->st_uid, fst->fst_uid);
+ remote_fileio_to_fio_uint ((long) st->st_gid, fst->fst_gid);
+ remote_fileio_to_fio_uint ((long) st->st_rdev, fst->fst_rdev);
+ remote_fileio_to_fio_ulong ((LONGEST) st->st_size, fst->fst_size);
+ remote_fileio_to_fio_ulong ((LONGEST) st->st_blksize, fst->fst_blksize);
+ remote_fileio_to_fio_ulong ((LONGEST) st->st_blocks, fst->fst_blocks);
+ remote_fileio_to_fio_time (st->st_atime, fst->fst_atime);
+ remote_fileio_to_fio_time (st->st_mtime, fst->fst_mtime);
+ remote_fileio_to_fio_time (st->st_ctime, fst->fst_ctime);
+}
+
+static void
+remote_fileio_to_fio_timeval (struct timeval *tv, struct fio_timeval *ftv)
+{
+ remote_fileio_to_fio_time (tv->tv_sec, ftv->ftv_sec);
+ remote_fileio_to_fio_long (tv->tv_usec, ftv->ftv_usec);
+}
+
+static int remote_fio_ctrl_c_flag = 0;
+static int remote_fio_no_longjmp = 0;
+
+#if defined (HAVE_SIGACTION) && defined (SA_RESTART)
+static struct sigaction remote_fio_sa;
+static struct sigaction remote_fio_osa;
+#else
+static void (*remote_fio_ofunc)(int);
+#endif
+
+static void
+remote_fileio_sig_init (void)
+{
+#if defined (HAVE_SIGACTION) && defined (SA_RESTART)
+ remote_fio_sa.sa_handler = SIG_IGN;
+ sigemptyset (&remote_fio_sa.sa_mask);
+ remote_fio_sa.sa_flags = 0;
+ sigaction (SIGINT, &remote_fio_sa, &remote_fio_osa);
+#else
+ remote_fio_ofunc = signal (SIGINT, SIG_IGN);
+#endif
+}
+
+static void
+remote_fileio_sig_set (void (*sigint_func)(int))
+{
+#if defined (HAVE_SIGACTION) && defined (SA_RESTART)
+ remote_fio_sa.sa_handler = sigint_func;
+ sigemptyset (&remote_fio_sa.sa_mask);
+ remote_fio_sa.sa_flags = 0;
+ sigaction (SIGINT, &remote_fio_sa, NULL);
+#else
+ signal (SIGINT, sigint_func);
+#endif
+}
+
+static void
+remote_fileio_sig_exit (void)
+{
+#if defined (HAVE_SIGACTION) && defined (SA_RESTART)
+ sigaction (SIGINT, &remote_fio_osa, NULL);
+#else
+ signal (SIGINT, remote_fio_ofunc);
+#endif
+}
+
+static void
+remote_fileio_ctrl_c_signal_handler (int signo)
+{
+ remote_fileio_sig_set (SIG_IGN);
+ remote_fio_ctrl_c_flag = 1;
+ if (!remote_fio_no_longjmp)
+ throw_exception (RETURN_QUIT);
+ remote_fileio_sig_set (remote_fileio_ctrl_c_signal_handler);
+}
+
+static void
+remote_fileio_reply (int retcode, int error)
+{
+ char buf[32];
+
+ remote_fileio_sig_set (SIG_IGN);
+ strcpy (buf, "F");
+ if (retcode < 0)
+ {
+ strcat (buf, "-");
+ retcode = -retcode;
+ }
+ sprintf (buf + strlen (buf), "%x", retcode);
+ if (error || remote_fio_ctrl_c_flag)
+ {
+ if (error && remote_fio_ctrl_c_flag)
+ error = FILEIO_EINTR;
+ if (error < 0)
+ {
+ strcat (buf, "-");
+ error = -error;
+ }
+ sprintf (buf + strlen (buf), ",%x", error);
+ if (remote_fio_ctrl_c_flag)
+ strcat (buf, ",C");
+ }
+ remote_fileio_sig_set (remote_fileio_ctrl_c_signal_handler);
+ putpkt (buf);
+}
+
+static void
+remote_fileio_ioerror (void)
+{
+ remote_fileio_reply (-1, FILEIO_EIO);
+}
+
+static void
+remote_fileio_badfd (void)
+{
+ remote_fileio_reply (-1, FILEIO_EBADF);
+}
+
+static void
+remote_fileio_return_errno (int retcode)
+{
+ remote_fileio_reply (retcode,
+ retcode < 0 ? remote_fileio_errno_to_target (errno) : 0);
+}
+
+static void
+remote_fileio_return_success (int retcode)
+{
+ remote_fileio_reply (retcode, 0);
+}
+
+/* Wrapper function for remote_write_bytes() which has the disadvantage to
+ write only one packet, regardless of the requested number of bytes to
+ transfer. This wrapper calls remote_write_bytes() as often as needed. */
+static int
+remote_fileio_write_bytes (CORE_ADDR memaddr, char *myaddr, int len)
+{
+ int ret = 0, written;
+
+ while (len > 0 && (written = remote_write_bytes (memaddr, myaddr, len)) > 0)
+ {
+ len -= written;
+ memaddr += written;
+ myaddr += written;
+ ret += written;
+ }
+ return ret;
+}
+
+static void
+remote_fileio_func_open (char *buf)
+{
+ CORE_ADDR ptrval;
+ int length, retlength;
+ long num;
+ int flags, fd;
+ mode_t mode;
+ char *pathname;
+ struct stat st;
+
+ /* 1. Parameter: Ptr to pathname / length incl. trailing zero */
+ if (remote_fileio_extract_ptr_w_len (&buf, &ptrval, &length))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ /* 2. Parameter: open flags */
+ if (remote_fileio_extract_int (&buf, &num))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ flags = remote_fileio_oflags_to_host (num);
+ /* 3. Parameter: open mode */
+ if (remote_fileio_extract_int (&buf, &num))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ mode = remote_fileio_mode_to_host (num, 1);
+
+ /* Request pathname using 'm' packet */
+ pathname = alloca (length);
+ retlength = remote_read_bytes (ptrval, pathname, length);
+ if (retlength != length)
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+
+ /* Check if pathname exists and is not a regular file or directory. If so,
+ return an appropriate error code. Same for trying to open directories
+ for writing. */
+ if (!stat (pathname, &st))
+ {
+ if (!S_ISREG (st.st_mode) && !S_ISDIR (st.st_mode))
+ {
+ remote_fileio_reply (-1, FILEIO_ENODEV);
+ return;
+ }
+ if (S_ISDIR (st.st_mode)
+ && ((flags & O_WRONLY) == O_WRONLY || (flags & O_RDWR) == O_RDWR))
+ {
+ remote_fileio_reply (-1, FILEIO_EISDIR);
+ return;
+ }
+ }
+
+ remote_fio_no_longjmp = 1;
+ fd = open (pathname, flags, mode);
+ if (fd < 0)
+ {
+ remote_fileio_return_errno (-1);
+ return;
+ }
+
+ fd = remote_fileio_fd_to_targetfd (fd);
+ remote_fileio_return_success (fd);
+}
+
+static void
+remote_fileio_func_close (char *buf)
+{
+ long num;
+ int fd;
+
+ /* Parameter: file descriptor */
+ if (remote_fileio_extract_int (&buf, &num))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ fd = remote_fileio_map_fd ((int) num);
+ if (fd == FIO_FD_INVALID)
+ {
+ remote_fileio_badfd ();
+ return;
+ }
+
+ remote_fio_no_longjmp = 1;
+ if (fd != FIO_FD_CONSOLE_IN && fd != FIO_FD_CONSOLE_OUT && close (fd))
+ remote_fileio_return_errno (-1);
+ remote_fileio_close_target_fd ((int) num);
+ remote_fileio_return_success (0);
+}
+
+static void
+remote_fileio_func_read (char *buf)
+{
+ long target_fd, num;
+ LONGEST lnum;
+ CORE_ADDR ptrval;
+ int fd, ret, retlength;
+ char *buffer;
+ size_t length;
+ off_t old_offset, new_offset;
+
+ /* 1. Parameter: file descriptor */
+ if (remote_fileio_extract_int (&buf, &target_fd))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ fd = remote_fileio_map_fd ((int) target_fd);
+ if (fd == FIO_FD_INVALID)
+ {
+ remote_fileio_badfd ();
+ return;
+ }
+ /* 2. Parameter: buffer pointer */
+ if (remote_fileio_extract_long (&buf, &lnum))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ ptrval = (CORE_ADDR) lnum;
+ /* 3. Parameter: buffer length */
+ if (remote_fileio_extract_int (&buf, &num))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ length = (size_t) num;
+
+ switch (fd)
+ {
+ case FIO_FD_CONSOLE_OUT:
+ remote_fileio_badfd ();
+ return;
+ case FIO_FD_CONSOLE_IN:
+ {
+ static char *remaining_buf = NULL;
+ static int remaining_length = 0;
+
+ buffer = (char *) xmalloc (32768);
+ if (remaining_buf)
+ {
+ remote_fio_no_longjmp = 1;
+ if (remaining_length > length)
+ {
+ memcpy (buffer, remaining_buf, length);
+ memmove (remaining_buf, remaining_buf + length,
+ remaining_length - length);
+ remaining_length -= length;
+ ret = length;
+ }
+ else
+ {
+ memcpy (buffer, remaining_buf, remaining_length);
+ xfree (remaining_buf);
+ remaining_buf = NULL;
+ ret = remaining_length;
+ }
+ }
+ else
+ {
+ ret = ui_file_read (gdb_stdtargin, buffer, 32767);
+ remote_fio_no_longjmp = 1;
+ if (ret > 0 && (size_t)ret > length)
+ {
+ remaining_buf = (char *) xmalloc (ret - length);
+ remaining_length = ret - length;
+ memcpy (remaining_buf, buffer + length, remaining_length);
+ ret = length;
+ }
+ }
+ }
+ break;
+ default:
+ buffer = (char *) xmalloc (length);
+ /* POSIX defines EINTR behaviour of read in a weird way. It's allowed
+ for read() to return -1 even if "some" bytes have been read. It
+ has been corrected in SUSv2 but that doesn't help us much...
+ Therefore a complete solution must check how many bytes have been
+ read on EINTR to return a more reliable value to the target */
+ old_offset = lseek (fd, 0, SEEK_CUR);
+ remote_fio_no_longjmp = 1;
+ ret = read (fd, buffer, length);
+ if (ret < 0 && errno == EINTR)
+ {
+ new_offset = lseek (fd, 0, SEEK_CUR);
+ /* If some data has been read, return the number of bytes read.
+ The Ctrl-C flag is set in remote_fileio_reply() anyway */
+ if (old_offset != new_offset)
+ ret = new_offset - old_offset;
+ }
+ break;
+ }
+
+ if (ret > 0)
+ {
+ retlength = remote_fileio_write_bytes (ptrval, buffer, ret);
+ if (retlength != ret)
+ ret = -1; /* errno has been set to EIO in remote_fileio_write_bytes() */
+ }
+
+ if (ret < 0)
+ remote_fileio_return_errno (-1);
+ else
+ remote_fileio_return_success (ret);
+
+ xfree (buffer);
+}
+
+static void
+remote_fileio_func_write (char *buf)
+{
+ long target_fd, num;
+ LONGEST lnum;
+ CORE_ADDR ptrval;
+ int fd, ret, retlength;
+ char *buffer;
+ size_t length;
+
+ /* 1. Parameter: file descriptor */
+ if (remote_fileio_extract_int (&buf, &target_fd))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ fd = remote_fileio_map_fd ((int) target_fd);
+ if (fd == FIO_FD_INVALID)
+ {
+ remote_fileio_badfd ();
+ return;
+ }
+ /* 2. Parameter: buffer pointer */
+ if (remote_fileio_extract_long (&buf, &lnum))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ ptrval = (CORE_ADDR) lnum;
+ /* 3. Parameter: buffer length */
+ if (remote_fileio_extract_int (&buf, &num))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ length = (size_t) num;
+
+ buffer = (char *) xmalloc (length);
+ retlength = remote_read_bytes (ptrval, buffer, length);
+ if (retlength != length)
+ {
+ xfree (buffer);
+ remote_fileio_ioerror ();
+ return;
+ }
+
+ remote_fio_no_longjmp = 1;
+ switch (fd)
+ {
+ case FIO_FD_CONSOLE_IN:
+ remote_fileio_badfd ();
+ return;
+ case FIO_FD_CONSOLE_OUT:
+ ui_file_write (target_fd == 1 ? gdb_stdtarg : gdb_stdtargerr, buffer,
+ length);
+ gdb_flush (target_fd == 1 ? gdb_stdtarg : gdb_stdtargerr);
+ ret = length;
+ break;
+ default:
+ ret = write (fd, buffer, length);
+ if (ret < 0 && errno == EACCES)
+ errno = EBADF; /* Cygwin returns EACCESS when writing to a R/O file.*/
+ break;
+ }
+
+ if (ret < 0)
+ remote_fileio_return_errno (-1);
+ else
+ remote_fileio_return_success (ret);
+
+ xfree (buffer);
+}
+
+static void
+remote_fileio_func_lseek (char *buf)
+{
+ long num;
+ LONGEST lnum;
+ int fd, flag;
+ off_t offset, ret;
+
+ /* 1. Parameter: file descriptor */
+ if (remote_fileio_extract_int (&buf, &num))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ fd = remote_fileio_map_fd ((int) num);
+ if (fd == FIO_FD_INVALID)
+ {
+ remote_fileio_badfd ();
+ return;
+ }
+ else if (fd == FIO_FD_CONSOLE_IN || fd == FIO_FD_CONSOLE_OUT)
+ {
+ remote_fileio_reply (-1, FILEIO_ESPIPE);
+ return;
+ }
+
+ /* 2. Parameter: offset */
+ if (remote_fileio_extract_long (&buf, &lnum))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ offset = (off_t) lnum;
+ /* 3. Parameter: flag */
+ if (remote_fileio_extract_int (&buf, &num))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ if (remote_fileio_seek_flag_to_host (num, &flag))
+ {
+ remote_fileio_reply (-1, FILEIO_EINVAL);
+ return;
+ }
+
+ remote_fio_no_longjmp = 1;
+ ret = lseek (fd, offset, flag);
+
+ if (ret == (off_t) -1)
+ remote_fileio_return_errno (-1);
+ else
+ remote_fileio_return_success (ret);
+}
+
+static void
+remote_fileio_func_rename (char *buf)
+{
+ CORE_ADDR ptrval;
+ int length, retlength;
+ char *oldpath, *newpath;
+ int ret, of, nf;
+ struct stat ost, nst;
+
+ /* 1. Parameter: Ptr to oldpath / length incl. trailing zero */
+ if (remote_fileio_extract_ptr_w_len (&buf, &ptrval, &length))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ /* Request oldpath using 'm' packet */
+ oldpath = alloca (length);
+ retlength = remote_read_bytes (ptrval, oldpath, length);
+ if (retlength != length)
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ /* 2. Parameter: Ptr to newpath / length incl. trailing zero */
+ if (remote_fileio_extract_ptr_w_len (&buf, &ptrval, &length))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ /* Request newpath using 'm' packet */
+ newpath = alloca (length);
+ retlength = remote_read_bytes (ptrval, newpath, length);
+ if (retlength != length)
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+
+ /* Only operate on regular files and directories */
+ of = stat (oldpath, &ost);
+ nf = stat (newpath, &nst);
+ if ((!of && !S_ISREG (ost.st_mode) && !S_ISDIR (ost.st_mode))
+ || (!nf && !S_ISREG (nst.st_mode) && !S_ISDIR (nst.st_mode)))
+ {
+ remote_fileio_reply (-1, FILEIO_EACCES);
+ return;
+ }
+
+ remote_fio_no_longjmp = 1;
+ ret = rename (oldpath, newpath);
+
+ if (ret == -1)
+ {
+ /* Special case: newpath is a non-empty directory. Some systems
+ return ENOTEMPTY, some return EEXIST. We coerce that to be
+ always EEXIST. */
+ if (errno == ENOTEMPTY)
+ errno = EEXIST;
+#ifdef __CYGWIN__
+ /* Workaround some Cygwin problems with correct errnos. */
+ if (errno == EACCES)
+ {
+ if (!of && !nf && S_ISDIR (nst.st_mode))
+ {
+ if (S_ISREG (ost.st_mode))
+ errno = EISDIR;
+ else
+ {
+ char oldfullpath[PATH_MAX + 1];
+ char newfullpath[PATH_MAX + 1];
+ int len;
+
+ cygwin_conv_to_full_posix_path (oldpath, oldfullpath);
+ cygwin_conv_to_full_posix_path (newpath, newfullpath);
+ len = strlen (oldfullpath);
+ if (newfullpath[len] == '/'
+ && !strncmp (oldfullpath, newfullpath, len))
+ errno = EINVAL;
+ else
+ errno = EEXIST;
+ }
+ }
+ }
+#endif
+
+ remote_fileio_return_errno (-1);
+ }
+ else
+ remote_fileio_return_success (ret);
+}
+
+static void
+remote_fileio_func_unlink (char *buf)
+{
+ CORE_ADDR ptrval;
+ int length, retlength;
+ char *pathname;
+ int ret;
+ struct stat st;
+
+ /* Parameter: Ptr to pathname / length incl. trailing zero */
+ if (remote_fileio_extract_ptr_w_len (&buf, &ptrval, &length))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ /* Request pathname using 'm' packet */
+ pathname = alloca (length);
+ retlength = remote_read_bytes (ptrval, pathname, length);
+ if (retlength != length)
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+
+ /* Only operate on regular files (and directories, which allows to return
+ the correct return code) */
+ if (!stat (pathname, &st) && !S_ISREG (st.st_mode) && !S_ISDIR (st.st_mode))
+ {
+ remote_fileio_reply (-1, FILEIO_ENODEV);
+ return;
+ }
+
+ remote_fio_no_longjmp = 1;
+ ret = unlink (pathname);
+
+ if (ret == -1)
+ remote_fileio_return_errno (-1);
+ else
+ remote_fileio_return_success (ret);
+}
+
+static void
+remote_fileio_func_stat (char *buf)
+{
+ CORE_ADDR ptrval;
+ int ret, length, retlength;
+ char *pathname;
+ LONGEST lnum;
+ struct stat st;
+ struct fio_stat fst;
+
+ /* 1. Parameter: Ptr to pathname / length incl. trailing zero */
+ if (remote_fileio_extract_ptr_w_len (&buf, &ptrval, &length))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ /* Request pathname using 'm' packet */
+ pathname = alloca (length);
+ retlength = remote_read_bytes (ptrval, pathname, length);
+ if (retlength != length)
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+
+ /* 2. Parameter: Ptr to struct stat */
+ if (remote_fileio_extract_long (&buf, &lnum))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ ptrval = (CORE_ADDR) lnum;
+
+ remote_fio_no_longjmp = 1;
+ ret = stat (pathname, &st);
+
+ if (ret == -1)
+ {
+ remote_fileio_return_errno (-1);
+ return;
+ }
+ /* Only operate on regular files and directories */
+ if (!ret && !S_ISREG (st.st_mode) && !S_ISDIR (st.st_mode))
+ {
+ remote_fileio_reply (-1, FILEIO_EACCES);
+ return;
+ }
+ if (ptrval)
+ {
+ remote_fileio_to_fio_stat (&st, &fst);
+ remote_fileio_to_fio_uint (0, fst.fst_dev);
+
+ retlength = remote_fileio_write_bytes (ptrval, (char *) &fst, sizeof fst);
+ if (retlength != sizeof fst)
+ {
+ remote_fileio_return_errno (-1);
+ return;
+ }
+ }
+ remote_fileio_return_success (ret);
+}
+
+static void
+remote_fileio_func_fstat (char *buf)
+{
+ CORE_ADDR ptrval;
+ int fd, ret, retlength;
+ long target_fd;
+ LONGEST lnum;
+ struct stat st;
+ struct fio_stat fst;
+ struct timeval tv;
+
+ /* 1. Parameter: file descriptor */
+ if (remote_fileio_extract_int (&buf, &target_fd))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ fd = remote_fileio_map_fd ((int) target_fd);
+ if (fd == FIO_FD_INVALID)
+ {
+ remote_fileio_badfd ();
+ return;
+ }
+ /* 2. Parameter: Ptr to struct stat */
+ if (remote_fileio_extract_long (&buf, &lnum))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ ptrval = (CORE_ADDR) lnum;
+
+ remote_fio_no_longjmp = 1;
+ if (fd == FIO_FD_CONSOLE_IN || fd == FIO_FD_CONSOLE_OUT)
+ {
+ remote_fileio_to_fio_uint (1, fst.fst_dev);
+ st.st_mode = S_IFCHR | (fd == FIO_FD_CONSOLE_IN ? S_IRUSR : S_IWUSR);
+ st.st_nlink = 1;
+ st.st_uid = getuid ();
+ st.st_gid = getgid ();
+ st.st_rdev = 0;
+ st.st_size = 0;
+ st.st_blksize = 512;
+ st.st_blocks = 0;
+ if (!gettimeofday (&tv, NULL))
+ st.st_atime = st.st_mtime = st.st_ctime = tv.tv_sec;
+ else
+ st.st_atime = st.st_mtime = st.st_ctime = (time_t) 0;
+ ret = 0;
+ }
+ else
+ ret = fstat (fd, &st);
+
+ if (ret == -1)
+ {
+ remote_fileio_return_errno (-1);
+ return;
+ }
+ if (ptrval)
+ {
+ remote_fileio_to_fio_stat (&st, &fst);
+
+ retlength = remote_fileio_write_bytes (ptrval, (char *) &fst, sizeof fst);
+ if (retlength != sizeof fst)
+ {
+ remote_fileio_return_errno (-1);
+ return;
+ }
+ }
+ remote_fileio_return_success (ret);
+}
+
+static void
+remote_fileio_func_gettimeofday (char *buf)
+{
+ LONGEST lnum;
+ CORE_ADDR ptrval;
+ int ret, retlength;
+ struct timeval tv;
+ struct fio_timeval ftv;
+
+ /* 1. Parameter: struct timeval pointer */
+ if (remote_fileio_extract_long (&buf, &lnum))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ ptrval = (CORE_ADDR) lnum;
+ /* 2. Parameter: some pointer value... */
+ if (remote_fileio_extract_long (&buf, &lnum))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ /* ...which has to be NULL */
+ if (lnum)
+ {
+ remote_fileio_reply (-1, FILEIO_EINVAL);
+ return;
+ }
+
+ remote_fio_no_longjmp = 1;
+ ret = gettimeofday (&tv, NULL);
+
+ if (ret == -1)
+ {
+ remote_fileio_return_errno (-1);
+ return;
+ }
+
+ if (ptrval)
+ {
+ remote_fileio_to_fio_timeval (&tv, &ftv);
+
+ retlength = remote_fileio_write_bytes (ptrval, (char *) &ftv, sizeof ftv);
+ if (retlength != sizeof ftv)
+ {
+ remote_fileio_return_errno (-1);
+ return;
+ }
+ }
+ remote_fileio_return_success (ret);
+}
+
+static void
+remote_fileio_func_isatty (char *buf)
+{
+ long target_fd;
+ int fd;
+
+ /* Parameter: file descriptor */
+ if (remote_fileio_extract_int (&buf, &target_fd))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ remote_fio_no_longjmp = 1;
+ fd = remote_fileio_map_fd ((int) target_fd);
+ remote_fileio_return_success (fd == FIO_FD_CONSOLE_IN ||
+ fd == FIO_FD_CONSOLE_OUT ? 1 : 0);
+}
+
+static void
+remote_fileio_func_system (char *buf)
+{
+ CORE_ADDR ptrval;
+ int ret, length, retlength;
+ char *cmdline;
+
+ /* Check if system(3) has been explicitely allowed using the
+ `set remote system-call-allowed 1' command. If not, return
+ EPERM */
+ if (!remote_fio_system_call_allowed)
+ {
+ remote_fileio_reply (-1, FILEIO_EPERM);
+ return;
+ }
+
+ /* Parameter: Ptr to commandline / length incl. trailing zero */
+ if (remote_fileio_extract_ptr_w_len (&buf, &ptrval, &length))
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+ /* Request commandline using 'm' packet */
+ cmdline = alloca (length);
+ retlength = remote_read_bytes (ptrval, cmdline, length);
+ if (retlength != length)
+ {
+ remote_fileio_ioerror ();
+ return;
+ }
+
+ remote_fio_no_longjmp = 1;
+ ret = system (cmdline);
+
+ if (ret == -1)
+ remote_fileio_return_errno (-1);
+ else
+ remote_fileio_return_success (WEXITSTATUS (ret));
+}
+
+static struct {
+ char *name;
+ void (*func)(char *);
+} remote_fio_func_map[] = {
+ "open", remote_fileio_func_open,
+ "close", remote_fileio_func_close,
+ "read", remote_fileio_func_read,
+ "write", remote_fileio_func_write,
+ "lseek", remote_fileio_func_lseek,
+ "rename", remote_fileio_func_rename,
+ "unlink", remote_fileio_func_unlink,
+ "stat", remote_fileio_func_stat,
+ "fstat", remote_fileio_func_fstat,
+ "gettimeofday", remote_fileio_func_gettimeofday,
+ "isatty", remote_fileio_func_isatty,
+ "system", remote_fileio_func_system,
+ NULL, NULL
+};
+
+static int
+do_remote_fileio_request (struct ui_out *uiout, void *buf_arg)
+{
+ char *buf = buf_arg;
+ char *c;
+ int idx;
+
+ remote_fileio_sig_set (remote_fileio_ctrl_c_signal_handler);
+
+ c = strchr (++buf, ',');
+ if (c)
+ *c++ = '\0';
+ else
+ c = strchr (buf, '\0');
+ for (idx = 0; remote_fio_func_map[idx].name; ++idx)
+ if (!strcmp (remote_fio_func_map[idx].name, buf))
+ break;
+ if (!remote_fio_func_map[idx].name) /* ERROR: No such function. */
+ return RETURN_ERROR;
+ remote_fio_func_map[idx].func (c);
+ return 0;
+}
+
+void
+remote_fileio_request (char *buf)
+{
+ int ex;
+
+ remote_fileio_sig_init ();
+
+ remote_fio_ctrl_c_flag = 0;
+ remote_fio_no_longjmp = 0;
+
+ ex = catch_exceptions (uiout, do_remote_fileio_request, (void *)buf,
+ NULL, RETURN_MASK_ALL);
+ switch (ex)
+ {
+ case RETURN_ERROR:
+ remote_fileio_reply (-1, FILEIO_ENOSYS);
+ break;
+ case RETURN_QUIT:
+ remote_fileio_reply (-1, FILEIO_EINTR);
+ break;
+ default:
+ break;
+ }
+
+ remote_fileio_sig_exit ();
+}
+
+static void
+set_system_call_allowed (char *args, int from_tty)
+{
+ if (args)
+ {
+ char *arg_end;
+ int val = strtoul (args, &arg_end, 10);
+ if (*args && *arg_end == '\0')
+ {
+ remote_fio_system_call_allowed = !!val;
+ return;
+ }
+ }
+ error ("Illegal argument for \"set remote system-call-allowed\" command");
+}
+
+static void
+show_system_call_allowed (char *args, int from_tty)
+{
+ if (args)
+ error ("Garbage after \"show remote system-call-allowed\" command: `%s'", args);
+ printf_unfiltered ("Calling host system(3) call from target is %sallowed\n",
+ remote_fio_system_call_allowed ? "" : "not ");
+}
+
+void
+initialize_remote_fileio (struct cmd_list_element *remote_set_cmdlist,
+ struct cmd_list_element *remote_show_cmdlist)
+{
+ add_cmd ("system-call-allowed", no_class,
+ set_system_call_allowed,
+ "Set if the host system(3) call is allowed for the target.\n",
+ &remote_set_cmdlist);
+ add_cmd ("system-call-allowed", no_class,
+ show_system_call_allowed,
+ "Show if the host system(3) call is allowed for the target.\n",
+ &remote_show_cmdlist);
+}
diff --git a/gdb/config/mips/tm-tx39l.h b/gdb/remote-fileio.h
index 81f3b6ddc41..68c6450e8e3 100644
--- a/gdb/config/mips/tm-tx39l.h
+++ b/gdb/remote-fileio.h
@@ -1,4 +1,6 @@
-/* Copyright 1993, 1997, 1999, 2000 Free Software Foundation, Inc.
+/* Remote File-I/O communications
+
+ Copyright 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -17,16 +19,20 @@
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", "" \
- }
+/* See the GDB User Guide for details of the GDB remote protocol. */
+
+#ifndef REMOTE_FILEIO_H
+#define REMOTE_FILEIO_H
+
+struct cmd_list_element;
+
+/* Unified interface to remote fileio, called in remote.c from
+ remote_wait () and remote_async_wait () */
+extern void remote_fileio_request (char *buf);
+
+/* Called from _initialize_remote () */
+extern void initialize_remote_fileio (
+ struct cmd_list_element *remote_set_cmdlist,
+ struct cmd_list_element *remote_show_cmdlist);
+
+#endif
diff --git a/gdb/remote-hms.c b/gdb/remote-hms.c
index 438d6c6d6c7..cd7f4d39c49 100644
--- a/gdb/remote-hms.c
+++ b/gdb/remote-hms.c
@@ -140,6 +140,8 @@ hms_open (char *args, int from_tty)
int write_dos_tick_delay;
+extern initialize_file_ftype _initialize_remote_hms; /* -Wmissing-prototypes */
+
void
_initialize_remote_hms (void)
{
diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c
index e2908499fea..96f39728f54 100644
--- a/gdb/remote-mips.c
+++ b/gdb/remote-mips.c
@@ -536,7 +536,7 @@ fputs_readable (const char *string, struct ui_file *file)
timed out. TIMEOUT specifies timeout value in seconds.
*/
-int
+static int
mips_expect_timeout (const char *string, int timeout)
{
const char *p = string;
@@ -592,7 +592,7 @@ mips_expect_timeout (const char *string, int timeout)
mips_expect_timeout if a different timeout value is needed.
*/
-int
+static int
mips_expect (const char *string)
{
return mips_expect_timeout (string, remote_timeout);
@@ -600,7 +600,7 @@ mips_expect (const char *string)
/* Read the required number of characters into the given buffer (which
is assumed to be large enough). The only failure is a timeout. */
-int
+static int
mips_getstring (char *string, int n)
{
char *p = string;
@@ -1721,7 +1721,7 @@ mips_resume (ptid_t ptid, int step, enum target_signal siggnal)
/* Return the signal corresponding to SIG, where SIG is the number which
the MIPS protocol uses for the signal. */
-enum target_signal
+static enum target_signal
mips_signal_from_protocol (int sig)
{
/* We allow a few more signals than the IDT board actually returns, on
@@ -2437,7 +2437,7 @@ calculate_mask (CORE_ADDR addr, int len)
/* Insert a hardware breakpoint. This works only on LSI targets, which
implement ordinary breakpoints using hardware facilities. */
-int
+static int
remote_mips_insert_hw_breakpoint (CORE_ADDR addr, char *contents_cache)
{
if (strcmp (target_shortname, "lsi") == 0)
@@ -2450,7 +2450,7 @@ remote_mips_insert_hw_breakpoint (CORE_ADDR addr, char *contents_cache)
/* Remove a hardware breakpoint. This works only on LSI targets, which
implement ordinary breakpoints using hardware facilities. */
-int
+static int
remote_mips_remove_hw_breakpoint (CORE_ADDR addr, char *contents_cache)
{
if (strcmp (target_shortname, "lsi") == 0)
@@ -3477,6 +3477,8 @@ pmon_command (char *args, int from_tty)
printf_filtered ("Received packet: %s\n", buf);
}
+extern initialize_file_ftype _initialize_remote_mips; /* -Wmissing-prototypes */
+
void
_initialize_remote_mips (void)
{
diff --git a/gdb/remote-rdi.c b/gdb/remote-rdi.c
index a85fbb118b7..a868f3806c5 100644
--- a/gdb/remote-rdi.c
+++ b/gdb/remote-rdi.c
@@ -146,7 +146,7 @@ arm_rdi_start_remote (char *dummy)
/* Helper callbacks for the "host interface" structure. RDI functions call
these to forward output from the target system and so forth. */
-void
+static void
voiddummy (void *dummy)
{
fprintf_unfiltered (gdb_stdout, "void dummy\n");
@@ -1009,6 +1009,8 @@ rdilogenable_command (char *args, int from_tty)
" try y or n\n", args);
}
+extern initialize_file_ftype _initialize_remote_rdi; /* -Wmissing-prototypes */
+
void
_initialize_remote_rdi (void)
{
@@ -1063,8 +1065,8 @@ _initialize_remote_rdi (void)
/* A little dummy to make linking with the library succeed. */
-int
-Fail (void)
+void
+Fail (const char *ignored, ...)
{
- return 0;
+
}
diff --git a/gdb/remote-rdp.c b/gdb/remote-rdp.c
index a9dba9ab401..6cbf73cbe8a 100644
--- a/gdb/remote-rdp.c
+++ b/gdb/remote-rdp.c
@@ -374,7 +374,7 @@ rdp_init (int cold, int tty)
}
-void
+static void
send_rdp (char *template,...)
{
char buf[200];
@@ -1403,6 +1403,8 @@ init_remote_rdp_ops (void)
remote_rdp_ops.to_magic = OPS_MAGIC;
}
+extern initialize_file_ftype _initialize_remote_rdp; /* -Wmissing-prototypes */
+
void
_initialize_remote_rdp (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 a7249635a57..0555873834b 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -55,6 +55,8 @@
#include "gdbcore.h" /* for exec_bfd */
+#include "remote-fileio.h"
+
/* Prototypes for local functions */
static void cleanup_sigint_signal_handler (void *dummy);
static void initialize_sigint_signal_handler (void);
@@ -67,10 +69,6 @@ void async_remote_interrupt_twice (gdb_client_data);
static void build_remote_gdbarch_data (void);
-static int remote_write_bytes (CORE_ADDR memaddr, char *myaddr, int len);
-
-static int remote_read_bytes (CORE_ADDR memaddr, char *myaddr, int len);
-
static void remote_files_info (struct target_ops *ignore);
static int remote_xfer_memory (CORE_ADDR memaddr, char *myaddr,
@@ -128,7 +126,6 @@ static void remote_async_kill (void);
static int tohex (int nib);
static void remote_detach (char *args, int from_tty);
-static void remote_async_detach (char *args, int from_tty);
static void remote_interrupt (int signo);
@@ -261,9 +258,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 +272,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
@@ -1985,8 +1986,10 @@ get_offsets (void)
if (symfile_objfile == NULL)
return;
- offs = (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
- memcpy (offs, symfile_objfile->section_offsets, SIZEOF_SECTION_OFFSETS);
+ offs = ((struct section_offsets *)
+ alloca (SIZEOF_N_SECTION_OFFSETS (symfile_objfile->num_sections)));
+ memcpy (offs, symfile_objfile->section_offsets,
+ SIZEOF_N_SECTION_OFFSETS (symfile_objfile->num_sections));
offs->offsets[SECT_OFF_TEXT (symfile_objfile)] = text_addr;
@@ -2097,8 +2100,10 @@ remote_cisco_objfile_relocate (bfd_signed_vma text_off, bfd_signed_vma data_off,
broken for xcoff, dwarf, sdb-coff, etc. But there is no
simple canonical representation for this stuff. */
- offs = (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
- memcpy (offs, symfile_objfile->section_offsets, SIZEOF_SECTION_OFFSETS);
+ offs = (struct section_offsets *)
+ alloca (SIZEOF_N_SECTION_OFFSETS (symfile_objfile->num_sections));
+ memcpy (offs, symfile_objfile->section_offsets,
+ SIZEOF_N_SECTION_OFFSETS (symfile_objfile->num_sections));
offs->offsets[SECT_OFF_TEXT (symfile_objfile)] = text_off;
offs->offsets[SECT_OFF_DATA (symfile_objfile)] = data_off;
@@ -2418,15 +2423,19 @@ remote_detach (char *args, int from_tty)
strcpy (buf, "D");
remote_send (buf, (rs->remote_packet_size));
+ /* Unregister the file descriptor from the event loop. */
+ if (target_is_async_p ())
+ serial_async (remote_desc, NULL, 0);
+
target_mourn_inferior ();
if (from_tty)
puts_filtered ("Ending remote debugging.\n");
-
}
-/* Same as remote_detach, but with async support. */
+/* Same as remote_detach, but don't send the "D" packet; just disconnect. */
+
static void
-remote_async_detach (char *args, int from_tty)
+remote_disconnect (char *args, int from_tty)
{
struct remote_state *rs = get_remote_state ();
char *buf = alloca (rs->remote_packet_size);
@@ -2434,10 +2443,6 @@ remote_async_detach (char *args, int from_tty)
if (args)
error ("Argument given to \"detach\" when remotely debugging.");
- /* Tell the remote target to detach. */
- strcpy (buf, "D");
- remote_send (buf, (rs->remote_packet_size));
-
/* Unregister the file descriptor from the event loop. */
if (target_is_async_p ())
serial_async (remote_desc, NULL, 0);
@@ -2948,6 +2953,9 @@ remote_wait (ptid_t ptid, struct target_waitstatus *status)
case 'E': /* Error of some sort */
warning ("Remote failure reply: %s", buf);
continue;
+ case 'F': /* File-I/O request */
+ remote_fileio_request (buf);
+ continue;
case 'T': /* Status with PC, SP, FP, ... */
{
int i;
@@ -3199,6 +3207,9 @@ remote_async_wait (ptid_t ptid, struct target_waitstatus *status)
case 'E': /* Error of some sort */
warning ("Remote failure reply: %s", buf);
continue;
+ case 'F': /* File-I/O request */
+ remote_fileio_request (buf);
+ continue;
case 'T': /* Status with PC, SP, FP, ... */
{
int i;
@@ -3523,16 +3534,19 @@ remote_fetch_registers (int regnum)
static void
remote_prepare_to_store (void)
{
+ struct remote_state *rs = get_remote_state ();
+ int i;
+ char buf[MAX_REGISTER_SIZE];
+
/* Make sure the entire registers array is valid. */
switch (remote_protocol_P.support)
{
case PACKET_DISABLE:
case PACKET_SUPPORT_UNKNOWN:
- /* NOTE: This isn't rs->sizeof_g_packet because here, we are
- forcing the register cache to read its and not the target
- registers. */
- deprecated_read_register_bytes (0, (char *) NULL,
- DEPRECATED_REGISTER_BYTES); /* OK */
+ /* Make sure all the necessary registers are cached. */
+ for (i = 0; i < NUM_REGS; i++)
+ if (rs->regs[i].in_g_packet)
+ regcache_raw_read (current_regcache, rs->regs[i].regnum, buf);
break;
case PACKET_ENABLE:
break;
@@ -3753,7 +3767,7 @@ check_binary_download (CORE_ADDR addr)
Returns number of bytes transferred, or 0 (setting errno) for
error. Only transfer a single packet. */
-static int
+int
remote_write_bytes (CORE_ADDR memaddr, char *myaddr, int len)
{
unsigned char *buf;
@@ -3897,7 +3911,7 @@ remote_write_bytes (CORE_ADDR memaddr, char *myaddr, int len)
caller and its callers caller ;-) already contains code for
handling partial reads. */
-static int
+int
remote_read_bytes (CORE_ADDR memaddr, char *myaddr, int len)
{
char *buf;
@@ -4628,33 +4642,33 @@ extended_remote_async_create_inferior (char *exec_file, char *args, char **env)
/* On some machines, e.g. 68k, we may use a different breakpoint
- instruction than other targets; in those use REMOTE_BREAKPOINT
- instead of just BREAKPOINT_FROM_PC. Also, bi-endian targets may
- define LITTLE_REMOTE_BREAKPOINT and BIG_REMOTE_BREAKPOINT. If none
- of these are defined, we just call the standard routines that are
- in mem-break.c. */
-
-/* FIXME, these ought to be done in a more dynamic fashion. For instance,
- the choice of breakpoint instruction affects target program design and
- vice versa, and by making it user-tweakable, the special code here
- goes away and we need fewer special GDB configurations. */
-
-#if defined (LITTLE_REMOTE_BREAKPOINT) && defined (BIG_REMOTE_BREAKPOINT) && !defined(REMOTE_BREAKPOINT)
-#define REMOTE_BREAKPOINT
+ instruction than other targets; in those use
+ DEPRECATED_REMOTE_BREAKPOINT instead of just BREAKPOINT_FROM_PC.
+ Also, bi-endian targets may define
+ DEPRECATED_LITTLE_REMOTE_BREAKPOINT and
+ DEPRECATED_BIG_REMOTE_BREAKPOINT. If none of these are defined, we
+ just call the standard routines that are in mem-break.c. */
+
+/* NOTE: cagney/2003-06-08: This is silly. A remote and simulator
+ target should use an identical BREAKPOINT_FROM_PC. As for native,
+ the ARCH-OS-tdep.c code can override the default. */
+
+#if defined (DEPRECATED_LITTLE_REMOTE_BREAKPOINT) && defined (DEPRECATED_BIG_REMOTE_BREAKPOINT) && !defined(DEPRECATED_REMOTE_BREAKPOINT)
+#define DEPRECATED_REMOTE_BREAKPOINT
#endif
-#ifdef REMOTE_BREAKPOINT
+#ifdef DEPRECATED_REMOTE_BREAKPOINT
/* If the target isn't bi-endian, just pretend it is. */
-#if !defined (LITTLE_REMOTE_BREAKPOINT) && !defined (BIG_REMOTE_BREAKPOINT)
-#define LITTLE_REMOTE_BREAKPOINT REMOTE_BREAKPOINT
-#define BIG_REMOTE_BREAKPOINT REMOTE_BREAKPOINT
+#if !defined (DEPRECATED_LITTLE_REMOTE_BREAKPOINT) && !defined (DEPRECATED_BIG_REMOTE_BREAKPOINT)
+#define DEPRECATED_LITTLE_REMOTE_BREAKPOINT DEPRECATED_REMOTE_BREAKPOINT
+#define DEPRECATED_BIG_REMOTE_BREAKPOINT DEPRECATED_REMOTE_BREAKPOINT
#endif
-static unsigned char big_break_insn[] = BIG_REMOTE_BREAKPOINT;
-static unsigned char little_break_insn[] = LITTLE_REMOTE_BREAKPOINT;
+static unsigned char big_break_insn[] = DEPRECATED_BIG_REMOTE_BREAKPOINT;
+static unsigned char little_break_insn[] = DEPRECATED_LITTLE_REMOTE_BREAKPOINT;
-#endif /* REMOTE_BREAKPOINT */
+#endif /* DEPRECATED_REMOTE_BREAKPOINT */
/* Insert a breakpoint on targets that don't have any better
breakpoint support. We read the contents of the target location
@@ -4668,7 +4682,7 @@ static int
remote_insert_breakpoint (CORE_ADDR addr, char *contents_cache)
{
struct remote_state *rs = get_remote_state ();
-#ifdef REMOTE_BREAKPOINT
+#ifdef DEPRECATED_REMOTE_BREAKPOINT
int val;
#endif
int bp_size;
@@ -4705,7 +4719,7 @@ remote_insert_breakpoint (CORE_ADDR addr, char *contents_cache)
}
}
-#ifdef REMOTE_BREAKPOINT
+#ifdef DEPRECATED_REMOTE_BREAKPOINT
val = target_read_memory (addr, contents_cache, sizeof big_break_insn);
if (val == 0)
@@ -4721,7 +4735,7 @@ remote_insert_breakpoint (CORE_ADDR addr, char *contents_cache)
return val;
#else
return memory_insert_breakpoint (addr, contents_cache);
-#endif /* REMOTE_BREAKPOINT */
+#endif /* DEPRECATED_REMOTE_BREAKPOINT */
}
static int
@@ -4750,11 +4764,11 @@ remote_remove_breakpoint (CORE_ADDR addr, char *contents_cache)
return (buf[0] == 'E');
}
-#ifdef REMOTE_BREAKPOINT
+#ifdef DEPRECATED_REMOTE_BREAKPOINT
return target_write_memory (addr, contents_cache, sizeof big_break_insn);
#else
return memory_remove_breakpoint (addr, contents_cache);
-#endif /* REMOTE_BREAKPOINT */
+#endif /* DEPRECATED_REMOTE_BREAKPOINT */
}
static int
@@ -4849,7 +4863,7 @@ remote_remove_watchpoint (CORE_ADDR addr, int len, int type)
int remote_hw_watchpoint_limit = -1;
int remote_hw_breakpoint_limit = -1;
-int
+static int
remote_check_watch_resources (int type, int cnt, int ot)
{
if (type == bp_hardware_breakpoint)
@@ -4875,13 +4889,13 @@ remote_check_watch_resources (int type, int cnt, int ot)
return -1;
}
-int
+static int
remote_stopped_by_watchpoint (void)
{
return remote_stopped_by_watchpoint_p;
}
-CORE_ADDR
+static CORE_ADDR
remote_stopped_data_address (void)
{
if (remote_stopped_by_watchpoint ())
@@ -5426,6 +5440,7 @@ Specify the serial device it is connected to\n\
remote_ops.to_open = remote_open;
remote_ops.to_close = remote_close;
remote_ops.to_detach = remote_detach;
+ remote_ops.to_disconnect = remote_disconnect;
remote_ops.to_resume = remote_resume;
remote_ops.to_wait = remote_wait;
remote_ops.to_fetch_registers = remote_fetch_registers;
@@ -5846,6 +5861,7 @@ Specify the serial device it is connected to (e.g. host:2020).";
remote_cisco_ops.to_open = remote_cisco_open;
remote_cisco_ops.to_close = remote_cisco_close;
remote_cisco_ops.to_detach = remote_detach;
+ remote_cisco_ops.to_disconnect = remote_disconnect;
remote_cisco_ops.to_resume = remote_resume;
remote_cisco_ops.to_wait = remote_cisco_wait;
remote_cisco_ops.to_fetch_registers = remote_fetch_registers;
@@ -5941,7 +5957,8 @@ init_remote_async_ops (void)
Specify the serial device it is connected to (e.g. /dev/ttya).";
remote_async_ops.to_open = remote_async_open;
remote_async_ops.to_close = remote_close;
- remote_async_ops.to_detach = remote_async_detach;
+ remote_async_ops.to_detach = remote_detach;
+ remote_async_ops.to_disconnect = remote_disconnect;
remote_async_ops.to_resume = remote_async_resume;
remote_async_ops.to_wait = remote_async_wait;
remote_async_ops.to_fetch_registers = remote_fetch_registers;
@@ -6271,4 +6288,7 @@ Set use of remote protocol `Z' packets",
set_remote_protocol_Z_packet_cmd,
show_remote_protocol_Z_packet_cmd,
&remote_set_cmdlist, &remote_show_cmdlist);
+
+ /* Eventually initialize fileio. See fileio.c */
+ initialize_remote_fileio (remote_set_cmdlist, remote_show_cmdlist);
}
diff --git a/gdb/remote.h b/gdb/remote.h
index 4477148f9c8..7c0df32ad6f 100644
--- a/gdb/remote.h
+++ b/gdb/remote.h
@@ -54,6 +54,10 @@ extern void remote_cisco_objfile_relocate (bfd_signed_vma text_off,
extern void async_remote_interrupt_twice (void *arg);
+extern int remote_write_bytes (CORE_ADDR memaddr, char *myaddr, int len);
+
+extern int remote_read_bytes (CORE_ADDR memaddr, char *myaddr, int len);
+
extern void (*target_resume_hook) (void);
extern void (*target_wait_loop_hook) (void);
diff --git a/gdb/rom68k-rom.c b/gdb/rom68k-rom.c
index 6b0926bf408..af5e02365ed 100644
--- a/gdb/rom68k-rom.c
+++ b/gdb/rom68k-rom.c
@@ -246,6 +246,8 @@ rom68k_open (char *args, int from_tty)
monitor_open (args, &rom68k_cmds, from_tty);
}
+extern initialize_file_ftype _initialize_rom68k; /* -Wmissing-prototypes */
+
void
_initialize_rom68k (void)
{
diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c
index c5a0ea73d8f..e825529ba95 100644
--- a/gdb/rs6000-nat.c
+++ b/gdb/rs6000-nat.c
@@ -485,7 +485,8 @@ child_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len,
/* Fetch trailing memory needed for alignment. */
if (addr + count * sizeof (int) > memaddr + len)
- if (!read_word (addr, buf + count - 1, arch64))
+ if (!read_word (addr + (count - 1) * sizeof (int),
+ buf + count - 1, arch64))
return 0;
/* Copy supplied data into memory buffer. */
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 977669753d1..9f3e9ea66b3 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. */
+static 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;
@@ -1851,6 +1894,10 @@ rs6000_register_virtual_type (int n)
int size = regsize (reg, tdep->wordsize);
switch (size)
{
+ case 0:
+ return builtin_type_int0;
+ case 4:
+ return builtin_type_int32;
case 8:
if (tdep->ppc_ev0_regnum <= n && n <= tdep->ppc_ev31_regnum)
return builtin_type_vec64;
@@ -1861,8 +1908,8 @@ rs6000_register_virtual_type (int n)
return builtin_type_vec128;
break;
default:
- return builtin_type_int32;
- break;
+ internal_error (__FILE__, __LINE__, "Register %d size %d unknown",
+ n, size);
}
}
}
@@ -1901,7 +1948,7 @@ rs6000_register_convert_to_virtual (int n, struct type *type,
static void
rs6000_register_convert_to_raw (struct type *type, int n,
- char *from, char *to)
+ const char *from, char *to)
{
if (TYPE_LENGTH (type) != REGISTER_RAW_SIZE (n))
{
@@ -2121,7 +2168,7 @@ rs6000_create_inferior (int pid)
/* Return real function address if ADDR (a function pointer) is in the data
space and is therefore a special function pointer. */
-CORE_ADDR
+static CORE_ADDR
rs6000_convert_from_func_ptr_addr (CORE_ADDR addr)
{
struct obj_section *s;
@@ -2867,22 +2914,20 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
else
set_gdbarch_print_insn (gdbarch, gdb_print_insn_powerpc);
- set_gdbarch_read_pc (gdbarch, generic_target_read_pc);
set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
- set_gdbarch_read_sp (gdbarch, generic_target_read_sp);
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
set_gdbarch_num_regs (gdbarch, v->nregs);
set_gdbarch_num_pseudo_regs (gdbarch, v->npregs);
set_gdbarch_register_name (gdbarch, rs6000_register_name);
set_gdbarch_deprecated_register_size (gdbarch, wordsize);
set_gdbarch_deprecated_register_bytes (gdbarch, off);
- set_gdbarch_register_byte (gdbarch, rs6000_register_byte);
- set_gdbarch_register_raw_size (gdbarch, rs6000_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, rs6000_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, rs6000_register_raw_size);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, 16);
- set_gdbarch_register_virtual_size (gdbarch, generic_register_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, generic_register_size);
set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 16);
- set_gdbarch_register_virtual_type (gdbarch, rs6000_register_virtual_type);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, rs6000_register_virtual_type);
set_gdbarch_ptr_bit (gdbarch, wordsize * TARGET_CHAR_BIT);
set_gdbarch_short_bit (gdbarch, 2 * TARGET_CHAR_BIT);
@@ -2899,13 +2944,13 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_fix_call_dummy (gdbarch, rs6000_fix_call_dummy);
set_gdbarch_frame_align (gdbarch, rs6000_frame_align);
- set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
+ set_gdbarch_deprecated_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
set_gdbarch_deprecated_push_return_address (gdbarch, ppc_push_return_address);
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
- set_gdbarch_register_convertible (gdbarch, rs6000_register_convertible);
- set_gdbarch_register_convert_to_virtual (gdbarch, rs6000_register_convert_to_virtual);
- set_gdbarch_register_convert_to_raw (gdbarch, rs6000_register_convert_to_raw);
+ set_gdbarch_deprecated_register_convertible (gdbarch, rs6000_register_convertible);
+ set_gdbarch_deprecated_register_convert_to_virtual (gdbarch, rs6000_register_convert_to_virtual);
+ set_gdbarch_deprecated_register_convert_to_raw (gdbarch, rs6000_register_convert_to_raw);
set_gdbarch_stab_reg_to_regnum (gdbarch, rs6000_stab_reg_to_regnum);
/* Note: kevinb/2002-04-12: I'm not convinced that rs6000_push_arguments()
is correct for the SysV ABI when the wordsize is 8, but I'm also
@@ -2954,13 +2999,12 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_convert_from_func_ptr_addr (gdbarch,
rs6000_convert_from_func_ptr_addr);
}
- set_gdbarch_frame_args_address (gdbarch, rs6000_frame_args_address);
- set_gdbarch_frame_locals_address (gdbarch, rs6000_frame_args_address);
+ set_gdbarch_deprecated_frame_args_address (gdbarch, rs6000_frame_args_address);
+ set_gdbarch_deprecated_frame_locals_address (gdbarch, rs6000_frame_args_address);
set_gdbarch_deprecated_saved_pc_after_call (gdbarch, rs6000_saved_pc_after_call);
- /* 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);
+ /* Helpers for function argument information. */
+ set_gdbarch_fetch_pointer_argument (gdbarch, rs6000_fetch_pointer_argument);
/* Hook in ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch);
@@ -2989,6 +3033,8 @@ rs6000_info_powerpc_command (char *args, int from_tty)
/* Initialization code. */
+extern initialize_file_ftype _initialize_rs6000_tdep; /* -Wmissing-prototypes */
+
void
_initialize_rs6000_tdep (void)
{
diff --git a/gdb/s390-nat.c b/gdb/s390-nat.c
index 63e779bc19e..732cf94451a 100644
--- a/gdb/s390-nat.c
+++ b/gdb/s390-nat.c
@@ -60,20 +60,14 @@ s390_register_u_addr (int blockend, int regnum)
retval = PT_CR_9 + ((regnum - (S390_FIRST_CR + 9)) * S390_CR_SIZE);
else
{
-#ifdef GDBSERVER
- error ("s390_register_u_addr invalid regnum %s %d regnum=%d",
- __FILE__, (int) __LINE__, regnum);
-#else
internal_error (__FILE__, __LINE__,
"s390_register_u_addr invalid regnum regnum=%d",
regnum);
-#endif
retval = 0;
}
return retval + blockend;
}
-#ifndef GDBSERVER
/* watch_areas are required if you put 2 or more watchpoints on the same
address or overlapping areas gdb will call us to delete the watchpoint
more than once when we try to delete them.
@@ -251,9 +245,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 +295,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
@@ -322,4 +356,3 @@ fill_fpregset (fpregset_t * fpregsetp, int regno)
#error "libc files are inconsistent with linux/include/asm-s390/"
#error "3) you didn't do a completely clean build & delete config.cache."
#endif
-#endif /* GDBSERVER */
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index c7dce06a17b..87ddef0de16 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -45,7 +45,7 @@
/* Number of bytes of storage in the actual machine representation
for register N. */
-int
+static int
s390_register_raw_size (int reg_nr)
{
if (S390_FP0_REGNUM <= reg_nr
@@ -55,21 +55,21 @@ s390_register_raw_size (int reg_nr)
return 4;
}
-int
+static int
s390x_register_raw_size (int reg_nr)
{
return (reg_nr == S390_FPC_REGNUM)
|| (reg_nr >= S390_FIRST_ACR && reg_nr <= S390_LAST_ACR) ? 4 : 8;
}
-int
+static int
s390_cannot_fetch_register (int regno)
{
return (regno >= S390_FIRST_CR && regno < (S390_FIRST_CR + 9)) ||
(regno >= (S390_FIRST_CR + 12) && regno <= S390_LAST_CR);
}
-int
+static int
s390_register_byte (int reg_nr)
{
if (reg_nr <= S390_GP_LAST_REGNUM)
@@ -84,7 +84,6 @@ s390_register_byte (int reg_nr)
return S390_FP0_OFFSET + (((reg_nr) - S390_FP0_REGNUM) * S390_FPR_SIZE);
}
-#ifndef GDBSERVER
#define S390_MAX_INSTR_SIZE (6)
#define S390_SYSCALL_OPCODE (0x0a)
#define S390_SYSCALL_SIZE (2)
@@ -119,7 +118,7 @@ struct frame_extra_info
static CORE_ADDR s390_frame_saved_pc_nofix (struct frame_info *fi);
-int
+static int
s390_readinstruction (bfd_byte instr[], CORE_ADDR at,
struct disassemble_info *info)
{
@@ -150,7 +149,7 @@ s390_memset_extra_info (struct frame_extra_info *fextra_info)
-const char *
+static const char *
s390_register_name (int reg_nr)
{
static char *register_names[] = {
@@ -175,7 +174,7 @@ s390_register_name (int reg_nr)
-int
+static int
s390_stab_reg_to_regnum (int regno)
{
return regno >= 64 ? S390_PSWM_REGNUM - 64 :
@@ -210,7 +209,7 @@ is_arg_reg (int regidx)
*/
-int
+static int
s390_get_frame_info (CORE_ADDR pc, struct frame_extra_info *fextra_info,
struct frame_info *fi, int init_extra_info)
{
@@ -675,7 +674,7 @@ s390_get_frame_info (CORE_ADDR pc, struct frame_extra_info *fextra_info,
}
-int
+static int
s390_check_function_end (CORE_ADDR pc)
{
bfd_byte instr[S390_MAX_INSTR_SIZE];
@@ -767,7 +766,7 @@ s390_sniff_pc_function_start (CORE_ADDR pc, struct frame_info *fi)
-CORE_ADDR
+static CORE_ADDR
s390_function_start (struct frame_info *fi)
{
CORE_ADDR function_start = 0;
@@ -782,7 +781,7 @@ s390_function_start (struct frame_info *fi)
-int
+static int
s390_frameless_function_invocation (struct frame_info *fi)
{
struct frame_extra_info fextra_info, *fextra_info_ptr;
@@ -881,7 +880,7 @@ s390_is_sigreturn (CORE_ADDR pc, struct frame_info *sighandler_fi,
for the moment.
For some reason the blockframe.c calls us with fi->next->fromleaf
so this seems of little use to us. */
-CORE_ADDR
+static CORE_ADDR
s390_init_frame_pc_first (int next_fromleaf, struct frame_info *fi)
{
CORE_ADDR sigcaller_pc;
@@ -901,7 +900,7 @@ s390_init_frame_pc_first (int next_fromleaf, struct frame_info *fi)
return pc;
}
-void
+static void
s390_init_extra_frame_info (int fromleaf, struct frame_info *fi)
{
frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
@@ -916,7 +915,7 @@ s390_init_extra_frame_info (int fromleaf, struct frame_info *fi)
&FEXTRA_INFOP contains struct frame_extra_info; TDATAP can be NULL,
in which case the framedata are read. */
-void
+static void
s390_frame_init_saved_regs (struct frame_info *fi)
{
@@ -941,15 +940,6 @@ s390_frame_init_saved_regs (struct frame_info *fi)
-CORE_ADDR
-s390_frame_args_address (struct frame_info *fi)
-{
-
- /* Apparently gdb already knows gdb_args_offset itself */
- return get_frame_base (fi);
-}
-
-
static CORE_ADDR
s390_frame_saved_pc_nofix (struct frame_info *fi)
{
@@ -979,7 +969,7 @@ s390_frame_saved_pc_nofix (struct frame_info *fi)
return 0;
}
-CORE_ADDR
+static CORE_ADDR
s390_frame_saved_pc (struct frame_info *fi)
{
CORE_ADDR saved_pc = 0, sig_pc;
@@ -1008,7 +998,7 @@ s390_frame_saved_pc (struct frame_info *fi)
/* We want backtraces out of signal handlers so we don't set
(get_frame_type (thisframe) == SIGTRAMP_FRAME) to 1 */
-CORE_ADDR
+static CORE_ADDR
s390_frame_chain (struct frame_info *thisframe)
{
CORE_ADDR prev_fp = 0;
@@ -1088,7 +1078,7 @@ s390_frame_chain (struct frame_info *thisframe)
/* a given return value in `regbuf' with a type `valtype', extract and copy its
value into `valbuf' */
-void
+static void
s390_extract_return_value (struct type *valtype, char *regbuf, char *valbuf)
{
/* floats and doubles are returned in fpr0. fpr's have a size of 8 bytes.
@@ -1146,7 +1136,7 @@ s390_promote_integer_argument (struct type *valtype, char *valbuf,
return (value);
}
-void
+static void
s390_store_return_value (struct type *valtype, char *valbuf)
{
int arglen;
@@ -1194,7 +1184,7 @@ gdb_print_insn_s390 (bfd_vma memaddr, disassemble_info * info)
/* Not the most efficent code in the world */
-int
+static int
s390_fp_regnum (void)
{
int regno = S390_SP_REGNUM;
@@ -1209,7 +1199,7 @@ s390_fp_regnum (void)
return regno;
}
-CORE_ADDR
+static CORE_ADDR
s390_read_fp (void)
{
return read_register (s390_fp_regnum ());
@@ -1251,7 +1241,7 @@ s390_pop_frame_regular (struct frame_info *frame)
machine state that was in effect before the frame was created.
Used in the contexts of the "return" command, and of
target function calls from the debugger. */
-void
+static void
s390_pop_frame (void)
{
/* This function checks for and handles generic dummy frames, and
@@ -1501,7 +1491,7 @@ alignment_of (struct type *type)
Our caller has taken care of any type promotions needed to satisfy
prototypes or the old K&R argument-passing rules. */
-CORE_ADDR
+static CORE_ADDR
s390_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
{
@@ -1685,7 +1675,7 @@ s390_use_struct_convention (int gcc_p, struct type *value_type)
/* Return the GDB type object for the "standard" data type
of data in register N. */
-struct type *
+static struct type *
s390_register_virtual_type (int regno)
{
if (S390_FP0_REGNUM <= regno && regno < S390_FP0_REGNUM + S390_NUM_FPRS)
@@ -1695,7 +1685,7 @@ s390_register_virtual_type (int regno)
}
-struct type *
+static struct type *
s390x_register_virtual_type (int regno)
{
return (regno == S390_FPC_REGNUM) ||
@@ -1705,7 +1695,7 @@ s390x_register_virtual_type (int regno)
-void
+static void
s390_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
{
write_register (S390_GP0_REGNUM + 2, addr);
@@ -1713,7 +1703,7 @@ s390_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
-const static unsigned char *
+static const unsigned char *
s390_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
{
static unsigned char breakpoint[] = { 0x0, 0x1 };
@@ -1724,7 +1714,7 @@ s390_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
/* Advance PC across any function entry prologue instructions to reach some
"real" code. */
-CORE_ADDR
+static CORE_ADDR
s390_skip_prologue (CORE_ADDR pc)
{
struct frame_extra_info fextra_info;
@@ -1737,7 +1727,7 @@ s390_skip_prologue (CORE_ADDR pc)
Can't go through the frames for this because on some machines
the new frame is not set up until the new function executes
some instructions. */
-CORE_ADDR
+static CORE_ADDR
s390_saved_pc_after_call (struct frame_info *frame)
{
return ADDR_BITS_REMOVE (read_register (S390_RETADDR_REGNUM));
@@ -1775,7 +1765,7 @@ s390_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
return NULL;
}
-int
+static int
s390_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name,
int *type_flags_ptr)
{
@@ -1788,7 +1778,7 @@ s390_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name
return 0;
}
-struct gdbarch *
+static struct gdbarch *
s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
static LONGEST s390_call_dummy_words[] = { 0 };
@@ -1816,12 +1806,8 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_char_signed (gdbarch, 0);
set_gdbarch_frame_args_skip (gdbarch, 0);
- set_gdbarch_frame_args_address (gdbarch, s390_frame_args_address);
set_gdbarch_deprecated_frame_chain (gdbarch, s390_frame_chain);
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, s390_frame_init_saved_regs);
- set_gdbarch_frame_locals_address (gdbarch, s390_frame_args_address);
- /* We can't do this */
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
set_gdbarch_deprecated_store_struct_return (gdbarch, s390_store_struct_return);
set_gdbarch_deprecated_extract_return_value (gdbarch, s390_extract_return_value);
set_gdbarch_deprecated_store_return_value (gdbarch, s390_store_return_value);
@@ -1853,7 +1839,7 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
produces the frame's chain-pointer. */
set_gdbarch_deprecated_frame_chain (gdbarch, s390_frame_chain);
set_gdbarch_deprecated_saved_pc_after_call (gdbarch, s390_saved_pc_after_call);
- set_gdbarch_register_byte (gdbarch, s390_register_byte);
+ set_gdbarch_deprecated_register_byte (gdbarch, s390_register_byte);
set_gdbarch_pc_regnum (gdbarch, S390_PC_REGNUM);
set_gdbarch_sp_regnum (gdbarch, S390_SP_REGNUM);
set_gdbarch_deprecated_fp_regnum (gdbarch, S390_FP_REGNUM);
@@ -1873,7 +1859,7 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
set_gdbarch_frame_align (gdbarch, s390_frame_align);
set_gdbarch_deprecated_push_arguments (gdbarch, s390_push_arguments);
- set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
+ set_gdbarch_deprecated_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
set_gdbarch_deprecated_push_return_address (gdbarch,
s390_push_return_address);
set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (s390_call_dummy_words));
@@ -1883,19 +1869,18 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
case bfd_mach_s390_31:
set_gdbarch_deprecated_register_size (gdbarch, 4);
- set_gdbarch_register_raw_size (gdbarch, s390_register_raw_size);
- set_gdbarch_register_virtual_size (gdbarch, s390_register_raw_size);
- set_gdbarch_register_virtual_type (gdbarch, s390_register_virtual_type);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, s390_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, s390_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, s390_register_virtual_type);
set_gdbarch_addr_bits_remove (gdbarch, s390_addr_bits_remove);
set_gdbarch_deprecated_register_bytes (gdbarch, S390_REGISTER_BYTES);
break;
case bfd_mach_s390_64:
set_gdbarch_deprecated_register_size (gdbarch, 8);
- set_gdbarch_register_raw_size (gdbarch, s390x_register_raw_size);
- set_gdbarch_register_virtual_size (gdbarch, s390x_register_raw_size);
- set_gdbarch_register_virtual_type (gdbarch,
- s390x_register_virtual_type);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, s390x_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, s390x_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, s390x_register_virtual_type);
set_gdbarch_long_bit (gdbarch, 64);
set_gdbarch_long_long_bit (gdbarch, 64);
@@ -1911,13 +1896,15 @@ s390_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);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
return gdbarch;
}
+extern initialize_file_ftype _initialize_s390_tdep; /* -Wmissing-prototypes */
+
void
_initialize_s390_tdep (void)
{
@@ -1927,5 +1914,3 @@ _initialize_s390_tdep (void)
if (!deprecated_tm_print_insn) /* Someone may have already set it */
deprecated_tm_print_insn = gdb_print_insn_s390;
}
-
-#endif /* GDBSERVER */
diff --git a/gdb/sentinel-frame.c b/gdb/sentinel-frame.c
index dcc583ec98e..94c1ee31311 100644
--- a/gdb/sentinel-frame.c
+++ b/gdb/sentinel-frame.c
@@ -44,7 +44,7 @@ sentinel_frame_cache (struct regcache *regcache)
/* Here the register value is taken direct from the register cache. */
-void
+static void
sentinel_frame_prev_register (struct frame_info *next_frame,
void **this_prologue_cache,
int regnum, int *optimized,
@@ -70,7 +70,7 @@ sentinel_frame_prev_register (struct frame_info *next_frame,
}
}
-void
+static void
sentinel_frame_this_id (struct frame_info *next_frame,
void **this_prologue_cache,
struct frame_id *this_id)
diff --git a/gdb/ser-e7kpc.c b/gdb/ser-e7kpc.c
index 063cca13d63..8496ae411a2 100644
--- a/gdb/ser-e7kpc.c
+++ b/gdb/ser-e7kpc.c
@@ -19,8 +19,8 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#if defined __GO32__ || defined _WIN32
#include "defs.h"
+#if defined __GO32__ || defined _WIN32
#include "serial.h"
#include "gdb_string.h"
@@ -425,6 +425,8 @@ static struct serial_ops e7000pc_ops =
#endif /*_WIN32 or __GO32__*/
+extern initialize_file_ftype _initialize_ser_e7000pc; /* -Wmissing-prototypes */
+
void
_initialize_ser_e7000pc (void)
{
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index cbaaa3689d4..655aaaa0367 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -362,7 +362,7 @@ sh_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
#define MSYMBOL_IS_SPECIAL(msym) \
(((long) MSYMBOL_INFO (msym) & 0x80000000) != 0)
-void
+static void
sh64_elf_make_msymbol_special (asymbol *sym, struct minimal_symbol *msym)
{
if (msym == NULL)
@@ -1239,7 +1239,7 @@ is_media_pseudo (int rn)
&& rn <= tdep->FV_LAST_REGNUM);
}
-int
+static int
sh64_get_gdb_regnum (int gcc_regnum, CORE_ADDR pc)
{
return translate_insn_rn (gcc_regnum, pc_is_isa32 (pc));
@@ -1813,7 +1813,7 @@ sh64_init_extra_frame_info (int fromleaf, struct frame_info *fi)
}
}
-void
+static void
sh64_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
struct frame_info *frame, int regnum,
enum lval_type *lval)
@@ -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
@@ -2297,8 +2297,9 @@ sh64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
if (TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE)
{
memset (valbuf_tmp, 0, sizeof (valbuf_tmp));
- REGISTER_CONVERT_TO_VIRTUAL (regnum,
- type, val, valbuf_tmp);
+ DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum,
+ type, val,
+ valbuf_tmp);
val = valbuf_tmp;
}
#endif
@@ -3035,7 +3036,8 @@ sh64_show_regs (void)
sh64_show_compact_regs ();
}
-void sh_show_regs_command (char *args, int from_tty)
+static void
+sh_show_regs_command (char *args, int from_tty)
{
if (sh_show_regs)
(*sh_show_regs)();
@@ -3409,7 +3411,7 @@ sh_sh4_register_convert_to_virtual (int regnum, struct type *type,
error ("sh_register_convert_to_virtual called with non DR register number");
}
-void
+static void
sh_sh64_register_convert_to_virtual (int regnum, struct type *type,
char *from, char *to)
{
@@ -3451,7 +3453,7 @@ sh_sh4_register_convert_to_raw (struct type *type, int regnum,
error("sh_register_convert_to_raw called with non DR register number");
}
-void
+static void
sh_sh64_register_convert_to_raw (struct type *type, int regnum,
const void *from, void *to)
{
@@ -3476,7 +3478,7 @@ sh_sh64_register_convert_to_raw (struct type *type, int regnum,
error("sh_register_convert_to_raw called with non DR register number");
}
-void
+static void
sh_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
int reg_nr, void *buffer)
{
@@ -3679,7 +3681,7 @@ sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
}
}
-void
+static void
sh_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
int reg_nr, const void *buffer)
{
@@ -3715,7 +3717,7 @@ sh_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
}
}
-void
+static void
sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
int reg_nr, const void *buffer)
{
@@ -4123,7 +4125,7 @@ sh_print_register (int regnum)
do_pseudo_register (regnum);
}
-void
+static void
sh_do_registers_info (int regnum, int fpregs)
{
if (regnum != -1) /* do one specified register */
@@ -4175,7 +4177,7 @@ sh_do_registers_info (int regnum, int fpregs)
}
}
-void
+static void
sh_compact_do_registers_info (int regnum, int fpregs)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
@@ -4201,7 +4203,7 @@ sh_compact_do_registers_info (int regnum, int fpregs)
}
}
-void
+static void
sh64_do_registers_info (int regnum, int fpregs)
{
if (pc_is_isa32 (get_frame_pc (deprecated_selected_frame)))
@@ -4306,7 +4308,7 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
struct gdbarch_tdep *tdep;
gdbarch_register_name_ftype *sh_register_name;
gdbarch_deprecated_store_return_value_ftype *sh_store_return_value;
- gdbarch_register_virtual_type_ftype *sh_register_virtual_type;
+ gdbarch_deprecated_register_virtual_type_ftype *sh_register_virtual_type;
/* If there is already a candidate, use it. */
arches = gdbarch_list_lookup_by_info (arches, &info);
@@ -4393,9 +4395,9 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
sh_store_return_value = sh_default_store_return_value;
sh_register_virtual_type = sh_default_register_virtual_type;
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
- set_gdbarch_register_raw_size (gdbarch, sh_default_register_raw_size);
- set_gdbarch_register_virtual_size (gdbarch, sh_default_register_raw_size);
- set_gdbarch_register_byte (gdbarch, sh_default_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, sh_default_register_byte);
break;
case bfd_mach_sh2:
sh_register_name = sh_sh_register_name;
@@ -4403,9 +4405,9 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
sh_store_return_value = sh_default_store_return_value;
sh_register_virtual_type = sh_default_register_virtual_type;
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
- set_gdbarch_register_raw_size (gdbarch, sh_default_register_raw_size);
- set_gdbarch_register_virtual_size (gdbarch, sh_default_register_raw_size);
- set_gdbarch_register_byte (gdbarch, sh_default_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, sh_default_register_byte);
break;
case bfd_mach_sh2e:
sh_register_name = sh_sh2e_register_name;
@@ -4413,9 +4415,9 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
sh_store_return_value = sh3e_sh4_store_return_value;
sh_register_virtual_type = sh_sh3e_register_virtual_type;
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
- set_gdbarch_register_raw_size (gdbarch, sh_default_register_raw_size);
- set_gdbarch_register_virtual_size (gdbarch, sh_default_register_raw_size);
- set_gdbarch_register_byte (gdbarch, sh_default_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, sh_default_register_byte);
set_gdbarch_fp0_regnum (gdbarch, 25);
tdep->FPUL_REGNUM = 23;
tdep->FPSCR_REGNUM = 24;
@@ -4427,9 +4429,9 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
sh_store_return_value = sh_default_store_return_value;
sh_register_virtual_type = sh_default_register_virtual_type;
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
- set_gdbarch_register_raw_size (gdbarch, sh_default_register_raw_size);
- set_gdbarch_register_virtual_size (gdbarch, sh_default_register_raw_size);
- set_gdbarch_register_byte (gdbarch, sh_default_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, sh_default_register_byte);
set_gdbarch_register_sim_regno (gdbarch, sh_dsp_register_sim_regno);
tdep->DSR_REGNUM = 24;
tdep->A0G_REGNUM = 25;
@@ -4452,9 +4454,9 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
sh_store_return_value = sh_default_store_return_value;
sh_register_virtual_type = sh_default_register_virtual_type;
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
- set_gdbarch_register_raw_size (gdbarch, sh_default_register_raw_size);
- set_gdbarch_register_virtual_size (gdbarch, sh_default_register_raw_size);
- set_gdbarch_register_byte (gdbarch, sh_default_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, sh_default_register_byte);
tdep->SSR_REGNUM = 41;
tdep->SPC_REGNUM = 42;
break;
@@ -4464,9 +4466,9 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
sh_store_return_value = sh3e_sh4_store_return_value;
sh_register_virtual_type = sh_sh3e_register_virtual_type;
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_fp_frame_init_saved_regs);
- set_gdbarch_register_raw_size (gdbarch, sh_default_register_raw_size);
- set_gdbarch_register_virtual_size (gdbarch, sh_default_register_raw_size);
- set_gdbarch_register_byte (gdbarch, sh_default_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, sh_default_register_byte);
set_gdbarch_deprecated_extract_return_value (gdbarch, sh3e_sh4_extract_return_value);
set_gdbarch_fp0_regnum (gdbarch, 25);
tdep->FPUL_REGNUM = 23;
@@ -4481,9 +4483,9 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
sh_store_return_value = sh_default_store_return_value;
sh_register_virtual_type = sh_default_register_virtual_type;
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
- set_gdbarch_register_raw_size (gdbarch, sh_default_register_raw_size);
- set_gdbarch_register_virtual_size (gdbarch, sh_default_register_raw_size);
- set_gdbarch_register_byte (gdbarch, sh_default_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, sh_default_register_byte);
tdep->DSR_REGNUM = 24;
tdep->A0G_REGNUM = 25;
tdep->A0_REGNUM = 26;
@@ -4509,9 +4511,9 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_fp_frame_init_saved_regs);
set_gdbarch_deprecated_extract_return_value (gdbarch, sh3e_sh4_extract_return_value);
set_gdbarch_fp0_regnum (gdbarch, 25);
- set_gdbarch_register_raw_size (gdbarch, sh_sh4_register_raw_size);
- set_gdbarch_register_virtual_size (gdbarch, sh_sh4_register_raw_size);
- set_gdbarch_register_byte (gdbarch, sh_sh4_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, sh_sh4_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, sh_sh4_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, sh_sh4_register_byte);
set_gdbarch_num_pseudo_regs (gdbarch, 12);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, 4 * 4);
set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 4 * 4);
@@ -4597,9 +4599,9 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
sh_store_return_value = sh64_store_return_value;
skip_prologue_hard_way = sh64_skip_prologue_hard_way;
do_pseudo_register = sh64_do_pseudo_register;
- set_gdbarch_register_raw_size (gdbarch, sh_sh64_register_raw_size);
- set_gdbarch_register_virtual_size (gdbarch, sh_sh64_register_raw_size);
- set_gdbarch_register_byte (gdbarch, sh_sh64_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, sh_sh64_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, sh_sh64_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, sh_sh64_register_byte);
/* This seems awfully wrong!*/
/*set_gdbarch_deprecated_max_register_raw_size (gdbarch, 8);*/
/* should include the size of the pseudo regs. */
@@ -4631,19 +4633,17 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
sh_store_return_value = sh_default_store_return_value;
sh_register_virtual_type = sh_default_register_virtual_type;
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
- set_gdbarch_register_raw_size (gdbarch, sh_default_register_raw_size);
- set_gdbarch_register_virtual_size (gdbarch, sh_default_register_raw_size);
- set_gdbarch_register_byte (gdbarch, sh_default_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, sh_default_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, sh_default_register_byte);
break;
}
- set_gdbarch_read_pc (gdbarch, generic_target_read_pc);
set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
- set_gdbarch_read_sp (gdbarch, generic_target_read_sp);
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
set_gdbarch_register_name (gdbarch, sh_register_name);
- set_gdbarch_register_virtual_type (gdbarch, sh_register_virtual_type);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, sh_register_virtual_type);
set_gdbarch_short_bit (gdbarch, 2 * TARGET_CHAR_BIT);
set_gdbarch_int_bit (gdbarch, 4 * TARGET_CHAR_BIT);
@@ -4667,7 +4667,6 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frameless_function_invocation (gdbarch, frameless_look_for_prologue);
set_gdbarch_deprecated_frame_saved_pc (gdbarch, sh_frame_saved_pc);
set_gdbarch_deprecated_saved_pc_after_call (gdbarch, sh_saved_pc_after_call);
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
/* Hook in ABI-specific overrides, if they have been registered. */
@@ -4687,6 +4686,8 @@ sh_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
/* FIXME: dump the rest of gdbarch_tdep. */
}
+extern initialize_file_ftype _initialize_sh_tdep; /* -Wmissing-prototypes */
+
void
_initialize_sh_tdep (void)
{
diff --git a/gdb/sh3-rom.c b/gdb/sh3-rom.c
index 7d07fa53c80..b946e6fd71c 100644
--- a/gdb/sh3-rom.c
+++ b/gdb/sh3-rom.c
@@ -343,6 +343,8 @@ sh3_close (int quitting)
}
}
+extern initialize_file_ftype _initialize_sh3_rom; /* -Wmissing-prototypes */
+
void
_initialize_sh3_rom (void)
{
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/signals/signals.c b/gdb/signals/signals.c
index ca46a9ed1c7..c808d1fdeae 100644
--- a/gdb/signals/signals.c
+++ b/gdb/signals/signals.c
@@ -819,6 +819,8 @@ Use \"info signals\" for a list of symbolic signals.");
}
#ifndef GDBSERVER
+extern initialize_file_ftype _initialize_signals; /* -Wmissing-prototype */
+
void
_initialize_signals (void)
{
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-legacy.c b/gdb/solib-legacy.c
index 2dd9fa5fd02..a87eb21511a 100644
--- a/gdb/solib-legacy.c
+++ b/gdb/solib-legacy.c
@@ -142,6 +142,8 @@ legacy_svr4_fetch_link_map_offsets (void)
#endif /* HAVE_LINK_H */
+extern initialize_file_ftype _initialize_svr4_lm; /* -Wmissing-prototypes */
+
void
_initialize_svr4_lm (void)
{
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..d4335349790 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -81,6 +81,17 @@ static char *solib_break_names[] =
"_dl_debug_state",
"rtld_db_dlactivity",
"_rtld_debug_state",
+
+ /* On the 64-bit PowerPC, the linker symbol with the same name as
+ the C function points to a function descriptor, not to the entry
+ point. The linker symbol whose name is the C function name
+ prefixed with a '.' points to the function's entry point. So
+ when we look through this table, we ignore symbols that point
+ into the data section (thus skipping the descriptor's symbol),
+ and eventually try this one, giving us the real entry point
+ address. */
+ "._dl_debug_state",
+
NULL
};
@@ -105,14 +116,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 +145,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 +155,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 +165,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 +605,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 +664,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 +840,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 +863,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;
@@ -1445,6 +1466,8 @@ init_fetch_link_map_offsets (struct gdbarch *gdbarch)
static struct target_so_ops svr4_so_ops;
+extern initialize_file_ftype _initialize_svr4_solib; /* -Wmissing-prototypes */
+
void
_initialize_svr4_solib (void)
{
diff --git a/gdb/solib.c b/gdb/solib.c
index 289b84f34bf..82df65a6d0b 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -87,12 +87,19 @@ static char *solib_search_path = NULL;
(or set of directories, as in LD_LIBRARY_PATH) to search for all
shared libraries if not found in SOLIB_ABSOLUTE_PREFIX.
- Search order:
- * If path is absolute, look in SOLIB_ABSOLUTE_PREFIX.
- * If path is absolute or relative, look for it literally (unmodified).
+ Search algorithm:
+ * If there is a solib_absolute_prefix and path is absolute:
+ * Search for solib_absolute_prefix/path.
+ * else
+ * Look for it literally (unmodified).
* Look in SOLIB_SEARCH_PATH.
- * Look in inferior's $PATH.
- * Look in inferior's $LD_LIBRARY_PATH.
+ * If available, use target defined search function.
+ * If solib_absolute_prefix is NOT set, perform the following two searches:
+ * Look in inferior's $PATH.
+ * Look in inferior's $LD_LIBRARY_PATH.
+ *
+ * The last check avoids doing this search when targetting remote
+ * machines since solib_absolute_prefix will almost always be set.
RETURNS
@@ -147,7 +154,7 @@ solib_open (char *in_pathname, char **found_pathname)
in_pathname++;
}
- /* If not found, next search the solib_search_path (if any). */
+ /* If not found, search the solib_search_path (if any). */
if (found_file < 0 && solib_search_path != NULL)
found_file = openp (solib_search_path,
1, in_pathname, O_RDONLY, 0, &temp_pathname);
@@ -166,13 +173,13 @@ solib_open (char *in_pathname, char **found_pathname)
(in_pathname, O_RDONLY, &temp_pathname);
/* If not found, next search the inferior's $PATH environment variable. */
- if (found_file < 0 && solib_search_path != NULL)
+ if (found_file < 0 && solib_absolute_prefix == NULL)
found_file = openp (get_in_environ (inferior_environ, "PATH"),
1, in_pathname, O_RDONLY, 0, &temp_pathname);
/* If not found, next search the inferior's $LD_LIBRARY_PATH
environment variable. */
- if (found_file < 0 && solib_search_path != NULL)
+ if (found_file < 0 && solib_absolute_prefix == NULL)
found_file = openp (get_in_environ (inferior_environ, "LD_LIBRARY_PATH"),
1, in_pathname, O_RDONLY, 0, &temp_pathname);
@@ -381,7 +388,7 @@ symbol_add_stub (void *arg)
the section table. But we only use this for core files and
processes we've just attached to, so that's okay. */
-void
+static void
update_solib_list (int from_tty, struct target_ops *target)
{
struct so_list *inferior = TARGET_SO_CURRENT_SOS ();
@@ -856,6 +863,8 @@ reload_shared_libraries (char *ignored, int from_tty)
solib_add (NULL, from_tty, NULL, auto_solib_add);
}
+extern initialize_file_ftype _initialize_solib; /* -Wmissing-prototypes */
+
void
_initialize_solib (void)
{
diff --git a/gdb/somread.c b/gdb/somread.c
index 654ae067f75..cb7b048eafd 100644
--- a/gdb/somread.c
+++ b/gdb/somread.c
@@ -430,9 +430,10 @@ som_symfile_offsets (struct objfile *objfile, struct section_addr_info *addrs)
int i;
CORE_ADDR text_addr;
- objfile->num_sections = SECT_OFF_MAX;
+ objfile->num_sections = bfd_count_sections (objfile->obfd);
objfile->section_offsets = (struct section_offsets *)
- obstack_alloc (&objfile->psymbol_obstack, SIZEOF_SECTION_OFFSETS);
+ obstack_alloc (&objfile->psymbol_obstack,
+ SIZEOF_N_SECTION_OFFSETS (objfile->num_sections));
/* FIXME: ezannoni 2000-04-20 The section names in SOM are not
.text, .data, etc, but $TEXT$, $DATA$,... We should initialize
@@ -457,7 +458,7 @@ som_symfile_offsets (struct objfile *objfile, struct section_addr_info *addrs)
break;
text_addr = addrs->other[i].addr;
- for (i = 0; i < SECT_OFF_MAX; i++)
+ for (i = 0; i < objfile->num_sections; i++)
(objfile->section_offsets)->offsets[i] = text_addr;
}
}
diff --git a/gdb/sparc-nat.c b/gdb/sparc-nat.c
index b634f6c87dd..33145e0150e 100644
--- a/gdb/sparc-nat.c
+++ b/gdb/sparc-nat.c
@@ -108,7 +108,7 @@ fetch_inferior_registers (int regno)
= inferior_registers.r_pc;
*(int *) &deprecated_registers[REGISTER_BYTE (NPC_REGNUM)]
= inferior_registers.r_npc;
- *(int *) &registers[REGISTER_BYTE (Y_REGNUM)] = inferior_registers.r_y;
+ *(int *) &deprecated_registers[REGISTER_BYTE (Y_REGNUM)] = inferior_registers.r_y;
for (i = G0_REGNUM; i <= O7_REGNUM; i++)
deprecated_register_valid[i] = 1;
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index 6735b0814ee..31718139b29 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -466,13 +466,6 @@ sparc_frame_chain (struct frame_info *frame)
return ~ (CORE_ADDR) 0;
}
-CORE_ADDR
-sparc_extract_struct_value_address (char *regbuf)
-{
- return extract_address (regbuf + REGISTER_BYTE (O0_REGNUM),
- REGISTER_RAW_SIZE (O0_REGNUM));
-}
-
/* Find the pc saved in frame FRAME. */
CORE_ADDR
@@ -515,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 &&
@@ -541,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
@@ -1803,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;
}
@@ -2111,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. */
@@ -2206,7 +2186,7 @@ sparc_do_registers_info (int regnum, int all)
#endif
-int
+static int
gdb_print_insn_sparc (bfd_vma memaddr, disassemble_info *info)
{
/* It's necessary to override mach again because print_insn messes it up. */
@@ -2214,103 +2194,261 @@ gdb_print_insn_sparc (bfd_vma memaddr, disassemble_info *info)
return print_insn_sparc (memaddr, info);
}
-/* The SPARC passes the arguments on the stack; arguments smaller
- than an int are promoted to an int. The first 6 words worth of
- args are also passed in registers o0 - o5. */
-CORE_ADDR
-sparc32_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
- int struct_return, CORE_ADDR struct_addr)
+#define SPARC_F0_REGNUM FP0_REGNUM /* %f0 */
+#define SPARC_F1_REGNUM (FP0_REGNUM + 1)/* %f1 */
+#define SPARC_O0_REGNUM O0_REGNUM /* %o0 */
+#define SPARC_O1_REGNUM O1_REGNUM /* %o1 */
+
+/* Push the arguments onto the stack and into the appropriate registers. */
+
+static CORE_ADDR
+sparc32_do_push_arguments (struct regcache *regcache, int nargs,
+ struct value **args, CORE_ADDR sp)
{
- int i, j, oregnum;
- int accumulate_size = 0;
- struct sparc_arg
+ CORE_ADDR *addr;
+ int size = 0;
+ int i;
+
+ /* Structure, union and quad-precision arguments are passed by
+ reference. We allocate space for these arguments on the stack
+ and record their addresses in an array. Array elements for
+ arguments that are passed by value will be set to zero.*/
+ addr = alloca (nargs * sizeof (CORE_ADDR));
+
+ for (i = nargs - 1; i >= 0; i--)
{
- char *contents;
+ struct type *type = VALUE_ENCLOSING_TYPE (args[i]);
+ enum type_code code = TYPE_CODE (type);
+ int len = TYPE_LENGTH (type);
+
+ /* Push the contents of structure, union and quad-precision
+ arguments on the stack. */
+ if (code == TYPE_CODE_STRUCT || code == TYPE_CODE_UNION || len > 8)
+ {
+ /* Keep the stack doubleword aligned. */
+ sp -= (len + 7) & ~7;
+ write_memory (sp, VALUE_CONTENTS_ALL (args[i]), len);
+ addr[i] = sp;
+ size += 4;
+ }
+ else
+ {
+ addr[i] = 0;
+ size += (len > 4) ? 8 : 4;
+ }
+ }
+
+ /* The needed space for outgoing arguments should be a multiple of 4. */
+ gdb_assert (size % 4 == 0);
+
+ /* Make sure we reserve space for the first six words of arguments
+ in the stack frame, even if we don't need them. */
+ if (size < 24)
+ sp -= (24 - size);
+
+ /* Make sure we end up with a doubleword aligned stack in the end.
+ Reserve an extra word if necessary in order to accomplish this. */
+ if ((sp - size) % 8 == 0)
+ sp -= 4;
+
+ /* Now push the arguments onto the stack. */
+ for (i = nargs - 1; i >=0; i--)
+ {
+ char buf[8];
int len;
- int offset;
- };
- struct sparc_arg *sparc_args =
- (struct sparc_arg *) alloca (nargs * sizeof (struct sparc_arg));
- struct sparc_arg *m_arg;
-
- /* Promote arguments if necessary, and calculate their stack offsets
- and sizes. */
- for (i = 0, m_arg = sparc_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))
+
+ if (addr[i])
{
- case TYPE_CODE_INT:
- case TYPE_CODE_BOOL:
- case TYPE_CODE_CHAR:
- case TYPE_CODE_RANGE:
- case TYPE_CODE_ENUM:
- if (TYPE_LENGTH (arg_type) < TYPE_LENGTH (builtin_type_long))
+ store_unsigned_integer (buf, 4, addr[i]);
+ len = 4;
+ }
+ else
+ {
+ struct value *arg = args[i];
+
+ len = TYPE_LENGTH (VALUE_ENCLOSING_TYPE (arg));
+
+ /* Expand signed and unsigned bytes and halfwords as needed. */
+ if (len < 4)
{
- arg_type = builtin_type_long;
- arg = value_cast (arg_type, arg);
+ arg = value_cast (builtin_type_long, arg);
+ len = 4;
}
- break;
- default:
- break;
+ else if (len > 4 && len < 8)
+ {
+ arg = value_cast (builtin_type_long_long, arg);
+ len = 4;
+ }
+
+ gdb_assert (len == 4 || len == 8);
+ memcpy (buf, VALUE_CONTENTS_ALL (arg), len);
+ }
+
+ /* We always write the argument word on the stack. */
+ sp -= len;
+ write_memory (sp, buf, len);
+
+ /* If this argument occupies one of the first 6 words, write it
+ into the appropriate register too. */
+ size -= len;
+ if (size < 24)
+ {
+ int regnum = SPARC_O0_REGNUM + (size / 4);
+
+ regcache_cooked_write (regcache, regnum, buf);
+ if (len == 8 && size < 20)
+ regcache_cooked_write (regcache, regnum + 1, buf + 4);
}
- m_arg->len = TYPE_LENGTH (arg_type);
- m_arg->offset = accumulate_size;
- accumulate_size = (accumulate_size + m_arg->len + 3) & ~3;
- m_arg->contents = VALUE_CONTENTS (arg);
}
- /* Make room for the arguments on the stack. */
- accumulate_size += DEPRECATED_CALL_DUMMY_STACK_ADJUST;
- sp = ((sp - accumulate_size) & ~7) + DEPRECATED_CALL_DUMMY_STACK_ADJUST;
+ /* Reserve space for the struct/union return value pointer. */
+ sp -= 4;
+
+ /* Stack should be doubleword aligned at this point. */
+ gdb_assert (sp % 8 == 0);
+
+ /* Return the adjusted stack pointer. */
+ return sp;
+}
+
+/* The SPARC passes the arguments on the stack; arguments smaller
+ than an int are promoted to an int. The first 6 words worth of
+ args are also passed in registers o0 - o5. */
+
+CORE_ADDR
+sparc32_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
+ int struct_return, CORE_ADDR struct_addr)
+{
+ sp = sparc32_do_push_arguments (current_regcache, nargs, args, sp);
- /* `Push' arguments on the stack. */
- for (i = 0, oregnum = 0, m_arg = sparc_args;
- i < nargs;
- i++, m_arg++)
+ /* FIXME: kettenis/20030525: We don't let this function set the
+ struct/union return pointer just yet. */
+#if 0
+ if (struct_return)
{
- write_memory (sp + m_arg->offset, m_arg->contents, m_arg->len);
- for (j = 0;
- j < m_arg->len && oregnum < 6;
- j += SPARC_INTREG_SIZE, oregnum++)
- deprecated_write_register_gen (O0_REGNUM + oregnum, m_arg->contents + j);
+ char buf[4];
+
+ /* The space for the struct/union return value pointer has
+ already been reserved. */
+ store_unsigned_integer (buf, 4, struct_addr);
+ write (sp, buf, 4);
}
return sp;
+#else
+ return sp + 4;
+#endif
}
+/* Extract from REGCACHE a function return value of type TYPE and copy
+ that into VALBUF.
-/* Extract from an array REGBUF containing the (raw) register state
- a function return value of type TYPE, and copy that, in virtual format,
- into VALBUF. */
+ Note that REGCACHE specifies the register values for the frame of
+ the calling function. This means that we need to fetch the value
+ form %o0 and %o1, which correspond to %i0 and %i1 in the frame of
+ the called function. */
void
-sparc32_extract_return_value (struct type *type, char *regbuf, char *valbuf)
+sparc32_extract_return_value (struct type *type, struct regcache *regcache,
+ void *valbuf)
{
- int typelen = TYPE_LENGTH (type);
- int regsize = REGISTER_RAW_SIZE (O0_REGNUM);
+ int len = TYPE_LENGTH (type);
+ char buf[8];
+
+ if (TYPE_CODE (type) == TYPE_CODE_FLT && SPARC_HAS_FPU)
+ {
+ if (len == 4 || len == 8)
+ {
+ regcache_cooked_read (regcache, SPARC_F0_REGNUM, buf);
+ regcache_cooked_read (regcache, SPARC_F1_REGNUM, buf + 4);
+ memcpy (valbuf, buf, len);
+ return;
+ }
+ else
+ internal_error (__FILE__, __LINE__, "\
+Cannot extract floating-point return value of %d bytes long.", len);
+ }
+
+ if (len <= 4)
+ {
+ regcache_cooked_read (regcache, SPARC_O0_REGNUM, buf);
+ memcpy (valbuf, buf + 4 - len, len);
+ }
+ else if (len <= 8)
+ {
+ regcache_cooked_read (regcache, SPARC_O0_REGNUM, buf);
+ regcache_cooked_read (regcache, SPARC_O1_REGNUM, buf + 4);
+ memcpy (valbuf, buf + 8 - len, len);
+ }
+ else
+ internal_error (__FILE__, __LINE__,
+ "Cannot extract return value of %d bytes long.", len);
+}
+
+/* Write into REGBUF a function return value VALBUF of type TYPE. */
+
+void
+sparc32_store_return_value (struct type *type, struct regcache *regcache,
+ const void *valbuf)
+{
+ int len = TYPE_LENGTH (type);
+ char buf[8];
if (TYPE_CODE (type) == TYPE_CODE_FLT && SPARC_HAS_FPU)
- memcpy (valbuf, &regbuf[REGISTER_BYTE (FP0_REGNUM)], typelen);
+ {
+ const char *buf = valbuf;
+
+ if (len == 4)
+ {
+ regcache_cooked_write (regcache, SPARC_F0_REGNUM, buf);
+ return;
+ }
+ else if (len == 8)
+ {
+ regcache_cooked_write (regcache, SPARC_F0_REGNUM, buf);
+ regcache_cooked_write (regcache, SPARC_F1_REGNUM, buf + 4);
+ return;
+ }
+ else
+ internal_error (__FILE__, __LINE__, "\
+Cannot extract floating-point return value of %d bytes long.", len);
+ }
+
+ /* Add leading zeros to the value. */
+ memset (buf, 0, sizeof buf);
+
+ if (len <= 4)
+ {
+ memcpy (buf + 4 - len, valbuf, len);
+ regcache_cooked_write (regcache, SPARC_O0_REGNUM, buf);
+ }
+ else if (len <= 8)
+ {
+ memcpy (buf + 8 - len, valbuf, len);
+ regcache_cooked_write (regcache, SPARC_O0_REGNUM, buf);
+ regcache_cooked_write (regcache, SPARC_O1_REGNUM, buf);
+ }
else
- memcpy (valbuf,
- &regbuf[O0_REGNUM * regsize +
- (typelen >= regsize
- || TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE ? 0
- : regsize - typelen)],
- typelen);
+ internal_error (__FILE__, __LINE__,
+ "Cannot extract return value of %d bytes long.", len);
}
+/* Extract from REGCACHE the address in which a function should return
+ its structure value. */
-/* Write into appropriate registers a function return value
- of type TYPE, given in virtual format. On SPARCs with FPUs,
- float values are returned in %f0 (and %f1). In all other cases,
- values are returned in register %o0. */
+CORE_ADDR
+sparc_extract_struct_value_address (struct regcache *regcache)
+{
+ ULONGEST addr;
-void
+ regcache_cooked_read_unsigned (regcache, SPARC_O0_REGNUM, &addr);
+ return addr;
+}
+
+/* FIXME: kettenis/2003/05/24: Still used for sparc64. */
+
+static void
sparc_store_return_value (struct type *type, char *valbuf)
{
int regno;
@@ -2459,6 +2597,8 @@ static struct gdbarch * sparc_gdbarch_init (struct gdbarch_info info,
struct gdbarch_list *arches);
static void sparc_dump_tdep (struct gdbarch *, struct ui_file *);
+extern initialize_file_ftype _initialize_sparc_tdep; /* -Wmissing-prototypes */
+
void
_initialize_sparc_tdep (void)
{
@@ -2473,7 +2613,7 @@ _initialize_sparc_tdep (void)
/* Compensate for stack bias. Note that we currently don't handle
mixed 32/64 bit code. */
-CORE_ADDR
+static CORE_ADDR
sparc64_read_sp (void)
{
CORE_ADDR sp = read_register (SP_REGNUM);
@@ -2483,7 +2623,7 @@ sparc64_read_sp (void)
return sp;
}
-CORE_ADDR
+static CORE_ADDR
sparc64_read_fp (void)
{
CORE_ADDR fp = read_register (DEPRECATED_FP_REGNUM);
@@ -2493,7 +2633,7 @@ sparc64_read_fp (void)
return fp;
}
-void
+static void
sparc64_write_sp (CORE_ADDR val)
{
CORE_ADDR oldsp = read_register (SP_REGNUM);
@@ -2517,7 +2657,7 @@ sparc64_write_sp (CORE_ADDR val)
for both; this means that if the arguments alternate between
int and float, we will waste every other register of both types. */
-CORE_ADDR
+static CORE_ADDR
sparc64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_retaddr)
{
@@ -2634,7 +2774,7 @@ sparc64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
/* Values <= 32 bytes are returned in o0-o3 (floating-point values are
returned in f0-f3). */
-void
+static void
sp64_extract_return_value (struct type *type, char *regbuf, char *valbuf,
int bitoffset)
{
@@ -2691,7 +2831,7 @@ sp64_extract_return_value (struct type *type, char *regbuf, char *valbuf,
}
}
-extern void
+static void
sparc64_extract_return_value (struct type *type, char *regbuf, char *valbuf)
{
sp64_extract_return_value (type, regbuf, valbuf, 0);
@@ -2717,7 +2857,7 @@ sparc32_stack_align (CORE_ADDR addr)
return ((addr + 7) & -8);
}
-extern CORE_ADDR
+static CORE_ADDR
sparc64_stack_align (CORE_ADDR addr)
{
return ((addr + 15) & -16);
@@ -2855,7 +2995,7 @@ sparc64_register_name (int regno)
// OBSOLETE }
#endif
-CORE_ADDR
+static CORE_ADDR
sparc_push_return_address (CORE_ADDR pc_unused, CORE_ADDR sp)
{
if (CALL_DUMMY_LOCATION == AT_ENTRY_POINT)
@@ -3014,19 +3154,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
@@ -3061,7 +3188,7 @@ sparc_call_dummy_address (void)
/* Supply the Y register number to those that need it. */
-int
+static int
sparc_y_regnum (void)
{
return gdbarch_tdep (current_gdbarch)->y_regnum;
@@ -3076,7 +3203,7 @@ sparc_reg_struct_has_addr (int gcc_p, struct type *type)
return (gcc_p != 1);
}
-int
+static int
sparc_intreg_size (void)
{
return SPARC_INTREG_SIZE;
@@ -3092,6 +3219,16 @@ sparc_return_value_on_stack (struct type *type)
return 0;
}
+/* Get the ith function argument for the current function. */
+static 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.
*/
@@ -3164,14 +3301,14 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_breakpoint_from_pc (gdbarch, sparc_breakpoint_from_pc);
set_gdbarch_decr_pc_after_break (gdbarch, 0);
set_gdbarch_double_bit (gdbarch, 8 * TARGET_CHAR_BIT);
- set_gdbarch_deprecated_extract_struct_value_address (gdbarch, sparc_extract_struct_value_address);
+ set_gdbarch_extract_struct_value_address (gdbarch,
+ sparc_extract_struct_value_address);
set_gdbarch_deprecated_fix_call_dummy (gdbarch, sparc_gdbarch_fix_call_dummy);
set_gdbarch_float_bit (gdbarch, 4 * TARGET_CHAR_BIT);
set_gdbarch_deprecated_fp_regnum (gdbarch, SPARC_FP_REGNUM);
set_gdbarch_fp0_regnum (gdbarch, SPARC_FP0_REGNUM);
set_gdbarch_deprecated_frame_chain (gdbarch, sparc_frame_chain);
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sparc_frame_init_saved_regs);
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
set_gdbarch_deprecated_frame_saved_pc (gdbarch, sparc_frame_saved_pc);
set_gdbarch_frameless_function_invocation (gdbarch,
frameless_look_for_prologue);
@@ -3186,12 +3323,6 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_pop_frame (gdbarch, sparc_pop_frame);
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);
@@ -3202,6 +3333,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
*/
@@ -3291,14 +3425,12 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_pc_regnum (gdbarch, SPARC32_PC_REGNUM);
set_gdbarch_ptr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
set_gdbarch_deprecated_push_arguments (gdbarch, sparc32_push_arguments);
- set_gdbarch_read_sp (gdbarch, generic_target_read_sp);
- set_gdbarch_register_byte (gdbarch, sparc32_register_byte);
- set_gdbarch_register_raw_size (gdbarch, sparc32_register_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, sparc32_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, sparc32_register_size);
set_gdbarch_deprecated_register_size (gdbarch, 4);
- set_gdbarch_register_virtual_size (gdbarch, sparc32_register_size);
- set_gdbarch_register_virtual_type (gdbarch,
- sparc32_register_virtual_type);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, sparc32_register_size);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, sparc32_register_virtual_type);
#ifdef SPARC32_CALL_DUMMY_ON_STACK
set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (call_dummy_32));
#else
@@ -3309,7 +3441,7 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_store_struct_return (gdbarch, sparc32_store_struct_return);
set_gdbarch_use_struct_convention (gdbarch,
generic_use_struct_convention);
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
tdep->y_regnum = SPARC32_Y_REGNUM;
tdep->fp_max_regnum = SPARC_FP0_REGNUM + 32;
tdep->intreg_size = 4;
@@ -3347,12 +3479,11 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_read_sp (gdbarch, sparc64_read_sp);
/* Some of the registers aren't 64 bits, but it's a lot simpler just
to assume they all are (since most of them are). */
- set_gdbarch_register_byte (gdbarch, sparc64_register_byte);
- set_gdbarch_register_raw_size (gdbarch, sparc64_register_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, sparc64_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, sparc64_register_size);
set_gdbarch_deprecated_register_size (gdbarch, 8);
- set_gdbarch_register_virtual_size (gdbarch, sparc64_register_size);
- set_gdbarch_register_virtual_type (gdbarch,
- sparc64_register_virtual_type);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, sparc64_register_size);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, sparc64_register_virtual_type);
#ifdef SPARC64_CALL_DUMMY_ON_STACK
set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (call_dummy_64));
#else
@@ -3379,11 +3510,11 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
switch (info.bfd_arch_info->mach)
{
case bfd_mach_sparc:
- set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
+ set_gdbarch_extract_return_value (gdbarch, sparc32_extract_return_value);
+ set_gdbarch_store_return_value (gdbarch, sparc32_store_return_value);
set_gdbarch_num_regs (gdbarch, 72);
set_gdbarch_deprecated_register_bytes (gdbarch, 32*4 + 32*4 + 8*4);
set_gdbarch_register_name (gdbarch, sparc32_register_name);
- set_gdbarch_deprecated_store_return_value (gdbarch, sparc_store_return_value);
#if 0
// OBSOLETE tdep->has_fpu = 1; /* (all but sparclet and sparclite) */
#endif
@@ -3415,11 +3546,11 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
// OBSOLETE break;
#endif
case bfd_mach_sparc_v8plus:
- set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
+ set_gdbarch_extract_return_value (gdbarch, sparc32_extract_return_value);
+ set_gdbarch_store_return_value (gdbarch, sparc32_store_return_value);
set_gdbarch_num_regs (gdbarch, 72);
set_gdbarch_deprecated_register_bytes (gdbarch, 32*4 + 32*4 + 8*4);
set_gdbarch_register_name (gdbarch, sparc32_register_name);
- set_gdbarch_deprecated_store_return_value (gdbarch, sparc_store_return_value);
tdep->print_insn_mach = bfd_mach_sparc;
tdep->fp_register_bytes = 32 * 4;
#if 0
@@ -3427,11 +3558,11 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
#endif
break;
case bfd_mach_sparc_v8plusa:
- set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
+ set_gdbarch_extract_return_value (gdbarch, sparc32_extract_return_value);
+ set_gdbarch_store_return_value (gdbarch, sparc32_store_return_value);
set_gdbarch_num_regs (gdbarch, 72);
set_gdbarch_deprecated_register_bytes (gdbarch, 32*4 + 32*4 + 8*4);
set_gdbarch_register_name (gdbarch, sparc32_register_name);
- set_gdbarch_deprecated_store_return_value (gdbarch, sparc_store_return_value);
#if 0
// OBSOLETE tdep->has_fpu = 1; /* (all but sparclet and sparclite) */
#endif
diff --git a/gdb/sparcnbsd-tdep.c b/gdb/sparcnbsd-tdep.c
index ab984ff88ad..4fe05aa9ce0 100644
--- a/gdb/sparcnbsd-tdep.c
+++ b/gdb/sparcnbsd-tdep.c
@@ -1,5 +1,5 @@
/* Target-dependent code for SPARC 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.
@@ -26,6 +26,8 @@
#include "value.h"
#include "osabi.h"
+#include "gdb_string.h"
+
#include "sparcnbsd-tdep.h"
#include "nbsd-tdep.h"
@@ -445,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;
}
@@ -461,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/stabsread.c b/gdb/stabsread.c
index 4e3c8ec5a90..d99a2caccce 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -105,6 +105,8 @@ static void fix_common_block (struct symbol *, int);
static int read_type_number (char **, int *);
+static struct type *read_type (char **, struct objfile *);
+
static struct type *read_range_type (char **, int[2], struct objfile *);
static struct type *read_sun_builtin_type (char **, int[2], struct objfile *);
@@ -146,6 +148,8 @@ static struct type *read_array_type (char **, struct type *,
static struct field *read_args (char **, int, struct objfile *, int *, int *);
+static void add_undefined_type (struct type *);
+
static int
read_cpp_abbrev (struct field_info *, char **, struct type *,
struct objfile *);
@@ -248,7 +252,7 @@ static struct symbol *current_symbol = NULL;
This can be used for finding the type associated with that pair
or for associating a new type with the pair. */
-struct type **
+static struct type **
dbx_lookup_type (int typenums[2])
{
register int filenum = typenums[0];
@@ -2259,7 +2263,7 @@ error_type (char **pp, struct objfile *objfile)
assume that type information starts with a digit, '-', or '(' in
deciding whether to call read_type. */
-struct type *
+static struct type *
read_type (register char **pp, struct objfile *objfile)
{
register struct type *type = 0;
@@ -5128,7 +5132,7 @@ fix_common_block (struct symbol *sym, int valu)
/* Add a type to the list of undefined types to be checked through
once this file has been read in. */
-void
+static void
add_undefined_type (struct type *type)
{
if (undef_types_length == undef_types_allocated)
diff --git a/gdb/stabsread.h b/gdb/stabsread.h
index b70f16242ee..91db978153c 100644
--- a/gdb/stabsread.h
+++ b/gdb/stabsread.h
@@ -130,16 +130,10 @@ EXTERN int n_this_object_header_files;
EXTERN int n_allocated_this_object_header_files;
-extern struct type *read_type (char **, struct objfile *);
-
extern void cleanup_undefined_types (void);
-extern struct type **dbx_lookup_type (int[2]);
-
extern long read_number (char **, int);
-extern void add_undefined_type (struct type *);
-
extern struct symbol *define_symbol (CORE_ADDR, char *, int, int,
struct objfile *);
diff --git a/gdb/stack.c b/gdb/stack.c
index f99d88c5204..988e3c9bc50 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -40,6 +40,8 @@
#include "annotate.h"
#include "ui-out.h"
#include "block.h"
+#include "stack.h"
+#include "gdb_assert.h"
#include "dictionary.h"
/* Prototypes for exported functions. */
@@ -72,8 +74,6 @@ void frame_command (char *, int);
static void current_frame_command (char *, int);
-static void select_frame_command (char *, int);
-
static void print_frame_arg_vars (struct frame_info *, struct ui_file *);
static void catch_info (char *, int);
@@ -169,6 +169,225 @@ struct print_args_args
static int print_args_stub (void *);
+/* Print nameless args on STREAM.
+ FI is the frameinfo for this frame, START is the offset
+ of the first nameless arg, and NUM is the number of nameless args to
+ print. FIRST is nonzero if this is the first argument (not just
+ the first nameless arg). */
+
+static void
+print_frame_nameless_args (struct frame_info *fi, long start, int num,
+ int first, struct ui_file *stream)
+{
+ int i;
+ CORE_ADDR argsaddr;
+ long arg_value;
+
+ for (i = 0; i < num; i++)
+ {
+ QUIT;
+ argsaddr = get_frame_args_address (fi);
+ if (!argsaddr)
+ return;
+ arg_value = read_memory_integer (argsaddr + start, sizeof (int));
+ if (!first)
+ fprintf_filtered (stream, ", ");
+ fprintf_filtered (stream, "%ld", arg_value);
+ first = 0;
+ start += sizeof (int);
+ }
+}
+
+/* Print the arguments of a stack frame, given the function FUNC
+ running in that frame (as a symbol), the info on the frame,
+ and the number of args according to the stack frame (or -1 if unknown). */
+
+/* References here and elsewhere to "number of args according to the
+ stack frame" appear in all cases to refer to "number of ints of args
+ according to the stack frame". At least for VAX, i386, isi. */
+
+static void
+print_frame_args (struct symbol *func, struct frame_info *fi, int num,
+ struct ui_file *stream)
+{
+ struct block *b = NULL;
+ int first = 1;
+ struct dict_iterator iter;
+ register struct symbol *sym;
+ struct value *val;
+ /* Offset of next stack argument beyond the one we have seen that is
+ at the highest offset.
+ -1 if we haven't come to a stack argument yet. */
+ long highest_offset = -1;
+ int arg_size;
+ /* Number of ints of arguments that we have printed so far. */
+ int args_printed = 0;
+ struct cleanup *old_chain, *list_chain;
+ struct ui_stream *stb;
+
+ stb = ui_out_stream_new (uiout);
+ old_chain = make_cleanup_ui_out_stream_delete (stb);
+
+ if (func)
+ {
+ b = SYMBOL_BLOCK_VALUE (func);
+
+ ALL_BLOCK_SYMBOLS (b, iter, sym)
+ {
+ QUIT;
+
+ /* Keep track of the highest stack argument offset seen, and
+ skip over any kinds of symbols we don't care about. */
+
+ switch (SYMBOL_CLASS (sym))
+ {
+ case LOC_ARG:
+ case LOC_REF_ARG:
+ {
+ long current_offset = SYMBOL_VALUE (sym);
+ arg_size = TYPE_LENGTH (SYMBOL_TYPE (sym));
+
+ /* Compute address of next argument by adding the size of
+ this argument and rounding to an int boundary. */
+ current_offset =
+ ((current_offset + arg_size + sizeof (int) - 1)
+ & ~(sizeof (int) - 1));
+
+ /* If this is the highest offset seen yet, set highest_offset. */
+ if (highest_offset == -1
+ || (current_offset > highest_offset))
+ highest_offset = current_offset;
+
+ /* Add the number of ints we're about to print to args_printed. */
+ args_printed += (arg_size + sizeof (int) - 1) / sizeof (int);
+ }
+
+ /* We care about types of symbols, but don't need to keep track of
+ stack offsets in them. */
+ case LOC_REGPARM:
+ case LOC_REGPARM_ADDR:
+ case LOC_LOCAL_ARG:
+ case LOC_BASEREG_ARG:
+ case LOC_COMPUTED_ARG:
+ break;
+
+ /* Other types of symbols we just skip over. */
+ default:
+ continue;
+ }
+
+ /* We have to look up the symbol because arguments can have
+ two entries (one a parameter, one a local) and the one we
+ want is the local, which lookup_symbol will find for us.
+ This includes gcc1 (not gcc2) on the sparc when passing a
+ small structure and gcc2 when the argument type is float
+ and it is passed as a double and converted to float by
+ the prologue (in the latter case the type of the LOC_ARG
+ symbol is double and the type of the LOC_LOCAL symbol is
+ float). */
+ /* But if the parameter name is null, don't try it.
+ Null parameter names occur on the RS/6000, for traceback tables.
+ FIXME, should we even print them? */
+
+ if (*DEPRECATED_SYMBOL_NAME (sym))
+ {
+ struct symbol *nsym;
+ nsym = lookup_symbol
+ (DEPRECATED_SYMBOL_NAME (sym),
+ b, VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL);
+ if (SYMBOL_CLASS (nsym) == LOC_REGISTER)
+ {
+ /* There is a LOC_ARG/LOC_REGISTER pair. This means that
+ it was passed on the stack and loaded into a register,
+ or passed in a register and stored in a stack slot.
+ GDB 3.x used the LOC_ARG; GDB 4.0-4.11 used the LOC_REGISTER.
+
+ Reasons for using the LOC_ARG:
+ (1) because find_saved_registers may be slow for remote
+ debugging,
+ (2) because registers are often re-used and stack slots
+ rarely (never?) are. Therefore using the stack slot is
+ much less likely to print garbage.
+
+ Reasons why we might want to use the LOC_REGISTER:
+ (1) So that the backtrace prints the same value as
+ "print foo". I see no compelling reason why this needs
+ to be the case; having the backtrace print the value which
+ was passed in, and "print foo" print the value as modified
+ within the called function, makes perfect sense to me.
+
+ Additional note: It might be nice if "info args" displayed
+ both values.
+ One more note: There is a case with sparc structure passing
+ where we need to use the LOC_REGISTER, but this is dealt with
+ by creating a single LOC_REGPARM in symbol reading. */
+
+ /* Leave sym (the LOC_ARG) alone. */
+ ;
+ }
+ else
+ sym = nsym;
+ }
+
+ /* Print the current arg. */
+ if (!first)
+ ui_out_text (uiout, ", ");
+ ui_out_wrap_hint (uiout, " ");
+
+ annotate_arg_begin ();
+
+ list_chain = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
+ fprintf_symbol_filtered (stb->stream, SYMBOL_PRINT_NAME (sym),
+ SYMBOL_LANGUAGE (sym), DMGL_PARAMS | DMGL_ANSI);
+ ui_out_field_stream (uiout, "name", stb);
+ annotate_arg_name_end ();
+ ui_out_text (uiout, "=");
+
+ /* Avoid value_print because it will deref ref parameters. We just
+ want to print their addresses. Print ??? for args whose address
+ we do not know. We pass 2 as "recurse" to val_print because our
+ standard indentation here is 4 spaces, and val_print indents
+ 2 for each recurse. */
+ val = read_var_value (sym, fi);
+
+ annotate_arg_value (val == NULL ? NULL : VALUE_TYPE (val));
+
+ if (val)
+ {
+ val_print (VALUE_TYPE (val), VALUE_CONTENTS (val), 0,
+ VALUE_ADDRESS (val),
+ stb->stream, 0, 0, 2, Val_no_prettyprint);
+ ui_out_field_stream (uiout, "value", stb);
+ }
+ else
+ ui_out_text (uiout, "???");
+
+ /* Invoke ui_out_tuple_end. */
+ do_cleanups (list_chain);
+
+ annotate_arg_end ();
+
+ first = 0;
+ }
+ }
+
+ /* Don't print nameless args in situations where we don't know
+ enough about the stack to find them. */
+ if (num != -1)
+ {
+ long start;
+
+ if (highest_offset == -1)
+ start = FRAME_ARGS_SKIP;
+ else
+ start = highest_offset;
+
+ print_frame_nameless_args (fi, start, num - args_printed,
+ first, stream);
+ }
+ do_cleanups (old_chain);
+}
+
/* Pass the args the way catch_errors wants them. */
static int
@@ -177,7 +396,13 @@ print_args_stub (void *args)
int numargs;
struct print_args_args *p = (struct print_args_args *) args;
- numargs = FRAME_NUM_ARGS (p->fi);
+ if (FRAME_NUM_ARGS_P ())
+ {
+ numargs = FRAME_NUM_ARGS (p->fi);
+ gdb_assert (numargs >= 0);
+ }
+ else
+ numargs = -1;
print_frame_args (p->func, p->fi, numargs, p->stream);
return 0;
}
@@ -761,15 +986,22 @@ frame_info (char *addr_exp, int from_tty)
print_address_numeric (arg_list, 1, gdb_stdout);
printf_filtered (",");
- numargs = FRAME_NUM_ARGS (fi);
- if (numargs < 0)
- puts_filtered (" args: ");
- else if (numargs == 0)
- puts_filtered (" no args.");
- else if (numargs == 1)
- puts_filtered (" 1 arg: ");
+ if (!FRAME_NUM_ARGS_P ())
+ {
+ numargs = -1;
+ puts_filtered (" args: ");
+ }
else
- printf_filtered (" %d args: ", numargs);
+ {
+ numargs = FRAME_NUM_ARGS (fi);
+ gdb_assert (numargs >= 0);
+ if (numargs == 0)
+ puts_filtered (" no args.");
+ else if (numargs == 1)
+ puts_filtered (" 1 arg: ");
+ else
+ printf_filtered (" %d args: ", numargs);
+ }
print_frame_args (func, fi, numargs, gdb_stdout);
puts_filtered ("\n");
}
@@ -1077,13 +1309,13 @@ backtrace_full_command (char *arg, int from_tty)
Return 1 if any variables were printed; 0 otherwise. */
static int
-print_block_frame_locals (struct block *b, register struct frame_info *fi,
- int num_tabs, register struct ui_file *stream)
+print_block_frame_locals (struct block *b, struct frame_info *fi,
+ int num_tabs, struct ui_file *stream)
{
struct dict_iterator iter;
- register int j;
- register struct symbol *sym;
- register int values_printed = 0;
+ int j;
+ struct symbol *sym;
+ int values_printed = 0;
ALL_BLOCK_SYMBOLS (b, iter, sym)
{
@@ -1462,14 +1694,7 @@ find_relative_frame (register struct frame_info *frame,
and select it. See parse_frame_specification for more info on proper
frame expressions. */
-/* ARGSUSED */
void
-select_frame_command_wrapper (char *level_exp, int from_tty)
-{
- select_frame_command (level_exp, from_tty);
-}
-
-static void
select_frame_command (char *level_exp, int from_tty)
{
struct frame_info *frame;
diff --git a/gdb/config/mips/tm-bigmips.h b/gdb/stack.h
index 7a5a6b816c1..0891c94c051 100644
--- a/gdb/config/mips/tm-bigmips.h
+++ b/gdb/stack.h
@@ -1,4 +1,6 @@
-/* Copyright 1990, 1994, 2000 Free Software Foundation, Inc.
+/* Stack manipulation commands, for GDB the GNU Debugger.
+
+ Copyright 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -17,4 +19,9 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "mips/tm-mips.h"
+#ifndef STACK_H
+#define STACK_H
+
+void select_frame_command (char *level_exp, int from_tty);
+
+#endif /* #ifndef STACK_H */
diff --git a/gdb/std-regs.c b/gdb/std-regs.c
index 93d5102661c..1241852383a 100644
--- a/gdb/std-regs.c
+++ b/gdb/std-regs.c
@@ -133,6 +133,8 @@ value_of_builtin_frame_ps_reg (struct frame_info *frame)
error ("Standard register ``$ps'' is not available for this target");
}
+extern initialize_file_ftype _initialize_frame_reg; /* -Wmissing-prototypes */
+
void
_initialize_frame_reg (void)
{
diff --git a/gdb/symfile.c b/gdb/symfile.c
index fb36ddbfc8d..2677350426c 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -369,6 +369,22 @@ find_lowest_section (bfd *abfd, asection *sect, void *obj)
*lowest = sect;
}
+/* Create a new section_addr_info, with room for NUM_SECTIONS. */
+
+struct section_addr_info *
+alloc_section_addr_info (size_t num_sections)
+{
+ struct section_addr_info *sap;
+ size_t size;
+
+ size = (sizeof (struct section_addr_info)
+ + sizeof (struct other_sections) * (num_sections - 1));
+ sap = (struct section_addr_info *) xmalloc (size);
+ memset (sap, 0, size);
+ sap->num_sections = num_sections;
+
+ return sap;
+}
/* Build (allocate and populate) a section_addr_info struct from
an existing section table. */
@@ -381,14 +397,13 @@ build_section_addr_info_from_section_table (const struct section_table *start,
const struct section_table *stp;
int oidx;
- sap = xmalloc (sizeof (struct section_addr_info));
- memset (sap, 0, sizeof (struct section_addr_info));
+ sap = alloc_section_addr_info (end - start);
for (stp = start, oidx = 0; stp != end; stp++)
{
if (bfd_get_section_flags (stp->bfd,
stp->the_bfd_section) & (SEC_ALLOC | SEC_LOAD)
- && oidx < MAX_SECTIONS)
+ && oidx < end - start)
{
sap->other[oidx].addr = stp->addr;
sap->other[oidx].name
@@ -409,7 +424,7 @@ free_section_addr_info (struct section_addr_info *sap)
{
int idx;
- for (idx = 0; idx < MAX_SECTIONS; idx++)
+ for (idx = 0; idx < sap->num_sections; idx++)
if (sap->other[idx].name)
xfree (sap->other[idx].name);
xfree (sap);
@@ -482,14 +497,16 @@ default_symfile_offsets (struct objfile *objfile,
{
int i;
- objfile->num_sections = SECT_OFF_MAX;
+ objfile->num_sections = bfd_count_sections (objfile->obfd);
objfile->section_offsets = (struct section_offsets *)
- obstack_alloc (&objfile->psymbol_obstack, SIZEOF_SECTION_OFFSETS);
- memset (objfile->section_offsets, 0, SIZEOF_SECTION_OFFSETS);
+ obstack_alloc (&objfile->psymbol_obstack,
+ SIZEOF_N_SECTION_OFFSETS (objfile->num_sections));
+ memset (objfile->section_offsets, 0,
+ SIZEOF_N_SECTION_OFFSETS (objfile->num_sections));
/* Now calculate offsets for section that were specified by the
caller. */
- for (i = 0; i < MAX_SECTIONS && addrs->other[i].name; i++)
+ for (i = 0; i < addrs->num_sections && addrs->other[i].name; i++)
{
struct other_sections *osp ;
@@ -549,26 +566,11 @@ syms_from_objfile (struct objfile *objfile,
int mainline,
int verbo)
{
- asection *lower_sect;
- asection *sect;
- CORE_ADDR lower_offset;
- struct section_addr_info local_addr;
+ struct section_addr_info *local_addr = NULL;
struct cleanup *old_chain;
- int i;
gdb_assert (! (addrs && offsets));
- /* If ADDRS and OFFSETS are both NULL, put together a dummy address
- list. We now establish the convention that an addr of zero means
- no load address was specified. */
- if (! addrs && ! offsets)
- {
- memset (&local_addr, 0, sizeof (local_addr));
- addrs = &local_addr;
- }
-
- /* Now either addrs or offsets is non-zero. */
-
init_entry_point_info (objfile);
find_sym_fns (objfile);
@@ -579,6 +581,19 @@ syms_from_objfile (struct objfile *objfile,
if an error occurs during symbol reading. */
old_chain = make_cleanup_free_objfile (objfile);
+ /* If ADDRS and OFFSETS are both NULL, put together a dummy address
+ list. We now establish the convention that an addr of zero means
+ no load address was specified. */
+ if (! addrs && ! offsets)
+ {
+ local_addr
+ = alloc_section_addr_info (bfd_count_sections (objfile->obfd));
+ make_cleanup (xfree, local_addr);
+ addrs = local_addr;
+ }
+
+ /* Now either addrs or offsets is non-zero. */
+
if (mainline)
{
/* We will modify the main symbol table, make sure that all its users
@@ -607,8 +622,13 @@ syms_from_objfile (struct objfile *objfile,
We no longer warn if the lowest section is not a text segment (as
happens for the PA64 port. */
- if (!mainline)
+ if (!mainline && addrs && addrs->other[0].name)
{
+ asection *lower_sect;
+ asection *sect;
+ CORE_ADDR lower_offset;
+ int i;
+
/* Find lowest loadable section to be used as starting point for
continguous sections. FIXME!! won't work without call to find
.text first, but this assumes text is lowest section. */
@@ -640,9 +660,7 @@ syms_from_objfile (struct objfile *objfile,
(the loadable section directly below it in memory).
this_offset = lower_offset = lower_addr - lower_orig_addr */
- /* Calculate offsets for sections. */
- if (addrs)
- for (i=0 ; i < MAX_SECTIONS && addrs->other[i].name; i++)
+ for (i = 0; i < addrs->num_sections && addrs->other[i].name; i++)
{
if (addrs->other[i].addr != 0)
{
@@ -726,7 +744,7 @@ syms_from_objfile (struct objfile *objfile,
int i;
for (i = 0;
- !s_addr && i < MAX_SECTIONS && addrs->other[i].name;
+ !s_addr && i < addrs->num_sections && addrs->other[i].name;
i++)
if (strcmp (bfd_section_name (s->objfile->obfd,
s->the_bfd_section),
@@ -760,13 +778,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
@@ -824,10 +835,8 @@ symbol_file_add_with_addrs_or_offsets (char *name, int from_tty,
struct partial_symtab *psymtab;
char *debugfile;
bfd *abfd;
- struct section_addr_info orig_addrs;
-
- if (addrs)
- orig_addrs = *addrs;
+ struct section_addr_info *orig_addrs;
+ struct cleanup *my_cleanups;
/* Open a bfd for the file, and give user a chance to burp if we'd be
interactively wiping out any existing symbols. */
@@ -842,6 +851,11 @@ symbol_file_add_with_addrs_or_offsets (char *name, int from_tty,
objfile = allocate_objfile (abfd, flags);
+ orig_addrs = alloc_section_addr_info (bfd_count_sections (abfd));
+ my_cleanups = make_cleanup (xfree, orig_addrs);
+ if (addrs)
+ *orig_addrs = *addrs;
+
/* If the objfile uses a mapped symbol file, and we have a psymtab for
it, then skip reading any symbols at this time. */
@@ -908,7 +922,7 @@ symbol_file_add_with_addrs_or_offsets (char *name, int from_tty,
if (addrs != NULL)
{
objfile->separate_debug_objfile
- = symbol_file_add (debugfile, from_tty, &orig_addrs, 0, flags);
+ = symbol_file_add (debugfile, from_tty, orig_addrs, 0, flags);
}
else
{
@@ -947,6 +961,8 @@ symbol_file_add_with_addrs_or_offsets (char *name, int from_tty,
time. */
gdb_flush (gdb_stdout);
+ do_cleanups (my_cleanups);
+
if (objfile->sf == NULL)
return objfile; /* No symbols. */
@@ -1664,15 +1680,21 @@ add_symbol_file_command (char *args, int from_tty)
int expecting_sec_name = 0;
int expecting_sec_addr = 0;
- struct
+ struct sect_opt
{
char *name;
char *value;
- } sect_opts[SECT_OFF_MAX];
+ };
- struct section_addr_info section_addrs;
+ struct section_addr_info *section_addrs;
+ struct sect_opt *sect_opts = NULL;
+ size_t num_sect_opts = 0;
struct cleanup *my_cleanups = make_cleanup (null_cleanup, NULL);
+ num_sect_opts = 16;
+ sect_opts = (struct sect_opt *) xmalloc (num_sect_opts
+ * sizeof (struct sect_opt));
+
dont_repeat ();
if (args == NULL)
@@ -1681,9 +1703,6 @@ add_symbol_file_command (char *args, int from_tty)
/* Make a copy of the string that we can safely write into. */
args = xstrdup (args);
- /* Ensure section_addrs is initialized */
- memset (&section_addrs, 0, sizeof (section_addrs));
-
while (*args != '\000')
{
/* Any leading spaces? */
@@ -1716,7 +1735,14 @@ add_symbol_file_command (char *args, int from_tty)
to load the program. */
sect_opts[section_index].name = ".text";
sect_opts[section_index].value = arg;
- section_index++;
+ if (++section_index > num_sect_opts)
+ {
+ num_sect_opts *= 2;
+ sect_opts = ((struct sect_opt *)
+ xrealloc (sect_opts,
+ num_sect_opts
+ * sizeof (struct sect_opt)));
+ }
}
else
{
@@ -1733,8 +1759,6 @@ add_symbol_file_command (char *args, int from_tty)
else
if (strcmp (arg, "-s") == 0)
{
- if (section_index >= SECT_OFF_MAX)
- error ("Too many sections specified.");
expecting_sec_name = 1;
expecting_sec_addr = 1;
}
@@ -1751,7 +1775,14 @@ add_symbol_file_command (char *args, int from_tty)
{
sect_opts[section_index].value = arg;
expecting_sec_addr = 0;
- section_index++;
+ if (++section_index > num_sect_opts)
+ {
+ num_sect_opts *= 2;
+ sect_opts = ((struct sect_opt *)
+ xrealloc (sect_opts,
+ num_sect_opts
+ * sizeof (struct sect_opt)));
+ }
}
else
error ("USAGE: add-symbol-file <filename> <textaddress> [-mapped] [-readnow] [-s <secname> <addr>]*");
@@ -1767,22 +1798,20 @@ add_symbol_file_command (char *args, int from_tty)
string. */
printf_filtered ("add symbol table from file \"%s\" at\n", filename);
+ section_addrs = alloc_section_addr_info (section_index);
+ make_cleanup (xfree, section_addrs);
for (i = 0; i < section_index; i++)
{
CORE_ADDR addr;
char *val = sect_opts[i].value;
char *sec = sect_opts[i].name;
- val = sect_opts[i].value;
- if (val[0] == '0' && val[1] == 'x')
- addr = strtoul (val+2, NULL, 16);
- else
- addr = strtoul (val, NULL, 10);
+ addr = parse_and_eval_address (val);
/* Here we store the section offsets in the order they were
entered on the command line. */
- section_addrs.other[sec_num].name = sec;
- section_addrs.other[sec_num].addr = addr;
+ section_addrs->other[sec_num].name = sec;
+ section_addrs->other[sec_num].addr = addr;
printf_filtered ("\t%s_addr = %s\n",
sec,
local_hex_string ((unsigned long)addr));
@@ -1798,7 +1827,7 @@ add_symbol_file_command (char *args, int from_tty)
if (from_tty && (!query ("%s", "")))
error ("Not confirmed.");
- symbol_file_add (filename, from_tty, &section_addrs, 0, flags);
+ symbol_file_add (filename, from_tty, section_addrs, 0, flags);
/* Getting new symbols may change our opinion about what is
frameless. */
@@ -1895,8 +1924,10 @@ reread_symbols (void)
/* Save the offsets, we will nuke them with the rest of the
psymbol_obstack. */
num_offsets = objfile->num_sections;
- offsets = (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
- memcpy (offsets, objfile->section_offsets, SIZEOF_SECTION_OFFSETS);
+ offsets = ((struct section_offsets *)
+ alloca (SIZEOF_N_SECTION_OFFSETS (num_offsets)));
+ memcpy (offsets, objfile->section_offsets,
+ SIZEOF_N_SECTION_OFFSETS (num_offsets));
/* Nuke all the state that we will re-read. Much of the following
code which sets things to NULL really is necessary to tell
@@ -1931,6 +1962,7 @@ reread_symbols (void)
objfile->psymtabs = NULL;
objfile->free_psymtabs = NULL;
objfile->msymbols = NULL;
+ objfile->sym_private = NULL;
objfile->minimal_symbol_count = 0;
memset (&objfile->msymbol_hash, 0,
sizeof (objfile->msymbol_hash));
@@ -1964,8 +1996,10 @@ reread_symbols (void)
/* We use the same section offsets as from last time. I'm not
sure whether that is always correct for shared libraries. */
objfile->section_offsets = (struct section_offsets *)
- obstack_alloc (&objfile->psymbol_obstack, SIZEOF_SECTION_OFFSETS);
- memcpy (objfile->section_offsets, offsets, SIZEOF_SECTION_OFFSETS);
+ obstack_alloc (&objfile->psymbol_obstack,
+ SIZEOF_N_SECTION_OFFSETS (num_offsets));
+ memcpy (objfile->section_offsets, offsets,
+ SIZEOF_N_SECTION_OFFSETS (num_offsets));
objfile->num_sections = num_offsets;
/* What the hell is sym_new_init for, anyway? The concept of
@@ -2009,14 +2043,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);
}
}
@@ -2957,7 +2983,7 @@ pc_in_mapped_range (CORE_ADDR pc, asection *section)
/* Return true if the mapped ranges of sections A and B overlap, false
otherwise. */
-int
+static int
sections_overlap (asection *a, asection *b)
{
/* FIXME: need bfd *, so we can use bfd_section_vma methods. */
diff --git a/gdb/symfile.h b/gdb/symfile.h
index ca67dda52c3..fbb17bd8ce1 100644
--- a/gdb/symfile.h
+++ b/gdb/symfile.h
@@ -1,7 +1,7 @@
/* Definitions for reading symbol files into GDB.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
+
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -26,113 +26,117 @@
/* This file requires that you first include "bfd.h" and "symtab.h". */
/* Opaque declarations. */
+struct section_table;
struct objfile;
struct obstack;
struct block;
-/* Partial symbols are stored in the psymbol_cache and pointers to them
- are kept in a dynamically grown array that is obtained from malloc and
- grown as necessary via realloc. Each objfile typically has two of these,
- one for global symbols and one for static symbols. Although this adds
- a level of indirection for storing or accessing the partial symbols,
- it allows us to throw away duplicate psymbols and set all pointers
- to the single saved instance. */
+/* Partial symbols are stored in the psymbol_cache and pointers to
+ them are kept in a dynamically grown array that is obtained from
+ malloc and grown as necessary via realloc. Each objfile typically
+ has two of these, one for global symbols and one for static
+ symbols. Although this adds a level of indirection for storing or
+ accessing the partial symbols, it allows us to throw away duplicate
+ psymbols and set all pointers to the single saved instance. */
struct psymbol_allocation_list
- {
+{
- /* Pointer to beginning of dynamically allocated array of pointers to
- partial symbols. The array is dynamically expanded as necessary to
- accommodate more pointers. */
+ /* Pointer to beginning of dynamically allocated array of pointers
+ to partial symbols. The array is dynamically expanded as
+ necessary to accommodate more pointers. */
- struct partial_symbol **list;
+ struct partial_symbol **list;
- /* Pointer to next available slot in which to store a pointer to a partial
- symbol. */
+ /* Pointer to next available slot in which to store a pointer to a
+ partial symbol. */
- struct partial_symbol **next;
+ struct partial_symbol **next;
- /* Number of allocated pointer slots in current dynamic array (not the
- number of bytes of storage). The "next" pointer will always point
- somewhere between list[0] and list[size], and when at list[size] the
- array will be expanded on the next attempt to store a pointer. */
+ /* Number of allocated pointer slots in current dynamic array (not
+ the number of bytes of storage). The "next" pointer will always
+ point somewhere between list[0] and list[size], and when at
+ list[size] the array will be expanded on the next attempt to
+ store a pointer. */
- int size;
- };
+ int size;
+};
/* Define an array of addresses to accommodate non-contiguous dynamic
loading of modules. This is for use when entering commands, so we
- can keep track of the section names until we read the file and
- can map them to bfd sections. This structure is also used by
- solib.c to communicate the section addresses in shared objects to
- symbol_file_add (). */
-
-#define MAX_SECTIONS 64
-struct section_addr_info
+ can keep track of the section names until we read the file and can
+ map them to bfd sections. This structure is also used by solib.c
+ to communicate the section addresses in shared objects to
+ symbol_file_add (). */
+
+struct section_addr_info
{
+ /* The number of sections for which address information is
+ available. */
+ size_t num_sections;
/* Sections whose names are file format dependent. */
struct other_sections
{
CORE_ADDR addr;
char *name;
int sectindex;
- } other[MAX_SECTIONS];
+ } other[1];
};
/* Structure to keep track of symbol reading functions for various
object file types. */
struct sym_fns
- {
+{
- /* BFD flavour that we handle, or (as a special kludge, see xcoffread.c,
- (enum bfd_flavour)-1 for xcoff). */
+ /* BFD flavour that we handle, or (as a special kludge, see
+ xcoffread.c, (enum bfd_flavour)-1 for xcoff). */
- enum bfd_flavour sym_flavour;
+ enum bfd_flavour sym_flavour;
- /* Initializes anything that is global to the entire symbol table. It is
- called during symbol_file_add, when we begin debugging an entirely new
- program. */
+ /* Initializes anything that is global to the entire symbol table.
+ It is called during symbol_file_add, when we begin debugging an
+ entirely new program. */
- void (*sym_new_init) (struct objfile *);
+ void (*sym_new_init) (struct objfile *);
- /* Reads any initial information from a symbol file, and initializes the
- struct sym_fns SF in preparation for sym_read(). It is called every
- time we read a symbol file for any reason. */
+ /* Reads any initial information from a symbol file, and initializes
+ the struct sym_fns SF in preparation for sym_read(). It is
+ called every time we read a symbol file for any reason. */
- void (*sym_init) (struct objfile *);
+ void (*sym_init) (struct objfile *);
- /* sym_read (objfile, mainline)
- Reads a symbol file into a psymtab (or possibly a symtab).
- OBJFILE is the objfile struct for the file we are reading.
- MAINLINE is 1 if this is the
- main symbol table being read, and 0 if a secondary
- symbol file (e.g. shared library or dynamically loaded file)
- is being read. */
+ /* sym_read (objfile, mainline) Reads a symbol file into a psymtab
+ (or possibly a symtab). OBJFILE is the objfile struct for the
+ file we are reading. MAINLINE is 1 if this is the main symbol
+ table being read, and 0 if a secondary symbol file (e.g. shared
+ library or dynamically loaded file) is being read. */
- void (*sym_read) (struct objfile *, int);
+ void (*sym_read) (struct objfile *, int);
- /* Called when we are finished with an objfile. Should do all cleanup
- that is specific to the object file format for the particular objfile. */
+ /* Called when we are finished with an objfile. Should do all
+ cleanup that is specific to the object file format for the
+ particular objfile. */
- void (*sym_finish) (struct objfile *);
+ void (*sym_finish) (struct objfile *);
- /* This function produces a file-dependent section_offsets structure,
- allocated in the objfile's storage, and based on the parameter.
- The parameter is currently a CORE_ADDR (FIXME!) for backward compatibility
- with the higher levels of GDB. It should probably be changed to
- a string, where NULL means the default, and others are parsed in a file
- dependent way. */
+ /* This function produces a file-dependent section_offsets
+ structure, allocated in the objfile's storage, and based on the
+ parameter. The parameter is currently a CORE_ADDR (FIXME!) for
+ backward compatibility with the higher levels of GDB. It should
+ probably be changed to a string, where NULL means the default,
+ and others are parsed in a file dependent way. */
- void (*sym_offsets) (struct objfile *, struct section_addr_info *);
+ void (*sym_offsets) (struct objfile *, struct section_addr_info *);
- /* Finds the next struct sym_fns. They are allocated and initialized
- in whatever module implements the functions pointed to; an
- initializer calls add_symtab_fns to add them to the global chain. */
+ /* Finds the next struct sym_fns. They are allocated and
+ initialized in whatever module implements the functions pointed
+ to; an initializer calls add_symtab_fns to add them to the global
+ chain. */
- struct sym_fns *next;
+ struct sym_fns *next;
- };
+};
/* The default version of sym_fns.sym_offsets for readers that don't
do anything special. */
@@ -144,7 +148,7 @@ extern void default_symfile_offsets (struct objfile *objfile,
extern void extend_psymbol_list (struct psymbol_allocation_list *,
struct objfile *);
-/* Add any kind of symbol to a psymbol_allocation_list. */
+/* Add any kind of symbol to a psymbol_allocation_list. */
/* #include "demangle.h" */
@@ -163,7 +167,6 @@ extern void add_psymbol_with_dem_name_to_list (char *, int, char *, int,
enum language,
struct objfile *);
-
extern void init_psymbol_list (struct objfile *, int);
extern void sort_pst_symbols (struct partial_symtab *);
@@ -179,24 +182,30 @@ extern void add_symtab_fns (struct sym_fns *);
extern void init_entry_point_info (struct objfile *);
extern void syms_from_objfile (struct objfile *,
- struct section_addr_info *,
- struct section_offsets *, int,
- int, int);
+ struct section_addr_info *,
+ struct section_offsets *, int, int, int);
extern void new_symfile_objfile (struct objfile *, int, int);
extern struct objfile *symbol_file_add (char *, int,
struct section_addr_info *, int, int);
-/* Build (allocate and populate) a section_addr_info struct from
- an existing section table. */
+/* Create a new section_addr_info, with room for NUM_SECTIONS. */
-struct section_table;
-extern struct section_addr_info *
-build_section_addr_info_from_section_table (const struct section_table *start,
- const struct section_table *end);
+extern struct section_addr_info *alloc_section_addr_info (size_t
+ num_sections);
+
+/* Build (allocate and populate) a section_addr_info struct from an
+ existing section table. */
+
+extern struct section_addr_info
+ *build_section_addr_info_from_section_table (const struct section_table
+ *start,
+ const struct section_table
+ *end);
-/* Free all memory allocated by build_section_addr_info_from_section_table. */
+/* Free all memory allocated by
+ build_section_addr_info_from_section_table. */
extern void free_section_addr_info (struct section_addr_info *);
@@ -207,14 +216,14 @@ extern struct partial_symtab *start_psymtab_common (struct objfile *,
struct partial_symbol **,
struct partial_symbol **);
-/* Make a copy of the string at PTR with SIZE characters in the symbol obstack
- (and add a null character at the end in the copy).
- Returns the address of the copy. */
+/* Make a copy of the string at PTR with SIZE characters in the symbol
+ obstack (and add a null character at the end in the copy). Returns
+ the address of the copy. */
extern char *obsavestring (const char *, int, struct obstack *);
-/* Concatenate strings S1, S2 and S3; return the new string.
- Space is found in the symbol_obstack. */
+/* Concatenate strings S1, S2 and S3; return the new string. Space is
+ found in the symbol_obstack. */
extern char *obconcat (struct obstack *obstackp, const char *, const char *,
const char *);
@@ -229,7 +238,7 @@ extern char *obconcat (struct obstack *obstackp, const char *, const char *,
this flag and then add the shared library symbols as needed. Note
that there is a potential for confusion, since if the shared
library symbols are not loaded, commands like "info fun" will *not*
- report all the functions that are actually present. */
+ report all the functions that are actually present. */
extern int auto_solib_add;
@@ -238,8 +247,7 @@ extern int auto_solib_add;
known to the debugger would cause the total shared library symbol
size to exceed this threshhold, then the shlib's symbols are not
added. The threshold is ignored if the user explicitly asks for a
- shlib to be added, such as when using the "sharedlibrary"
- command. */
+ shlib to be added, such as when using the "sharedlibrary" command. */
extern int auto_solib_limit;
@@ -258,58 +266,59 @@ extern bfd *symfile_bfd_open (char *);
extern int get_section_index (struct objfile *, char *);
/* Utility functions for overlay sections: */
-extern enum overlay_debugging_state {
- ovly_off,
- ovly_on,
+extern enum overlay_debugging_state
+{
+ ovly_off,
+ ovly_on,
ovly_auto
} overlay_debugging;
extern int overlay_cache_invalid;
-/* return the "mapped" overlay section containing the PC */
+/* Return the "mapped" overlay section containing the PC. */
extern asection *find_pc_mapped_section (CORE_ADDR);
-/* return any overlay section containing the PC (even in its LMA region) */
+/* Return any overlay section containing the PC (even in its LMA
+ region). */
extern asection *find_pc_overlay (CORE_ADDR);
-/* return true if the section is an overlay */
+/* Return true if the section is an overlay. */
extern int section_is_overlay (asection *);
-/* return true if the overlay section is currently "mapped" */
+/* Return true if the overlay section is currently "mapped". */
extern int section_is_mapped (asection *);
-/* return true if pc belongs to section's VMA */
+/* Return true if pc belongs to section's VMA. */
extern CORE_ADDR pc_in_mapped_range (CORE_ADDR, asection *);
-/* return true if pc belongs to section's LMA */
+/* Return true if pc belongs to section's LMA. */
extern CORE_ADDR pc_in_unmapped_range (CORE_ADDR, asection *);
-/* map an address from a section's LMA to its VMA */
+/* Map an address from a section's LMA to its VMA. */
extern CORE_ADDR overlay_mapped_address (CORE_ADDR, asection *);
-/* map an address from a section's VMA to its LMA */
+/* Map an address from a section's VMA to its LMA. */
extern CORE_ADDR overlay_unmapped_address (CORE_ADDR, asection *);
-/* convert an address in an overlay section (force into VMA range) */
+/* Convert an address in an overlay section (force into VMA range). */
extern CORE_ADDR symbol_overlayed_address (CORE_ADDR, asection *);
-/* Load symbols from a file. */
+/* Load symbols from a file. */
extern void symbol_file_add_main (char *args, int from_tty);
-/* Clear GDB symbol tables. */
+/* Clear GDB symbol tables. */
extern void symbol_file_clear (int from_tty);
extern bfd_byte *symfile_relocate_debug_section (bfd *abfd, asection *sectp,
- bfd_byte *buf);
+ bfd_byte * buf);
/* From dwarfread.c */
-extern void
-dwarf_build_psymtabs (struct objfile *, int, file_ptr, unsigned int,
- file_ptr, unsigned int);
+extern void dwarf_build_psymtabs (struct objfile *, int, file_ptr,
+ unsigned int, file_ptr, unsigned int);
/* From dwarf2read.c */
-extern int dwarf2_has_info (bfd * abfd);
+extern int dwarf2_has_info (bfd *abfd);
extern void dwarf2_build_psymtabs (struct objfile *, int);
extern void dwarf2_build_frame_info (struct objfile *);
@@ -318,17 +327,17 @@ extern void dwarf2_build_frame_info (struct objfile *);
/* Hack to force structures to exist before use in parameter list. */
struct ecoff_debug_hack
- {
- struct ecoff_debug_swap *a;
- struct ecoff_debug_info *b;
- };
-extern void
-mdebug_build_psymtabs (struct objfile *,
- const struct ecoff_debug_swap *,
- struct ecoff_debug_info *);
-
-extern void
-elfmdebug_build_psymtabs (struct objfile *,
- const struct ecoff_debug_swap *, asection *);
+{
+ struct ecoff_debug_swap *a;
+ struct ecoff_debug_info *b;
+};
+
+extern void mdebug_build_psymtabs (struct objfile *,
+ const struct ecoff_debug_swap *,
+ struct ecoff_debug_info *);
+
+extern void elfmdebug_build_psymtabs (struct objfile *,
+ const struct ecoff_debug_swap *,
+ asection *);
#endif /* !defined(SYMFILE_H) */
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index 6997cb51026..afcafc42fca 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -88,27 +88,19 @@ static void free_symtab_block (struct objfile *, struct block *);
/* Free a struct block <- B and all the symbols defined in that block. */
+/* FIXME: carlton/2003-04-28: I don't believe this is currently ever
+ used. */
+
static void
free_symtab_block (struct objfile *objfile, struct block *b)
{
struct dict_iterator iter;
- struct symbol *sym, *prev_sym;
-
- prev_sym = dict_iterator_first (BLOCK_DICT (b), &iter);
+ struct symbol *sym;
- /* Make sure there's at least one symbol to free! */
- if (prev_sym)
+ ALL_BLOCK_SYMBOLS (b, iter, sym)
{
- for (sym = dict_iterator_next (&iter); sym;
- sym = dict_iterator_next (&iter))
- {
- xmfree (objfile->md, DEPRECATED_SYMBOL_NAME (prev_sym));
- xmfree (objfile->md, prev_sym);
- prev_sym = sym;
- }
-
- xmfree (objfile->md, DEPRECATED_SYMBOL_NAME (prev_sym));
- xmfree (objfile->md, prev_sym);
+ xmfree (objfile->md, DEPRECATED_SYMBOL_NAME (sym));
+ xmfree (objfile->md, sym);
}
dict_free (BLOCK_DICT (b));
@@ -158,7 +150,7 @@ free_symtab (register struct symtab *s)
break;
}
- /* If there is other memory to free, free it. */
+ /* If there is a single block of memory to free, free it. */
if (s->free_func != NULL)
s->free_func (s);
@@ -453,13 +445,13 @@ static void
dump_symtab (struct objfile *objfile, struct symtab *symtab,
struct ui_file *outfile)
{
- register int i;
+ int i;
struct dict_iterator iter;
int len, blen;
- register struct linetable *l;
+ struct linetable *l;
struct blockvector *bv;
struct symbol *sym;
- register struct block *b;
+ struct block *b;
int depth;
fprintf_filtered (outfile, "\nSymtab for file %s\n", symtab->filename);
@@ -506,18 +498,8 @@ dump_symtab (struct objfile *objfile, struct symtab *symtab,
/* NOTE: carlton/2002-09-23: If there is demand for it, we
can cook up something to put in here. */
-#if 0
- /* drow/2002-07-10: We could save the total symbols count
- even if we're using a hashtable, but nothing else but this message
- wants it. */
- blen = BLOCK_BUCKETS (b);
- if (BLOCK_HASHTABLE (b))
- fprintf_filtered (outfile, ", %d buckets in ", blen);
- else
- fprintf_filtered (outfile, ", %d syms in ", blen);
-#else
- fprintf_filtered (outfile, " in ");
-#endif
+ fprintf_filtered (outfile, ", %d syms/buckets in ",
+ dict_size (BLOCK_DICT (b)));
print_address_numeric (BLOCK_START (b), 1, outfile);
fprintf_filtered (outfile, "..");
print_address_numeric (BLOCK_END (b), 1, outfile);
diff --git a/gdb/symtab.c b/gdb/symtab.c
index d8eed3517d2..678e5e5c118 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -47,6 +47,7 @@
#include "gdb_obstack.h"
#include "block.h"
+#include "dictionary.h"
#include <sys/types.h>
#include <fcntl.h>
@@ -79,11 +80,6 @@ static int find_line_common (struct linetable *, int, int *);
char *operator_chars (char *p, char **end);
-static struct partial_symbol *lookup_partial_symbol (struct partial_symtab *,
- const char *,
- const char *, int,
- domain_enum);
-
static struct symbol *lookup_symbol_aux (const char *name,
const char *linkage_name,
const struct block *block,
@@ -138,17 +134,6 @@ static void print_msymbol_info (struct minimal_symbol *);
static void symtab_symbol_info (char *, domain_enum, int);
-static void overload_list_add_symbol (struct symbol *sym,
- const char *oload_name);
-
-static void make_symbol_overload_list_using (const char *func_name,
- const char *namespace,
- const struct block *block);
-
-static void make_symbol_overload_list_qualified (const char *func_name);
-
-static void read_in_psymtabs (const char *oload_name);
-
void _initialize_symtab (void);
/* */
@@ -1226,7 +1211,7 @@ lookup_symbol_aux_minsyms (const char *name,
bv = BLOCKVECTOR (s);
block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
- /* This call used to pass `DEPRECATED_SYMBOL_NAME (msymbol)' as the
+ /* This call used to pass `SYMBOL_LINKAGE_NAME (msymbol)' as the
`name' argument to lookup_block_symbol. But the name
of a minimal symbol is always mangled, so that seems
to be clearly the wrong thing to pass as the
@@ -1494,7 +1479,7 @@ lookup_symbol_global (const char *name,
linkage name matches it. Check the global symbols if GLOBAL, the
static symbols if not */
-static struct partial_symbol *
+struct partial_symbol *
lookup_partial_symbol (struct partial_symtab *pst, const char *name,
const char *linkage_name, int global,
domain_enum domain)
@@ -1770,10 +1755,11 @@ lookup_block_symbol (register const struct block *block, const char *name,
if (!BLOCK_FUNCTION (block))
{
for (sym = dict_iter_name_first (BLOCK_DICT (block), name, &iter);
- sym; sym = dict_iter_name_next (name, &iter))
+ sym != NULL;
+ sym = dict_iter_name_next (name, &iter))
{
if (SYMBOL_DOMAIN (sym) == domain
- && (linkage_name
+ && (linkage_name != NULL
? strcmp (SYMBOL_LINKAGE_NAME (sym), linkage_name) == 0 : 1))
return sym;
}
@@ -1782,20 +1768,20 @@ lookup_block_symbol (register const struct block *block, const char *name,
else
{
/* Note that parameter symbols do not always show up last in the
- list. This loop makes sure to take anything else other than
- parameter symbols first; it only uses parameter symbols as a
- last resort. Note that this only takes up extra computation
- time on a match. */
+ list; this loop makes sure to take anything else other than
+ parameter symbols first; it only uses parameter symbols as a
+ last resort. Note that this only takes up extra computation
+ time on a match. */
struct symbol *sym_found = NULL;
for (sym = dict_iter_name_first (BLOCK_DICT (block), name, &iter);
- sym; sym = dict_iter_name_next (name, &iter))
+ sym != NULL;
+ sym = dict_iter_name_next (name, &iter))
{
if (SYMBOL_DOMAIN (sym) == domain
- && (linkage_name
+ && (linkage_name != NULL
? strcmp (SYMBOL_LINKAGE_NAME (sym), linkage_name) == 0 : 1))
-
{
/* If SYM has aliases, then use any alias that is active
at the current PC. If no alias is active at the current
@@ -1941,12 +1927,12 @@ find_pc_sect_symtab (CORE_ADDR pc, asection *section)
struct symbol *sym = NULL;
ALL_BLOCK_SYMBOLS (b, iter, sym)
- {
- fixup_symbol_section (sym, objfile);
- if (section == SYMBOL_BFD_SECTION (sym))
- break;
- }
- if ((sym == NULL))
+ {
+ fixup_symbol_section (sym, objfile);
+ if (section == SYMBOL_BFD_SECTION (sym))
+ break;
+ }
+ if (sym == NULL)
continue; /* no symbol in this symtab matches section */
}
distance = BLOCK_END (b) - BLOCK_START (b);
@@ -2097,7 +2083,8 @@ find_pc_sect_line (CORE_ADDR pc, struct sec *section, int notcurrent)
if (msymbol != NULL)
if (MSYMBOL_TYPE (msymbol) == mst_solib_trampoline)
{
- mfunsym = lookup_minimal_symbol_text (SYMBOL_LINKAGE_NAME (msymbol), NULL, NULL);
+ mfunsym = lookup_minimal_symbol_text (SYMBOL_LINKAGE_NAME (msymbol),
+ NULL, NULL);
if (mfunsym == NULL)
/* I eliminated this warning since it is coming out
* in the following situation:
@@ -2108,12 +2095,12 @@ find_pc_sect_line (CORE_ADDR pc, struct sec *section, int notcurrent)
* so of course we can't find the real func/line info,
* but the "break" still works, and the warning is annoying.
* So I commented out the warning. RT */
- /* warning ("In stub for %s; unable to find real function/line info", DEPRECATED_SYMBOL_NAME (msymbol)) */ ;
+ /* warning ("In stub for %s; unable to find real function/line info", SYMBOL_LINKAGE_NAME (msymbol)) */ ;
/* fall through */
else if (SYMBOL_VALUE (mfunsym) == SYMBOL_VALUE (msymbol))
/* Avoid infinite recursion */
/* See above comment about why warning is commented out */
- /* warning ("In stub for %s; unable to find real function/line info", DEPRECATED_SYMBOL_NAME (msymbol)) */ ;
+ /* warning ("In stub for %s; unable to find real function/line info", SYMBOL_LINKAGE_NAME (msymbol)) */ ;
/* fall through */
else
return find_pc_line (SYMBOL_VALUE (mfunsym), 0);
@@ -3310,12 +3297,12 @@ rbreak_command (char *regexp, int from_tty)
{
if (p->msymbol == NULL)
{
- char *string = (char *) alloca (strlen (p->symtab->filename)
- + strlen (DEPRECATED_SYMBOL_NAME (p->symbol))
- + 4);
+ char *string = alloca (strlen (p->symtab->filename)
+ + strlen (SYMBOL_LINKAGE_NAME (p->symbol))
+ + 4);
strcpy (string, p->symtab->filename);
strcat (string, ":'");
- strcat (string, DEPRECATED_SYMBOL_NAME (p->symbol));
+ strcat (string, SYMBOL_LINKAGE_NAME (p->symbol));
strcat (string, "'");
break_command (string, from_tty);
print_symbol_info (FUNCTIONS_DOMAIN,
@@ -3326,7 +3313,7 @@ rbreak_command (char *regexp, int from_tty)
}
else
{
- break_command (DEPRECATED_SYMBOL_NAME (p->msymbol), from_tty);
+ break_command (SYMBOL_LINKAGE_NAME (p->msymbol), from_tty);
printf_filtered ("<function, no debug info> %s;\n",
SYMBOL_PRINT_NAME (p->msymbol));
}
@@ -3343,17 +3330,8 @@ static int return_val_index;
static char **return_val;
#define COMPLETION_LIST_ADD_SYMBOL(symbol, sym_text, len, text, word) \
- do { \
- if (SYMBOL_DEMANGLED_NAME (symbol) != NULL) \
- /* Put only the mangled name on the list. */ \
- /* Advantage: "b foo<TAB>" completes to "b foo(int, int)" */ \
- /* Disadvantage: "b foo__i<TAB>" doesn't complete. */ \
- completion_list_add_name \
- (SYMBOL_DEMANGLED_NAME (symbol), (sym_text), (len), (text), (word)); \
- else \
completion_list_add_name \
- (DEPRECATED_SYMBOL_NAME (symbol), (sym_text), (len), (text), (word)); \
- } while (0)
+ (SYMBOL_NATURAL_NAME (symbol), (sym_text), (len), (text), (word))
/* Test to see if the symbol specified by SYMNAME (which is already
demangled for C++ symbols) matches SYM_TEXT in the first SYM_TEXT_LEN
@@ -3524,14 +3502,14 @@ language_search_unquoted_string (char *text, char *p)
char **
make_symbol_completion_list (char *text, char *word)
{
- register struct symbol *sym;
- register struct symtab *s;
- register struct partial_symtab *ps;
- register struct minimal_symbol *msymbol;
- register struct objfile *objfile;
- register struct block *b, *surrounding_static_block = 0;
+ struct symbol *sym;
+ struct symtab *s;
+ struct partial_symtab *ps;
+ struct minimal_symbol *msymbol;
+ struct objfile *objfile;
+ struct block *b, *surrounding_static_block = 0;
struct dict_iterator iter;
- register int j;
+ int j;
struct partial_symbol **psym;
/* The symbol we are completing on. Points in same buffer as text. */
char *sym_text;
@@ -3655,12 +3633,13 @@ make_symbol_completion_list (char *text, char *word)
text string. Only complete on types visible from current context. */
ALL_BLOCK_SYMBOLS (b, iter, sym)
- {
- COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word);
- if (SYMBOL_CLASS (sym) == LOC_TYPEDEF)
- {
- struct type *t = SYMBOL_TYPE (sym);
- enum type_code c = TYPE_CODE (t);
+ {
+ QUIT;
+ COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word);
+ if (SYMBOL_CLASS (sym) == LOC_TYPEDEF)
+ {
+ struct type *t = SYMBOL_TYPE (sym);
+ enum type_code c = TYPE_CODE (t);
if (c == TYPE_CODE_UNION || c == TYPE_CODE_STRUCT)
{
@@ -3686,9 +3665,9 @@ make_symbol_completion_list (char *text, char *word)
QUIT;
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK);
ALL_BLOCK_SYMBOLS (b, iter, sym)
- {
- COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word);
- }
+ {
+ COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word);
+ }
}
ALL_SYMTABS (objfile, s)
@@ -3699,9 +3678,9 @@ make_symbol_completion_list (char *text, char *word)
if (b == surrounding_static_block)
continue;
ALL_BLOCK_SYMBOLS (b, iter, sym)
- {
- COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word);
- }
+ {
+ COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word);
+ }
}
return (return_val);
@@ -3796,15 +3775,15 @@ make_file_symbol_completion_list (char *text, char *word, char *srcfile)
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK);
ALL_BLOCK_SYMBOLS (b, iter, sym)
- {
- COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word);
- }
+ {
+ COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word);
+ }
b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK);
ALL_BLOCK_SYMBOLS (b, iter, sym)
- {
- COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word);
- }
+ {
+ COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word);
+ }
return (return_val);
}
@@ -4042,280 +4021,6 @@ in_prologue (CORE_ADDR pc, CORE_ADDR func_start)
return func_addr <= pc && pc < sal.end;
}
-
-/* Begin overload resolution functions */
-
-char *
-remove_params (const char *demangled_name)
-{
- const char *argp;
- char *new_name;
- int depth;
-
- if (demangled_name == NULL)
- return NULL;
-
- /* First find the end of the arg list. */
- argp = strrchr (demangled_name, ')');
- if (argp == NULL)
- return NULL;
-
- /* Back up to the beginning. */
- depth = 1;
-
- while (argp-- > demangled_name)
- {
- if (*argp == ')')
- depth ++;
- else if (*argp == '(')
- {
- depth --;
-
- if (depth == 0)
- break;
- }
- }
- if (depth != 0)
- internal_error (__FILE__, __LINE__,
- "bad demangled name %s\n", demangled_name);
- while (argp[-1] == ' ' && argp > demangled_name)
- argp --;
-
- new_name = xmalloc (argp - demangled_name + 1);
- memcpy (new_name, demangled_name, argp - demangled_name);
- new_name[argp - demangled_name] = '\0';
- return new_name;
-}
-
-/* Helper routine for make_symbol_completion_list. */
-
-static int sym_return_val_size;
-static int sym_return_val_index;
-static struct symbol **sym_return_val;
-
-/* Test to see if the symbol specified by SYMNAME (which is already
- demangled for C++ symbols) matches SYM_TEXT in the first SYM_TEXT_LEN
- characters. If so, add it to the current completion list. */
-
-static void
-overload_list_add_symbol (struct symbol *sym, const char *oload_name)
-{
- int newsize;
- int i;
- char *sym_name;
-
- /* If there is no type information, we can't do anything, so skip */
- if (SYMBOL_TYPE (sym) == NULL)
- return;
-
- /* skip any symbols that we've already considered. */
- for (i = 0; i < sym_return_val_index; ++i)
- if (!strcmp (DEPRECATED_SYMBOL_NAME (sym), DEPRECATED_SYMBOL_NAME (sym_return_val[i])))
- return;
-
- /* Get the demangled name without parameters */
- sym_name = remove_params (SYMBOL_DEMANGLED_NAME (sym));
- if (!sym_name)
- return;
-
- /* skip symbols that cannot match */
- if (strcmp (sym_name, oload_name) != 0)
- {
- xfree (sym_name);
- return;
- }
-
- xfree (sym_name);
-
- /* We have a match for an overload instance, so add SYM to the current list
- * of overload instances */
- if (sym_return_val_index + 3 > sym_return_val_size)
- {
- newsize = (sym_return_val_size *= 2) * sizeof (struct symbol *);
- sym_return_val = (struct symbol **) xrealloc ((char *) sym_return_val, newsize);
- }
- sym_return_val[sym_return_val_index++] = sym;
- sym_return_val[sym_return_val_index] = NULL;
-}
-
-/* Return a null-terminated list of pointers to function symbols that
- match name of the supplied symbol FSYM and that occur within the
- namespace given by the initial substring of NAMESPACE_NAME of
- length NAMESPACE_LEN. Apply using directives from BLOCK. This is
- used in finding all overloaded instances of a function name. This
- has been modified from make_symbol_completion_list. */
-
-/* FIXME: carlton/2003-01-30: Should BLOCK be here? Maybe it's better
- to use get_selected_block (0). */
-
-struct symbol **
-make_symbol_overload_list (const char *func_name,
- const char *namespace,
- const struct block *block)
-{
- struct cleanup *old_cleanups;
-
- sym_return_val_size = 100;
- sym_return_val_index = 0;
- sym_return_val = xmalloc ((sym_return_val_size + 1) *
- sizeof (struct symbol *));
- sym_return_val[0] = NULL;
-
- old_cleanups = make_cleanup (xfree, sym_return_val);
-
- make_symbol_overload_list_using (func_name, namespace,
- block);
-
- discard_cleanups (old_cleanups);
-
- return sym_return_val;
-}
-
-/* This applies the using directives to add namespaces to search in,
- and then searches for overloads in all of those namespaces. It
- adds the symbols found to sym_return_val. Arguments are as in
- make_symbol_overload_list. */
-
-static void
-make_symbol_overload_list_using (const char *func_name,
- const char *namespace,
- const struct block *block)
-{
- const struct using_direct *current;
-
- /* First, go through the using directives. If any of them apply,
- look in the appropriate namespaces for new functions to match
- on. */
-
- for (current = block_using (block);
- current != NULL;
- current = current->next)
- {
- if (strcmp (namespace, current->outer) == 0)
- {
- make_symbol_overload_list_using (func_name,
- current->inner,
- block);
- }
- }
-
- /* Now, add names for this namespace. */
-
- if (namespace[0] == '\0')
- {
- make_symbol_overload_list_qualified (func_name);
- }
- else
- {
- char *concatenated_name
- = alloca (strlen (namespace) + 2 + strlen (func_name) + 1);
- strcpy (concatenated_name, namespace);
- strcat (concatenated_name, "::");
- strcat (concatenated_name, func_name);
- make_symbol_overload_list_qualified (concatenated_name);
- }
-}
-
-/* This does the bulk of the work of finding overloaded symbols.
- FUNC_NAME is the name of the overloaded function we're looking for
- (possibly including namespace info); NEW_LIST is 1 if we should
- allocate a new list of overloads and 0 if we should continue using
- the same old list. */
-
-static void
-make_symbol_overload_list_qualified (const char *func_name)
-{
- struct symbol *sym;
- struct symtab *s;
- struct objfile *objfile;
- const struct block *b, *surrounding_static_block = 0;
- struct dict_iterator iter;
- const struct dictionary *dict;
-
- /* Look through the partial symtabs for all symbols which begin
- by matching FUNC_NAME. Make sure we read that symbol table in. */
-
- read_in_psymtabs (func_name);
-
- /* Search upwards from currently selected frame (so that we can
- complete on local vars. */
-
- for (b = get_selected_block (0); b != NULL; b = BLOCK_SUPERBLOCK (b))
- {
- dict = BLOCK_DICT (b);
-
- for (sym = dict_iter_name_first (dict, func_name, &iter);
- sym;
- sym = dict_iter_name_next (func_name, &iter))
- {
- overload_list_add_symbol (sym, func_name);
- }
- }
-
- surrounding_static_block = block_static_block (get_selected_block (0));
-
- /* Go through the symtabs and check the externs and statics for
- symbols which match. */
-
- /* FIXME: carlton/2003-01-30: Why are we checking all the statics?
- Also, this shouldn't check all the globals if there's an
- anonymous namespace involved somewhere. */
-
- ALL_SYMTABS (objfile, s)
- {
- QUIT;
- b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK);
- dict = BLOCK_DICT (b);
-
- for (sym = dict_iter_name_first (dict, func_name, &iter);
- sym;
- sym = dict_iter_name_next (func_name, &iter))
- {
- overload_list_add_symbol (sym, func_name);
- }
- }
-
- ALL_SYMTABS (objfile, s)
- {
- QUIT;
- b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK);
- /* Don't do this block twice. */
- if (b == surrounding_static_block)
- continue;
- dict = BLOCK_DICT (b);
-
- for (sym = dict_iter_name_first (dict, func_name, &iter);
- sym;
- sym = dict_iter_name_next (func_name, &iter))
- {
- overload_list_add_symbol (sym, func_name);
- }
- }
-}
-
-/* Look through the partial symtabs for all symbols which begin
- by matching FUNC_NAME. Make sure we read that symbol table in. */
-
-static void
-read_in_psymtabs (const char *func_name)
-{
- struct partial_symtab *ps;
- struct objfile *objfile;
-
- ALL_PSYMTABS (objfile, ps)
- {
- if (ps->readin)
- continue;
-
- if ((lookup_partial_symbol (ps, func_name, NULL, 1, VAR_DOMAIN)
- != NULL)
- || (lookup_partial_symbol (ps, func_name, NULL, 0, VAR_DOMAIN)
- != NULL))
- psymtab_to_symtab (ps);
- }
-}
-
-/* End of overload resolution functions */
struct symtabs_and_lines
decode_line_spec (char *string, int funfirstline)
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 42d42f2204f..40bea1413b2 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -398,8 +398,9 @@ enum address_class
/* Value is in register number SYMBOL_VALUE. Just like LOC_REGISTER
except this is an argument. Probably the cleaner way to handle
this would be to separate address_class (which would include
- separate ARG and LOCAL to deal with FRAME_ARGS_ADDRESS versus
- FRAME_LOCALS_ADDRESS), and an is_argument flag.
+ separate ARG and LOCAL to deal with the frame's arguments
+ (get_frame_args_address) versus the frame's locals
+ (get_frame_locals_address), and an is_argument flag.
For some symbol formats (stabs, for some compilers at least),
the compiler generates two symbols, an argument and a register.
@@ -443,9 +444,9 @@ enum address_class
/* Value is arg at SYMBOL_VALUE offset in stack frame. Differs from
LOC_LOCAL in that symbol is an argument; differs from LOC_ARG in
- that we find it in the frame (FRAME_LOCALS_ADDRESS), not in the
- arglist (FRAME_ARGS_ADDRESS). Added for i960, which passes args
- in regs then copies to frame. */
+ that we find it in the frame (get_frame_locals_address), not in
+ the arglist (get_frame_args_address). Added for i960, which
+ passes args in regs then copies to frame. */
LOC_LOCAL_ARG,
@@ -749,9 +750,6 @@ struct section_offsets
(sizeof (struct section_offsets) \
+ sizeof (((struct section_offsets *) 0)->offsets) * ((n)-1))
-/* The maximum possible size of a section_offsets table. */
-#define SIZEOF_SECTION_OFFSETS (SIZEOF_N_SECTION_OFFSETS (SECT_OFF_MAX))
-
/* Each source file or header is represented by a struct symtab.
These objects are chained through the `next' field. */
@@ -1050,6 +1048,13 @@ extern struct symbol *lookup_symbol_aux_block (const char *name,
const domain_enum domain,
struct symtab **symtab);
+/* Lookup a partial symbol. */
+
+extern struct partial_symbol *lookup_partial_symbol (struct partial_symtab *,
+ const char *,
+ const char *, int,
+ domain_enum);
+
/* lookup a symbol by name, within a specified block */
extern struct symbol *lookup_block_symbol (const struct block *, const char *,
@@ -1320,12 +1325,6 @@ extern char **make_symbol_completion_list (char *, char *);
extern char **make_file_symbol_completion_list (char *, char *, char *);
-extern char *remove_params (const char *demangled_name);
-
-extern struct symbol **make_symbol_overload_list (const char *,
- const char *,
- const struct block *);
-
extern char **make_source_files_completion_list (char *, char *);
/* symtab.c */
diff --git a/gdb/target.c b/gdb/target.c
index fd0165a19ba..e7382081b9b 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -95,6 +95,8 @@ static void debug_to_attach (char *, int);
static void debug_to_detach (char *, int);
+static void debug_to_disconnect (char *, int);
+
static void debug_to_resume (ptid_t, int, enum target_signal);
static ptid_t debug_to_wait (ptid_t, struct target_waitstatus *);
@@ -371,6 +373,9 @@ cleanup_target (struct target_ops *t)
de_fault (to_detach,
(void (*) (char *, int))
target_ignore);
+ de_fault (to_disconnect,
+ (void (*) (char *, int))
+ tcomplain);
de_fault (to_resume,
(void (*) (ptid_t, int, enum target_signal))
noprocess);
@@ -556,6 +561,7 @@ update_current_target (void)
INHERIT (to_attach, t);
INHERIT (to_post_attach, t);
INHERIT (to_detach, t);
+ INHERIT (to_disconnect, t);
INHERIT (to_resume, t);
INHERIT (to_wait, t);
INHERIT (to_post_wait, t);
@@ -1141,6 +1147,16 @@ target_detach (char *args, int from_tty)
}
void
+target_disconnect (char *args, int from_tty)
+{
+ /* Handle any optimized stores to the inferior. */
+#ifdef DO_DEFERRED_STORES
+ DO_DEFERRED_STORES;
+#endif
+ (current_target.to_disconnect) (args, from_tty);
+}
+
+void
target_link (char *modname, CORE_ADDR *t_reloc)
{
if (STREQ (current_target.to_shortname, "rombug"))
@@ -1562,6 +1578,15 @@ debug_to_detach (char *args, int from_tty)
}
static void
+debug_to_disconnect (char *args, int from_tty)
+{
+ debug_target.to_disconnect (args, from_tty);
+
+ fprintf_unfiltered (gdb_stdlog, "target_disconnect (%s, %d)\n",
+ args, from_tty);
+}
+
+static void
debug_to_resume (ptid_t ptid, int step, enum target_signal siggnal)
{
debug_target.to_resume (ptid, step, siggnal);
@@ -2202,6 +2227,7 @@ setup_target_debug (void)
current_target.to_attach = debug_to_attach;
current_target.to_post_attach = debug_to_post_attach;
current_target.to_detach = debug_to_detach;
+ current_target.to_disconnect = debug_to_disconnect;
current_target.to_resume = debug_to_resume;
current_target.to_wait = debug_to_wait;
current_target.to_post_wait = debug_to_post_wait;
diff --git a/gdb/target.h b/gdb/target.h
index cd822799ed6..a3e10e8ddd0 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -198,6 +198,7 @@ struct target_ops
void (*to_attach) (char *, int);
void (*to_post_attach) (int);
void (*to_detach) (char *, int);
+ void (*to_disconnect) (char *, int);
void (*to_resume) (ptid_t, int, enum target_signal);
ptid_t (*to_wait) (ptid_t, struct target_waitstatus *);
void (*to_post_wait) (ptid_t, int);
@@ -414,6 +415,11 @@ extern struct target_stack_item *target_stack;
extern void target_detach (char *, int);
+/* Disconnect from the current target without resuming it (leaving it
+ waiting for a debugger). */
+
+extern void target_disconnect (char *, int);
+
/* Resume execution of the target process PTID. STEP says whether to
single-step or to run free; SIGGNAL is the signal to be given to
the target, or TARGET_SIGNAL_0 for no signal. The caller may not
@@ -945,12 +951,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 862a9245e44..36de27ac9fd 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,137 @@
+2003-06-24 Joel Brobecker <brobecker@gnat.com>
+
+ * gdb.base/bang.exp: New testcase.
+
+2003-06-23 Joel Brobecker <brobecker@gnat.com>
+
+ * gdb.base/langs.exp: Add some tests for the "minimal" language
+ support.
+
+2003-06-23 Elena Zannoni <ezannoni@redhat.com>
+
+ * gdb.objc/basicclass.exp: Return -1 if we cannot compile
+ the testcase.
+
+2003-06-22 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.base/relocate.exp: Test add-symbol-file with a variable
+ offset.
+
+2003-06-22 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.c++/pr-1210.cc: New file.
+ * gdb.c++/pr-1210.exp: New file.
+
+2003-06-21 Daniel Jacobowitz <drow@mvista.com>
+
+ * lib/mi-support.exp (mi_run_cmd): Expect an MI response to
+ 000-exec-continue.
+
+2003-06-15 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.base/attach.exp: Use -1 for the ID of a nonexistent process
+ on *-*-*bsd* instead of *-*-freebsd*.
+
+2003-06-14 Andrew Cagney <cagney@redhat.com>
+
+ * gdb.base/store.exp: Test longest and doublest. Test all
+ parameters. Weaken return statement match.
+ * gdb.base/store.c: Add longest and doublest - aka long long and
+ long double functions. Put all parameters into local register
+ variables. Use negative values.
+
+2003-06-14 Andrew Cagney <cagney@redhat.com>
+
+ * gdb.base/fileio.c: Include <errno.h>, and <sys/wait.h>. Gag
+ -Wformat errors. Add lost line. Use WEXITSTATUS to get system
+ exit status.
+ * gdb.base/fileio.exp: Disable target when nointerrupts and
+ noinferiorio, instead of limiting it to remote. Use remote_exec
+ instead of system.
+
+2003-06-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ * gdb.base/float.exp: Add ia64 support.
+
+2003-06-12 Corinna Vinschen <vinschen@redhat.com>
+
+ * gdb.base/fileio.exp: Run only on remote targets.
+
+2003-06-10 Corinna Vinschen <vinschen@redhat.com>
+
+ * gdb.base/fileio.c: New file, testing File-I/O.
+ * gdb.base/fileio.exp: Ditto.
+
+2003-06-09 Raoul Gough <RaoulGough@yahoo.co.uk>
+
+ * gdb.base/shreloc.exp: New file, check symbol values obtained from
+ shared objects after relocation at load time (gdb PR/1132).
+ * gdb.base/shreloc.c, gdb.base/shreloc1.c, gdb.base/shreloc2.c:
+ as above, part of the shared object relocation test.
+
+2003-06-08 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.base/readline.exp: Add tests for operate-and-get-next with a
+ fully filled history list.
+ * gdb.base/gdb_history: New file.
+
+ * gdb.base/signals.exp: XFAIL "continue to func1" on
+ i*86-*-freebsd*.
+
+ * gdb.base/attach.exp: When trying to attach to a nonexistent
+ process, make it possible to specify the PID based on the target,
+ and do so for *-*-freebsd*.
+
+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-06-16 David Carlton <carlton@kealia.com>
* gdb.c++/namespace.exp: Add 'maint cp namespace' test.
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/attach.exp b/gdb/testsuite/gdb.base/attach.exp
index c561080f4fe..66e9f0ec311 100644
--- a/gdb/testsuite/gdb.base/attach.exp
+++ b/gdb/testsuite/gdb.base/attach.exp
@@ -106,32 +106,42 @@ proc do_attach_tests {} {
}
# Verify that we cannot attach to what appears to be a valid
- # process ID, but is a process that doesn't exist. (I don't
- # believe any process is ever assigned #0, at least on HPUX.)
+ # process ID, but is a process that doesn't exist. Traditionally,
+ # most systems didn't have a process with ID 0, so we take that as
+ # the default. However, there are a few exceptions.
#
- send_gdb "attach 0\n"
+ set boguspid 0
+ if { [istarget "*-*-*bsd*"] } {
+ # In FreeBSD 5.0, PID 0 is used for "swapper". Use -1 instead
+ # (which should have the desired effect on any version of
+ # FreeBSD, and probably other *BSD's too).
+ set boguspid -1
+ }
+ send_gdb "attach $boguspid\n"
gdb_expect {
- -re "Attaching to.*, process 0.*No such process.*$gdb_prompt $"\
- {
- # Response expected on HP-UX 10.20 (i.e., ptrace-based).
- pass "attach to nonexistent process is prohibited"
- }
- -re "Attaching to.*, process 0 failed.*Hint.*$gdb_prompt $"\
- {
- # Response expected on HP-UX 11.0 (i.e., ttrace-based).
- pass "attach to nonexistent process is prohibited"
- }
- -re "Attaching to.*, process 0.*denied.*$gdb_prompt $"\
- {pass "attach to nonexistent process is prohibited"}
- -re "Attaching to.*, process 0.*Operation not permitted.*$gdb_prompt $"\
- {pass "attach to nonexistent process is prohibited"}
- -re "Attaching to.*, process .*couldn't open /proc file.*$gdb_prompt $"\
- {
- # Response expected from /proc-based systems.
- pass "attach to nonexistent process is prohibited"
- }
- -re "$gdb_prompt $" {fail "attach to nonexistent process is prohibited"}
- timeout {fail "(timeout) attach to nonexistent process is prohibited"}
+ -re "Attaching to.*, process $boguspid.*No such process.*$gdb_prompt $"\
+ {
+ # Response expected on ptrace-based systems (i.e. HP-UX 10.20).
+ pass "attach to nonexistent process is prohibited"
+ }
+ -re "Attaching to.*, process $boguspid failed.*Hint.*$gdb_prompt $"\
+ {
+ # Response expected on ttrace-based systems (i.e. HP-UX 11.0).
+ pass "attach to nonexistent process is prohibited"
+ }
+ -re "Attaching to.*, process $boguspid.*denied.*$gdb_prompt $"\
+ {pass "attach to nonexistent process is prohibited"}
+ -re "Attaching to.*, process $boguspid.*not permitted.*$gdb_prompt $"\
+ {pass "attach to nonexistent process is prohibited"}
+ -re "Attaching to.*, process .*couldn't open /proc file.*$gdb_prompt $"\
+ {
+ # Response expected from /proc-based systems.
+ pass "attach to nonexistent process is prohibited"
+ }
+ -re "$gdb_prompt $" {fail "attach to nonexistent process is prohibited"}
+ timeout {
+ fail "(timeout) attach to nonexistent process is prohibited"
+ }
}
# Verify that we can attach to the process by first giving its
diff --git a/gdb/testsuite/gdb.base/bang.exp b/gdb/testsuite/gdb.base/bang.exp
new file mode 100644
index 00000000000..f5840741f6b
--- /dev/null
+++ b/gdb/testsuite/gdb.base/bang.exp
@@ -0,0 +1,41 @@
+# 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 is a test that verifies that GDB is able to "run" when the name
+# of the executable file contains a '!'.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set testfile "args"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/bang!
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
+ 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}
+
+# Verify that we can run the program and that it terminates normally.
+gdb_test "run" \
+ ".*Program exited normally\." \
+ "run program"
+
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/fileio.c b/gdb/testsuite/gdb.base/fileio.c
new file mode 100644
index 00000000000..591b3b67588
--- /dev/null
+++ b/gdb/testsuite/gdb.base/fileio.c
@@ -0,0 +1,503 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/errno.h>
+#include <sys/types.h>
+#include <sys/fcntl.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <errno.h>
+#include <sys/wait.h>
+/* TESTS :
+ * - open(const char *pathname, int flags, mode_t mode);
+1) Attempt to create file that already exists - EEXIST
+2) Attempt to open a directory for writing - EISDIR
+3) Pathname does not exist - ENOENT
+4) Open for write but no write permission - EACCES
+
+read(int fd, void *buf, size_t count);
+1) Read using invalid file descriptor - EBADF
+
+write(int fd, const void *buf, size_t count);
+1) Write using invalid file descriptor - EBADF
+2) Attempt to write to read-only file - EBADF
+
+lseek(int fildes, off_t offset, int whence);
+1) Seeking on an invalid file descriptor - EBADF
+2) Invalid "whence" (3rd param) value - EINVAL
+
+close(int fd);
+1) Attempt to close an invalid file descriptor - EBADF
+
+stat(const char *file_name, struct stat *buf);
+1) Pathname is a null string - ENOENT
+2) Pathname does not exist - ENOENT
+
+fstat(int filedes, struct stat *buf);
+1) Attempt to stat using an invalid file descriptor - EBADF
+
+isatty (int desc);
+Not applicable. We will test that it returns 1 when expected and a case
+where it should return 0.
+
+rename(const char *oldpath, const char *newpath);
+1) newpath is an existing directory, but oldpath is not a directory. - EISDIR
+2) newpath is a non-empty directory. - ENOTEMPTY or EEXIST
+3) newpath is a subdirectory of old path. - EINVAL
+4) oldpath does not exist. - ENOENT
+
+unlink(const char *pathname);
+1) pathname does not have write access. - EACCES
+2) pathname does not exist. - ENOENT
+
+time(time_t *t);
+Not applicable.
+
+system (const char * string);
+1) Invalid string/command. - returns 127. */
+
+static const char *strerrno (int err);
+
+#define FILENAME "foo.fileio.test"
+#define RENAMED "bar.fileio.test"
+#define NONEXISTANT "nofoo.fileio.test"
+#define NOWRITE "nowrt.fileio.test"
+#define TESTDIR1 "dir1.fileio.test"
+#define TESTDIR2 "dir2.fileio.test"
+#define TESTSUBDIR "dir1.fileio.test/subdir.fileio.test"
+
+#define STRING "Hello World"
+
+int
+test_open ()
+{
+ int ret;
+
+ /* Test opening */
+ errno = 0;
+ ret = open (FILENAME, O_CREAT | O_TRUNC | O_RDONLY, S_IWUSR | S_IRUSR);
+ printf ("open 1: ret = %d, errno = %d %s\n", ret, errno,
+ ret >= 0 ? "OK" : "");
+ if (ret >= 0)
+ close (ret);
+ /* Creating an already existing file (created by fileio.exp) */
+ errno = 0;
+ ret = open (FILENAME, O_CREAT | O_EXCL | O_WRONLY, S_IWUSR | S_IRUSR);
+ printf ("open 2: ret = %d, errno = %d %s\n", ret, errno,
+ strerrno (errno));
+ if (ret >= 0)
+ close (ret);
+ /* Open directory (for writing) */
+ errno = 0;
+ ret = open (".", O_WRONLY);
+ printf ("open 3: ret = %d, errno = %d %s\n", ret, errno,
+ strerrno (errno));
+ if (ret >= 0)
+ close (ret);
+ /* Opening nonexistant file */
+ errno = 0;
+ ret = open (NONEXISTANT, O_RDONLY);
+ printf ("open 4: ret = %d, errno = %d %s\n", ret, errno,
+ strerrno (errno));
+ if (ret >= 0)
+ close (ret);
+ /* Open for write but no write permission */
+ errno = 0;
+ ret = open (NOWRITE, O_CREAT | O_RDONLY, S_IRUSR | S_IWUSR);
+ if (ret >= 0)
+ {
+ close (ret);
+ errno = 0;
+ ret = open (NOWRITE, O_WRONLY);
+ printf ("open 5: ret = %d, errno = %d %s\n", ret, errno,
+ strerrno (errno));
+ if (ret >= 0)
+ close (ret);
+ }
+ else
+ printf ("open 5: ret = %d, errno = %d\n", ret, errno);
+}
+
+int
+test_write ()
+{
+ int fd, ret;
+
+ /* Test writing */
+ errno = 0;
+ fd = open (FILENAME, O_WRONLY);
+ if (fd >= 0)
+ {
+ errno = 0;
+ ret = write (fd, STRING, strlen (STRING));
+ printf ("write 1: ret = %d, errno = %d %s\n", ret, errno,
+ ret == strlen (STRING) ? "OK" : "");
+ close (fd);
+ }
+ else
+ printf ("write 1: ret = %d, errno = %d\n", ret, errno);
+ /* Write using invalid file descriptor */
+ errno = 0;
+ ret = write (999, STRING, strlen (STRING));
+ printf ("write 2: ret = %d, errno = %d, %s\n", ret, errno,
+ strerrno (errno));
+ /* Write to a read-only file */
+ errno = 0;
+ fd = open (FILENAME, O_RDONLY);
+ if (fd >= 0)
+ {
+ errno = 0;
+ ret = write (fd, STRING, strlen (STRING));
+ printf ("write 3: ret = %d, errno = %d %s\n", ret, errno,
+ strerrno (errno));
+ }
+ else
+ printf ("write 3: ret = %d, errno = %d\n", ret, errno);
+}
+
+int
+test_read ()
+{
+ int fd, ret;
+ char buf[16];
+
+ /* Test reading */
+ errno = 0;
+ fd = open (FILENAME, O_RDONLY);
+ if (fd >= 0)
+ {
+ memset (buf, 0, 16);
+ errno = 0;
+ ret = read (fd, buf, 16);
+ buf[15] = '\0'; /* Don't trust anybody... */
+ if (ret == strlen (STRING))
+ printf ("read 1: %s %s\n", buf, !strcmp (buf, STRING) ? "OK" : "");
+ else
+ printf ("read 1: ret = %d, errno = %d\n", ret, errno);
+ close (fd);
+ }
+ else
+ printf ("read 1: ret = %d, errno = %d\n", ret, errno);
+ /* Read using invalid file descriptor */
+ errno = 0;
+ ret = read (999, buf, 16);
+ printf ("read 2: ret = %d, errno = %d %s\n", ret, errno,
+ strerrno (errno));
+}
+
+int
+test_lseek ()
+{
+ int fd;
+ off_t ret = 0;
+
+ /* Test seeking */
+ errno = 0;
+ fd = open (FILENAME, O_RDONLY);
+ if (fd >= 0)
+ {
+ errno = 0;
+ ret = lseek (fd, 0, SEEK_CUR);
+ printf ("lseek 1: ret = %ld, errno = %d, %s\n", (long) ret, errno,
+ ret == 0 ? "OK" : "");
+ errno = 0;
+ ret = lseek (fd, 0, SEEK_END);
+ printf ("lseek 2: ret = %ld, errno = %d, %s\n", (long) ret, errno,
+ ret == 11 ? "OK" : "");
+ errno = 0;
+ ret = lseek (fd, 3, SEEK_SET);
+ printf ("lseek 3: ret = %ld, errno = %d, %s\n", (long) ret, errno,
+ ret == 3 ? "OK" : "");
+ close (fd);
+ }
+ else
+ {
+ printf ("lseek 1: ret = %d, errno = %d\n", ret, errno);
+ printf ("lseek 2: ret = %d, errno = %d\n", ret, errno);
+ printf ("lseek 3: ret = %d, errno = %d\n", ret, errno);
+ }
+ /* Seeking on an invalid file descriptor */
+
+}
+
+int
+test_close ()
+{
+ int fd, ret;
+
+ /* Test close */
+ errno = 0;
+ fd = open (FILENAME, O_RDONLY);
+ if (fd >= 0)
+ {
+ errno = 0;
+ ret = close (fd);
+ printf ("close 1: ret = %d, errno = %d, %s\n", ret, errno,
+ ret == 0 ? "OK" : "");
+ }
+ else
+ printf ("close 1: ret = %d, errno = %d\n", ret, errno);
+ /* Close an invalid file descriptor */
+ errno = 0;
+ ret = close (999);
+ printf ("close 2: ret = %d, errno = %d, %s\n", ret, errno,
+ strerrno (errno));
+}
+
+int
+test_stat ()
+{
+ int ret;
+ struct stat st;
+
+ /* Test stat */
+ errno = 0;
+ ret = stat (FILENAME, &st);
+ if (!ret)
+ printf ("stat 1: ret = %d, errno = %d %s\n", ret, errno,
+ st.st_size == 11 ? "OK" : "");
+ else
+ printf ("stat 1: ret = %d, errno = %d\n", ret, errno);
+ /* NULL pathname */
+ errno = 0;
+ ret = stat (NULL, &st);
+ printf ("stat 2: ret = %d, errno = %d %s\n", ret, errno,
+ strerrno (errno));
+ /* Empty pathname */
+ errno = 0;
+ ret = stat ("", &st);
+ printf ("stat 3: ret = %d, errno = %d %s\n", ret, errno,
+ strerrno (errno));
+ /* Nonexistant file */
+ errno = 0;
+ ret = stat (NONEXISTANT, &st);
+ printf ("stat 4: ret = %d, errno = %d %s\n", ret, errno,
+ strerrno (errno));
+}
+
+int
+test_fstat ()
+{
+ int fd, ret;
+ struct stat st;
+
+ /* Test fstat */
+ errno = 0;
+ fd = open (FILENAME, O_RDONLY);
+ if (fd >= 0)
+ {
+ errno = 0;
+ ret = fstat (fd, &st);
+ if (!ret)
+ printf ("fstat 1: ret = %d, errno = %d %s\n", ret, errno,
+ st.st_size == 11 ? "OK" : "");
+ else
+ printf ("fstat 1: ret = %d, errno = %d\n", ret, errno);
+ close (fd);
+ }
+ else
+ printf ("fstat 1: ret = %d, errno = %d\n", ret, errno);
+ /* Fstat using invalid file descriptor */
+ errno = 0;
+ ret = fstat (999, &st);
+ printf ("fstat 2: ret = %d, errno = %d %s\n", ret, errno,
+ strerrno (errno));
+}
+
+int
+test_isatty ()
+{
+ int fd;
+
+ /* Check std I/O */
+ printf ("isatty 1: stdin %s\n", isatty (0) ? "yes OK" : "no");
+ printf ("isatty 2: stdout %s\n", isatty (1) ? "yes OK" : "no");
+ printf ("isatty 3: stderr %s\n", isatty (2) ? "yes OK" : "no");
+ /* Check invalid fd */
+ printf ("isatty 4: invalid %s\n", isatty (999) ? "yes" : "no OK");
+ /* Check open file */
+ fd = open (FILENAME, O_RDONLY);
+ if (fd >= 0)
+ {
+ printf ("isatty 5: file %s\n", isatty (fd) ? "yes" : "no OK");
+ close (fd);
+ }
+ else
+ printf ("isatty 5: file couldn't open\n");
+}
+
+
+int
+test_system ()
+{
+ /*
+ * Requires test framework to switch on "set remote system-call-allowed 1"
+ */
+ int ret;
+ char sys[512];
+
+ /* This test prepares the directory for test_rename() */
+ sprintf (sys, "mkdir -p %s %s", TESTSUBDIR, TESTDIR2);
+ ret = system (sys);
+ if (ret == 127)
+ printf ("system 1: ret = %d /bin/sh unavailable???\n", ret);
+ else
+ printf ("system 1: ret = %d %s\n", ret, ret == 0 ? "OK" : "");
+ /* Invalid command (just guessing ;-) ) */
+ ret = system ("wrtzlpfrmpft");
+ printf ("system 2: ret = %d %s\n", ret, WEXITSTATUS (ret) == 127 ? "OK" : "");
+}
+
+int
+test_rename ()
+{
+ int ret;
+ struct stat st;
+
+ /* Test rename */
+ errno = 0;
+ ret = rename (FILENAME, RENAMED);
+ if (!ret)
+ {
+ errno = 0;
+ ret = stat (FILENAME, &st);
+ if (ret && errno == ENOENT)
+ {
+ errno = 0;
+ ret = stat (RENAMED, &st);
+ printf ("rename 1: ret = %d, errno = %d %s\n", ret, errno,
+ strerrno (errno));
+ errno = 0;
+ }
+ else
+ printf ("rename 1: ret = %d, errno = %d\n", ret, errno);
+ }
+ else
+ printf ("rename 1: ret = %d, errno = %d\n", ret, errno);
+ /* newpath is existing directory, oldpath is not a directory */
+ errno = 0;
+ ret = rename (RENAMED, TESTDIR2);
+ printf ("rename 2: ret = %d, errno = %d %s\n", ret, errno,
+ strerrno (errno));
+ /* newpath is a non-empty directory */
+ errno = 0;
+ ret = rename (TESTDIR2, TESTDIR1);
+ printf ("rename 3: ret = %d, errno = %d %s\n", ret, errno,
+ strerrno (errno));
+ /* newpath is a subdirectory of old path */
+ errno = 0;
+ ret = rename (TESTDIR1, TESTSUBDIR);
+ printf ("rename 4: ret = %d, errno = %d %s\n", ret, errno,
+ strerrno (errno));
+ /* oldpath does not exist */
+ errno = 0;
+ ret = rename (NONEXISTANT, FILENAME);
+ printf ("rename 5: ret = %d, errno = %d %s\n", ret, errno,
+ strerrno (errno));
+}
+
+int
+test_unlink ()
+{
+ int ret;
+ char name[256];
+ char sys[512];
+
+ /* Test unlink */
+ errno = 0;
+ ret = unlink (RENAMED);
+ printf ("unlink 1: ret = %d, errno = %d %s\n", ret, errno,
+ strerrno (errno));
+ /* No write access */
+ sprintf (name, "%s/%s", TESTDIR2, FILENAME);
+ errno = 0;
+ ret = open (name, O_CREAT | O_RDONLY, S_IRUSR | S_IWUSR);
+ if (ret >= 0)
+ {
+ sprintf (sys, "chmod -w %s", TESTDIR2);
+ ret = system (sys);
+ if (!ret)
+ {
+ errno = 0;
+ ret = unlink (name);
+ printf ("unlink 2: ret = %d, errno = %d %s\n", ret, errno,
+ strerrno (errno));
+ }
+ else
+ printf ("unlink 2: ret = %d chmod failed\n", ret, errno);
+ }
+ else
+ printf ("unlink 2: ret = %d, errno = %d\n", ret, errno);
+ /* pathname doesn't exist */
+ errno = 0;
+ ret = unlink (NONEXISTANT);
+ printf ("unlink 3: ret = %d, errno = %d %s\n", ret, errno,
+ strerrno (errno));
+}
+
+int
+test_time ()
+{
+ time_t ret, t;
+
+ errno = 0;
+ ret = time (&t);
+ printf ("time 1: ret = %ld, errno = %d, t = %ld %s\n", (long) ret, errno, (long) t, ret == t ? "OK" : "");
+ errno = 0;
+ ret = time (NULL);
+ printf ("time 2: ret = %ld, errno = %d, t = %ld %s\n",
+ (long) ret, errno, (long) t, ret >= t && ret < t + 10 ? "OK" : "");
+}
+
+static const char *
+strerrno (int err)
+{
+ switch (err)
+ {
+ case 0: return "OK";
+#ifdef EACCES
+ case EACCES: return "EACCES";
+#endif
+#ifdef EBADF
+ case EBADF: return "EBADF";
+#endif
+#ifdef EEXIST
+ case EEXIST: return "EEXIST";
+#endif
+#ifdef EFAULT
+ case EFAULT: return "EFAULT";
+#endif
+#ifdef EINVAL
+ case EINVAL: return "EINVAL";
+#endif
+#ifdef EISDIR
+ case EISDIR: return "EISDIR";
+#endif
+#ifdef ENOENT
+ case ENOENT: return "ENOENT";
+#endif
+#ifdef ENOTEMPTY
+ case ENOTEMPTY: return "ENOTEMPTY";
+#endif
+ default: return "E??";
+ }
+}
+
+int
+main ()
+{
+ /* Don't change the order of the calls. They partly depend on each other */
+ test_open ();
+ test_write ();
+ test_read ();
+ test_lseek ();
+ test_close ();
+ test_stat ();
+ test_fstat ();
+ test_isatty ();
+ test_system ();
+ test_rename ();
+ test_unlink ();
+ test_time ();
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.base/fileio.exp b/gdb/testsuite/gdb.base/fileio.exp
new file mode 100644
index 00000000000..279f1ab271c
--- /dev/null
+++ b/gdb/testsuite/gdb.base/fileio.exp
@@ -0,0 +1,277 @@
+# Copyright 2002
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gdb@prep.ai.mit.edu
+
+# This file was written by Corinna Vinschen <vinschen@redhat.com>
+
+if [target_info exists gdb,nointerrupts] {
+ verbose "Skipping interrupt.exp because of nointerrupts."
+ continue
+}
+
+if [target_info exists gdb,noinferiorio] {
+ verbose "Skipping interrupt.exp because of noinferiorio."
+ return
+}
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+set prms_id 0
+set bug_id 0
+
+set testfile "fileio"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+ gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+}
+
+# Create and source the file that provides information about the compiler
+# used to compile the test case.
+
+if [get_compiler_info ${binfile}] {
+ return -1;
+}
+
+remote_exec build "test -r dir2.fileio.test && chmod -f +w dir2.fileio.test"
+remote_exec build "rm -rf *.fileio.test"
+
+set oldtimeout $timeout
+set timeout [expr "$timeout + 60"]
+
+# Start with a fresh gdb.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+send_gdb "set print sevenbit-strings\n" ; gdb_expect -re "$gdb_prompt $"
+send_gdb "set print address off\n" ; gdb_expect -re "$gdb_prompt $"
+send_gdb "set width 0\n" ; gdb_expect -re "$gdb_prompt $"
+
+
+if ![runto_main] then {
+ perror "couldn't run to breakpoint"
+ continue
+}
+
+send_gdb "tbreak 81\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*open 1:.*OK.*test_open \\(\\) at.*$srcfile:81.*" \
+"Open a file"
+
+send_gdb "tbreak 88\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*open 2:.*EEXIST.*test_open \\(\\) at.*$srcfile:88.*" \
+"Creating already existing file returns EEXIST"
+
+send_gdb "tbreak 95\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*open 3:.*EISDIR.*test_open \\(\\) at.*$srcfile:95.*" \
+"Open directory for writing returns EISDIR"
+
+send_gdb "tbreak 102\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*open 4:.*ENOENT.*test_open \\(\\) at.*$srcfile:102.*" \
+"Opening nonexistant file returns ENOENT"
+
+send_gdb "tbreak 109\n" ; gdb_expect -re "$gdb_prompt $"
+send_gdb "continue\n" ; gdb_expect -re "$gdb_prompt $"
+catch "system \"chmod -f -w nowrt.fileio.test\""
+
+send_gdb "tbreak 119\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*open 5:.*EACCES.*test_open \\(\\) at.*$srcfile:119.*" \
+"Open for write but no write permission returns EACCES"
+
+send_gdb "tbreak 140\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*write 1:.*OK.*test_write \\(\\) at.*$srcfile:140.*" \
+"Writing to a file"
+
+send_gdb "tbreak 145\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*write 2:.*EBADF.*test_write \\(\\) at.*$srcfile:145.*" \
+"Write using invalid file descriptor returns EBADF"
+
+send_gdb "tbreak 156\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*write 3:.*EBADF.*test_write \\(\\) at.*$srcfile:156.*" \
+"Writing to a read-only file returns EBADF"
+
+send_gdb "tbreak 182\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*read 1:.*OK.*test_read \\(\\) at.*$srcfile:182.*" \
+"Reading from a file"
+
+send_gdb "tbreak 186\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*read 2:.*EBADF.*test_read \\(\\) at.*$srcfile:186.*" \
+"Read using invalid file descriptor returns EBADF"
+
+send_gdb "tbreak 221\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*lseek 1:.*OK.*lseek 2:.*OK.*lseek 3:.*OK.*test_lseek \\(\\) at.*$srcfile:221.*" \
+"Lseeking a file"
+
+send_gdb "tbreak 241\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*close 1:.*OK.*test_close \\(\\) at.*$srcfile:241.*" \
+"Closing a file"
+
+send_gdb "tbreak 245\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*close 2:.*EBADF.*test_close \\(\\) at.*$srcfile:245.*" \
+"Closing an invalid file descriptor returns EBADF"
+
+send_gdb "tbreak 262\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*stat 1:.*OK.*test_stat \\(\\) at.*$srcfile:262.*" \
+"Stat a file"
+
+send_gdb "tbreak 267\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+ "Continuing\\..*stat 2:.*(ENOENT|EFAULT).*test_stat \\(\\) at.*$srcfile:267.*" \
+"Stat a NULL pathname returns ENOENT or EFAULT"
+
+send_gdb "tbreak 272\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*stat 3:.*ENOENT.*test_stat \\(\\) at.*$srcfile:272.*" \
+"Stat an empty pathname returns ENOENT"
+
+send_gdb "tbreak 276\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*stat 4:.*ENOENT.*test_stat \\(\\) at.*$srcfile:276.*" \
+"Stat a nonexistant file returns ENOENT"
+
+send_gdb "tbreak 301\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*fstat 1:.*OK.*test_fstat \\(\\) at.*$srcfile:301.*" \
+"Fstat an open file"
+
+send_gdb "tbreak 305\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*fstat 2:.*EBADF.*test_fstat \\(\\) at.*$srcfile:305.*" \
+"Fstat an invalid file descriptor returns EBADF"
+
+send_gdb "tbreak 314\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*isatty 1:.*OK.*test_isatty \\(\\) at.*$srcfile:314.*" \
+"Isatty (stdin)"
+
+send_gdb "tbreak 315\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*isatty 2:.*OK.*test_isatty \\(\\) at.*$srcfile:315.*" \
+"Isatty (stdout)"
+
+send_gdb "tbreak 317\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*isatty 3:.*OK.*test_isatty \\(\\) at.*$srcfile:317.*" \
+"Isatty (stderr)"
+
+send_gdb "tbreak 319\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*isatty 4:.*OK.*test_isatty \\(\\) at.*$srcfile:319.*" \
+"Isatty (invalid fd)"
+
+send_gdb "tbreak 327\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*isatty 5:.*OK.*test_isatty \\(\\) at.*$srcfile:327.*" \
+"Isatty (open file)"
+
+send_gdb "set remote system-call-allowed 1\n"; gdb_expect -re ".*$gdb_prompt $"
+send_gdb "tbreak 347\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*system 1:.*OK.*test_system \\(\\) at.*$srcfile:347.*" \
+"System(3) call"
+
+# Is this ok? POSIX says system returns a waitpid status?
+send_gdb "tbreak 349\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*system 2:.*OK.*test_system \\(\\) at.*$srcfile:349.*" \
+"System with invalid command returns 127"
+
+send_gdb "tbreak 378\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*rename 1:.*OK.*test_rename \\(\\) at.*$srcfile:378.*" \
+"Rename a file"
+
+send_gdb "tbreak 383\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*rename 2:.*EISDIR.*test_rename \\(\\) at.*$srcfile:383.*" \
+"Renaming a file to existing directory returns EISDIR"
+
+send_gdb "tbreak 388\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+ "Continuing\\..*rename 3:.*(ENOTEMPTY|EEXIST).*test_rename \\(\\) at.*$srcfile:388.*" \
+"Renaming a directory to a non-empty directory returns ENOTEMPTY or EEXIST"
+
+send_gdb "tbreak 393\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*rename 4:.*EINVAL.*test_rename \\(\\) at.*$srcfile:393.*" \
+"Renaming a directory to a subdir of itself returns EINVAL"
+
+send_gdb "tbreak 397\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*rename 5:.*ENOENT.*test_rename \\(\\) at.*$srcfile:397.*" \
+"Renaming a nonexistant file returns ENOENT"
+
+send_gdb "tbreak 412\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*unlink 1:.*OK.*test_unlink \\(\\) at.*$srcfile:412.*" \
+"Unlink a file"
+
+send_gdb "tbreak 432\n" ; gdb_expect -re "$gdb_prompt $"
+# This test fails on Cygwin because unlink() succeeds on Win32 systems
+# in that situation.
+if [ishost *cygwin*] {
+ setup_xfail "*-*-*"
+}
+gdb_test continue \
+"Continuing\\..*unlink 2:.*EACCES.*test_unlink \\(\\) at.*$srcfile:432.*" \
+"Unlinking a file in a directory w/o write access returns EACCES"
+
+send_gdb "tbreak 436\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*unlink 3:.*ENOENT.*test_unlink \\(\\) at.*$srcfile:436.*" \
+"Unlinking a nonexistant file returns ENOENT"
+
+send_gdb "tbreak 446\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*time 1:.*OK.*test_time \\(\\) at.*$srcfile:446.*" \
+"Time(2) call returns the same value as in parameter"
+
+sleep 2
+send_gdb "tbreak 450\n" ; gdb_expect -re "$gdb_prompt $"
+gdb_test continue \
+"Continuing\\..*time 2:.*OK.*test_time \\(\\) at.*$srcfile:450.*" \
+"Time(2) returns feasible values"
+
+send_gdb "quit\n"
+send_gdb "y\n"
+
+remote_exec build "test -r dir2.fileio.test && chmod -f +w dir2.fileio.test"
+remote_exec build "rm -rf *.fileio.test"
+
+set timeout $oldtimeout
+return 0
+
diff --git a/gdb/testsuite/gdb.base/float.exp b/gdb/testsuite/gdb.base/float.exp
index 66943eff7dd..7aa75f35889 100644
--- a/gdb/testsuite/gdb.base/float.exp
+++ b/gdb/testsuite/gdb.base/float.exp
@@ -51,12 +51,16 @@ 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"
+} elseif [istarget "ia64-*-*"] then {
+ gdb_test "info float" "f0.*f1.*f127.*" "info float"
} else {
gdb_test "info float" "No floating.point info available for this processor." "info float"
}
diff --git a/gdb/testsuite/gdb.base/gdb_history b/gdb/testsuite/gdb.base/gdb_history
new file mode 100644
index 00000000000..cc22f69c2cf
--- /dev/null
+++ b/gdb/testsuite/gdb.base/gdb_history
@@ -0,0 +1,256 @@
+add-symbol-file
+append
+append binary
+append memory
+append value
+append binary memory
+append binary value
+attach
+break
+b
+br
+bre
+brea
+backtrace
+bt
+ba
+bac
+continue
+c
+call
+catch
+cd
+clear
+commands
+condition
+core-file
+d
+delete
+define
+delete breakpoints
+delete display
+detach
+directory
+dis
+disa
+disable
+disable breakpoints
+disable display
+disassemble
+display
+do
+document
+down
+down-silently
+dump
+dump binary
+dump ihex
+dump memory
+dump srec
+dump tekhex
+dump value
+dump binary memory
+dump binary value
+dump ihex memory
+dump ihex value
+dump srec memory
+dump srec value
+dump tekhex memory
+dump tekhex value
+echo
+enable breakpoints delete
+enable breakpoints once
+enable breakpoints
+enable delete
+enable display
+enable once
+enable
+exec-file
+f
+frame
+fg
+file
+finish
+forward-search
+gcore
+generate-core-file
+h
+help
+handle
+i
+info
+ignore
+info address
+info all-registers
+info args
+info bogus-gdb-command
+info breakpoints
+info catch
+info copying
+info display
+info f
+info frame
+info files
+info float
+info functions
+info locals
+info program
+info registers
+info s
+info stack
+info set
+info symbol
+info source
+info sources
+info target
+info terminal
+info types
+info variables
+info warranty
+info watchpoints
+inspect
+jump
+kill
+l
+list
+load
+n
+next
+ni
+nexti
+output
+overlay
+overlay on
+overlay manual
+overlay auto
+overlay off
+overlay list
+overlay map
+overlay unmap
+overlay manual
+overlay map
+overlay unmap
+p
+print
+printf
+ptype
+pwd
+r
+run
+rbreak
+restore
+return
+reverse-search
+s
+step
+search
+section
+set annotate
+set args
+set c
+set ch
+set check
+set check range
+set check type
+set complaints
+set confirm
+set environment
+set height
+set history expansion
+set history filename
+set history save
+set history size
+set history
+set language
+set listsize
+set p
+set pr
+set print
+set print address
+set print array
+set print asm-demangle
+set print demangle
+set print elements
+set print object
+set print pretty
+set print sevenbit-strings
+set print union
+set print vtbl
+set radix
+set symbol-reloading
+set variable
+set verbose
+set width
+set write
+set
+shell echo Hi dad!
+show annotate
+show args
+show c
+show ch
+show check
+show check range
+show check type
+show commands
+show complaints
+show confirm
+show convenience
+show directories
+show editing
+show height
+show history expansion
+show history filename
+show history save
+show history size
+show history
+show language
+show listsize
+show p
+show pr
+show print
+show paths
+show print address
+show print array
+show print asm-demangle
+show print demangle
+show print elements
+show print object
+show print pretty
+show print sevenbit-strings
+show print union
+show print vtbl
+show prompt
+show radix
+show symbol-reloading
+show user
+show values
+show verbose
+show version
+show width
+show write
+show
+si
+stepi
+signal
+source
+s
+step
+symbol-file
+target child
+target procfs
+target core
+target exec
+target remote
+target
+tbreak
+tty
+u
+until
+undisplay
+unset environment
+unset
+up-silently
+watch
+whatis
+where
+x
diff --git a/gdb/testsuite/gdb.base/langs.exp b/gdb/testsuite/gdb.base/langs.exp
index 9ed1e91a289..8006bbfd788 100644
--- a/gdb/testsuite/gdb.base/langs.exp
+++ b/gdb/testsuite/gdb.base/langs.exp
@@ -145,5 +145,20 @@ if [runto csub] then {
}
}
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load $binfile
+
+# Try exercising the "minimal" language a bit...
+
+if [runto csub] then {
+ gdb_test "set lang minimal" \
+ "Warning: the current language does not match this frame." \
+ "set lang to minimal"
+
+ gdb_test "print x" " = 5000" "print parameter value"
+}
+
set timeout $oldtimeout
return 0
diff --git a/gdb/testsuite/gdb.base/readline.exp b/gdb/testsuite/gdb.base/readline.exp
index 8edd1333db4..511cb6ba2e5 100644
--- a/gdb/testsuite/gdb.base/readline.exp
+++ b/gdb/testsuite/gdb.base/readline.exp
@@ -169,7 +169,7 @@ set timeout 30
# A simple test of operate-and-get-next.
operate_and_get_next "Simple operate-and-get-next" \
"p 1" ".* = 1" \
- "p 2" ".* = 2"\
+ "p 2" ".* = 2" \
"p 3" ".* = 3"
# Test operate-and-get-next with a secondary prompt.
@@ -179,12 +179,44 @@ operate_and_get_next "operate-and-get-next with secondary prompt" \
"end" ".* = 5"
+# Now repeat the first test with a history file that fills the entire
+# history list.
+
+if [info exists env(GDBHISTFILE)] {
+ set old_gdbhistfile $env(GDBHISTFILE)
+}
+if [info exists env(HISTSIZE)] {
+ set old_histsize $env(HISTSIZE)
+}
+set env(GDBHISTFILE) "${srcdir}/${subdir}/gdb_history"
+set env(HISTSIZE) "10"
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+
+operate_and_get_next "Simple operate-and-get-next" \
+ "p 7" ".* = 7" \
+ "p 8" ".* = 8" \
+ "p 9" ".* = 9"
+
+
# Restore globals modified in this test...
if [info exists old_inputrc] {
set env(INPUTRC) $old_inputrc
} else {
unset env(INPUTRC)
}
+if [info exists old_gdbhistfile] {
+ set env(GDBHISTFILE) $old_gdbhistfile
+} else {
+ unset env(GDBHISTFILE)
+}
+if [info exists old_histsize] {
+ set env(HISTSIZE) $old_histsize
+} else {
+ unset env(HISTSIZE)
+}
set timeout $oldtimeout1
return 0
diff --git a/gdb/testsuite/gdb.base/relocate.exp b/gdb/testsuite/gdb.base/relocate.exp
index bcaa48adbc2..8d8ff90bc9e 100644
--- a/gdb/testsuite/gdb.base/relocate.exp
+++ b/gdb/testsuite/gdb.base/relocate.exp
@@ -105,4 +105,30 @@ if { "${function_foo_addr}" == "${function_bar_addr}" } {
pass "functions have different addresses"
}
+# Now use a variable as an offset to add-symbol-file, and check that
+# the functions' addresses change.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+
+gdb_test "set \$offset = 0x10000" ""
+
+# Load the object file.
+gdb_test "add-symbol-file ${binfile} \$offset" \
+ "Reading symbols from .*${testfile}\\.o\\.\\.\\.done\\." \
+ "add-symbol-file ${testfile}.o \$offset" \
+ "add symbol table from file \".*${testfile}\\.o\" at\[ \t\r\n\]+\.text_addr = 0x10000\[\r\n\]+\\(y or n\\) " \
+ "y"
+
+# Print the addresses of functions.
+set new_function_foo_addr [get_var_address function_foo]
+
+# Make sure they have different addresses.
+if { "${function_foo_addr}" == "${new_function_foo_addr}" } {
+ fail "function foo has a different address"
+} else {
+ pass "function foo has a different address"
+}
+
return 0
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.base/shreloc.c b/gdb/testsuite/gdb.base/shreloc.c
new file mode 100644
index 00000000000..6867362bf0a
--- /dev/null
+++ b/gdb/testsuite/gdb.base/shreloc.c
@@ -0,0 +1,18 @@
+#if defined(_WIN32) || defined(__CYGWIN__)
+# define ATTRIBUTES __attribute((__dllimport__))
+#else
+# define ATTRIBUTES
+#endif
+
+extern ATTRIBUTES void fn_1 (int);
+extern ATTRIBUTES void fn_2 (int);
+extern ATTRIBUTES int extern_var_1;
+extern ATTRIBUTES int extern_var_2;
+
+int main ()
+{
+ fn_1 (extern_var_1);
+ fn_2 (extern_var_2);
+
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.base/shreloc.exp b/gdb/testsuite/gdb.base/shreloc.exp
new file mode 100644
index 00000000000..ac48774676f
--- /dev/null
+++ b/gdb/testsuite/gdb.base/shreloc.exp
@@ -0,0 +1,257 @@
+# Copyright (C) 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 shared object file relocation. If two shared objects have
+# the same load address (actually, overlapping load spaces), one of
+# them gets relocated at load-time. Check that gdb gets the right
+# values for the debugging and minimal symbols.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+#
+# This file uses shreloc.c, shreloc1.c and shreloc2.c
+#
+
+set prms_id 0
+set bug_id 0
+
+set workdir ${objdir}/${subdir}
+
+foreach module [list "shreloc" "shreloc1" "shreloc2"] {
+ if {[gdb_compile "${srcdir}/${subdir}/${module}.c" "${workdir}/${module}.o" object {debug}] != ""} {
+ untested "Couldn't compile ${module}.c"
+ return -1
+ }
+}
+
+set additional_flags "additional_flags=-shared"
+
+if {([istarget "*pc-cygwin"] || [istarget "*pc-mingw32"]) } {
+ set additional_flags "${additional_flags} -Wl,--image-base,0x04000000"
+}
+
+foreach module [list "shreloc1" "shreloc2"] {
+ if {[gdb_compile "${workdir}/${module}.o" "${workdir}/${module}.dll" executable [list debug $additional_flags]] != ""} {
+ untested "Couldn't link ${module}.dll"
+ return -1
+ }
+}
+
+if {[gdb_compile [list "${workdir}/shreloc.o" "${workdir}/shreloc1.dll" "${workdir}/shreloc2.dll"] "${workdir}/shreloc" executable debug] != ""} {
+ untested "Couldn't link shreloc executable"
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${workdir}/shreloc
+
+# Load up the shared objects
+if ![runto_main] then {
+ fail "Can't run to main"
+ return 0
+}
+
+proc get_var_address { var } {
+ global gdb_prompt hex
+
+ send_gdb "print &${var}\n"
+ # Match output like:
+ # $1 = (int *) 0x0
+ # $5 = (int (*)()) 0
+ # $6 = (int (*)()) 0x24 <function_bar>
+ gdb_expect {
+ -re "\\\$\[0-9\]+ = \\(.*\\) (0|$hex)( <${var}>)?\[\r\n\]+${gdb_prompt} $"
+ {
+ pass "get address of ${var}"
+ if { $expect_out(1,string) == "0" } {
+ return "0x0"
+ } else {
+ return $expect_out(1,string)
+ }
+ }
+ -re "${gdb_prompt} $"
+ { fail "get address of ${var} (unknown output)" }
+ timeout
+ { fail "get address of ${var} (timeout)" }
+ }
+ return ""
+}
+
+#
+# Check debugging symbol relocations
+#
+
+# Check extern function for relocation
+set fn_1_addr [get_var_address fn_1]
+set fn_2_addr [get_var_address fn_2]
+
+if { "${fn_1_addr}" == "${fn_2_addr}" } {
+ fail "relocated extern functions have different addresses"
+} else {
+ pass "relocated extern functions have different addresses"
+}
+
+# Check extern var for relocation
+set extern_var_1_addr [get_var_address extern_var_1]
+set extern_var_2_addr [get_var_address extern_var_2]
+
+if { "${extern_var_1_addr}" == "${extern_var_2_addr}" } {
+ fail "relocated extern variables have different addresses"
+} else {
+ pass "relocated extern variables have different addresses"
+}
+
+# Check static var for relocation
+set static_var_1_addr [get_var_address static_var_1]
+set static_var_2_addr [get_var_address static_var_2]
+
+if { "${static_var_1_addr}" == "${static_var_2_addr}" } {
+ fail "relocated static variables have different addresses"
+} else {
+ pass "relocated static variables have different addresses"
+}
+
+#
+# Check minimal symbol relocations
+#
+
+proc send_gdb_discard { command } {
+ # Send a command to gdb and discard output up to the next prompt
+
+ global gdb_prompt
+
+ send_gdb "${command}\n"
+
+ # Discard output
+ gdb_expect {
+ -re ".*\[\r\n]+${gdb_prompt} $" {
+ return 1
+ }
+ timeout {
+ fail "{$command} (timeout)"
+ return 0
+ }
+ }
+}
+
+proc get_msym_addrs { var msymfile } {
+ # Extract the list of values for symbols matching var in the
+ # minimal symbol output file
+
+ global gdb_prompt hex
+ set result ""
+
+ send_gdb "shell grep -E \" ${var}(\[ \t\]+.*)?\$\" ${msymfile}\n"
+
+ while 1 {
+ gdb_expect {
+ -re "\[\[\]\[ 0-9\]+\] . (${hex}) ${var}(\[ \t\]+\[^\r\n\]*)?\[\r\n\]+" {
+ set result [concat $result $expect_out(1,string)]
+ }
+
+ -re "$gdb_prompt $" {
+ pass "get_msym_addrs ${var} (${result})"
+ return "${result}"
+ }
+
+ -re "\[^\r\n\]*\[\r\n\]+" {
+ # Skip
+ }
+
+ timeout {
+ fail "get_msym_addrs ${var} (timeout)"
+ return -1
+ }
+ }
+ }
+}
+
+proc check_same {var msymfile} {
+ # Check that the minimal symbol values matching var are the same
+
+ set len [llength [lsort -unique [get_msym_addrs "${var}" "${msymfile}"]]]
+
+ if { $len == 1 } {
+ return 1
+ } else {
+ return 0
+ }
+}
+
+proc check_different {var msymfile} {
+ # Check that the minimal symbol values matching var are different
+
+ set addr_list [lsort [get_msym_addrs "${var}" "${msymfile}"]]
+ set prev ""
+
+ if { [llength ${addr_list}] < 2 } {
+ return 0
+ }
+
+ foreach addr ${addr_list} {
+ if { ${prev} == ${addr} } {
+ return 0
+ }
+ set prev ${addr}
+ }
+
+ return 1
+}
+
+set msymfile "${workdir}/shreloc.txt"
+
+if [send_gdb_discard "maint print msymbols ${msymfile}"] {
+ if {[check_different "static_var_\[12\]" "${msymfile}"]} {
+ pass "(msymbol) relocated static vars have different addresses"
+ } else {
+ fail "(msymbol) relocated static vars have different addresses"
+ }
+
+ if {[check_different "extern_var_\[12\]" "${msymfile}"]} {
+ pass "(msymbol) relocated extern vars have different addresses"
+ } else {
+ fail "(msymbol) relocated extern vars have different addresses"
+ }
+
+ if {[check_different "fn_\[12\]" "${msymfile}"]} {
+ pass "(msymbol) relocated functions have different addresses"
+ } else {
+ fail "(msymbol) relocated functions have different addresses"
+ }
+}
+
+if {([istarget "*pc-cygwin"] || [istarget "*pc-mingw32"]) } {
+ #
+ # We know the names of some absolute symbols included in the
+ # portable-executable (DLL) format. Check that they didn't get
+ # relocated.
+ #
+ # A better approach would be include absolute symbols via the assembler.
+ #
+ if {[check_same "_minor_os_version__" "${msymfile}"]} {
+ pass "Absolute symbols not relocated"
+ } else {
+ fail "Absolute symbols not relocated"
+ }
+}
diff --git a/gdb/testsuite/gdb.base/shreloc1.c b/gdb/testsuite/gdb.base/shreloc1.c
new file mode 100644
index 00000000000..b1bffde5c5c
--- /dev/null
+++ b/gdb/testsuite/gdb.base/shreloc1.c
@@ -0,0 +1,10 @@
+#if defined(_WIN32) || defined(__CYGWIN__)
+# define ATTRIBUTES __attribute((__dllexport__))
+#else
+# define ATTRIBUTES
+#endif
+
+static int static_var_1;
+
+ATTRIBUTES void fn_1 (int unused) { }
+ATTRIBUTES int extern_var_1 = 0;
diff --git a/gdb/testsuite/gdb.base/shreloc2.c b/gdb/testsuite/gdb.base/shreloc2.c
new file mode 100644
index 00000000000..1459093eeeb
--- /dev/null
+++ b/gdb/testsuite/gdb.base/shreloc2.c
@@ -0,0 +1,10 @@
+#if defined(_WIN32) || defined(__CYGWIN__)
+# define ATTRIBUTES __attribute((__dllexport__))
+#else
+# define ATTRIBUTES
+#endif
+
+static int static_var_2;
+
+ATTRIBUTES void fn_2 (int unused) { }
+ATTRIBUTES int extern_var_2 = 0;
diff --git a/gdb/testsuite/gdb.base/signals.exp b/gdb/testsuite/gdb.base/signals.exp
index be974550e21..a07e3a8500a 100644
--- a/gdb/testsuite/gdb.base/signals.exp
+++ b/gdb/testsuite/gdb.base/signals.exp
@@ -195,6 +195,7 @@ proc signal_tests_1 {} {
# a SIGTRAP, but with different symptoms.
setup_xfail "vax-*-ultrix*"
setup_xfail "i*86-*-bsd*"
+ setup_xfail "i*86-*-freebsd*"
setup_xfail "i*86-pc-linux-gnu*"
setup_xfail "i*86-*-solaris2*"
send_gdb "continue\n"
diff --git a/gdb/testsuite/gdb.base/store.c b/gdb/testsuite/gdb.base/store.c
index 802945fcce1..46acc6a1c81 100644
--- a/gdb/testsuite/gdb.base/store.c
+++ b/gdb/testsuite/gdb.base/store.c
@@ -31,6 +31,14 @@ add_long (register long u, register long v)
return u + v;
}
+typedef long long longest;
+
+longest
+add_longest (register longest u, register longest v)
+{
+ return u + v;
+}
+
float
add_float (register float u, register float v)
{
@@ -43,56 +51,82 @@ add_double (register double u, register double v)
return u + v;
}
+typedef long double doublest;
+
+doublest
+add_doublest (register doublest u, register doublest v)
+{
+ return u + v;
+}
+
/* */
char
wack_char (register char u, register char v)
{
- register char l = u;
- l = add_char (l, v);
+ register char l = u, r = v;
+ l = add_char (l, r);
return l;
}
short
wack_short (register short u, register short v)
{
- register short l = u;
- l = add_short (l, v);
+ register short l = u, r = v;
+ l = add_short (l, r);
return l;
}
int
wack_int (register int u, register int v)
{
- register int l = u;
- l = add_int (l, v);
+ register int l = u, r = v;
+ l = add_int (l, r);
return l;
}
long
wack_long (register long u, register long v)
{
- register long l = u;
- l = add_long (l, v);
+ register long l = u, r = v;
+ l = add_long (l, r);
+ return l;
+}
+
+long
+wack_longest (register longest u, register longest v)
+{
+ register longest l = u, r = v;
+ l = add_longest (l, r);
return l;
}
float
wack_float (register float u, register float v)
{
- register float l = u;
- l = add_float (l, v);
+ register float l = u, r = v;
+ l = add_float (l, r);
return l;
}
double
wack_double (register double u, register double v)
{
- register double l = u;
- l = add_double (l, v);
+ register double l = u, r = v;
+ l = add_double (l, r);
+ return l;
+}
+
+doublest
+wack_doublest (register doublest u, register doublest v)
+{
+ register doublest l = u, r = v;
+ l = add_doublest (l, r);
return l;
}
+/* */
+
struct s_1 { short s[1]; } z_1, s_1;
struct s_2 { short s[2]; } z_2, s_2;
struct s_3 { short s[3]; } z_3, s_3;
@@ -219,20 +253,24 @@ int
main ()
{
/* These calls are for current frame test. */
- wack_char (1, 2);
- wack_short (1, 2);
- wack_int (1, 2);
- wack_long (1, 2);
- wack_float (1, 2);
- wack_double (1, 2);
+ wack_char (-1, -2);
+ wack_short (-1, -2);
+ wack_int (-1, -2);
+ wack_long (-1, -2);
+ wack_longest (-1, -2);
+ wack_float (-1, -2);
+ wack_double (-1, -2);
+ wack_doublest (-1, -2);
/* These calls are for up frame. */
- wack_char (1, 2);
- wack_short (1, 2);
- wack_int (1, 2);
- wack_long (1, 2);
- wack_float (1, 2);
- wack_double (1, 2);
+ wack_char (-1, -2);
+ wack_short (-1, -2);
+ wack_int (-1, -2);
+ wack_long (-1, -2);
+ wack_longest (-1, -2);
+ wack_float (-1, -2);
+ wack_double (-1, -2);
+ wack_doublest (-1, -2);
/* These calls are for current frame test. */
wack_struct_1 ();
diff --git a/gdb/testsuite/gdb.base/store.exp b/gdb/testsuite/gdb.base/store.exp
index d6e941a19b6..5e0e60eb793 100644
--- a/gdb/testsuite/gdb.base/store.exp
+++ b/gdb/testsuite/gdb.base/store.exp
@@ -54,43 +54,49 @@ if ![runto_main] then {
#
-proc check_set { t old new add } {
+proc check_set { t l r new add } {
global gdb_prompt
gdb_test "tbreak wack_${t}"
- gdb_test "continue" "register ${t} l = u;" "continue set ${t}"
- gdb_test "next" "l = add_${t} .l, v.;" "next ${t}"
- gdb_test "print l" " = ${old}" "print old ${t}"
+ gdb_test "continue" "register ${t} l = u, r = v;" "continue to wack_${t}"
+ gdb_test "next" "l = add_${t} .l, r.;" "next ${t}"
+ gdb_test "print l" " = ${l}" "print old l - ${t}"
+ gdb_test "print r" " = ${r}" "print old r - ${t}"
gdb_test "set variable l = 4"
- gdb_test "print l" " = ${new}" "print new ${t}"
+ gdb_test "print l" " = ${new}" "print new l - ${t}"
gdb_test "next" "return l;"
- gdb_test "print l" " = ${add}" "print add ${t}"
+ gdb_test "print l" " = ${add}" "print add - ${t}"
}
-check_set "char" "1 ..001." "4 ..004." "6 ..006."
-check_set "short" "1" "4" "6"
-check_set "int" "1" "4" "6"
-check_set "long" "1" "4" "6"
-check_set "float" "1" "4" "6"
-check_set "double" "1" "4" "6"
+check_set "char" "-1 .*" "-2 .*" "4 ..004." "2 ..002."
+check_set "short" "-1" "-2" "4" "2"
+check_set "int" "-1" "-2" "4" "2"
+check_set "long" "-1" "-2" "4" "2"
+check_set "longest" "-1" "-2" "4" "2"
+check_set "float" "-1" "-2" "4" "2"
+check_set "double" "-1" "-2" "4" "2"
+check_set "doublest" "-1" "-2" "4" "2"
#
-proc up_set { t old new } {
+proc up_set { t l r new } {
global gdb_prompt
gdb_test "tbreak add_${t}"
- gdb_test "continue" "return u . v;" "continue up ${t}"
- gdb_test "up" "l = add_${t} .l, v.;" "up ${t}"
- gdb_test "print l" " = ${old}" "print old up ${t}"
+ gdb_test "continue" "return u . v;" "continue to add_${t}"
+ gdb_test "up" "l = add_${t} .l, r.;" "up ${t}"
+ gdb_test "print l" " = ${l}" "up print old l - ${t}"
+ gdb_test "print r" " = ${r}" "up print old r - ${t}"
gdb_test "set variable l = 4"
- gdb_test "print l" " = ${new}" "print new up ${t}"
+ gdb_test "print l" " = ${new}" "up print new l - ${t}"
}
-up_set "char" "1 ..001." "4 ..004."
-up_set "short" "1" "4"
-up_set "int" "1" "4"
-up_set "long" "1" "4"
-up_set "float" "1" "4"
-up_set "double" "1" "4"
+up_set "char" "-1 .*" "-2 .*" "4 ..004."
+up_set "short" "-1" "-2" "4"
+up_set "int" "-1" "-2" "4"
+up_set "long" "-1" "-2" "4"
+up_set "longest" "-1" "-2" "4"
+up_set "float" "-1" "-2" "4"
+up_set "double" "-1" "-2" "4"
+up_set "doublest" "-1" "-2" "4"
#
@@ -133,7 +139,11 @@ proc check_field { t } {
gdb_test "tbreak wack_field_${t}"
gdb_test "continue" "register struct f_${t} u = f_${t};" \
"continue field ${t}"
- gdb_test "next" "return u;" "next field ${t}"
+
+ # Match either the return statement, or the line immediatly after
+ # it. The compiler can end up merging the return statement into
+ # the return instruction.
+ gdb_test "next" "(return u;|\})" "next field ${t}"
gdb_test "print u" " = {i = 1, j = 1, k = 1}" "old field ${t}"
gdb_test "set variable u = F_${t}"
diff --git a/gdb/testsuite/gdb.c++/pr-1210.cc b/gdb/testsuite/gdb.c++/pr-1210.cc
new file mode 100644
index 00000000000..5747e5da58d
--- /dev/null
+++ b/gdb/testsuite/gdb.c++/pr-1210.cc
@@ -0,0 +1,19 @@
+class A
+{
+};
+
+class B : virtual public A
+{
+};
+
+class C : public A
+{
+ protected:
+ B myB;
+};
+
+int main()
+{
+ C *obj = new C();
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.c++/pr-1210.exp b/gdb/testsuite/gdb.c++/pr-1210.exp
new file mode 100644
index 00000000000..3ff850d121c
--- /dev/null
+++ b/gdb/testsuite/gdb.c++/pr-1210.exp
@@ -0,0 +1,76 @@
+# 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/1210.
+
+# 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-1210"
+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_test "next" ".*return 0;" "step past initialization"
+
+gdb_test_multiple "print *obj" "" {
+ -re "Cannot access memory.*$gdb_prompt $" {
+ fail "print *obj"
+ }
+ -re " = {<A> = {<No data fields>}, myB = {<A> = {<No data fields>}.*}}\r\n$gdb_prompt $" {
+ pass "print *obj"
+ }
+}
+
+gdb_test_multiple "print obj->myB" "" {
+ -re "Cannot access memory.*$gdb_prompt $" {
+ fail "print obj->myB"
+ }
+ -re " = {<A> = {<No data fields>}.*}\r\n$gdb_prompt $" {
+ pass "print obj->myB"
+ }
+}
+
+gdb_exit
+return 0
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index 59076280ce8..4239a3761f3 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -636,7 +636,7 @@ proc mi_run_cmd {args} {
}
send_gdb "000-exec-continue\n";
gdb_expect 60 {
- -re "Continu\[^\r\n\]*\[\r\n\]" {}
+ -re "000\\^running\[\r\n\]+$mi_gdb_prompt$" {}
default {}
}
return;
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..3efebecb3ec 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
@@ -485,7 +490,7 @@ struct catch_errors_args
void *func_args;
};
-int
+static int
do_catch_errors (struct ui_out *uiout, void *data)
{
struct catch_errors_args *args = data;
@@ -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",
@@ -1059,7 +1061,7 @@ static int operate_saved_history = -1;
/* This is put on the appropriate hook and helps operate-and-get-next
do its work. */
-void
+static void
gdb_rl_operate_and_get_next_completion (void)
{
int delta = where_history () - operate_saved_history;
diff --git a/gdb/top.h b/gdb/top.h
index ca0b3d13dc6..50361dc07ab 100644
--- a/gdb/top.h
+++ b/gdb/top.h
@@ -70,5 +70,16 @@ extern char *source_error;
extern char *source_pre_error;
extern int history_expansion_p;
extern int server_command;
+extern char *lim_at_start;
+
+extern void show_commands (char *args, int from_tty);
+
+extern void set_history (char *, int);
+
+extern void show_history (char *, int);
+
+extern void set_verbose (char *, int, struct cmd_list_element *);
+
+extern void do_restore_instream_cleanup (void *stream);
#endif
diff --git a/gdb/trad-frame.c b/gdb/trad-frame.c
new file mode 100644
index 00000000000..92e6f83eecb
--- /dev/null
+++ b/gdb/trad-frame.c
@@ -0,0 +1,96 @@
+/* Traditional frame unwind support, for GDB the GNU Debugger.
+
+ Copyright 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 "trad-frame.h"
+#include "regcache.h"
+
+/* A traditional frame is unwound by analysing the function prologue
+ and using the information gathered to track registers. For
+ non-optimized frames, the technique is reliable (just need to check
+ for all potential instruction sequences). */
+
+struct trad_frame_saved_reg *
+trad_frame_alloc_saved_regs (struct frame_info *next_frame)
+{
+ int regnum;
+ struct gdbarch *gdbarch = get_frame_arch (next_frame);
+ int numregs = NUM_REGS + NUM_PSEUDO_REGS;
+ struct trad_frame_saved_reg *this_saved_regs
+ = FRAME_OBSTACK_CALLOC (numregs, struct trad_frame_saved_reg);
+ for (regnum = 0; regnum < numregs; regnum++)
+ this_saved_regs[regnum].realnum = regnum;
+ return this_saved_regs;
+}
+
+void
+trad_frame_register_value (struct trad_frame_saved_reg this_saved_regs[],
+ int regnum, LONGEST val)
+{
+ /* Make the REALNUM invalid, indicating that the ADDR contains the
+ register's value. */
+ this_saved_regs[regnum].realnum = -1;
+ this_saved_regs[regnum].addr = val;
+}
+
+void
+trad_frame_prev_register (struct frame_info *next_frame,
+ struct trad_frame_saved_reg this_saved_regs[],
+ int regnum, int *optimizedp,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realnump, void *bufferp)
+{
+ struct gdbarch *gdbarch = get_frame_arch (next_frame);
+ if (this_saved_regs[regnum].realnum >= 0
+ && this_saved_regs[regnum].addr != 0)
+ {
+ /* The register was saved in memory. */
+ *optimizedp = 0;
+ *lvalp = lval_memory;
+ *addrp = this_saved_regs[regnum].addr;
+ *realnump = -1;
+ if (bufferp != NULL)
+ {
+ /* Read the value in from memory. */
+ get_frame_memory (next_frame, this_saved_regs[regnum].addr, bufferp,
+ register_size (gdbarch, regnum));
+ }
+ }
+ else if (this_saved_regs[regnum].realnum >= 0
+ && this_saved_regs[regnum].addr == 0)
+ {
+ /* As the next frame to return the value of the register. */
+ frame_register_unwind (next_frame, this_saved_regs[regnum].realnum,
+ optimizedp, lvalp, addrp, realnump, bufferp);
+ }
+ else
+ {
+ /* The register's value is available. */
+ *optimizedp = 0;
+ *lvalp = not_lval;
+ *addrp = 0;
+ *realnump = -1;
+ if (bufferp != NULL)
+ store_unsigned_integer (bufferp, register_size (gdbarch, regnum),
+ this_saved_regs[regnum].addr);
+ }
+}
diff --git a/gdb/trad-frame.h b/gdb/trad-frame.h
new file mode 100644
index 00000000000..2b04c7e654e
--- /dev/null
+++ b/gdb/trad-frame.h
@@ -0,0 +1,70 @@
+/* Traditional frame unwind support, for GDB the GNU Debugger.
+
+ Copyright 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. */
+
+#ifndef TRAD_FRAME_H
+#define TRAD_FRAME_H
+
+struct frame_info;
+
+/* A traditional saved regs table, indexed by REGNUM, encoding where
+ the value of REGNUM for the previous frame can be found in this
+ frame.
+
+ The table is initialized with an identity encoding (ADDR == 0,
+ REALNUM == REGNUM) indicating that the value of REGNUM in the
+ previous frame can be found in register REGNUM (== REALNUM) in this
+ frame.
+
+ The initial encoding can then be changed:
+
+ Modify ADDR (REALNUM >= 0, ADDR != 0) to indicate that the value of
+ register REGNUM in the previous frame can be found in memory at
+ ADDR in this frame.
+
+ Modify REALNUM (REALNUM >= 0, ADDR == 0) to indicate that the value
+ of register REGNUM in the previous frame is found in register
+ REALNUM in this frame.
+
+ Call trad_frame_register_value (REALNUM < 0) to indicate that the
+ value of register REGNUM in the previous frame is found in ADDR. */
+
+struct trad_frame_saved_reg
+{
+ LONGEST addr; /* A CORE_ADDR fits in a longest. */
+ int realnum;
+};
+
+/* Convenience function, encode REGNUM's location in the trad-frame. */
+void trad_frame_register_value (struct trad_frame_saved_reg this_saved_regs[],
+ int regnum, LONGEST val);
+
+/* Return a freshly allocated (and initialized) trad_frame array. */
+struct trad_frame_saved_reg *trad_frame_alloc_saved_regs (struct frame_info *next_frame);
+
+/* Given the trad_frame info, return the location of the specified
+ register. */
+void trad_frame_prev_register (struct frame_info *next_frame,
+ struct trad_frame_saved_reg this_saved_regs[],
+ int regnum, int *optimizedp,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realnump, void *bufferp);
+
+#endif
diff --git a/gdb/tui/ChangeLog b/gdb/tui/ChangeLog
index f44f9aa9a48..9ab34614aa0 100644
--- a/gdb/tui/ChangeLog
+++ b/gdb/tui/ChangeLog
@@ -1,3 +1,31 @@
+2003-06-22 Daniel Jacobowitz <drow@mvista.com>
+
+ * tui-hooks.c: Update include order.
+ * tui.c: Likewise.
+ * tuiCommand.c: Likewise.
+ * tuiData.c: Likewise.
+ * tuiDataWin.c: Likewise.
+ * tuiDisassem.c: Likewise.
+ * tuiGeneralWin.c: Likewise.
+ * tuiIO.c: Likewise.
+ * tuiLayout.c: Likewise.
+ * tuiRegs.c: Likewise.
+ * tuiSource.c: Likewise.
+ * tuiSourceWin.c: Likewise.
+ * tuiStack.c: Likewise.
+ * tuiWin.c: Likewise.
+
+2003-06-12 Andreas Schwab <schwab@suse.de>
+
+ * tuiSource.c (tuiVerticalSourceScroll): Use get_frame_pc.
+ * tuiSourceWin.c (tuiHorizontalSourceScroll): Likewise.
+ * tuiStack.c (tui_get_function_from_frame): Likewise.
+ (tuiShowFrameInfo): Likewise.
+ * tuiWin.c (_makeVisibleWithNewHeight): Likewise.
+ * tui-hooks.c (tui_selected_frame_level_changed_hook): Likewise.
+ * tuiDisassem.c (tuiVerticalDisassemScroll): Likewise.
+ Include "disasm.h".
+
2003-05-08 Andrew Cagney <cagney@redhat.com>
* tuiRegs.c: Use MAX_REGISTER_SIZE instead of
diff --git a/gdb/tui/tui-hooks.c b/gdb/tui/tui-hooks.c
index db6c3f666bf..e00ba857773 100644
--- a/gdb/tui/tui-hooks.c
+++ b/gdb/tui/tui-hooks.c
@@ -1,6 +1,6 @@
/* GDB hooks for TUI.
- Copyright 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -19,23 +19,6 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
- "defs.h" should be included first. Unfortunatly some systems
- (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
- and they clash with "bfd.h"'s definiton of true/false. The correct
- fix is to remove true/false from "bfd.h", however, until that
- happens, hack around it by including "config.h" and <curses.h>
- first. */
-
-#include "config.h"
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
-
#include "defs.h"
#include "symtab.h"
#include "inferior.h"
@@ -66,6 +49,14 @@
#include "tuiDataWin.h"
#include "tuiSourceWin.h"
+#ifdef HAVE_NCURSES_H
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#endif
+#endif
+
int tui_target_has_run = 0;
static void (* tui_target_new_objfile_chain) (struct objfile*);
@@ -250,7 +241,7 @@ tui_selected_frame_level_changed_hook (int level)
{
struct symtab *s;
- s = find_pc_symtab (fi->pc);
+ s = find_pc_symtab (get_frame_pc (fi));
/* elz: this if here fixes the problem with the pc not being displayed
in the tui asm layout, with no debug symbols. The value of s
would be 0 here, and select_source_symtab would abort the
diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c
index 517cf461cc5..7e665d58a79 100644
--- a/gdb/tui/tui.c
+++ b/gdb/tui/tui.c
@@ -1,6 +1,6 @@
/* General functions for the WDB TUI.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
Inc.
Contributed by Hewlett-Packard Company.
@@ -22,23 +22,6 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
- "defs.h" should be included first. Unfortunatly some systems
- (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
- and they clash with "bfd.h"'s definiton of true/false. The correct
- fix is to remove true/false from "bfd.h", however, until that
- happens, hack around it by including "config.h" and <curses.h>
- first. */
-
-#include "config.h"
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
-
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
@@ -70,6 +53,14 @@
#include "symtab.h"
#include "source.h"
+#ifdef HAVE_NCURSES_H
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#endif
+#endif
+
/* Tells whether the TUI is active or not. */
int tui_active = 0;
static int tui_finish_init = 1;
diff --git a/gdb/tui/tuiCommand.c b/gdb/tui/tuiCommand.c
index ca3d5318ea9..675b34c5443 100644
--- a/gdb/tui/tuiCommand.c
+++ b/gdb/tui/tuiCommand.c
@@ -1,6 +1,6 @@
/* Specific command window processing.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
Inc.
Contributed by Hewlett-Packard Company.
@@ -22,15 +22,13 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
- "defs.h" should be included first. Unfortunatly some systems
- (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
- and they clash with "bfd.h"'s definiton of true/false. The correct
- fix is to remove true/false from "bfd.h", however, until that
- happens, hack around it by including "config.h" and <curses.h>
- first. */
+#include "defs.h"
+#include <ctype.h>
+#include "tui.h"
+#include "tuiData.h"
+#include "tuiWin.h"
+#include "tuiIO.h"
-#include "config.h"
#ifdef HAVE_NCURSES_H
#include <ncurses.h>
#else
@@ -39,13 +37,6 @@
#endif
#endif
-#include "defs.h"
-#include <ctype.h>
-#include "tui.h"
-#include "tuiData.h"
-#include "tuiWin.h"
-#include "tuiIO.h"
-
/*****************************************
** STATIC LOCAL FUNCTIONS FORWARD DECLS **
diff --git a/gdb/tui/tuiData.c b/gdb/tui/tuiData.c
index 225583ea70c..5acc33cc67d 100644
--- a/gdb/tui/tuiData.c
+++ b/gdb/tui/tuiData.c
@@ -1,6 +1,6 @@
/* TUI data manipulation routines.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
Inc.
Contributed by Hewlett-Packard Company.
@@ -22,15 +22,12 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
- "defs.h" should be included first. Unfortunatly some systems
- (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
- and they clash with "bfd.h"'s definiton of true/false. The correct
- fix is to remove true/false from "bfd.h", however, until that
- happens, hack around it by including "config.h" and <curses.h>
- first. */
+#include "defs.h"
+#include "symtab.h"
+#include "tui.h"
+#include "tuiData.h"
+#include "tuiGeneralWin.h"
-#include "config.h"
#ifdef HAVE_NCURSES_H
#include <ncurses.h>
#else
@@ -39,12 +36,6 @@
#endif
#endif
-#include "defs.h"
-#include "symtab.h"
-#include "tui.h"
-#include "tuiData.h"
-#include "tuiGeneralWin.h"
-
/****************************
** GLOBAL DECLARATIONS
****************************/
diff --git a/gdb/tui/tuiDataWin.c b/gdb/tui/tuiDataWin.c
index e729afc7f72..f3bedd2d6b9 100644
--- a/gdb/tui/tuiDataWin.c
+++ b/gdb/tui/tuiDataWin.c
@@ -1,6 +1,6 @@
/* Data/register window display.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
Inc.
Contributed by Hewlett-Packard Company.
@@ -22,15 +22,12 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
- "defs.h" should be included first. Unfortunatly some systems
- (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
- and they clash with "bfd.h"'s definiton of true/false. The correct
- fix is to remove true/false from "bfd.h", however, until that
- happens, hack around it by including "config.h" and <curses.h>
- first. */
+#include "defs.h"
+#include "tui.h"
+#include "tuiData.h"
+#include "tuiGeneralWin.h"
+#include "tuiRegs.h"
-#include "config.h"
#ifdef HAVE_NCURSES_H
#include <ncurses.h>
#else
@@ -39,12 +36,6 @@
#endif
#endif
-#include "defs.h"
-#include "tui.h"
-#include "tuiData.h"
-#include "tuiGeneralWin.h"
-#include "tuiRegs.h"
-
/*****************************************
** STATIC LOCAL FUNCTIONS FORWARD DECLS **
diff --git a/gdb/tui/tuiDisassem.c b/gdb/tui/tuiDisassem.c
index 0ddf32c1b99..e36c5df521b 100644
--- a/gdb/tui/tuiDisassem.c
+++ b/gdb/tui/tuiDisassem.c
@@ -1,6 +1,6 @@
/* Disassembly display.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
Inc.
Contributed by Hewlett-Packard Company.
@@ -22,29 +22,13 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
- "defs.h" should be included first. Unfortunatly some systems
- (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
- and they clash with "bfd.h"'s definiton of true/false. The correct
- fix is to remove true/false from "bfd.h", however, until that
- happens, hack around it by including "config.h" and <curses.h>
- first. */
-
-#include "config.h"
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
-
#include "defs.h"
#include "symtab.h"
#include "breakpoint.h"
#include "frame.h"
#include "value.h"
#include "source.h"
+#include "disasm.h"
#include "tui.h"
#include "tuiData.h"
@@ -54,6 +38,14 @@
#include "tuiStack.h"
#include "tui-file.h"
+#ifdef HAVE_NCURSES_H
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#endif
+#endif
+
struct tui_asm_line
{
CORE_ADDR addr;
@@ -408,7 +400,7 @@ tuiVerticalDisassemScroll (TuiScrollDirection scrollDirection,
content = (TuiWinContent) disassemWin->generic.content;
if (cursal.symtab == (struct symtab *) NULL)
- s = find_pc_symtab (deprecated_selected_frame->pc);
+ s = find_pc_symtab (get_frame_pc (deprecated_selected_frame));
else
s = cursal.symtab;
diff --git a/gdb/tui/tuiGeneralWin.c b/gdb/tui/tuiGeneralWin.c
index e250ca2ac78..42faf756284 100644
--- a/gdb/tui/tuiGeneralWin.c
+++ b/gdb/tui/tuiGeneralWin.c
@@ -1,6 +1,6 @@
/* General window behavior.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
Inc.
Contributed by Hewlett-Packard Company.
@@ -22,15 +22,12 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
- "defs.h" should be included first. Unfortunatly some systems
- (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
- and they clash with "bfd.h"'s definiton of true/false. The correct
- fix is to remove true/false from "bfd.h", however, until that
- happens, hack around it by including "config.h" and <curses.h>
- first. */
+#include "defs.h"
+#include "tui.h"
+#include "tuiData.h"
+#include "tuiGeneralWin.h"
+#include "tuiWin.h"
-#include "config.h"
#ifdef HAVE_NCURSES_H
#include <ncurses.h>
#else
@@ -39,12 +36,6 @@
#endif
#endif
-#include "defs.h"
-#include "tui.h"
-#include "tuiData.h"
-#include "tuiGeneralWin.h"
-#include "tuiWin.h"
-
/***********************
** PUBLIC FUNCTIONS
***********************/
diff --git a/gdb/tui/tuiIO.c b/gdb/tui/tuiIO.c
index f53cef39d23..1a8bbc2037a 100644
--- a/gdb/tui/tuiIO.c
+++ b/gdb/tui/tuiIO.c
@@ -1,6 +1,6 @@
/* TUI support I/O functions.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
Inc.
Contributed by Hewlett-Packard Company.
@@ -22,24 +22,6 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
- "defs.h" should be included first. Unfortunatly some systems
- (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
- and they clash with "bfd.h"'s definiton of true/false. The correct
- fix is to remove true/false from "bfd.h", however, until that
- happens, hack around it by including "config.h" and <curses.h>
- first. */
-
-#include "config.h"
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
-
-#include <stdio.h>
#include "defs.h"
#include "terminal.h"
#include "target.h"
@@ -59,6 +41,15 @@
#include "cli-out.h"
#include <fcntl.h>
#include <signal.h>
+#include <stdio.h>
+
+#ifdef HAVE_NCURSES_H
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#endif
+#endif
/* Use definition from readline 4.3. */
#undef CTRL_CHAR
diff --git a/gdb/tui/tuiLayout.c b/gdb/tui/tuiLayout.c
index cddbd14342f..b79bfcb8c28 100644
--- a/gdb/tui/tuiLayout.c
+++ b/gdb/tui/tuiLayout.c
@@ -1,6 +1,6 @@
/* TUI layout window management.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
Inc.
Contributed by Hewlett-Packard Company.
@@ -22,23 +22,6 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
- "defs.h" should be included first. Unfortunatly some systems
- (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
- and they clash with "bfd.h"'s definiton of true/false. The correct
- fix is to remove true/false from "bfd.h", however, until that
- happens, hack around it by including "config.h" and <curses.h>
- first. */
-
-#include "config.h"
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
-
#include "defs.h"
#include "command.h"
#include "symtab.h"
@@ -56,6 +39,14 @@
#include "tuiSourceWin.h"
#include "tuiDisassem.h"
+#ifdef HAVE_NCURSES_H
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#endif
+#endif
+
/*******************************
** Static Local Decls
********************************/
diff --git a/gdb/tui/tuiRegs.c b/gdb/tui/tuiRegs.c
index 61b933444da..9f0b1a4d845 100644
--- a/gdb/tui/tuiRegs.c
+++ b/gdb/tui/tuiRegs.c
@@ -1,6 +1,6 @@
/* TUI display registers in window.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
Inc.
Contributed by Hewlett-Packard Company.
@@ -22,23 +22,6 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
- "defs.h" should be included first. Unfortunatly some systems
- (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
- and they clash with "bfd.h"'s definiton of true/false. The correct
- fix is to remove true/false from "bfd.h", however, until that
- happens, hack around it by including "config.h" and <curses.h>
- first. */
-
-#include "config.h"
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
-
#include "defs.h"
#include "tui.h"
#include "tuiData.h"
@@ -55,6 +38,14 @@
#include "tuiGeneralWin.h"
#include "tui-file.h"
+#ifdef HAVE_NCURSES_H
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#endif
+#endif
+
/*****************************************
** LOCAL DEFINITIONS **
******************************************/
diff --git a/gdb/tui/tuiSource.c b/gdb/tui/tuiSource.c
index ceccd64532e..6428130d780 100644
--- a/gdb/tui/tuiSource.c
+++ b/gdb/tui/tuiSource.c
@@ -1,6 +1,6 @@
/* TUI display source window.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
Inc.
Contributed by Hewlett-Packard Company.
@@ -22,23 +22,6 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
- "defs.h" should be included first. Unfortunatly some systems
- (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
- and they clash with "bfd.h"'s definiton of true/false. The correct
- fix is to remove true/false from "bfd.h", however, until that
- happens, hack around it by including "config.h" and <curses.h>
- first. */
-
-#include "config.h"
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
-
#include "defs.h"
#include <ctype.h>
#include "symtab.h"
@@ -53,6 +36,13 @@
#include "tuiSourceWin.h"
#include "tuiSource.h"
+#ifdef HAVE_NCURSES_H
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#endif
+#endif
/* Function to display source in the source window. */
TuiStatus
@@ -340,7 +330,7 @@ tuiVerticalSourceScroll (TuiScrollDirection scrollDirection,
struct symtab_and_line cursal = get_current_source_symtab_and_line ();
if (cursal.symtab == (struct symtab *) NULL)
- s = find_pc_symtab (deprecated_selected_frame->pc);
+ s = find_pc_symtab (get_frame_pc (deprecated_selected_frame));
else
s = cursal.symtab;
diff --git a/gdb/tui/tuiSourceWin.c b/gdb/tui/tuiSourceWin.c
index ae844ce7029..cf5a0793f65 100644
--- a/gdb/tui/tuiSourceWin.c
+++ b/gdb/tui/tuiSourceWin.c
@@ -1,6 +1,6 @@
/* TUI display source/assembly window.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
Inc.
Contributed by Hewlett-Packard Company.
@@ -22,23 +22,6 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
- "defs.h" should be included first. Unfortunatly some systems
- (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
- and they clash with "bfd.h"'s definiton of true/false. The correct
- fix is to remove true/false from "bfd.h", however, until that
- happens, hack around it by including "config.h" and <curses.h>
- first. */
-
-#include "config.h"
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
-
#include "defs.h"
#include <ctype.h>
#include "symtab.h"
@@ -56,6 +39,13 @@
#include "tuiSource.h"
#include "tuiDisassem.h"
+#ifdef HAVE_NCURSES_H
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#endif
+#endif
/* Function to display the "main" routine. */
void
@@ -355,7 +345,7 @@ tuiHorizontalSourceScroll (TuiWinInfoPtr winInfo,
struct symtab_and_line cursal = get_current_source_symtab_and_line ();
if (cursal.symtab == (struct symtab *) NULL)
- s = find_pc_symtab (deprecated_selected_frame->pc);
+ s = find_pc_symtab (get_frame_pc (deprecated_selected_frame));
else
s = cursal.symtab;
diff --git a/gdb/tui/tuiStack.c b/gdb/tui/tuiStack.c
index 69a6b6c662f..a6ad07af1c3 100644
--- a/gdb/tui/tuiStack.c
+++ b/gdb/tui/tuiStack.c
@@ -1,6 +1,6 @@
/* TUI display locator.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
Inc.
Contributed by Hewlett-Packard Company.
@@ -22,23 +22,6 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
- "defs.h" should be included first. Unfortunatly some systems
- (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
- and they clash with "bfd.h"'s definiton of true/false. The correct
- fix is to remove true/false from "bfd.h", however, until that
- happens, hack around it by including "config.h" and <curses.h>
- first. */
-
-#include "config.h"
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
-
#include "defs.h"
#include "symtab.h"
#include "breakpoint.h"
@@ -56,6 +39,13 @@
#include "tuiSourceWin.h"
#include "tui-file.h"
+#ifdef HAVE_NCURSES_H
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#endif
+#endif
/* Get a printable name for the function at the address.
The symbol name is demangled if demangling is turned on.
@@ -233,7 +223,7 @@ tui_get_function_from_frame (struct frame_info *fi)
struct ui_file *stream = tui_sfileopen (256);
char *p;
- print_address_symbolic (fi->pc, stream, demangle, "");
+ print_address_symbolic (get_frame_pc (fi), stream, demangle, "");
p = tui_file_get_strbuf (stream);
/* Use simple heuristics to isolate the function name. The symbol can
@@ -356,7 +346,7 @@ tuiShowFrameInfo (struct frame_info *fi)
tui_set_locator_info (sal.symtab == 0 ? "??" : sal.symtab->filename,
tui_get_function_from_frame (fi),
sal.line,
- fi->pc);
+ get_frame_pc (fi));
tuiShowLocatorContent ();
startLine = 0;
for (i = 0; i < (sourceWindows ())->count; i++)
@@ -374,10 +364,11 @@ tuiShowFrameInfo (struct frame_info *fi)
}
else
{
- if (find_pc_partial_function (fi->pc, (char **) NULL, &low, (CORE_ADDR) NULL) == 0)
+ if (find_pc_partial_function (get_frame_pc (fi), (char **) NULL,
+ &low, (CORE_ADDR) NULL) == 0)
error ("No function contains program counter for selected frame.\n");
else
- low = tuiGetLowDisassemblyAddress (low, fi->pc);
+ low = tuiGetLowDisassemblyAddress (low, get_frame_pc (fi));
}
if (winInfo == srcWin)
diff --git a/gdb/tui/tuiWin.c b/gdb/tui/tuiWin.c
index 9ad82f57a65..ecd4920601b 100644
--- a/gdb/tui/tuiWin.c
+++ b/gdb/tui/tuiWin.c
@@ -1,6 +1,6 @@
/* TUI window generic functions.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation,
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
Inc.
Contributed by Hewlett-Packard Company.
@@ -27,26 +27,6 @@
Author: Susan B. Macchia */
-/* FIXME: cagney/2002-02-28: The GDB coding standard indicates that
- "defs.h" should be included first. Unfortunatly some systems
- (currently Debian GNU/Linux) include the <stdbool.h> via <curses.h>
- and they clash with "bfd.h"'s definiton of true/false. The correct
- fix is to remove true/false from "bfd.h", however, until that
- happens, hack around it by including "config.h" and <curses.h>
- first. */
-
-#include "config.h"
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#else
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-#endif
-
-#include <string.h>
-#include <ctype.h>
-#include <readline/readline.h>
#include "defs.h"
#include "command.h"
#include "symtab.h"
@@ -66,6 +46,18 @@
#include "tuiSourceWin.h"
#include "tuiDataWin.h"
+#ifdef HAVE_NCURSES_H
+#include <ncurses.h>
+#else
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#endif
+#endif
+
+#include <string.h>
+#include <ctype.h>
+#include <readline/readline.h>
+
/*******************************
** Static Local Decls
********************************/
@@ -1406,7 +1398,7 @@ _makeVisibleWithNewHeight (TuiWinInfoPtr winInfo)
struct symtab_and_line cursal = get_current_source_symtab_and_line ();
- s = find_pc_symtab (deprecated_selected_frame->pc);
+ s = find_pc_symtab (get_frame_pc (deprecated_selected_frame));
if (winInfo->generic.type == SRC_WIN)
line.lineNo = cursal.line;
else
diff --git a/gdb/typeprint.c b/gdb/typeprint.c
index ab8bf674a9b..00b0eae2342 100644
--- a/gdb/typeprint.c
+++ b/gdb/typeprint.c
@@ -33,7 +33,7 @@
#include "target.h"
#include "language.h"
#include "cp-abi.h"
-
+#include "typeprint.h"
#include "gdb_string.h"
#include <errno.h>
diff --git a/gdb/ui-file.c b/gdb/ui-file.c
index 3af6d2cc3b2..6ad5414b19f 100644
--- a/gdb/ui-file.c
+++ b/gdb/ui-file.c
@@ -25,9 +25,12 @@
#include "ui-file.h"
#include "gdb_string.h"
+#include <errno.h>
+
static ui_file_isatty_ftype null_file_isatty;
static ui_file_write_ftype null_file_write;
static ui_file_fputs_ftype null_file_fputs;
+static ui_file_read_ftype null_file_read;
static ui_file_flush_ftype null_file_flush;
static ui_file_delete_ftype null_file_delete;
static ui_file_rewind_ftype null_file_rewind;
@@ -39,6 +42,7 @@ struct ui_file
ui_file_flush_ftype *to_flush;
ui_file_write_ftype *to_write;
ui_file_fputs_ftype *to_fputs;
+ ui_file_read_ftype *to_read;
ui_file_delete_ftype *to_delete;
ui_file_isatty_ftype *to_isatty;
ui_file_rewind_ftype *to_rewind;
@@ -56,6 +60,7 @@ ui_file_new (void)
set_ui_file_flush (file, null_file_flush);
set_ui_file_write (file, null_file_write);
set_ui_file_fputs (file, null_file_fputs);
+ set_ui_file_read (file, null_file_read);
set_ui_file_isatty (file, null_file_isatty);
set_ui_file_rewind (file, null_file_rewind);
set_ui_file_put (file, null_file_put);
@@ -123,6 +128,15 @@ null_file_write (struct ui_file *file,
}
}
+static long
+null_file_read (struct ui_file *file,
+ char *buf,
+ long sizeof_buf)
+{
+ errno = EBADF;
+ return 0;
+}
+
static void
null_file_fputs (const char *buf, struct ui_file *file)
{
@@ -186,6 +200,12 @@ ui_file_write (struct ui_file *file,
file->to_write (file, buf, length_buf);
}
+long
+ui_file_read (struct ui_file *file, char *buf, long length_buf)
+{
+ return file->to_read (file, buf, length_buf);
+}
+
void
fputs_unfiltered (const char *buf, struct ui_file *file)
{
@@ -224,6 +244,12 @@ set_ui_file_write (struct ui_file *file,
}
void
+set_ui_file_read (struct ui_file *file, ui_file_read_ftype *read)
+{
+ file->to_read = read;
+}
+
+void
set_ui_file_fputs (struct ui_file *file, ui_file_fputs_ftype *fputs)
{
file->to_fputs = fputs;
@@ -383,6 +409,7 @@ mem_file_write (struct ui_file *file,
static ui_file_write_ftype stdio_file_write;
static ui_file_fputs_ftype stdio_file_fputs;
+static ui_file_read_ftype stdio_file_read;
static ui_file_isatty_ftype stdio_file_isatty;
static ui_file_delete_ftype stdio_file_delete;
static struct ui_file *stdio_file_new (FILE * file, int close_p);
@@ -409,6 +436,7 @@ stdio_file_new (FILE *file, int close_p)
set_ui_file_flush (ui_file, stdio_file_flush);
set_ui_file_write (ui_file, stdio_file_write);
set_ui_file_fputs (ui_file, stdio_file_fputs);
+ set_ui_file_read (ui_file, stdio_file_read);
set_ui_file_isatty (ui_file, stdio_file_isatty);
return ui_file;
}
@@ -437,6 +465,16 @@ stdio_file_flush (struct ui_file *file)
fflush (stdio->file);
}
+static long
+stdio_file_read (struct ui_file *file, char *buf, long length_buf)
+{
+ struct stdio_file *stdio = ui_file_data (file);
+ if (stdio->magic != &stdio_file_magic)
+ internal_error (__FILE__, __LINE__,
+ "stdio_file_read: bad magic number");
+ return read (fileno (stdio->file), buf, length_buf);
+}
+
static void
stdio_file_write (struct ui_file *file, const char *buf, long length_buf)
{
diff --git a/gdb/ui-file.h b/gdb/ui-file.h
index 989c343dfa0..8b28d1a4139 100644
--- a/gdb/ui-file.h
+++ b/gdb/ui-file.h
@@ -41,6 +41,9 @@ extern void set_ui_file_write (struct ui_file *stream, ui_file_write_ftype *fput
typedef void (ui_file_fputs_ftype) (const char *, struct ui_file * stream);
extern void set_ui_file_fputs (struct ui_file *stream, ui_file_fputs_ftype * fputs);
+typedef long (ui_file_read_ftype) (struct ui_file * stream, char *buf, long length_buf);
+extern void set_ui_file_read (struct ui_file *stream, ui_file_read_ftype *fread);
+
typedef int (ui_file_isatty_ftype) (struct ui_file * stream);
extern void set_ui_file_isatty (struct ui_file *stream, ui_file_isatty_ftype * isatty);
@@ -78,6 +81,8 @@ extern char *ui_file_xstrdup (struct ui_file *file, long *length);
+extern long ui_file_read (struct ui_file *file, char *buf, long length_buf);
+
/* Create/open a memory based file. Can be used as a scratch buffer
for collecting output. */
extern struct ui_file *mem_fileopen (void);
diff --git a/gdb/ui-out.c b/gdb/ui-out.c
index ed32da3ded8..71e6d6ac070 100644
--- a/gdb/ui-out.c
+++ b/gdb/ui-out.c
@@ -437,15 +437,6 @@ make_cleanup_ui_out_end (struct ui_out *uiout,
}
struct cleanup *
-make_cleanup_ui_out_begin_end (struct ui_out *uiout,
- enum ui_out_type type,
- const char *id)
-{
- ui_out_begin (uiout, type, id);
- return make_cleanup_ui_out_end (uiout, type);
-}
-
-struct cleanup *
make_cleanup_ui_out_tuple_begin_end (struct ui_out *uiout,
const char *id)
{
diff --git a/gdb/utils.c b/gdb/utils.c
index 6d62f1c64ba..96a2490480d 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -689,42 +689,49 @@ static void
internal_vproblem (struct internal_problem *problem,
const char *file, int line, const char *fmt, va_list ap)
{
- static char msg[] = "Recursive internal problem.\n";
static int dejavu;
int quit_p;
int dump_core_p;
+ char *reason;
/* Don't allow infinite error/warning recursion. */
- switch (dejavu)
- {
- case 0:
- dejavu = 1;
- break;
- case 1:
- dejavu = 2;
- fputs_unfiltered (msg, gdb_stderr);
- abort (); /* NOTE: GDB has only three calls to abort(). */
- default:
- dejavu = 3;
- write (STDERR_FILENO, msg, sizeof (msg));
- exit (1);
- }
+ {
+ static char msg[] = "Recursive internal problem.\n";
+ switch (dejavu)
+ {
+ case 0:
+ dejavu = 1;
+ break;
+ case 1:
+ dejavu = 2;
+ fputs_unfiltered (msg, gdb_stderr);
+ abort (); /* NOTE: GDB has only three calls to abort(). */
+ default:
+ dejavu = 3;
+ write (STDERR_FILENO, msg, sizeof (msg));
+ exit (1);
+ }
+ }
/* Try to get the message out and at the start of a new line. */
target_terminal_ours ();
begin_line ();
- /* The error/warning message. Format using a style similar to a
- compiler error message. */
- fprintf_unfiltered (gdb_stderr, "%s:%d: %s: ", file, line, problem->name);
- vfprintf_unfiltered (gdb_stderr, fmt, ap);
- fputs_unfiltered ("\n", gdb_stderr);
-
- /* Provide more details so that the user knows that they are living
- on the edge. */
- fprintf_unfiltered (gdb_stderr, "\
-A problem internal to GDB has been detected. Further\n\
-debugging may prove unreliable.\n");
+ /* Create a string containing the full error/warning message. Need
+ to call query with this full string, as otherwize the reason
+ (error/warning) and question become separated. Format using a
+ style similar to a compiler error message. Include extra detail
+ so that the user knows that they are living on the edge. */
+ {
+ char *msg;
+ xasprintf (&msg, fmt, ap);
+ xasprintf (&reason, "\
+%s:%d: %s: %s\n\
+A problem internal to GDB has been detected,\n\
+further debugging may prove unreliable.", file, line, problem->name, msg);
+ xfree (msg);
+ make_cleanup (xfree, reason);
+ }
switch (problem->should_quit)
{
@@ -732,7 +739,7 @@ debugging may prove unreliable.\n");
/* Default (yes/batch case) is to quit GDB. When in batch mode
this lessens the likelhood of GDB going into an infinate
loop. */
- quit_p = query ("Quit this debugging session? ");
+ quit_p = query ("%s\nQuit this debugging session? ", reason);
break;
case AUTO_BOOLEAN_TRUE:
quit_p = 1;
@@ -750,7 +757,7 @@ debugging may prove unreliable.\n");
/* Default (yes/batch case) is to dump core. This leaves a GDB
`dropping' so that it is easier to see that something went
wrong in GDB. */
- dump_core_p = query ("Create a core file of GDB? ");
+ dump_core_p = query ("%s\nCreate a core file of GDB? ", reason);
break;
break;
case AUTO_BOOLEAN_TRUE:
diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c
index 0f896a49fb3..19bdec398e0 100644
--- a/gdb/v850-tdep.c
+++ b/gdb/v850-tdep.c
@@ -797,7 +797,7 @@ v850_scan_prologue (CORE_ADDR pc, struct prologue_info *pi)
when trying to get the value of caller-saves registers for an inner
frame. */
-CORE_ADDR
+static CORE_ADDR
v850_find_callers_reg (struct frame_info *fi, int regnum)
{
for (; fi; fi = get_next_frame (fi))
@@ -819,7 +819,7 @@ v850_find_callers_reg (struct frame_info *fi, int regnum)
just return the stack pointer that was in use at the time the
function call was made. */
-CORE_ADDR
+static CORE_ADDR
v850_frame_chain (struct frame_info *fi)
{
struct prologue_info pi;
@@ -850,7 +850,7 @@ v850_frame_chain (struct frame_info *fi)
/* Function: skip_prologue
Return the address of the first code past the prologue of the function. */
-CORE_ADDR
+static CORE_ADDR
v850_skip_prologue (CORE_ADDR pc)
{
CORE_ADDR func_addr, func_end;
@@ -880,7 +880,7 @@ v850_skip_prologue (CORE_ADDR pc)
This routine gets called when either the user uses the `return'
command, or the call dummy breakpoint gets hit. */
-void
+static void
v850_pop_frame (void)
{
struct frame_info *frame = get_current_frame ();
@@ -917,7 +917,7 @@ v850_pop_frame (void)
Stack space for the args has NOT been allocated: that job is up to us.
*/
-CORE_ADDR
+static CORE_ADDR
v850_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
{
@@ -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);
@@ -997,7 +997,7 @@ v850_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
Set up the return address for the inferior function call.
Needed for targets where we don't actually execute a JSR/BSR instruction */
-CORE_ADDR
+static CORE_ADDR
v850_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
{
write_register (E_RP_REGNUM, CALL_DUMMY_ADDRESS ());
@@ -1011,7 +1011,7 @@ v850_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
instead of RP, because that's where "caller" of the dummy-frame
will be found. */
-CORE_ADDR
+static CORE_ADDR
v850_frame_saved_pc (struct frame_info *fi)
{
if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
@@ -1030,7 +1030,7 @@ v850_frame_saved_pc (struct frame_info *fi)
trap
*/
-void
+static void
v850_fix_call_dummy (char *dummy, CORE_ADDR sp, CORE_ADDR fun, int nargs,
struct value **args, struct type *type, int gcc_p)
{
@@ -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
@@ -1231,12 +1231,12 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_name (gdbarch, v850_register_name);
set_gdbarch_deprecated_register_size (gdbarch, v850_reg_size);
set_gdbarch_deprecated_register_bytes (gdbarch, E_ALL_REGS_SIZE);
- set_gdbarch_register_byte (gdbarch, v850_register_byte);
- set_gdbarch_register_raw_size (gdbarch, v850_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, v850_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, v850_register_raw_size);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, v850_reg_size);
- set_gdbarch_register_virtual_size (gdbarch, v850_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, v850_register_raw_size);
set_gdbarch_deprecated_max_register_virtual_size (gdbarch, v850_reg_size);
- set_gdbarch_register_virtual_type (gdbarch, v850_reg_virtual_type);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, v850_reg_virtual_type);
set_gdbarch_deprecated_target_read_fp (gdbarch, v850_target_read_fp);
@@ -1262,8 +1262,6 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_function_start_offset (gdbarch, 0);
/* This value is almost never non-zero... */
set_gdbarch_frame_args_skip (gdbarch, 0);
- /* OK to default this value to 'unknown'. */
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
/*
* Call Dummies
@@ -1288,11 +1286,13 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_long_double_bit (gdbarch, 8 * TARGET_CHAR_BIT);
/* Should be using push_dummy_call. */
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
return gdbarch;
}
+extern initialize_file_ftype _initialize_v850_tdep; /* -Wmissing-prototypes */
+
void
_initialize_v850_tdep (void)
{
diff --git a/gdb/valops.c b/gdb/valops.c
index 0bc88071030..f0d1a2a0f95 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -36,6 +36,7 @@
#include "block.h"
#include "infcall.h"
#include "dictionary.h"
+#include "cp-support.h"
#include <errno.h>
#include "gdb_string.h"
@@ -552,22 +553,6 @@ value_assign (struct value *toval, struct value *fromval)
COERCE_ARRAY (fromval);
CHECK_TYPEDEF (type);
- /* If TOVAL is a special machine register requiring conversion
- of program values to a special raw format,
- convert FROMVAL's contents now, with result in `raw_buffer',
- and set USE_BUFFER to the number of bytes to write. */
-
- if (VALUE_REGNO (toval) >= 0)
- {
- int regno = VALUE_REGNO (toval);
- if (CONVERT_REGISTER_P (regno))
- {
- struct type *fromtype = check_typedef (VALUE_TYPE (fromval));
- VALUE_TO_REGISTER (fromtype, regno, VALUE_CONTENTS (fromval), raw_buffer);
- use_buffer = REGISTER_RAW_SIZE (regno);
- }
- }
-
/* Since modifying a register can trash the frame chain, and modifying memory
can trash the frame cache, we save the old frame and then restore the new
frame afterwards. */
@@ -641,17 +626,8 @@ value_assign (struct value *toval, struct value *fromval)
case lval_reg_frame_relative:
case lval_register:
{
- /* value is stored in a series of registers in the frame
- specified by the structure. Copy that value out, modify
- it, and copy it back in. */
- int amount_copied;
- int amount_to_copy;
- char *buffer;
- int value_reg;
- int reg_offset;
- int byte_offset;
- int regno;
struct frame_info *frame;
+ int value_reg;
/* Figure out which frame this is in currently. */
if (VALUE_LVAL (toval) == lval_register)
@@ -661,101 +637,83 @@ 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);
}
if (!frame)
error ("Value being assigned to is no longer active.");
-
- /* Locate the first register that falls in the value that
- needs to be transfered. Compute the offset of the value in
- that register. */
- {
- int offset;
- for (reg_offset = value_reg, offset = 0;
- offset + REGISTER_RAW_SIZE (reg_offset) <= VALUE_OFFSET (toval);
- reg_offset++);
- byte_offset = VALUE_OFFSET (toval) - offset;
- }
-
- /* Compute the number of register aligned values that need to
- be copied. */
- if (VALUE_BITSIZE (toval))
- amount_to_copy = byte_offset + 1;
- else
- amount_to_copy = byte_offset + TYPE_LENGTH (type);
-
- /* And a bounce buffer. Be slightly over generous. */
- buffer = (char *) alloca (amount_to_copy + MAX_REGISTER_SIZE);
-
- /* Copy it in. */
- for (regno = reg_offset, amount_copied = 0;
- amount_copied < amount_to_copy;
- amount_copied += REGISTER_RAW_SIZE (regno), regno++)
- {
- frame_register_read (frame, regno, buffer + amount_copied);
- }
- /* Modify what needs to be modified. */
- if (VALUE_BITSIZE (toval))
- {
- modify_field (buffer + byte_offset,
- value_as_long (fromval),
- VALUE_BITPOS (toval), VALUE_BITSIZE (toval));
- }
- else if (use_buffer)
+ if (VALUE_LVAL (toval) == lval_reg_frame_relative
+ && CONVERT_REGISTER_P (VALUE_FRAME_REGNUM (toval), type))
{
- memcpy (buffer + VALUE_OFFSET (toval), raw_buffer, use_buffer);
+ /* If TOVAL is a special machine register requiring
+ conversion of program values to a special raw format. */
+ VALUE_TO_REGISTER (frame, VALUE_FRAME_REGNUM (toval),
+ type, VALUE_CONTENTS (fromval));
}
else
{
- memcpy (buffer + byte_offset, VALUE_CONTENTS (fromval),
- TYPE_LENGTH (type));
- /* Do any conversion necessary when storing this type to
- more than one register. */
-#ifdef REGISTER_CONVERT_FROM_TYPE
- REGISTER_CONVERT_FROM_TYPE (value_reg, type,
- (buffer + byte_offset));
-#endif
- }
+ /* TOVAL is stored in a series of registers in the frame
+ specified by the structure. Copy that value out,
+ modify it, and copy it back in. */
+ int amount_copied;
+ int amount_to_copy;
+ char *buffer;
+ int reg_offset;
+ int byte_offset;
+ int regno;
+
+ /* Locate the first register that falls in the value that
+ needs to be transfered. Compute the offset of the
+ value in that register. */
+ {
+ int offset;
+ for (reg_offset = value_reg, offset = 0;
+ offset + REGISTER_RAW_SIZE (reg_offset) <= VALUE_OFFSET (toval);
+ reg_offset++);
+ byte_offset = VALUE_OFFSET (toval) - offset;
+ }
- /* Copy it out. */
- for (regno = reg_offset, amount_copied = 0;
- amount_copied < amount_to_copy;
- amount_copied += REGISTER_RAW_SIZE (regno), regno++)
- {
- enum lval_type lval;
- CORE_ADDR addr;
- int optim;
- int realnum;
+ /* Compute the number of register aligned values that need
+ to be copied. */
+ if (VALUE_BITSIZE (toval))
+ amount_to_copy = byte_offset + 1;
+ else
+ amount_to_copy = byte_offset + TYPE_LENGTH (type);
- /* Just find out where to put it. */
- frame_register (frame, regno, &optim, &lval, &addr, &realnum,
- NULL);
+ /* And a bounce buffer. Be slightly over generous. */
+ buffer = (char *) alloca (amount_to_copy + MAX_REGISTER_SIZE);
+
+ /* Copy it in. */
+ for (regno = reg_offset, amount_copied = 0;
+ amount_copied < amount_to_copy;
+ amount_copied += REGISTER_RAW_SIZE (regno), regno++)
+ frame_register_read (frame, regno, buffer + amount_copied);
- if (optim)
- error ("Attempt to assign to a value that was optimized out.");
- if (lval == lval_memory)
- write_memory (addr, buffer + amount_copied,
- REGISTER_RAW_SIZE (regno));
- else if (lval == lval_register)
- regcache_cooked_write (current_regcache, realnum,
- (buffer + amount_copied));
+ /* Modify what needs to be modified. */
+ if (VALUE_BITSIZE (toval))
+ modify_field (buffer + byte_offset,
+ value_as_long (fromval),
+ VALUE_BITPOS (toval), VALUE_BITSIZE (toval));
+ else if (use_buffer)
+ memcpy (buffer + VALUE_OFFSET (toval), raw_buffer, use_buffer);
else
- error ("Attempt to assign to an unmodifiable value.");
- }
+ memcpy (buffer + byte_offset, VALUE_CONTENTS (fromval),
+ TYPE_LENGTH (type));
+
+ /* Copy it out. */
+ for (regno = reg_offset, amount_copied = 0;
+ amount_copied < amount_to_copy;
+ amount_copied += REGISTER_RAW_SIZE (regno), regno++)
+ put_frame_register (frame, regno, buffer + amount_copied);
+ }
if (register_changed_hook)
register_changed_hook (-1);
target_changed_event ();
-
+ break;
}
- break;
-
default:
error ("Left operand of assignment is not an lvalue.");
@@ -2808,7 +2766,6 @@ value_of_local (const char *name, int complain)
{
struct symbol *func, *sym;
struct block *b;
- int i;
struct value * ret;
if (deprecated_selected_frame == 0)
diff --git a/gdb/value.h b/gdb/value.h
index 4c5453651ff..51235f9b142 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 ffbfe3d1669..2dc2ed8c302 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/varobj.c b/gdb/varobj.c
index 0c9f0484268..1c5fc6382f5 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -1379,9 +1379,8 @@ make_cleanup_free_variable (struct varobj *var)
return make_cleanup (do_free_variable_cleanup, var);
}
-/* This returns the type of the variable. This skips past typedefs
- and returns the real type of the variable. It also dereferences
- pointers and references.
+/* This returns the type of the variable. It also skips past typedefs
+ to return the real type of the variable.
NOTE: TYPE_TARGET_TYPE should NOT be used anywhere in this file
except within get_target_type and get_type. */
@@ -1391,8 +1390,8 @@ get_type (struct varobj *var)
struct type *type;
type = var->type;
- while (type != NULL && TYPE_CODE (type) == TYPE_CODE_TYPEDEF)
- type = TYPE_TARGET_TYPE (type);
+ if (type != NULL)
+ type = check_typedef (type);
return type;
}
@@ -1423,8 +1422,8 @@ get_target_type (struct type *type)
if (type != NULL)
{
type = TYPE_TARGET_TYPE (type);
- while (type != NULL && TYPE_CODE (type) == TYPE_CODE_TYPEDEF)
- type = TYPE_TARGET_TYPE (type);
+ if (type != NULL)
+ type = check_typedef (type);
}
return type;
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index 814fedd8543..c2a3fbb5033 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -34,16 +34,10 @@
#include "vax-tdep.h"
static gdbarch_register_name_ftype vax_register_name;
-static gdbarch_register_byte_ftype vax_register_byte;
-static gdbarch_register_raw_size_ftype vax_register_raw_size;
-static gdbarch_register_virtual_size_ftype vax_register_virtual_size;
-static gdbarch_register_virtual_type_ftype vax_register_virtual_type;
static gdbarch_skip_prologue_ftype vax_skip_prologue;
static gdbarch_frame_num_args_ftype vax_frame_num_args;
static gdbarch_deprecated_frame_chain_ftype vax_frame_chain;
-static gdbarch_frame_args_address_ftype vax_frame_args_address;
-static gdbarch_frame_locals_address_ftype vax_frame_locals_address;
static gdbarch_deprecated_extract_return_value_ftype vax_extract_return_value;
static gdbarch_deprecated_extract_struct_value_address_ftype
@@ -140,7 +134,7 @@ vax_sigtramp_saved_pc (struct frame_info *frame)
/* Get sigcontext address, it is the third parameter on the stack. */
if (get_next_frame (frame))
sigcontext_addr = read_memory_typed_address
- (FRAME_ARGS_ADDRESS (get_next_frame (frame))
+ (DEPRECATED_FRAME_ARGS_ADDRESS (get_next_frame (frame))
+ FRAME_ARGS_SKIP + sigcontext_offs,
builtin_type_void_data_ptr);
else
@@ -162,46 +156,30 @@ vax_frame_saved_pc (struct frame_info *frame)
return (read_memory_integer (get_frame_base (frame) + 16, 4));
}
-CORE_ADDR
-vax_frame_args_address_correct (struct frame_info *frame)
-{
- /* Cannot find the AP register value directly from the FP value. Must
- find it saved in the frame called by this one, or in the AP register
- for the innermost frame. However, there is no way to tell the
- difference between the innermost frame and a frame for which we
- just don't know the frame that it called (e.g. "info frame 0x7ffec789").
- For the sake of argument, suppose that the stack is somewhat trashed
- (which is one reason that "info frame" exists). So, return 0 (indicating
- we don't know the address of the arglist) if we don't know what frame
- this frame calls. */
- if (get_next_frame (frame))
- return (read_memory_integer (get_frame_base (get_next_frame (frame)) + 8, 4));
-
- return (0);
-}
-
static CORE_ADDR
vax_frame_args_address (struct frame_info *frame)
{
- /* In most of GDB, getting the args address is too important to
- just say "I don't know". This is sometimes wrong for functions
- that aren't on top of the stack, but c'est la vie. */
+ /* In most of GDB, getting the args address is too important to just
+ say "I don't know". This is sometimes wrong for functions that
+ aren't on top of the stack, but c'est la vie. */
if (get_next_frame (frame))
return (read_memory_integer (get_frame_base (get_next_frame (frame)) + 8, 4));
-
- return (read_register (VAX_AP_REGNUM));
-}
-
-static CORE_ADDR
-vax_frame_locals_address (struct frame_info *frame)
-{
- return (get_frame_base (frame));
+ /* Cannot find the AP register value directly from the FP value.
+ Must find it saved in the frame called by this one, or in the AP
+ register for the innermost frame. However, there is no way to
+ tell the difference between the innermost frame and a frame for
+ which we just don't know the frame that it called (e.g. "info
+ frame 0x7ffec789"). For the sake of argument, suppose that the
+ stack is somewhat trashed (which is one reason that "info frame"
+ exists). So, return 0 (indicating we don't know the address of
+ the arglist) if we don't know what frame this frame calls. */
+ return 0;
}
static int
vax_frame_num_args (struct frame_info *fi)
{
- return (0xff & read_memory_integer (FRAME_ARGS_ADDRESS (fi), 1));
+ return (0xff & read_memory_integer (DEPRECATED_FRAME_ARGS_ADDRESS (fi), 1));
}
static CORE_ADDR
@@ -300,7 +278,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 *
@@ -380,13 +359,13 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_name (gdbarch, vax_register_name);
set_gdbarch_deprecated_register_size (gdbarch, VAX_REGISTER_SIZE);
set_gdbarch_deprecated_register_bytes (gdbarch, VAX_REGISTER_BYTES);
- set_gdbarch_register_byte (gdbarch, vax_register_byte);
- set_gdbarch_register_raw_size (gdbarch, vax_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, vax_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, vax_register_raw_size);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, VAX_MAX_REGISTER_RAW_SIZE);
- set_gdbarch_register_virtual_size (gdbarch, vax_register_virtual_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, vax_register_virtual_size);
set_gdbarch_deprecated_max_register_virtual_size (gdbarch,
VAX_MAX_REGISTER_VIRTUAL_SIZE);
- set_gdbarch_register_virtual_type (gdbarch, vax_register_virtual_type);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, vax_register_virtual_type);
/* Frame and stack info */
set_gdbarch_skip_prologue (gdbarch, vax_skip_prologue);
@@ -399,8 +378,7 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_frame_chain (gdbarch, vax_frame_chain);
set_gdbarch_deprecated_frame_saved_pc (gdbarch, vax_frame_saved_pc);
- set_gdbarch_frame_args_address (gdbarch, vax_frame_args_address);
- set_gdbarch_frame_locals_address (gdbarch, vax_frame_locals_address);
+ set_gdbarch_deprecated_frame_args_address (gdbarch, vax_frame_args_address);
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, vax_frame_init_saved_regs);
@@ -434,7 +412,7 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
/* Should be using push_dummy_call. */
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
/* Hook in ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch);
@@ -444,6 +422,8 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
return (gdbarch);
}
+extern initialize_file_ftype _initialize_vax_tdep; /* -Wmissing-prototypes */
+
void
_initialize_vax_tdep (void)
{
diff --git a/gdb/version.in b/gdb/version.in
index 0729879472b..0e6ab966497 100644
--- a/gdb/version.in
+++ b/gdb/version.in
@@ -1 +1 @@
-2003-05-23-cvs
+2003-06-27-cvs
diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c
index 72e8c3f4c73..c2227cd29fe 100644
--- a/gdb/win32-nat.c
+++ b/gdb/win32-nat.c
@@ -842,14 +842,17 @@ solib_symbols_add (char *name, int from_tty, CORE_ADDR load_addr)
else
{
/* Fallback on handling just the .text section. */
- struct section_addr_info section_addrs;
+ struct section_addr_info *section_addrs;
+ struct cleanup *my_cleanups;
- memset (&section_addrs, 0, sizeof (section_addrs));
- section_addrs.other[0].name = ".text";
- section_addrs.other[0].addr = load_addr;
+ section_addrs = alloc_section_addr_info (1);
+ my_cleanups = make_cleanup (xfree, section_addrs);
+ section_addrs->other[0].name = ".text";
+ section_addrs->other[0].addr = load_addr;
result = safe_symbol_file_add (name, from_tty, &section_addrs,
0, OBJF_SHARED);
+ do_cleanups (my_cleanups);
}
return result;
diff --git a/gdb/wince.c b/gdb/wince.c
index 322564e015e..41541dc11cb 100644
--- a/gdb/wince.c
+++ b/gdb/wince.c
@@ -56,6 +56,9 @@
#include "wince-stub.h"
#include <time.h>
#include "regcache.h"
+#ifdef MIPS
+#include "mips-tdep.h"
+#endif
/* The ui's event loop. */
extern int (*ui_loop_hook) (int signo);
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..0fe24853f83 100644
--- a/gdb/x86-64-tdep.c
+++ b/gdb/x86-64-tdep.c
@@ -21,249 +21,207 @@
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. */
+ register REGNUM. */
+
static struct type *
-x86_64_register_virtual_type (int regno)
+x86_64_register_type (struct gdbarch *gdbarch, int regnum)
{
- return *x86_64_register_info_table[regno].type;
-}
+ gdb_assert (regnum >= 0 && regnum < X86_64_NUM_REGS);
-/* 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);
+ return *x86_64_register_info[regnum].type;
}
-/* 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)
-{
- char buf[12];
+/* DWARF Register Number Mapping as defined in the System V psABI,
+ section 3.6. */
- /* 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));
-}
+static int x86_64_dwarf_regmap[] =
+{
+ /* 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
+};
-/* 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. */
+static const int x86_64_dwarf_regmap_len =
+ (sizeof (x86_64_dwarf_regmap) / sizeof (x86_64_dwarf_regmap[0]));
-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);
-}
+/* Convert DWARF register number REG to the appropriate register
+ number used by GDB. */
-/* Dwarf-2 <-> GDB register numbers mapping. */
-int
-x86_64_dwarf2_reg_to_regnum (int dw_reg)
+static int
+x86_64_dwarf_reg_to_regnum (int reg)
{
- 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;
- }
+ int regnum = -1;
- return x86_64_dwarf2gdb_regno_map[dw_reg];
-}
+ if (reg >= 0 || reg < x86_64_dwarf_regmap_len)
+ regnum = x86_64_dwarf_regmap[reg];
-/* Push the return address (pointing to the call dummy) onto the stack
- and return the new value for the stack pointer. */
+ if (regnum == -1)
+ warning ("Unmapped DWARF Register #%d encountered\n", reg);
-static CORE_ADDR
-x86_64_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
-{
- char buf[8];
-
- store_unsigned_integer (buf, 8, CALL_DUMMY_ADDRESS ());
- write_memory (sp - 8, buf, 8);
- return sp - 8;
+ return regnum;
}
-static void
-x86_64_pop_frame (void)
+/* Return nonzero if a value of type TYPE stored in register REGNUM
+ needs any special handling. */
+
+static int
+x86_64_convert_register_p (int regnum, struct type *type)
{
- generic_pop_current_frame (cfi_pop_frame);
+ return i386_fp_regnum_p (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 +240,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 +268,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 +284,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 +492,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 +510,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 +521,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 +570,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 +588,37 @@ 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;
+ /* For varargs functions we have to pass the total number of SSE arguments
+ in %rax. So, let's count this number. */
+ int total_sse_args = 0;
+ /* Once an SSE/int argument is passed on the stack, all subsequent
+ arguments are passed there. */
+ int sse_stack = 0;
+ int int_stack = 0;
int i;
- static int int_parameter_registers[INT_REGS] = {
- 5 /* RDI */ , 4 /* RSI */ ,
- 3 /* RDX */ , 2 /* RCX */ ,
- 8 /* R8 */ , 9 /* R9 */
+ char buf[8];
+ 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;
@@ -667,55 +631,78 @@ x86_64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
int needed_sseregs;
if (!n ||
- !examine_argument (class, n, &needed_intregs, &needed_sseregs)
- || intreg / 2 + needed_intregs > INT_REGS
- || ssereg / 2 + needed_sseregs > SSE_REGS)
+ !examine_argument (class, n, &needed_intregs, &needed_sseregs))
{ /* memory class */
stack_values[stack_values_count++] = i;
}
else
{
int j;
+ int offset = 0;
+
+ if (intreg / 2 + needed_intregs > INT_REGS)
+ int_stack = 1;
+ if (ssereg / 2 + needed_sseregs > SSE_REGS)
+ sse_stack = 1;
+ total_sse_args += needed_sseregs;
+
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);
- offset += 8;
- intreg += 2;
+ if (int_stack)
+ stack_values[stack_values_count++] = i;
+ else
+ {
+ 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);
-
- offset += 8;
- intreg++;
- break;
- }
+ if (int_stack)
+ stack_values[stack_values_count++] = i;
+ else
+ {
+ 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++;
+ }
+ break;
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);
- offset += 8;
- ssereg += 2;
+ if (sse_stack)
+ stack_values[stack_values_count++] = i;
+ else
+ {
+ 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);
- offset += 8;
- ssereg++;
+ if (sse_stack)
+ stack_values[stack_values_count++] = i;
+ else
+ {
+ regcache_cooked_write
+ (regcache, sse_parameter_registers[ssereg / 2],
+ VALUE_CONTENTS_ALL (args[i]) + offset);
+ offset += 8;
+ ssereg++;
+ }
break;
case X86_64_X87_CLASS:
case X86_64_MEMORY_CLASS:
@@ -732,50 +719,71 @@ 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);
}
+
+ /* Write number of SSE type arguments to RAX to take care of varargs
+ functions. */
+ store_unsigned_integer (buf, 8, total_sse_args);
+ regcache_cooked_write (regcache, X86_64_RAX_REGNUM, buf);
+
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)
{
int len = TYPE_LENGTH (type);
- if (TYPE_CODE_FLT == TYPE_CODE (type))
+ /* First handle long doubles. */
+ if (TYPE_CODE_FLT == TYPE_CODE (type) && len == 16)
{
- /* 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 if (TYPE_CODE_FLT == TYPE_CODE (type))
+ {
+ /* Handle double and float variables. */
+ regcache_cooked_write (regcache, X86_64_XMM0_REGNUM, valbuf);
}
+ /* XXX: What about complex floating point types? */
else
{
int low_size = REGISTER_RAW_SIZE (0);
@@ -797,126 +805,391 @@ 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 + 16;
}
+
-int
-x86_64_register_number (const char *name)
+/* The maximum number of saved registers. This should include %rip. */
+#define X86_64_NUM_SAVED_REGS X86_64_NUM_GREGS
+
+struct x86_64_frame_cache
{
- int reg_nr;
+ /* Base address. */
+ CORE_ADDR base;
+ CORE_ADDR sp_offset;
+ CORE_ADDR pc;
- 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;
+ /* Saved registers. */
+ CORE_ADDR saved_regs[X86_64_NUM_SAVED_REGS];
+ CORE_ADDR saved_sp;
+
+ /* 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;
}
+
-/* 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)
+/* Normal frames. */
+
+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);
+
+ /* This marks the outermost frame. */
+ if (cache->base == 0)
+ return;
-CORE_ADDR
-x86_64_skip_prologue (CORE_ADDR pc)
+ (*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_save_dummy_frame_tos (CORE_ADDR sp)
+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)
{
- /* 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));
+ 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 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 +1205,97 @@ 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);
+ /* Call dummy code. */
+ set_gdbarch_push_dummy_call (gdbarch, x86_64_push_dummy_call);
- 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);
+ set_gdbarch_convert_register_p (gdbarch, x86_64_convert_register_p);
+ set_gdbarch_register_to_value (gdbarch, i387_register_to_value);
+ set_gdbarch_value_to_register (gdbarch, i387_value_to_register);
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);
/* 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
-_initialize_x86_64_tdep (void)
+x86_64_supply_fxsave (char *fxsave)
{
- /* Initialize the table saying where each register starts in the
- register file. */
- {
- int i, offset;
+ i387_supply_fxsave (fxsave);
- 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 (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
+x86_64_fill_fxsave (char *fxsave, int regnum)
+{
+ i387_fill_fxsave (fxsave, regnum);
+
+ 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/xcoffread.c b/gdb/xcoffread.c
index 94c9a1cf835..70081922424 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -2980,9 +2980,10 @@ xcoff_symfile_offsets (struct objfile *objfile, struct section_addr_info *addrs)
asection *sect = NULL;
int i;
- objfile->num_sections = SECT_OFF_MAX;
+ objfile->num_sections = bfd_count_sections (objfile->obfd);
objfile->section_offsets = (struct section_offsets *)
- obstack_alloc (&objfile->psymbol_obstack, SIZEOF_SECTION_OFFSETS);
+ obstack_alloc (&objfile->psymbol_obstack,
+ SIZEOF_N_SECTION_OFFSETS (objfile->num_sections));
/* Initialize the section indexes for future use. */
sect = bfd_get_section_by_name (objfile->obfd, ".text");
diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
index f792423a544..076bd23464d 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));
}
@@ -307,7 +307,7 @@ xstormy16_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
(which may or may not be the same as before).
*/
-CORE_ADDR
+static CORE_ADDR
xstormy16_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
{
unsigned char buf[xstormy16_pc_size];
@@ -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)
{
@@ -996,7 +995,7 @@ xstormy16_stack_align (CORE_ADDR addr)
return addr;
}
-void
+static void
xstormy16_save_dummy_frame_tos (CORE_ADDR sp)
{
generic_save_dummy_frame_tos (sp - xstormy16_pc_size);
@@ -1040,12 +1039,12 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_name (gdbarch, xstormy16_register_name);
set_gdbarch_deprecated_register_size (gdbarch, xstormy16_reg_size);
set_gdbarch_deprecated_register_bytes (gdbarch, E_ALL_REGS_SIZE);
- set_gdbarch_register_byte (gdbarch, xstormy16_register_byte);
- set_gdbarch_register_raw_size (gdbarch, xstormy16_register_raw_size);
+ set_gdbarch_deprecated_register_byte (gdbarch, xstormy16_register_byte);
+ set_gdbarch_deprecated_register_raw_size (gdbarch, xstormy16_register_raw_size);
set_gdbarch_deprecated_max_register_raw_size (gdbarch, xstormy16_pc_size);
- set_gdbarch_register_virtual_size (gdbarch, xstormy16_register_raw_size);
+ set_gdbarch_deprecated_register_virtual_size (gdbarch, xstormy16_register_raw_size);
set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 4);
- set_gdbarch_register_virtual_type (gdbarch, xstormy16_reg_virtual_type);
+ set_gdbarch_deprecated_register_virtual_type (gdbarch, xstormy16_reg_virtual_type);
/*
* Frame Info
@@ -1076,8 +1075,6 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_function_start_offset (gdbarch, 0);
/* This value is almost never non-zero... */
set_gdbarch_frame_args_skip (gdbarch, 0);
- /* OK to default this value to 'unknown'. */
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
/*
* Call Dummies
@@ -1107,7 +1104,7 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_stack_align (gdbarch, xstormy16_stack_align);
- set_gdbarch_save_dummy_frame_tos (gdbarch, xstormy16_save_dummy_frame_tos);
+ set_gdbarch_deprecated_save_dummy_frame_tos (gdbarch, xstormy16_save_dummy_frame_tos);
set_gdbarch_skip_trampoline_code (gdbarch, xstormy16_skip_trampoline_code);
@@ -1115,7 +1112,7 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
xstormy16_in_solib_call_trampoline);
/* Should be using push_dummy_call. */
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+ set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
return gdbarch;
}
@@ -1124,6 +1121,8 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
Initializer function for the Sanyo Xstormy16a module.
Called by gdb at start-up. */
+extern initialize_file_ftype _initialize_xstormy16_tdep; /* -Wmissing-prototypes */
+
void
_initialize_xstormy16_tdep (void)
{
diff --git a/include/ChangeLog b/include/ChangeLog
index 8dfa46f77c9..f061efa770f 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,37 @@
+2003-06-25 Alan Modra <amodra@bigpond.net.au>
+
+ * bfdlink.h: Correct spelling of "relocatable".
+
+2003-06-22 Zack Weinberg <zack@codesourcery.com>
+
+ * safe-ctype.h (HC_UNKNOWN, HC_ASCII, HC_EBCDIC): Rename to
+ HOST_CHARSET_UNKNOWN, HOST_CHARSET_ASCII, HOST_CHARSET_EBCDIC
+ respectively.
+
+2003-06-21 Zack Weinberg <zack@codesourcery.com>
+
+ * safe-ctype.h (HC_UNKNOWN, HC_ASCII, HC_EBCDIC, HOST_CHARSET):
+ New #defines.
+
+2003-06-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * ansidecl.h: Delete HAVE_LONG_DOUBLE GCC bootstrap support.
+
+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/ansidecl.h b/include/ansidecl.h
index f8f2d737bf0..d2c87768ce2 100644
--- a/include/ansidecl.h
+++ b/include/ansidecl.h
@@ -312,15 +312,4 @@ So instead we use the macro below and test it against specific values. */
#define __extension__
#endif
-/* Bootstrap support: Adjust certain macros defined by Autoconf,
- which are only valid for the stage1 compiler. If we detect
- a modern version of GCC, we are probably in stage2 or beyond,
- so unconditionally reset the values. Note that const, inline,
- etc. have been dealt with above. */
-#if (GCC_VERSION >= 2007)
-# ifndef HAVE_LONG_DOUBLE
-# define HAVE_LONG_DOUBLE 1
-# endif
-#endif /* GCC >= 2.7 */
-
#endif /* ansidecl.h */
diff --git a/include/bfdlink.h b/include/bfdlink.h
index 89d916ee83b..10746ee98e0 100644
--- a/include/bfdlink.h
+++ b/include/bfdlink.h
@@ -1,5 +1,5 @@
/* bfdlink.h -- header file for BFD link routines
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003
Free Software Foundation, Inc.
Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support.
@@ -204,7 +204,7 @@ struct bfd_sym_chain
struct bfd_link_info
{
/* TRUE if BFD should generate a relocatable object file. */
- unsigned int relocateable: 1;
+ unsigned int relocatable: 1;
/* TRUE if BFD should generate relocation information in the final
executable. */
@@ -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;
@@ -414,7 +428,7 @@ struct bfd_link_callbacks
/* A function which is called to add a symbol to a set. ENTRY is
the link hash table entry for the set itself (e.g.,
__CTOR_LIST__). RELOC is the relocation to use for an entry in
- the set when generating a relocateable file, and is also used to
+ the set when generating a relocatable file, and is also used to
get the size of the entry when generating an executable file.
ABFD, SEC and VALUE identify the value to add to the set. */
bfd_boolean (*add_to_set)
@@ -425,7 +439,7 @@ struct bfd_link_callbacks
destructor is found. This is only called by some object file
formats. CONSTRUCTOR is TRUE for a constructor, FALSE for a
destructor. This will use BFD_RELOC_CTOR when generating a
- relocateable file. NAME is the name of the symbol found. ABFD,
+ relocatable file. NAME is the name of the symbol found. ABFD,
SECTION and VALUE are the value of the symbol. */
bfd_boolean (*constructor)
PARAMS ((struct bfd_link_info *, bfd_boolean constructor,
@@ -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..eb4b7ccb55e 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -1,3 +1,17 @@
+2003-06-13 Robert Millan <zeratul2@wanadoo.es>
+
+ * common.h (GNU_ABI_TAG_NETBSD): New tag.
+ (GNU_ABI_TAG_FREEBSD): New tag.
+
+2003-06-10 Richard Sandiford <rsandifo@redhat.com>
+
+ * h8.h (E_H8_MACH_H8300SXN): New flag.
+
+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..1a843393d85 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. */
@@ -396,6 +397,8 @@
#define GNU_ABI_TAG_LINUX 0
#define GNU_ABI_TAG_HURD 1
#define GNU_ABI_TAG_SOLARIS 2
+#define GNU_ABI_TAG_FREEBSD 3
+#define GNU_ABI_TAG_NETBSD 4
/* Values for NetBSD .note.netbsd.ident notes. Note name is "NetBSD". */
diff --git a/include/elf/h8.h b/include/elf/h8.h
index 79c0a34fb32..1aad7a4ed5b 100644
--- a/include/elf/h8.h
+++ b/include/elf/h8.h
@@ -95,5 +95,6 @@ END_RELOC_NUMBERS (R_H8_max)
#define E_H8_MACH_H8300HN 0x00830000
#define E_H8_MACH_H8300SN 0x00840000
#define E_H8_MACH_H8300SX 0x00850000
+#define E_H8_MACH_H8300SXN 0x00860000
#endif
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/gdb/ChangeLog b/include/gdb/ChangeLog
index 77a8551a460..79c817871ec 100644
--- a/include/gdb/ChangeLog
+++ b/include/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2003-06-10 Corinna Vinschen <vinschen@redhat.com>
+
+ * gdb/fileio.h: New file.
+
2003-05-07 Andrew Cagney <cagney@redhat.com>
* sim-d10v.h (sim_d10v_translate_addr): Add regcache parameter.
diff --git a/include/gdb/fileio.h b/include/gdb/fileio.h
new file mode 100644
index 00000000000..d84478103e2
--- /dev/null
+++ b/include/gdb/fileio.h
@@ -0,0 +1,146 @@
+/* Hosted File I/O interface definitions, for GDB, the GNU Debugger.
+
+ 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. */
+
+#ifndef GDB_FILEIO_H_
+#define GDB_FILEIO_H_
+
+/* The following flags are defined to be independent of the host
+ as well as the target side implementation of these constants.
+ All constants are defined with a leading FILEIO_ in the name
+ to allow the usage of these constants together with the
+ corresponding implementation dependent constants in one module. */
+
+/* open(2) flags */
+#define FILEIO_O_RDONLY 0x0
+#define FILEIO_O_WRONLY 0x1
+#define FILEIO_O_RDWR 0x2
+#define FILEIO_O_APPEND 0x8
+#define FILEIO_O_CREAT 0x200
+#define FILEIO_O_TRUNC 0x400
+#define FILEIO_O_EXCL 0x800
+#define FILEIO_O_SUPPORTED (FILEIO_O_RDONLY | FILEIO_O_WRONLY| \
+ FILEIO_O_RDWR | FILEIO_O_APPEND| \
+ FILEIO_O_CREAT | FILEIO_O_TRUNC| \
+ FILEIO_O_EXCL)
+
+/* mode_t bits */
+#define FILEIO_S_IFREG 0100000
+#define FILEIO_S_IFDIR 040000
+#define FILEIO_S_IFCHR 020000
+#define FILEIO_S_IRUSR 0400
+#define FILEIO_S_IWUSR 0200
+#define FILEIO_S_IXUSR 0100
+#define FILEIO_S_IRWXU 0700
+#define FILEIO_S_IRGRP 040
+#define FILEIO_S_IWGRP 020
+#define FILEIO_S_IXGRP 010
+#define FILEIO_S_IRWXG 070
+#define FILEIO_S_IROTH 04
+#define FILEIO_S_IWOTH 02
+#define FILEIO_S_IXOTH 01
+#define FILEIO_S_IRWXO 07
+#define FILEIO_S_SUPPORTED (FILEIO_S_IFREG|FILEIO_S_IFDIR| \
+ FILEIO_S_IRWXU|FILEIO_S_IRWXG| \
+ FILEIO_S_IRWXO)
+
+/* lseek(2) flags */
+#define FILEIO_SEEK_SET 0
+#define FILEIO_SEEK_CUR 1
+#define FILEIO_SEEK_END 2
+
+/* errno values */
+#define FILEIO_EPERM 1
+#define FILEIO_ENOENT 2
+#define FILEIO_EINTR 4
+#define FILEIO_EIO 5
+#define FILEIO_EBADF 9
+#define FILEIO_EACCES 13
+#define FILEIO_EFAULT 14
+#define FILEIO_EBUSY 16
+#define FILEIO_EEXIST 17
+#define FILEIO_ENODEV 19
+#define FILEIO_ENOTDIR 20
+#define FILEIO_EISDIR 21
+#define FILEIO_EINVAL 22
+#define FILEIO_ENFILE 23
+#define FILEIO_EMFILE 24
+#define FILEIO_EFBIG 27
+#define FILEIO_ENOSPC 28
+#define FILEIO_ESPIPE 29
+#define FILEIO_EROFS 30
+#define FILEIO_ENOSYS 88
+#define FILEIO_ENAMETOOLONG 91
+#define FILEIO_EUNKNOWN 9999
+
+/* limits */
+#define FILEIO_INT_MIN -2147483648L
+#define FILEIO_INT_MAX 2147483647L
+#define FILEIO_UINT_MAX 4294967295UL
+#define FILEIO_LONG_MIN -9223372036854775808LL
+#define FILEIO_LONG_MAX 9223372036854775807LL
+#define FILEIO_ULONG_MAX 18446744073709551615ULL
+
+/* Integral types as used in protocol. */
+#if 0
+typedef __int32_t fio_int_t;
+typedef __uint32_t fio_uint_t, fio_mode_t, fio_time_t;
+typedef __int64_t fio_long_t;
+typedef __uint64_t fio_ulong_t;
+#endif
+
+#define FIO_INT_LEN 4
+#define FIO_UINT_LEN 4
+#define FIO_MODE_LEN 4
+#define FIO_TIME_LEN 4
+#define FIO_LONG_LEN 8
+#define FIO_ULONG_LEN 8
+
+typedef char fio_int_t[FIO_INT_LEN];
+typedef char fio_uint_t[FIO_UINT_LEN];
+typedef char fio_mode_t[FIO_MODE_LEN];
+typedef char fio_time_t[FIO_TIME_LEN];
+typedef char fio_long_t[FIO_LONG_LEN];
+typedef char fio_ulong_t[FIO_ULONG_LEN];
+
+/* Struct stat as used in protocol. For complete independence
+ of host/target systems, it's defined as an array with offsets
+ to the members. */
+
+struct fio_stat {
+ fio_uint_t fst_dev;
+ fio_uint_t fst_ino;
+ fio_mode_t fst_mode;
+ fio_uint_t fst_nlink;
+ fio_uint_t fst_uid;
+ fio_uint_t fst_gid;
+ fio_uint_t fst_rdev;
+ fio_ulong_t fst_size;
+ fio_ulong_t fst_blksize;
+ fio_ulong_t fst_blocks;
+ fio_time_t fst_atime;
+ fio_time_t fst_mtime;
+ fio_time_t fst_ctime;
+};
+
+struct fio_timeval {
+ fio_time_t ftv_sec;
+ fio_long_t ftv_usec;
+};
+
+#endif /* GDB_FILEIO_H_ */
diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog
index 48004d0b674..e100c119316 100644
--- a/include/opcode/ChangeLog
+++ b/include/opcode/ChangeLog
@@ -1,11 +1,65 @@
+2003-06-25 Richard Sandiford <rsandifo@redhat.com>
+
+ * h8300.h (IMM2_NS, IMM8_NS, IMM16_NS): Remove.
+ (IMM8U, IMM8U_NS): Define.
+ (h8_opcodes): Use IMM8U_NS for mov.[wl] #xx:8,@yy.
+
+2003-06-25 Richard Sandiford <rsandifo@redhat.com>
+
+ * h8300.h (h8_opcodes): Fix the mov.l @(dd:32,ERs),ERd and
+ mov.l ERs,@(dd:32,ERd) entries.
+
+2003-06-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386.h (i386_optab): Support Intel Precott New Instructions.
+
+2003-06-10 Gary Hade <garyhade@us.ibm.com>
+
+ * ppc.h (PPC_OPERAND_DQ): Define.
+
+2003-06-10 Richard Sandiford <rsandifo@redhat.com>
+
+ * h8300.h (IMM4_NS, IMM8_NS): New.
+ (h8_opcodes): Replace IMM4 with IMM4_NS in mov.b and mov.w entries.
+ Likewise IMM8 for mov.w and mov.l. Likewise IMM16U for mov.l.
+
+2003-06-03 Michael Snyder <msnyder@redhat.com>
+
+ * h8300.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.
+ (scyc.b): New XP instruction.
+ (ldio.l): Likewise.
+ (ldio.s): Likewise.
+ (ldio.b): Likewise.
+ (ldint.l): Likewise.
+ (ldint.s): Likewise.
+ (ldint.b): Likewise.
+ (stio.l): Likewise.
+ (stio.s): Likewise.
+ (stio.b): Likewise.
+ (pfld.q): Likewise.
+
2003-05-20 Jason Eckhardt <jle@rice.edu>
- opcode/i860.h (flush): Set lower 3 bits properly and use 'L'
+ * i860.h (flush): Set lower 3 bits properly and use 'L'
for the immediate operand type instead of 'i'.
2003-05-20 Jason Eckhardt <jle@rice.edu>
- opcode/i860.h (fzchks): Both S and R bits must be set.
+ * i860.h (fzchks): Both S and R bits must be set.
(pfzchks): Likewise.
(faddp): Likewise.
(pfaddp): Likewise.
@@ -125,7 +179,7 @@
fields.
(h8_opcodes). Modify initializer and initializer macros to no
longer initialize the removed fields.
-
+
2002-11-19 Svein E. Seldal <Svein.Seldal@solidas.com>
* tic4x.h (c4x_insts): Fixed LDHI constraint
@@ -162,10 +216,10 @@
* cgen.h: Test __BFD_H_SEEN__ rather than BFD_VERSION_DATE.
2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
- Ken Raeburn <raeburn@cygnus.com>
- Aldy Hernandez <aldyh@redhat.com>
- Eric Christopher <echristo@redhat.com>
- Richard Sandiford <rsandifo@redhat.com>
+ Ken Raeburn <raeburn@cygnus.com>
+ Aldy Hernandez <aldyh@redhat.com>
+ Eric Christopher <echristo@redhat.com>
+ Richard Sandiford <rsandifo@redhat.com>
* mips.h: Update comment for new opcodes.
(OP_MASK_VECBYTE, OP_SH_VECBYTE): New.
@@ -176,12 +230,12 @@
Don't match CPU_R4111 with INSN_4100.
2002-08-19 Elena Zannoni <ezannoni@redhat.com>
-
- From matthew green <mrg@redhat.com>
- * ppc.h (PPC_OPCODE_SPE): New opcode flag for Powerpc e500
+ From matthew green <mrg@redhat.com>
+
+ * ppc.h (PPC_OPCODE_SPE): New opcode flag for Powerpc e500
instructions.
- (PPC_OPCODE_ISEL, PPC_OPCODE_BRLOCK, PPC_OPCODE_PMR,
+ (PPC_OPCODE_ISEL, PPC_OPCODE_BRLOCK, PPC_OPCODE_PMR,
PPC_OPCODE_CACHELCK, PPC_OPCODE_RFMCI): New opcode flags for the
e500x2 Integer select, branch locking, performance monitor,
cache locking and machine check APUs, respectively.
@@ -236,9 +290,9 @@
2002-05-17 Andrey Volkov <avolkov@sources.redhat.com>
- * h8300.h: Corrected defs of all control regs
+ * h8300.h: Corrected defs of all control regs
and eepmov instr.
-
+
2002-04-11 Alan Modra <amodra@bigpond.net.au>
* i386.h: Add intel mode cmpsd and movsd.
@@ -505,9 +559,9 @@ Mon Dec 31 16:45:41 2001 Jeffrey A Law (law@cygnus.com)
2001-02-02 Patrick Macdonald <patrickm@redhat.com>
- * cgen.h (CGEN_SYNTAX_CHAR_TYPE): Typedef as unsigned short.
- (CGEN_MAX_SYNTAX_ELEMENTS): Rename from CGEN_MAX_SYNTAX_BYTES.
- (CGEN_SYNTAX): Define using CGEN_MAX_SYNTAX_ELEMENTS.
+ * cgen.h (CGEN_SYNTAX_CHAR_TYPE): Typedef as unsigned short.
+ (CGEN_MAX_SYNTAX_ELEMENTS): Rename from CGEN_MAX_SYNTAX_BYTES.
+ (CGEN_SYNTAX): Define using CGEN_MAX_SYNTAX_ELEMENTS.
2001-01-24 Karsten Keil <kkeil@suse.de>
@@ -582,35 +636,35 @@ Mon Dec 31 16:45:41 2001 Jeffrey A Law (law@cygnus.com)
2000-12-01 Chris Demetriou <cgd@sibyte.com>
- mips.h (OP_MASK_SYSCALL, OP_SH_SYSCALL): Delete.
- (OP_MASK_CODE20, OP_SH_CODE20): Define, with values of old
- OP_*_SYSCALL definitions.
- (OP_SH_CODE19, OP_MASK_CODE19): Define, for use as
- 19 bit wait codes.
- (MIPS operand specifier comments): Remove 'm', add 'U' and
- 'J', and update the meaning of 'B' so that it's more general.
-
- * mips.h (INSN_ISA1, INSN_ISA2, INSN_ISA3, INSN_ISA4,
- INSN_ISA5): Renumber, redefine to mean the ISA at which the
- instruction was added.
- (INSN_ISA32): New constant.
- (INSN_4650, INSN_4010, INSN_4100, INSN_3900, INSN_GP32):
- Renumber to avoid new and/or renumbered INSN_* constants.
- (INSN_MIPS32): Delete.
- (ISA_UNKNOWN): New constant to indicate unknown ISA.
- (ISA_MIPS1, ISA_MIPS2, ISA_MIPS3, ISA_MIPS4, ISA_MIPS5,
- ISA_MIPS32): New constants, defined to be the mask of INSN_*
- constants available at that ISA level.
- (CPU_UNKNOWN): New constant to indicate unknown CPU.
- (CPU_4K, CPU_MIPS32_4K): Rename the former to the latter,
- define it with a unique value.
- (OPCODE_IS_MEMBER): Update for new ISA membership-related
- constant meanings.
-
- * mips.h (INSN_ISA64, ISA_MIPS5, ISA_MIPS64): New
- definitions.
-
- * mips.h (CPU_SB1): New constant.
+ mips.h (OP_MASK_SYSCALL, OP_SH_SYSCALL): Delete.
+ (OP_MASK_CODE20, OP_SH_CODE20): Define, with values of old
+ OP_*_SYSCALL definitions.
+ (OP_SH_CODE19, OP_MASK_CODE19): Define, for use as
+ 19 bit wait codes.
+ (MIPS operand specifier comments): Remove 'm', add 'U' and
+ 'J', and update the meaning of 'B' so that it's more general.
+
+ * mips.h (INSN_ISA1, INSN_ISA2, INSN_ISA3, INSN_ISA4,
+ INSN_ISA5): Renumber, redefine to mean the ISA at which the
+ instruction was added.
+ (INSN_ISA32): New constant.
+ (INSN_4650, INSN_4010, INSN_4100, INSN_3900, INSN_GP32):
+ Renumber to avoid new and/or renumbered INSN_* constants.
+ (INSN_MIPS32): Delete.
+ (ISA_UNKNOWN): New constant to indicate unknown ISA.
+ (ISA_MIPS1, ISA_MIPS2, ISA_MIPS3, ISA_MIPS4, ISA_MIPS5,
+ ISA_MIPS32): New constants, defined to be the mask of INSN_*
+ constants available at that ISA level.
+ (CPU_UNKNOWN): New constant to indicate unknown CPU.
+ (CPU_4K, CPU_MIPS32_4K): Rename the former to the latter,
+ define it with a unique value.
+ (OPCODE_IS_MEMBER): Update for new ISA membership-related
+ constant meanings.
+
+ * mips.h (INSN_ISA64, ISA_MIPS5, ISA_MIPS64): New
+ definitions.
+
+ * mips.h (CPU_SB1): New constant.
2000-10-20 Jakub Jelinek <jakub@redhat.com>
@@ -791,14 +845,14 @@ Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
2000-03-02 J"orn Rennecke <amylaar@cygnus.co.uk>
- * d30v.h:
- (SHORT_B2r, SHORT_B3, SHORT_B3r, SHORT_B3b, SHORT_B3br): Updated.
- (SHORT_D1r, SHORT_D2, SHORT_D2r, SHORT_D2Br, SHORT_U): Updated.
- (SHORT_F, SHORT_AF, SHORT_T, SHORT_A5, SHORT_CMP, SHORT_CMPU): Updated.
- (SHORT_A1, SHORT_AA, SHORT_RA, SHORT_MODINC, SHORT_MODDEC): Updated.
- (SHORT_C1, SHORT_C2, SHORT_UF, SHORT_A2, SHORT_NONE, LONG): Updated.
- (LONG_U, LONG_Ur, LONG_CMP, LONG_M, LONG_M2, LONG_2, LONG_2r): Updated.
- (LONG_2b, LONG_2br, LONG_D, LONG_Dr, LONG_Dbr): Updated.
+ * d30v.h:
+ (SHORT_B2r, SHORT_B3, SHORT_B3r, SHORT_B3b, SHORT_B3br): Updated.
+ (SHORT_D1r, SHORT_D2, SHORT_D2r, SHORT_D2Br, SHORT_U): Updated.
+ (SHORT_F, SHORT_AF, SHORT_T, SHORT_A5, SHORT_CMP, SHORT_CMPU): Updated.
+ (SHORT_A1, SHORT_AA, SHORT_RA, SHORT_MODINC, SHORT_MODDEC): Updated.
+ (SHORT_C1, SHORT_C2, SHORT_UF, SHORT_A2, SHORT_NONE, LONG): Updated.
+ (LONG_U, LONG_Ur, LONG_CMP, LONG_M, LONG_M2, LONG_2, LONG_2r): Updated.
+ (LONG_2b, LONG_2br, LONG_D, LONG_Dr, LONG_Dbr): Updated.
2000-02-25 Alan Modra <alan@spri.levels.unisa.edu.au>
@@ -808,7 +862,7 @@ Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
2000-02-24 Nick Clifton <nickc@cygnus.com>
* cgen.h (cgen_cpu_desc): Rename field 'flags' to
- 'signed_overflow_ok_p'.
+ 'signed_overflow_ok_p'.
Delete prototypes for cgen_set_flags() and cgen_get_flags().
2000-02-24 Andrew Haley <aph@cygnus.com>
@@ -877,14 +931,14 @@ Wed Nov 24 20:28:58 1999 Jeffrey A Law (law@cygnus.com)
Sun Oct 10 01:46:56 1999 Jerry Quinn <jerry.quinn.adv91@alum.dartmouth.org>
- * hppa.h (pa_opcodes): Add load and store cache control to
+ * hppa.h (pa_opcodes): Add load and store cache control to
instructions. Add ordered access load and store.
* hppa.h (pa_opcode): Add new entries for addb and addib.
* hppa.h (pa_opcodes): Fix cmpb and cmpib entries.
- * hppa.h (pa_opcodes): Add entries for cmpb and cmpib.
+ * hppa.h (pa_opcodes): Add entries for cmpb and cmpib.
Thu Oct 7 00:12:25 MDT 1999 Diego Novillo <dnovillo@cygnus.com>
@@ -968,22 +1022,22 @@ Sat Aug 28 00:25:25 1999 Jerry Quinn <jquinn@nortelnetworks.com>
* hppa.h (pa_opcodes): Add extrd, extrw, depd, depdi, depw, depwi.
Add supporting args.
- * hppa.h: Document new completers and args.
- * hppa.h (pa_opcodes): Add 64 bit patterns and pa2.0 syntax for uxor,
+ * hppa.h: Document new completers and args.
+ * hppa.h (pa_opcodes): Add 64 bit patterns and pa2.0 syntax for uxor,
uaddcm, dcor, addi, add, sub, subi, shladd, rfi, and probe. Add pa2.0
extensions for ssm, rsm, pdtlb, pitlb. Add performance instructions
pmenb and pmdis.
- * hppa.h (pa_opcodes): Add pa2.0 instructions hadd, hshl,
+ * hppa.h (pa_opcodes): Add pa2.0 instructions hadd, hshl,
hshr, hsub, mixh, mixw, permh.
* hppa.h (pa_opcodes): Change completers in instructions to
use 'c' prefix.
- * hppa.h (pa_opcodes): Add popbts, new forms of bb, havg,
+ * hppa.h (pa_opcodes): Add popbts, new forms of bb, havg,
hshladd, hshradd, shrpd, and shrpw instructions. Update arg comments.
- * hppa.h (pa_opcodes): Change fmpyfadd, fmpynfadd, fneg,
+ * hppa.h (pa_opcodes): Change fmpyfadd, fmpynfadd, fneg,
fnegabs to use 'I' instead of 'F'.
1999-08-21 Alan Modra <alan@spri.levels.unisa.edu.au>
@@ -1001,7 +1055,7 @@ Fri Aug 6 09:46:35 1999 Jerry Quinn <jquinn@nortelnetworks.com>
* hppa.h (pa_opcodes): Add 64 bit versions of or, xor, and,
and andcm. Add 32 and 64 bit version of cmpclr, cmpiclr.
- * hppa.h: Document 64 bit condition completers.
+ * hppa.h: Document 64 bit condition completers.
Thu Aug 5 16:56:07 1999 Jerry Quinn <jquinn@nortelnetworks.com>
@@ -1020,7 +1074,7 @@ Wed Jul 28 02:04:24 1999 Jerry Quinn <jquinn@nortelnetworks.com>
* hppa.h (pa_opcodes): Mark all PA2.0 opcodes with FLAG_STRICT.
- * hppa.h (pa_opcodes): Change xmpyu, fmpyfadd,
+ * hppa.h (pa_opcodes): Change xmpyu, fmpyfadd,
and fmpynfadd to use 'J' and 'K' instead of 'E' and 'X'.
1999-07-13 Alan Modra <alan@spri.levels.unisa.edu.au>
@@ -1177,22 +1231,22 @@ Sat Feb 13 14:13:44 1999 Richard Henderson <rth@cygnus.com>
Mon Feb 1 21:09:14 1999 Catherine Moore <clm@cygnus.com>
- * i386.h (d_Suf, x_Suf, sld_Suf, sldx_Suf, bwld_Suf): Define.
- (x_FP, d_FP, dls_FP, sldx_FP): Define.
- Change *Suf definitions to include x and d suffixes.
- (movsx): Use w_Suf and b_Suf.
- (movzx): Likewise.
- (movs): Use bwld_Suf.
- (fld): Change ordering. Use sld_FP.
- (fild): Add Intel Syntax equivalent of fildq.
- (fst): Use sld_FP.
- (fist): Use sld_FP.
- (fstp): Use sld_FP. Add x_FP version.
- (fistp): LLongMem version for Intel Syntax.
- (fcom, fcomp): Use sld_FP.
- (fadd, fiadd, fsub): Use sld_FP.
- (fsubr): Use sld_FP.
- (fmul, fimul, fdvi, fidiv, fdivr): Use sld_FP.
+ * i386.h (d_Suf, x_Suf, sld_Suf, sldx_Suf, bwld_Suf): Define.
+ (x_FP, d_FP, dls_FP, sldx_FP): Define.
+ Change *Suf definitions to include x and d suffixes.
+ (movsx): Use w_Suf and b_Suf.
+ (movzx): Likewise.
+ (movs): Use bwld_Suf.
+ (fld): Change ordering. Use sld_FP.
+ (fild): Add Intel Syntax equivalent of fildq.
+ (fst): Use sld_FP.
+ (fist): Use sld_FP.
+ (fstp): Use sld_FP. Add x_FP version.
+ (fistp): LLongMem version for Intel Syntax.
+ (fcom, fcomp): Use sld_FP.
+ (fadd, fiadd, fsub): Use sld_FP.
+ (fsubr): Use sld_FP.
+ (fmul, fimul, fdvi, fidiv, fdivr): Use sld_FP.
1999-01-27 Doug Evans <devans@casey.cygnus.com>
@@ -1762,7 +1816,7 @@ Fri Apr 4 14:02:32 1997 Ian Lance Taylor <ian@cygnus.com>
Tue Mar 25 22:57:26 1997 Stu Grossman (grossman@critters.cygnus.com)
- * v850.h (extract): Make unsigned.
+ * v850.h (extract): Make unsigned.
Mon Mar 24 14:38:15 1997 Ian Lance Taylor <ian@cygnus.com>
@@ -1980,7 +2034,7 @@ Wed Oct 2 21:31:26 1996 Jeffrey A Law (law@cygnus.com)
Fri Sep 27 18:26:46 1996 Stu Grossman (grossman@critters.cygnus.com)
- * v850.h: Add new flag to indicate this instruction uses a PC
+ * v850.h: Add new flag to indicate this instruction uses a PC
displacement.
Fri Sep 13 14:58:13 1996 Jeffrey A Law (law@cygnus.com)
@@ -2349,9 +2403,9 @@ Mon Jan 23 16:45:43 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
Sat Jan 21 17:50:38 1995 Pat Rankin (rankin@eql.caltech.edu)
- * vax.h (struct vot_wot, field `args'): Make it pointer to const
+ * vax.h (struct vot_wot, field `args'): Make it pointer to const
char.
- (struct vot, field `name'): ditto.
+ (struct vot, field `name'): ditto.
Thu Jan 19 14:47:53 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
@@ -2607,7 +2661,7 @@ Thu Aug 5 09:15:17 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
Fri Jul 30 18:41:11 1993 John Gilmore (gnu@cygnus.com)
- * sparc.h (F_JSR, F_UNBR, F_CONDBR): Add new flags to mark
+ * sparc.h (F_JSR, F_UNBR, F_CONDBR): Add new flags to mark
jump instructions, for use in disassemblers.
Thu Jul 22 07:25:27 1993 Ian Lance Taylor (ian@cygnus.com)
@@ -2726,29 +2780,29 @@ Fri Apr 9 13:26:16 1993 Jim Kingdon (kingdon@cygnus.com)
Thu Mar 18 13:45:31 1993 Per Bothner (bothner@rtl.cygnus.com)
- * i386.h: 486 extensions from John Hassey (hassey@dg-rtp.dg.com).
- * mips.h: Add casts, to suppress warnings about shifting too much.
- * m68k.h: Document the placement code '9'.
+ * i386.h: 486 extensions from John Hassey (hassey@dg-rtp.dg.com).
+ * mips.h: Add casts, to suppress warnings about shifting too much.
+ * m68k.h: Document the placement code '9'.
Thu Feb 18 02:03:14 1993 John Gilmore (gnu@cygnus.com)
- * m68k.h (BREAK_UP_BIG_DECL, AND_OTHER_PART): Add kludge which
+ * m68k.h (BREAK_UP_BIG_DECL, AND_OTHER_PART): Add kludge which
allows callers to break up the large initialized struct full of
opcodes into two half-sized ones. This permits GCC to compile
this module, since it takes exponential space for initializers.
- (numopcodes, endop): Revise to use AND_OTHER_PART in size calcs.
+ (numopcodes, endop): Revise to use AND_OTHER_PART in size calcs.
Thu Feb 4 02:06:56 1993 John Gilmore (gnu@cygnus.com)
- * a29k.h: Remove RCS crud, update GPL to v2, update copyrights.
- * convex.h: Added, from GDB's convx-opcode.h. Added CONST to all
+ * a29k.h: Remove RCS crud, update GPL to v2, update copyrights.
+ * convex.h: Added, from GDB's convx-opcode.h. Added CONST to all
initialized structs in it.
Thu Jan 28 21:32:22 1993 John Gilmore (gnu@cygnus.com)
Delta 88 changes inspired by Carl Greco, <cgreco@Creighton.Edu>:
- * m88k.h (PMEM): Avoid previous definition from <sys/param.h>.
- (AND): Change to AND_ to avoid ansidecl.h `AND' conflict.
+ * m88k.h (PMEM): Avoid previous definition from <sys/param.h>.
+ (AND): Change to AND_ to avoid ansidecl.h `AND' conflict.
Sat Jan 23 18:10:49 PST 1993 Ralph Campbell (ralphc@pyramid.com)
@@ -2764,7 +2818,7 @@ Sun Jan 3 14:13:35 1993 Steve Chamberlain (sac@thepub.cygnus.com)
Mon Dec 21 21:29:08 1992 Stu Grossman (grossman at cygnus.com)
- * hppa.h: Move handy aliases to the front. Fix masks for extract
+ * hppa.h: Move handy aliases to the front. Fix masks for extract
and deposit instructions.
Sat Dec 12 16:09:48 1992 Ian Lance Taylor (ian@cygnus.com)
@@ -2799,7 +2853,7 @@ Tue Sep 22 14:08:14 1992 Ken Raeburn (raeburn@cambridge.cygnus.com)
Tue Sep 22 00:38:41 1992 John Gilmore (gnu@cygnus.com)
- * mips.h (break): Disassemble the argument. Patch from
+ * mips.h (break): Disassemble the argument. Patch from
jonathan@cs.stanford.edu (Jonathan Stone).
Wed Sep 9 11:25:28 1992 Ian Lance Taylor (ian@cygnus.com)
@@ -2836,10 +2890,10 @@ Wed Aug 19 11:22:24 1992 Ian Lance Taylor (ian@cygnus.com)
Fri Aug 14 14:20:38 1992 Per Bothner (bothner@cygnus.com)
- * m68k.h: Merged in patches (mostly m68040-specific) from
+ * m68k.h: Merged in patches (mostly m68040-specific) from
Colin Smith <colin@wrs.com>.
- * m68k.h: Merged m68kmri.h and m68k.h (using the former as a
+ * m68k.h: Merged m68kmri.h and m68k.h (using the former as a
base). Also cleaned up duplicates, re-ordered instructions for
the sake of dis-assembling (so aliases come after standard names).
* m68kmri.h: Now just defines some macros, and #includes m68k.h.
@@ -2857,24 +2911,24 @@ Mon Aug 10 23:22:33 1992 Ken Raeburn (raeburn@cygnus.com)
Sun Jun 28 13:29:03 1992 Fred Fish (fnf@cygnus.com)
- * h8300.h: Finish filling in all the holes in the opcode table,
+ * h8300.h: Finish filling in all the holes in the opcode table,
so that the Lucid C compiler can digest this as well...
Fri Jun 26 21:27:17 1992 John Gilmore (gnu at cygnus.com)
- * i386.h: Add setc, setnc, addr16, data16, repz, repnz aliases.
+ * i386.h: Add setc, setnc, addr16, data16, repz, repnz aliases.
Fix opcodes on various sizes of fild/fist instructions
(16bit=no suffix, 32bit="l" suffix, 64bit="ll" suffix).
Use tabs to indent for comments. Fixes suggested by Minh Tran-Le.
Thu Jun 25 16:13:26 1992 Stu Grossman (grossman at cygnus.com)
- * h8300.h: Fill in all the holes in the opcode table so that the
+ * h8300.h: Fill in all the holes in the opcode table so that the
losing HPUX C compiler can digest this...
Thu Jun 11 12:15:25 1992 John Gilmore (gnu at cygnus.com)
- * mips.h: Fix decoding of coprocessor instructions, somewhat.
+ * mips.h: Fix decoding of coprocessor instructions, somewhat.
(Fix by Eric Anderson, 3jean@maas-neotek.arc.nasa.gov.)
Thu May 28 11:17:44 1992 Jim Wilson (wilson@sphagnum.cygnus.com)
@@ -2884,35 +2938,35 @@ Thu May 28 11:17:44 1992 Jim Wilson (wilson@sphagnum.cygnus.com)
Tue May 5 14:23:27 1992 Per Bothner (bothner@rtl.cygnus.com)
- * mips.h: Add some more opcode synonyms (from Frank Yellin,
+ * mips.h: Add some more opcode synonyms (from Frank Yellin,
fy@lucid.com).
Thu Apr 16 18:25:26 1992 Per Bothner (bothner@cygnus.com)
- * rs6k.h: New version from IBM (Metin).
+ * rs6k.h: New version from IBM (Metin).
Thu Apr 9 00:31:19 1992 Per Bothner (bothner@rtl.cygnus.com)
* rs6k.h: Fix incorrect extended opcode for instructions `fm'
- and `fd'. (From metin@ibmpa.awdpa.ibm.com (Metin G. Ozisik).)
+ and `fd'. (From metin@ibmpa.awdpa.ibm.com (Metin G. Ozisik).)
Tue Apr 7 13:38:47 1992 Stu Grossman (grossman at cygnus.com)
- * rs6k.h: Move from ../../gdb/rs6k-opcode.h.
+ * rs6k.h: Move from ../../gdb/rs6k-opcode.h.
Fri Apr 3 11:30:20 1992 Fred Fish (fnf@cygnus.com)
- * m68k.h (one, two): Cast macro args to unsigned to suppress
+ * m68k.h (one, two): Cast macro args to unsigned to suppress
complaints from compiler and lint about integer overflow during
shift.
Sun Mar 29 12:22:08 1992 John Gilmore (gnu at cygnus.com)
- * sparc.h (OP): Avoid signed overflow when shifting to high order bit.
+ * sparc.h (OP): Avoid signed overflow when shifting to high order bit.
Fri Mar 6 00:22:38 1992 John Gilmore (gnu at cygnus.com)
- * mips.h: Make bitfield layout depend on the HOST compiler,
+ * mips.h: Make bitfield layout depend on the HOST compiler,
not on the TARGET system.
Fri Feb 21 01:29:51 1992 K. Richard Pixley (rich@cygnus.com)
@@ -2927,15 +2981,15 @@ Thu Jan 30 07:31:44 1992 Steve Chamberlain (sac at rtl.cygnus.com)
Thu Jan 30 01:07:24 1992 John Gilmore (gnu at cygnus.com)
- * sparc.h: Remove "cypress" architecture. Remove "fitox" and
+ * sparc.h: Remove "cypress" architecture. Remove "fitox" and
similar instructions -- they've been renamed to "fitoq", etc.
REALLY fix tsubcctv. Fix "fcmpeq" and "fcmpq" which had wrong
number of arguments.
- * h8300.h: Remove extra ; which produces compiler warning.
+ * h8300.h: Remove extra ; which produces compiler warning.
Tue Jan 28 22:59:22 1992 Stu Grossman (grossman at cygnus.com)
- * sparc.h: fix opcode for tsubcctv.
+ * sparc.h: fix opcode for tsubcctv.
Tue Jan 7 17:19:39 1992 K. Richard Pixley (rich at cygnus.com)
@@ -2943,7 +2997,7 @@ Tue Jan 7 17:19:39 1992 K. Richard Pixley (rich at cygnus.com)
Fri Dec 27 10:55:50 1991 Per Bothner (bothner at cygnus.com)
- * sparc.h (nop): Made the 'lose' field be even tighter,
+ * sparc.h (nop): Made the 'lose' field be even tighter,
so only a standard 'nop' is disassembled as a nop.
Sun Dec 22 12:18:18 1991 Michael Tiemann (tiemann at cygnus.com)
@@ -2953,7 +3007,7 @@ Sun Dec 22 12:18:18 1991 Michael Tiemann (tiemann at cygnus.com)
Wed Dec 18 17:19:44 1991 Stu Grossman (grossman at cygnus.com)
- * m68k.h, sparc.h: ANSIfy enums.
+ * m68k.h, sparc.h: ANSIfy enums.
Tue Dec 10 00:22:20 1991 K. Richard Pixley (rich at rtl.cygnus.com)
diff --git a/include/opcode/h8300.h b/include/opcode/h8300.h
index 02f415be846..bfac3f8c73e 100644
--- a/include/opcode/h8300.h
+++ b/include/opcode/h8300.h
@@ -26,119 +26,219 @@
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. */
+
+ /* Immediates smaller than 8 bits are always unsigned. */
+ 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,
+ IMM8U = IMM | SRC | L_8U,
+ IMM16 = IMM | SRC | L_16,
+ IMM16U = IMM | SRC | L_16U,
+ IMM32 = IMM | SRC | L_32,
+
+ IMM3NZ_NS = IMM3NZ | NO_SYMBOLS,
+ IMM4_NS = IMM4 | NO_SYMBOLS,
+ IMM8U_NS = IMM8U | 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 +246,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 +266,1629 @@ 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_NS, ABS16DST, E}}, {{0x6, 0xa, 0xd, IMM4, DSTABS16LIST, E}}},
+ {O (O_MOV, SB), AV_H8SX, 0, "mov.b", {{IMM4_NS, 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_NS, ABS16DST, E}}, {{0x6, 0xb, 0xd, IMM4, DSTABS16LIST, E}}},
+ {O (O_MOV, SW), AV_H8SX, 0, "mov.w", {{IMM4_NS, ABS32DST, E}}, {{0x6, 0xb, 0xf, IMM4, DSTABS32LIST, E}}},
+
+ MOVFROM_IMM8 (O (O_MOV, SW), PREFIX_015D, "mov.w", IMM8U_NS),
+ 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", IMM8U_NS),
+ MOVFROM_IMM (O (O_MOV, SL), PREFIX_7A7C, "mov.l", IMM16U_NS, 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_H8SX, 6, "mov.l", {{RS32, DISP32DST, E}}, {{0x7, 0x8, B31 | DSTDISPREG, 0x0, 0x6, 0xb, 0xa, RS32, DSTDISP32LIST, E}}},
+ {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{RS32, DISP32DST, E}}, {{PREFIX_0100, 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_H8SX, 6, "mov.l", {{DISP32SRC, RD32, E}}, {{0x7, 0x8, B31 | DISPREG, 0x0, 0x6, 0xb, 0x2, RD32, SRC | DISP32LIST, E}}},
+ {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{DISP32SRC, RD32, E}}, {{PREFIX_0100, 0x7, 0x8, B30 | 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/include/opcode/i386.h b/include/opcode/i386.h
index 71c204c81f5..cb3a99a4e6f 100644
--- a/include/opcode/i386.h
+++ b/include/opcode/i386.h
@@ -1302,6 +1302,30 @@ static const template i386_optab[] = {
{"punpckhqdq",2, 0x660f6d, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
{"punpcklqdq",2, 0x660f6c, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+/* Prescott New Instructions. */
+
+{"addsubpd", 2, 0x660fd0, X, CpuPNI, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"addsubps", 2, 0xf20fd0, X, CpuPNI, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"fisttp", 1, 0xdf, 1, CpuPNI, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} },
+/* Intel Syntax */
+{"fisttpd", 1, 0xdd, 1, CpuPNI, FP|Modrm, { LLongMem, 0, 0} },
+{"fisttpq", 1, 0xdd, 1, CpuPNI, FP|Modrm, { LLongMem, 0, 0} },
+{"fisttpll", 1, 0xdd, 1, CpuPNI, FP|Modrm, { LLongMem, 0, 0} },
+{"haddpd", 2, 0x660f7c, X, CpuPNI, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"haddps", 2, 0xf20f7c, X, CpuPNI, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"hsubpd", 2, 0x660f7d, X, CpuPNI, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"hsubps", 2, 0xf20f7d, X, CpuPNI, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"lddqu", 2, 0xf20ff0, X, CpuPNI, FP|Modrm, { LLongMem, RegXMM, 0 } },
+{"monitor", 0, 0x0f01, 0xc8, CpuPNI, FP|ImmExt, { 0, 0, 0} },
+/* Need to ensure only "monitor %eax,%ecx,%edx" is accepted. */
+{"monitor", 3, 0x0f01, 0xc8, CpuPNI, FP|ImmExt, { Reg32, Reg32, Reg32} },
+{"movddup", 2, 0xf20f12, X, CpuPNI, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"movshdup", 2, 0xf30f16, X, CpuPNI, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"movsldup", 2, 0xf30f12, X, CpuPNI, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
+{"mwait", 0, 0x0f01, 0xc9, CpuPNI, FP|ImmExt, { 0, 0, 0} },
+/* Need to ensure only "mwait %eax,%ecx" is accepted. */
+{"mwait", 2, 0x0f01, 0xc9, CpuPNI, FP|ImmExt, { Reg32, Reg32, 0} },
+
/* AMD 3DNow! instructions. */
{"prefetch", 1, 0x0f0d, 0, Cpu3dnow, FP|Modrm, { ByteMem, 0, 0 } },
diff --git a/include/opcode/i860.h b/include/opcode/i860.h
index 6fdcdba6ecc..6e2a683a499 100644
--- a/include/opcode/i860.h
+++ b/include/opcode/i860.h
@@ -40,7 +40,7 @@ struct i860_opcode
enum expand_type
{
- E_MOV = 1, E_ADDR, E_U32, E_AND, E_S32, E_DELAY
+ E_MOV = 1, E_ADDR, E_U32, E_AND, E_S32, E_DELAY, XP_ONLY
};
@@ -135,6 +135,10 @@ static const struct i860_opcode i860_opcodes[] =
{ "pfld.d", 0x64000000, 0x98000007, "L(2),g", E_ADDR }, /* pfld.d #const(isrc2),fdest */
{ "pfld.d", 0x60000001, 0x9c000006, "1(2)++,g", 0 }, /* pfld.d isrc1(isrc2)++,fdest */
{ "pfld.d", 0x64000001, 0x98000006, "L(2)++,g", E_ADDR }, /* pfld.d #const(isrc2)++,fdest */
+{ "pfld.q", 0x60000004, 0x9c000003, "1(2),g", XP_ONLY }, /* pfld.q isrc1(isrc2),fdest */
+{ "pfld.q", 0x64000004, 0x98000003, "L(2),g", XP_ONLY }, /* pfld.q #const(isrc2),fdest */
+{ "pfld.q", 0x60000005, 0x9c000002, "1(2)++,g", XP_ONLY }, /* pfld.q isrc1(isrc2)++,fdest */
+{ "pfld.q", 0x64000005, 0x98000002, "L(2)++,g", XP_ONLY }, /* pfld.q #const(isrc2)++,fdest */
{ "fst.l", 0x28000002, 0xd4000001, "g,1(2)", 0 }, /* fst.l fdest,isrc1(isrc2) */
{ "fst.l", 0x2c000002, 0xd0000001, "g,K(2)", E_ADDR }, /* fst.l fdest,#const(isrc2) */
@@ -204,6 +208,16 @@ static const struct i860_opcode i860_opcodes[] =
{ "calli", 0x4c000002, 0xb000001d, "1", E_DELAY }, /* calli isrc1ni */
{ "intovr", 0x4c000004, 0xb000001b, "", 0 }, /* intovr trap on integer overflow */
{ "unlock", 0x4c000007, 0xb0000018, "", 0 }, /* unlock clear BL in dirbase */
+{ "ldio.l", 0x4c000408, 0xb00003f7, "2,d", XP_ONLY }, /* ldio.l isrc2,idest */
+{ "ldio.s", 0x4c000208, 0xb00005f7, "2,d", XP_ONLY }, /* ldio.s isrc2,idest */
+{ "ldio.b", 0x4c000008, 0xb00007f7, "2,d", XP_ONLY }, /* ldio.b isrc2,idest */
+{ "stio.l", 0x4c000409, 0xb00003f6, "1,2", XP_ONLY }, /* stio.l isrc1ni,isrc2 */
+{ "stio.s", 0x4c000209, 0xb00005f6, "1,2", XP_ONLY }, /* stio.s isrc1ni,isrc2 */
+{ "stio.b", 0x4c000009, 0xb00007f6, "1,2", XP_ONLY }, /* stio.b isrc1ni,isrc2 */
+{ "ldint.l", 0x4c00040a, 0xb00003f5, "2,d", XP_ONLY }, /* ldint.l isrc2,idest */
+{ "ldint.s", 0x4c00020a, 0xb00005f5, "2,d", XP_ONLY }, /* ldint.s isrc2,idest */
+{ "ldint.b", 0x4c00000a, 0xb00007f5, "2,d", XP_ONLY }, /* ldint.b isrc2,idest */
+{ "scyc.b", 0x4c00000b, 0xb00007f4, "2", XP_ONLY }, /* scyc.b isrc2 */
/* CTRL-Format Instructions */
{ "br", 0x68000000, 0x94000000, "l", E_DELAY }, /* br lbroff */
diff --git a/include/opcode/ppc.h b/include/opcode/ppc.h
index ffd313acd52..c4adf712b75 100644
--- a/include/opcode/ppc.h
+++ b/include/opcode/ppc.h
@@ -1,5 +1,5 @@
/* ppc.h -- Header file for PowerPC opcode table
- Copyright 1994, 1995, 1999, 2000, 2001, 2002
+ Copyright 1994, 1995, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support
@@ -273,6 +273,9 @@ extern const struct powerpc_operand powerpc_operands[];
/* This operand is for the DS field in a DS form instruction. */
#define PPC_OPERAND_DS (020000)
+
+/* This operand is for the DQ field in a DQ form instruction. */
+#define PPC_OPERAND_DQ (040000)
/* The POWER and PowerPC assemblers use a few macros. We keep them
with the operands table for simplicity. The macro table is an
diff --git a/include/safe-ctype.h b/include/safe-ctype.h
index b2ad8490bd0..69a3f74cc6f 100644
--- a/include/safe-ctype.h
+++ b/include/safe-ctype.h
@@ -37,7 +37,24 @@ Boston, MA 02111-1307, USA. */
#ifdef isalpha
#error "safe-ctype.h and ctype.h may not be used simultaneously"
+#endif
+
+/* Determine host character set. */
+#define HOST_CHARSET_UNKNOWN 0
+#define HOST_CHARSET_ASCII 1
+#define HOST_CHARSET_EBCDIC 2
+
+#if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \
+ && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21
+# define HOST_CHARSET HOST_CHARSET_ASCII
#else
+# if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \
+ && 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A
+# define HOST_CHARSET HOST_CHARSET_EBCDIC
+# else
+# define HOST_CHARSET HOST_CHARSET_UNKNOWN
+# endif
+#endif
/* Categories. */
@@ -99,5 +116,4 @@ extern const unsigned char _sch_tolower[256];
#define TOUPPER(c) _sch_toupper[(c) & 0xff]
#define TOLOWER(c) _sch_tolower[(c) & 0xff]
-#endif /* no ctype.h */
#endif /* SAFE_CTYPE_H */
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index d26d5ef3e07..99f2f0a695a 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,51 @@
+2003-06-26 H.J. Lu <hongjiu.lu@intel.com>
+
+ * testsuite/demangle-expected: Add more GNU V3 testcases.
+
+2003-06-22 Zack Weinberg <zack@codesourcery.com>
+
+ * safe-ctype.c: Use HOST_CHARSET_ASCII and HOST_CHARSET_EBCDIC,
+ not HC_ASCII and HC_EBCDIC.
+ Add documentation in form expected by gather-docs.
+ * hex.c: Use HOST_CHARSET, not hand-coded check of character set.
+ * Makefile.in, functions.texi: Regenerate.
+
+2003-06-21 Zack Weinberg <zack@codesourcery.com>
+
+ * safe-ctype.c: Separate out EOF==-1 check. Use HOST_CHARSET
+ for charset determination.
+
+2003-06-19 Dara Hazeghi <dhazeghi@yahoo.com>
+
+ * configure.in: Add check for malloc.h needed by
+ m68k for function free().
+ * configure: Regenerated.
+ * config.in: Add HAVE_MALLOC_H.
+ * hashtab.c: include malloc.h were available for
+ free().
+
+2003-06-09 Albert Chin-A-Young <china@thewrittenword.com>
+
+ PR bootstrap/10974
+ * physmem.c: Update comment.
+ * configure.in: Modify test for _system_configuration for older
+ AIX systems.
+
+ * config.in, configure: Regenerated.
+
+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.
@@ -78,7 +126,7 @@
ANSI_PROTOTYPES.
* vsprintf.c: Include "ansidecl.h" earlier, rely on
ANSI_PROTOTYPES and possibly include <stdarg.h>.
-
+
* Makefile.in: Regenerate dependencies.
2003-04-15 DJ Delorie <dj@redhat.com>
@@ -176,7 +224,7 @@
2003-02-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
Richard Earnshaw <rearnsha@arm.com>
Geoffrey Keating <geoffk@apple.com>
-
+
* configure.in: Check for sys/sysctl.h and sysctl.
* physmem.c: Add support for *bsd and darwin.
* Makefile.in: Generate depedency for physmem.o.
@@ -205,7 +253,7 @@
* physmem.c (physmem_total, physmem_available): De-ANSI-fy.
* configure.in (AC_CHECK_FUNCS): Add pstat_getstatic and
pstat_getdynamic.
-
+
2003-02-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (CFILES): Add physmem.c.
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
index d73ab2fef77..5d2dc3cbf8d 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
@@ -447,7 +447,8 @@ getpwd.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
getruntime.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
hashtab.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/hashtab.h \
$(INCDIR)/libiberty.h
-hex.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+hex.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/safe-ctype.h
lbasename.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
$(INCDIR)/safe-ctype.h
lrealpath.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
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/config.in b/libiberty/config.in
index 14ab3793c5c..50ed3266852 100644
--- a/libiberty/config.in
+++ b/libiberty/config.in
@@ -291,6 +291,9 @@
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+/* Define if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
/* whether byteorder is bigendian */
#undef WORDS_BIGENDIAN
@@ -316,9 +319,6 @@
/* Define if you have the sys_siglist variable. */
#undef HAVE_SYS_SIGLIST
-/* Define if you have the _system_configuration variable. */
-#undef HAVE__SYSTEM_CONFIGURATION
-
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP
systems. This function is required for alloca.c support on those
systems. */
@@ -331,6 +331,9 @@
STACK_DIRECTION = 0 => direction of growth unknown */
#undef STACK_DIRECTION
+/* Define if you have the _system_configuration variable. */
+#undef HAVE__SYSTEM_CONFIGURATION
+
/* Define if canonicalize_file_name is not declared in system header files. */
#undef NEED_DECLARATION_CANONICALIZE_FILE_NAME
diff --git a/libiberty/configure b/libiberty/configure
index d0899a2dcbb..77d5170a877 100755
--- a/libiberty/configure
+++ b/libiberty/configure
@@ -1492,7 +1492,7 @@ else
fi
echo "$ac_t""$CPP" 1>&6
-for ac_hdr in sys/file.h sys/param.h limits.h stdlib.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h
+for ac_hdr in sys/file.h sys/param.h limits.h stdlib.h malloc.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@@ -1875,7 +1875,7 @@ funcs="$funcs waitpid"
# Also in the old function.def file: alloca, vfork, getopt.
-vars="sys_errlist sys_nerr sys_siglist _system_configuration"
+vars="sys_errlist sys_nerr sys_siglist"
checkfuncs="getrusage on_exit psignal strerror strsignal sysconf times sbrk gettimeofday"
checkfuncs="$checkfuncs realpath canonicalize_file_name pstat_getstatic pstat_getdynamic sysmp"
@@ -1959,10 +1959,6 @@ EOF
#define HAVE_SYS_SIGLIST 1
EOF
- cat >> confdefs.h <<\EOF
-#define HAVE__SYSTEM_CONFIGURATION 1
-EOF
-
fi
# For each of these functions, if the host does not provide the
@@ -2157,7 +2153,7 @@ if test -z "${setobjs}"; then
# We haven't set the list of objects yet. Use the standard autoconf
# tests. This will only work if the compiler works.
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2161: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2157: 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.
@@ -2168,12 +2164,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 2172 "configure"
+#line 2168 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:2177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2173: \"$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
@@ -2199,19 +2195,19 @@ 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:2203: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2199: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
for ac_func in $funcs
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2210: checking for $ac_func" >&5
+echo "configure:2206: 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 2215 "configure"
+#line 2211 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2234,7 +2230,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2234: \"$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
@@ -2261,12 +2257,12 @@ done
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:2265: checking whether alloca needs Cray hooks" >&5
+echo "configure:2261: 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 2270 "configure"
+#line 2266 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -2291,12 +2287,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:2295: checking for $ac_func" >&5
+echo "configure:2291: 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 2300 "configure"
+#line 2296 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2319,7 +2315,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2319: \"$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
@@ -2345,7 +2341,7 @@ fi
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:2349: checking stack direction for C alloca" >&5
+echo "configure:2345: 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
@@ -2353,7 +2349,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 2357 "configure"
+#line 2353 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -2372,7 +2368,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:2376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2372: \"$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
@@ -2394,17 +2390,17 @@ EOF
ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:2398: checking for vfork.h" >&5
+echo "configure:2394: checking for vfork.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2403 "configure"
+#line 2399 "configure"
#include "confdefs.h"
#include <vfork.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2404: \"$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*
@@ -2429,18 +2425,18 @@ else
fi
echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:2433: checking for working vfork" >&5
+echo "configure:2429: checking for working vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
echo $ac_n "checking for vfork""... $ac_c" 1>&6
-echo "configure:2439: checking for vfork" >&5
+echo "configure:2435: checking for vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2444 "configure"
+#line 2440 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vfork(); below. */
@@ -2463,7 +2459,7 @@ vfork();
; return 0; }
EOF
-if { (eval echo configure:2467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_vfork=yes"
else
@@ -2485,7 +2481,7 @@ fi
ac_cv_func_vfork_works=$ac_cv_func_vfork
else
cat > conftest.$ac_ext <<EOF
-#line 2489 "configure"
+#line 2485 "configure"
#include "confdefs.h"
/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
@@ -2580,7 +2576,7 @@ main() {
}
}
EOF
-if { (eval echo configure:2584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_vfork_works=yes
else
@@ -2612,12 +2608,12 @@ fi
for ac_func in _doprnt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2616: checking for $ac_func" >&5
+echo "configure:2612: 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 2621 "configure"
+#line 2617 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2640,7 +2636,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2640: \"$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
@@ -2670,12 +2666,12 @@ done
for ac_func in _doprnt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2674: checking for $ac_func" >&5
+echo "configure:2670: 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 2679 "configure"
+#line 2675 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2698,7 +2694,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2698: \"$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
@@ -2726,19 +2722,19 @@ done
for v in $vars; do
echo $ac_n "checking for $v""... $ac_c" 1>&6
-echo "configure:2730: checking for $v" >&5
+echo "configure:2726: checking for $v" >&5
if eval "test \"`echo '$''{'libiberty_cv_var_$v'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2735 "configure"
+#line 2731 "configure"
#include "confdefs.h"
int *p;
int main() {
extern int $v []; p = $v;
; return 0; }
EOF
-if { (eval echo configure:2742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "libiberty_cv_var_$v=yes"
else
@@ -2761,15 +2757,43 @@ EOF
echo "$ac_t""no" 1>&6
fi
done
+
+ # special check for _system_configuration because AIX <4.3.2 do not
+ # contain the `physmem' member.
+ echo $ac_n "checking for external symbol _system_configuration""... $ac_c" 1>&6
+echo "configure:2765: checking for external symbol _system_configuration" >&5
+ cat > conftest.$ac_ext <<EOF
+#line 2767 "configure"
+#include "confdefs.h"
+#include <sys/systemcfg.h>
+int main() {
+double x = _system_configuration.physmem;
+; return 0; }
+EOF
+if { (eval echo configure:2774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
+#define HAVE__SYSTEM_CONFIGURATION 1
+EOF
+
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ echo "$ac_t""no" 1>&6
+fi
+rm -f conftest*
+
for ac_func in $checkfuncs
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2768: checking for $ac_func" >&5
+echo "configure:2792: 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 2773 "configure"
+#line 2797 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2792,7 +2816,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2820: \"$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
@@ -2817,12 +2841,12 @@ fi
done
echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
-echo "configure:2821: checking whether canonicalize_file_name must be declared" >&5
+echo "configure:2845: checking whether canonicalize_file_name must be declared" >&5
if eval "test \"`echo '$''{'libiberty_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2826 "configure"
+#line 2850 "configure"
#include "confdefs.h"
#include "confdefs.h"
@@ -2844,7 +2868,7 @@ int main() {
char *(*pfn) = (char *(*)) canonicalize_file_name
; return 0; }
EOF
-if { (eval echo configure:2848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
libiberty_cv_decl_needed_canonicalize_file_name=no
else
@@ -2876,21 +2900,21 @@ case "${host}" in
esac
-for ac_hdr in unistd.h
+for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2884: checking for $ac_hdr" >&5
+echo "configure:2908: 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 2889 "configure"
+#line 2913 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2918: \"$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*
@@ -2919,12 +2943,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2923: checking for $ac_func" >&5
+echo "configure:2947: 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 2928 "configure"
+#line 2952 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2947,7 +2971,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2975: \"$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
@@ -2972,7 +2996,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:2976: checking for working mmap" >&5
+echo "configure:3000: 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
@@ -2980,7 +3004,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 2984 "configure"
+#line 3008 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -3008,11 +3032,24 @@ else
#include <fcntl.h>
#include <sys/mman.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
/* This mess was copied from the GNU getpagesize.h. */
#ifndef HAVE_GETPAGESIZE
-# ifdef HAVE_UNISTD_H
-# include <unistd.h>
-# endif
/* Assume that all systems that can run configure have sys/param.h. */
# ifndef HAVE_SYS_PARAM_H
@@ -3120,7 +3157,7 @@ main()
}
EOF
-if { (eval echo configure:3124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3161: \"$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
@@ -3144,7 +3181,7 @@ fi
echo $ac_n "checking for working strncmp""... $ac_c" 1>&6
-echo "configure:3148: checking for working strncmp" >&5
+echo "configure:3185: checking for working strncmp" >&5
if eval "test \"`echo '$''{'ac_cv_func_strncmp_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3152,7 +3189,7 @@ else
ac_cv_func_strncmp_works=no
else
cat > conftest.$ac_ext <<EOF
-#line 3156 "configure"
+#line 3193 "configure"
#include "confdefs.h"
/* Test by Jim Wilson and Kaveh Ghazi.
@@ -3216,7 +3253,7 @@ main ()
}
EOF
-if { (eval echo configure:3220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_strncmp_works=yes
else
diff --git a/libiberty/configure.in b/libiberty/configure.in
index 4a704e8cec2..5dca13ed6f6 100644
--- a/libiberty/configure.in
+++ b/libiberty/configure.in
@@ -143,7 +143,7 @@ AC_SUBST_FILE(host_makefile_frag)
# It's OK to check for header files. Although the compiler may not be
# able to link anything, it had better be able to at least compile
# something.
-AC_CHECK_HEADERS(sys/file.h sys/param.h limits.h stdlib.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h)
+AC_CHECK_HEADERS(sys/file.h sys/param.h limits.h stdlib.h malloc.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h)
AC_HEADER_SYS_WAIT
AC_HEADER_TIME
@@ -209,7 +209,7 @@ funcs="$funcs waitpid"
# Also in the old function.def file: alloca, vfork, getopt.
-vars="sys_errlist sys_nerr sys_siglist _system_configuration"
+vars="sys_errlist sys_nerr sys_siglist"
checkfuncs="getrusage on_exit psignal strerror strsignal sysconf times sbrk gettimeofday"
checkfuncs="$checkfuncs realpath canonicalize_file_name pstat_getstatic pstat_getdynamic sysmp"
@@ -230,7 +230,6 @@ if test "x" = "y"; then
AC_DEFINE(HAVE_SYS_ERRLIST, 1, [Define if you have the sys_errlist variable.])
AC_DEFINE(HAVE_SYS_NERR, 1, [Define if you have the sys_nerr variable.])
AC_DEFINE(HAVE_SYS_SIGLIST, 1, [Define if you have the sys_siglist variable.])
- AC_DEFINE(HAVE__SYSTEM_CONFIGURATION, 1, [Define if you have the _system_configuration variable.])
fi
# For each of these functions, if the host does not provide the
@@ -433,6 +432,17 @@ if test -z "${setobjs}"; then
AC_MSG_RESULT(no)
fi
done
+
+ # special check for _system_configuration because AIX <4.3.2 do not
+ # contain the `physmem' member.
+ AC_MSG_CHECKING([for external symbol _system_configuration])
+ AC_TRY_COMPILE([#include <sys/systemcfg.h>],
+ [double x = _system_configuration.physmem;],
+ [AC_MSG_RESULT([yes])
+ AC_DEFINE(HAVE__SYSTEM_CONFIGURATION, 1,
+ [Define if you have the _system_configuration variable.])],
+ [AC_MSG_RESULT([no])])
+
AC_CHECK_FUNCS($checkfuncs)
libiberty_NEED_DECLARATION(canonicalize_file_name)
fi
diff --git a/libiberty/functions.texi b/libiberty/functions.texi
index b34c20409e3..aac4424fd8f 100644
--- a/libiberty/functions.texi
+++ b/libiberty/functions.texi
@@ -3,6 +3,28 @@
@c Edit the *.c files, configure with --enable-maintainer-mode,
@c and let gather-docs build you a new copy.
+@c safe-ctype.c:24
+@defvr Extension HOST_CHARSET
+This macro indicates the basic character set and encoding used by the
+host: more precisely, the encoding used for character constants in
+preprocessor @samp{#if} statements (the C "execution character set").
+It is defined by @file{safe-ctype.h}, and will be an integer constant
+with one of the following values:
+
+@ftable @code
+@item HOST_CHARSET_UNKNOWN
+The host character set is unknown - that is, not one of the next two
+possibilities.
+
+@item HOST_CHARSET_ASCII
+The host character set is ASCII.
+
+@item HOST_CHARSET_EBCDIC
+The host character set is some variant of EBCDIC. (Only one of the
+nineteen EBCDIC varying characters is tested; exercise caution.)
+@end ftable
+@end defvr
+
@c alloca.c:26
@deftypefn Replacement void* alloca (size_t @var{size})
@@ -29,7 +51,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
@@ -317,7 +339,7 @@ between calls to @code{getpwd}.
@end deftypefn
-@c hex.c:25
+@c hex.c:30
@deftypefn Extension void hex_init (void)
Initializes the array mapping the current character set to
@@ -327,7 +349,7 @@ default ASCII-based table will normally be used on ASCII systems.
@end deftypefn
-@c hex.c:34
+@c hex.c:39
@deftypefn Extension int hex_p (int @var{c})
Evaluates to non-zero if the given character is a valid hex character,
@@ -336,7 +358,7 @@ or zero if it is not. Note that the value you pass will be cast to
@end deftypefn
-@c hex.c:42
+@c hex.c:47
@deftypefn Extension unsigned int hex_value (int @var{c})
Returns the numeric equivalent of the given character when interpreted
@@ -382,6 +404,78 @@ struct qelem @{
@end deftypefn
+@c safe-ctype.c:45
+@deffn Extension ISALPHA (@var{c})
+@deffnx Extension ISALNUM (@var{c})
+@deffnx Extension ISBLANK (@var{c})
+@deffnx Extension ISCNTRL (@var{c})
+@deffnx Extension ISDIGIT (@var{c})
+@deffnx Extension ISGRAPH (@var{c})
+@deffnx Extension ISLOWER (@var{c})
+@deffnx Extension ISPRINT (@var{c})
+@deffnx Extension ISPUNCT (@var{c})
+@deffnx Extension ISSPACE (@var{c})
+@deffnx Extension ISUPPER (@var{c})
+@deffnx Extension ISXDIGIT (@var{c})
+
+These twelve macros are defined by @file{safe-ctype.h}. Each has the
+same meaning as the corresponding macro (with name in lowercase)
+defined by the standard header @file{ctype.h}. For example,
+@code{ISALPHA} returns true for alphabetic characters and false for
+others. However, there are two differences between these macros and
+those provided by @file{ctype.h}:
+
+@itemize @bullet
+@item These macros are guaranteed to have well-defined behavior for all
+values representable by @code{signed char} and @code{unsigned char}, and
+for @code{EOF}.
+
+@item These macros ignore the current locale; they are true for these
+fixed sets of characters:
+@multitable {@code{XDIGIT}} {yada yada yada yada yada yada yada yada}
+@item @code{ALPHA} @tab @kbd{A-Za-z}
+@item @code{ALNUM} @tab @kbd{A-Za-z0-9}
+@item @code{BLANK} @tab @kbd{space tab}
+@item @code{CNTRL} @tab @code{!PRINT}
+@item @code{DIGIT} @tab @kbd{0-9}
+@item @code{GRAPH} @tab @code{ALNUM || PUNCT}
+@item @code{LOWER} @tab @kbd{a-z}
+@item @code{PRINT} @tab @code{GRAPH ||} @kbd{space}
+@item @code{PUNCT} @tab @kbd{`~!@@#$%^&*()_-=+[@{]@}\|;:'",<.>/?}
+@item @code{SPACE} @tab @kbd{space tab \n \r \f \v}
+@item @code{UPPER} @tab @kbd{A-Z}
+@item @code{XDIGIT} @tab @kbd{0-9A-Fa-f}
+@end multitable
+
+Note that, if the host character set is ASCII or a superset thereof,
+all these macros will return false for all values of @code{char} outside
+the range of 7-bit ASCII. In particular, both ISPRINT and ISCNTRL return
+false for characters with numeric values from 128 to 255.
+@end itemize
+@end deffn
+
+@c safe-ctype.c:94
+@deffn Extension ISIDNUM (@var{c})
+@deffnx Extension ISIDST (@var{c})
+@deffnx Extension IS_VSPACE (@var{c})
+@deffnx Extension IS_NVSPACE (@var{c})
+@deffnx Extension IS_SPACE_OR_NUL (@var{c})
+@deffnx Extension IS_ISOBASIC (@var{c})
+These six macros are defined by @file{safe-ctype.h} and provide
+additional character classes which are useful when doing lexical
+analysis of C or similar languages. They are true for the following
+sets of characters:
+
+@multitable {@code{SPACE_OR_NUL}} {yada yada yada yada yada yada yada yada}
+@item @code{IDNUM} @tab @kbd{A-Za-z0-9_}
+@item @code{IDST} @tab @kbd{A-Za-z_}
+@item @code{VSPACE} @tab @kbd{\r \n}
+@item @code{NVSPACE} @tab @kbd{space tab \f \v \0}
+@item @code{SPACE_OR_NUL} @tab @code{VSPACE || NVSPACE}
+@item @code{ISOBASIC} @tab @code{VSPACE || NVSPACE || PRINT}
+@end multitable
+@end deffn
+
@c lbasename.c:23
@deftypefn Replacement {const char*} lbasename (const char *@var{name})
@@ -922,7 +1016,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/hashtab.c b/libiberty/hashtab.c
index 3896328717a..cbf82592be1 100644
--- a/libiberty/hashtab.c
+++ b/libiberty/hashtab.c
@@ -45,6 +45,10 @@ Boston, MA 02111-1307, USA. */
#include <string.h>
#endif
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
+
#include <stdio.h>
#include "libiberty.h"
diff --git a/libiberty/hex.c b/libiberty/hex.c
index f425509be75..e4c5dfa2f1d 100644
--- a/libiberty/hex.c
+++ b/libiberty/hex.c
@@ -19,6 +19,11 @@ Boston, MA 02111-1307, USA. */
#include <stdio.h> /* for EOF */
#include "libiberty.h"
+#include "safe-ctype.h" /* for HOST_CHARSET_ASCII */
+
+#if EOF != -1
+ #error "hex.c requires EOF == -1"
+#endif
/*
@@ -62,9 +67,7 @@ systems.
/* Are we ASCII? */
-#if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \
- && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21 \
- && EOF == -1
+#if HOST_CHARSET == HOST_CHARSET_ASCII
const unsigned char _hex_value[_hex_array_size] =
{
diff --git a/libiberty/physmem.c b/libiberty/physmem.c
index 9185c1224e8..f64e07c74d4 100644
--- a/libiberty/physmem.c
+++ b/libiberty/physmem.c
@@ -145,7 +145,7 @@ physmem_total ()
#endif
#if HAVE__SYSTEM_CONFIGURATION
- /* This works on AIX. */
+ /* This works on AIX 4.3.3+. */
return _system_configuration.physmem;
#endif
diff --git a/libiberty/safe-ctype.c b/libiberty/safe-ctype.c
index 3bac84bf68a..91a0e9a2589 100644
--- a/libiberty/safe-ctype.c
+++ b/libiberty/safe-ctype.c
@@ -19,20 +19,109 @@ License along with libiberty; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* This is a compatible replacement of the standard C library's <ctype.h>
- with the following properties:
-
- - Implements all isxxx() macros required by C99.
- - Also implements some character classes useful when
- parsing C-like languages.
- - Does not change behavior depending on the current locale.
- - Behaves properly for all values in the range of a signed or
- unsigned char. */
+/*
+
+@defvr Extension HOST_CHARSET
+This macro indicates the basic character set and encoding used by the
+host: more precisely, the encoding used for character constants in
+preprocessor @samp{#if} statements (the C "execution character set").
+It is defined by @file{safe-ctype.h}, and will be an integer constant
+with one of the following values:
+
+@ftable @code
+@item HOST_CHARSET_UNKNOWN
+The host character set is unknown - that is, not one of the next two
+possibilities.
+
+@item HOST_CHARSET_ASCII
+The host character set is ASCII.
+
+@item HOST_CHARSET_EBCDIC
+The host character set is some variant of EBCDIC. (Only one of the
+nineteen EBCDIC varying characters is tested; exercise caution.)
+@end ftable
+@end defvr
+
+@deffn Extension ISALPHA (@var{c})
+@deffnx Extension ISALNUM (@var{c})
+@deffnx Extension ISBLANK (@var{c})
+@deffnx Extension ISCNTRL (@var{c})
+@deffnx Extension ISDIGIT (@var{c})
+@deffnx Extension ISGRAPH (@var{c})
+@deffnx Extension ISLOWER (@var{c})
+@deffnx Extension ISPRINT (@var{c})
+@deffnx Extension ISPUNCT (@var{c})
+@deffnx Extension ISSPACE (@var{c})
+@deffnx Extension ISUPPER (@var{c})
+@deffnx Extension ISXDIGIT (@var{c})
+
+These twelve macros are defined by @file{safe-ctype.h}. Each has the
+same meaning as the corresponding macro (with name in lowercase)
+defined by the standard header @file{ctype.h}. For example,
+@code{ISALPHA} returns true for alphabetic characters and false for
+others. However, there are two differences between these macros and
+those provided by @file{ctype.h}:
+
+@itemize @bullet
+@item These macros are guaranteed to have well-defined behavior for all
+values representable by @code{signed char} and @code{unsigned char}, and
+for @code{EOF}.
+
+@item These macros ignore the current locale; they are true for these
+fixed sets of characters:
+@multitable {@code{XDIGIT}} {yada yada yada yada yada yada yada yada}
+@item @code{ALPHA} @tab @kbd{A-Za-z}
+@item @code{ALNUM} @tab @kbd{A-Za-z0-9}
+@item @code{BLANK} @tab @kbd{space tab}
+@item @code{CNTRL} @tab @code{!PRINT}
+@item @code{DIGIT} @tab @kbd{0-9}
+@item @code{GRAPH} @tab @code{ALNUM || PUNCT}
+@item @code{LOWER} @tab @kbd{a-z}
+@item @code{PRINT} @tab @code{GRAPH ||} @kbd{space}
+@item @code{PUNCT} @tab @kbd{`~!@@#$%^&*()_-=+[@{]@}\|;:'",<.>/?}
+@item @code{SPACE} @tab @kbd{space tab \n \r \f \v}
+@item @code{UPPER} @tab @kbd{A-Z}
+@item @code{XDIGIT} @tab @kbd{0-9A-Fa-f}
+@end multitable
+
+Note that, if the host character set is ASCII or a superset thereof,
+all these macros will return false for all values of @code{char} outside
+the range of 7-bit ASCII. In particular, both ISPRINT and ISCNTRL return
+false for characters with numeric values from 128 to 255.
+@end itemize
+@end deffn
+
+@deffn Extension ISIDNUM (@var{c})
+@deffnx Extension ISIDST (@var{c})
+@deffnx Extension IS_VSPACE (@var{c})
+@deffnx Extension IS_NVSPACE (@var{c})
+@deffnx Extension IS_SPACE_OR_NUL (@var{c})
+@deffnx Extension IS_ISOBASIC (@var{c})
+These six macros are defined by @file{safe-ctype.h} and provide
+additional character classes which are useful when doing lexical
+analysis of C or similar languages. They are true for the following
+sets of characters:
+
+@multitable {@code{SPACE_OR_NUL}} {yada yada yada yada yada yada yada yada}
+@item @code{IDNUM} @tab @kbd{A-Za-z0-9_}
+@item @code{IDST} @tab @kbd{A-Za-z_}
+@item @code{VSPACE} @tab @kbd{\r \n}
+@item @code{NVSPACE} @tab @kbd{space tab \f \v \0}
+@item @code{SPACE_OR_NUL} @tab @code{VSPACE || NVSPACE}
+@item @code{ISOBASIC} @tab @code{VSPACE || NVSPACE || PRINT}
+@end multitable
+@end deffn
+
+*/
#include "ansidecl.h"
#include <safe-ctype.h>
#include <stdio.h> /* for EOF */
+#if EOF != -1
+ #error "<safe-ctype.h> requires EOF == -1"
+#endif
+
/* Shorthand */
#define bl _sch_isblank
#define cn _sch_iscntrl
@@ -64,9 +153,7 @@ Boston, MA 02111-1307, USA. */
#define S (const unsigned short) (nv|sp|bl|pr) /* space */
/* Are we ASCII? */
-#if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \
- && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21 \
- && EOF == -1
+#if HOST_CHARSET == HOST_CHARSET_ASCII
const unsigned short _sch_istable[256] =
{
@@ -159,5 +246,9 @@ const unsigned char _sch_toupper[256] =
};
#else
- #error "Unsupported host character set"
-#endif /* not ASCII */
+# if HOST_CHARSET == HOST_CHARSET_EBCDIC
+ #error "FIXME: write tables for EBCDIC"
+# else
+ #error "Unrecognized host character set"
+# endif
+#endif
diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected
index c0483188239..6be66e10b48 100644
--- a/libiberty/testsuite/demangle-expected
+++ b/libiberty/testsuite/demangle-expected
@@ -2598,9 +2598,269 @@ _Utf58_0_1__1_2147483647__2147483648
--format=gnu-v3
St9bad_alloc
std::bad_alloc
+#
+--format=gnu-v3
+_ZN1f1fE
+f::f
+#
+--format=gnu-v3
+_Z1fv
+f()
+#
+--format=gnu-v3
+_Z1fi
+f(int)
+#
+--format=gnu-v3
+_Z3foo3bar
+foo(bar)
+#
+--format=gnu-v3
+_Zrm1XS_
+operator%(X, X)
+#
+--format=gnu-v3
+_ZplR1XS0_
+operator+(X&, X&)
+#
+--format=gnu-v3
+_ZlsRK1XS1_
+operator<<(X const&, X const&)
+#
+--format=gnu-v3
+_ZN3FooIA4_iE3barE
+Foo<int[4]>::bar
+#
+--format=gnu-v3
+_Z1fIiEvi
+void f<int>(int)
+#
+--format=gnu-v3
+_Z5firstI3DuoEvS0_
+void first<Duo>(Duo)
+#
+--format=gnu-v3
+_Z5firstI3DuoEvT_
+void first<Duo>(Duo)
+#
+--format=gnu-v3
+_Z3fooIiFvdEiEvv
+void foo<int, void ()(double), int>()
+#
+--format=gnu-v3
+_ZN1N1fE
+N::f
+#
+--format=gnu-v3
+_ZN6System5Sound4beepEv
+System::Sound::beep()
+#
+--format=gnu-v3
+_ZN5Arena5levelE
+Arena::level
+#
+--format=gnu-v3
+_ZN5StackIiiE5levelE
+Stack<int, int>::level
+#
+--format=gnu-v3
+_Z1fI1XEvPVN1AIT_E1TE
+void f<X>(A<X>::T volatile*)
+#
+--format=gnu-v3
+_ZngILi42EEvN1AIXplT_Li2EEE1TE
+void operator-<42>(A<(42) + (2)>::T)
+#
+--format=gnu-v3
+_Z4makeI7FactoryiET_IT0_Ev
+Factory<int> make<Factory, int>()
+#
+--format=gnu-v3
+_Z4makeI7FactoryiET_IT0_Ev
+Factory<int> make<Factory, int>()
+#
+--format=gnu-v3
+_Z3foo5Hello5WorldS0_S_
+foo(Hello, World, World, Hello)
+#
+--format=gnu-v3
+_Z3fooPM2ABi
+foo(int AB::**)
+#
+--format=gnu-v3
+_ZlsRSoRKSs
+operator<<(std::ostream&, std::string const&)
+#
+--format=gnu-v3
+_ZTI7a_class
+typeinfo for a_class
+#
+--format=gnu-v3
+U4_farrVKPi
+int* restrict volatile const _far
+#
+--format=gnu-v3
+_Z3fooILi2EEvRAplT_Li1E_i
+void foo<2>(int (&) [(2) + (1)])
+#
+--format=gnu-v3
+_Z1fM1AKFvvE
+f(void (A::*)() const)
+#
+--format=gnu-v3
+_Z3fooc
+foo(char)
+#
+--format=gnu-v3
+2CBIL_Z3foocEE
+CB<foo(char)>
+#
+--format=gnu-v3
+2CBIL_Z7IsEmptyEE
+CB<IsEmpty>
+#
+--format=gnu-v3
+_ZZN1N1fEiE1p
+N::f(int)::p
+#
+--format=gnu-v3
+_ZZN1N1fEiEs
+N::f(int)::string literal
+#
+--format=gnu-v3
+_Z1fPFvvEM1SFvvE
+f(void (*)(), void (S::*)())
+#
+--format=gnu-v3
+_ZN1N1TIiiE2mfES0_IddE
+N::T<int, int>::mf(N::T<double, double>)
+#
+--format=gnu-v3
+_ZSt5state
+std::state
+#
+--format=gnu-v3
+_ZNSt3_In4wardE
+std::_In::ward
+#
+--format=gnu-v3
+_Z1fKPFiiE
+f(int (* const)(int))
+#
+--format=gnu-v3
+_Z1fAszL_ZZNK1N1A1fEvE3foo_0E_i
+f(int[sizeof(N::A::f() const::foo)])
+#
+--format=gnu-v3
+_Z1fA37_iPS_
+f(int[37], int (*) [37])
+#
+--format=gnu-v3
+_Z1fM1AFivEPS0_
+f(int (A::*)(), int (*)())
+#
+--format=gnu-v3
+_Z1fPFPA1_ivE
+f(int (*(*)()) [1])
+#
+--format=gnu-v3
+_Z1fPKM1AFivE
+f(int (A::* const*)())
+#
+--format=gnu-v3
+_Z1jM1AFivEPS1_
+j(int (A::*)(), int (A::**)())
+#
+--format=gnu-v3
+_Z1sPA37_iPS0_
+s(int (*) [37], int (**) [37])
+#
+--format=gnu-v3
+_Z3fooA30_A_i
+foo(int[30][])
+#
+--format=gnu-v3
+_Z3kooPA28_A30_i
+koo(int (*) [28][30])
+#
+--format=gnu-v3
+_ZlsRKU3fooU4bart1XS0_
+operator<<(X bart foo const&, X bart)
+#
+--format=gnu-v3
+_ZlsRKU3fooU4bart1XS2_
+operator<<(X bart foo const&, X bart foo const)
+#
+--format=gnu-v3
+_Z1fM1AKFivE
+f(int (A::*)() const)
+#
+--format=gnu-v3
+_Z3absILi11EEvv
+void abs<11>()
+#
+--format=gnu-v3
+_ZN1AIfEcvT_IiEEv
+A<float>::operator int<int>()
+#
+--format=gnu-v3
+_ZN12libcw_app_ct10add_optionIS_EEvMT_FvPKcES3_cS3_S3_
+void libcw_app_ct::add_option<libcw_app_ct>(void (libcw_app_ct::*)(char const*), char const*, char, char const*, char const*)
+#
+--format=gnu-v3
+_ZGVN5libcw24_GLOBAL__N_cbll.cc0ZhUKa23compiler_bug_workaroundISt6vectorINS_13omanip_id_tctINS_5debug32memblk_types_manipulator_data_ctEEESaIS6_EEE3idsE
+guard variable for libcw::(anonymous namespace)::compiler_bug_workaround<std::vector<libcw::omanip_id_tct<libcw::debug::memblk_types_manipulator_data_ct>, std::allocator<libcw::omanip_id_tct<libcw::debug::memblk_types_manipulator_data_ct> > > >::ids
+#
+--format=gnu-v3
+_ZN5libcw5debug13cwprint_usingINS_9_private_12GlobalObjectEEENS0_17cwprint_using_tctIT_EERKS5_MS5_KFvRSt7ostreamE
+libcw::debug::cwprint_using_tct<libcw::_private_::GlobalObject> libcw::debug::cwprint_using<libcw::_private_::GlobalObject>(libcw::_private_::GlobalObject const&, void (libcw::_private_::GlobalObject::*)(std::ostream&) const)
+#
+--format=gnu-v3
+_ZNKSt14priority_queueIP27timer_event_request_base_ctSt5dequeIS1_SaIS1_EE13timer_greaterE3topEv
+std::priority_queue<timer_event_request_base_ct*, std::deque<timer_event_request_base_ct*, std::allocator<timer_event_request_base_ct*> >, timer_greater>::top() const
+#
+--format=gnu-v3
+_ZNKSt15_Deque_iteratorIP15memory_block_stRKS1_PS2_EeqERKS5_
+std::_Deque_iterator<memory_block_st*, memory_block_st* const&, memory_block_st* const*>::operator==(std::_Deque_iterator<memory_block_st*, memory_block_st* const&, memory_block_st* const*> const&) const
+#
+--format=gnu-v3
+_ZNKSt17__normal_iteratorIPK6optionSt6vectorIS0_SaIS0_EEEmiERKS6_
+std::__normal_iterator<option const*, std::vector<option, std::allocator<option> > >::operator-(std::__normal_iterator<option const*, std::vector<option, std::allocator<option> > > const&) const
+#
+--format=gnu-v3
+_ZNSbIcSt11char_traitsIcEN5libcw5debug27no_alloc_checking_allocatorEE12_S_constructIPcEES6_T_S7_RKS3_
+char* std::basic_string<char, std::char_traits<char>, libcw::debug::no_alloc_checking_allocator>::_S_construct<char*>(char*, char*, libcw::debug::no_alloc_checking_allocator const&)
+#
+--format=gnu-v3
+_Z1fI1APS0_PKS0_EvT_T0_T1_PA4_S3_M1CS8_
+void f<A, A*, A const*>(A, A*, A const*, A const* (*) [4], A const* (* C::*) [4])
+#
+--format=gnu-v3
+_Z3fooiPiPS_PS0_PS1_PS2_PS3_PS4_PS5_PS6_PS7_PS8_PS9_PSA_PSB_PSC_
+foo(int, int*, int**, int***, int****, int*****, int******, int*******, int********, int*********, int**********, int***********, int************, int*************, int**************, int***************)
+#
+--format=gnu-v3
+_ZSt1BISt1DIP1ARKS2_PS3_ES0_IS2_RS2_PS2_ES2_ET0_T_SB_SA_PT1_
+std::D<A*, A*&, A**> std::B<std::D<A*, A* const&, A* const*>, std::D<A*, A*&, A**>, A*>(std::D<A*, A* const&, A* const*>, std::D<A*, A* const&, A* const*>, std::D<A*, A*&, A**>, A**)
+#
+--format=gnu-v3
+_X11TransParseAddress
+_X11TransParseAddress
+#
+--format=gnu-v3
+_ZNSt13_Alloc_traitsISbIcSt18string_char_traitsIcEN5libcw5debug9_private_17allocator_adaptorIcSt24__default_alloc_templateILb0ELi327664EELb1EEEENS5_IS9_S7_Lb1EEEE15_S_instancelessE
+std::_Alloc_traits<std::basic_string<char, std::string_char_traits<char>, libcw::debug::_private_::allocator_adaptor<char, std::__default_alloc_template<false, 327664>, true> >, libcw::debug::_private_::allocator_adaptor<std::basic_string<char, std::string_char_traits<char>, libcw::debug::_private_::allocator_adaptor<char, std::__default_alloc_template<false, 327664>, true> >, std::__default_alloc_template<false, 327664>, true> >::_S_instanceless
+#
+--format=gnu-v3
+_GLOBAL__I__Z2fnv
+global constructors keyed to fn()
+#
+--format=gnu-v3
+_Z1rM1GFivEMS_KFivES_M1HFivES1_4whatIKS_E5what2IS8_ES3_
+r(int (G::*)(), int (G::*)() const, G, int (H::*)(), int (G::*)(), what<G const>, what2<G const>, int (G::*)() const)
#
# This caused an infinite loop.
# We still don't demangle this correctly, but at least we don't hang.
--format=auto
__CPR212____ct__Q3_3std141list__tm__128_Q2_3edm41THandle__tm__26_Q2_4emid15EMparticleChunkQ2_3std68allocator__tm__51_Q2_3edmJ37J14const_iteratorFRCQ3_3std18list__tm__7_Z1ZZ2Z8iterator
-_Z1ZZ2Z::__CPR212____ct__Q3_3std141list__tm__128_Q2_3edm41THandle__tm__26_Q2_4emid15EMparticleChunkQ2_3std68allocator__tm__51_Q2_3edmJ37J14const_iteratorFRCQ3_3std18list__tm(iterator)
+__CPR212____ct__Q3_3std141list__tm__128_Q2_3edm41THandle__tm__26_Q2_4emid15EMparticleChunkQ2_3std68allocator__tm__51_Q2_3edmJ37J14const_iteratorFRCQ3_3std18list__tm__7_Z1ZZ2Z8iterator
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 de8f363dac5..d0806c4c9ee 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,121 @@
+2003-06-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-dis.c (PNI_Fixup): New. Fix up "mwait" and "monitor" in
+ Intel Precott New Instructions.
+ (PREGRP27): New. Added for "addsubpd" and "addsubps".
+ (PREGRP28): New. Added for "haddpd" and "haddps".
+ (PREGRP29): New. Added for "hsubpd" and "hsubps".
+ (PREGRP30): New. Added for "movsldup" and "movddup".
+ (PREGRP31): New. Added for "movshdup" and "movhpd".
+ (PREGRP32): New. Added for "lddqu".
+ (dis386_twobyte): Use PREGRP30 to replace the "movlpX" entry.
+ Use PREGRP31 to replace the "movhpX" entry. Use PREGRP28 for
+ entry 0x7c. Use PREGRP29 for entry 0x7d. Use PREGRP27 for
+ entry 0xd0. Use PREGRP32 for entry 0xf0.
+ (twobyte_has_modrm): Updated.
+ (twobyte_uses_SSE_prefix): Likewise.
+ (grps): Use PNI_Fixup in the "sidtQ" entry.
+ (prefix_user_table): Add PREGRP27, PREGRP28, PREGRP29, PREGRP30,
+ PREGRP31 and PREGRP32.
+ (float_mem): Use "fisttp{l||l|}" in entry 1 in opcode 0xdb.
+ Use "fisttpll" in entry 1 in opcode 0xdd.
+ Use "fisttp" in entry 1 in opcode 0xdf.
+
+2003-06-19 Christian Groessler <chris@groessler.org>
+
+ * z8k-dis.c (instr_data_s): Change tabl_index from long to int.
+ (print_insn_z8k): Correctly check return value from
+ z8k_lookup_instr call.
+ (unparse_instr): Handle CLASS_IRO case.
+ * z8kgen.c: Fix function definitions. Fix formatting.
+ (opt): Add brk opcode alias for non-simulator breakpoint. Add
+ missing and fix existing in/out and sin/sout opcode definitions.
+ (args): "@ri", "@ro" - add CLASS_IRO register usage for in/out
+ opcodes.
+ (internal): Check p->flags for non-zero before dereferencing it.
+ (gas): Add CLASS_IRO line. Insert new OPC_xxx lines for the added
+ opcodes and renumber the remaining lines repectively.
+ (main): Remove "-d" command line switch.
+ * z8k-opc.h: Regenerate with new z8kgen.c.
+
+2003-06-11 H.J. Lu <hongjiu.lu@intel.com>
+
+ * po/Make-in (DESTDIR): New.
+ (install-data-yes): Support $(DESTDIR).
+ (uninstall): Likewise.
+
+2003-06-11 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+ * po/POTFILES.in: Regenerate.
+
+2003-06-10 Doug Evans <dje@sebabeach.org>
+
+ * cgen-asm.in (@arch@_cgen_assemble_insn): CGEN_INSN_RELAX renamed to
+ CGEN_INSN_RELAXED.
+ * fr30-asm.c,fr30-desc.c,fr30-desc.h: Regenerate.
+ * frv-asm.c,frv-desc.c,frv-desc.h: Regenerate.
+ * ip2k-asm.c,ip2k-desc.c,ip2k-desc.h: Regenerate.
+ * iq2000-asm.c,iq2000-desc.c,iq2000-desc.h: Regenerate.
+ * m32r-asm.c,m32r-desc.c,m32r-desc.h,m32r-opc.c: Regenerate.
+ * openrisc-asm.c,openrisc-desc.c,openrisc-desc.h: Regenerate.
+ * xstormy16-asm.c,xstormy16-desc.c,xstormy16-desc.h: Regenerate.
+
+2003-06-10 Gary Hade <garyhade@us.ibm.com>
+ Alan Modra <amodra@bigpond.net.au>
+
+ * ppc-opc.c (DQ, RAQ, RSQ, RTQ): Define.
+ (insert_dq, extract_dq, insert_raq, insert_rtq, insert_rsq): New.
+ (powerpc_opcodes): Add "attn", "lq" and "stq".
+
+2003-06-10 Richard Sandiford <rsandifo@redhat.com>
+
+ * h8300-dis.c (bfd_h8_disassemble): Don't print brackets round
+ rts/l and rte/l register lists.
+
+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.
+ (print_insn_i860): Grab 4 bits of the control register field
+ instead of 3.
+
2003-05-18 Jason Eckhardt <jle@rice.edu>
* i860-dis.c (print_insn_i860): Instruction shrd has a dual bit,
@@ -5,9 +123,9 @@
2003-05-17 Andreas Jaeger <aj@suse.de>
- * Makefile.am (libopcodes_la_LIBADD): Add libbfd.la.
- (libopcodes_la_DEPENDENCIES): Add libbfd.la.
- * Makefile.in: Regenerated.
+ * Makefile.am (libopcodes_la_LIBADD): Add libbfd.la.
+ (libopcodes_la_DEPENDENCIES): Add libbfd.la.
+ * Makefile.in: Regenerated.
2003-05-16 Nick Clifton <nickc@redhat.com>
@@ -71,7 +189,7 @@
2003-03-25 Stan Cox <scox@redhat.com>
Nick Clifton <nickc@redhat.com>
-
+
Contribute support for Intel's iWMMXt chip - an ARM variant:
* arm-dis.c (regnames): Add iWMMXt register names.
@@ -179,24 +297,24 @@
2002-01-02 Ben Elliston <bje@redhat.com>
Jeff Johnston <jjohnstn@redhat.com>
- * iq2000-asm.c: New file.
- * iq2000-desc.c: Likewise.
- * iq2000-desc.h: Likewise.
- * iq2000-dis.c: Likewise.
- * iq2000-ibld.c: Likewise.
- * iq2000-opc.c: Likewise.
- * iq2000-opc.h: Likewise.
- * Makefile.am (HFILES): Add iq2000-desc.h, iq2000-opc.h.
- (CFILES): Add iq2000-asm.c, iq2000-desc.c, iq2000-dis.c,
- iq2000-ibld.c, iq2000-opc.c.
- (ALL_MACHINES): Add iq2000-asm.lo, iq2000-desc.lo, iq2000-dis.lo,
- iq2000-ibld.lo, iq2000-opc.lo.
- (CLEANFILES): Add stamp-iq2000.
- (IQ2000_DEPS): New macro.
- (stamp-iq2000): New target.
- * Makefile.in: Regenerate.
- * configure.in: Handle bfd_iq2000_arch.
- * configure: Regenerate.
+ * iq2000-asm.c: New file.
+ * iq2000-desc.c: Likewise.
+ * iq2000-desc.h: Likewise.
+ * iq2000-dis.c: Likewise.
+ * iq2000-ibld.c: Likewise.
+ * iq2000-opc.c: Likewise.
+ * iq2000-opc.h: Likewise.
+ * Makefile.am (HFILES): Add iq2000-desc.h, iq2000-opc.h.
+ (CFILES): Add iq2000-asm.c, iq2000-desc.c, iq2000-dis.c,
+ iq2000-ibld.c, iq2000-opc.c.
+ (ALL_MACHINES): Add iq2000-asm.lo, iq2000-desc.lo, iq2000-dis.lo,
+ iq2000-ibld.lo, iq2000-opc.lo.
+ (CLEANFILES): Add stamp-iq2000.
+ (IQ2000_DEPS): New macro.
+ (stamp-iq2000): New target.
+ * Makefile.in: Regenerate.
+ * configure.in: Handle bfd_iq2000_arch.
+ * configure: Regenerate.
2003-01-02 Chris Demetriou <cgd@broadcom.com>
@@ -392,7 +510,7 @@
(lookup_regindex): Recognize AR[FCR], AR[EFLAG], AR[CSD],
AR[SSD], AR[CFLG], AR[FSR], AR[FIR], and AR[FDR].
* ia64-asmtab.c: Regenerate.
-
+
2002-11-25 Aldy Hernandez <aldyh@redhat.com>
* ppc-opc.c: Remove evmwlssf, evmwlssfa, evmwlsmf, evmwlsmfa,
@@ -470,7 +588,7 @@
* xstormy16-desc.c: Regenerate.
* xstormy16-opc.c: Regenerate.
* xstormy16-opc.h: Regenerate.
-
+
2002-11-18 Klee Dienes <kdienes@apple.com>
* avr-dis.c: Include libiberty.h (for xmalloc).
@@ -552,18 +670,18 @@
2002-11-07 Klee Dienes <kdienes@apple.com>
- * Makefile.am (ia64-asmtab.c): Update to use the new '--srcdir'
- argument to ia64-gen.
+ * Makefile.am (ia64-asmtab.c): Update to use the new '--srcdir'
+ argument to ia64-gen.
Regenerate dependencies for ia64-len.lo.
* Makefile.in: Regenerate.
- * ia64-gen.c: Convert to use getopt(). Add the standard GNU
- options, as well as '--srcdir', which controls the directory in
- which ia64-gen looks for the sources it uses to generate the
- output table. Add a 'const' to the declaration of the final
- output table. Call xmalloc_set_program_name to set the program
- name.
+ * ia64-gen.c: Convert to use getopt(). Add the standard GNU
+ options, as well as '--srcdir', which controls the directory in
+ which ia64-gen looks for the sources it uses to generate the
+ output table. Add a 'const' to the declaration of the final
+ output table. Call xmalloc_set_program_name to set the program
+ name.
* ia64-asmtab.c: Regenerate.
-
+
2002-11-07 Nick Clifton <nickc@redhat.com>
* ia64-gen.c: Fix comment formatting and compile time warnings.
@@ -577,7 +695,7 @@
2002-11-06 Aldy Hernandez <aldyh@redhat.com>
- * opcodes/ppc-opc.c: Change RD to RS for evmerge*.
+ * opcodes/ppc-opc.c: Change RD to RS for evmerge*.
2002-10-07 Nathan Tallent <eraxxon@alumni.rice.edu>
@@ -592,10 +710,10 @@
at the end.
2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
- Ken Raeburn <raeburn@cygnus.com>
- Aldy Hernandez <aldyh@redhat.com>
- Eric Christopher <echristo@redhat.com>
- Richard Sandiford <rsandifo@redhat.com>
+ Ken Raeburn <raeburn@cygnus.com>
+ Aldy Hernandez <aldyh@redhat.com>
+ Eric Christopher <echristo@redhat.com>
+ Richard Sandiford <rsandifo@redhat.com>
* mips-dis.c (print_insn_arg): Handle '[', ']', 'e' and '%'.
(mips_isa_type): Handle bfd_mach_mips4120, bfd_mach_mips5400
diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
index 6ec05e42294..7097be0f8dd 100644
--- a/opcodes/Makefile.am
+++ b/opcodes/Makefile.am
@@ -649,10 +649,12 @@ iq2000-asm.lo: iq2000-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
iq2000-desc.lo: iq2000-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h $(INCDIR)/opcode/cgen.h \
- iq2000-opc.h opintl.h $(INCDIR)/libiberty.h
+ iq2000-opc.h opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h
iq2000-dis.lo: iq2000-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h \
- $(INCDIR)/opcode/cgen.h iq2000-opc.h opintl.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ iq2000-desc.h $(INCDIR)/opcode/cgen.h iq2000-opc.h \
+ opintl.h
iq2000-ibld.lo: iq2000-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h \
$(INCDIR)/opcode/cgen.h iq2000-opc.h opintl.h $(INCDIR)/safe-ctype.h
diff --git a/opcodes/Makefile.in b/opcodes/Makefile.in
index 8c03c172b92..2823902f224 100644
--- a/opcodes/Makefile.in
+++ b/opcodes/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
@@ -467,7 +467,7 @@ acinclude.m4 aclocal.m4 config.in configure configure.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-TAR = gtar
+TAR = tar
GZIP_ENV = --best
SOURCES = libopcodes.a.c $(libopcodes_la_SOURCES)
OBJECTS = libopcodes.a.$(OBJEXT) $(libopcodes_la_OBJECTS)
@@ -1145,10 +1145,12 @@ iq2000-asm.lo: iq2000-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
iq2000-desc.lo: iq2000-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h $(INCDIR)/opcode/cgen.h \
- iq2000-opc.h opintl.h $(INCDIR)/libiberty.h
+ iq2000-opc.h opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h
iq2000-dis.lo: iq2000-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h \
- $(INCDIR)/opcode/cgen.h iq2000-opc.h opintl.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ iq2000-desc.h $(INCDIR)/opcode/cgen.h iq2000-opc.h \
+ opintl.h
iq2000-ibld.lo: iq2000-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h \
$(INCDIR)/opcode/cgen.h iq2000-opc.h opintl.h $(INCDIR)/safe-ctype.h
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/cgen-asm.in b/opcodes/cgen-asm.in
index 525177c79d0..1ea076809b9 100644
--- a/opcodes/cgen-asm.in
+++ b/opcodes/cgen-asm.in
@@ -361,10 +361,10 @@ const CGEN_INSN *
if (! @arch@_cgen_insn_supported (cd, insn))
continue;
#endif
- /* If the RELAX attribute is set, this is an insn that shouldn't be
+ /* If the RELAXED attribute is set, this is an insn that shouldn't be
chosen immediately. Instead, it is used during assembler/linker
relaxation if possible. */
- if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAX) != 0)
+ if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAXED) != 0)
continue;
str = start;
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/fr30-asm.c b/opcodes/fr30-asm.c
index be9c36c947c..8e7c7b80975 100644
--- a/opcodes/fr30-asm.c
+++ b/opcodes/fr30-asm.c
@@ -657,10 +657,10 @@ fr30_cgen_assemble_insn (cd, str, fields, buf, errmsg)
if (! fr30_cgen_insn_supported (cd, insn))
continue;
#endif
- /* If the RELAX attribute is set, this is an insn that shouldn't be
+ /* If the RELAXED attribute is set, this is an insn that shouldn't be
chosen immediately. Instead, it is used during assembler/linker
relaxation if possible. */
- if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAX) != 0)
+ if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAXED) != 0)
continue;
str = start;
diff --git a/opcodes/fr30-desc.c b/opcodes/fr30-desc.c
index 01d896f28ea..3309d54cf03 100644
--- a/opcodes/fr30-desc.c
+++ b/opcodes/fr30-desc.c
@@ -105,7 +105,7 @@ const CGEN_ATTR_TABLE fr30_cgen_insn_attr_table[] =
{ "SKIP-CTI", &bool_attr[0], &bool_attr[0] },
{ "DELAY-SLOT", &bool_attr[0], &bool_attr[0] },
{ "RELAXABLE", &bool_attr[0], &bool_attr[0] },
- { "RELAX", &bool_attr[0], &bool_attr[0] },
+ { "RELAXED", &bool_attr[0], &bool_attr[0] },
{ "NO-DIS", &bool_attr[0], &bool_attr[0] },
{ "PBB", &bool_attr[0], &bool_attr[0] },
{ "NOT-IN-DELAY-SLOT", &bool_attr[0], &bool_attr[0] },
diff --git a/opcodes/fr30-desc.h b/opcodes/fr30-desc.h
index 6be96d933ab..35d0de70820 100644
--- a/opcodes/fr30-desc.h
+++ b/opcodes/fr30-desc.h
@@ -240,7 +240,7 @@ typedef enum cgen_operand_type {
/* Enum declaration for cgen_insn attrs. */
typedef enum cgen_insn_attr {
CGEN_INSN_ALIAS, CGEN_INSN_VIRTUAL, CGEN_INSN_UNCOND_CTI, CGEN_INSN_COND_CTI
- , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAX
+ , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAXED
, CGEN_INSN_NO_DIS, CGEN_INSN_PBB, CGEN_INSN_NOT_IN_DELAY_SLOT, CGEN_INSN_END_BOOLS
, CGEN_INSN_START_NBOOLS = 31, CGEN_INSN_MACH, CGEN_INSN_END_NBOOLS
} CGEN_INSN_ATTR;
diff --git a/opcodes/frv-asm.c b/opcodes/frv-asm.c
index 538ed2dc8f1..0e3d8ddf669 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;
@@ -929,10 +960,10 @@ frv_cgen_assemble_insn (cd, str, fields, buf, errmsg)
if (! frv_cgen_insn_supported (cd, insn))
continue;
#endif
- /* If the RELAX attribute is set, this is an insn that shouldn't be
+ /* If the RELAXED attribute is set, this is an insn that shouldn't be
chosen immediately. Instead, it is used during assembler/linker
relaxation if possible. */
- if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAX) != 0)
+ if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAXED) != 0)
continue;
str = start;
diff --git a/opcodes/frv-desc.c b/opcodes/frv-desc.c
index 5fac77a0dd7..97d49b3077b 100644
--- a/opcodes/frv-desc.c
+++ b/opcodes/frv-desc.c
@@ -188,7 +188,7 @@ const CGEN_ATTR_TABLE frv_cgen_insn_attr_table[] =
{ "SKIP-CTI", &bool_attr[0], &bool_attr[0] },
{ "DELAY-SLOT", &bool_attr[0], &bool_attr[0] },
{ "RELAXABLE", &bool_attr[0], &bool_attr[0] },
- { "RELAX", &bool_attr[0], &bool_attr[0] },
+ { "RELAXED", &bool_attr[0], &bool_attr[0] },
{ "NO-DIS", &bool_attr[0], &bool_attr[0] },
{ "PBB", &bool_attr[0], &bool_attr[0] },
{ "PRIVILEGED", &bool_attr[0], &bool_attr[0] },
@@ -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..a169e7a6092 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
@@ -695,7 +696,7 @@ typedef enum cgen_operand_type {
/* Enum declaration for cgen_insn attrs. */
typedef enum cgen_insn_attr {
CGEN_INSN_ALIAS, CGEN_INSN_VIRTUAL, CGEN_INSN_UNCOND_CTI, CGEN_INSN_COND_CTI
- , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAX
+ , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAXED
, CGEN_INSN_NO_DIS, CGEN_INSN_PBB, CGEN_INSN_PRIVILEGED, CGEN_INSN_NON_EXCEPTING
, CGEN_INSN_CONDITIONAL, CGEN_INSN_FR_ACCESS, CGEN_INSN_PRESERVE_OVF, CGEN_INSN_END_BOOLS
, CGEN_INSN_START_NBOOLS = 31, CGEN_INSN_MACH, CGEN_INSN_UNIT, CGEN_INSN_FR400_MAJOR
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..ea8d30b457c 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/i386-dis.c b/opcodes/i386-dis.c
index be78e83fef1..7c03205a191 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -93,6 +93,7 @@ static void OP_XS PARAMS ((int, int));
static void OP_3DNowSuffix PARAMS ((int, int));
static void OP_SIMD_Suffix PARAMS ((int, int));
static void SIMD_Fixup PARAMS ((int, int));
+static void PNI_Fixup PARAMS ((int, int));
static void BadOp PARAMS ((void));
struct dis_private {
@@ -417,6 +418,12 @@ fetch_data (info, addr)
#define PREGRP24 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 24, NULL, 0
#define PREGRP25 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 25, NULL, 0
#define PREGRP26 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 26, NULL, 0
+#define PREGRP27 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 27, NULL, 0
+#define PREGRP28 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 28, NULL, 0
+#define PREGRP29 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 29, NULL, 0
+#define PREGRP30 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 30, NULL, 0
+#define PREGRP31 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 31, NULL, 0
+#define PREGRP32 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 32, NULL, 0
#define X86_64_0 NULL, NULL, X86_64_SPECIAL, NULL, 0, NULL, 0
@@ -776,11 +783,11 @@ static const struct dis386 dis386_twobyte[] = {
/* 10 */
{ PREGRP8 },
{ PREGRP9 },
- { "movlpX", XM, EX, SIMD_Fixup, 'h' }, /* really only 2 operands */
+ { PREGRP30 },
{ "movlpX", EX, XM, SIMD_Fixup, 'h' },
{ "unpcklpX", XM, EX, XX },
{ "unpckhpX", XM, EX, XX },
- { "movhpX", XM, EX, SIMD_Fixup, 'l' },
+ { PREGRP31 },
{ "movhpX", EX, XM, SIMD_Fixup, 'l' },
/* 18 */
{ GRP14 },
@@ -895,8 +902,8 @@ static const struct dis386 dis386_twobyte[] = {
{ "(bad)", XX, XX, XX },
{ "(bad)", XX, XX, XX },
{ "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
+ { PREGRP28 },
+ { PREGRP29 },
{ PREGRP23 },
{ PREGRP20 },
/* 80 */
@@ -990,7 +997,7 @@ static const struct dis386 dis386_twobyte[] = {
{ "bswap", RMeSI, XX, XX },
{ "bswap", RMeDI, XX, XX },
/* d0 */
- { "(bad)", XX, XX, XX },
+ { PREGRP27 },
{ "psrlw", MX, EM, XX },
{ "psrld", MX, EM, XX },
{ "psrlq", MX, EM, XX },
@@ -1026,7 +1033,7 @@ static const struct dis386 dis386_twobyte[] = {
{ "pmaxsw", MX, EM, XX },
{ "pxor", MX, EM, XX },
/* f0 */
- { "(bad)", XX, XX, XX },
+ { PREGRP32 },
{ "psllw", MX, EM, XX },
{ "pslld", MX, EM, XX },
{ "psllq", MX, EM, XX },
@@ -1078,15 +1085,15 @@ static const unsigned char twobyte_has_modrm[256] = {
/* 40 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 4f */
/* 50 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 5f */
/* 60 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 6f */
- /* 70 */ 1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1, /* 7f */
+ /* 70 */ 1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1, /* 7f */
/* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
/* 90 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 9f */
/* a0 */ 0,0,0,1,1,1,0,0,0,0,0,1,1,1,1,1, /* af */
/* b0 */ 1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1, /* bf */
/* c0 */ 1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0, /* cf */
- /* d0 */ 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* df */
+ /* d0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* df */
/* e0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ef */
- /* f0 */ 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0 /* ff */
+ /* f0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0 /* ff */
/* ------------------------------- */
/* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
};
@@ -1095,21 +1102,21 @@ static const unsigned char twobyte_uses_SSE_prefix[256] = {
/* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
/* ------------------------------- */
/* 00 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0f */
- /* 10 */ 1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 1f */
+ /* 10 */ 1,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0, /* 1f */
/* 20 */ 0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,0, /* 2f */
/* 30 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 3f */
/* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 4f */
/* 50 */ 0,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1, /* 5f */
/* 60 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1, /* 6f */
- /* 70 */ 1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1, /* 7f */
+ /* 70 */ 1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1, /* 7f */
/* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
/* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 9f */
/* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* af */
/* b0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* bf */
/* c0 */ 0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0, /* cf */
- /* d0 */ 0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0, /* df */
+ /* d0 */ 1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0, /* df */
/* e0 */ 0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0, /* ef */
- /* f0 */ 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0 /* ff */
+ /* f0 */ 1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0 /* ff */
/* ------------------------------- */
/* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
};
@@ -1349,7 +1356,7 @@ static const struct dis386 grps[][8] = {
/* GRP7 */
{
{ "sgdtQ", M, XX, XX },
- { "sidtQ", M, XX, XX },
+ { "sidtQ", PNI_Fixup, 0, XX, XX },
{ "lgdtQ", M, XX, XX },
{ "lidtQ", M, XX, XX },
{ "smswQ", Ev, XX, XX },
@@ -1638,6 +1645,48 @@ static const struct dis386 prefix_user_table[][4] = {
{ "punpcklqdq", XM, EX, XX },
{ "(bad)", XM, EX, XX },
},
+ /* PREGRP27 */
+ {
+ { "(bad)", MX, EX, XX },
+ { "(bad)", XM, EX, XX },
+ { "addsubpd", XM, EX, XX },
+ { "addsubps", XM, EX, XX },
+ },
+ /* PREGRP28 */
+ {
+ { "(bad)", MX, EX, XX },
+ { "(bad)", XM, EX, XX },
+ { "haddpd", XM, EX, XX },
+ { "haddps", XM, EX, XX },
+ },
+ /* PREGRP29 */
+ {
+ { "(bad)", MX, EX, XX },
+ { "(bad)", XM, EX, XX },
+ { "hsubpd", XM, EX, XX },
+ { "hsubps", XM, EX, XX },
+ },
+ /* PREGRP30 */
+ {
+ { "movlpX", XM, EX, SIMD_Fixup, 'h' }, /* really only 2 operands */
+ { "movsldup", XM, EX, XX },
+ { "movlpd", XM, EX, XX },
+ { "movddup", XM, EX, XX },
+ },
+ /* PREGRP31 */
+ {
+ { "movhpX", XM, EX, SIMD_Fixup, 'l' },
+ { "movshdup", XM, EX, XX },
+ { "movhpd", XM, EX, XX },
+ { "(bad)", XM, EX, XX },
+ },
+ /* PREGRP32 */
+ {
+ { "(bad)", XM, EX, XX },
+ { "(bad)", XM, EX, XX },
+ { "(bad)", XM, EX, XX },
+ { "lddqu", XM, M, XX },
+ },
};
static const struct dis386 x86_64_table[][2] = {
@@ -2294,7 +2343,7 @@ static const char *float_mem[] = {
"fidivr{l||l|}",
/* db */
"fild{l||l|}",
- "(bad)",
+ "fisttp{l||l|}",
"fist{l||l|}",
"fistp{l||l|}",
"(bad)",
@@ -2312,7 +2361,7 @@ static const char *float_mem[] = {
"fdivr{l||l|}",
/* dd */
"fld{l||l|}",
- "(bad)",
+ "fisttpll",
"fst{l||l|}",
"fstp{l||l|}",
"frstor",
@@ -2330,7 +2379,7 @@ static const char *float_mem[] = {
"fidivr",
/* df */
"fild",
- "(bad)",
+ "fisttp",
"fist",
"fistp",
"fbld",
@@ -4138,6 +4187,33 @@ SIMD_Fixup (extrachar, sizeflag)
}
static void
+PNI_Fixup (extrachar, sizeflag)
+ int extrachar ATTRIBUTE_UNUSED;
+ int sizeflag ATTRIBUTE_UNUSED;
+{
+ if (mod == 3 && reg == 1)
+ {
+ char *p = obuf + strlen (obuf);
+
+ /* Override "sidt". */
+ if (rm)
+ {
+ /* mwait %eax,%ecx */
+ strcpy (p - 4, "mwait %eax,%ecx");
+ }
+ else
+ {
+ /* monitor %eax,%ecx,%edx" */
+ strcpy (p - 4, "monitor %eax,%ecx,%edx");
+ }
+
+ codep++;
+ }
+ else
+ OP_E (0, sizeflag);
+}
+
+static void
BadOp (void)
{
/* Throw away prefixes and 1st. opcode byte. */
diff --git a/opcodes/i860-dis.c b/opcodes/i860-dis.c
index 69a106d41ca..a3e87b0f552 100644
--- a/opcodes/i860-dis.c
+++ b/opcodes/i860-dis.c
@@ -1,5 +1,5 @@
/* Disassembler for the i860.
- Copyright 2000 Free Software Foundation, Inc.
+ Copyright 2000, 2003 Free Software Foundation, Inc.
Contributed by Jason Eckhardt <jle@cygnus.com>.
@@ -37,9 +37,11 @@ static const char *const frnames[] =
"f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",
"f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31"};
-/* Control/status register names (encoded as 0..5 in the instruction). */
+/* Control/status register names (encoded as 0..11 in the instruction).
+ Registers bear, ccr, p0, p1, p2 and p3 are XP only. */
static const char *const crnames[] =
- {"fir", "psr", "dirbase", "db", "fsr", "epsr", "", ""};
+ {"fir", "psr", "dirbase", "db", "fsr", "epsr", "bear", "ccr",
+ "p0", "p1", "p2", "p3", "--", "--", "--", "--" };
/* Prototypes. */
@@ -190,7 +192,7 @@ print_insn_i860 (memaddr, info)
/* Control register. */
case 'c':
(*info->fprintf_func) (info->stream, "%s%s", I860_REG_PREFIX,
- crnames[(insn >> 21) & 0x7]);
+ crnames[(insn >> 21) & 0xf]);
break;
/* 16-bit immediate (sign extend, except for bitwise ops). */
diff --git a/opcodes/ip2k-asm.c b/opcodes/ip2k-asm.c
index 6a1653b014b..524f256a537 100644
--- a/opcodes/ip2k-asm.c
+++ b/opcodes/ip2k-asm.c
@@ -908,10 +908,10 @@ ip2k_cgen_assemble_insn (cd, str, fields, buf, errmsg)
if (! ip2k_cgen_insn_supported (cd, insn))
continue;
#endif
- /* If the RELAX attribute is set, this is an insn that shouldn't be
+ /* If the RELAXED attribute is set, this is an insn that shouldn't be
chosen immediately. Instead, it is used during assembler/linker
relaxation if possible. */
- if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAX) != 0)
+ if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAXED) != 0)
continue;
str = start;
diff --git a/opcodes/ip2k-desc.c b/opcodes/ip2k-desc.c
index f8e493289fb..0ab2cc5fa44 100644
--- a/opcodes/ip2k-desc.c
+++ b/opcodes/ip2k-desc.c
@@ -105,7 +105,7 @@ const CGEN_ATTR_TABLE ip2k_cgen_insn_attr_table[] =
{ "SKIP-CTI", &bool_attr[0], &bool_attr[0] },
{ "DELAY-SLOT", &bool_attr[0], &bool_attr[0] },
{ "RELAXABLE", &bool_attr[0], &bool_attr[0] },
- { "RELAX", &bool_attr[0], &bool_attr[0] },
+ { "RELAXED", &bool_attr[0], &bool_attr[0] },
{ "NO-DIS", &bool_attr[0], &bool_attr[0] },
{ "PBB", &bool_attr[0], &bool_attr[0] },
{ "EXT-SKIP-INSN", &bool_attr[0], &bool_attr[0] },
diff --git a/opcodes/ip2k-desc.h b/opcodes/ip2k-desc.h
index 84db7fb1cb0..11220263b5c 100644
--- a/opcodes/ip2k-desc.h
+++ b/opcodes/ip2k-desc.h
@@ -225,7 +225,7 @@ typedef enum cgen_operand_type {
/* Enum declaration for cgen_insn attrs. */
typedef enum cgen_insn_attr {
CGEN_INSN_ALIAS, CGEN_INSN_VIRTUAL, CGEN_INSN_UNCOND_CTI, CGEN_INSN_COND_CTI
- , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAX
+ , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAXED
, CGEN_INSN_NO_DIS, CGEN_INSN_PBB, CGEN_INSN_EXT_SKIP_INSN, CGEN_INSN_SKIPA
, CGEN_INSN_END_BOOLS, CGEN_INSN_START_NBOOLS = 31, CGEN_INSN_MACH, CGEN_INSN_END_NBOOLS
} CGEN_INSN_ATTR;
diff --git a/opcodes/iq2000-asm.c b/opcodes/iq2000-asm.c
index 17b93eb2f40..7fb795eb155 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
}
@@ -797,10 +794,10 @@ iq2000_cgen_assemble_insn (cd, str, fields, buf, errmsg)
if (! iq2000_cgen_insn_supported (cd, insn))
continue;
#endif
- /* If the RELAX attribute is set, this is an insn that shouldn't be
+ /* If the RELAXED attribute is set, this is an insn that shouldn't be
chosen immediately. Instead, it is used during assembler/linker
relaxation if possible. */
- if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAX) != 0)
+ if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAXED) != 0)
continue;
str = start;
diff --git a/opcodes/iq2000-desc.c b/opcodes/iq2000-desc.c
index a30bf56b8bf..6c7f3b06b79 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. */
@@ -105,7 +105,7 @@ const CGEN_ATTR_TABLE iq2000_cgen_insn_attr_table[] =
{ "SKIP-CTI", &bool_attr[0], &bool_attr[0] },
{ "DELAY-SLOT", &bool_attr[0], &bool_attr[0] },
{ "RELAXABLE", &bool_attr[0], &bool_attr[0] },
- { "RELAX", &bool_attr[0], &bool_attr[0] },
+ { "RELAXED", &bool_attr[0], &bool_attr[0] },
{ "NO-DIS", &bool_attr[0], &bool_attr[0] },
{ "PBB", &bool_attr[0], &bool_attr[0] },
{ "YIELD-INSN", &bool_attr[0], &bool_attr[0] },
@@ -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..13b4f56a80b 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
@@ -273,7 +273,7 @@ typedef enum cgen_operand_type {
/* Enum declaration for cgen_insn attrs. */
typedef enum cgen_insn_attr {
CGEN_INSN_ALIAS, CGEN_INSN_VIRTUAL, CGEN_INSN_UNCOND_CTI, CGEN_INSN_COND_CTI
- , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAX
+ , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAXED
, CGEN_INSN_NO_DIS, CGEN_INSN_PBB, CGEN_INSN_YIELD_INSN, CGEN_INSN_LOAD_DELAY
, CGEN_INSN_EVEN_REG_NUM, CGEN_INSN_UNSUPPORTED, CGEN_INSN_USES_RD, CGEN_INSN_USES_RS
, CGEN_INSN_USES_RT, CGEN_INSN_USES_R31, CGEN_INSN_END_BOOLS, CGEN_INSN_START_NBOOLS = 31
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/m32r-asm.c b/opcodes/m32r-asm.c
index 4abe187b81f..2bd751af6db 100644
--- a/opcodes/m32r-asm.c
+++ b/opcodes/m32r-asm.c
@@ -659,10 +659,10 @@ m32r_cgen_assemble_insn (cd, str, fields, buf, errmsg)
if (! m32r_cgen_insn_supported (cd, insn))
continue;
#endif
- /* If the RELAX attribute is set, this is an insn that shouldn't be
+ /* If the RELAXED attribute is set, this is an insn that shouldn't be
chosen immediately. Instead, it is used during assembler/linker
relaxation if possible. */
- if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAX) != 0)
+ if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAXED) != 0)
continue;
str = start;
diff --git a/opcodes/m32r-desc.c b/opcodes/m32r-desc.c
index 30a071985bd..023ab62bb9e 100644
--- a/opcodes/m32r-desc.c
+++ b/opcodes/m32r-desc.c
@@ -118,7 +118,7 @@ const CGEN_ATTR_TABLE m32r_cgen_insn_attr_table[] =
{ "SKIP-CTI", &bool_attr[0], &bool_attr[0] },
{ "DELAY-SLOT", &bool_attr[0], &bool_attr[0] },
{ "RELAXABLE", &bool_attr[0], &bool_attr[0] },
- { "RELAX", &bool_attr[0], &bool_attr[0] },
+ { "RELAXED", &bool_attr[0], &bool_attr[0] },
{ "NO-DIS", &bool_attr[0], &bool_attr[0] },
{ "PBB", &bool_attr[0], &bool_attr[0] },
{ "FILL-SLOT", &bool_attr[0], &bool_attr[0] },
diff --git a/opcodes/m32r-desc.h b/opcodes/m32r-desc.h
index 85e22ee4dcd..8781772f266 100644
--- a/opcodes/m32r-desc.h
+++ b/opcodes/m32r-desc.h
@@ -204,7 +204,7 @@ typedef enum cgen_operand_type {
/* Enum declaration for cgen_insn attrs. */
typedef enum cgen_insn_attr {
CGEN_INSN_ALIAS, CGEN_INSN_VIRTUAL, CGEN_INSN_UNCOND_CTI, CGEN_INSN_COND_CTI
- , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAX
+ , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAXED
, CGEN_INSN_NO_DIS, CGEN_INSN_PBB, CGEN_INSN_FILL_SLOT, CGEN_INSN_SPECIAL
, CGEN_INSN_END_BOOLS, CGEN_INSN_START_NBOOLS = 31, CGEN_INSN_MACH, CGEN_INSN_PIPE
, CGEN_INSN_END_NBOOLS
diff --git a/opcodes/m32r-opc.c b/opcodes/m32r-opc.c
index b60c1bf36e0..8143b618520 100644
--- a/opcodes/m32r-opc.c
+++ b/opcodes/m32r-opc.c
@@ -1187,7 +1187,7 @@ static const CGEN_IBASE m32r_cgen_macro_insn_table[] =
/* bc $disp24 */
{
-1, "bc24r", "bc", 32,
- { 0|A(RELAX)|A(COND_CTI)|A(ALIAS), { (1<<MACH_BASE), PIPE_NONE } }
+ { 0|A(RELAXED)|A(COND_CTI)|A(ALIAS), { (1<<MACH_BASE), PIPE_NONE } }
},
/* bl $disp8 */
{
@@ -1197,7 +1197,7 @@ static const CGEN_IBASE m32r_cgen_macro_insn_table[] =
/* bl $disp24 */
{
-1, "bl24r", "bl", 32,
- { 0|A(RELAX)|A(UNCOND_CTI)|A(ALIAS), { (1<<MACH_BASE), PIPE_NONE } }
+ { 0|A(RELAXED)|A(UNCOND_CTI)|A(ALIAS), { (1<<MACH_BASE), PIPE_NONE } }
},
/* bcl $disp8 */
{
@@ -1207,7 +1207,7 @@ static const CGEN_IBASE m32r_cgen_macro_insn_table[] =
/* bcl $disp24 */
{
-1, "bcl24r", "bcl", 32,
- { 0|A(RELAX)|A(COND_CTI)|A(ALIAS), { (1<<MACH_M32RX), PIPE_NONE } }
+ { 0|A(RELAXED)|A(COND_CTI)|A(ALIAS), { (1<<MACH_M32RX), PIPE_NONE } }
},
/* bnc $disp8 */
{
@@ -1217,7 +1217,7 @@ static const CGEN_IBASE m32r_cgen_macro_insn_table[] =
/* bnc $disp24 */
{
-1, "bnc24r", "bnc", 32,
- { 0|A(RELAX)|A(COND_CTI)|A(ALIAS), { (1<<MACH_BASE), PIPE_NONE } }
+ { 0|A(RELAXED)|A(COND_CTI)|A(ALIAS), { (1<<MACH_BASE), PIPE_NONE } }
},
/* bra $disp8 */
{
@@ -1227,7 +1227,7 @@ static const CGEN_IBASE m32r_cgen_macro_insn_table[] =
/* bra $disp24 */
{
-1, "bra24r", "bra", 32,
- { 0|A(RELAX)|A(UNCOND_CTI)|A(ALIAS), { (1<<MACH_BASE), PIPE_NONE } }
+ { 0|A(RELAXED)|A(UNCOND_CTI)|A(ALIAS), { (1<<MACH_BASE), PIPE_NONE } }
},
/* bncl $disp8 */
{
@@ -1237,7 +1237,7 @@ static const CGEN_IBASE m32r_cgen_macro_insn_table[] =
/* bncl $disp24 */
{
-1, "bncl24r", "bncl", 32,
- { 0|A(RELAX)|A(COND_CTI)|A(ALIAS), { (1<<MACH_M32RX), PIPE_NONE } }
+ { 0|A(RELAXED)|A(COND_CTI)|A(ALIAS), { (1<<MACH_M32RX), PIPE_NONE } }
},
/* ld $dr,@($sr) */
{
diff --git a/opcodes/openrisc-asm.c b/opcodes/openrisc-asm.c
index d47659b8c8f..26b2625957f 100644
--- a/opcodes/openrisc-asm.c
+++ b/opcodes/openrisc-asm.c
@@ -578,10 +578,10 @@ openrisc_cgen_assemble_insn (cd, str, fields, buf, errmsg)
if (! openrisc_cgen_insn_supported (cd, insn))
continue;
#endif
- /* If the RELAX attribute is set, this is an insn that shouldn't be
+ /* If the RELAXED attribute is set, this is an insn that shouldn't be
chosen immediately. Instead, it is used during assembler/linker
relaxation if possible. */
- if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAX) != 0)
+ if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAXED) != 0)
continue;
str = start;
diff --git a/opcodes/openrisc-desc.c b/opcodes/openrisc-desc.c
index 6de9107f77b..989b1958648 100644
--- a/opcodes/openrisc-desc.c
+++ b/opcodes/openrisc-desc.c
@@ -112,7 +112,7 @@ const CGEN_ATTR_TABLE openrisc_cgen_insn_attr_table[] =
{ "SKIP-CTI", &bool_attr[0], &bool_attr[0] },
{ "DELAY-SLOT", &bool_attr[0], &bool_attr[0] },
{ "RELAXABLE", &bool_attr[0], &bool_attr[0] },
- { "RELAX", &bool_attr[0], &bool_attr[0] },
+ { "RELAXED", &bool_attr[0], &bool_attr[0] },
{ "NO-DIS", &bool_attr[0], &bool_attr[0] },
{ "PBB", &bool_attr[0], &bool_attr[0] },
{ "NOT-IN-DELAY-SLOT", &bool_attr[0], &bool_attr[0] },
diff --git a/opcodes/openrisc-desc.h b/opcodes/openrisc-desc.h
index d1edee2f51c..0c7df17b886 100644
--- a/opcodes/openrisc-desc.h
+++ b/opcodes/openrisc-desc.h
@@ -223,7 +223,7 @@ typedef enum cgen_operand_type {
/* Enum declaration for cgen_insn attrs. */
typedef enum cgen_insn_attr {
CGEN_INSN_ALIAS, CGEN_INSN_VIRTUAL, CGEN_INSN_UNCOND_CTI, CGEN_INSN_COND_CTI
- , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAX
+ , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAXED
, CGEN_INSN_NO_DIS, CGEN_INSN_PBB, CGEN_INSN_NOT_IN_DELAY_SLOT, CGEN_INSN_END_BOOLS
, CGEN_INSN_START_NBOOLS = 31, CGEN_INSN_MACH, CGEN_INSN_END_NBOOLS
} CGEN_INSN_ATTR;
diff --git a/opcodes/po/Make-in b/opcodes/po/Make-in
index 0552db1feef..6176dbf78c3 100644
--- a/opcodes/po/Make-in
+++ b/opcodes/po/Make-in
@@ -24,6 +24,8 @@ gnulocaledir = $(prefix)/share/locale
gettextsrcdir = $(prefix)/share/gettext/po
subdir = po
+DESTDIR =
+
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
MKINSTALLDIRS = @MKINSTALLDIRS@
@@ -111,9 +113,9 @@ install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
if test -r $(MKINSTALLDIRS); then \
- $(MKINSTALLDIRS) $(datadir); \
+ $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
else \
- $(top_srcdir)/mkinstalldirs $(datadir); \
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
fi
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
@@ -123,7 +125,7 @@ install-data-yes: all
*) destdir=$(localedir);; \
esac; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
- dir=$$destdir/$$lang/LC_MESSAGES; \
+ dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \
if test -r $(MKINSTALLDIRS); then \
$(MKINSTALLDIRS) $$dir; \
else \
@@ -153,12 +155,12 @@ install-data-yes: all
done
if test "$(PACKAGE)" = "gettext"; then \
if test -r $(MKINSTALLDIRS); then \
- $(MKINSTALLDIRS) $(gettextsrcdir); \
+ $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
else \
- $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \
fi; \
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
- $(gettextsrcdir)/Makefile.in.in; \
+ $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
else \
: ; \
fi
@@ -171,12 +173,12 @@ uninstall:
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
- rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
- rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
- rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
- rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
done
- rm -f $(gettextsrcdir)/po-Makefile.in.in
+ rm -f $(DESTDIR)$(gettextsrcdir)/po-Makefile.in.in
check: all
diff --git a/opcodes/po/POTFILES.in b/opcodes/po/POTFILES.in
index 9a14a1daeb9..df9060ef8a5 100644
--- a/opcodes/po/POTFILES.in
+++ b/opcodes/po/POTFILES.in
@@ -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
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/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
index 27eb23e22d8..a6e93131ebf 100644
--- a/opcodes/ppc-opc.c
+++ b/opcodes/ppc-opc.c
@@ -68,6 +68,10 @@ static unsigned long insert_boe
PARAMS ((unsigned long, long, int, const char **));
static long extract_boe
PARAMS ((unsigned long, int, int *));
+static unsigned long insert_dq
+ PARAMS ((unsigned long, long, int, const char **));
+static long extract_dq
+ PARAMS ((unsigned long, int, int *));
static unsigned long insert_ds
PARAMS ((unsigned long, long, int, const char **));
static long extract_ds
@@ -104,12 +108,18 @@ static unsigned long insert_ral
PARAMS ((unsigned long, long, int, const char **));
static unsigned long insert_ram
PARAMS ((unsigned long, long, int, const char **));
+static unsigned long insert_raq
+ PARAMS ((unsigned long, long, int, const char **));
static unsigned long insert_ras
PARAMS ((unsigned long, long, int, const char **));
static unsigned long insert_rbs
PARAMS ((unsigned long, long, int, const char **));
static long extract_rbs
PARAMS ((unsigned long, int, int *));
+static unsigned long insert_rsq
+ PARAMS ((unsigned long, long, int, const char **));
+static unsigned long insert_rtq
+ PARAMS ((unsigned long, long, int, const char **));
static unsigned long insert_sh6
PARAMS ((unsigned long, long, int, const char **));
static long extract_sh6
@@ -279,9 +289,15 @@ const struct powerpc_operand powerpc_operands[] =
#define DES DE + 1
{ 14, 0, insert_des, extract_des, PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED },
+ /* The DQ field in a DQ form instruction. This is like D, but the
+ lower four bits are forced to zero. */
+#define DQ DES + 1
+ { 16, 0, insert_dq, extract_dq,
+ PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED | PPC_OPERAND_DQ },
+
/* The DS field in a DS form instruction. This is like D, but the
lower two bits are forced to zero. */
-#define DS DES + 1
+#define DS DQ + 1
{ 16, 0, insert_ds, extract_ds,
PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED | PPC_OPERAND_DS },
@@ -389,15 +405,20 @@ const struct powerpc_operand powerpc_operands[] =
{ 16, 0, insert_nsi, extract_nsi,
PPC_OPERAND_NEGATIVE | PPC_OPERAND_SIGNED },
- /* The RA field in an D, DS, X, XO, M, or MDS form instruction. */
+ /* The RA field in an D, DS, DQ, X, XO, M, or MDS form instruction. */
#define RA NSI + 1
#define RA_MASK (0x1f << 16)
{ 5, 16, 0, 0, PPC_OPERAND_GPR },
+ /* The RA field in the DQ form lq instruction, which has special
+ value restrictions. */
+#define RAQ RA + 1
+ { 5, 16, insert_raq, 0, PPC_OPERAND_GPR },
+
/* The RA field in a D or X form instruction which is an updating
load, which means that the RA field may not be zero and may not
equal the RT field. */
-#define RAL RA + 1
+#define RAL RAQ + 1
{ 5, 16, insert_ral, 0, PPC_OPERAND_GPR },
/* The RA field in an lmw instruction, which has special value
@@ -430,8 +451,18 @@ const struct powerpc_operand powerpc_operands[] =
#define RT_MASK (0x1f << 21)
{ 5, 21, 0, 0, PPC_OPERAND_GPR },
+ /* The RS field of the DS form stq instruction, which has special
+ value restrictions. */
+#define RSQ RS + 1
+ { 5, 21, insert_rsq, 0, PPC_OPERAND_GPR },
+
+ /* The RT field of the DQ form lq instruction, which has special
+ value restrictions. */
+#define RTQ RSQ + 1
+ { 5, 21, insert_rtq, 0, PPC_OPERAND_GPR },
+
/* The SH field in an X or M form instruction. */
-#define SH RS + 1
+#define SH RTQ + 1
#define SH_MASK (0x1f << 11)
{ 5, 11, 0, 0, 0 },
@@ -870,6 +901,32 @@ extract_boe (insn, dialect, invalid)
return value & 0x1e;
}
+ /* The DQ field in a DQ form instruction. This is like D, but the
+ lower four bits are forced to zero. */
+
+/*ARGSUSED*/
+static unsigned long
+insert_dq (insn, value, dialect, errmsg)
+ unsigned long insn;
+ long value;
+ int dialect ATTRIBUTE_UNUSED;
+ const char ** errmsg ATTRIBUTE_UNUSED;
+{
+ if ((value & 0xf) != 0 && errmsg != NULL)
+ *errmsg = _("offset not a multiple of 16");
+ return insn | (value & 0xfff0);
+}
+
+/*ARGSUSED*/
+static long
+extract_dq (insn, dialect, invalid)
+ unsigned long insn;
+ int dialect ATTRIBUTE_UNUSED;
+ int *invalid ATTRIBUTE_UNUSED;
+{
+ return ((insn & 0xfff0) ^ 0x8000) - 0x8000;
+}
+
static unsigned long
insert_ev2 (insn, value, dialect, errmsg)
unsigned long insn;
@@ -1253,6 +1310,24 @@ insert_ram (insn, value, dialect, errmsg)
return insn | ((value & 0x1f) << 16);
}
+ /* The RA field in the DQ form lq instruction, which has special
+ value restrictions. */
+
+/*ARGSUSED*/
+static unsigned long
+insert_raq (insn, value, dialect, errmsg)
+ unsigned long insn;
+ long value;
+ int dialect ATTRIBUTE_UNUSED;
+ const char **errmsg;
+{
+ long rtvalue = (insn & RT_MASK) >> 21;
+
+ if (value == rtvalue && errmsg != NULL)
+ *errmsg = _("source and target register operands must be different");
+ return insn | ((value & 0x1f) << 16);
+}
+
/* The RA field in a D or X form instruction which is an updating
store or an updating floating point load, which means that the RA
field may not be zero. */
@@ -1298,6 +1373,38 @@ extract_rbs (insn, dialect, invalid)
return 0;
}
+ /* The RT field of the DQ form lq instruction, which has special
+ value restrictions. */
+
+/*ARGSUSED*/
+static unsigned long
+insert_rtq (insn, value, dialect, errmsg)
+ unsigned long insn;
+ long value;
+ int dialect ATTRIBUTE_UNUSED;
+ const char **errmsg;
+{
+ if ((value & 1) != 0 && errmsg != NULL)
+ *errmsg = _("target register operand must be even");
+ return insn | ((value & 0x1f) << 21);
+}
+
+ /* The RS field of the DS form stq instruction, which has special
+ value restrictions. */
+
+/*ARGSUSED*/
+static unsigned long
+insert_rsq (insn, value, dialect, errmsg)
+ unsigned long insn;
+ long value ATTRIBUTE_UNUSED;
+ int dialect ATTRIBUTE_UNUSED;
+ const char **errmsg;
+{
+ if ((value & 1) != 0 && errmsg != NULL)
+ *errmsg = _("source register operand must be even");
+ return insn | ((value & 0x1f) << 21);
+}
+
/* The SH field in an MD form instruction. This is split. */
/*ARGSUSED*/
@@ -1768,6 +1875,7 @@ extract_tbr (insn, dialect, invalid)
sorted by major opcode. */
const struct powerpc_opcode powerpc_opcodes[] = {
+{ "attn", X(0,256), X_MASK, POWER4, { 0 } },
{ "tdlgti", OPTO(2,TOLGT), OPTO_MASK, PPC64, { RA, SI } },
{ "tdllti", OPTO(2,TOLLT), OPTO_MASK, PPC64, { RA, SI } },
{ "tdeqi", OPTO(2,TOEQ), OPTO_MASK, PPC64, { RA, SI } },
@@ -4335,6 +4443,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "stfdu", OP(55), OP_MASK, COM, { FRS, D, RAS } },
+{ "lq", OP(56), OP_MASK, POWER4, { RTQ, DQ, RAQ } },
+
{ "lfq", OP(56), OP_MASK, POWER2, { FRT, D, RA } },
{ "lfqu", OP(57), OP_MASK, POWER2, { FRT, D, RA } },
@@ -4411,6 +4521,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "stdu", DSO(62,1), DS_MASK, PPC64, { RS, DS, RAS } },
+{ "stq", DSO(62,2), DS_MASK, POWER4, { RSQ, DS, RA } },
+
{ "fcmpu", X(63,0), X_MASK|(3<<21), COM, { BF, FRA, FRB } },
{ "frsp", XRC(63,12,0), XRA_MASK, COM, { FRT, FRB } },
diff --git a/opcodes/xstormy16-asm.c b/opcodes/xstormy16-asm.c
index 324c091893e..810938c4a93 100644
--- a/opcodes/xstormy16-asm.c
+++ b/opcodes/xstormy16-asm.c
@@ -618,10 +618,10 @@ xstormy16_cgen_assemble_insn (cd, str, fields, buf, errmsg)
if (! xstormy16_cgen_insn_supported (cd, insn))
continue;
#endif
- /* If the RELAX attribute is set, this is an insn that shouldn't be
+ /* If the RELAXED attribute is set, this is an insn that shouldn't be
chosen immediately. Instead, it is used during assembler/linker
relaxation if possible. */
- if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAX) != 0)
+ if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAXED) != 0)
continue;
str = start;
diff --git a/opcodes/xstormy16-desc.c b/opcodes/xstormy16-desc.c
index 9c9f30bc582..1c94fd7d853 100644
--- a/opcodes/xstormy16-desc.c
+++ b/opcodes/xstormy16-desc.c
@@ -104,7 +104,7 @@ const CGEN_ATTR_TABLE xstormy16_cgen_insn_attr_table[] =
{ "SKIP-CTI", &bool_attr[0], &bool_attr[0] },
{ "DELAY-SLOT", &bool_attr[0], &bool_attr[0] },
{ "RELAXABLE", &bool_attr[0], &bool_attr[0] },
- { "RELAX", &bool_attr[0], &bool_attr[0] },
+ { "RELAXED", &bool_attr[0], &bool_attr[0] },
{ "NO-DIS", &bool_attr[0], &bool_attr[0] },
{ "PBB", &bool_attr[0], &bool_attr[0] },
{ 0, 0, 0 }
diff --git a/opcodes/xstormy16-desc.h b/opcodes/xstormy16-desc.h
index a880321f759..e6135058083 100644
--- a/opcodes/xstormy16-desc.h
+++ b/opcodes/xstormy16-desc.h
@@ -261,7 +261,7 @@ typedef enum cgen_operand_type {
/* Enum declaration for cgen_insn attrs. */
typedef enum cgen_insn_attr {
CGEN_INSN_ALIAS, CGEN_INSN_VIRTUAL, CGEN_INSN_UNCOND_CTI, CGEN_INSN_COND_CTI
- , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAX
+ , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAXED
, CGEN_INSN_NO_DIS, CGEN_INSN_PBB, CGEN_INSN_END_BOOLS, CGEN_INSN_START_NBOOLS = 31
, CGEN_INSN_MACH, CGEN_INSN_END_NBOOLS
} CGEN_INSN_ATTR;
diff --git a/opcodes/z8k-dis.c b/opcodes/z8k-dis.c
index 69d1792312a..5d15ee83918 100644
--- a/opcodes/z8k-dis.c
+++ b/opcodes/z8k-dis.c
@@ -1,5 +1,5 @@
/* Disassemble z8000 code.
- Copyright 1992, 1993, 1998, 2000, 2001, 2002
+ Copyright 1992, 1993, 1998, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -40,7 +40,7 @@ typedef struct
bfd_vma insn_start;
jmp_buf bailout;
- long tabl_index;
+ int tabl_index;
char instr_asmsrc[80];
unsigned long arg_reg[0x0f];
unsigned long immediate;
@@ -169,7 +169,7 @@ print_insn_z8k (addr, info, is_segmented)
info->display_endian = BFD_ENDIAN_BIG;
instr_data.tabl_index = z8k_lookup_instr (instr_data.nibbles, info);
- if (instr_data.tabl_index > 0)
+ if (instr_data.tabl_index >= 0)
{
unpack_instr (&instr_data, is_segmented, info);
unparse_instr (&instr_data, is_segmented);
@@ -581,6 +581,10 @@ unparse_instr (instr_data, is_segmented)
sprintf (tmp_str, "@r%ld", instr_data->arg_reg[datum_value]);
strcat (out_str, tmp_str);
break;
+ case CLASS_IRO:
+ sprintf (tmp_str, "@r%ld", instr_data->arg_reg[datum_value]);
+ strcat (out_str, tmp_str);
+ break;
case CLASS_FLAGS:
sprintf (tmp_str, "0x%0lx", instr_data->flags);
strcat (out_str, tmp_str);
diff --git a/opcodes/z8k-opc.h b/opcodes/z8k-opc.h
index 022f5813205..c714bdea6c2 100644
--- a/opcodes/z8k-opc.h
+++ b/opcodes/z8k-opc.h
@@ -26,7 +26,6 @@
#define ARG_NIM4 0x0c
#define ARG_DISP8 0x0c
#define ARG_IMM4M1 0x0d
-#define CLASS_MASK 0x1fff0
#define CLASS_X 0x10
#define CLASS_BA 0x20
#define CLASS_DA 0x30
@@ -46,8 +45,9 @@
#define CLASS_BIT 0x500
#define CLASS_FLAGS 0x600
#define CLASS_IR 0x700
-#define CLASS_DISP8 0x800
-#define CLASS_BIT_1OR2 0x900
+#define CLASS_IRO 0x800
+#define CLASS_DISP8 0x900
+#define CLASS_BIT_1OR2 0xa00
#define CLASS_REG 0x7000
#define CLASS_REG_BYTE 0x2000
#define CLASS_REG_WORD 0x3000
@@ -55,6 +55,7 @@
#define CLASS_REG_LONG 0x5000
#define CLASS_REGN0 0x8000
#define CLASS_PR 0x10000
+#define CLASS_MASK 0x1fff0
#define OPC_adc 0
#define OPC_adcb 1
#define OPC_add 2
@@ -111,138 +112,154 @@
#define OPC_incb 53
#define OPC_ind 54
#define OPC_indb 55
-#define OPC_inib 56
-#define OPC_inibr 57
-#define OPC_iret 58
-#define OPC_jp 59
-#define OPC_jr 60
-#define OPC_ld 61
-#define OPC_lda 62
-#define OPC_ldar 63
-#define OPC_ldb 64
-#define OPC_ldctl 65
-#define OPC_ldir 66
-#define OPC_ldirb 67
-#define OPC_ldk 68
-#define OPC_ldl 69
-#define OPC_ldm 70
-#define OPC_ldps 71
-#define OPC_ldr 72
-#define OPC_ldrb 73
-#define OPC_ldrl 74
-#define OPC_mbit 75
-#define OPC_mreq 76
-#define OPC_mres 77
-#define OPC_mset 78
-#define OPC_mult 79
-#define OPC_multl 80
-#define OPC_neg 81
-#define OPC_negb 82
-#define OPC_nop 83
-#define OPC_or 84
-#define OPC_orb 85
-#define OPC_out 86
-#define OPC_outb 87
-#define OPC_outd 88
-#define OPC_outdb 89
-#define OPC_outib 90
-#define OPC_outibr 91
-#define OPC_pop 92
-#define OPC_popl 93
-#define OPC_push 94
-#define OPC_pushl 95
-#define OPC_res 96
-#define OPC_resb 97
-#define OPC_resflg 98
-#define OPC_ret 99
-#define OPC_rl 100
-#define OPC_rlb 101
-#define OPC_rlc 102
-#define OPC_rlcb 103
-#define OPC_rldb 104
-#define OPC_rr 105
-#define OPC_rrb 106
-#define OPC_rrc 107
-#define OPC_rrcb 108
-#define OPC_rrdb 109
-#define OPC_sbc 110
-#define OPC_sbcb 111
-#define OPC_sda 112
-#define OPC_sdab 113
-#define OPC_sdal 114
-#define OPC_sdl 115
-#define OPC_sdlb 116
-#define OPC_sdll 117
-#define OPC_set 118
-#define OPC_setb 119
-#define OPC_setflg 120
-#define OPC_sinb 121
-#define OPC_sind 122
-#define OPC_sindb 123
-#define OPC_sinib 124
-#define OPC_sinibr 125
-#define OPC_sla 126
-#define OPC_slab 127
-#define OPC_slal 128
-#define OPC_sll 129
-#define OPC_sllb 130
-#define OPC_slll 131
-#define OPC_sout 132
-#define OPC_soutb 133
-#define OPC_soutd 134
-#define OPC_soutdb 135
-#define OPC_soutib 136
-#define OPC_soutibr 137
-#define OPC_sra 138
-#define OPC_srab 139
-#define OPC_sral 140
-#define OPC_srl 141
-#define OPC_srlb 142
-#define OPC_srll 143
-#define OPC_sub 144
-#define OPC_subb 145
-#define OPC_subl 146
-#define OPC_tcc 147
-#define OPC_tccb 148
-#define OPC_test 149
-#define OPC_testb 150
-#define OPC_testl 151
-#define OPC_trdb 152
-#define OPC_trdrb 153
-#define OPC_trib 154
-#define OPC_trirb 155
-#define OPC_trtdrb 156
-#define OPC_trtib 157
-#define OPC_trtirb 158
-#define OPC_trtrb 159
-#define OPC_tset 160
-#define OPC_tsetb 161
-#define OPC_xor 162
-#define OPC_xorb 163
-#define OPC_ldd 164
-#define OPC_lddb 165
-#define OPC_lddr 166
-#define OPC_lddrb 167
-#define OPC_ldi 168
-#define OPC_ldib 169
-#define OPC_sc 170
-#define OPC_bpt 171
-#define OPC_ext0e 172
-#define OPC_ext0f 172
-#define OPC_ext8e 172
-#define OPC_ext8f 172
-#define OPC_rsvd36 172
-#define OPC_rsvd38 172
-#define OPC_rsvd78 172
-#define OPC_rsvd7e 172
-#define OPC_rsvd9d 172
-#define OPC_rsvd9f 172
-#define OPC_rsvdb9 172
-#define OPC_rsvdbf 172
-#define OPC_outi 173
-#define OPC_ldctlb 174
-#define OPC_sin 175
-#define OPC_trtdb 176
+#define OPC_indr 56
+#define OPC_indrb 57
+#define OPC_ini 58
+#define OPC_inib 59
+#define OPC_inir 60
+#define OPC_inirb 61
+#define OPC_iret 62
+#define OPC_jp 63
+#define OPC_jr 64
+#define OPC_ld 65
+#define OPC_lda 66
+#define OPC_ldar 67
+#define OPC_ldb 68
+#define OPC_ldctl 69
+#define OPC_ldir 70
+#define OPC_ldirb 71
+#define OPC_ldk 72
+#define OPC_ldl 73
+#define OPC_ldm 74
+#define OPC_ldps 75
+#define OPC_ldr 76
+#define OPC_ldrb 77
+#define OPC_ldrl 78
+#define OPC_mbit 79
+#define OPC_mreq 80
+#define OPC_mres 81
+#define OPC_mset 82
+#define OPC_mult 83
+#define OPC_multl 84
+#define OPC_neg 85
+#define OPC_negb 86
+#define OPC_nop 87
+#define OPC_or 88
+#define OPC_orb 89
+#define OPC_otdr 90
+#define OPC_otdrb 91
+#define OPC_otir 92
+#define OPC_otirb 93
+#define OPC_out 94
+#define OPC_outb 95
+#define OPC_outd 96
+#define OPC_outdb 97
+#define OPC_outi 98
+#define OPC_outib 99
+#define OPC_pop 100
+#define OPC_popl 101
+#define OPC_push 102
+#define OPC_pushl 103
+#define OPC_res 104
+#define OPC_resb 105
+#define OPC_resflg 106
+#define OPC_ret 107
+#define OPC_rl 108
+#define OPC_rlb 109
+#define OPC_rlc 110
+#define OPC_rlcb 111
+#define OPC_rldb 112
+#define OPC_rr 113
+#define OPC_rrb 114
+#define OPC_rrc 115
+#define OPC_rrcb 116
+#define OPC_rrdb 117
+#define OPC_sbc 118
+#define OPC_sbcb 119
+#define OPC_sda 120
+#define OPC_sdab 121
+#define OPC_sdal 122
+#define OPC_sdl 123
+#define OPC_sdlb 124
+#define OPC_sdll 125
+#define OPC_set 126
+#define OPC_setb 127
+#define OPC_setflg 128
+#define OPC_sin 129
+#define OPC_sinb 130
+#define OPC_sind 131
+#define OPC_sindb 132
+#define OPC_sindr 133
+#define OPC_sindrb 134
+#define OPC_sini 135
+#define OPC_sinib 136
+#define OPC_sinir 137
+#define OPC_sinirb 138
+#define OPC_sla 139
+#define OPC_slab 140
+#define OPC_slal 141
+#define OPC_sll 142
+#define OPC_sllb 143
+#define OPC_slll 144
+#define OPC_sotdr 145
+#define OPC_sotdrb 146
+#define OPC_sotir 147
+#define OPC_sotirb 148
+#define OPC_sout 149
+#define OPC_soutb 150
+#define OPC_soutd 151
+#define OPC_soutdb 152
+#define OPC_souti 153
+#define OPC_soutib 154
+#define OPC_sra 155
+#define OPC_srab 156
+#define OPC_sral 157
+#define OPC_srl 158
+#define OPC_srlb 159
+#define OPC_srll 160
+#define OPC_sub 161
+#define OPC_subb 162
+#define OPC_subl 163
+#define OPC_tcc 164
+#define OPC_tccb 165
+#define OPC_test 166
+#define OPC_testb 167
+#define OPC_testl 168
+#define OPC_trdb 169
+#define OPC_trdrb 170
+#define OPC_trib 171
+#define OPC_trirb 172
+#define OPC_trtdrb 173
+#define OPC_trtib 174
+#define OPC_trtirb 175
+#define OPC_trtrb 176
+#define OPC_tset 177
+#define OPC_tsetb 178
+#define OPC_xor 179
+#define OPC_xorb 180
+#define OPC_ldd 181
+#define OPC_lddb 182
+#define OPC_lddr 183
+#define OPC_lddrb 184
+#define OPC_ldi 185
+#define OPC_ldib 186
+#define OPC_sc 187
+#define OPC_bpt 188
+#define OPC_ext0e 188
+#define OPC_ext0f 188
+#define OPC_ext8e 188
+#define OPC_ext8f 188
+#define OPC_rsvd36 188
+#define OPC_rsvd38 188
+#define OPC_rsvd78 188
+#define OPC_rsvd7e 188
+#define OPC_rsvd9d 188
+#define OPC_rsvd9f 188
+#define OPC_rsvdb9 188
+#define OPC_rsvdbf 188
+#define OPC_ldctlb 189
+#define OPC_trtdb 190
+#define OPC_brk 191
typedef struct {
#ifdef NICENAMES
@@ -568,13 +585,21 @@ const opcode_entry_type z8k_table[] = {
"bpt",OPC_bpt,0,{0},
{CLASS_BIT+3,CLASS_BIT+6,CLASS_BIT+0,CLASS_BIT+0,0,0,0,0,0,},0,2,9},
+/* 0000 1111 0000 1100 *** brk */
+{
+#ifdef NICENAMES
+"brk",8,10,0x00,
+#endif
+"brk",OPC_brk,0,{0},
+ {CLASS_BIT+0,CLASS_BIT+0xf,CLASS_BIT+0,CLASS_BIT+0xc,0,0,0,0,0,},0,2,10},
+
/* 0001 1111 ddN0 0000 *** call @rd */
{
#ifdef NICENAMES
"call @rd",32,10,0x00,
#endif
"call",OPC_call,0,{CLASS_IR+(ARG_RD),},
- {CLASS_BIT+1,CLASS_BIT+0xf,CLASS_REGN0+(ARG_RD),CLASS_BIT+0,0,0,0,0,0,},1,2,10},
+ {CLASS_BIT+1,CLASS_BIT+0xf,CLASS_REGN0+(ARG_RD),CLASS_BIT+0,0,0,0,0,0,},1,2,11},
/* 0101 1111 0000 0000 address_dst *** call address_dst */
{
@@ -582,7 +607,7 @@ const opcode_entry_type z8k_table[] = {
"call address_dst",32,12,0x00,
#endif
"call",OPC_call,0,{CLASS_DA+(ARG_DST),},
- {CLASS_BIT+5,CLASS_BIT+0xf,CLASS_BIT+0,CLASS_BIT+0,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,10},
+ {CLASS_BIT+5,CLASS_BIT+0xf,CLASS_BIT+0,CLASS_BIT+0,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,11},
/* 0101 1111 ddN0 0000 address_dst *** call address_dst(rd) */
{
@@ -590,7 +615,7 @@ const opcode_entry_type z8k_table[] = {
"call address_dst(rd)",32,13,0x00,
#endif
"call",OPC_call,0,{CLASS_X+(ARG_RD),},
- {CLASS_BIT+5,CLASS_BIT+0xf,CLASS_REGN0+(ARG_RD),CLASS_BIT+0,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,10},
+ {CLASS_BIT+5,CLASS_BIT+0xf,CLASS_REGN0+(ARG_RD),CLASS_BIT+0,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,11},
/* 1101 disp12 *** calr disp12 */
{
@@ -598,7 +623,7 @@ const opcode_entry_type z8k_table[] = {
"calr disp12",16,10,0x00,
#endif
"calr",OPC_calr,0,{CLASS_DISP,},
- {CLASS_BIT+0xd,CLASS_DISP+(ARG_DISP12),0,0,0,0,0,0,0,},1,2,11},
+ {CLASS_BIT+0xd,CLASS_DISP+(ARG_DISP12),0,0,0,0,0,0,0,},1,2,12},
/* 0000 1101 ddN0 1000 *** clr @rd */
{
@@ -606,7 +631,7 @@ const opcode_entry_type z8k_table[] = {
"clr @rd",16,8,0x00,
#endif
"clr",OPC_clr,0,{CLASS_IR+(ARG_RD),},
- {CLASS_BIT+0,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,0,0,0,0,},1,2,12},
+ {CLASS_BIT+0,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,0,0,0,0,},1,2,13},
/* 0100 1101 0000 1000 address_dst *** clr address_dst */
{
@@ -614,7 +639,7 @@ const opcode_entry_type z8k_table[] = {
"clr address_dst",16,11,0x00,
#endif
"clr",OPC_clr,0,{CLASS_DA+(ARG_DST),},
- {CLASS_BIT+4,CLASS_BIT+0xd,CLASS_BIT+0,CLASS_BIT+8,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,12},
+ {CLASS_BIT+4,CLASS_BIT+0xd,CLASS_BIT+0,CLASS_BIT+8,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,13},
/* 0100 1101 ddN0 1000 address_dst *** clr address_dst(rd) */
{
@@ -622,7 +647,7 @@ const opcode_entry_type z8k_table[] = {
"clr address_dst(rd)",16,12,0x00,
#endif
"clr",OPC_clr,0,{CLASS_X+(ARG_RD),},
- {CLASS_BIT+4,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_BIT+8,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,12},
+ {CLASS_BIT+4,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_BIT+8,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,13},
/* 1000 1101 dddd 1000 *** clr rd */
{
@@ -630,7 +655,7 @@ const opcode_entry_type z8k_table[] = {
"clr rd",16,7,0x00,
#endif
"clr",OPC_clr,0,{CLASS_REG_WORD+(ARG_RD),},
- {CLASS_BIT+8,CLASS_BIT+0xd,CLASS_REG+(ARG_RD),CLASS_BIT+8,0,0,0,0,0,},1,2,12},
+ {CLASS_BIT+8,CLASS_BIT+0xd,CLASS_REG+(ARG_RD),CLASS_BIT+8,0,0,0,0,0,},1,2,13},
/* 0000 1100 ddN0 1000 *** clrb @rd */
{
@@ -638,7 +663,7 @@ const opcode_entry_type z8k_table[] = {
"clrb @rd",8,8,0x00,
#endif
"clrb",OPC_clrb,0,{CLASS_IR+(ARG_RD),},
- {CLASS_BIT+0,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,0,0,0,0,},1,2,13},
+ {CLASS_BIT+0,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,0,0,0,0,},1,2,14},
/* 0100 1100 0000 1000 address_dst *** clrb address_dst */
{
@@ -646,7 +671,7 @@ const opcode_entry_type z8k_table[] = {
"clrb address_dst",8,11,0x00,
#endif
"clrb",OPC_clrb,0,{CLASS_DA+(ARG_DST),},
- {CLASS_BIT+4,CLASS_BIT+0xc,CLASS_BIT+0,CLASS_BIT+8,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,13},
+ {CLASS_BIT+4,CLASS_BIT+0xc,CLASS_BIT+0,CLASS_BIT+8,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,14},
/* 0100 1100 ddN0 1000 address_dst *** clrb address_dst(rd) */
{
@@ -654,7 +679,7 @@ const opcode_entry_type z8k_table[] = {
"clrb address_dst(rd)",8,12,0x00,
#endif
"clrb",OPC_clrb,0,{CLASS_X+(ARG_RD),},
- {CLASS_BIT+4,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+8,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,13},
+ {CLASS_BIT+4,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+8,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,14},
/* 1000 1100 dddd 1000 *** clrb rbd */
{
@@ -662,7 +687,7 @@ const opcode_entry_type z8k_table[] = {
"clrb rbd",8,7,0x00,
#endif
"clrb",OPC_clrb,0,{CLASS_REG_BYTE+(ARG_RD),},
- {CLASS_BIT+8,CLASS_BIT+0xc,CLASS_REG+(ARG_RD),CLASS_BIT+8,0,0,0,0,0,},1,2,13},
+ {CLASS_BIT+8,CLASS_BIT+0xc,CLASS_REG+(ARG_RD),CLASS_BIT+8,0,0,0,0,0,},1,2,14},
/* 0000 1101 ddN0 0000 *** com @rd */
{
@@ -670,7 +695,7 @@ const opcode_entry_type z8k_table[] = {
"com @rd",16,12,0x18,
#endif
"com",OPC_com,0,{CLASS_IR+(ARG_RD),},
- {CLASS_BIT+0,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_BIT+0,0,0,0,0,0,},1,2,14},
+ {CLASS_BIT+0,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_BIT+0,0,0,0,0,0,},1,2,15},
/* 0100 1101 0000 0000 address_dst *** com address_dst */
{
@@ -678,7 +703,7 @@ const opcode_entry_type z8k_table[] = {
"com address_dst",16,15,0x18,
#endif
"com",OPC_com,0,{CLASS_DA+(ARG_DST),},
- {CLASS_BIT+4,CLASS_BIT+0xd,CLASS_BIT+0,CLASS_BIT+0,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,14},
+ {CLASS_BIT+4,CLASS_BIT+0xd,CLASS_BIT+0,CLASS_BIT+0,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,15},
/* 0100 1101 ddN0 0000 address_dst *** com address_dst(rd) */
{
@@ -686,7 +711,7 @@ const opcode_entry_type z8k_table[] = {
"com address_dst(rd)",16,16,0x18,
#endif
"com",OPC_com,0,{CLASS_X+(ARG_RD),},
- {CLASS_BIT+4,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_BIT+0,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,14},
+ {CLASS_BIT+4,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_BIT+0,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,15},
/* 1000 1101 dddd 0000 *** com rd */
{
@@ -694,7 +719,7 @@ const opcode_entry_type z8k_table[] = {
"com rd",16,7,0x18,
#endif
"com",OPC_com,0,{CLASS_REG_WORD+(ARG_RD),},
- {CLASS_BIT+8,CLASS_BIT+0xd,CLASS_REG+(ARG_RD),CLASS_BIT+0,0,0,0,0,0,},1,2,14},
+ {CLASS_BIT+8,CLASS_BIT+0xd,CLASS_REG+(ARG_RD),CLASS_BIT+0,0,0,0,0,0,},1,2,15},
/* 0000 1100 ddN0 0000 *** comb @rd */
{
@@ -702,7 +727,7 @@ const opcode_entry_type z8k_table[] = {
"comb @rd",8,12,0x1c,
#endif
"comb",OPC_comb,0,{CLASS_IR+(ARG_RD),},
- {CLASS_BIT+0,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+0,0,0,0,0,0,},1,2,15},
+ {CLASS_BIT+0,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+0,0,0,0,0,0,},1,2,16},
/* 0100 1100 0000 0000 address_dst *** comb address_dst */
{
@@ -710,7 +735,7 @@ const opcode_entry_type z8k_table[] = {
"comb address_dst",8,15,0x1c,
#endif
"comb",OPC_comb,0,{CLASS_DA+(ARG_DST),},
- {CLASS_BIT+4,CLASS_BIT+0xc,CLASS_BIT+0,CLASS_BIT+0,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,15},
+ {CLASS_BIT+4,CLASS_BIT+0xc,CLASS_BIT+0,CLASS_BIT+0,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,16},
/* 0100 1100 ddN0 0000 address_dst *** comb address_dst(rd) */
{
@@ -718,7 +743,7 @@ const opcode_entry_type z8k_table[] = {
"comb address_dst(rd)",8,16,0x1c,
#endif
"comb",OPC_comb,0,{CLASS_X+(ARG_RD),},
- {CLASS_BIT+4,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+0,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,15},
+ {CLASS_BIT+4,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+0,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,16},
/* 1000 1100 dddd 0000 *** comb rbd */
{
@@ -726,7 +751,7 @@ const opcode_entry_type z8k_table[] = {
"comb rbd",8,7,0x1c,
#endif
"comb",OPC_comb,0,{CLASS_REG_BYTE+(ARG_RD),},
- {CLASS_BIT+8,CLASS_BIT+0xc,CLASS_REG+(ARG_RD),CLASS_BIT+0,0,0,0,0,0,},1,2,15},
+ {CLASS_BIT+8,CLASS_BIT+0xc,CLASS_REG+(ARG_RD),CLASS_BIT+0,0,0,0,0,0,},1,2,16},
/* 1000 1101 flags 0101 *** comflg flags */
{
@@ -734,7 +759,7 @@ const opcode_entry_type z8k_table[] = {
"comflg flags",16,7,0x3c,
#endif
"comflg",OPC_comflg,0,{CLASS_FLAGS,},
- {CLASS_BIT+8,CLASS_BIT+0xd,CLASS_FLAGS,CLASS_BIT+5,0,0,0,0,0,},1,2,16},
+ {CLASS_BIT+8,CLASS_BIT+0xd,CLASS_FLAGS,CLASS_BIT+5,0,0,0,0,0,},1,2,17},
/* 0000 1101 ddN0 0001 imm16 *** cp @rd,imm16 */
{
@@ -742,7 +767,7 @@ const opcode_entry_type z8k_table[] = {
"cp @rd,imm16",16,11,0x3c,
#endif
"cp",OPC_cp,0,{CLASS_IR+(ARG_RD),CLASS_IMM+(ARG_IMM16),},
- {CLASS_BIT+0,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_BIT+1,CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,17},
+ {CLASS_BIT+0,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_BIT+1,CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,18},
/* 0100 1101 ddN0 0001 address_dst imm16 *** cp address_dst(rd),imm16 */
{
@@ -750,7 +775,7 @@ const opcode_entry_type z8k_table[] = {
"cp address_dst(rd),imm16",16,15,0x3c,
#endif
"cp",OPC_cp,0,{CLASS_X+(ARG_RD),CLASS_IMM+(ARG_IMM16),},
- {CLASS_BIT+4,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_BIT+1,CLASS_ADDRESS+(ARG_DST),CLASS_IMM+(ARG_IMM16),0,0,0,},2,6,17},
+ {CLASS_BIT+4,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_BIT+1,CLASS_ADDRESS+(ARG_DST),CLASS_IMM+(ARG_IMM16),0,0,0,},2,6,18},
/* 0100 1101 0000 0001 address_dst imm16 *** cp address_dst,imm16 */
{
@@ -758,7 +783,7 @@ const opcode_entry_type z8k_table[] = {
"cp address_dst,imm16",16,14,0x3c,
#endif
"cp",OPC_cp,0,{CLASS_DA+(ARG_DST),CLASS_IMM+(ARG_IMM16),},
- {CLASS_BIT+4,CLASS_BIT+0xd,CLASS_BIT+0,CLASS_BIT+1,CLASS_ADDRESS+(ARG_DST),CLASS_IMM+(ARG_IMM16),0,0,0,},2,6,17},
+ {CLASS_BIT+4,CLASS_BIT+0xd,CLASS_BIT+0,CLASS_BIT+1,CLASS_ADDRESS+(ARG_DST),CLASS_IMM+(ARG_IMM16),0,0,0,},2,6,18},
/* 0000 1011 ssN0 dddd *** cp rd,@rs */
{
@@ -766,7 +791,7 @@ const opcode_entry_type z8k_table[] = {
"cp rd,@rs",16,7,0x3c,
#endif
"cp",OPC_cp,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IR+(ARG_RS),},
- {CLASS_BIT+0,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,17},
+ {CLASS_BIT+0,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,18},
/* 0100 1011 0000 dddd address_src *** cp rd,address_src */
{
@@ -774,7 +799,7 @@ const opcode_entry_type z8k_table[] = {
"cp rd,address_src",16,9,0x3c,
#endif
"cp",OPC_cp,0,{CLASS_REG_WORD+(ARG_RD),CLASS_DA+(ARG_SRC),},
- {CLASS_BIT+4,CLASS_BIT+0xb,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,17},
+ {CLASS_BIT+4,CLASS_BIT+0xb,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,18},
/* 0100 1011 ssN0 dddd address_src *** cp rd,address_src(rs) */
{
@@ -782,7 +807,7 @@ const opcode_entry_type z8k_table[] = {
"cp rd,address_src(rs)",16,10,0x3c,
#endif
"cp",OPC_cp,0,{CLASS_REG_WORD+(ARG_RD),CLASS_X+(ARG_RS),},
- {CLASS_BIT+4,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,17},
+ {CLASS_BIT+4,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,18},
/* 0000 1011 0000 dddd imm16 *** cp rd,imm16 */
{
@@ -790,7 +815,7 @@ const opcode_entry_type z8k_table[] = {
"cp rd,imm16",16,7,0x3c,
#endif
"cp",OPC_cp,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IMM+(ARG_IMM16),},
- {CLASS_BIT+0,CLASS_BIT+0xb,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,17},
+ {CLASS_BIT+0,CLASS_BIT+0xb,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,18},
/* 1000 1011 ssss dddd *** cp rd,rs */
{
@@ -798,7 +823,7 @@ const opcode_entry_type z8k_table[] = {
"cp rd,rs",16,4,0x3c,
#endif
"cp",OPC_cp,0,{CLASS_REG_WORD+(ARG_RD),CLASS_REG_WORD+(ARG_RS),},
- {CLASS_BIT+8,CLASS_BIT+0xb,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,17},
+ {CLASS_BIT+8,CLASS_BIT+0xb,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,18},
/* 0000 1100 ddN0 0001 imm8 imm8 *** cpb @rd,imm8 */
{
@@ -806,7 +831,7 @@ const opcode_entry_type z8k_table[] = {
"cpb @rd,imm8",8,11,0x3c,
#endif
"cpb",OPC_cpb,0,{CLASS_IR+(ARG_RD),CLASS_IMM+(ARG_IMM8),},
- {CLASS_BIT+0,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+1,CLASS_IMM+(ARG_IMM8),CLASS_IMM+(ARG_IMM8),0,0,0,},2,4,18},
+ {CLASS_BIT+0,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+1,CLASS_IMM+(ARG_IMM8),CLASS_IMM+(ARG_IMM8),0,0,0,},2,4,19},
/* 0100 1100 ddN0 0001 address_dst imm8 imm8 *** cpb address_dst(rd),imm8 */
{
@@ -814,7 +839,7 @@ const opcode_entry_type z8k_table[] = {
"cpb address_dst(rd),imm8",8,15,0x3c,
#endif
"cpb",OPC_cpb,0,{CLASS_X+(ARG_RD),CLASS_IMM+(ARG_IMM8),},
- {CLASS_BIT+4,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+1,CLASS_ADDRESS+(ARG_DST),CLASS_IMM+(ARG_IMM8),CLASS_IMM+(ARG_IMM8),0,0,},2,6,18},
+ {CLASS_BIT+4,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+1,CLASS_ADDRESS+(ARG_DST),CLASS_IMM+(ARG_IMM8),CLASS_IMM+(ARG_IMM8),0,0,},2,6,19},
/* 0100 1100 0000 0001 address_dst imm8 imm8 *** cpb address_dst,imm8 */
{
@@ -822,7 +847,7 @@ const opcode_entry_type z8k_table[] = {
"cpb address_dst,imm8",8,14,0x3c,
#endif
"cpb",OPC_cpb,0,{CLASS_DA+(ARG_DST),CLASS_IMM+(ARG_IMM8),},
- {CLASS_BIT+4,CLASS_BIT+0xc,CLASS_BIT+0,CLASS_BIT+1,CLASS_ADDRESS+(ARG_DST),CLASS_IMM+(ARG_IMM8),CLASS_IMM+(ARG_IMM8),0,0,},2,6,18},
+ {CLASS_BIT+4,CLASS_BIT+0xc,CLASS_BIT+0,CLASS_BIT+1,CLASS_ADDRESS+(ARG_DST),CLASS_IMM+(ARG_IMM8),CLASS_IMM+(ARG_IMM8),0,0,},2,6,19},
/* 0000 1010 ssN0 dddd *** cpb rbd,@rs */
{
@@ -830,7 +855,7 @@ const opcode_entry_type z8k_table[] = {
"cpb rbd,@rs",8,7,0x3c,
#endif
"cpb",OPC_cpb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IR+(ARG_RS),},
- {CLASS_BIT+0,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,18},
+ {CLASS_BIT+0,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,19},
/* 0100 1010 0000 dddd address_src *** cpb rbd,address_src */
{
@@ -838,7 +863,7 @@ const opcode_entry_type z8k_table[] = {
"cpb rbd,address_src",8,9,0x3c,
#endif
"cpb",OPC_cpb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_DA+(ARG_SRC),},
- {CLASS_BIT+4,CLASS_BIT+0xa,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,18},
+ {CLASS_BIT+4,CLASS_BIT+0xa,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,19},
/* 0100 1010 ssN0 dddd address_src *** cpb rbd,address_src(rs) */
{
@@ -846,7 +871,7 @@ const opcode_entry_type z8k_table[] = {
"cpb rbd,address_src(rs)",8,10,0x3c,
#endif
"cpb",OPC_cpb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_X+(ARG_RS),},
- {CLASS_BIT+4,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,18},
+ {CLASS_BIT+4,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,19},
/* 0000 1010 0000 dddd imm8 imm8 *** cpb rbd,imm8 */
{
@@ -854,7 +879,7 @@ const opcode_entry_type z8k_table[] = {
"cpb rbd,imm8",8,7,0x3c,
#endif
"cpb",OPC_cpb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IMM+(ARG_IMM8),},
- {CLASS_BIT+0,CLASS_BIT+0xa,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM8),CLASS_IMM+(ARG_IMM8),0,0,0,},2,4,18},
+ {CLASS_BIT+0,CLASS_BIT+0xa,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM8),CLASS_IMM+(ARG_IMM8),0,0,0,},2,4,19},
/* 1000 1010 ssss dddd *** cpb rbd,rbs */
{
@@ -862,7 +887,7 @@ const opcode_entry_type z8k_table[] = {
"cpb rbd,rbs",8,4,0x3c,
#endif
"cpb",OPC_cpb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_REG_BYTE+(ARG_RS),},
- {CLASS_BIT+8,CLASS_BIT+0xa,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,18},
+ {CLASS_BIT+8,CLASS_BIT+0xa,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,19},
/* 1011 1011 ssN0 1000 0000 rrrr dddd cccc *** cpd rd,@rs,rr,cc */
{
@@ -870,7 +895,7 @@ const opcode_entry_type z8k_table[] = {
"cpd rd,@rs,rr,cc",16,11,0x3c,
#endif
"cpd",OPC_cpd,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RR),CLASS_CC,},
- {CLASS_BIT+0xb,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+8,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REG+(ARG_RD),CLASS_CC,0,},4,4,19},
+ {CLASS_BIT+0xb,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+8,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REG+(ARG_RD),CLASS_CC,0,},4,4,20},
/* 1011 1010 ssN0 1000 0000 rrrr dddd cccc *** cpdb rbd,@rs,rr,cc */
{
@@ -878,7 +903,7 @@ const opcode_entry_type z8k_table[] = {
"cpdb rbd,@rs,rr,cc",8,11,0x3c,
#endif
"cpdb",OPC_cpdb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RR),CLASS_CC,},
- {CLASS_BIT+0xb,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+8,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REG+(ARG_RD),CLASS_CC,0,},4,4,20},
+ {CLASS_BIT+0xb,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+8,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REG+(ARG_RD),CLASS_CC,0,},4,4,21},
/* 1011 1011 ssN0 1100 0000 rrrr dddd cccc *** cpdr rd,@rs,rr,cc */
{
@@ -886,7 +911,7 @@ const opcode_entry_type z8k_table[] = {
"cpdr rd,@rs,rr,cc",16,11,0x3c,
#endif
"cpdr",OPC_cpdr,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RR),CLASS_CC,},
- {CLASS_BIT+0xb,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+0xc,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REG+(ARG_RD),CLASS_CC,0,},4,4,21},
+ {CLASS_BIT+0xb,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+0xc,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REG+(ARG_RD),CLASS_CC,0,},4,4,22},
/* 1011 1010 ssN0 1100 0000 rrrr dddd cccc *** cpdrb rbd,@rs,rr,cc */
{
@@ -894,7 +919,7 @@ const opcode_entry_type z8k_table[] = {
"cpdrb rbd,@rs,rr,cc",8,11,0x3c,
#endif
"cpdrb",OPC_cpdrb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RR),CLASS_CC,},
- {CLASS_BIT+0xb,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+0xc,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REG+(ARG_RD),CLASS_CC,0,},4,4,22},
+ {CLASS_BIT+0xb,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+0xc,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REG+(ARG_RD),CLASS_CC,0,},4,4,23},
/* 1011 1011 ssN0 0000 0000 rrrr dddd cccc *** cpi rd,@rs,rr,cc */
{
@@ -902,7 +927,7 @@ const opcode_entry_type z8k_table[] = {
"cpi rd,@rs,rr,cc",16,11,0x3c,
#endif
"cpi",OPC_cpi,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RR),CLASS_CC,},
- {CLASS_BIT+0xb,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+0,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REG+(ARG_RD),CLASS_CC,0,},4,4,23},
+ {CLASS_BIT+0xb,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+0,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REG+(ARG_RD),CLASS_CC,0,},4,4,24},
/* 1011 1010 ssN0 0000 0000 rrrr dddd cccc *** cpib rbd,@rs,rr,cc */
{
@@ -910,7 +935,7 @@ const opcode_entry_type z8k_table[] = {
"cpib rbd,@rs,rr,cc",8,11,0x3c,
#endif
"cpib",OPC_cpib,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RR),CLASS_CC,},
- {CLASS_BIT+0xb,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+0,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REG+(ARG_RD),CLASS_CC,0,},4,4,24},
+ {CLASS_BIT+0xb,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+0,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REG+(ARG_RD),CLASS_CC,0,},4,4,25},
/* 1011 1011 ssN0 0100 0000 rrrr dddd cccc *** cpir rd,@rs,rr,cc */
{
@@ -918,7 +943,7 @@ const opcode_entry_type z8k_table[] = {
"cpir rd,@rs,rr,cc",16,11,0x3c,
#endif
"cpir",OPC_cpir,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RR),CLASS_CC,},
- {CLASS_BIT+0xb,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+4,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REG+(ARG_RD),CLASS_CC,0,},4,4,25},
+ {CLASS_BIT+0xb,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+4,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REG+(ARG_RD),CLASS_CC,0,},4,4,26},
/* 1011 1010 ssN0 0100 0000 rrrr dddd cccc *** cpirb rbd,@rs,rr,cc */
{
@@ -926,7 +951,7 @@ const opcode_entry_type z8k_table[] = {
"cpirb rbd,@rs,rr,cc",8,11,0x3c,
#endif
"cpirb",OPC_cpirb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RR),CLASS_CC,},
- {CLASS_BIT+0xb,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+4,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REG+(ARG_RD),CLASS_CC,0,},4,4,26},
+ {CLASS_BIT+0xb,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+4,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REG+(ARG_RD),CLASS_CC,0,},4,4,27},
/* 0001 0000 ssN0 dddd *** cpl rrd,@rs */
{
@@ -934,7 +959,7 @@ const opcode_entry_type z8k_table[] = {
"cpl rrd,@rs",32,14,0x3c,
#endif
"cpl",OPC_cpl,0,{CLASS_REG_LONG+(ARG_RD),CLASS_IR+(ARG_RS),},
- {CLASS_BIT+1,CLASS_BIT+0,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,27},
+ {CLASS_BIT+1,CLASS_BIT+0,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,28},
/* 0101 0000 0000 dddd address_src *** cpl rrd,address_src */
{
@@ -942,7 +967,7 @@ const opcode_entry_type z8k_table[] = {
"cpl rrd,address_src",32,15,0x3c,
#endif
"cpl",OPC_cpl,0,{CLASS_REG_LONG+(ARG_RD),CLASS_DA+(ARG_SRC),},
- {CLASS_BIT+5,CLASS_BIT+0,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,27},
+ {CLASS_BIT+5,CLASS_BIT+0,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,28},
/* 0101 0000 ssN0 dddd address_src *** cpl rrd,address_src(rs) */
{
@@ -950,7 +975,7 @@ const opcode_entry_type z8k_table[] = {
"cpl rrd,address_src(rs)",32,16,0x3c,
#endif
"cpl",OPC_cpl,0,{CLASS_REG_LONG+(ARG_RD),CLASS_X+(ARG_RS),},
- {CLASS_BIT+5,CLASS_BIT+0,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,27},
+ {CLASS_BIT+5,CLASS_BIT+0,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,28},
/* 0001 0000 0000 dddd imm32 *** cpl rrd,imm32 */
{
@@ -958,7 +983,7 @@ const opcode_entry_type z8k_table[] = {
"cpl rrd,imm32",32,14,0x3c,
#endif
"cpl",OPC_cpl,0,{CLASS_REG_LONG+(ARG_RD),CLASS_IMM+(ARG_IMM32),},
- {CLASS_BIT+1,CLASS_BIT+0,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM32),0,0,0,0,},2,6,27},
+ {CLASS_BIT+1,CLASS_BIT+0,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM32),0,0,0,0,},2,6,28},
/* 1001 0000 ssss dddd *** cpl rrd,rrs */
{
@@ -966,7 +991,7 @@ const opcode_entry_type z8k_table[] = {
"cpl rrd,rrs",32,8,0x3c,
#endif
"cpl",OPC_cpl,0,{CLASS_REG_LONG+(ARG_RD),CLASS_REG_LONG+(ARG_RS),},
- {CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,27},
+ {CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,28},
/* 1011 1011 ssN0 1010 0000 rrrr ddN0 cccc *** cpsd @rd,@rs,rr,cc */
{
@@ -974,7 +999,7 @@ const opcode_entry_type z8k_table[] = {
"cpsd @rd,@rs,rr,cc",16,11,0x3c,
#endif
"cpsd",OPC_cpsd,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RR),CLASS_CC,},
- {CLASS_BIT+0xb,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+0xa,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RD),CLASS_CC,0,},4,4,28},
+ {CLASS_BIT+0xb,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+0xa,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RD),CLASS_CC,0,},4,4,29},
/* 1011 1010 ssN0 1010 0000 rrrr ddN0 cccc *** cpsdb @rd,@rs,rr,cc */
{
@@ -982,7 +1007,7 @@ const opcode_entry_type z8k_table[] = {
"cpsdb @rd,@rs,rr,cc",8,11,0x3c,
#endif
"cpsdb",OPC_cpsdb,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RR),CLASS_CC,},
- {CLASS_BIT+0xb,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+0xa,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RD),CLASS_CC,0,},4,4,29},
+ {CLASS_BIT+0xb,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+0xa,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RD),CLASS_CC,0,},4,4,30},
/* 1011 1011 ssN0 1110 0000 rrrr ddN0 cccc *** cpsdr @rd,@rs,rr,cc */
{
@@ -990,7 +1015,7 @@ const opcode_entry_type z8k_table[] = {
"cpsdr @rd,@rs,rr,cc",16,11,0x3c,
#endif
"cpsdr",OPC_cpsdr,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RR),CLASS_CC,},
- {CLASS_BIT+0xb,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+0xe,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RD),CLASS_CC,0,},4,4,30},
+ {CLASS_BIT+0xb,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+0xe,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RD),CLASS_CC,0,},4,4,31},
/* 1011 1010 ssN0 1110 0000 rrrr ddN0 cccc *** cpsdrb @rd,@rs,rr,cc */
{
@@ -998,7 +1023,7 @@ const opcode_entry_type z8k_table[] = {
"cpsdrb @rd,@rs,rr,cc",8,11,0x3c,
#endif
"cpsdrb",OPC_cpsdrb,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RR),CLASS_CC,},
- {CLASS_BIT+0xb,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+0xe,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RD),CLASS_CC,0,},4,4,31},
+ {CLASS_BIT+0xb,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+0xe,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RD),CLASS_CC,0,},4,4,32},
/* 1011 1011 ssN0 0010 0000 rrrr ddN0 cccc *** cpsi @rd,@rs,rr,cc */
{
@@ -1006,7 +1031,7 @@ const opcode_entry_type z8k_table[] = {
"cpsi @rd,@rs,rr,cc",16,11,0x3c,
#endif
"cpsi",OPC_cpsi,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RR),CLASS_CC,},
- {CLASS_BIT+0xb,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+2,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RD),CLASS_CC,0,},4,4,32},
+ {CLASS_BIT+0xb,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+2,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RD),CLASS_CC,0,},4,4,33},
/* 1011 1010 ssN0 0010 0000 rrrr ddN0 cccc *** cpsib @rd,@rs,rr,cc */
{
@@ -1014,7 +1039,7 @@ const opcode_entry_type z8k_table[] = {
"cpsib @rd,@rs,rr,cc",8,11,0x3c,
#endif
"cpsib",OPC_cpsib,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RR),CLASS_CC,},
- {CLASS_BIT+0xb,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+2,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RD),CLASS_CC,0,},4,4,33},
+ {CLASS_BIT+0xb,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+2,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RD),CLASS_CC,0,},4,4,34},
/* 1011 1011 ssN0 0110 0000 rrrr ddN0 cccc *** cpsir @rd,@rs,rr,cc */
{
@@ -1022,7 +1047,7 @@ const opcode_entry_type z8k_table[] = {
"cpsir @rd,@rs,rr,cc",16,11,0x3c,
#endif
"cpsir",OPC_cpsir,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RR),CLASS_CC,},
- {CLASS_BIT+0xb,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+6,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RD),CLASS_CC,0,},4,4,34},
+ {CLASS_BIT+0xb,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+6,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RD),CLASS_CC,0,},4,4,35},
/* 1011 1010 ssN0 0110 0000 rrrr ddN0 cccc *** cpsirb @rd,@rs,rr,cc */
{
@@ -1030,7 +1055,7 @@ const opcode_entry_type z8k_table[] = {
"cpsirb @rd,@rs,rr,cc",8,11,0x3c,
#endif
"cpsirb",OPC_cpsirb,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RR),CLASS_CC,},
- {CLASS_BIT+0xb,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+6,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RD),CLASS_CC,0,},4,4,35},
+ {CLASS_BIT+0xb,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+6,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RD),CLASS_CC,0,},4,4,36},
/* 1011 0000 dddd 0000 *** dab rbd */
{
@@ -1038,7 +1063,7 @@ const opcode_entry_type z8k_table[] = {
"dab rbd",8,5,0x38,
#endif
"dab",OPC_dab,0,{CLASS_REG_BYTE+(ARG_RD),},
- {CLASS_BIT+0xb,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_BIT+0,0,0,0,0,0,},1,2,36},
+ {CLASS_BIT+0xb,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_BIT+0,0,0,0,0,0,},1,2,37},
/* 1111 dddd 0disp7 *** dbjnz rbd,disp7 */
{
@@ -1046,7 +1071,7 @@ const opcode_entry_type z8k_table[] = {
"dbjnz rbd,disp7",16,11,0x00,
#endif
"dbjnz",OPC_dbjnz,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_DISP,},
- {CLASS_BIT+0xf,CLASS_REG+(ARG_RD),CLASS_0DISP7,0,0,0,0,0,0,},2,2,37},
+ {CLASS_BIT+0xf,CLASS_REG+(ARG_RD),CLASS_0DISP7,0,0,0,0,0,0,},2,2,38},
/* 0010 1011 ddN0 imm4m1 *** dec @rd,imm4m1 */
{
@@ -1054,7 +1079,7 @@ const opcode_entry_type z8k_table[] = {
"dec @rd,imm4m1",16,11,0x1c,
#endif
"dec",OPC_dec,0,{CLASS_IR+(ARG_RD),CLASS_IMM +(ARG_IMM4M1),},
- {CLASS_BIT+2,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RD),CLASS_IMM+(ARG_IMM4M1),0,0,0,0,0,},2,2,38},
+ {CLASS_BIT+2,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RD),CLASS_IMM+(ARG_IMM4M1),0,0,0,0,0,},2,2,39},
/* 0110 1011 ddN0 imm4m1 address_dst *** dec address_dst(rd),imm4m1 */
{
@@ -1062,7 +1087,7 @@ const opcode_entry_type z8k_table[] = {
"dec address_dst(rd),imm4m1",16,14,0x1c,
#endif
"dec",OPC_dec,0,{CLASS_X+(ARG_RD),CLASS_IMM +(ARG_IMM4M1),},
- {CLASS_BIT+6,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RD),CLASS_IMM+(ARG_IMM4M1),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,38},
+ {CLASS_BIT+6,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RD),CLASS_IMM+(ARG_IMM4M1),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,39},
/* 0110 1011 0000 imm4m1 address_dst *** dec address_dst,imm4m1 */
{
@@ -1070,7 +1095,7 @@ const opcode_entry_type z8k_table[] = {
"dec address_dst,imm4m1",16,13,0x1c,
#endif
"dec",OPC_dec,0,{CLASS_DA+(ARG_DST),CLASS_IMM +(ARG_IMM4M1),},
- {CLASS_BIT+6,CLASS_BIT+0xb,CLASS_BIT+0,CLASS_IMM+(ARG_IMM4M1),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,38},
+ {CLASS_BIT+6,CLASS_BIT+0xb,CLASS_BIT+0,CLASS_IMM+(ARG_IMM4M1),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,39},
/* 1010 1011 dddd imm4m1 *** dec rd,imm4m1 */
{
@@ -1078,7 +1103,7 @@ const opcode_entry_type z8k_table[] = {
"dec rd,imm4m1",16,4,0x1c,
#endif
"dec",OPC_dec,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IMM +(ARG_IMM4M1),},
- {CLASS_BIT+0xa,CLASS_BIT+0xb,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM4M1),0,0,0,0,0,},2,2,38},
+ {CLASS_BIT+0xa,CLASS_BIT+0xb,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM4M1),0,0,0,0,0,},2,2,39},
/* 0010 1010 ddN0 imm4m1 *** decb @rd,imm4m1 */
{
@@ -1086,7 +1111,7 @@ const opcode_entry_type z8k_table[] = {
"decb @rd,imm4m1",8,11,0x1c,
#endif
"decb",OPC_decb,0,{CLASS_IR+(ARG_RD),CLASS_IMM +(ARG_IMM4M1),},
- {CLASS_BIT+2,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RD),CLASS_IMM+(ARG_IMM4M1),0,0,0,0,0,},2,2,39},
+ {CLASS_BIT+2,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RD),CLASS_IMM+(ARG_IMM4M1),0,0,0,0,0,},2,2,40},
/* 0110 1010 ddN0 imm4m1 address_dst *** decb address_dst(rd),imm4m1 */
{
@@ -1094,7 +1119,7 @@ const opcode_entry_type z8k_table[] = {
"decb address_dst(rd),imm4m1",8,14,0x1c,
#endif
"decb",OPC_decb,0,{CLASS_X+(ARG_RD),CLASS_IMM +(ARG_IMM4M1),},
- {CLASS_BIT+6,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RD),CLASS_IMM+(ARG_IMM4M1),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,39},
+ {CLASS_BIT+6,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RD),CLASS_IMM+(ARG_IMM4M1),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,40},
/* 0110 1010 0000 imm4m1 address_dst *** decb address_dst,imm4m1 */
{
@@ -1102,7 +1127,7 @@ const opcode_entry_type z8k_table[] = {
"decb address_dst,imm4m1",8,13,0x1c,
#endif
"decb",OPC_decb,0,{CLASS_DA+(ARG_DST),CLASS_IMM +(ARG_IMM4M1),},
- {CLASS_BIT+6,CLASS_BIT+0xa,CLASS_BIT+0,CLASS_IMM+(ARG_IMM4M1),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,39},
+ {CLASS_BIT+6,CLASS_BIT+0xa,CLASS_BIT+0,CLASS_IMM+(ARG_IMM4M1),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,40},
/* 1010 1010 dddd imm4m1 *** decb rbd,imm4m1 */
{
@@ -1110,7 +1135,7 @@ const opcode_entry_type z8k_table[] = {
"decb rbd,imm4m1",8,4,0x1c,
#endif
"decb",OPC_decb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IMM +(ARG_IMM4M1),},
- {CLASS_BIT+0xa,CLASS_BIT+0xa,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM4M1),0,0,0,0,0,},2,2,39},
+ {CLASS_BIT+0xa,CLASS_BIT+0xa,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM4M1),0,0,0,0,0,},2,2,40},
/* 0111 1100 0000 00ii *** di i2 */
{
@@ -1118,7 +1143,7 @@ const opcode_entry_type z8k_table[] = {
"di i2",16,7,0x00,
#endif
"di",OPC_di,0,{CLASS_IMM+(ARG_IMM2),},
- {CLASS_BIT+7,CLASS_BIT+0xc,CLASS_BIT+0,CLASS_00II,0,0,0,0,0,},1,2,40},
+ {CLASS_BIT+7,CLASS_BIT+0xc,CLASS_BIT+0,CLASS_00II,0,0,0,0,0,},1,2,41},
/* 0001 1011 ssN0 dddd *** div rrd,@rs */
{
@@ -1126,7 +1151,7 @@ const opcode_entry_type z8k_table[] = {
"div rrd,@rs",16,107,0x3c,
#endif
"div",OPC_div,0,{CLASS_REG_LONG+(ARG_RD),CLASS_IR+(ARG_RS),},
- {CLASS_BIT+1,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,41},
+ {CLASS_BIT+1,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,42},
/* 0101 1011 0000 dddd address_src *** div rrd,address_src */
{
@@ -1134,7 +1159,7 @@ const opcode_entry_type z8k_table[] = {
"div rrd,address_src",16,107,0x3c,
#endif
"div",OPC_div,0,{CLASS_REG_LONG+(ARG_RD),CLASS_DA+(ARG_SRC),},
- {CLASS_BIT+5,CLASS_BIT+0xb,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,41},
+ {CLASS_BIT+5,CLASS_BIT+0xb,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,42},
/* 0101 1011 ssN0 dddd address_src *** div rrd,address_src(rs) */
{
@@ -1142,7 +1167,7 @@ const opcode_entry_type z8k_table[] = {
"div rrd,address_src(rs)",16,107,0x3c,
#endif
"div",OPC_div,0,{CLASS_REG_LONG+(ARG_RD),CLASS_X+(ARG_RS),},
- {CLASS_BIT+5,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,41},
+ {CLASS_BIT+5,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,42},
/* 0001 1011 0000 dddd imm16 *** div rrd,imm16 */
{
@@ -1150,7 +1175,7 @@ const opcode_entry_type z8k_table[] = {
"div rrd,imm16",16,107,0x3c,
#endif
"div",OPC_div,0,{CLASS_REG_LONG+(ARG_RD),CLASS_IMM+(ARG_IMM16),},
- {CLASS_BIT+1,CLASS_BIT+0xb,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,41},
+ {CLASS_BIT+1,CLASS_BIT+0xb,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,42},
/* 1001 1011 ssss dddd *** div rrd,rs */
{
@@ -1158,7 +1183,7 @@ const opcode_entry_type z8k_table[] = {
"div rrd,rs",16,107,0x3c,
#endif
"div",OPC_div,0,{CLASS_REG_LONG+(ARG_RD),CLASS_REG_WORD+(ARG_RS),},
- {CLASS_BIT+9,CLASS_BIT+0xb,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,41},
+ {CLASS_BIT+9,CLASS_BIT+0xb,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,42},
/* 0001 1010 ssN0 dddd *** divl rqd,@rs */
{
@@ -1166,7 +1191,7 @@ const opcode_entry_type z8k_table[] = {
"divl rqd,@rs",32,744,0x3c,
#endif
"divl",OPC_divl,0,{CLASS_REG_QUAD+(ARG_RD),CLASS_IR+(ARG_RS),},
- {CLASS_BIT+1,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,42},
+ {CLASS_BIT+1,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,43},
/* 0101 1010 0000 dddd address_src *** divl rqd,address_src */
{
@@ -1174,7 +1199,7 @@ const opcode_entry_type z8k_table[] = {
"divl rqd,address_src",32,745,0x3c,
#endif
"divl",OPC_divl,0,{CLASS_REG_QUAD+(ARG_RD),CLASS_DA+(ARG_SRC),},
- {CLASS_BIT+5,CLASS_BIT+0xa,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,42},
+ {CLASS_BIT+5,CLASS_BIT+0xa,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,43},
/* 0101 1010 ssN0 dddd address_src *** divl rqd,address_src(rs) */
{
@@ -1182,7 +1207,7 @@ const opcode_entry_type z8k_table[] = {
"divl rqd,address_src(rs)",32,746,0x3c,
#endif
"divl",OPC_divl,0,{CLASS_REG_QUAD+(ARG_RD),CLASS_X+(ARG_RS),},
- {CLASS_BIT+5,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,42},
+ {CLASS_BIT+5,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,43},
/* 0001 1010 0000 dddd imm32 *** divl rqd,imm32 */
{
@@ -1190,7 +1215,7 @@ const opcode_entry_type z8k_table[] = {
"divl rqd,imm32",32,744,0x3c,
#endif
"divl",OPC_divl,0,{CLASS_REG_QUAD+(ARG_RD),CLASS_IMM+(ARG_IMM32),},
- {CLASS_BIT+1,CLASS_BIT+0xa,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM32),0,0,0,0,},2,6,42},
+ {CLASS_BIT+1,CLASS_BIT+0xa,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM32),0,0,0,0,},2,6,43},
/* 1001 1010 ssss dddd *** divl rqd,rrs */
{
@@ -1198,7 +1223,7 @@ const opcode_entry_type z8k_table[] = {
"divl rqd,rrs",32,744,0x3c,
#endif
"divl",OPC_divl,0,{CLASS_REG_QUAD+(ARG_RD),CLASS_REG_LONG+(ARG_RS),},
- {CLASS_BIT+9,CLASS_BIT+0xa,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,42},
+ {CLASS_BIT+9,CLASS_BIT+0xa,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,43},
/* 1111 dddd 1disp7 *** djnz rd,disp7 */
{
@@ -1206,7 +1231,7 @@ const opcode_entry_type z8k_table[] = {
"djnz rd,disp7",16,11,0x00,
#endif
"djnz",OPC_djnz,0,{CLASS_REG_WORD+(ARG_RD),CLASS_DISP,},
- {CLASS_BIT+0xf,CLASS_REG+(ARG_RD),CLASS_1DISP7,0,0,0,0,0,0,},2,2,43},
+ {CLASS_BIT+0xf,CLASS_REG+(ARG_RD),CLASS_1DISP7,0,0,0,0,0,0,},2,2,44},
/* 0111 1100 0000 01ii *** ei i2 */
{
@@ -1214,7 +1239,7 @@ const opcode_entry_type z8k_table[] = {
"ei i2",16,7,0x00,
#endif
"ei",OPC_ei,0,{CLASS_IMM+(ARG_IMM2),},
- {CLASS_BIT+7,CLASS_BIT+0xc,CLASS_BIT+0,CLASS_01II,0,0,0,0,0,},1,2,44},
+ {CLASS_BIT+7,CLASS_BIT+0xc,CLASS_BIT+0,CLASS_01II,0,0,0,0,0,},1,2,45},
/* 0010 1101 ssN0 dddd *** ex rd,@rs */
{
@@ -1222,7 +1247,7 @@ const opcode_entry_type z8k_table[] = {
"ex rd,@rs",16,12,0x00,
#endif
"ex",OPC_ex,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IR+(ARG_RS),},
- {CLASS_BIT+2,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,45},
+ {CLASS_BIT+2,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,46},
/* 0110 1101 0000 dddd address_src *** ex rd,address_src */
{
@@ -1230,7 +1255,7 @@ const opcode_entry_type z8k_table[] = {
"ex rd,address_src",16,15,0x00,
#endif
"ex",OPC_ex,0,{CLASS_REG_WORD+(ARG_RD),CLASS_DA+(ARG_SRC),},
- {CLASS_BIT+6,CLASS_BIT+0xd,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,45},
+ {CLASS_BIT+6,CLASS_BIT+0xd,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,46},
/* 0110 1101 ssN0 dddd address_src *** ex rd,address_src(rs) */
{
@@ -1238,7 +1263,7 @@ const opcode_entry_type z8k_table[] = {
"ex rd,address_src(rs)",16,16,0x00,
#endif
"ex",OPC_ex,0,{CLASS_REG_WORD+(ARG_RD),CLASS_X+(ARG_RS),},
- {CLASS_BIT+6,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,45},
+ {CLASS_BIT+6,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,46},
/* 1010 1101 ssss dddd *** ex rd,rs */
{
@@ -1246,7 +1271,7 @@ const opcode_entry_type z8k_table[] = {
"ex rd,rs",16,6,0x00,
#endif
"ex",OPC_ex,0,{CLASS_REG_WORD+(ARG_RD),CLASS_REG_WORD+(ARG_RS),},
- {CLASS_BIT+0xa,CLASS_BIT+0xd,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,45},
+ {CLASS_BIT+0xa,CLASS_BIT+0xd,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,46},
/* 0010 1100 ssN0 dddd *** exb rbd,@rs */
{
@@ -1254,7 +1279,7 @@ const opcode_entry_type z8k_table[] = {
"exb rbd,@rs",8,12,0x00,
#endif
"exb",OPC_exb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IR+(ARG_RS),},
- {CLASS_BIT+2,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,46},
+ {CLASS_BIT+2,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,47},
/* 0110 1100 0000 dddd address_src *** exb rbd,address_src */
{
@@ -1262,7 +1287,7 @@ const opcode_entry_type z8k_table[] = {
"exb rbd,address_src",8,15,0x00,
#endif
"exb",OPC_exb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_DA+(ARG_SRC),},
- {CLASS_BIT+6,CLASS_BIT+0xc,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,46},
+ {CLASS_BIT+6,CLASS_BIT+0xc,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,47},
/* 0110 1100 ssN0 dddd address_src *** exb rbd,address_src(rs) */
{
@@ -1270,7 +1295,7 @@ const opcode_entry_type z8k_table[] = {
"exb rbd,address_src(rs)",8,16,0x00,
#endif
"exb",OPC_exb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_X+(ARG_RS),},
- {CLASS_BIT+6,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,46},
+ {CLASS_BIT+6,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,47},
/* 1010 1100 ssss dddd *** exb rbd,rbs */
{
@@ -1278,7 +1303,7 @@ const opcode_entry_type z8k_table[] = {
"exb rbd,rbs",8,6,0x00,
#endif
"exb",OPC_exb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_REG_BYTE+(ARG_RS),},
- {CLASS_BIT+0xa,CLASS_BIT+0xc,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,46},
+ {CLASS_BIT+0xa,CLASS_BIT+0xc,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,47},
/* 0000 1110 imm8 *** ext0e imm8 */
{
@@ -1286,7 +1311,7 @@ const opcode_entry_type z8k_table[] = {
"ext0e imm8",8,10,0x00,
#endif
"ext0e",OPC_ext0e,0,{CLASS_IMM+(ARG_IMM8),},
- {CLASS_BIT+0,CLASS_BIT+0xe,CLASS_IMM+(ARG_IMM8),0,0,0,0,0,0,},1,2,47},
+ {CLASS_BIT+0,CLASS_BIT+0xe,CLASS_IMM+(ARG_IMM8),0,0,0,0,0,0,},1,2,48},
/* 0000 1111 imm8 *** ext0f imm8 */
{
@@ -1294,7 +1319,7 @@ const opcode_entry_type z8k_table[] = {
"ext0f imm8",8,10,0x00,
#endif
"ext0f",OPC_ext0f,0,{CLASS_IMM+(ARG_IMM8),},
- {CLASS_BIT+0,CLASS_BIT+0xf,CLASS_IMM+(ARG_IMM8),0,0,0,0,0,0,},1,2,48},
+ {CLASS_BIT+0,CLASS_BIT+0xf,CLASS_IMM+(ARG_IMM8),0,0,0,0,0,0,},1,2,49},
/* 1000 1110 imm8 *** ext8e imm8 */
{
@@ -1302,7 +1327,7 @@ const opcode_entry_type z8k_table[] = {
"ext8e imm8",8,10,0x00,
#endif
"ext8e",OPC_ext8e,0,{CLASS_IMM+(ARG_IMM8),},
- {CLASS_BIT+8,CLASS_BIT+0xe,CLASS_IMM+(ARG_IMM8),0,0,0,0,0,0,},1,2,49},
+ {CLASS_BIT+8,CLASS_BIT+0xe,CLASS_IMM+(ARG_IMM8),0,0,0,0,0,0,},1,2,50},
/* 1000 1111 imm8 *** ext8f imm8 */
{
@@ -1310,7 +1335,7 @@ const opcode_entry_type z8k_table[] = {
"ext8f imm8",8,10,0x00,
#endif
"ext8f",OPC_ext8f,0,{CLASS_IMM+(ARG_IMM8),},
- {CLASS_BIT+8,CLASS_BIT+0xf,CLASS_IMM+(ARG_IMM8),0,0,0,0,0,0,},1,2,50},
+ {CLASS_BIT+8,CLASS_BIT+0xf,CLASS_IMM+(ARG_IMM8),0,0,0,0,0,0,},1,2,51},
/* 1011 0001 dddd 1010 *** exts rrd */
{
@@ -1318,7 +1343,7 @@ const opcode_entry_type z8k_table[] = {
"exts rrd",16,11,0x00,
#endif
"exts",OPC_exts,0,{CLASS_REG_LONG+(ARG_RD),},
- {CLASS_BIT+0xb,CLASS_BIT+1,CLASS_REG+(ARG_RD),CLASS_BIT+0xa,0,0,0,0,0,},1,2,51},
+ {CLASS_BIT+0xb,CLASS_BIT+1,CLASS_REG+(ARG_RD),CLASS_BIT+0xa,0,0,0,0,0,},1,2,52},
/* 1011 0001 dddd 0000 *** extsb rd */
{
@@ -1326,7 +1351,7 @@ const opcode_entry_type z8k_table[] = {
"extsb rd",8,11,0x00,
#endif
"extsb",OPC_extsb,0,{CLASS_REG_WORD+(ARG_RD),},
- {CLASS_BIT+0xb,CLASS_BIT+1,CLASS_REG+(ARG_RD),CLASS_BIT+0,0,0,0,0,0,},1,2,52},
+ {CLASS_BIT+0xb,CLASS_BIT+1,CLASS_REG+(ARG_RD),CLASS_BIT+0,0,0,0,0,0,},1,2,53},
/* 1011 0001 dddd 0111 *** extsl rqd */
{
@@ -1334,7 +1359,7 @@ const opcode_entry_type z8k_table[] = {
"extsl rqd",32,11,0x00,
#endif
"extsl",OPC_extsl,0,{CLASS_REG_QUAD+(ARG_RD),},
- {CLASS_BIT+0xb,CLASS_BIT+1,CLASS_REG+(ARG_RD),CLASS_BIT+7,0,0,0,0,0,},1,2,53},
+ {CLASS_BIT+0xb,CLASS_BIT+1,CLASS_REG+(ARG_RD),CLASS_BIT+7,0,0,0,0,0,},1,2,54},
/* 0111 1010 0000 0000 *** halt */
{
@@ -1342,15 +1367,15 @@ const opcode_entry_type z8k_table[] = {
"halt",16,8,0x00,
#endif
"halt",OPC_halt,0,{0},
- {CLASS_BIT+7,CLASS_BIT+0xa,CLASS_BIT+0,CLASS_BIT+0,0,0,0,0,0,},0,2,54},
+ {CLASS_BIT+7,CLASS_BIT+0xa,CLASS_BIT+0,CLASS_BIT+0,0,0,0,0,0,},0,2,55},
-/* 0011 1101 ssN0 dddd *** in rd,@rs */
+/* 0011 1101 ssss dddd *** in rd,@ri */
{
#ifdef NICENAMES
-"in rd,@rs",16,10,0x00,
+"in rd,@ri",16,10,0x00,
#endif
-"in",OPC_in,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IR+(ARG_RS),},
- {CLASS_BIT+3,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,55},
+"in",OPC_in,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IRO+(ARG_RS),},
+ {CLASS_BIT+3,CLASS_BIT+0xd,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,56},
/* 0011 1011 dddd 0100 imm16 *** in rd,imm16 */
{
@@ -1358,15 +1383,15 @@ const opcode_entry_type z8k_table[] = {
"in rd,imm16",16,12,0x00,
#endif
"in",OPC_in,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IMM+(ARG_IMM16),},
- {CLASS_BIT+3,CLASS_BIT+0xb,CLASS_REG+(ARG_RD),CLASS_BIT+4,CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,55},
+ {CLASS_BIT+3,CLASS_BIT+0xb,CLASS_REG+(ARG_RD),CLASS_BIT+4,CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,56},
-/* 0011 1100 ssN0 dddd *** inb rbd,@rs */
+/* 0011 1100 ssss dddd *** inb rbd,@ri */
{
#ifdef NICENAMES
-"inb rbd,@rs",8,12,0x00,
+"inb rbd,@ri",8,12,0x00,
#endif
-"inb",OPC_inb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IR+(ARG_RS),},
- {CLASS_BIT+3,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,56},
+"inb",OPC_inb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IRO+(ARG_RS),},
+ {CLASS_BIT+3,CLASS_BIT+0xc,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,57},
/* 0011 1010 dddd 0100 imm16 *** inb rbd,imm16 */
{
@@ -1374,7 +1399,7 @@ const opcode_entry_type z8k_table[] = {
"inb rbd,imm16",8,10,0x00,
#endif
"inb",OPC_inb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IMM+(ARG_IMM16),},
- {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REG+(ARG_RD),CLASS_BIT+4,CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,56},
+ {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REG+(ARG_RD),CLASS_BIT+4,CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,57},
/* 0010 1001 ddN0 imm4m1 *** inc @rd,imm4m1 */
{
@@ -1382,7 +1407,7 @@ const opcode_entry_type z8k_table[] = {
"inc @rd,imm4m1",16,11,0x1c,
#endif
"inc",OPC_inc,0,{CLASS_IR+(ARG_RD),CLASS_IMM +(ARG_IMM4M1),},
- {CLASS_BIT+2,CLASS_BIT+9,CLASS_REGN0+(ARG_RD),CLASS_IMM+(ARG_IMM4M1),0,0,0,0,0,},2,2,57},
+ {CLASS_BIT+2,CLASS_BIT+9,CLASS_REGN0+(ARG_RD),CLASS_IMM+(ARG_IMM4M1),0,0,0,0,0,},2,2,58},
/* 0110 1001 ddN0 imm4m1 address_dst *** inc address_dst(rd),imm4m1 */
{
@@ -1390,7 +1415,7 @@ const opcode_entry_type z8k_table[] = {
"inc address_dst(rd),imm4m1",16,14,0x1c,
#endif
"inc",OPC_inc,0,{CLASS_X+(ARG_RD),CLASS_IMM +(ARG_IMM4M1),},
- {CLASS_BIT+6,CLASS_BIT+9,CLASS_REGN0+(ARG_RD),CLASS_IMM+(ARG_IMM4M1),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,57},
+ {CLASS_BIT+6,CLASS_BIT+9,CLASS_REGN0+(ARG_RD),CLASS_IMM+(ARG_IMM4M1),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,58},
/* 0110 1001 0000 imm4m1 address_dst *** inc address_dst,imm4m1 */
{
@@ -1398,7 +1423,7 @@ const opcode_entry_type z8k_table[] = {
"inc address_dst,imm4m1",16,13,0x1c,
#endif
"inc",OPC_inc,0,{CLASS_DA+(ARG_DST),CLASS_IMM +(ARG_IMM4M1),},
- {CLASS_BIT+6,CLASS_BIT+9,CLASS_BIT+0,CLASS_IMM+(ARG_IMM4M1),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,57},
+ {CLASS_BIT+6,CLASS_BIT+9,CLASS_BIT+0,CLASS_IMM+(ARG_IMM4M1),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,58},
/* 1010 1001 dddd imm4m1 *** inc rd,imm4m1 */
{
@@ -1406,7 +1431,7 @@ const opcode_entry_type z8k_table[] = {
"inc rd,imm4m1",16,4,0x1c,
#endif
"inc",OPC_inc,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IMM +(ARG_IMM4M1),},
- {CLASS_BIT+0xa,CLASS_BIT+9,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM4M1),0,0,0,0,0,},2,2,57},
+ {CLASS_BIT+0xa,CLASS_BIT+9,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM4M1),0,0,0,0,0,},2,2,58},
/* 0010 1000 ddN0 imm4m1 *** incb @rd,imm4m1 */
{
@@ -1414,7 +1439,7 @@ const opcode_entry_type z8k_table[] = {
"incb @rd,imm4m1",8,11,0x1c,
#endif
"incb",OPC_incb,0,{CLASS_IR+(ARG_RD),CLASS_IMM +(ARG_IMM4M1),},
- {CLASS_BIT+2,CLASS_BIT+8,CLASS_REGN0+(ARG_RD),CLASS_IMM+(ARG_IMM4M1),0,0,0,0,0,},2,2,58},
+ {CLASS_BIT+2,CLASS_BIT+8,CLASS_REGN0+(ARG_RD),CLASS_IMM+(ARG_IMM4M1),0,0,0,0,0,},2,2,59},
/* 0110 1000 ddN0 imm4m1 address_dst *** incb address_dst(rd),imm4m1 */
{
@@ -1422,7 +1447,7 @@ const opcode_entry_type z8k_table[] = {
"incb address_dst(rd),imm4m1",8,14,0x1c,
#endif
"incb",OPC_incb,0,{CLASS_X+(ARG_RD),CLASS_IMM +(ARG_IMM4M1),},
- {CLASS_BIT+6,CLASS_BIT+8,CLASS_REGN0+(ARG_RD),CLASS_IMM+(ARG_IMM4M1),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,58},
+ {CLASS_BIT+6,CLASS_BIT+8,CLASS_REGN0+(ARG_RD),CLASS_IMM+(ARG_IMM4M1),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,59},
/* 0110 1000 0000 imm4m1 address_dst *** incb address_dst,imm4m1 */
{
@@ -1430,7 +1455,7 @@ const opcode_entry_type z8k_table[] = {
"incb address_dst,imm4m1",8,13,0x1c,
#endif
"incb",OPC_incb,0,{CLASS_DA+(ARG_DST),CLASS_IMM +(ARG_IMM4M1),},
- {CLASS_BIT+6,CLASS_BIT+8,CLASS_BIT+0,CLASS_IMM+(ARG_IMM4M1),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,58},
+ {CLASS_BIT+6,CLASS_BIT+8,CLASS_BIT+0,CLASS_IMM+(ARG_IMM4M1),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,59},
/* 1010 1000 dddd imm4m1 *** incb rbd,imm4m1 */
{
@@ -1438,39 +1463,71 @@ const opcode_entry_type z8k_table[] = {
"incb rbd,imm4m1",8,4,0x1c,
#endif
"incb",OPC_incb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IMM +(ARG_IMM4M1),},
- {CLASS_BIT+0xa,CLASS_BIT+8,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM4M1),0,0,0,0,0,},2,2,58},
+ {CLASS_BIT+0xa,CLASS_BIT+8,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM4M1),0,0,0,0,0,},2,2,59},
+
+/* 0011 1011 ssss 1000 0000 aaaa ddN0 1000 *** ind @rd,@ri,ra */
+{
+#ifdef NICENAMES
+"ind @rd,@ri,ra",16,21,0x04,
+#endif
+"ind",OPC_ind,0,{CLASS_IR+(ARG_RD),CLASS_IRO+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
+ {CLASS_BIT+3,CLASS_BIT+0xb,CLASS_REG+(ARG_RS),CLASS_BIT+8,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,},3,4,60},
+
+/* 0011 1010 ssss 1000 0000 aaaa ddN0 1000 *** indb @rd,@ri,ra */
+{
+#ifdef NICENAMES
+"indb @rd,@ri,ra",8,21,0x04,
+#endif
+"indb",OPC_indb,0,{CLASS_IR+(ARG_RD),CLASS_IRO+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
+ {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REG+(ARG_RS),CLASS_BIT+8,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,},3,4,61},
+
+/* 0011 1011 ssss 1000 0000 aaaa ddN0 0000 *** indr @rd,@ri,ra */
+{
+#ifdef NICENAMES
+"indr @rd,@ri,ra",16,11,0x04,
+#endif
+"indr",OPC_indr,0,{CLASS_IR+(ARG_RD),CLASS_IRO+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
+ {CLASS_BIT+3,CLASS_BIT+0xb,CLASS_REG+(ARG_RS),CLASS_BIT+8,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RD),CLASS_BIT+0,0,},3,4,62},
+
+/* 0011 1010 ssss 1000 0000 aaaa ddN0 0000 *** indrb @rd,@ri,ra */
+{
+#ifdef NICENAMES
+"indrb @rd,@ri,ra",8,11,0x04,
+#endif
+"indrb",OPC_indrb,0,{CLASS_IR+(ARG_RD),CLASS_IRO+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
+ {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REG+(ARG_RS),CLASS_BIT+8,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RD),CLASS_BIT+0,0,},3,4,63},
-/* 0011 1011 ssN0 1000 0000 aaaa ddN0 1000 *** ind @rd,@rs,ra */
+/* 0011 1011 ssss 0000 0000 aaaa ddN0 1000 *** ini @rd,@ri,ra */
{
#ifdef NICENAMES
-"ind @rd,@rs,ra",16,21,0x04,
+"ini @rd,@ri,ra",16,21,0x04,
#endif
-"ind",OPC_ind,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
- {CLASS_BIT+3,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+8,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,},3,4,59},
+"ini",OPC_ini,0,{CLASS_IR+(ARG_RD),CLASS_IRO+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
+ {CLASS_BIT+3,CLASS_BIT+0xb,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,},3,4,64},
-/* 0011 1010 ssN0 1000 0000 aaaa ddN0 1000 *** indb @rd,@rs,rba */
+/* 0011 1010 ssss 0000 0000 aaaa ddN0 1000 *** inib @rd,@ri,ra */
{
#ifdef NICENAMES
-"indb @rd,@rs,rba",8,21,0x04,
+"inib @rd,@ri,ra",8,21,0x04,
#endif
-"indb",OPC_indb,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_BYTE+(ARG_RA),},
- {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+8,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,},3,4,60},
+"inib",OPC_inib,0,{CLASS_IR+(ARG_RD),CLASS_IRO+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
+ {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,},3,4,65},
-/* 0011 1010 ssN0 0000 0000 aaaa ddN0 1000 *** inib @rd,@rs,ra */
+/* 0011 1011 ssss 0000 0000 aaaa ddN0 0000 *** inir @rd,@ri,ra */
{
#ifdef NICENAMES
-"inib @rd,@rs,ra",8,21,0x04,
+"inir @rd,@ri,ra",16,11,0x04,
#endif
-"inib",OPC_inib,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
- {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+0,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,},3,4,61},
+"inir",OPC_inir,0,{CLASS_IR+(ARG_RD),CLASS_IRO+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
+ {CLASS_BIT+3,CLASS_BIT+0xb,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RD),CLASS_BIT+0,0,},3,4,66},
-/* 0011 1010 ssN0 0000 0000 aaaa ddN0 0000 *** inibr @rd,@rs,ra */
+/* 0011 1010 ssss 0000 0000 aaaa ddN0 0000 *** inirb @rd,@ri,ra */
{
#ifdef NICENAMES
-"inibr @rd,@rs,ra",16,21,0x04,
+"inirb @rd,@ri,ra",8,11,0x04,
#endif
-"inibr",OPC_inibr,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
- {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+0,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RD),CLASS_BIT+0,0,},3,4,62},
+"inirb",OPC_inirb,0,{CLASS_IR+(ARG_RD),CLASS_IRO+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
+ {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RD),CLASS_BIT+0,0,},3,4,67},
/* 0111 1011 0000 0000 *** iret */
{
@@ -1478,7 +1535,7 @@ const opcode_entry_type z8k_table[] = {
"iret",16,13,0x3f,
#endif
"iret",OPC_iret,0,{0},
- {CLASS_BIT+7,CLASS_BIT+0xb,CLASS_BIT+0,CLASS_BIT+0,0,0,0,0,0,},0,2,63},
+ {CLASS_BIT+7,CLASS_BIT+0xb,CLASS_BIT+0,CLASS_BIT+0,0,0,0,0,0,},0,2,68},
/* 0001 1110 ddN0 cccc *** jp cc,@rd */
{
@@ -1486,7 +1543,7 @@ const opcode_entry_type z8k_table[] = {
"jp cc,@rd",16,10,0x00,
#endif
"jp",OPC_jp,0,{CLASS_CC,CLASS_IR+(ARG_RD),},
- {CLASS_BIT+1,CLASS_BIT+0xe,CLASS_REGN0+(ARG_RD),CLASS_CC,0,0,0,0,0,},2,2,64},
+ {CLASS_BIT+1,CLASS_BIT+0xe,CLASS_REGN0+(ARG_RD),CLASS_CC,0,0,0,0,0,},2,2,69},
/* 0101 1110 0000 cccc address_dst *** jp cc,address_dst */
{
@@ -1494,7 +1551,7 @@ const opcode_entry_type z8k_table[] = {
"jp cc,address_dst",16,7,0x00,
#endif
"jp",OPC_jp,0,{CLASS_CC,CLASS_DA+(ARG_DST),},
- {CLASS_BIT+5,CLASS_BIT+0xe,CLASS_BIT+0,CLASS_CC,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,64},
+ {CLASS_BIT+5,CLASS_BIT+0xe,CLASS_BIT+0,CLASS_CC,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,69},
/* 0101 1110 ddN0 cccc address_dst *** jp cc,address_dst(rd) */
{
@@ -1502,7 +1559,7 @@ const opcode_entry_type z8k_table[] = {
"jp cc,address_dst(rd)",16,8,0x00,
#endif
"jp",OPC_jp,0,{CLASS_CC,CLASS_X+(ARG_RD),},
- {CLASS_BIT+5,CLASS_BIT+0xe,CLASS_REGN0+(ARG_RD),CLASS_CC,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,64},
+ {CLASS_BIT+5,CLASS_BIT+0xe,CLASS_REGN0+(ARG_RD),CLASS_CC,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,69},
/* 1110 cccc disp8 *** jr cc,disp8 */
{
@@ -1510,7 +1567,7 @@ const opcode_entry_type z8k_table[] = {
"jr cc,disp8",16,6,0x00,
#endif
"jr",OPC_jr,0,{CLASS_CC,CLASS_DISP,},
- {CLASS_BIT+0xe,CLASS_CC,CLASS_DISP8,0,0,0,0,0,0,},2,2,65},
+ {CLASS_BIT+0xe,CLASS_CC,CLASS_DISP8,0,0,0,0,0,0,},2,2,70},
/* 0000 1101 ddN0 0101 imm16 *** ld @rd,imm16 */
{
@@ -1518,7 +1575,7 @@ const opcode_entry_type z8k_table[] = {
"ld @rd,imm16",16,7,0x00,
#endif
"ld",OPC_ld,0,{CLASS_IR+(ARG_RD),CLASS_IMM+(ARG_IMM16),},
- {CLASS_BIT+0,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_BIT+5,CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,66},
+ {CLASS_BIT+0,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_BIT+5,CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,71},
/* 0010 1111 ddN0 ssss *** ld @rd,rs */
{
@@ -1526,7 +1583,7 @@ const opcode_entry_type z8k_table[] = {
"ld @rd,rs",16,8,0x00,
#endif
"ld",OPC_ld,0,{CLASS_IR+(ARG_RD),CLASS_REG_WORD+(ARG_RS),},
- {CLASS_BIT+2,CLASS_BIT+0xf,CLASS_REGN0+(ARG_RD),CLASS_REG+(ARG_RS),0,0,0,0,0,},2,2,66},
+ {CLASS_BIT+2,CLASS_BIT+0xf,CLASS_REGN0+(ARG_RD),CLASS_REG+(ARG_RS),0,0,0,0,0,},2,2,71},
/* 0100 1101 ddN0 0101 address_dst imm16 *** ld address_dst(rd),imm16 */
{
@@ -1534,7 +1591,7 @@ const opcode_entry_type z8k_table[] = {
"ld address_dst(rd),imm16",16,15,0x00,
#endif
"ld",OPC_ld,0,{CLASS_X+(ARG_RD),CLASS_IMM+(ARG_IMM16),},
- {CLASS_BIT+4,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_BIT+5,CLASS_ADDRESS+(ARG_DST),CLASS_IMM+(ARG_IMM16),0,0,0,},2,6,66},
+ {CLASS_BIT+4,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_BIT+5,CLASS_ADDRESS+(ARG_DST),CLASS_IMM+(ARG_IMM16),0,0,0,},2,6,71},
/* 0110 1111 ddN0 ssss address_dst *** ld address_dst(rd),rs */
{
@@ -1542,7 +1599,7 @@ const opcode_entry_type z8k_table[] = {
"ld address_dst(rd),rs",16,12,0x00,
#endif
"ld",OPC_ld,0,{CLASS_X+(ARG_RD),CLASS_REG_WORD+(ARG_RS),},
- {CLASS_BIT+6,CLASS_BIT+0xf,CLASS_REGN0+(ARG_RD),CLASS_REG+(ARG_RS),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,66},
+ {CLASS_BIT+6,CLASS_BIT+0xf,CLASS_REGN0+(ARG_RD),CLASS_REG+(ARG_RS),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,71},
/* 0100 1101 0000 0101 address_dst imm16 *** ld address_dst,imm16 */
{
@@ -1550,7 +1607,7 @@ const opcode_entry_type z8k_table[] = {
"ld address_dst,imm16",16,14,0x00,
#endif
"ld",OPC_ld,0,{CLASS_DA+(ARG_DST),CLASS_IMM+(ARG_IMM16),},
- {CLASS_BIT+4,CLASS_BIT+0xd,CLASS_BIT+0,CLASS_BIT+5,CLASS_ADDRESS+(ARG_DST),CLASS_IMM+(ARG_IMM16),0,0,0,},2,6,66},
+ {CLASS_BIT+4,CLASS_BIT+0xd,CLASS_BIT+0,CLASS_BIT+5,CLASS_ADDRESS+(ARG_DST),CLASS_IMM+(ARG_IMM16),0,0,0,},2,6,71},
/* 0110 1111 0000 ssss address_dst *** ld address_dst,rs */
{
@@ -1558,7 +1615,7 @@ const opcode_entry_type z8k_table[] = {
"ld address_dst,rs",16,11,0x00,
#endif
"ld",OPC_ld,0,{CLASS_DA+(ARG_DST),CLASS_REG_WORD+(ARG_RS),},
- {CLASS_BIT+6,CLASS_BIT+0xf,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,66},
+ {CLASS_BIT+6,CLASS_BIT+0xf,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,71},
/* 0011 0011 ddN0 ssss imm16 *** ld rd(imm16),rs */
{
@@ -1566,7 +1623,7 @@ const opcode_entry_type z8k_table[] = {
"ld rd(imm16),rs",16,14,0x00,
#endif
"ld",OPC_ld,0,{CLASS_BA+(ARG_RD),CLASS_REG_WORD+(ARG_RS),},
- {CLASS_BIT+3,CLASS_BIT+3,CLASS_REGN0+(ARG_RD),CLASS_REG+(ARG_RS),CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,66},
+ {CLASS_BIT+3,CLASS_BIT+3,CLASS_REGN0+(ARG_RD),CLASS_REG+(ARG_RS),CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,71},
/* 0111 0011 ddN0 ssss 0000 xxxx 0000 0000 *** ld rd(rx),rs */
{
@@ -1574,7 +1631,7 @@ const opcode_entry_type z8k_table[] = {
"ld rd(rx),rs",16,14,0x00,
#endif
"ld",OPC_ld,0,{CLASS_BX+(ARG_RD),CLASS_REG_WORD+(ARG_RS),},
- {CLASS_BIT+7,CLASS_BIT+3,CLASS_REGN0+(ARG_RD),CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_REG+(ARG_RX),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,66},
+ {CLASS_BIT+7,CLASS_BIT+3,CLASS_REGN0+(ARG_RD),CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_REG+(ARG_RX),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,71},
/* 0010 0001 ssN0 dddd *** ld rd,@rs */
{
@@ -1582,7 +1639,7 @@ const opcode_entry_type z8k_table[] = {
"ld rd,@rs",16,7,0x00,
#endif
"ld",OPC_ld,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IR+(ARG_RS),},
- {CLASS_BIT+2,CLASS_BIT+1,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,66},
+ {CLASS_BIT+2,CLASS_BIT+1,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,71},
/* 0110 0001 0000 dddd address_src *** ld rd,address_src */
{
@@ -1590,7 +1647,7 @@ const opcode_entry_type z8k_table[] = {
"ld rd,address_src",16,9,0x00,
#endif
"ld",OPC_ld,0,{CLASS_REG_WORD+(ARG_RD),CLASS_DA+(ARG_SRC),},
- {CLASS_BIT+6,CLASS_BIT+1,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,66},
+ {CLASS_BIT+6,CLASS_BIT+1,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,71},
/* 0110 0001 ssN0 dddd address_src *** ld rd,address_src(rs) */
{
@@ -1598,7 +1655,7 @@ const opcode_entry_type z8k_table[] = {
"ld rd,address_src(rs)",16,10,0x00,
#endif
"ld",OPC_ld,0,{CLASS_REG_WORD+(ARG_RD),CLASS_X+(ARG_RS),},
- {CLASS_BIT+6,CLASS_BIT+1,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,66},
+ {CLASS_BIT+6,CLASS_BIT+1,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,71},
/* 0010 0001 0000 dddd imm16 *** ld rd,imm16 */
{
@@ -1606,7 +1663,7 @@ const opcode_entry_type z8k_table[] = {
"ld rd,imm16",16,7,0x00,
#endif
"ld",OPC_ld,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IMM+(ARG_IMM16),},
- {CLASS_BIT+2,CLASS_BIT+1,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,66},
+ {CLASS_BIT+2,CLASS_BIT+1,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,71},
/* 1010 0001 ssss dddd *** ld rd,rs */
{
@@ -1614,7 +1671,7 @@ const opcode_entry_type z8k_table[] = {
"ld rd,rs",16,3,0x00,
#endif
"ld",OPC_ld,0,{CLASS_REG_WORD+(ARG_RD),CLASS_REG_WORD+(ARG_RS),},
- {CLASS_BIT+0xa,CLASS_BIT+1,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,66},
+ {CLASS_BIT+0xa,CLASS_BIT+1,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,71},
/* 0011 0001 ssN0 dddd imm16 *** ld rd,rs(imm16) */
{
@@ -1622,7 +1679,7 @@ const opcode_entry_type z8k_table[] = {
"ld rd,rs(imm16)",16,14,0x00,
#endif
"ld",OPC_ld,0,{CLASS_REG_WORD+(ARG_RD),CLASS_BA+(ARG_RS),},
- {CLASS_BIT+3,CLASS_BIT+1,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,66},
+ {CLASS_BIT+3,CLASS_BIT+1,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,71},
/* 0111 0001 ssN0 dddd 0000 xxxx 0000 0000 *** ld rd,rs(rx) */
{
@@ -1630,7 +1687,7 @@ const opcode_entry_type z8k_table[] = {
"ld rd,rs(rx)",16,14,0x00,
#endif
"ld",OPC_ld,0,{CLASS_REG_WORD+(ARG_RD),CLASS_BX+(ARG_RS),},
- {CLASS_BIT+7,CLASS_BIT+1,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_BIT+0,CLASS_REG+(ARG_RX),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,66},
+ {CLASS_BIT+7,CLASS_BIT+1,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_BIT+0,CLASS_REG+(ARG_RX),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,71},
/* 0111 0110 0000 dddd address_src *** lda prd,address_src */
{
@@ -1638,7 +1695,7 @@ const opcode_entry_type z8k_table[] = {
"lda prd,address_src",16,12,0x00,
#endif
"lda",OPC_lda,0,{CLASS_PR+(ARG_RD),CLASS_DA+(ARG_SRC),},
- {CLASS_BIT+7,CLASS_BIT+6,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,67},
+ {CLASS_BIT+7,CLASS_BIT+6,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,72},
/* 0111 0110 ssN0 dddd address_src *** lda prd,address_src(rs) */
{
@@ -1646,7 +1703,7 @@ const opcode_entry_type z8k_table[] = {
"lda prd,address_src(rs)",16,13,0x00,
#endif
"lda",OPC_lda,0,{CLASS_PR+(ARG_RD),CLASS_X+(ARG_RS),},
- {CLASS_BIT+7,CLASS_BIT+6,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,67},
+ {CLASS_BIT+7,CLASS_BIT+6,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,72},
/* 0011 0100 ssN0 dddd imm16 *** lda prd,rs(imm16) */
{
@@ -1654,7 +1711,7 @@ const opcode_entry_type z8k_table[] = {
"lda prd,rs(imm16)",16,15,0x00,
#endif
"lda",OPC_lda,0,{CLASS_PR+(ARG_RD),CLASS_BA+(ARG_RS),},
- {CLASS_BIT+3,CLASS_BIT+4,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,67},
+ {CLASS_BIT+3,CLASS_BIT+4,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,72},
/* 0111 0100 ssN0 dddd 0000 xxxx 0000 0000 *** lda prd,rs(rx) */
{
@@ -1662,7 +1719,7 @@ const opcode_entry_type z8k_table[] = {
"lda prd,rs(rx)",16,15,0x00,
#endif
"lda",OPC_lda,0,{CLASS_PR+(ARG_RD),CLASS_BX+(ARG_RS),},
- {CLASS_BIT+7,CLASS_BIT+4,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_BIT+0,CLASS_REG+(ARG_RX),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,67},
+ {CLASS_BIT+7,CLASS_BIT+4,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_BIT+0,CLASS_REG+(ARG_RX),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,72},
/* 0011 0100 0000 dddd disp16 *** ldar prd,disp16 */
{
@@ -1670,7 +1727,7 @@ const opcode_entry_type z8k_table[] = {
"ldar prd,disp16",16,15,0x00,
#endif
"ldar",OPC_ldar,0,{CLASS_PR+(ARG_RD),CLASS_DISP,},
- {CLASS_BIT+3,CLASS_BIT+4,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_DISP+(ARG_DISP16),0,0,0,0,},2,4,68},
+ {CLASS_BIT+3,CLASS_BIT+4,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_DISP+(ARG_DISP16),0,0,0,0,},2,4,73},
/* 0000 1100 ddN0 0101 imm8 imm8 *** ldb @rd,imm8 */
{
@@ -1678,7 +1735,7 @@ const opcode_entry_type z8k_table[] = {
"ldb @rd,imm8",8,7,0x00,
#endif
"ldb",OPC_ldb,0,{CLASS_IR+(ARG_RD),CLASS_IMM+(ARG_IMM8),},
- {CLASS_BIT+0,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+5,CLASS_IMM+(ARG_IMM8),CLASS_IMM+(ARG_IMM8),0,0,0,},2,4,69},
+ {CLASS_BIT+0,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+5,CLASS_IMM+(ARG_IMM8),CLASS_IMM+(ARG_IMM8),0,0,0,},2,4,74},
/* 0010 1110 ddN0 ssss *** ldb @rd,rbs */
{
@@ -1686,7 +1743,7 @@ const opcode_entry_type z8k_table[] = {
"ldb @rd,rbs",8,8,0x00,
#endif
"ldb",OPC_ldb,0,{CLASS_IR+(ARG_RD),CLASS_REG_BYTE+(ARG_RS),},
- {CLASS_BIT+2,CLASS_BIT+0xe,CLASS_REGN0+(ARG_RD),CLASS_REG+(ARG_RS),0,0,0,0,0,},2,2,69},
+ {CLASS_BIT+2,CLASS_BIT+0xe,CLASS_REGN0+(ARG_RD),CLASS_REG+(ARG_RS),0,0,0,0,0,},2,2,74},
/* 0100 1100 ddN0 0101 address_dst imm8 imm8 *** ldb address_dst(rd),imm8 */
{
@@ -1694,7 +1751,7 @@ const opcode_entry_type z8k_table[] = {
"ldb address_dst(rd),imm8",8,15,0x00,
#endif
"ldb",OPC_ldb,0,{CLASS_X+(ARG_RD),CLASS_IMM+(ARG_IMM8),},
- {CLASS_BIT+4,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+5,CLASS_ADDRESS+(ARG_DST),CLASS_IMM+(ARG_IMM8),CLASS_IMM+(ARG_IMM8),0,0,},2,6,69},
+ {CLASS_BIT+4,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+5,CLASS_ADDRESS+(ARG_DST),CLASS_IMM+(ARG_IMM8),CLASS_IMM+(ARG_IMM8),0,0,},2,6,74},
/* 0110 1110 ddN0 ssss address_dst *** ldb address_dst(rd),rbs */
{
@@ -1702,7 +1759,7 @@ const opcode_entry_type z8k_table[] = {
"ldb address_dst(rd),rbs",8,12,0x00,
#endif
"ldb",OPC_ldb,0,{CLASS_X+(ARG_RD),CLASS_REG_BYTE+(ARG_RS),},
- {CLASS_BIT+6,CLASS_BIT+0xe,CLASS_REGN0+(ARG_RD),CLASS_REG+(ARG_RS),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,69},
+ {CLASS_BIT+6,CLASS_BIT+0xe,CLASS_REGN0+(ARG_RD),CLASS_REG+(ARG_RS),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,74},
/* 0100 1100 0000 0101 address_dst imm8 imm8 *** ldb address_dst,imm8 */
{
@@ -1710,7 +1767,7 @@ const opcode_entry_type z8k_table[] = {
"ldb address_dst,imm8",8,14,0x00,
#endif
"ldb",OPC_ldb,0,{CLASS_DA+(ARG_DST),CLASS_IMM+(ARG_IMM8),},
- {CLASS_BIT+4,CLASS_BIT+0xc,CLASS_BIT+0,CLASS_BIT+5,CLASS_ADDRESS+(ARG_DST),CLASS_IMM+(ARG_IMM8),CLASS_IMM+(ARG_IMM8),0,0,},2,6,69},
+ {CLASS_BIT+4,CLASS_BIT+0xc,CLASS_BIT+0,CLASS_BIT+5,CLASS_ADDRESS+(ARG_DST),CLASS_IMM+(ARG_IMM8),CLASS_IMM+(ARG_IMM8),0,0,},2,6,74},
/* 0110 1110 0000 ssss address_dst *** ldb address_dst,rbs */
{
@@ -1718,7 +1775,7 @@ const opcode_entry_type z8k_table[] = {
"ldb address_dst,rbs",8,11,0x00,
#endif
"ldb",OPC_ldb,0,{CLASS_DA+(ARG_DST),CLASS_REG_BYTE+(ARG_RS),},
- {CLASS_BIT+6,CLASS_BIT+0xe,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,69},
+ {CLASS_BIT+6,CLASS_BIT+0xe,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,74},
/* 0010 0000 ssN0 dddd *** ldb rbd,@rs */
{
@@ -1726,7 +1783,7 @@ const opcode_entry_type z8k_table[] = {
"ldb rbd,@rs",8,7,0x00,
#endif
"ldb",OPC_ldb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IR+(ARG_RS),},
- {CLASS_BIT+2,CLASS_BIT+0,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,69},
+ {CLASS_BIT+2,CLASS_BIT+0,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,74},
/* 0110 0000 0000 dddd address_src *** ldb rbd,address_src */
{
@@ -1734,7 +1791,7 @@ const opcode_entry_type z8k_table[] = {
"ldb rbd,address_src",8,9,0x00,
#endif
"ldb",OPC_ldb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_DA+(ARG_SRC),},
- {CLASS_BIT+6,CLASS_BIT+0,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,69},
+ {CLASS_BIT+6,CLASS_BIT+0,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,74},
/* 0110 0000 ssN0 dddd address_src *** ldb rbd,address_src(rs) */
{
@@ -1742,7 +1799,15 @@ const opcode_entry_type z8k_table[] = {
"ldb rbd,address_src(rs)",8,10,0x00,
#endif
"ldb",OPC_ldb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_X+(ARG_RS),},
- {CLASS_BIT+6,CLASS_BIT+0,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,69},
+ {CLASS_BIT+6,CLASS_BIT+0,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,74},
+
+/* 0010 0000 0000 dddd imm8 imm8 *** ldb rbd,imm8 */
+{
+#ifdef NICENAMES
+"ldb rbd,imm8",8,7,0x00,
+#endif
+"ldb",OPC_ldb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IMM+(ARG_IMM8),},
+ {CLASS_BIT+2,CLASS_BIT+0,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM8),CLASS_IMM+(ARG_IMM8),0,0,0,},2,4,74},
/* 1100 dddd imm8 *** ldb rbd,imm8 */
{
@@ -1750,7 +1815,7 @@ const opcode_entry_type z8k_table[] = {
"ldb rbd,imm8",8,5,0x00,
#endif
"ldb",OPC_ldb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IMM+(ARG_IMM8),},
- {CLASS_BIT+0xc,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM8),0,0,0,0,0,0,},2,2,69},
+ {CLASS_BIT+0xc,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM8),0,0,0,0,0,0,},2,2,74},
/* 1010 0000 ssss dddd *** ldb rbd,rbs */
{
@@ -1758,7 +1823,7 @@ const opcode_entry_type z8k_table[] = {
"ldb rbd,rbs",8,3,0x00,
#endif
"ldb",OPC_ldb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_REG_BYTE+(ARG_RS),},
- {CLASS_BIT+0xa,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,69},
+ {CLASS_BIT+0xa,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,74},
/* 0011 0000 ssN0 dddd imm16 *** ldb rbd,rs(imm16) */
{
@@ -1766,7 +1831,7 @@ const opcode_entry_type z8k_table[] = {
"ldb rbd,rs(imm16)",8,14,0x00,
#endif
"ldb",OPC_ldb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_BA+(ARG_RS),},
- {CLASS_BIT+3,CLASS_BIT+0,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,69},
+ {CLASS_BIT+3,CLASS_BIT+0,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,74},
/* 0111 0000 ssN0 dddd 0000 xxxx 0000 0000 *** ldb rbd,rs(rx) */
{
@@ -1774,7 +1839,7 @@ const opcode_entry_type z8k_table[] = {
"ldb rbd,rs(rx)",8,14,0x00,
#endif
"ldb",OPC_ldb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_BX+(ARG_RS),},
- {CLASS_BIT+7,CLASS_BIT+0,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_BIT+0,CLASS_REG+(ARG_RX),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,69},
+ {CLASS_BIT+7,CLASS_BIT+0,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_BIT+0,CLASS_REG+(ARG_RX),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,74},
/* 0011 0010 ddN0 ssss imm16 *** ldb rd(imm16),rbs */
{
@@ -1782,7 +1847,7 @@ const opcode_entry_type z8k_table[] = {
"ldb rd(imm16),rbs",8,14,0x00,
#endif
"ldb",OPC_ldb,0,{CLASS_BA+(ARG_RD),CLASS_REG_BYTE+(ARG_RS),},
- {CLASS_BIT+3,CLASS_BIT+2,CLASS_REGN0+(ARG_RD),CLASS_REG+(ARG_RS),CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,69},
+ {CLASS_BIT+3,CLASS_BIT+2,CLASS_REGN0+(ARG_RD),CLASS_REG+(ARG_RS),CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,74},
/* 0111 0010 ddN0 ssss 0000 xxxx 0000 0000 *** ldb rd(rx),rbs */
{
@@ -1790,7 +1855,7 @@ const opcode_entry_type z8k_table[] = {
"ldb rd(rx),rbs",8,14,0x00,
#endif
"ldb",OPC_ldb,0,{CLASS_BX+(ARG_RD),CLASS_REG_BYTE+(ARG_RS),},
- {CLASS_BIT+7,CLASS_BIT+2,CLASS_REGN0+(ARG_RD),CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_REG+(ARG_RX),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,69},
+ {CLASS_BIT+7,CLASS_BIT+2,CLASS_REGN0+(ARG_RD),CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_REG+(ARG_RX),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,74},
/* 0111 1101 ssss 1ccc *** ldctl ctrl,rs */
{
@@ -1798,7 +1863,7 @@ const opcode_entry_type z8k_table[] = {
"ldctl ctrl,rs",32,7,0x00,
#endif
"ldctl",OPC_ldctl,0,{CLASS_CTRL,CLASS_REG_WORD+(ARG_RS),},
- {CLASS_BIT+7,CLASS_BIT+0xd,CLASS_REG+(ARG_RS),CLASS_1CCC,0,0,0,0,0,},2,2,70},
+ {CLASS_BIT+7,CLASS_BIT+0xd,CLASS_REG+(ARG_RS),CLASS_1CCC,0,0,0,0,0,},2,2,75},
/* 0111 1101 dddd 0ccc *** ldctl rd,ctrl */
{
@@ -1806,7 +1871,7 @@ const opcode_entry_type z8k_table[] = {
"ldctl rd,ctrl",32,7,0x00,
#endif
"ldctl",OPC_ldctl,0,{CLASS_REG_WORD+(ARG_RD),CLASS_CTRL,},
- {CLASS_BIT+7,CLASS_BIT+0xd,CLASS_REG+(ARG_RD),CLASS_0CCC,0,0,0,0,0,},2,2,70},
+ {CLASS_BIT+7,CLASS_BIT+0xd,CLASS_REG+(ARG_RD),CLASS_0CCC,0,0,0,0,0,},2,2,75},
/* 1000 1100 ssss 1001 *** ldctlb ctrl,rbs */
{
@@ -1814,7 +1879,7 @@ const opcode_entry_type z8k_table[] = {
"ldctlb ctrl,rbs",32,7,0x3f,
#endif
"ldctlb",OPC_ldctlb,0,{CLASS_CTRL,CLASS_REG_BYTE+(ARG_RS),},
- {CLASS_BIT+8,CLASS_BIT+0xc,CLASS_REG+(ARG_RS),CLASS_BIT+9,0,0,0,0,0,},2,2,71},
+ {CLASS_BIT+8,CLASS_BIT+0xc,CLASS_REG+(ARG_RS),CLASS_BIT+9,0,0,0,0,0,},2,2,76},
/* 1000 1100 dddd 0001 *** ldctlb rbd,ctrl */
{
@@ -1822,7 +1887,7 @@ const opcode_entry_type z8k_table[] = {
"ldctlb rbd,ctrl",32,7,0x00,
#endif
"ldctlb",OPC_ldctlb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_CTRL,},
- {CLASS_BIT+8,CLASS_BIT+0xc,CLASS_REG+(ARG_RD),CLASS_BIT+1,0,0,0,0,0,},2,2,71},
+ {CLASS_BIT+8,CLASS_BIT+0xc,CLASS_REG+(ARG_RD),CLASS_BIT+1,0,0,0,0,0,},2,2,76},
/* 1011 1011 ssN0 1001 0000 rrrr ddN0 1000 *** ldd @rd,@rs,rr */
{
@@ -1830,7 +1895,7 @@ const opcode_entry_type z8k_table[] = {
"ldd @rd,@rs,rr",16,11,0x04,
#endif
"ldd",OPC_ldd,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RR),},
- {CLASS_BIT+0xb,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,},3,4,72},
+ {CLASS_BIT+0xb,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,},3,4,77},
/* 1011 1010 ssN0 1001 0000 rrrr ddN0 1000 *** lddb @rd,@rs,rr */
{
@@ -1838,7 +1903,7 @@ const opcode_entry_type z8k_table[] = {
"lddb @rd,@rs,rr",8,11,0x04,
#endif
"lddb",OPC_lddb,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RR),},
- {CLASS_BIT+0xb,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,},3,4,73},
+ {CLASS_BIT+0xb,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,},3,4,78},
/* 1011 1011 ssN0 1001 0000 rrrr ddN0 0000 *** lddr @rd,@rs,rr */
{
@@ -1846,7 +1911,7 @@ const opcode_entry_type z8k_table[] = {
"lddr @rd,@rs,rr",16,11,0x04,
#endif
"lddr",OPC_lddr,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RR),},
- {CLASS_BIT+0xb,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RD),CLASS_BIT+0,0,},3,4,74},
+ {CLASS_BIT+0xb,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RD),CLASS_BIT+0,0,},3,4,79},
/* 1011 1010 ssN0 1001 0000 rrrr ddN0 0000 *** lddrb @rd,@rs,rr */
{
@@ -1854,7 +1919,7 @@ const opcode_entry_type z8k_table[] = {
"lddrb @rd,@rs,rr",8,11,0x04,
#endif
"lddrb",OPC_lddrb,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RR),},
- {CLASS_BIT+0xb,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RD),CLASS_BIT+0,0,},3,4,75},
+ {CLASS_BIT+0xb,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RD),CLASS_BIT+0,0,},3,4,80},
/* 1011 1011 ssN0 0001 0000 rrrr ddN0 1000 *** ldi @rd,@rs,rr */
{
@@ -1862,7 +1927,7 @@ const opcode_entry_type z8k_table[] = {
"ldi @rd,@rs,rr",16,11,0x04,
#endif
"ldi",OPC_ldi,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RR),},
- {CLASS_BIT+0xb,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+1,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,},3,4,76},
+ {CLASS_BIT+0xb,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+1,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,},3,4,81},
/* 1011 1010 ssN0 0001 0000 rrrr ddN0 1000 *** ldib @rd,@rs,rr */
{
@@ -1870,7 +1935,7 @@ const opcode_entry_type z8k_table[] = {
"ldib @rd,@rs,rr",8,11,0x04,
#endif
"ldib",OPC_ldib,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RR),},
- {CLASS_BIT+0xb,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+1,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,},3,4,77},
+ {CLASS_BIT+0xb,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+1,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,},3,4,82},
/* 1011 1011 ssN0 0001 0000 rrrr ddN0 0000 *** ldir @rd,@rs,rr */
{
@@ -1878,7 +1943,7 @@ const opcode_entry_type z8k_table[] = {
"ldir @rd,@rs,rr",16,11,0x04,
#endif
"ldir",OPC_ldir,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RR),},
- {CLASS_BIT+0xb,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+1,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RD),CLASS_BIT+0,0,},3,4,78},
+ {CLASS_BIT+0xb,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+1,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RD),CLASS_BIT+0,0,},3,4,83},
/* 1011 1010 ssN0 0001 0000 rrrr ddN0 0000 *** ldirb @rd,@rs,rr */
{
@@ -1886,7 +1951,7 @@ const opcode_entry_type z8k_table[] = {
"ldirb @rd,@rs,rr",8,11,0x04,
#endif
"ldirb",OPC_ldirb,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RR),},
- {CLASS_BIT+0xb,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+1,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RD),CLASS_BIT+0,0,},3,4,79},
+ {CLASS_BIT+0xb,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+1,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RD),CLASS_BIT+0,0,},3,4,84},
/* 1011 1101 dddd imm4 *** ldk rd,imm4 */
{
@@ -1894,7 +1959,7 @@ const opcode_entry_type z8k_table[] = {
"ldk rd,imm4",16,5,0x00,
#endif
"ldk",OPC_ldk,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IMM +(ARG_IMM4),},
- {CLASS_BIT+0xb,CLASS_BIT+0xd,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM4),0,0,0,0,0,},2,2,80},
+ {CLASS_BIT+0xb,CLASS_BIT+0xd,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM4),0,0,0,0,0,},2,2,85},
/* 0001 1101 ddN0 ssss *** ldl @rd,rrs */
{
@@ -1902,7 +1967,7 @@ const opcode_entry_type z8k_table[] = {
"ldl @rd,rrs",32,11,0x00,
#endif
"ldl",OPC_ldl,0,{CLASS_IR+(ARG_RD),CLASS_REG_LONG+(ARG_RS),},
- {CLASS_BIT+1,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_REG+(ARG_RS),0,0,0,0,0,},2,2,81},
+ {CLASS_BIT+1,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_REG+(ARG_RS),0,0,0,0,0,},2,2,86},
/* 0101 1101 ddN0 ssss address_dst *** ldl address_dst(rd),rrs */
{
@@ -1910,7 +1975,7 @@ const opcode_entry_type z8k_table[] = {
"ldl address_dst(rd),rrs",32,14,0x00,
#endif
"ldl",OPC_ldl,0,{CLASS_X+(ARG_RD),CLASS_REG_LONG+(ARG_RS),},
- {CLASS_BIT+5,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_REG+(ARG_RS),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,81},
+ {CLASS_BIT+5,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_REG+(ARG_RS),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,86},
/* 0101 1101 0000 ssss address_dst *** ldl address_dst,rrs */
{
@@ -1918,7 +1983,7 @@ const opcode_entry_type z8k_table[] = {
"ldl address_dst,rrs",32,15,0x00,
#endif
"ldl",OPC_ldl,0,{CLASS_DA+(ARG_DST),CLASS_REG_LONG+(ARG_RS),},
- {CLASS_BIT+5,CLASS_BIT+0xd,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,81},
+ {CLASS_BIT+5,CLASS_BIT+0xd,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,86},
/* 0011 0111 ddN0 ssss imm16 *** ldl rd(imm16),rrs */
{
@@ -1926,7 +1991,7 @@ const opcode_entry_type z8k_table[] = {
"ldl rd(imm16),rrs",32,17,0x00,
#endif
"ldl",OPC_ldl,0,{CLASS_BA+(ARG_RD),CLASS_REG_LONG+(ARG_RS),},
- {CLASS_BIT+3,CLASS_BIT+7,CLASS_REGN0+(ARG_RD),CLASS_REG+(ARG_RS),CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,81},
+ {CLASS_BIT+3,CLASS_BIT+7,CLASS_REGN0+(ARG_RD),CLASS_REG+(ARG_RS),CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,86},
/* 0111 0111 ddN0 ssss 0000 xxxx 0000 0000 *** ldl rd(rx),rrs */
{
@@ -1934,7 +1999,7 @@ const opcode_entry_type z8k_table[] = {
"ldl rd(rx),rrs",32,17,0x00,
#endif
"ldl",OPC_ldl,0,{CLASS_BX+(ARG_RD),CLASS_REG_LONG+(ARG_RS),},
- {CLASS_BIT+7,CLASS_BIT+7,CLASS_REGN0+(ARG_RD),CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_REG+(ARG_RX),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,81},
+ {CLASS_BIT+7,CLASS_BIT+7,CLASS_REGN0+(ARG_RD),CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_REG+(ARG_RX),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,86},
/* 0001 0100 ssN0 dddd *** ldl rrd,@rs */
{
@@ -1942,7 +2007,7 @@ const opcode_entry_type z8k_table[] = {
"ldl rrd,@rs",32,11,0x00,
#endif
"ldl",OPC_ldl,0,{CLASS_REG_LONG+(ARG_RD),CLASS_IR+(ARG_RS),},
- {CLASS_BIT+1,CLASS_BIT+4,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,81},
+ {CLASS_BIT+1,CLASS_BIT+4,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,86},
/* 0101 0100 0000 dddd address_src *** ldl rrd,address_src */
{
@@ -1950,7 +2015,7 @@ const opcode_entry_type z8k_table[] = {
"ldl rrd,address_src",32,12,0x00,
#endif
"ldl",OPC_ldl,0,{CLASS_REG_LONG+(ARG_RD),CLASS_DA+(ARG_SRC),},
- {CLASS_BIT+5,CLASS_BIT+4,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,81},
+ {CLASS_BIT+5,CLASS_BIT+4,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,86},
/* 0101 0100 ssN0 dddd address_src *** ldl rrd,address_src(rs) */
{
@@ -1958,7 +2023,7 @@ const opcode_entry_type z8k_table[] = {
"ldl rrd,address_src(rs)",32,13,0x00,
#endif
"ldl",OPC_ldl,0,{CLASS_REG_LONG+(ARG_RD),CLASS_X+(ARG_RS),},
- {CLASS_BIT+5,CLASS_BIT+4,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,81},
+ {CLASS_BIT+5,CLASS_BIT+4,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,86},
/* 0001 0100 0000 dddd imm32 *** ldl rrd,imm32 */
{
@@ -1966,7 +2031,7 @@ const opcode_entry_type z8k_table[] = {
"ldl rrd,imm32",32,11,0x00,
#endif
"ldl",OPC_ldl,0,{CLASS_REG_LONG+(ARG_RD),CLASS_IMM+(ARG_IMM32),},
- {CLASS_BIT+1,CLASS_BIT+4,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM32),0,0,0,0,},2,6,81},
+ {CLASS_BIT+1,CLASS_BIT+4,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM32),0,0,0,0,},2,6,86},
/* 1001 0100 ssss dddd *** ldl rrd,rrs */
{
@@ -1974,7 +2039,7 @@ const opcode_entry_type z8k_table[] = {
"ldl rrd,rrs",32,5,0x00,
#endif
"ldl",OPC_ldl,0,{CLASS_REG_LONG+(ARG_RD),CLASS_REG_LONG+(ARG_RS),},
- {CLASS_BIT+9,CLASS_BIT+4,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,81},
+ {CLASS_BIT+9,CLASS_BIT+4,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,86},
/* 0011 0101 ssN0 dddd imm16 *** ldl rrd,rs(imm16) */
{
@@ -1982,7 +2047,7 @@ const opcode_entry_type z8k_table[] = {
"ldl rrd,rs(imm16)",32,17,0x00,
#endif
"ldl",OPC_ldl,0,{CLASS_REG_LONG+(ARG_RD),CLASS_BA+(ARG_RS),},
- {CLASS_BIT+3,CLASS_BIT+5,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,81},
+ {CLASS_BIT+3,CLASS_BIT+5,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,86},
/* 0111 0101 ssN0 dddd 0000 xxxx 0000 0000 *** ldl rrd,rs(rx) */
{
@@ -1990,7 +2055,7 @@ const opcode_entry_type z8k_table[] = {
"ldl rrd,rs(rx)",32,17,0x00,
#endif
"ldl",OPC_ldl,0,{CLASS_REG_LONG+(ARG_RD),CLASS_BX+(ARG_RS),},
- {CLASS_BIT+7,CLASS_BIT+5,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_BIT+0,CLASS_REG+(ARG_RX),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,81},
+ {CLASS_BIT+7,CLASS_BIT+5,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_BIT+0,CLASS_REG+(ARG_RX),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,86},
/* 0001 1100 ddN0 1001 0000 ssss 0000 imm4m1 *** ldm @rd,rs,n */
{
@@ -1998,7 +2063,7 @@ const opcode_entry_type z8k_table[] = {
"ldm @rd,rs,n",16,11,0x00,
#endif
"ldm",OPC_ldm,0,{CLASS_IR+(ARG_RD),CLASS_REG_WORD+(ARG_RS),CLASS_IMM + (ARG_IMM4M1),},
- {CLASS_BIT+1,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_IMM+(ARG_IMM4M1),0,},3,4,82},
+ {CLASS_BIT+1,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_IMM+(ARG_IMM4M1),0,},3,4,87},
/* 0101 1100 ddN0 1001 0000 ssss 0000 imm4m1 address_dst *** ldm address_dst(rd),rs,n */
{
@@ -2006,7 +2071,7 @@ const opcode_entry_type z8k_table[] = {
"ldm address_dst(rd),rs,n",16,15,0x00,
#endif
"ldm",OPC_ldm,0,{CLASS_X+(ARG_RD),CLASS_REG_WORD+(ARG_RS),CLASS_IMM + (ARG_IMM4M1),},
- {CLASS_BIT+5,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_IMM+(ARG_IMM4M1),CLASS_ADDRESS+(ARG_DST),},3,6,82},
+ {CLASS_BIT+5,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_IMM+(ARG_IMM4M1),CLASS_ADDRESS+(ARG_DST),},3,6,87},
/* 0101 1100 0000 1001 0000 ssss 0000 imm4m1 address_dst *** ldm address_dst,rs,n */
{
@@ -2014,7 +2079,7 @@ const opcode_entry_type z8k_table[] = {
"ldm address_dst,rs,n",16,14,0x00,
#endif
"ldm",OPC_ldm,0,{CLASS_DA+(ARG_DST),CLASS_REG_WORD+(ARG_RS),CLASS_IMM + (ARG_IMM4M1),},
- {CLASS_BIT+5,CLASS_BIT+0xc,CLASS_BIT+0,CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_IMM+(ARG_IMM4M1),CLASS_ADDRESS+(ARG_DST),},3,6,82},
+ {CLASS_BIT+5,CLASS_BIT+0xc,CLASS_BIT+0,CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_IMM+(ARG_IMM4M1),CLASS_ADDRESS+(ARG_DST),},3,6,87},
/* 0001 1100 ssN0 0001 0000 dddd 0000 imm4m1 *** ldm rd,@rs,n */
{
@@ -2022,7 +2087,7 @@ const opcode_entry_type z8k_table[] = {
"ldm rd,@rs,n",16,11,0x00,
#endif
"ldm",OPC_ldm,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_IMM + (ARG_IMM4M1),},
- {CLASS_BIT+1,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RS),CLASS_BIT+1,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_BIT+0,CLASS_IMM+(ARG_IMM4M1),0,},3,4,82},
+ {CLASS_BIT+1,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RS),CLASS_BIT+1,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_BIT+0,CLASS_IMM+(ARG_IMM4M1),0,},3,4,87},
/* 0101 1100 ssN0 0001 0000 dddd 0000 imm4m1 address_src *** ldm rd,address_src(rs),n */
{
@@ -2030,7 +2095,7 @@ const opcode_entry_type z8k_table[] = {
"ldm rd,address_src(rs),n",16,15,0x00,
#endif
"ldm",OPC_ldm,0,{CLASS_REG_WORD+(ARG_RD),CLASS_X+(ARG_RS),CLASS_IMM + (ARG_IMM4M1),},
- {CLASS_BIT+5,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RS),CLASS_BIT+1,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_BIT+0,CLASS_IMM+(ARG_IMM4M1),CLASS_ADDRESS+(ARG_SRC),},3,6,82},
+ {CLASS_BIT+5,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RS),CLASS_BIT+1,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_BIT+0,CLASS_IMM+(ARG_IMM4M1),CLASS_ADDRESS+(ARG_SRC),},3,6,87},
/* 0101 1100 0000 0001 0000 dddd 0000 imm4m1 address_src *** ldm rd,address_src,n */
{
@@ -2038,7 +2103,7 @@ const opcode_entry_type z8k_table[] = {
"ldm rd,address_src,n",16,14,0x00,
#endif
"ldm",OPC_ldm,0,{CLASS_REG_WORD+(ARG_RD),CLASS_DA+(ARG_SRC),CLASS_IMM + (ARG_IMM4M1),},
- {CLASS_BIT+5,CLASS_BIT+0xc,CLASS_BIT+0,CLASS_BIT+1,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_BIT+0,CLASS_IMM+(ARG_IMM4M1),CLASS_ADDRESS+(ARG_SRC),},3,6,82},
+ {CLASS_BIT+5,CLASS_BIT+0xc,CLASS_BIT+0,CLASS_BIT+1,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_BIT+0,CLASS_IMM+(ARG_IMM4M1),CLASS_ADDRESS+(ARG_SRC),},3,6,87},
/* 0011 1001 ssN0 0000 *** ldps @rs */
{
@@ -2046,7 +2111,7 @@ const opcode_entry_type z8k_table[] = {
"ldps @rs",16,12,0x3f,
#endif
"ldps",OPC_ldps,0,{CLASS_IR+(ARG_RS),},
- {CLASS_BIT+3,CLASS_BIT+9,CLASS_REGN0+(ARG_RS),CLASS_BIT+0,0,0,0,0,0,},1,2,83},
+ {CLASS_BIT+3,CLASS_BIT+9,CLASS_REGN0+(ARG_RS),CLASS_BIT+0,0,0,0,0,0,},1,2,88},
/* 0111 1001 0000 0000 address_src *** ldps address_src */
{
@@ -2054,7 +2119,7 @@ const opcode_entry_type z8k_table[] = {
"ldps address_src",16,16,0x3f,
#endif
"ldps",OPC_ldps,0,{CLASS_DA+(ARG_SRC),},
- {CLASS_BIT+7,CLASS_BIT+9,CLASS_BIT+0,CLASS_BIT+0,CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},1,4,83},
+ {CLASS_BIT+7,CLASS_BIT+9,CLASS_BIT+0,CLASS_BIT+0,CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},1,4,88},
/* 0111 1001 ssN0 0000 address_src *** ldps address_src(rs) */
{
@@ -2062,7 +2127,7 @@ const opcode_entry_type z8k_table[] = {
"ldps address_src(rs)",16,17,0x3f,
#endif
"ldps",OPC_ldps,0,{CLASS_X+(ARG_RS),},
- {CLASS_BIT+7,CLASS_BIT+9,CLASS_REGN0+(ARG_RS),CLASS_BIT+0,CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},1,4,83},
+ {CLASS_BIT+7,CLASS_BIT+9,CLASS_REGN0+(ARG_RS),CLASS_BIT+0,CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},1,4,88},
/* 0011 0011 0000 ssss disp16 *** ldr disp16,rs */
{
@@ -2070,7 +2135,7 @@ const opcode_entry_type z8k_table[] = {
"ldr disp16,rs",16,14,0x00,
#endif
"ldr",OPC_ldr,0,{CLASS_DISP,CLASS_REG_WORD+(ARG_RS),},
- {CLASS_BIT+3,CLASS_BIT+3,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_DISP+(ARG_DISP16),0,0,0,0,},2,4,84},
+ {CLASS_BIT+3,CLASS_BIT+3,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_DISP+(ARG_DISP16),0,0,0,0,},2,4,89},
/* 0011 0001 0000 dddd disp16 *** ldr rd,disp16 */
{
@@ -2078,7 +2143,7 @@ const opcode_entry_type z8k_table[] = {
"ldr rd,disp16",16,14,0x00,
#endif
"ldr",OPC_ldr,0,{CLASS_REG_WORD+(ARG_RD),CLASS_DISP,},
- {CLASS_BIT+3,CLASS_BIT+1,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_DISP+(ARG_DISP16),0,0,0,0,},2,4,84},
+ {CLASS_BIT+3,CLASS_BIT+1,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_DISP+(ARG_DISP16),0,0,0,0,},2,4,89},
/* 0011 0010 0000 ssss disp16 *** ldrb disp16,rbs */
{
@@ -2086,7 +2151,7 @@ const opcode_entry_type z8k_table[] = {
"ldrb disp16,rbs",8,14,0x00,
#endif
"ldrb",OPC_ldrb,0,{CLASS_DISP,CLASS_REG_BYTE+(ARG_RS),},
- {CLASS_BIT+3,CLASS_BIT+2,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_DISP+(ARG_DISP16),0,0,0,0,},2,4,85},
+ {CLASS_BIT+3,CLASS_BIT+2,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_DISP+(ARG_DISP16),0,0,0,0,},2,4,90},
/* 0011 0000 0000 dddd disp16 *** ldrb rbd,disp16 */
{
@@ -2094,7 +2159,7 @@ const opcode_entry_type z8k_table[] = {
"ldrb rbd,disp16",8,14,0x00,
#endif
"ldrb",OPC_ldrb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_DISP,},
- {CLASS_BIT+3,CLASS_BIT+0,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_DISP+(ARG_DISP16),0,0,0,0,},2,4,85},
+ {CLASS_BIT+3,CLASS_BIT+0,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_DISP+(ARG_DISP16),0,0,0,0,},2,4,90},
/* 0011 0111 0000 ssss disp16 *** ldrl disp16,rrs */
{
@@ -2102,7 +2167,7 @@ const opcode_entry_type z8k_table[] = {
"ldrl disp16,rrs",32,17,0x00,
#endif
"ldrl",OPC_ldrl,0,{CLASS_DISP,CLASS_REG_LONG+(ARG_RS),},
- {CLASS_BIT+3,CLASS_BIT+7,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_DISP+(ARG_DISP16),0,0,0,0,},2,4,86},
+ {CLASS_BIT+3,CLASS_BIT+7,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_DISP+(ARG_DISP16),0,0,0,0,},2,4,91},
/* 0011 0101 0000 dddd disp16 *** ldrl rrd,disp16 */
{
@@ -2110,7 +2175,7 @@ const opcode_entry_type z8k_table[] = {
"ldrl rrd,disp16",32,17,0x00,
#endif
"ldrl",OPC_ldrl,0,{CLASS_REG_LONG+(ARG_RD),CLASS_DISP,},
- {CLASS_BIT+3,CLASS_BIT+5,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_DISP+(ARG_DISP16),0,0,0,0,},2,4,86},
+ {CLASS_BIT+3,CLASS_BIT+5,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_DISP+(ARG_DISP16),0,0,0,0,},2,4,91},
/* 0111 1011 0000 1010 *** mbit */
{
@@ -2118,7 +2183,7 @@ const opcode_entry_type z8k_table[] = {
"mbit",16,7,0x38,
#endif
"mbit",OPC_mbit,0,{0},
- {CLASS_BIT+7,CLASS_BIT+0xb,CLASS_BIT+0,CLASS_BIT+0xa,0,0,0,0,0,},0,2,87},
+ {CLASS_BIT+7,CLASS_BIT+0xb,CLASS_BIT+0,CLASS_BIT+0xa,0,0,0,0,0,},0,2,92},
/* 0111 1011 dddd 1101 *** mreq rd */
{
@@ -2126,7 +2191,7 @@ const opcode_entry_type z8k_table[] = {
"mreq rd",16,12,0x18,
#endif
"mreq",OPC_mreq,0,{CLASS_REG_WORD+(ARG_RD),},
- {CLASS_BIT+7,CLASS_BIT+0xb,CLASS_REG+(ARG_RD),CLASS_BIT+0xd,0,0,0,0,0,},1,2,88},
+ {CLASS_BIT+7,CLASS_BIT+0xb,CLASS_REG+(ARG_RD),CLASS_BIT+0xd,0,0,0,0,0,},1,2,93},
/* 0111 1011 0000 1001 *** mres */
{
@@ -2134,7 +2199,7 @@ const opcode_entry_type z8k_table[] = {
"mres",16,5,0x00,
#endif
"mres",OPC_mres,0,{0},
- {CLASS_BIT+7,CLASS_BIT+0xb,CLASS_BIT+0,CLASS_BIT+9,0,0,0,0,0,},0,2,89},
+ {CLASS_BIT+7,CLASS_BIT+0xb,CLASS_BIT+0,CLASS_BIT+9,0,0,0,0,0,},0,2,94},
/* 0111 1011 0000 1000 *** mset */
{
@@ -2142,7 +2207,7 @@ const opcode_entry_type z8k_table[] = {
"mset",16,5,0x00,
#endif
"mset",OPC_mset,0,{0},
- {CLASS_BIT+7,CLASS_BIT+0xb,CLASS_BIT+0,CLASS_BIT+8,0,0,0,0,0,},0,2,90},
+ {CLASS_BIT+7,CLASS_BIT+0xb,CLASS_BIT+0,CLASS_BIT+8,0,0,0,0,0,},0,2,95},
/* 0001 1001 ssN0 dddd *** mult rrd,@rs */
{
@@ -2150,7 +2215,7 @@ const opcode_entry_type z8k_table[] = {
"mult rrd,@rs",16,70,0x3c,
#endif
"mult",OPC_mult,0,{CLASS_REG_LONG+(ARG_RD),CLASS_IR+(ARG_RS),},
- {CLASS_BIT+1,CLASS_BIT+9,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,91},
+ {CLASS_BIT+1,CLASS_BIT+9,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,96},
/* 0101 1001 0000 dddd address_src *** mult rrd,address_src */
{
@@ -2158,7 +2223,7 @@ const opcode_entry_type z8k_table[] = {
"mult rrd,address_src",16,70,0x3c,
#endif
"mult",OPC_mult,0,{CLASS_REG_LONG+(ARG_RD),CLASS_DA+(ARG_SRC),},
- {CLASS_BIT+5,CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,91},
+ {CLASS_BIT+5,CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,96},
/* 0101 1001 ssN0 dddd address_src *** mult rrd,address_src(rs) */
{
@@ -2166,7 +2231,7 @@ const opcode_entry_type z8k_table[] = {
"mult rrd,address_src(rs)",16,70,0x3c,
#endif
"mult",OPC_mult,0,{CLASS_REG_LONG+(ARG_RD),CLASS_X+(ARG_RS),},
- {CLASS_BIT+5,CLASS_BIT+9,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,91},
+ {CLASS_BIT+5,CLASS_BIT+9,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,96},
/* 0001 1001 0000 dddd imm16 *** mult rrd,imm16 */
{
@@ -2174,7 +2239,7 @@ const opcode_entry_type z8k_table[] = {
"mult rrd,imm16",16,70,0x3c,
#endif
"mult",OPC_mult,0,{CLASS_REG_LONG+(ARG_RD),CLASS_IMM+(ARG_IMM16),},
- {CLASS_BIT+1,CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,91},
+ {CLASS_BIT+1,CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,96},
/* 1001 1001 ssss dddd *** mult rrd,rs */
{
@@ -2182,7 +2247,7 @@ const opcode_entry_type z8k_table[] = {
"mult rrd,rs",16,70,0x3c,
#endif
"mult",OPC_mult,0,{CLASS_REG_LONG+(ARG_RD),CLASS_REG_WORD+(ARG_RS),},
- {CLASS_BIT+9,CLASS_BIT+9,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,91},
+ {CLASS_BIT+9,CLASS_BIT+9,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,96},
/* 0001 1000 ssN0 dddd *** multl rqd,@rs */
{
@@ -2190,7 +2255,7 @@ const opcode_entry_type z8k_table[] = {
"multl rqd,@rs",32,282,0x3c,
#endif
"multl",OPC_multl,0,{CLASS_REG_QUAD+(ARG_RD),CLASS_IR+(ARG_RS),},
- {CLASS_BIT+1,CLASS_BIT+8,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,92},
+ {CLASS_BIT+1,CLASS_BIT+8,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,97},
/* 0101 1000 0000 dddd address_src *** multl rqd,address_src */
{
@@ -2198,7 +2263,7 @@ const opcode_entry_type z8k_table[] = {
"multl rqd,address_src",32,282,0x3c,
#endif
"multl",OPC_multl,0,{CLASS_REG_QUAD+(ARG_RD),CLASS_DA+(ARG_SRC),},
- {CLASS_BIT+5,CLASS_BIT+8,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,92},
+ {CLASS_BIT+5,CLASS_BIT+8,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,97},
/* 0101 1000 ssN0 dddd address_src *** multl rqd,address_src(rs) */
{
@@ -2206,7 +2271,7 @@ const opcode_entry_type z8k_table[] = {
"multl rqd,address_src(rs)",32,282,0x3c,
#endif
"multl",OPC_multl,0,{CLASS_REG_QUAD+(ARG_RD),CLASS_X+(ARG_RS),},
- {CLASS_BIT+5,CLASS_BIT+8,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,92},
+ {CLASS_BIT+5,CLASS_BIT+8,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,97},
/* 0001 1000 0000 dddd imm32 *** multl rqd,imm32 */
{
@@ -2214,7 +2279,7 @@ const opcode_entry_type z8k_table[] = {
"multl rqd,imm32",32,282,0x3c,
#endif
"multl",OPC_multl,0,{CLASS_REG_QUAD+(ARG_RD),CLASS_IMM+(ARG_IMM32),},
- {CLASS_BIT+1,CLASS_BIT+8,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM32),0,0,0,0,},2,6,92},
+ {CLASS_BIT+1,CLASS_BIT+8,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM32),0,0,0,0,},2,6,97},
/* 1001 1000 ssss dddd *** multl rqd,rrs */
{
@@ -2222,7 +2287,7 @@ const opcode_entry_type z8k_table[] = {
"multl rqd,rrs",32,282,0x3c,
#endif
"multl",OPC_multl,0,{CLASS_REG_QUAD+(ARG_RD),CLASS_REG_LONG+(ARG_RS),},
- {CLASS_BIT+9,CLASS_BIT+8,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,92},
+ {CLASS_BIT+9,CLASS_BIT+8,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,97},
/* 0000 1101 ddN0 0010 *** neg @rd */
{
@@ -2230,7 +2295,7 @@ const opcode_entry_type z8k_table[] = {
"neg @rd",16,12,0x3c,
#endif
"neg",OPC_neg,0,{CLASS_IR+(ARG_RD),},
- {CLASS_BIT+0,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_BIT+2,0,0,0,0,0,},1,2,93},
+ {CLASS_BIT+0,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_BIT+2,0,0,0,0,0,},1,2,98},
/* 0100 1101 0000 0010 address_dst *** neg address_dst */
{
@@ -2238,7 +2303,7 @@ const opcode_entry_type z8k_table[] = {
"neg address_dst",16,15,0x3c,
#endif
"neg",OPC_neg,0,{CLASS_DA+(ARG_DST),},
- {CLASS_BIT+4,CLASS_BIT+0xd,CLASS_BIT+0,CLASS_BIT+2,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,93},
+ {CLASS_BIT+4,CLASS_BIT+0xd,CLASS_BIT+0,CLASS_BIT+2,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,98},
/* 0100 1101 ddN0 0010 address_dst *** neg address_dst(rd) */
{
@@ -2246,7 +2311,7 @@ const opcode_entry_type z8k_table[] = {
"neg address_dst(rd)",16,16,0x3c,
#endif
"neg",OPC_neg,0,{CLASS_X+(ARG_RD),},
- {CLASS_BIT+4,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_BIT+2,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,93},
+ {CLASS_BIT+4,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_BIT+2,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,98},
/* 1000 1101 dddd 0010 *** neg rd */
{
@@ -2254,7 +2319,7 @@ const opcode_entry_type z8k_table[] = {
"neg rd",16,7,0x3c,
#endif
"neg",OPC_neg,0,{CLASS_REG_WORD+(ARG_RD),},
- {CLASS_BIT+8,CLASS_BIT+0xd,CLASS_REG+(ARG_RD),CLASS_BIT+2,0,0,0,0,0,},1,2,93},
+ {CLASS_BIT+8,CLASS_BIT+0xd,CLASS_REG+(ARG_RD),CLASS_BIT+2,0,0,0,0,0,},1,2,98},
/* 0000 1100 ddN0 0010 *** negb @rd */
{
@@ -2262,7 +2327,7 @@ const opcode_entry_type z8k_table[] = {
"negb @rd",8,12,0x3c,
#endif
"negb",OPC_negb,0,{CLASS_IR+(ARG_RD),},
- {CLASS_BIT+0,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+2,0,0,0,0,0,},1,2,94},
+ {CLASS_BIT+0,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+2,0,0,0,0,0,},1,2,99},
/* 0100 1100 0000 0010 address_dst *** negb address_dst */
{
@@ -2270,7 +2335,7 @@ const opcode_entry_type z8k_table[] = {
"negb address_dst",8,15,0x3c,
#endif
"negb",OPC_negb,0,{CLASS_DA+(ARG_DST),},
- {CLASS_BIT+4,CLASS_BIT+0xc,CLASS_BIT+0,CLASS_BIT+2,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,94},
+ {CLASS_BIT+4,CLASS_BIT+0xc,CLASS_BIT+0,CLASS_BIT+2,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,99},
/* 0100 1100 ddN0 0010 address_dst *** negb address_dst(rd) */
{
@@ -2278,7 +2343,7 @@ const opcode_entry_type z8k_table[] = {
"negb address_dst(rd)",8,16,0x3c,
#endif
"negb",OPC_negb,0,{CLASS_X+(ARG_RD),},
- {CLASS_BIT+4,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+2,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,94},
+ {CLASS_BIT+4,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+2,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,99},
/* 1000 1100 dddd 0010 *** negb rbd */
{
@@ -2286,7 +2351,7 @@ const opcode_entry_type z8k_table[] = {
"negb rbd",8,7,0x3c,
#endif
"negb",OPC_negb,0,{CLASS_REG_BYTE+(ARG_RD),},
- {CLASS_BIT+8,CLASS_BIT+0xc,CLASS_REG+(ARG_RD),CLASS_BIT+2,0,0,0,0,0,},1,2,94},
+ {CLASS_BIT+8,CLASS_BIT+0xc,CLASS_REG+(ARG_RD),CLASS_BIT+2,0,0,0,0,0,},1,2,99},
/* 1000 1101 0000 0111 *** nop */
{
@@ -2294,7 +2359,7 @@ const opcode_entry_type z8k_table[] = {
"nop",16,7,0x00,
#endif
"nop",OPC_nop,0,{0},
- {CLASS_BIT+8,CLASS_BIT+0xd,CLASS_BIT+0,CLASS_BIT+7,0,0,0,0,0,},0,2,95},
+ {CLASS_BIT+8,CLASS_BIT+0xd,CLASS_BIT+0,CLASS_BIT+7,0,0,0,0,0,},0,2,100},
/* 0000 0101 ssN0 dddd *** or rd,@rs */
{
@@ -2302,7 +2367,7 @@ const opcode_entry_type z8k_table[] = {
"or rd,@rs",16,7,0x38,
#endif
"or",OPC_or,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IR+(ARG_RS),},
- {CLASS_BIT+0,CLASS_BIT+5,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,96},
+ {CLASS_BIT+0,CLASS_BIT+5,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,101},
/* 0100 0101 0000 dddd address_src *** or rd,address_src */
{
@@ -2310,7 +2375,7 @@ const opcode_entry_type z8k_table[] = {
"or rd,address_src",16,9,0x38,
#endif
"or",OPC_or,0,{CLASS_REG_WORD+(ARG_RD),CLASS_DA+(ARG_SRC),},
- {CLASS_BIT+4,CLASS_BIT+5,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,96},
+ {CLASS_BIT+4,CLASS_BIT+5,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,101},
/* 0100 0101 ssN0 dddd address_src *** or rd,address_src(rs) */
{
@@ -2318,7 +2383,7 @@ const opcode_entry_type z8k_table[] = {
"or rd,address_src(rs)",16,10,0x38,
#endif
"or",OPC_or,0,{CLASS_REG_WORD+(ARG_RD),CLASS_X+(ARG_RS),},
- {CLASS_BIT+4,CLASS_BIT+5,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,96},
+ {CLASS_BIT+4,CLASS_BIT+5,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,101},
/* 0000 0101 0000 dddd imm16 *** or rd,imm16 */
{
@@ -2326,7 +2391,7 @@ const opcode_entry_type z8k_table[] = {
"or rd,imm16",16,7,0x38,
#endif
"or",OPC_or,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IMM+(ARG_IMM16),},
- {CLASS_BIT+0,CLASS_BIT+5,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,96},
+ {CLASS_BIT+0,CLASS_BIT+5,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,101},
/* 1000 0101 ssss dddd *** or rd,rs */
{
@@ -2334,7 +2399,7 @@ const opcode_entry_type z8k_table[] = {
"or rd,rs",16,4,0x38,
#endif
"or",OPC_or,0,{CLASS_REG_WORD+(ARG_RD),CLASS_REG_WORD+(ARG_RS),},
- {CLASS_BIT+8,CLASS_BIT+5,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,96},
+ {CLASS_BIT+8,CLASS_BIT+5,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,101},
/* 0000 0100 ssN0 dddd *** orb rbd,@rs */
{
@@ -2342,7 +2407,7 @@ const opcode_entry_type z8k_table[] = {
"orb rbd,@rs",8,7,0x3c,
#endif
"orb",OPC_orb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IR+(ARG_RS),},
- {CLASS_BIT+0,CLASS_BIT+4,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,97},
+ {CLASS_BIT+0,CLASS_BIT+4,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,102},
/* 0100 0100 0000 dddd address_src *** orb rbd,address_src */
{
@@ -2350,7 +2415,7 @@ const opcode_entry_type z8k_table[] = {
"orb rbd,address_src",8,9,0x3c,
#endif
"orb",OPC_orb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_DA+(ARG_SRC),},
- {CLASS_BIT+4,CLASS_BIT+4,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,97},
+ {CLASS_BIT+4,CLASS_BIT+4,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,102},
/* 0100 0100 ssN0 dddd address_src *** orb rbd,address_src(rs) */
{
@@ -2358,7 +2423,7 @@ const opcode_entry_type z8k_table[] = {
"orb rbd,address_src(rs)",8,10,0x3c,
#endif
"orb",OPC_orb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_X+(ARG_RS),},
- {CLASS_BIT+4,CLASS_BIT+4,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,97},
+ {CLASS_BIT+4,CLASS_BIT+4,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,102},
/* 0000 0100 0000 dddd imm8 imm8 *** orb rbd,imm8 */
{
@@ -2366,7 +2431,7 @@ const opcode_entry_type z8k_table[] = {
"orb rbd,imm8",8,7,0x3c,
#endif
"orb",OPC_orb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IMM+(ARG_IMM8),},
- {CLASS_BIT+0,CLASS_BIT+4,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM8),CLASS_IMM+(ARG_IMM8),0,0,0,},2,4,97},
+ {CLASS_BIT+0,CLASS_BIT+4,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM8),CLASS_IMM+(ARG_IMM8),0,0,0,},2,4,102},
/* 1000 0100 ssss dddd *** orb rbd,rbs */
{
@@ -2374,79 +2439,103 @@ const opcode_entry_type z8k_table[] = {
"orb rbd,rbs",8,4,0x3c,
#endif
"orb",OPC_orb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_REG_BYTE+(ARG_RS),},
- {CLASS_BIT+8,CLASS_BIT+4,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,97},
+ {CLASS_BIT+8,CLASS_BIT+4,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,102},
-/* 0011 1111 ddN0 ssss *** out @rd,rs */
+/* 0011 1011 ssN0 1010 0000 aaaa dddd 0000 *** otdr @ro,@rs,ra */
{
#ifdef NICENAMES
-"out @rd,rs",16,0,0x04,
+"otdr @ro,@rs,ra",16,11,0x04,
#endif
-"out",OPC_out,0,{CLASS_IR+(ARG_RD),CLASS_REG_WORD+(ARG_RS),},
- {CLASS_BIT+3,CLASS_BIT+0xf,CLASS_REGN0+(ARG_RD),CLASS_REG+(ARG_RS),0,0,0,0,0,},2,2,98},
+"otdr",OPC_otdr,0,{CLASS_IRO+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
+ {CLASS_BIT+3,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+0xa,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REG+(ARG_RD),CLASS_BIT+0,0,},3,4,103},
-/* 0011 1011 ssss 0110 imm16 *** out imm16,rs */
+/* 0011 1010 ssN0 1010 0000 aaaa dddd 0000 *** otdrb @ro,@rs,ra */
{
#ifdef NICENAMES
-"out imm16,rs",16,0,0x04,
+"otdrb @ro,@rs,ra",8,11,0x04,
#endif
-"out",OPC_out,0,{CLASS_IMM+(ARG_IMM16),CLASS_REG_WORD+(ARG_RS),},
- {CLASS_BIT+3,CLASS_BIT+0xb,CLASS_REG+(ARG_RS),CLASS_BIT+6,CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,98},
+"otdrb",OPC_otdrb,0,{CLASS_IRO+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
+ {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+0xa,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REG+(ARG_RD),CLASS_BIT+0,0,},3,4,104},
-/* 0011 1110 ddN0 ssss *** outb @rd,rbs */
+/* 0011 1011 ssN0 0010 0000 aaaa dddd 0000 *** otir @ro,@rs,ra */
{
#ifdef NICENAMES
-"outb @rd,rbs",8,0,0x04,
+"otir @ro,@rs,ra",16,11,0x04,
#endif
-"outb",OPC_outb,0,{CLASS_IR+(ARG_RD),CLASS_REG_BYTE+(ARG_RS),},
- {CLASS_BIT+3,CLASS_BIT+0xe,CLASS_REGN0+(ARG_RD),CLASS_REG+(ARG_RS),0,0,0,0,0,},2,2,99},
+"otir",OPC_otir,0,{CLASS_IRO+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
+ {CLASS_BIT+3,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+2,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REG+(ARG_RD),CLASS_BIT+0,0,},3,4,105},
-/* 0011 1010 ssss 0110 imm16 *** outb imm16,rbs */
+/* 0011 1010 ssN0 0010 0000 aaaa dddd 0000 *** otirb @ro,@rs,ra */
{
#ifdef NICENAMES
-"outb imm16,rbs",8,0,0x04,
+"otirb @ro,@rs,ra",8,11,0x04,
#endif
-"outb",OPC_outb,0,{CLASS_IMM+(ARG_IMM16),CLASS_REG_BYTE+(ARG_RS),},
- {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REG+(ARG_RS),CLASS_BIT+6,CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,99},
+"otirb",OPC_otirb,0,{CLASS_IRO+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
+ {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+2,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REG+(ARG_RD),CLASS_BIT+0,0,},3,4,106},
-/* 0011 1011 ssN0 1010 0000 aaaa ddN0 1000 *** outd @rd,@rs,ra */
+/* 0011 1111 dddd ssss *** out @ro,rs */
{
#ifdef NICENAMES
-"outd @rd,@rs,ra",16,0,0x04,
+"out @ro,rs",16,10,0x00,
#endif
-"outd",OPC_outd,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
- {CLASS_BIT+3,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+0xa,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,},3,4,100},
+"out",OPC_out,0,{CLASS_IRO+(ARG_RD),CLASS_REG_WORD+(ARG_RS),},
+ {CLASS_BIT+3,CLASS_BIT+0xf,CLASS_REG+(ARG_RD),CLASS_REG+(ARG_RS),0,0,0,0,0,},2,2,107},
-/* 0011 1010 ssN0 1010 0000 aaaa ddN0 1000 *** outdb @rd,@rs,rba */
+/* 0011 1011 ssss 0110 imm16 *** out imm16,rs */
{
#ifdef NICENAMES
-"outdb @rd,@rs,rba",16,0,0x04,
+"out imm16,rs",16,12,0x00,
#endif
-"outdb",OPC_outdb,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_BYTE+(ARG_RA),},
- {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+0xa,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,},3,4,101},
+"out",OPC_out,0,{CLASS_IMM+(ARG_IMM16),CLASS_REG_WORD+(ARG_RS),},
+ {CLASS_BIT+3,CLASS_BIT+0xb,CLASS_REG+(ARG_RS),CLASS_BIT+6,CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,107},
-/* 0011 1011 ssN0 0010 0000 aaaa ddN0 1000 *** outi @rd,@rs,ra */
+/* 0011 1110 dddd ssss *** outb @ro,rbs */
{
#ifdef NICENAMES
-"outi @rd,@rs,ra",16,0,0x04,
+"outb @ro,rbs",8,10,0x00,
#endif
-"outi",OPC_outi,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
- {CLASS_BIT+3,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+2,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,},3,4,102},
+"outb",OPC_outb,0,{CLASS_IRO+(ARG_RD),CLASS_REG_BYTE+(ARG_RS),},
+ {CLASS_BIT+3,CLASS_BIT+0xe,CLASS_REG+(ARG_RD),CLASS_REG+(ARG_RS),0,0,0,0,0,},2,2,108},
-/* 0011 1010 ssN0 0010 0000 aaaa ddN0 1000 *** outib @rd,@rs,ra */
+/* 0011 1010 ssss 0110 imm16 *** outb imm16,rbs */
{
#ifdef NICENAMES
-"outib @rd,@rs,ra",16,0,0x04,
+"outb imm16,rbs",8,12,0x00,
#endif
-"outib",OPC_outib,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
- {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+2,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,},3,4,103},
+"outb",OPC_outb,0,{CLASS_IMM+(ARG_IMM16),CLASS_REG_BYTE+(ARG_RS),},
+ {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REG+(ARG_RS),CLASS_BIT+6,CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,108},
-/* 0011 1010 ssN0 0010 0000 aaaa ddN0 0000 *** outibr @rd,@rs,ra */
+/* 0011 1011 ssN0 1010 0000 aaaa dddd 1000 *** outd @ro,@rs,ra */
{
#ifdef NICENAMES
-"outibr @rd,@rs,ra",16,0,0x04,
+"outd @ro,@rs,ra",16,21,0x04,
#endif
-"outibr",OPC_outibr,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
- {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+2,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RD),CLASS_BIT+0,0,},3,4,104},
+"outd",OPC_outd,0,{CLASS_IRO+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
+ {CLASS_BIT+3,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+0xa,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REG+(ARG_RD),CLASS_BIT+8,0,},3,4,109},
+
+/* 0011 1010 ssN0 1010 0000 aaaa dddd 1000 *** outdb @ro,@rs,ra */
+{
+#ifdef NICENAMES
+"outdb @ro,@rs,ra",8,21,0x04,
+#endif
+"outdb",OPC_outdb,0,{CLASS_IRO+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
+ {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+0xa,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REG+(ARG_RD),CLASS_BIT+8,0,},3,4,110},
+
+/* 0011 1011 ssN0 0010 0000 aaaa dddd 1000 *** outi @ro,@rs,ra */
+{
+#ifdef NICENAMES
+"outi @ro,@rs,ra",16,21,0x04,
+#endif
+"outi",OPC_outi,0,{CLASS_IRO+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
+ {CLASS_BIT+3,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+2,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REG+(ARG_RD),CLASS_BIT+8,0,},3,4,111},
+
+/* 0011 1010 ssN0 0010 0000 aaaa dddd 1000 *** outib @ro,@rs,ra */
+{
+#ifdef NICENAMES
+"outib @ro,@rs,ra",8,21,0x04,
+#endif
+"outib",OPC_outib,0,{CLASS_IRO+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
+ {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+2,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REG+(ARG_RD),CLASS_BIT+8,0,},3,4,112},
/* 0001 0111 ssN0 ddN0 *** pop @rd,@rs */
{
@@ -2454,7 +2543,7 @@ const opcode_entry_type z8k_table[] = {
"pop @rd,@rs",16,12,0x00,
#endif
"pop",OPC_pop,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),},
- {CLASS_BIT+1,CLASS_BIT+7,CLASS_REGN0+(ARG_RS),CLASS_REGN0+(ARG_RD),0,0,0,0,0,},2,2,105},
+ {CLASS_BIT+1,CLASS_BIT+7,CLASS_REGN0+(ARG_RS),CLASS_REGN0+(ARG_RD),0,0,0,0,0,},2,2,113},
/* 0101 0111 ssN0 ddN0 address_dst *** pop address_dst(rd),@rs */
{
@@ -2462,7 +2551,7 @@ const opcode_entry_type z8k_table[] = {
"pop address_dst(rd),@rs",16,16,0x00,
#endif
"pop",OPC_pop,0,{CLASS_X+(ARG_RD),CLASS_IR+(ARG_RS),},
- {CLASS_BIT+5,CLASS_BIT+7,CLASS_REGN0+(ARG_RS),CLASS_REGN0+(ARG_RD),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,105},
+ {CLASS_BIT+5,CLASS_BIT+7,CLASS_REGN0+(ARG_RS),CLASS_REGN0+(ARG_RD),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,113},
/* 0101 0111 ssN0 0000 address_dst *** pop address_dst,@rs */
{
@@ -2470,7 +2559,7 @@ const opcode_entry_type z8k_table[] = {
"pop address_dst,@rs",16,16,0x00,
#endif
"pop",OPC_pop,0,{CLASS_DA+(ARG_DST),CLASS_IR+(ARG_RS),},
- {CLASS_BIT+5,CLASS_BIT+7,CLASS_REGN0+(ARG_RS),CLASS_BIT+0,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,105},
+ {CLASS_BIT+5,CLASS_BIT+7,CLASS_REGN0+(ARG_RS),CLASS_BIT+0,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,113},
/* 1001 0111 ssN0 dddd *** pop rd,@rs */
{
@@ -2478,7 +2567,7 @@ const opcode_entry_type z8k_table[] = {
"pop rd,@rs",16,8,0x00,
#endif
"pop",OPC_pop,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IR+(ARG_RS),},
- {CLASS_BIT+9,CLASS_BIT+7,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,105},
+ {CLASS_BIT+9,CLASS_BIT+7,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,113},
/* 0001 0101 ssN0 ddN0 *** popl @rd,@rs */
{
@@ -2486,7 +2575,7 @@ const opcode_entry_type z8k_table[] = {
"popl @rd,@rs",32,19,0x00,
#endif
"popl",OPC_popl,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),},
- {CLASS_BIT+1,CLASS_BIT+5,CLASS_REGN0+(ARG_RS),CLASS_REGN0+(ARG_RD),0,0,0,0,0,},2,2,106},
+ {CLASS_BIT+1,CLASS_BIT+5,CLASS_REGN0+(ARG_RS),CLASS_REGN0+(ARG_RD),0,0,0,0,0,},2,2,114},
/* 0101 0101 ssN0 ddN0 address_dst *** popl address_dst(rd),@rs */
{
@@ -2494,7 +2583,7 @@ const opcode_entry_type z8k_table[] = {
"popl address_dst(rd),@rs",32,23,0x00,
#endif
"popl",OPC_popl,0,{CLASS_X+(ARG_RD),CLASS_IR+(ARG_RS),},
- {CLASS_BIT+5,CLASS_BIT+5,CLASS_REGN0+(ARG_RS),CLASS_REGN0+(ARG_RD),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,106},
+ {CLASS_BIT+5,CLASS_BIT+5,CLASS_REGN0+(ARG_RS),CLASS_REGN0+(ARG_RD),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,114},
/* 0101 0101 ssN0 0000 address_dst *** popl address_dst,@rs */
{
@@ -2502,7 +2591,7 @@ const opcode_entry_type z8k_table[] = {
"popl address_dst,@rs",32,23,0x00,
#endif
"popl",OPC_popl,0,{CLASS_DA+(ARG_DST),CLASS_IR+(ARG_RS),},
- {CLASS_BIT+5,CLASS_BIT+5,CLASS_REGN0+(ARG_RS),CLASS_BIT+0,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,106},
+ {CLASS_BIT+5,CLASS_BIT+5,CLASS_REGN0+(ARG_RS),CLASS_BIT+0,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,114},
/* 1001 0101 ssN0 dddd *** popl rrd,@rs */
{
@@ -2510,7 +2599,7 @@ const opcode_entry_type z8k_table[] = {
"popl rrd,@rs",32,12,0x00,
#endif
"popl",OPC_popl,0,{CLASS_REG_LONG+(ARG_RD),CLASS_IR+(ARG_RS),},
- {CLASS_BIT+9,CLASS_BIT+5,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,106},
+ {CLASS_BIT+9,CLASS_BIT+5,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,114},
/* 0001 0011 ddN0 ssN0 *** push @rd,@rs */
{
@@ -2518,7 +2607,7 @@ const opcode_entry_type z8k_table[] = {
"push @rd,@rs",16,13,0x00,
#endif
"push",OPC_push,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),},
- {CLASS_BIT+1,CLASS_BIT+3,CLASS_REGN0+(ARG_RD),CLASS_REGN0+(ARG_RS),0,0,0,0,0,},2,2,107},
+ {CLASS_BIT+1,CLASS_BIT+3,CLASS_REGN0+(ARG_RD),CLASS_REGN0+(ARG_RS),0,0,0,0,0,},2,2,115},
/* 0101 0011 ddN0 0000 address_src *** push @rd,address_src */
{
@@ -2526,7 +2615,7 @@ const opcode_entry_type z8k_table[] = {
"push @rd,address_src",16,14,0x00,
#endif
"push",OPC_push,0,{CLASS_IR+(ARG_RD),CLASS_DA+(ARG_SRC),},
- {CLASS_BIT+5,CLASS_BIT+3,CLASS_REGN0+(ARG_RD),CLASS_BIT+0,CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,107},
+ {CLASS_BIT+5,CLASS_BIT+3,CLASS_REGN0+(ARG_RD),CLASS_BIT+0,CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,115},
/* 0101 0011 ddN0 ssN0 address_src *** push @rd,address_src(rs) */
{
@@ -2534,7 +2623,7 @@ const opcode_entry_type z8k_table[] = {
"push @rd,address_src(rs)",16,14,0x00,
#endif
"push",OPC_push,0,{CLASS_IR+(ARG_RD),CLASS_X+(ARG_RS),},
- {CLASS_BIT+5,CLASS_BIT+3,CLASS_REGN0+(ARG_RD),CLASS_REGN0+(ARG_RS),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,107},
+ {CLASS_BIT+5,CLASS_BIT+3,CLASS_REGN0+(ARG_RD),CLASS_REGN0+(ARG_RS),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,115},
/* 0000 1101 ddN0 1001 imm16 *** push @rd,imm16 */
{
@@ -2542,7 +2631,7 @@ const opcode_entry_type z8k_table[] = {
"push @rd,imm16",16,12,0x00,
#endif
"push",OPC_push,0,{CLASS_IR+(ARG_RD),CLASS_IMM+(ARG_IMM16),},
- {CLASS_BIT+0,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_BIT+9,CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,107},
+ {CLASS_BIT+0,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_BIT+9,CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,115},
/* 1001 0011 ddN0 ssss *** push @rd,rs */
{
@@ -2550,7 +2639,7 @@ const opcode_entry_type z8k_table[] = {
"push @rd,rs",16,9,0x00,
#endif
"push",OPC_push,0,{CLASS_IR+(ARG_RD),CLASS_REG_WORD+(ARG_RS),},
- {CLASS_BIT+9,CLASS_BIT+3,CLASS_REGN0+(ARG_RD),CLASS_REG+(ARG_RS),0,0,0,0,0,},2,2,107},
+ {CLASS_BIT+9,CLASS_BIT+3,CLASS_REGN0+(ARG_RD),CLASS_REG+(ARG_RS),0,0,0,0,0,},2,2,115},
/* 0001 0001 ddN0 ssN0 *** pushl @rd,@rs */
{
@@ -2558,7 +2647,7 @@ const opcode_entry_type z8k_table[] = {
"pushl @rd,@rs",32,20,0x00,
#endif
"pushl",OPC_pushl,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),},
- {CLASS_BIT+1,CLASS_BIT+1,CLASS_REGN0+(ARG_RD),CLASS_REGN0+(ARG_RS),0,0,0,0,0,},2,2,108},
+ {CLASS_BIT+1,CLASS_BIT+1,CLASS_REGN0+(ARG_RD),CLASS_REGN0+(ARG_RS),0,0,0,0,0,},2,2,116},
/* 0101 0001 ddN0 0000 address_src *** pushl @rd,address_src */
{
@@ -2566,7 +2655,7 @@ const opcode_entry_type z8k_table[] = {
"pushl @rd,address_src",32,21,0x00,
#endif
"pushl",OPC_pushl,0,{CLASS_IR+(ARG_RD),CLASS_DA+(ARG_SRC),},
- {CLASS_BIT+5,CLASS_BIT+1,CLASS_REGN0+(ARG_RD),CLASS_BIT+0,CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,108},
+ {CLASS_BIT+5,CLASS_BIT+1,CLASS_REGN0+(ARG_RD),CLASS_BIT+0,CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,116},
/* 0101 0001 ddN0 ssN0 address_src *** pushl @rd,address_src(rs) */
{
@@ -2574,7 +2663,7 @@ const opcode_entry_type z8k_table[] = {
"pushl @rd,address_src(rs)",32,21,0x00,
#endif
"pushl",OPC_pushl,0,{CLASS_IR+(ARG_RD),CLASS_X+(ARG_RS),},
- {CLASS_BIT+5,CLASS_BIT+1,CLASS_REGN0+(ARG_RD),CLASS_REGN0+(ARG_RS),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,108},
+ {CLASS_BIT+5,CLASS_BIT+1,CLASS_REGN0+(ARG_RD),CLASS_REGN0+(ARG_RS),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,116},
/* 1001 0001 ddN0 ssss *** pushl @rd,rrs */
{
@@ -2582,7 +2671,7 @@ const opcode_entry_type z8k_table[] = {
"pushl @rd,rrs",32,12,0x00,
#endif
"pushl",OPC_pushl,0,{CLASS_IR+(ARG_RD),CLASS_REG_LONG+(ARG_RS),},
- {CLASS_BIT+9,CLASS_BIT+1,CLASS_REGN0+(ARG_RD),CLASS_REG+(ARG_RS),0,0,0,0,0,},2,2,108},
+ {CLASS_BIT+9,CLASS_BIT+1,CLASS_REGN0+(ARG_RD),CLASS_REG+(ARG_RS),0,0,0,0,0,},2,2,116},
/* 0010 0011 ddN0 imm4 *** res @rd,imm4 */
{
@@ -2590,7 +2679,7 @@ const opcode_entry_type z8k_table[] = {
"res @rd,imm4",16,11,0x00,
#endif
"res",OPC_res,0,{CLASS_IR+(ARG_RD),CLASS_IMM +(ARG_IMM4),},
- {CLASS_BIT+2,CLASS_BIT+3,CLASS_REGN0+(ARG_RD),CLASS_IMM+(ARG_IMM4),0,0,0,0,0,},2,2,109},
+ {CLASS_BIT+2,CLASS_BIT+3,CLASS_REGN0+(ARG_RD),CLASS_IMM+(ARG_IMM4),0,0,0,0,0,},2,2,117},
/* 0110 0011 ddN0 imm4 address_dst *** res address_dst(rd),imm4 */
{
@@ -2598,7 +2687,7 @@ const opcode_entry_type z8k_table[] = {
"res address_dst(rd),imm4",16,14,0x00,
#endif
"res",OPC_res,0,{CLASS_X+(ARG_RD),CLASS_IMM +(ARG_IMM4),},
- {CLASS_BIT+6,CLASS_BIT+3,CLASS_REGN0+(ARG_RD),CLASS_IMM+(ARG_IMM4),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,109},
+ {CLASS_BIT+6,CLASS_BIT+3,CLASS_REGN0+(ARG_RD),CLASS_IMM+(ARG_IMM4),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,117},
/* 0110 0011 0000 imm4 address_dst *** res address_dst,imm4 */
{
@@ -2606,7 +2695,7 @@ const opcode_entry_type z8k_table[] = {
"res address_dst,imm4",16,13,0x00,
#endif
"res",OPC_res,0,{CLASS_DA+(ARG_DST),CLASS_IMM +(ARG_IMM4),},
- {CLASS_BIT+6,CLASS_BIT+3,CLASS_BIT+0,CLASS_IMM+(ARG_IMM4),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,109},
+ {CLASS_BIT+6,CLASS_BIT+3,CLASS_BIT+0,CLASS_IMM+(ARG_IMM4),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,117},
/* 1010 0011 dddd imm4 *** res rd,imm4 */
{
@@ -2614,7 +2703,7 @@ const opcode_entry_type z8k_table[] = {
"res rd,imm4",16,4,0x00,
#endif
"res",OPC_res,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IMM +(ARG_IMM4),},
- {CLASS_BIT+0xa,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM4),0,0,0,0,0,},2,2,109},
+ {CLASS_BIT+0xa,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM4),0,0,0,0,0,},2,2,117},
/* 0010 0011 0000 ssss 0000 dddd 0000 0000 *** res rd,rs */
{
@@ -2622,7 +2711,7 @@ const opcode_entry_type z8k_table[] = {
"res rd,rs",16,10,0x00,
#endif
"res",OPC_res,0,{CLASS_REG_WORD+(ARG_RD),CLASS_REG_WORD+(ARG_RS),},
- {CLASS_BIT+2,CLASS_BIT+3,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,109},
+ {CLASS_BIT+2,CLASS_BIT+3,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,117},
/* 0010 0010 ddN0 imm4 *** resb @rd,imm4 */
{
@@ -2630,7 +2719,7 @@ const opcode_entry_type z8k_table[] = {
"resb @rd,imm4",8,11,0x00,
#endif
"resb",OPC_resb,0,{CLASS_IR+(ARG_RD),CLASS_IMM +(ARG_IMM4),},
- {CLASS_BIT+2,CLASS_BIT+2,CLASS_REGN0+(ARG_RD),CLASS_IMM+(ARG_IMM4),0,0,0,0,0,},2,2,110},
+ {CLASS_BIT+2,CLASS_BIT+2,CLASS_REGN0+(ARG_RD),CLASS_IMM+(ARG_IMM4),0,0,0,0,0,},2,2,118},
/* 0110 0010 ddN0 imm4 address_dst *** resb address_dst(rd),imm4 */
{
@@ -2638,7 +2727,7 @@ const opcode_entry_type z8k_table[] = {
"resb address_dst(rd),imm4",8,14,0x00,
#endif
"resb",OPC_resb,0,{CLASS_X+(ARG_RD),CLASS_IMM +(ARG_IMM4),},
- {CLASS_BIT+6,CLASS_BIT+2,CLASS_REGN0+(ARG_RD),CLASS_IMM+(ARG_IMM4),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,110},
+ {CLASS_BIT+6,CLASS_BIT+2,CLASS_REGN0+(ARG_RD),CLASS_IMM+(ARG_IMM4),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,118},
/* 0110 0010 0000 imm4 address_dst *** resb address_dst,imm4 */
{
@@ -2646,7 +2735,7 @@ const opcode_entry_type z8k_table[] = {
"resb address_dst,imm4",8,13,0x00,
#endif
"resb",OPC_resb,0,{CLASS_DA+(ARG_DST),CLASS_IMM +(ARG_IMM4),},
- {CLASS_BIT+6,CLASS_BIT+2,CLASS_BIT+0,CLASS_IMM+(ARG_IMM4),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,110},
+ {CLASS_BIT+6,CLASS_BIT+2,CLASS_BIT+0,CLASS_IMM+(ARG_IMM4),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,118},
/* 1010 0010 dddd imm4 *** resb rbd,imm4 */
{
@@ -2654,7 +2743,7 @@ const opcode_entry_type z8k_table[] = {
"resb rbd,imm4",8,4,0x00,
#endif
"resb",OPC_resb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IMM +(ARG_IMM4),},
- {CLASS_BIT+0xa,CLASS_BIT+2,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM4),0,0,0,0,0,},2,2,110},
+ {CLASS_BIT+0xa,CLASS_BIT+2,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM4),0,0,0,0,0,},2,2,118},
/* 0010 0010 0000 ssss 0000 dddd 0000 0000 *** resb rbd,rs */
{
@@ -2662,7 +2751,7 @@ const opcode_entry_type z8k_table[] = {
"resb rbd,rs",8,10,0x00,
#endif
"resb",OPC_resb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_REG_WORD+(ARG_RS),},
- {CLASS_BIT+2,CLASS_BIT+2,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,110},
+ {CLASS_BIT+2,CLASS_BIT+2,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,118},
/* 1000 1101 flags 0011 *** resflg flags */
{
@@ -2670,7 +2759,7 @@ const opcode_entry_type z8k_table[] = {
"resflg flags",16,7,0x3c,
#endif
"resflg",OPC_resflg,0,{CLASS_FLAGS,},
- {CLASS_BIT+8,CLASS_BIT+0xd,CLASS_FLAGS,CLASS_BIT+3,0,0,0,0,0,},1,2,111},
+ {CLASS_BIT+8,CLASS_BIT+0xd,CLASS_FLAGS,CLASS_BIT+3,0,0,0,0,0,},1,2,119},
/* 1001 1110 0000 cccc *** ret cc */
{
@@ -2678,7 +2767,7 @@ const opcode_entry_type z8k_table[] = {
"ret cc",16,10,0x00,
#endif
"ret",OPC_ret,0,{CLASS_CC,},
- {CLASS_BIT+9,CLASS_BIT+0xe,CLASS_BIT+0,CLASS_CC,0,0,0,0,0,},1,2,112},
+ {CLASS_BIT+9,CLASS_BIT+0xe,CLASS_BIT+0,CLASS_CC,0,0,0,0,0,},1,2,120},
/* 1011 0011 dddd 00I0 *** rl rd,imm1or2 */
{
@@ -2686,7 +2775,7 @@ const opcode_entry_type z8k_table[] = {
"rl rd,imm1or2",16,6,0x3c,
#endif
"rl",OPC_rl,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IMM+(ARG_IMM1OR2),},
- {CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT_1OR2+0,0,0,0,0,0,},2,2,113},
+ {CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT_1OR2+0,0,0,0,0,0,},2,2,121},
/* 1011 0010 dddd 00I0 *** rlb rbd,imm1or2 */
{
@@ -2694,7 +2783,7 @@ const opcode_entry_type z8k_table[] = {
"rlb rbd,imm1or2",8,6,0x3c,
#endif
"rlb",OPC_rlb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IMM+(ARG_IMM1OR2),},
- {CLASS_BIT+0xb,CLASS_BIT+2,CLASS_REG+(ARG_RD),CLASS_BIT_1OR2+0,0,0,0,0,0,},2,2,114},
+ {CLASS_BIT+0xb,CLASS_BIT+2,CLASS_REG+(ARG_RD),CLASS_BIT_1OR2+0,0,0,0,0,0,},2,2,122},
/* 1011 0011 dddd 10I0 *** rlc rd,imm1or2 */
{
@@ -2702,7 +2791,7 @@ const opcode_entry_type z8k_table[] = {
"rlc rd,imm1or2",16,6,0x3c,
#endif
"rlc",OPC_rlc,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IMM+(ARG_IMM1OR2),},
- {CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT_1OR2+8,0,0,0,0,0,},2,2,115},
+ {CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT_1OR2+8,0,0,0,0,0,},2,2,123},
/* 1011 0010 dddd 10I0 *** rlcb rbd,imm1or2 */
{
@@ -2710,7 +2799,7 @@ const opcode_entry_type z8k_table[] = {
"rlcb rbd,imm1or2",8,9,0x10,
#endif
"rlcb",OPC_rlcb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IMM+(ARG_IMM1OR2),},
- {CLASS_BIT+0xb,CLASS_BIT+2,CLASS_REG+(ARG_RD),CLASS_BIT_1OR2+8,0,0,0,0,0,},2,2,116},
+ {CLASS_BIT+0xb,CLASS_BIT+2,CLASS_REG+(ARG_RD),CLASS_BIT_1OR2+8,0,0,0,0,0,},2,2,124},
/* 1011 1110 aaaa bbbb *** rldb rbb,rba */
{
@@ -2718,7 +2807,7 @@ const opcode_entry_type z8k_table[] = {
"rldb rbb,rba",8,9,0x10,
#endif
"rldb",OPC_rldb,0,{CLASS_REG_BYTE+(ARG_RB),CLASS_REG_BYTE+(ARG_RA),},
- {CLASS_BIT+0xb,CLASS_BIT+0xe,CLASS_REG+(ARG_RA),CLASS_REG+(ARG_RB),0,0,0,0,0,},2,2,117},
+ {CLASS_BIT+0xb,CLASS_BIT+0xe,CLASS_REG+(ARG_RA),CLASS_REG+(ARG_RB),0,0,0,0,0,},2,2,125},
/* 1011 0011 dddd 01I0 *** rr rd,imm1or2 */
{
@@ -2726,7 +2815,7 @@ const opcode_entry_type z8k_table[] = {
"rr rd,imm1or2",16,6,0x3c,
#endif
"rr",OPC_rr,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IMM+(ARG_IMM1OR2),},
- {CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT_1OR2+4,0,0,0,0,0,},2,2,118},
+ {CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT_1OR2+4,0,0,0,0,0,},2,2,126},
/* 1011 0010 dddd 01I0 *** rrb rbd,imm1or2 */
{
@@ -2734,7 +2823,7 @@ const opcode_entry_type z8k_table[] = {
"rrb rbd,imm1or2",8,6,0x3c,
#endif
"rrb",OPC_rrb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IMM+(ARG_IMM1OR2),},
- {CLASS_BIT+0xb,CLASS_BIT+2,CLASS_REG+(ARG_RD),CLASS_BIT_1OR2+4,0,0,0,0,0,},2,2,119},
+ {CLASS_BIT+0xb,CLASS_BIT+2,CLASS_REG+(ARG_RD),CLASS_BIT_1OR2+4,0,0,0,0,0,},2,2,127},
/* 1011 0011 dddd 11I0 *** rrc rd,imm1or2 */
{
@@ -2742,7 +2831,7 @@ const opcode_entry_type z8k_table[] = {
"rrc rd,imm1or2",16,6,0x3c,
#endif
"rrc",OPC_rrc,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IMM+(ARG_IMM1OR2),},
- {CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT_1OR2+0xc,0,0,0,0,0,},2,2,120},
+ {CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT_1OR2+0xc,0,0,0,0,0,},2,2,128},
/* 1011 0010 dddd 11I0 *** rrcb rbd,imm1or2 */
{
@@ -2750,7 +2839,7 @@ const opcode_entry_type z8k_table[] = {
"rrcb rbd,imm1or2",8,9,0x10,
#endif
"rrcb",OPC_rrcb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IMM+(ARG_IMM1OR2),},
- {CLASS_BIT+0xb,CLASS_BIT+2,CLASS_REG+(ARG_RD),CLASS_BIT_1OR2+0xc,0,0,0,0,0,},2,2,121},
+ {CLASS_BIT+0xb,CLASS_BIT+2,CLASS_REG+(ARG_RD),CLASS_BIT_1OR2+0xc,0,0,0,0,0,},2,2,129},
/* 1011 1100 aaaa bbbb *** rrdb rbb,rba */
{
@@ -2758,7 +2847,7 @@ const opcode_entry_type z8k_table[] = {
"rrdb rbb,rba",8,9,0x10,
#endif
"rrdb",OPC_rrdb,0,{CLASS_REG_BYTE+(ARG_RB),CLASS_REG_BYTE+(ARG_RA),},
- {CLASS_BIT+0xb,CLASS_BIT+0xc,CLASS_REG+(ARG_RA),CLASS_REG+(ARG_RB),0,0,0,0,0,},2,2,122},
+ {CLASS_BIT+0xb,CLASS_BIT+0xc,CLASS_REG+(ARG_RA),CLASS_REG+(ARG_RB),0,0,0,0,0,},2,2,130},
/* 0011 0110 imm8 *** rsvd36 */
{
@@ -2766,7 +2855,7 @@ const opcode_entry_type z8k_table[] = {
"rsvd36",8,10,0x00,
#endif
"rsvd36",OPC_rsvd36,0,{0},
- {CLASS_BIT+3,CLASS_BIT+6,CLASS_IMM+(ARG_IMM8),0,0,0,0,0,0,},0,2,123},
+ {CLASS_BIT+3,CLASS_BIT+6,CLASS_IMM+(ARG_IMM8),0,0,0,0,0,0,},0,2,131},
/* 0011 1000 imm8 *** rsvd38 */
{
@@ -2774,7 +2863,7 @@ const opcode_entry_type z8k_table[] = {
"rsvd38",8,10,0x00,
#endif
"rsvd38",OPC_rsvd38,0,{0},
- {CLASS_BIT+3,CLASS_BIT+8,CLASS_IMM+(ARG_IMM8),0,0,0,0,0,0,},0,2,124},
+ {CLASS_BIT+3,CLASS_BIT+8,CLASS_IMM+(ARG_IMM8),0,0,0,0,0,0,},0,2,132},
/* 0111 1000 imm8 *** rsvd78 */
{
@@ -2782,7 +2871,7 @@ const opcode_entry_type z8k_table[] = {
"rsvd78",8,10,0x00,
#endif
"rsvd78",OPC_rsvd78,0,{0},
- {CLASS_BIT+7,CLASS_BIT+8,CLASS_IMM+(ARG_IMM8),0,0,0,0,0,0,},0,2,125},
+ {CLASS_BIT+7,CLASS_BIT+8,CLASS_IMM+(ARG_IMM8),0,0,0,0,0,0,},0,2,133},
/* 0111 1110 imm8 *** rsvd7e */
{
@@ -2790,7 +2879,7 @@ const opcode_entry_type z8k_table[] = {
"rsvd7e",8,10,0x00,
#endif
"rsvd7e",OPC_rsvd7e,0,{0},
- {CLASS_BIT+7,CLASS_BIT+0xe,CLASS_IMM+(ARG_IMM8),0,0,0,0,0,0,},0,2,126},
+ {CLASS_BIT+7,CLASS_BIT+0xe,CLASS_IMM+(ARG_IMM8),0,0,0,0,0,0,},0,2,134},
/* 1001 1101 imm8 *** rsvd9d */
{
@@ -2798,7 +2887,7 @@ const opcode_entry_type z8k_table[] = {
"rsvd9d",8,10,0x00,
#endif
"rsvd9d",OPC_rsvd9d,0,{0},
- {CLASS_BIT+9,CLASS_BIT+0xd,CLASS_IMM+(ARG_IMM8),0,0,0,0,0,0,},0,2,127},
+ {CLASS_BIT+9,CLASS_BIT+0xd,CLASS_IMM+(ARG_IMM8),0,0,0,0,0,0,},0,2,135},
/* 1001 1111 imm8 *** rsvd9f */
{
@@ -2806,7 +2895,7 @@ const opcode_entry_type z8k_table[] = {
"rsvd9f",8,10,0x00,
#endif
"rsvd9f",OPC_rsvd9f,0,{0},
- {CLASS_BIT+9,CLASS_BIT+0xf,CLASS_IMM+(ARG_IMM8),0,0,0,0,0,0,},0,2,128},
+ {CLASS_BIT+9,CLASS_BIT+0xf,CLASS_IMM+(ARG_IMM8),0,0,0,0,0,0,},0,2,136},
/* 1011 1001 imm8 *** rsvdb9 */
{
@@ -2814,7 +2903,7 @@ const opcode_entry_type z8k_table[] = {
"rsvdb9",8,10,0x00,
#endif
"rsvdb9",OPC_rsvdb9,0,{0},
- {CLASS_BIT+0xb,CLASS_BIT+9,CLASS_IMM+(ARG_IMM8),0,0,0,0,0,0,},0,2,129},
+ {CLASS_BIT+0xb,CLASS_BIT+9,CLASS_IMM+(ARG_IMM8),0,0,0,0,0,0,},0,2,137},
/* 1011 1111 imm8 *** rsvdbf */
{
@@ -2822,7 +2911,7 @@ const opcode_entry_type z8k_table[] = {
"rsvdbf",8,10,0x00,
#endif
"rsvdbf",OPC_rsvdbf,0,{0},
- {CLASS_BIT+0xb,CLASS_BIT+0xf,CLASS_IMM+(ARG_IMM8),0,0,0,0,0,0,},0,2,130},
+ {CLASS_BIT+0xb,CLASS_BIT+0xf,CLASS_IMM+(ARG_IMM8),0,0,0,0,0,0,},0,2,138},
/* 1011 0111 ssss dddd *** sbc rd,rs */
{
@@ -2830,7 +2919,7 @@ const opcode_entry_type z8k_table[] = {
"sbc rd,rs",16,5,0x3c,
#endif
"sbc",OPC_sbc,0,{CLASS_REG_WORD+(ARG_RD),CLASS_REG_WORD+(ARG_RS),},
- {CLASS_BIT+0xb,CLASS_BIT+7,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,131},
+ {CLASS_BIT+0xb,CLASS_BIT+7,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,139},
/* 1011 0110 ssss dddd *** sbcb rbd,rbs */
{
@@ -2838,7 +2927,7 @@ const opcode_entry_type z8k_table[] = {
"sbcb rbd,rbs",8,5,0x3f,
#endif
"sbcb",OPC_sbcb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_REG_BYTE+(ARG_RS),},
- {CLASS_BIT+0xb,CLASS_BIT+6,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,132},
+ {CLASS_BIT+0xb,CLASS_BIT+6,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,140},
/* 0111 1111 imm8 *** sc imm8 */
{
@@ -2846,7 +2935,7 @@ const opcode_entry_type z8k_table[] = {
"sc imm8",8,33,0x3f,
#endif
"sc",OPC_sc,0,{CLASS_IMM+(ARG_IMM8),},
- {CLASS_BIT+7,CLASS_BIT+0xf,CLASS_IMM+(ARG_IMM8),0,0,0,0,0,0,},1,2,133},
+ {CLASS_BIT+7,CLASS_BIT+0xf,CLASS_IMM+(ARG_IMM8),0,0,0,0,0,0,},1,2,141},
/* 1011 0011 dddd 1011 0000 ssss 0000 0000 *** sda rd,rs */
{
@@ -2854,7 +2943,7 @@ const opcode_entry_type z8k_table[] = {
"sda rd,rs",16,15,0x3c,
#endif
"sda",OPC_sda,0,{CLASS_REG_WORD+(ARG_RD),CLASS_REG_WORD+(ARG_RS),},
- {CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT+0xb,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,134},
+ {CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT+0xb,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,142},
/* 1011 0010 dddd 1011 0000 ssss 0000 0000 *** sdab rbd,rs */
{
@@ -2862,7 +2951,7 @@ const opcode_entry_type z8k_table[] = {
"sdab rbd,rs",8,15,0x3c,
#endif
"sdab",OPC_sdab,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_REG_WORD+(ARG_RS),},
- {CLASS_BIT+0xb,CLASS_BIT+2,CLASS_REG+(ARG_RD),CLASS_BIT+0xb,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,135},
+ {CLASS_BIT+0xb,CLASS_BIT+2,CLASS_REG+(ARG_RD),CLASS_BIT+0xb,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,143},
/* 1011 0011 dddd 1111 0000 ssss 0000 0000 *** sdal rrd,rs */
{
@@ -2870,7 +2959,7 @@ const opcode_entry_type z8k_table[] = {
"sdal rrd,rs",32,15,0x3c,
#endif
"sdal",OPC_sdal,0,{CLASS_REG_LONG+(ARG_RD),CLASS_REG_WORD+(ARG_RS),},
- {CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT+0xf,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,136},
+ {CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT+0xf,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,144},
/* 1011 0011 dddd 0011 0000 ssss 0000 0000 *** sdl rd,rs */
{
@@ -2878,7 +2967,7 @@ const opcode_entry_type z8k_table[] = {
"sdl rd,rs",16,15,0x38,
#endif
"sdl",OPC_sdl,0,{CLASS_REG_WORD+(ARG_RD),CLASS_REG_WORD+(ARG_RS),},
- {CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT+3,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,137},
+ {CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT+3,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,145},
/* 1011 0010 dddd 0011 0000 ssss 0000 0000 *** sdlb rbd,rs */
{
@@ -2886,7 +2975,7 @@ const opcode_entry_type z8k_table[] = {
"sdlb rbd,rs",8,15,0x38,
#endif
"sdlb",OPC_sdlb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_REG_WORD+(ARG_RS),},
- {CLASS_BIT+0xb,CLASS_BIT+2,CLASS_REG+(ARG_RD),CLASS_BIT+3,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,138},
+ {CLASS_BIT+0xb,CLASS_BIT+2,CLASS_REG+(ARG_RD),CLASS_BIT+3,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,146},
/* 1011 0011 dddd 0111 0000 ssss 0000 0000 *** sdll rrd,rs */
{
@@ -2894,7 +2983,7 @@ const opcode_entry_type z8k_table[] = {
"sdll rrd,rs",32,15,0x38,
#endif
"sdll",OPC_sdll,0,{CLASS_REG_LONG+(ARG_RD),CLASS_REG_WORD+(ARG_RS),},
- {CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT+7,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,139},
+ {CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT+7,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,147},
/* 0010 0101 ddN0 imm4 *** set @rd,imm4 */
{
@@ -2902,7 +2991,7 @@ const opcode_entry_type z8k_table[] = {
"set @rd,imm4",16,11,0x00,
#endif
"set",OPC_set,0,{CLASS_IR+(ARG_RD),CLASS_IMM +(ARG_IMM4),},
- {CLASS_BIT+2,CLASS_BIT+5,CLASS_REGN0+(ARG_RD),CLASS_IMM+(ARG_IMM4),0,0,0,0,0,},2,2,140},
+ {CLASS_BIT+2,CLASS_BIT+5,CLASS_REGN0+(ARG_RD),CLASS_IMM+(ARG_IMM4),0,0,0,0,0,},2,2,148},
/* 0110 0101 ddN0 imm4 address_dst *** set address_dst(rd),imm4 */
{
@@ -2910,7 +2999,7 @@ const opcode_entry_type z8k_table[] = {
"set address_dst(rd),imm4",16,14,0x00,
#endif
"set",OPC_set,0,{CLASS_X+(ARG_RD),CLASS_IMM +(ARG_IMM4),},
- {CLASS_BIT+6,CLASS_BIT+5,CLASS_REGN0+(ARG_RD),CLASS_IMM+(ARG_IMM4),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,140},
+ {CLASS_BIT+6,CLASS_BIT+5,CLASS_REGN0+(ARG_RD),CLASS_IMM+(ARG_IMM4),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,148},
/* 0110 0101 0000 imm4 address_dst *** set address_dst,imm4 */
{
@@ -2918,7 +3007,7 @@ const opcode_entry_type z8k_table[] = {
"set address_dst,imm4",16,13,0x00,
#endif
"set",OPC_set,0,{CLASS_DA+(ARG_DST),CLASS_IMM +(ARG_IMM4),},
- {CLASS_BIT+6,CLASS_BIT+5,CLASS_BIT+0,CLASS_IMM+(ARG_IMM4),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,140},
+ {CLASS_BIT+6,CLASS_BIT+5,CLASS_BIT+0,CLASS_IMM+(ARG_IMM4),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,148},
/* 1010 0101 dddd imm4 *** set rd,imm4 */
{
@@ -2926,7 +3015,7 @@ const opcode_entry_type z8k_table[] = {
"set rd,imm4",16,4,0x00,
#endif
"set",OPC_set,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IMM +(ARG_IMM4),},
- {CLASS_BIT+0xa,CLASS_BIT+5,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM4),0,0,0,0,0,},2,2,140},
+ {CLASS_BIT+0xa,CLASS_BIT+5,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM4),0,0,0,0,0,},2,2,148},
/* 0010 0101 0000 ssss 0000 dddd 0000 0000 *** set rd,rs */
{
@@ -2934,7 +3023,7 @@ const opcode_entry_type z8k_table[] = {
"set rd,rs",16,10,0x00,
#endif
"set",OPC_set,0,{CLASS_REG_WORD+(ARG_RD),CLASS_REG_WORD+(ARG_RS),},
- {CLASS_BIT+2,CLASS_BIT+5,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,140},
+ {CLASS_BIT+2,CLASS_BIT+5,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,148},
/* 0010 0100 ddN0 imm4 *** setb @rd,imm4 */
{
@@ -2942,7 +3031,7 @@ const opcode_entry_type z8k_table[] = {
"setb @rd,imm4",8,11,0x00,
#endif
"setb",OPC_setb,0,{CLASS_IR+(ARG_RD),CLASS_IMM +(ARG_IMM4),},
- {CLASS_BIT+2,CLASS_BIT+4,CLASS_REGN0+(ARG_RD),CLASS_IMM+(ARG_IMM4),0,0,0,0,0,},2,2,141},
+ {CLASS_BIT+2,CLASS_BIT+4,CLASS_REGN0+(ARG_RD),CLASS_IMM+(ARG_IMM4),0,0,0,0,0,},2,2,149},
/* 0110 0100 ddN0 imm4 address_dst *** setb address_dst(rd),imm4 */
{
@@ -2950,7 +3039,7 @@ const opcode_entry_type z8k_table[] = {
"setb address_dst(rd),imm4",8,14,0x00,
#endif
"setb",OPC_setb,0,{CLASS_X+(ARG_RD),CLASS_IMM +(ARG_IMM4),},
- {CLASS_BIT+6,CLASS_BIT+4,CLASS_REGN0+(ARG_RD),CLASS_IMM+(ARG_IMM4),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,141},
+ {CLASS_BIT+6,CLASS_BIT+4,CLASS_REGN0+(ARG_RD),CLASS_IMM+(ARG_IMM4),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,149},
/* 0110 0100 0000 imm4 address_dst *** setb address_dst,imm4 */
{
@@ -2958,7 +3047,7 @@ const opcode_entry_type z8k_table[] = {
"setb address_dst,imm4",8,13,0x00,
#endif
"setb",OPC_setb,0,{CLASS_DA+(ARG_DST),CLASS_IMM +(ARG_IMM4),},
- {CLASS_BIT+6,CLASS_BIT+4,CLASS_BIT+0,CLASS_IMM+(ARG_IMM4),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,141},
+ {CLASS_BIT+6,CLASS_BIT+4,CLASS_BIT+0,CLASS_IMM+(ARG_IMM4),CLASS_ADDRESS+(ARG_DST),0,0,0,0,},2,4,149},
/* 1010 0100 dddd imm4 *** setb rbd,imm4 */
{
@@ -2966,7 +3055,7 @@ const opcode_entry_type z8k_table[] = {
"setb rbd,imm4",8,4,0x00,
#endif
"setb",OPC_setb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IMM +(ARG_IMM4),},
- {CLASS_BIT+0xa,CLASS_BIT+4,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM4),0,0,0,0,0,},2,2,141},
+ {CLASS_BIT+0xa,CLASS_BIT+4,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM4),0,0,0,0,0,},2,2,149},
/* 0010 0100 0000 ssss 0000 dddd 0000 0000 *** setb rbd,rs */
{
@@ -2974,7 +3063,7 @@ const opcode_entry_type z8k_table[] = {
"setb rbd,rs",8,10,0x00,
#endif
"setb",OPC_setb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_REG_WORD+(ARG_RS),},
- {CLASS_BIT+2,CLASS_BIT+4,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,141},
+ {CLASS_BIT+2,CLASS_BIT+4,CLASS_BIT+0,CLASS_REG+(ARG_RS),CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_BIT+0,CLASS_BIT+0,0,},2,4,149},
/* 1000 1101 flags 0001 *** setflg flags */
{
@@ -2982,55 +3071,87 @@ const opcode_entry_type z8k_table[] = {
"setflg flags",16,7,0x3c,
#endif
"setflg",OPC_setflg,0,{CLASS_FLAGS,},
- {CLASS_BIT+8,CLASS_BIT+0xd,CLASS_FLAGS,CLASS_BIT+1,0,0,0,0,0,},1,2,142},
+ {CLASS_BIT+8,CLASS_BIT+0xd,CLASS_FLAGS,CLASS_BIT+1,0,0,0,0,0,},1,2,150},
/* 0011 1011 dddd 0101 imm16 *** sin rd,imm16 */
{
#ifdef NICENAMES
-"sin rd,imm16",8,0,0x00,
+"sin rd,imm16",16,12,0x00,
#endif
"sin",OPC_sin,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IMM+(ARG_IMM16),},
- {CLASS_BIT+3,CLASS_BIT+0xb,CLASS_REG+(ARG_RD),CLASS_BIT+5,CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,143},
+ {CLASS_BIT+3,CLASS_BIT+0xb,CLASS_REG+(ARG_RD),CLASS_BIT+5,CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,151},
/* 0011 1010 dddd 0101 imm16 *** sinb rbd,imm16 */
{
#ifdef NICENAMES
-"sinb rbd,imm16",8,0,0x00,
+"sinb rbd,imm16",8,10,0x00,
#endif
"sinb",OPC_sinb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IMM+(ARG_IMM16),},
- {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REG+(ARG_RD),CLASS_BIT+5,CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,144},
+ {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REG+(ARG_RD),CLASS_BIT+5,CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,152},
+
+/* 0011 1011 ssss 1001 0000 aaaa ddN0 1000 *** sind @rd,@ri,ra */
+{
+#ifdef NICENAMES
+"sind @rd,@ri,ra",16,21,0x04,
+#endif
+"sind",OPC_sind,0,{CLASS_IR+(ARG_RD),CLASS_IRO+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
+ {CLASS_BIT+3,CLASS_BIT+0xb,CLASS_REG+(ARG_RS),CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,},3,4,153},
+
+/* 0011 1010 ssss 1001 0000 aaaa ddN0 1000 *** sindb @rd,@ri,ra */
+{
+#ifdef NICENAMES
+"sindb @rd,@ri,ra",8,21,0x04,
+#endif
+"sindb",OPC_sindb,0,{CLASS_IR+(ARG_RD),CLASS_IRO+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
+ {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REG+(ARG_RS),CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,},3,4,154},
+
+/* 0011 1011 ssss 1001 0000 aaaa ddN0 0000 *** sindr @rd,@ri,ra */
+{
+#ifdef NICENAMES
+"sindr @rd,@ri,ra",16,11,0x04,
+#endif
+"sindr",OPC_sindr,0,{CLASS_IR+(ARG_RD),CLASS_IRO+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
+ {CLASS_BIT+3,CLASS_BIT+0xb,CLASS_REG+(ARG_RS),CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RD),CLASS_BIT+0,0,},3,4,155},
+
+/* 0011 1010 ssss 1001 0000 aaaa ddN0 0000 *** sindrb @rd,@ri,ra */
+{
+#ifdef NICENAMES
+"sindrb @rd,@ri,ra",8,11,0x04,
+#endif
+"sindrb",OPC_sindrb,0,{CLASS_IR+(ARG_RD),CLASS_IRO+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
+ {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REG+(ARG_RS),CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RD),CLASS_BIT+0,0,},3,4,156},
-/* 0011 1011 ssN0 1000 0001 aaaa ddN0 1000 *** sind @rd,@rs,ra */
+/* 0011 1011 ssss 0001 0000 aaaa ddN0 1000 *** sini @rd,@ri,ra */
{
#ifdef NICENAMES
-"sind @rd,@rs,ra",16,0,0x00,
+"sini @rd,@ri,ra",16,21,0x04,
#endif
-"sind",OPC_sind,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
- {CLASS_BIT+3,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+8,CLASS_BIT+1,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,},3,4,145},
+"sini",OPC_sini,0,{CLASS_IR+(ARG_RD),CLASS_IRO+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
+ {CLASS_BIT+3,CLASS_BIT+0xb,CLASS_REG+(ARG_RS),CLASS_BIT+1,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,},3,4,157},
-/* 0011 1010 ssN0 1000 0001 aaaa ddN0 1000 *** sindb @rd,@rs,rba */
+/* 0011 1010 ssss 0001 0000 aaaa ddN0 1000 *** sinib @rd,@ri,ra */
{
#ifdef NICENAMES
-"sindb @rd,@rs,rba",8,0,0x00,
+"sinib @rd,@ri,ra",8,21,0x04,
#endif
-"sindb",OPC_sindb,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_BYTE+(ARG_RA),},
- {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+8,CLASS_BIT+1,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,},3,4,146},
+"sinib",OPC_sinib,0,{CLASS_IR+(ARG_RD),CLASS_IRO+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
+ {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REG+(ARG_RS),CLASS_BIT+1,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,},3,4,158},
-/* 0011 1010 ssN0 0001 0000 aaaa ddN0 1000 *** sinib @rd,@rs,ra */
+/* 0011 1011 ssss 0001 0000 aaaa ddN0 0000 *** sinir @rd,@ri,ra */
{
#ifdef NICENAMES
-"sinib @rd,@rs,ra",8,0,0x00,
+"sinir @rd,@ri,ra",16,11,0x04,
#endif
-"sinib",OPC_sinib,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
- {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+1,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,},3,4,147},
+"sinir",OPC_sinir,0,{CLASS_IR+(ARG_RD),CLASS_IRO+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
+ {CLASS_BIT+3,CLASS_BIT+0xb,CLASS_REG+(ARG_RS),CLASS_BIT+1,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RD),CLASS_BIT+0,0,},3,4,159},
-/* 0011 1010 ssN0 0001 0000 aaaa ddN0 0000 *** sinibr @rd,@rs,ra */
+/* 0011 1010 ssss 0001 0000 aaaa ddN0 0000 *** sinirb @rd,@ri,ra */
{
#ifdef NICENAMES
-"sinibr @rd,@rs,ra",16,0,0x00,
+"sinirb @rd,@ri,ra",8,11,0x04,
#endif
-"sinibr",OPC_sinibr,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
- {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+1,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RD),CLASS_BIT+0,0,},3,4,148},
+"sinirb",OPC_sinirb,0,{CLASS_IR+(ARG_RD),CLASS_IRO+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
+ {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REG+(ARG_RS),CLASS_BIT+1,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RD),CLASS_BIT+0,0,},3,4,160},
/* 1011 0011 dddd 1001 0000 0000 imm8 *** sla rd,imm8 */
{
@@ -3038,7 +3159,7 @@ const opcode_entry_type z8k_table[] = {
"sla rd,imm8",16,13,0x3c,
#endif
"sla",OPC_sla,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IMM+(ARG_IMM8),},
- {CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT+9,CLASS_BIT+0,CLASS_BIT+0,CLASS_IMM+(ARG_IMM8),0,0,},2,4,149},
+ {CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT+9,CLASS_BIT+0,CLASS_BIT+0,CLASS_IMM+(ARG_IMM8),0,0,},2,4,161},
/* 1011 0010 dddd 1001 iiii iiii 0000 imm4 *** slab rbd,imm4 */
{
@@ -3046,7 +3167,7 @@ const opcode_entry_type z8k_table[] = {
"slab rbd,imm4",8,13,0x3c,
#endif
"slab",OPC_slab,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IMM +(ARG_IMM4),},
- {CLASS_BIT+0xb,CLASS_BIT+2,CLASS_REG+(ARG_RD),CLASS_BIT+9,CLASS_IGNORE,CLASS_IGNORE,CLASS_BIT+0,CLASS_IMM+(ARG_IMM4),0,},2,4,150},
+ {CLASS_BIT+0xb,CLASS_BIT+2,CLASS_REG+(ARG_RD),CLASS_BIT+9,CLASS_IGNORE,CLASS_IGNORE,CLASS_BIT+0,CLASS_IMM+(ARG_IMM4),0,},2,4,162},
/* 1011 0011 dddd 1101 0000 0000 imm8 *** slal rrd,imm8 */
{
@@ -3054,7 +3175,7 @@ const opcode_entry_type z8k_table[] = {
"slal rrd,imm8",32,13,0x3c,
#endif
"slal",OPC_slal,0,{CLASS_REG_LONG+(ARG_RD),CLASS_IMM+(ARG_IMM8),},
- {CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT+0xd,CLASS_BIT+0,CLASS_BIT+0,CLASS_IMM+(ARG_IMM8),0,0,},2,4,151},
+ {CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT+0xd,CLASS_BIT+0,CLASS_BIT+0,CLASS_IMM+(ARG_IMM8),0,0,},2,4,163},
/* 1011 0011 dddd 0001 0000 0000 imm8 *** sll rd,imm8 */
{
@@ -3062,7 +3183,7 @@ const opcode_entry_type z8k_table[] = {
"sll rd,imm8",16,13,0x38,
#endif
"sll",OPC_sll,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IMM+(ARG_IMM8),},
- {CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT+1,CLASS_BIT+0,CLASS_BIT+0,CLASS_IMM+(ARG_IMM8),0,0,},2,4,152},
+ {CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT+1,CLASS_BIT+0,CLASS_BIT+0,CLASS_IMM+(ARG_IMM8),0,0,},2,4,164},
/* 1011 0010 dddd 0001 iiii iiii 0000 imm4 *** sllb rbd,imm4 */
{
@@ -3070,7 +3191,7 @@ const opcode_entry_type z8k_table[] = {
"sllb rbd,imm4",8,13,0x38,
#endif
"sllb",OPC_sllb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IMM +(ARG_IMM4),},
- {CLASS_BIT+0xb,CLASS_BIT+2,CLASS_REG+(ARG_RD),CLASS_BIT+1,CLASS_IGNORE,CLASS_IGNORE,CLASS_BIT+0,CLASS_IMM+(ARG_IMM4),0,},2,4,153},
+ {CLASS_BIT+0xb,CLASS_BIT+2,CLASS_REG+(ARG_RD),CLASS_BIT+1,CLASS_IGNORE,CLASS_IGNORE,CLASS_BIT+0,CLASS_IMM+(ARG_IMM4),0,},2,4,165},
/* 1011 0011 dddd 0101 0000 0000 imm8 *** slll rrd,imm8 */
{
@@ -3078,55 +3199,87 @@ const opcode_entry_type z8k_table[] = {
"slll rrd,imm8",32,13,0x38,
#endif
"slll",OPC_slll,0,{CLASS_REG_LONG+(ARG_RD),CLASS_IMM+(ARG_IMM8),},
- {CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT+5,CLASS_BIT+0,CLASS_BIT+0,CLASS_IMM+(ARG_IMM8),0,0,},2,4,154},
+ {CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT+5,CLASS_BIT+0,CLASS_BIT+0,CLASS_IMM+(ARG_IMM8),0,0,},2,4,166},
+
+/* 0011 1011 ssN0 1011 0000 aaaa dddd 0000 *** sotdr @ro,@rs,ra */
+{
+#ifdef NICENAMES
+"sotdr @ro,@rs,ra",16,11,0x04,
+#endif
+"sotdr",OPC_sotdr,0,{CLASS_IRO+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
+ {CLASS_BIT+3,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+0xb,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REG+(ARG_RD),CLASS_BIT+0,0,},3,4,167},
+
+/* 0011 1010 ssN0 1011 0000 aaaa dddd 0000 *** sotdrb @ro,@rs,ra */
+{
+#ifdef NICENAMES
+"sotdrb @ro,@rs,ra",8,11,0x04,
+#endif
+"sotdrb",OPC_sotdrb,0,{CLASS_IRO+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
+ {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+0xb,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REG+(ARG_RD),CLASS_BIT+0,0,},3,4,168},
+
+/* 0011 1011 ssN0 0011 0000 aaaa dddd 0000 *** sotir @ro,@rs,ra */
+{
+#ifdef NICENAMES
+"sotir @ro,@rs,ra",16,11,0x04,
+#endif
+"sotir",OPC_sotir,0,{CLASS_IRO+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
+ {CLASS_BIT+3,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+3,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REG+(ARG_RD),CLASS_BIT+0,0,},3,4,169},
+
+/* 0011 1010 ssN0 0011 0000 aaaa dddd 0000 *** sotirb @ro,@rs,ra */
+{
+#ifdef NICENAMES
+"sotirb @ro,@rs,ra",8,11,0x04,
+#endif
+"sotirb",OPC_sotirb,0,{CLASS_IRO+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
+ {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+3,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REG+(ARG_RD),CLASS_BIT+0,0,},3,4,170},
-/* 0011 1011 ssss 0111 imm16 *** sout imm16,rs */
+/* 0011 1011 ssss 0110 imm16 *** sout imm16,rs */
{
#ifdef NICENAMES
-"sout imm16,rs",16,0,0x00,
+"sout imm16,rs",16,12,0x00,
#endif
"sout",OPC_sout,0,{CLASS_IMM+(ARG_IMM16),CLASS_REG_WORD+(ARG_RS),},
- {CLASS_BIT+3,CLASS_BIT+0xb,CLASS_REG+(ARG_RS),CLASS_BIT+7,CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,155},
+ {CLASS_BIT+3,CLASS_BIT+0xb,CLASS_REG+(ARG_RS),CLASS_BIT+6,CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,171},
-/* 0011 1010 ssss 0111 imm16 *** soutb imm16,rbs */
+/* 0011 1010 ssss 0110 imm16 *** soutb imm16,rbs */
{
#ifdef NICENAMES
-"soutb imm16,rbs",8,0,0x00,
+"soutb imm16,rbs",8,12,0x00,
#endif
"soutb",OPC_soutb,0,{CLASS_IMM+(ARG_IMM16),CLASS_REG_BYTE+(ARG_RS),},
- {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REG+(ARG_RS),CLASS_BIT+7,CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,156},
+ {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REG+(ARG_RS),CLASS_BIT+6,CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,172},
-/* 0011 1011 ssN0 1011 0000 aaaa ddN0 1000 *** soutd @rd,@rs,ra */
+/* 0011 1011 ssN0 1011 0000 aaaa dddd 1000 *** soutd @ro,@rs,ra */
{
#ifdef NICENAMES
-"soutd @rd,@rs,ra",16,0,0x00,
+"soutd @ro,@rs,ra",16,21,0x04,
#endif
-"soutd",OPC_soutd,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
- {CLASS_BIT+3,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+0xb,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,},3,4,157},
+"soutd",OPC_soutd,0,{CLASS_IRO+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
+ {CLASS_BIT+3,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+0xb,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REG+(ARG_RD),CLASS_BIT+8,0,},3,4,173},
-/* 0011 1010 ssN0 1011 0000 aaaa ddN0 1000 *** soutdb @rd,@rs,rba */
+/* 0011 1010 ssN0 1011 0000 aaaa dddd 1000 *** soutdb @ro,@rs,ra */
{
#ifdef NICENAMES
-"soutdb @rd,@rs,rba",8,0,0x00,
+"soutdb @ro,@rs,ra",8,21,0x04,
#endif
-"soutdb",OPC_soutdb,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_BYTE+(ARG_RA),},
- {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+0xb,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,},3,4,158},
+"soutdb",OPC_soutdb,0,{CLASS_IRO+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
+ {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+0xb,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REG+(ARG_RD),CLASS_BIT+8,0,},3,4,174},
-/* 0011 1010 ssN0 0011 0000 aaaa ddN0 1000 *** soutib @rd,@rs,ra */
+/* 0011 1011 ssN0 0011 0000 aaaa dddd 1000 *** souti @ro,@rs,ra */
{
#ifdef NICENAMES
-"soutib @rd,@rs,ra",8,0,0x00,
+"souti @ro,@rs,ra",16,21,0x04,
#endif
-"soutib",OPC_soutib,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
- {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+3,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,},3,4,159},
+"souti",OPC_souti,0,{CLASS_IRO+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
+ {CLASS_BIT+3,CLASS_BIT+0xb,CLASS_REGN0+(ARG_RS),CLASS_BIT+3,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REG+(ARG_RD),CLASS_BIT+8,0,},3,4,175},
-/* 0011 1010 ssN0 0011 0000 aaaa ddN0 0000 *** soutibr @rd,@rs,ra */
+/* 0011 1010 ssN0 0011 0000 aaaa dddd 1000 *** soutib @ro,@rs,ra */
{
#ifdef NICENAMES
-"soutibr @rd,@rs,ra",16,0,0x00,
+"soutib @ro,@rs,ra",8,21,0x04,
#endif
-"soutibr",OPC_soutibr,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
- {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+3,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RD),CLASS_BIT+0,0,},3,4,160},
+"soutib",OPC_soutib,0,{CLASS_IRO+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_WORD+(ARG_RA),},
+ {CLASS_BIT+3,CLASS_BIT+0xa,CLASS_REGN0+(ARG_RS),CLASS_BIT+3,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REG+(ARG_RD),CLASS_BIT+8,0,},3,4,176},
/* 1011 0011 dddd 1001 1111 1111 nim8 *** sra rd,imm8 */
{
@@ -3134,7 +3287,7 @@ const opcode_entry_type z8k_table[] = {
"sra rd,imm8",16,13,0x3c,
#endif
"sra",OPC_sra,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IMM+(ARG_IMM8),},
- {CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT+9,CLASS_BIT+0xf,CLASS_BIT+0xf,CLASS_IMM+(ARG_NIM8),0,0,},2,4,161},
+ {CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT+9,CLASS_BIT+0xf,CLASS_BIT+0xf,CLASS_IMM+(ARG_NIM8),0,0,},2,4,177},
/* 1011 0010 dddd 1001 iiii iiii 1111 nim4 *** srab rbd,imm4 */
{
@@ -3142,7 +3295,7 @@ const opcode_entry_type z8k_table[] = {
"srab rbd,imm4",8,13,0x3c,
#endif
"srab",OPC_srab,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IMM +(ARG_IMM4),},
- {CLASS_BIT+0xb,CLASS_BIT+2,CLASS_REG+(ARG_RD),CLASS_BIT+9,CLASS_IGNORE,CLASS_IGNORE,CLASS_BIT+0xf,CLASS_IMM+(ARG_NIM4),0,},2,4,162},
+ {CLASS_BIT+0xb,CLASS_BIT+2,CLASS_REG+(ARG_RD),CLASS_BIT+9,CLASS_IGNORE,CLASS_IGNORE,CLASS_BIT+0xf,CLASS_IMM+(ARG_NIM4),0,},2,4,178},
/* 1011 0011 dddd 1101 1111 1111 nim8 *** sral rrd,imm8 */
{
@@ -3150,7 +3303,7 @@ const opcode_entry_type z8k_table[] = {
"sral rrd,imm8",32,13,0x3c,
#endif
"sral",OPC_sral,0,{CLASS_REG_LONG+(ARG_RD),CLASS_IMM+(ARG_IMM8),},
- {CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT+0xd,CLASS_BIT+0xf,CLASS_BIT+0xf,CLASS_IMM+(ARG_NIM8),0,0,},2,4,163},
+ {CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT+0xd,CLASS_BIT+0xf,CLASS_BIT+0xf,CLASS_IMM+(ARG_NIM8),0,0,},2,4,179},
/* 1011 0011 dddd 0001 1111 1111 nim8 *** srl rd,imm8 */
{
@@ -3158,7 +3311,7 @@ const opcode_entry_type z8k_table[] = {
"srl rd,imm8",16,13,0x3c,
#endif
"srl",OPC_srl,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IMM+(ARG_IMM8),},
- {CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT+1,CLASS_BIT+0xf,CLASS_BIT+0xf,CLASS_IMM+(ARG_NIM8),0,0,},2,4,164},
+ {CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT+1,CLASS_BIT+0xf,CLASS_BIT+0xf,CLASS_IMM+(ARG_NIM8),0,0,},2,4,180},
/* 1011 0010 dddd 0001 iiii iiii 1111 nim4 *** srlb rbd,imm4 */
{
@@ -3166,7 +3319,7 @@ const opcode_entry_type z8k_table[] = {
"srlb rbd,imm4",8,13,0x3c,
#endif
"srlb",OPC_srlb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IMM +(ARG_IMM4),},
- {CLASS_BIT+0xb,CLASS_BIT+2,CLASS_REG+(ARG_RD),CLASS_BIT+1,CLASS_IGNORE,CLASS_IGNORE,CLASS_BIT+0xf,CLASS_IMM+(ARG_NIM4),0,},2,4,165},
+ {CLASS_BIT+0xb,CLASS_BIT+2,CLASS_REG+(ARG_RD),CLASS_BIT+1,CLASS_IGNORE,CLASS_IGNORE,CLASS_BIT+0xf,CLASS_IMM+(ARG_NIM4),0,},2,4,181},
/* 1011 0011 dddd 0101 1111 1111 nim8 *** srll rrd,imm8 */
{
@@ -3174,7 +3327,7 @@ const opcode_entry_type z8k_table[] = {
"srll rrd,imm8",32,13,0x3c,
#endif
"srll",OPC_srll,0,{CLASS_REG_LONG+(ARG_RD),CLASS_IMM+(ARG_IMM8),},
- {CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT+5,CLASS_BIT+0xf,CLASS_BIT+0xf,CLASS_IMM+(ARG_NIM8),0,0,},2,4,166},
+ {CLASS_BIT+0xb,CLASS_BIT+3,CLASS_REG+(ARG_RD),CLASS_BIT+5,CLASS_BIT+0xf,CLASS_BIT+0xf,CLASS_IMM+(ARG_NIM8),0,0,},2,4,182},
/* 0000 0011 ssN0 dddd *** sub rd,@rs */
{
@@ -3182,7 +3335,7 @@ const opcode_entry_type z8k_table[] = {
"sub rd,@rs",16,7,0x3c,
#endif
"sub",OPC_sub,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IR+(ARG_RS),},
- {CLASS_BIT+0,CLASS_BIT+3,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,167},
+ {CLASS_BIT+0,CLASS_BIT+3,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,183},
/* 0100 0011 0000 dddd address_src *** sub rd,address_src */
{
@@ -3190,7 +3343,7 @@ const opcode_entry_type z8k_table[] = {
"sub rd,address_src",16,9,0x3c,
#endif
"sub",OPC_sub,0,{CLASS_REG_WORD+(ARG_RD),CLASS_DA+(ARG_SRC),},
- {CLASS_BIT+4,CLASS_BIT+3,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,167},
+ {CLASS_BIT+4,CLASS_BIT+3,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,183},
/* 0100 0011 ssN0 dddd address_src *** sub rd,address_src(rs) */
{
@@ -3198,7 +3351,7 @@ const opcode_entry_type z8k_table[] = {
"sub rd,address_src(rs)",16,10,0x3c,
#endif
"sub",OPC_sub,0,{CLASS_REG_WORD+(ARG_RD),CLASS_X+(ARG_RS),},
- {CLASS_BIT+4,CLASS_BIT+3,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,167},
+ {CLASS_BIT+4,CLASS_BIT+3,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,183},
/* 0000 0011 0000 dddd imm16 *** sub rd,imm16 */
{
@@ -3206,7 +3359,7 @@ const opcode_entry_type z8k_table[] = {
"sub rd,imm16",16,7,0x3c,
#endif
"sub",OPC_sub,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IMM+(ARG_IMM16),},
- {CLASS_BIT+0,CLASS_BIT+3,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,167},
+ {CLASS_BIT+0,CLASS_BIT+3,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,183},
/* 1000 0011 ssss dddd *** sub rd,rs */
{
@@ -3214,7 +3367,7 @@ const opcode_entry_type z8k_table[] = {
"sub rd,rs",16,4,0x3c,
#endif
"sub",OPC_sub,0,{CLASS_REG_WORD+(ARG_RD),CLASS_REG_WORD+(ARG_RS),},
- {CLASS_BIT+8,CLASS_BIT+3,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,167},
+ {CLASS_BIT+8,CLASS_BIT+3,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,183},
/* 0000 0010 ssN0 dddd *** subb rbd,@rs */
{
@@ -3222,7 +3375,7 @@ const opcode_entry_type z8k_table[] = {
"subb rbd,@rs",8,7,0x3f,
#endif
"subb",OPC_subb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IR+(ARG_RS),},
- {CLASS_BIT+0,CLASS_BIT+2,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,168},
+ {CLASS_BIT+0,CLASS_BIT+2,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,184},
/* 0100 0010 0000 dddd address_src *** subb rbd,address_src */
{
@@ -3230,7 +3383,7 @@ const opcode_entry_type z8k_table[] = {
"subb rbd,address_src",8,9,0x3f,
#endif
"subb",OPC_subb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_DA+(ARG_SRC),},
- {CLASS_BIT+4,CLASS_BIT+2,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,168},
+ {CLASS_BIT+4,CLASS_BIT+2,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,184},
/* 0100 0010 ssN0 dddd address_src *** subb rbd,address_src(rs) */
{
@@ -3238,7 +3391,7 @@ const opcode_entry_type z8k_table[] = {
"subb rbd,address_src(rs)",8,10,0x3f,
#endif
"subb",OPC_subb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_X+(ARG_RS),},
- {CLASS_BIT+4,CLASS_BIT+2,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,168},
+ {CLASS_BIT+4,CLASS_BIT+2,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,184},
/* 0000 0010 0000 dddd imm8 imm8 *** subb rbd,imm8 */
{
@@ -3246,7 +3399,7 @@ const opcode_entry_type z8k_table[] = {
"subb rbd,imm8",8,7,0x3f,
#endif
"subb",OPC_subb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IMM+(ARG_IMM8),},
- {CLASS_BIT+0,CLASS_BIT+2,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM8),CLASS_IMM+(ARG_IMM8),0,0,0,},2,4,168},
+ {CLASS_BIT+0,CLASS_BIT+2,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM8),CLASS_IMM+(ARG_IMM8),0,0,0,},2,4,184},
/* 1000 0010 ssss dddd *** subb rbd,rbs */
{
@@ -3254,7 +3407,7 @@ const opcode_entry_type z8k_table[] = {
"subb rbd,rbs",8,4,0x3f,
#endif
"subb",OPC_subb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_REG_BYTE+(ARG_RS),},
- {CLASS_BIT+8,CLASS_BIT+2,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,168},
+ {CLASS_BIT+8,CLASS_BIT+2,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,184},
/* 0001 0010 ssN0 dddd *** subl rrd,@rs */
{
@@ -3262,7 +3415,7 @@ const opcode_entry_type z8k_table[] = {
"subl rrd,@rs",32,14,0x3c,
#endif
"subl",OPC_subl,0,{CLASS_REG_LONG+(ARG_RD),CLASS_IR+(ARG_RS),},
- {CLASS_BIT+1,CLASS_BIT+2,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,169},
+ {CLASS_BIT+1,CLASS_BIT+2,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,185},
/* 0101 0010 0000 dddd address_src *** subl rrd,address_src */
{
@@ -3270,7 +3423,7 @@ const opcode_entry_type z8k_table[] = {
"subl rrd,address_src",32,15,0x3c,
#endif
"subl",OPC_subl,0,{CLASS_REG_LONG+(ARG_RD),CLASS_DA+(ARG_SRC),},
- {CLASS_BIT+5,CLASS_BIT+2,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,169},
+ {CLASS_BIT+5,CLASS_BIT+2,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,185},
/* 0101 0010 ssN0 dddd address_src *** subl rrd,address_src(rs) */
{
@@ -3278,7 +3431,7 @@ const opcode_entry_type z8k_table[] = {
"subl rrd,address_src(rs)",32,16,0x3c,
#endif
"subl",OPC_subl,0,{CLASS_REG_LONG+(ARG_RD),CLASS_X+(ARG_RS),},
- {CLASS_BIT+5,CLASS_BIT+2,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,169},
+ {CLASS_BIT+5,CLASS_BIT+2,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,185},
/* 0001 0010 0000 dddd imm32 *** subl rrd,imm32 */
{
@@ -3286,7 +3439,7 @@ const opcode_entry_type z8k_table[] = {
"subl rrd,imm32",32,14,0x3c,
#endif
"subl",OPC_subl,0,{CLASS_REG_LONG+(ARG_RD),CLASS_IMM+(ARG_IMM32),},
- {CLASS_BIT+1,CLASS_BIT+2,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM32),0,0,0,0,},2,6,169},
+ {CLASS_BIT+1,CLASS_BIT+2,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM32),0,0,0,0,},2,6,185},
/* 1001 0010 ssss dddd *** subl rrd,rrs */
{
@@ -3294,7 +3447,7 @@ const opcode_entry_type z8k_table[] = {
"subl rrd,rrs",32,8,0x3c,
#endif
"subl",OPC_subl,0,{CLASS_REG_LONG+(ARG_RD),CLASS_REG_LONG+(ARG_RS),},
- {CLASS_BIT+9,CLASS_BIT+2,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,169},
+ {CLASS_BIT+9,CLASS_BIT+2,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,185},
/* 1010 1111 dddd cccc *** tcc cc,rd */
{
@@ -3302,7 +3455,7 @@ const opcode_entry_type z8k_table[] = {
"tcc cc,rd",16,5,0x00,
#endif
"tcc",OPC_tcc,0,{CLASS_CC,CLASS_REG_WORD+(ARG_RD),},
- {CLASS_BIT+0xa,CLASS_BIT+0xf,CLASS_REG+(ARG_RD),CLASS_CC,0,0,0,0,0,},2,2,170},
+ {CLASS_BIT+0xa,CLASS_BIT+0xf,CLASS_REG+(ARG_RD),CLASS_CC,0,0,0,0,0,},2,2,186},
/* 1010 1110 dddd cccc *** tccb cc,rbd */
{
@@ -3310,7 +3463,7 @@ const opcode_entry_type z8k_table[] = {
"tccb cc,rbd",8,5,0x00,
#endif
"tccb",OPC_tccb,0,{CLASS_CC,CLASS_REG_BYTE+(ARG_RD),},
- {CLASS_BIT+0xa,CLASS_BIT+0xe,CLASS_REG+(ARG_RD),CLASS_CC,0,0,0,0,0,},2,2,171},
+ {CLASS_BIT+0xa,CLASS_BIT+0xe,CLASS_REG+(ARG_RD),CLASS_CC,0,0,0,0,0,},2,2,187},
/* 0000 1101 ddN0 0100 *** test @rd */
{
@@ -3318,7 +3471,7 @@ const opcode_entry_type z8k_table[] = {
"test @rd",16,8,0x18,
#endif
"test",OPC_test,0,{CLASS_IR+(ARG_RD),},
- {CLASS_BIT+0,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_BIT+4,0,0,0,0,0,},1,2,172},
+ {CLASS_BIT+0,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_BIT+4,0,0,0,0,0,},1,2,188},
/* 0100 1101 0000 0100 address_dst *** test address_dst */
{
@@ -3326,7 +3479,7 @@ const opcode_entry_type z8k_table[] = {
"test address_dst",16,11,0x00,
#endif
"test",OPC_test,0,{CLASS_DA+(ARG_DST),},
- {CLASS_BIT+4,CLASS_BIT+0xd,CLASS_BIT+0,CLASS_BIT+4,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,172},
+ {CLASS_BIT+4,CLASS_BIT+0xd,CLASS_BIT+0,CLASS_BIT+4,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,188},
/* 0100 1101 ddN0 0100 address_dst *** test address_dst(rd) */
{
@@ -3334,7 +3487,7 @@ const opcode_entry_type z8k_table[] = {
"test address_dst(rd)",16,12,0x00,
#endif
"test",OPC_test,0,{CLASS_X+(ARG_RD),},
- {CLASS_BIT+4,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_BIT+4,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,172},
+ {CLASS_BIT+4,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_BIT+4,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,188},
/* 1000 1101 dddd 0100 *** test rd */
{
@@ -3342,7 +3495,7 @@ const opcode_entry_type z8k_table[] = {
"test rd",16,7,0x00,
#endif
"test",OPC_test,0,{CLASS_REG_WORD+(ARG_RD),},
- {CLASS_BIT+8,CLASS_BIT+0xd,CLASS_REG+(ARG_RD),CLASS_BIT+4,0,0,0,0,0,},1,2,172},
+ {CLASS_BIT+8,CLASS_BIT+0xd,CLASS_REG+(ARG_RD),CLASS_BIT+4,0,0,0,0,0,},1,2,188},
/* 0000 1100 ddN0 0100 *** testb @rd */
{
@@ -3350,7 +3503,7 @@ const opcode_entry_type z8k_table[] = {
"testb @rd",8,8,0x1c,
#endif
"testb",OPC_testb,0,{CLASS_IR+(ARG_RD),},
- {CLASS_BIT+0,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+4,0,0,0,0,0,},1,2,173},
+ {CLASS_BIT+0,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+4,0,0,0,0,0,},1,2,189},
/* 0100 1100 0000 0100 address_dst *** testb address_dst */
{
@@ -3358,7 +3511,7 @@ const opcode_entry_type z8k_table[] = {
"testb address_dst",8,11,0x1c,
#endif
"testb",OPC_testb,0,{CLASS_DA+(ARG_DST),},
- {CLASS_BIT+4,CLASS_BIT+0xc,CLASS_BIT+0,CLASS_BIT+4,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,173},
+ {CLASS_BIT+4,CLASS_BIT+0xc,CLASS_BIT+0,CLASS_BIT+4,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,189},
/* 0100 1100 ddN0 0100 address_dst *** testb address_dst(rd) */
{
@@ -3366,7 +3519,7 @@ const opcode_entry_type z8k_table[] = {
"testb address_dst(rd)",8,12,0x1c,
#endif
"testb",OPC_testb,0,{CLASS_X+(ARG_RD),},
- {CLASS_BIT+4,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+4,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,173},
+ {CLASS_BIT+4,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+4,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,189},
/* 1000 1100 dddd 0100 *** testb rbd */
{
@@ -3374,7 +3527,7 @@ const opcode_entry_type z8k_table[] = {
"testb rbd",8,7,0x1c,
#endif
"testb",OPC_testb,0,{CLASS_REG_BYTE+(ARG_RD),},
- {CLASS_BIT+8,CLASS_BIT+0xc,CLASS_REG+(ARG_RD),CLASS_BIT+4,0,0,0,0,0,},1,2,173},
+ {CLASS_BIT+8,CLASS_BIT+0xc,CLASS_REG+(ARG_RD),CLASS_BIT+4,0,0,0,0,0,},1,2,189},
/* 0001 1100 ddN0 1000 *** testl @rd */
{
@@ -3382,7 +3535,7 @@ const opcode_entry_type z8k_table[] = {
"testl @rd",32,13,0x18,
#endif
"testl",OPC_testl,0,{CLASS_IR+(ARG_RD),},
- {CLASS_BIT+1,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,0,0,0,0,},1,2,174},
+ {CLASS_BIT+1,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+8,0,0,0,0,0,},1,2,190},
/* 0101 1100 0000 1000 address_dst *** testl address_dst */
{
@@ -3390,7 +3543,7 @@ const opcode_entry_type z8k_table[] = {
"testl address_dst",32,16,0x18,
#endif
"testl",OPC_testl,0,{CLASS_DA+(ARG_DST),},
- {CLASS_BIT+5,CLASS_BIT+0xc,CLASS_BIT+0,CLASS_BIT+8,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,174},
+ {CLASS_BIT+5,CLASS_BIT+0xc,CLASS_BIT+0,CLASS_BIT+8,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,190},
/* 0101 1100 ddN0 1000 address_dst *** testl address_dst(rd) */
{
@@ -3398,7 +3551,7 @@ const opcode_entry_type z8k_table[] = {
"testl address_dst(rd)",32,17,0x18,
#endif
"testl",OPC_testl,0,{CLASS_X+(ARG_RD),},
- {CLASS_BIT+5,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+8,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,174},
+ {CLASS_BIT+5,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+8,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,190},
/* 1001 1100 dddd 1000 *** testl rrd */
{
@@ -3406,7 +3559,7 @@ const opcode_entry_type z8k_table[] = {
"testl rrd",32,13,0x18,
#endif
"testl",OPC_testl,0,{CLASS_REG_LONG+(ARG_RD),},
- {CLASS_BIT+9,CLASS_BIT+0xc,CLASS_REG+(ARG_RD),CLASS_BIT+8,0,0,0,0,0,},1,2,174},
+ {CLASS_BIT+9,CLASS_BIT+0xc,CLASS_REG+(ARG_RD),CLASS_BIT+8,0,0,0,0,0,},1,2,190},
/* 1011 1000 ddN0 1000 0000 aaaa ssN0 0000 *** trdb @rd,@rs,rba */
{
@@ -3414,7 +3567,7 @@ const opcode_entry_type z8k_table[] = {
"trdb @rd,@rs,rba",8,25,0x1c,
#endif
"trdb",OPC_trdb,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_BYTE+(ARG_RA),},
- {CLASS_BIT+0xb,CLASS_BIT+8,CLASS_REGN0+(ARG_RD),CLASS_BIT+8,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RS),CLASS_BIT+0,0,},3,4,175},
+ {CLASS_BIT+0xb,CLASS_BIT+8,CLASS_REGN0+(ARG_RD),CLASS_BIT+8,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RS),CLASS_BIT+0,0,},3,4,191},
/* 1011 1000 ddN0 1100 0000 aaaa ssN0 0000 *** trdrb @rd,@rs,rba */
{
@@ -3422,7 +3575,7 @@ const opcode_entry_type z8k_table[] = {
"trdrb @rd,@rs,rba",8,25,0x1c,
#endif
"trdrb",OPC_trdrb,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_BYTE+(ARG_RA),},
- {CLASS_BIT+0xb,CLASS_BIT+8,CLASS_REGN0+(ARG_RD),CLASS_BIT+0xc,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RS),CLASS_BIT+0,0,},3,4,176},
+ {CLASS_BIT+0xb,CLASS_BIT+8,CLASS_REGN0+(ARG_RD),CLASS_BIT+0xc,CLASS_BIT+0,CLASS_REG+(ARG_RA),CLASS_REGN0+(ARG_RS),CLASS_BIT+0,0,},3,4,192},
/* 1011 1000 ddN0 0000 0000 rrrr ssN0 0000 *** trib @rd,@rs,rbr */
{
@@ -3430,7 +3583,7 @@ const opcode_entry_type z8k_table[] = {
"trib @rd,@rs,rbr",8,25,0x1c,
#endif
"trib",OPC_trib,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_BYTE+(ARG_RR),},
- {CLASS_BIT+0xb,CLASS_BIT+8,CLASS_REGN0+(ARG_RD),CLASS_BIT+0,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RS),CLASS_BIT+0,0,},3,4,177},
+ {CLASS_BIT+0xb,CLASS_BIT+8,CLASS_REGN0+(ARG_RD),CLASS_BIT+0,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RS),CLASS_BIT+0,0,},3,4,193},
/* 1011 1000 ddN0 0100 0000 rrrr ssN0 0000 *** trirb @rd,@rs,rbr */
{
@@ -3438,7 +3591,7 @@ const opcode_entry_type z8k_table[] = {
"trirb @rd,@rs,rbr",8,25,0x1c,
#endif
"trirb",OPC_trirb,0,{CLASS_IR+(ARG_RD),CLASS_IR+(ARG_RS),CLASS_REG_BYTE+(ARG_RR),},
- {CLASS_BIT+0xb,CLASS_BIT+8,CLASS_REGN0+(ARG_RD),CLASS_BIT+4,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RS),CLASS_BIT+0,0,},3,4,178},
+ {CLASS_BIT+0xb,CLASS_BIT+8,CLASS_REGN0+(ARG_RD),CLASS_BIT+4,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RS),CLASS_BIT+0,0,},3,4,194},
/* 1011 1000 aaN0 1010 0000 rrrr bbN0 0000 *** trtdb @ra,@rb,rbr */
{
@@ -3446,7 +3599,7 @@ const opcode_entry_type z8k_table[] = {
"trtdb @ra,@rb,rbr",8,25,0x1c,
#endif
"trtdb",OPC_trtdb,0,{CLASS_IR+(ARG_RA),CLASS_IR+(ARG_RB),CLASS_REG_BYTE+(ARG_RR),},
- {CLASS_BIT+0xb,CLASS_BIT+8,CLASS_REGN0+(ARG_RA),CLASS_BIT+0xa,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RB),CLASS_BIT+0,0,},3,4,179},
+ {CLASS_BIT+0xb,CLASS_BIT+8,CLASS_REGN0+(ARG_RA),CLASS_BIT+0xa,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RB),CLASS_BIT+0,0,},3,4,195},
/* 1011 1000 aaN0 1110 0000 rrrr bbN0 1110 *** trtdrb @ra,@rb,rbr */
{
@@ -3454,7 +3607,7 @@ const opcode_entry_type z8k_table[] = {
"trtdrb @ra,@rb,rbr",8,25,0x1c,
#endif
"trtdrb",OPC_trtdrb,0,{CLASS_IR+(ARG_RA),CLASS_IR+(ARG_RB),CLASS_REG_BYTE+(ARG_RR),},
- {CLASS_BIT+0xb,CLASS_BIT+8,CLASS_REGN0+(ARG_RA),CLASS_BIT+0xe,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RB),CLASS_BIT+0xe,0,},3,4,180},
+ {CLASS_BIT+0xb,CLASS_BIT+8,CLASS_REGN0+(ARG_RA),CLASS_BIT+0xe,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RB),CLASS_BIT+0xe,0,},3,4,196},
/* 1011 1000 aaN0 0010 0000 rrrr bbN0 0000 *** trtib @ra,@rb,rbr */
{
@@ -3462,7 +3615,7 @@ const opcode_entry_type z8k_table[] = {
"trtib @ra,@rb,rbr",8,25,0x1c,
#endif
"trtib",OPC_trtib,0,{CLASS_IR+(ARG_RA),CLASS_IR+(ARG_RB),CLASS_REG_BYTE+(ARG_RR),},
- {CLASS_BIT+0xb,CLASS_BIT+8,CLASS_REGN0+(ARG_RA),CLASS_BIT+2,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RB),CLASS_BIT+0,0,},3,4,181},
+ {CLASS_BIT+0xb,CLASS_BIT+8,CLASS_REGN0+(ARG_RA),CLASS_BIT+2,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RB),CLASS_BIT+0,0,},3,4,197},
/* 1011 1000 aaN0 0110 0000 rrrr bbN0 1110 *** trtirb @ra,@rb,rbr */
{
@@ -3470,7 +3623,7 @@ const opcode_entry_type z8k_table[] = {
"trtirb @ra,@rb,rbr",8,25,0x1c,
#endif
"trtirb",OPC_trtirb,0,{CLASS_IR+(ARG_RA),CLASS_IR+(ARG_RB),CLASS_REG_BYTE+(ARG_RR),},
- {CLASS_BIT+0xb,CLASS_BIT+8,CLASS_REGN0+(ARG_RA),CLASS_BIT+6,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RB),CLASS_BIT+0xe,0,},3,4,182},
+ {CLASS_BIT+0xb,CLASS_BIT+8,CLASS_REGN0+(ARG_RA),CLASS_BIT+6,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RB),CLASS_BIT+0xe,0,},3,4,198},
/* 1011 1000 aaN0 1010 0000 rrrr bbN0 0000 *** trtrb @ra,@rb,rbr */
{
@@ -3478,7 +3631,7 @@ const opcode_entry_type z8k_table[] = {
"trtrb @ra,@rb,rbr",8,25,0x1c,
#endif
"trtrb",OPC_trtrb,0,{CLASS_IR+(ARG_RA),CLASS_IR+(ARG_RB),CLASS_REG_BYTE+(ARG_RR),},
- {CLASS_BIT+0xb,CLASS_BIT+8,CLASS_REGN0+(ARG_RA),CLASS_BIT+0xa,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RB),CLASS_BIT+0,0,},3,4,183},
+ {CLASS_BIT+0xb,CLASS_BIT+8,CLASS_REGN0+(ARG_RA),CLASS_BIT+0xa,CLASS_BIT+0,CLASS_REG+(ARG_RR),CLASS_REGN0+(ARG_RB),CLASS_BIT+0,0,},3,4,199},
/* 0000 1101 ddN0 0110 *** tset @rd */
{
@@ -3486,7 +3639,7 @@ const opcode_entry_type z8k_table[] = {
"tset @rd",16,11,0x08,
#endif
"tset",OPC_tset,0,{CLASS_IR+(ARG_RD),},
- {CLASS_BIT+0,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_BIT+6,0,0,0,0,0,},1,2,184},
+ {CLASS_BIT+0,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_BIT+6,0,0,0,0,0,},1,2,200},
/* 0100 1101 0000 0110 address_dst *** tset address_dst */
{
@@ -3494,7 +3647,7 @@ const opcode_entry_type z8k_table[] = {
"tset address_dst",16,14,0x08,
#endif
"tset",OPC_tset,0,{CLASS_DA+(ARG_DST),},
- {CLASS_BIT+4,CLASS_BIT+0xd,CLASS_BIT+0,CLASS_BIT+6,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,184},
+ {CLASS_BIT+4,CLASS_BIT+0xd,CLASS_BIT+0,CLASS_BIT+6,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,200},
/* 0100 1101 ddN0 0110 address_dst *** tset address_dst(rd) */
{
@@ -3502,7 +3655,7 @@ const opcode_entry_type z8k_table[] = {
"tset address_dst(rd)",16,15,0x08,
#endif
"tset",OPC_tset,0,{CLASS_X+(ARG_RD),},
- {CLASS_BIT+4,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_BIT+6,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,184},
+ {CLASS_BIT+4,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RD),CLASS_BIT+6,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,200},
/* 1000 1101 dddd 0110 *** tset rd */
{
@@ -3510,7 +3663,7 @@ const opcode_entry_type z8k_table[] = {
"tset rd",16,7,0x08,
#endif
"tset",OPC_tset,0,{CLASS_REG_WORD+(ARG_RD),},
- {CLASS_BIT+8,CLASS_BIT+0xd,CLASS_REG+(ARG_RD),CLASS_BIT+6,0,0,0,0,0,},1,2,184},
+ {CLASS_BIT+8,CLASS_BIT+0xd,CLASS_REG+(ARG_RD),CLASS_BIT+6,0,0,0,0,0,},1,2,200},
/* 0000 1100 ddN0 0110 *** tsetb @rd */
{
@@ -3518,7 +3671,7 @@ const opcode_entry_type z8k_table[] = {
"tsetb @rd",8,11,0x08,
#endif
"tsetb",OPC_tsetb,0,{CLASS_IR+(ARG_RD),},
- {CLASS_BIT+0,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+6,0,0,0,0,0,},1,2,185},
+ {CLASS_BIT+0,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+6,0,0,0,0,0,},1,2,201},
/* 0100 1100 0000 0110 address_dst *** tsetb address_dst */
{
@@ -3526,7 +3679,7 @@ const opcode_entry_type z8k_table[] = {
"tsetb address_dst",8,14,0x08,
#endif
"tsetb",OPC_tsetb,0,{CLASS_DA+(ARG_DST),},
- {CLASS_BIT+4,CLASS_BIT+0xc,CLASS_BIT+0,CLASS_BIT+6,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,185},
+ {CLASS_BIT+4,CLASS_BIT+0xc,CLASS_BIT+0,CLASS_BIT+6,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,201},
/* 0100 1100 ddN0 0110 address_dst *** tsetb address_dst(rd) */
{
@@ -3534,7 +3687,7 @@ const opcode_entry_type z8k_table[] = {
"tsetb address_dst(rd)",8,15,0x08,
#endif
"tsetb",OPC_tsetb,0,{CLASS_X+(ARG_RD),},
- {CLASS_BIT+4,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+6,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,185},
+ {CLASS_BIT+4,CLASS_BIT+0xc,CLASS_REGN0+(ARG_RD),CLASS_BIT+6,CLASS_ADDRESS+(ARG_DST),0,0,0,0,},1,4,201},
/* 1000 1100 dddd 0110 *** tsetb rbd */
{
@@ -3542,7 +3695,7 @@ const opcode_entry_type z8k_table[] = {
"tsetb rbd",8,7,0x08,
#endif
"tsetb",OPC_tsetb,0,{CLASS_REG_BYTE+(ARG_RD),},
- {CLASS_BIT+8,CLASS_BIT+0xc,CLASS_REG+(ARG_RD),CLASS_BIT+6,0,0,0,0,0,},1,2,185},
+ {CLASS_BIT+8,CLASS_BIT+0xc,CLASS_REG+(ARG_RD),CLASS_BIT+6,0,0,0,0,0,},1,2,201},
/* 0000 1001 ssN0 dddd *** xor rd,@rs */
{
@@ -3550,7 +3703,7 @@ const opcode_entry_type z8k_table[] = {
"xor rd,@rs",16,7,0x18,
#endif
"xor",OPC_xor,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IR+(ARG_RS),},
- {CLASS_BIT+0,CLASS_BIT+9,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,186},
+ {CLASS_BIT+0,CLASS_BIT+9,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,202},
/* 0100 1001 0000 dddd address_src *** xor rd,address_src */
{
@@ -3558,7 +3711,7 @@ const opcode_entry_type z8k_table[] = {
"xor rd,address_src",16,9,0x18,
#endif
"xor",OPC_xor,0,{CLASS_REG_WORD+(ARG_RD),CLASS_DA+(ARG_SRC),},
- {CLASS_BIT+4,CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,186},
+ {CLASS_BIT+4,CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,202},
/* 0100 1001 ssN0 dddd address_src *** xor rd,address_src(rs) */
{
@@ -3566,7 +3719,7 @@ const opcode_entry_type z8k_table[] = {
"xor rd,address_src(rs)",16,10,0x18,
#endif
"xor",OPC_xor,0,{CLASS_REG_WORD+(ARG_RD),CLASS_X+(ARG_RS),},
- {CLASS_BIT+4,CLASS_BIT+9,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,186},
+ {CLASS_BIT+4,CLASS_BIT+9,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,202},
/* 0000 1001 0000 dddd imm16 *** xor rd,imm16 */
{
@@ -3574,7 +3727,7 @@ const opcode_entry_type z8k_table[] = {
"xor rd,imm16",16,7,0x18,
#endif
"xor",OPC_xor,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IMM+(ARG_IMM16),},
- {CLASS_BIT+0,CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,186},
+ {CLASS_BIT+0,CLASS_BIT+9,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,202},
/* 1000 1001 ssss dddd *** xor rd,rs */
{
@@ -3582,7 +3735,7 @@ const opcode_entry_type z8k_table[] = {
"xor rd,rs",16,4,0x18,
#endif
"xor",OPC_xor,0,{CLASS_REG_WORD+(ARG_RD),CLASS_REG_WORD+(ARG_RS),},
- {CLASS_BIT+8,CLASS_BIT+9,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,186},
+ {CLASS_BIT+8,CLASS_BIT+9,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,202},
/* 0000 1000 ssN0 dddd *** xorb rbd,@rs */
{
@@ -3590,7 +3743,7 @@ const opcode_entry_type z8k_table[] = {
"xorb rbd,@rs",8,7,0x1c,
#endif
"xorb",OPC_xorb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IR+(ARG_RS),},
- {CLASS_BIT+0,CLASS_BIT+8,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,187},
+ {CLASS_BIT+0,CLASS_BIT+8,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,203},
/* 0100 1000 0000 dddd address_src *** xorb rbd,address_src */
{
@@ -3598,7 +3751,7 @@ const opcode_entry_type z8k_table[] = {
"xorb rbd,address_src",8,9,0x1c,
#endif
"xorb",OPC_xorb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_DA+(ARG_SRC),},
- {CLASS_BIT+4,CLASS_BIT+8,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,187},
+ {CLASS_BIT+4,CLASS_BIT+8,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,203},
/* 0100 1000 ssN0 dddd address_src *** xorb rbd,address_src(rs) */
{
@@ -3606,7 +3759,7 @@ const opcode_entry_type z8k_table[] = {
"xorb rbd,address_src(rs)",8,10,0x1c,
#endif
"xorb",OPC_xorb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_X+(ARG_RS),},
- {CLASS_BIT+4,CLASS_BIT+8,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,187},
+ {CLASS_BIT+4,CLASS_BIT+8,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),CLASS_ADDRESS+(ARG_SRC),0,0,0,0,},2,4,203},
/* 0000 1000 0000 dddd imm8 imm8 *** xorb rbd,imm8 */
{
@@ -3614,7 +3767,7 @@ const opcode_entry_type z8k_table[] = {
"xorb rbd,imm8",8,7,0x1c,
#endif
"xorb",OPC_xorb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_IMM+(ARG_IMM8),},
- {CLASS_BIT+0,CLASS_BIT+8,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM8),CLASS_IMM+(ARG_IMM8),0,0,0,},2,4,187},
+ {CLASS_BIT+0,CLASS_BIT+8,CLASS_BIT+0,CLASS_REG+(ARG_RD),CLASS_IMM+(ARG_IMM8),CLASS_IMM+(ARG_IMM8),0,0,0,},2,4,203},
/* 1000 1000 ssss dddd *** xorb rbd,rbs */
{
@@ -3622,7 +3775,7 @@ const opcode_entry_type z8k_table[] = {
"xorb rbd,rbs",8,4,0x1c,
#endif
"xorb",OPC_xorb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_REG_BYTE+(ARG_RS),},
- {CLASS_BIT+8,CLASS_BIT+8,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,187},
+ {CLASS_BIT+8,CLASS_BIT+8,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,203},
/* 1000 1000 ssss dddd *** xorb rbd,rbs */
{
@@ -3630,7 +3783,7 @@ const opcode_entry_type z8k_table[] = {
"xorb rbd,rbs",8,4,0x01,
#endif
"xorb",OPC_xorb,0,{CLASS_REG_BYTE+(ARG_RD),CLASS_REG_BYTE+(ARG_RS),},
- {CLASS_BIT+8,CLASS_BIT+8,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,187},
+ {CLASS_BIT+8,CLASS_BIT+8,CLASS_REG+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,203},
/* end marker */
{
diff --git a/opcodes/z8kgen.c b/opcodes/z8kgen.c
index efce2cf5948..df727914255 100644
--- a/opcodes/z8kgen.c
+++ b/opcodes/z8kgen.c
@@ -1,4 +1,4 @@
-/* Copyright 2001, 2002 Free Software Foundation, Inc.
+/* Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -17,7 +17,7 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA. */
-/* This program generates z8k-opc.h. */
+/* This program generates z8k-opc.h. Compile with -fwritable-strings. */
#include <stdio.h>
#include "sysdep.h"
@@ -38,6 +38,10 @@ struct op
#define iswhite(x) ((x) == ' ' || (x) == '\t')
struct op opt[] =
{
+ {"------", 2, 8, "0011 0110 0000 0000", "bpt", 0}, /* Breakpoint used by the simulator. */
+ {"------", 10, 8, "0000 1111 0000 1100", "brk", 0}, /* Breakpoint used by real hardware.
+ (ext0f #0x0c). */
+
{"------", 10, 8, "0000 1110 imm8", "ext0e imm8", 0},
{"------", 10, 8, "0000 1111 imm8", "ext0f imm8", 0},
{"------", 10, 8, "1000 1110 imm8", "ext8e imm8", 0},
@@ -79,7 +83,6 @@ struct op opt[] =
{"CZSV--", 11, 16, "1011 1011 ssN0 0110 0000 rrrr ddN0 cccc", "cpsir @rd,@rs,rr,cc", 0},
{"CZSV--", 11, 8, "1011 1010 ssN0 0110 0000 rrrr ddN0 cccc", "cpsirb @rd,@rs,rr,cc", 0},
- {"------", 2, 8, "0011 0110 0000 0000", "bpt", 0},
{"CZSV--", 5, 16, "1011 0101 ssss dddd", "adc rd,rs", 0},
{"CZSVDH", 5, 8, "1011 0100 ssss dddd", "adcb rbd,rbs", 0},
{"CZSV--", 7, 16, "0000 0001 ssN0 dddd", "add rd,@rs", 0},
@@ -209,8 +212,8 @@ struct op opt[] =
{"------", 11, 32, "1011 0001 dddd 0111", "extsl rqd", 0},
{"------", 8, 16, "0111 1010 0000 0000", "halt", 0},
- {"------", 10, 16, "0011 1101 ssN0 dddd", "in rd,@rs", 0},
- {"------", 12, 8, "0011 1100 ssN0 dddd", "inb rbd,@rs", 0},
+ {"------", 10, 16, "0011 1101 ssss dddd", "in rd,@ri", 0},
+ {"------", 12, 8, "0011 1100 ssss dddd", "inb rbd,@ri", 0},
{"------", 12, 16, "0011 1011 dddd 0100 imm16", "in rd,imm16", 0},
{"------", 10, 8, "0011 1010 dddd 0100 imm16", "inb rbd,imm16", 0},
{"-ZSV--", 11, 16, "0010 1001 ddN0 imm4m1", "inc @rd,imm4m1", 0},
@@ -221,10 +224,14 @@ struct op opt[] =
{"-ZSV--", 14, 8, "0110 1000 ddN0 imm4m1 address_dst", "incb address_dst(rd),imm4m1", 0},
{"-ZSV--", 13, 8, "0110 1000 0000 imm4m1 address_dst", "incb address_dst,imm4m1", 0},
{"-ZSV--", 4, 8, "1010 1000 dddd imm4m1", "incb rbd,imm4m1", 0},
- {"---V--", 21, 16, "0011 1011 ssN0 1000 0000 aaaa ddN0 1000", "ind @rd,@rs,ra", 0},
- {"---V--", 21, 8, "0011 1010 ssN0 1000 0000 aaaa ddN0 1000", "indb @rd,@rs,rba", 0},
- {"---V--", 21, 8, "0011 1010 ssN0 0000 0000 aaaa ddN0 1000", "inib @rd,@rs,ra", 0},
- {"---V--", 21, 16, "0011 1010 ssN0 0000 0000 aaaa ddN0 0000", "inibr @rd,@rs,ra", 0},
+ {"---V--", 21, 16, "0011 1011 ssss 1000 0000 aaaa ddN0 1000", "ind @rd,@ri,ra", 0},
+ {"---V--", 21, 8, "0011 1010 ssss 1000 0000 aaaa ddN0 1000", "indb @rd,@ri,ra", 0},
+ {"---V--", 11, 16, "0011 1011 ssss 1000 0000 aaaa ddN0 0000", "indr @rd,@ri,ra", 0},
+ {"---V--", 11, 8, "0011 1010 ssss 1000 0000 aaaa ddN0 0000", "indrb @rd,@ri,ra", 0},
+ {"---V--", 21, 16, "0011 1011 ssss 0000 0000 aaaa ddN0 1000", "ini @rd,@ri,ra", 0},
+ {"---V--", 21, 8, "0011 1010 ssss 0000 0000 aaaa ddN0 1000", "inib @rd,@ri,ra", 0},
+ {"---V--", 11, 16, "0011 1011 ssss 0000 0000 aaaa ddN0 0000", "inir @rd,@ri,ra", 0},
+ {"---V--", 11, 8, "0011 1010 ssss 0000 0000 aaaa ddN0 0000", "inirb @rd,@ri,ra", 0},
{"CZSVDH", 13, 16, "0111 1011 0000 0000", "iret", 0},
{"------", 10, 16, "0001 1110 ddN0 cccc", "jp cc,@rd", 0},
{"------", 7, 16, "0101 1110 0000 cccc address_dst", "jp cc,address_dst", 0},
@@ -258,6 +265,7 @@ struct op opt[] =
{"------", 7, 8, "0010 0000 ssN0 dddd", "ldb rbd,@rs", 0},
{"------", 9, 8, "0110 0000 0000 dddd address_src", "ldb rbd,address_src", 0},
{"------", 10, 8, "0110 0000 ssN0 dddd address_src", "ldb rbd,address_src(rs)", 0},
+ {"------", 7, 8, "0010 0000 0000 dddd imm8 imm8", "ldb rbd,imm8", 0},
{"------", 5, 8, "1100 dddd imm8", "ldb rbd,imm8", 0},
{"------", 3, 8, "1010 0000 ssss dddd", "ldb rbd,rbs", 0},
{"------", 14, 8, "0011 0000 ssN0 dddd imm16", "ldb rbd,rs(imm16)", 0},
@@ -342,15 +350,18 @@ struct op opt[] =
{"CZSP--", 7, 8, "0000 0100 0000 dddd imm8 imm8", "orb rbd,imm8", 0},
{"CZSP--", 4, 8, "1000 0100 ssss dddd", "orb rbd,rbs", 0},
- {"---V--", 0, 16, "0011 1111 ddN0 ssss", "out @rd,rs", 0},
- {"---V--", 0, 16, "0011 1011 ssss 0110 imm16", "out imm16,rs", 0},
- {"---V--", 0, 8, "0011 1110 ddN0 ssss", "outb @rd,rbs", 0},
- {"---V--", 0, 8, "0011 1010 ssss 0110 imm16", "outb imm16,rbs", 0},
- {"---V--", 0, 16, "0011 1011 ssN0 1010 0000 aaaa ddN0 1000", "outd @rd,@rs,ra", 0},
- {"---V--", 0, 16, "0011 1010 ssN0 1010 0000 aaaa ddN0 1000", "outdb @rd,@rs,rba", 0},
- {"---V--", 0, 16, "0011 1011 ssN0 0010 0000 aaaa ddN0 1000", "outi @rd,@rs,ra", 0},
- {"---V--", 0, 16, "0011 1010 ssN0 0010 0000 aaaa ddN0 1000", "outib @rd,@rs,ra", 0},
- {"---V--", 0, 16, "0011 1010 ssN0 0010 0000 aaaa ddN0 0000", "outibr @rd,@rs,ra", 0},
+ {"------", 10, 16, "0011 1111 dddd ssss", "out @ro,rs", 0},
+ {"------", 12, 16, "0011 1011 ssss 0110 imm16", "out imm16,rs", 0},
+ {"------", 10, 8, "0011 1110 dddd ssss", "outb @ro,rbs", 0},
+ {"------", 12, 8, "0011 1010 ssss 0110 imm16", "outb imm16,rbs", 0},
+ {"---V--", 21, 16, "0011 1011 ssN0 1010 0000 aaaa dddd 1000", "outd @ro,@rs,ra", 0},
+ {"---V--", 21, 8, "0011 1010 ssN0 1010 0000 aaaa dddd 1000", "outdb @ro,@rs,ra", 0},
+ {"---V--", 11, 16, "0011 1011 ssN0 1010 0000 aaaa dddd 0000", "otdr @ro,@rs,ra", 0},
+ {"---V--", 11, 8, "0011 1010 ssN0 1010 0000 aaaa dddd 0000", "otdrb @ro,@rs,ra", 0},
+ {"---V--", 21, 16, "0011 1011 ssN0 0010 0000 aaaa dddd 1000", "outi @ro,@rs,ra", 0},
+ {"---V--", 21, 8, "0011 1010 ssN0 0010 0000 aaaa dddd 1000", "outib @ro,@rs,ra", 0},
+ {"---V--", 11, 16, "0011 1011 ssN0 0010 0000 aaaa dddd 0000", "otir @ro,@rs,ra", 0},
+ {"---V--", 11, 8, "0011 1010 ssN0 0010 0000 aaaa dddd 0000", "otirb @ro,@rs,ra", 0},
{"------", 12, 16, "0001 0111 ssN0 ddN0", "pop @rd,@rs", 0},
{"------", 16, 16, "0101 0111 ssN0 ddN0 address_dst", "pop address_dst(rd),@rs", 0},
@@ -427,12 +438,16 @@ struct op opt[] =
{"CZSV--", 7, 16, "1000 1101 flags 0001", "setflg flags", 0},
- {"------", 0, 8, "0011 1010 dddd 0101 imm16", "sinb rbd,imm16", 0},
- {"------", 0, 8, "0011 1011 dddd 0101 imm16", "sin rd,imm16", 0},
- {"------", 0, 16, "0011 1011 ssN0 1000 0001 aaaa ddN0 1000", "sind @rd,@rs,ra", 0},
- {"------", 0, 8, "0011 1010 ssN0 1000 0001 aaaa ddN0 1000", "sindb @rd,@rs,rba", 0},
- {"------", 0, 8, "0011 1010 ssN0 0001 0000 aaaa ddN0 1000", "sinib @rd,@rs,ra", 0},
- {"------", 0, 16, "0011 1010 ssN0 0001 0000 aaaa ddN0 0000", "sinibr @rd,@rs,ra", 0},
+ {"------", 12, 16, "0011 1011 dddd 0101 imm16", "sin rd,imm16", 0},
+ {"------", 10, 8, "0011 1010 dddd 0101 imm16", "sinb rbd,imm16", 0},
+ {"---V--", 21, 16, "0011 1011 ssss 1001 0000 aaaa ddN0 1000", "sind @rd,@ri,ra", 0},
+ {"---V--", 21, 8, "0011 1010 ssss 1001 0000 aaaa ddN0 1000", "sindb @rd,@ri,ra", 0},
+ {"---V--", 11, 16, "0011 1011 ssss 1001 0000 aaaa ddN0 0000", "sindr @rd,@ri,ra", 0},
+ {"---V--", 11, 8, "0011 1010 ssss 1001 0000 aaaa ddN0 0000", "sindrb @rd,@ri,ra", 0},
+ {"---V--", 21, 16, "0011 1011 ssss 0001 0000 aaaa ddN0 1000", "sini @rd,@ri,ra", 0},
+ {"---V--", 21, 8, "0011 1010 ssss 0001 0000 aaaa ddN0 1000", "sinib @rd,@ri,ra", 0},
+ {"---V--", 11, 16, "0011 1011 ssss 0001 0000 aaaa ddN0 0000", "sinir @rd,@ri,ra", 0},
+ {"---V--", 11, 8, "0011 1010 ssss 0001 0000 aaaa ddN0 0000", "sinirb @rd,@ri,ra", 0},
{"CZSV--", 13, 16, "1011 0011 dddd 1001 0000 0000 imm8", "sla rd,imm8", 0},
{"CZSV--", 13, 8, "1011 0010 dddd 1001 iiii iiii 0000 imm4", "slab rbd,imm4", 0},
@@ -442,12 +457,16 @@ struct op opt[] =
{"CZS---", 13, 8, "1011 0010 dddd 0001 iiii iiii 0000 imm4", "sllb rbd,imm4", 0},
{"CZS---", 13, 32, "1011 0011 dddd 0101 0000 0000 imm8", "slll rrd,imm8", 0},
- {"------", 0, 16, "0011 1011 ssss 0111 imm16", "sout imm16,rs", 0},
- {"------", 0, 8, "0011 1010 ssss 0111 imm16", "soutb imm16,rbs", 0},
- {"------", 0, 16, "0011 1011 ssN0 1011 0000 aaaa ddN0 1000", "soutd @rd,@rs,ra", 0},
- {"------", 0, 8, "0011 1010 ssN0 1011 0000 aaaa ddN0 1000", "soutdb @rd,@rs,rba", 0},
- {"------", 0, 8, "0011 1010 ssN0 0011 0000 aaaa ddN0 1000", "soutib @rd,@rs,ra", 0},
- {"------", 0, 16, "0011 1010 ssN0 0011 0000 aaaa ddN0 0000", "soutibr @rd,@rs,ra", 0},
+ {"------", 12, 16, "0011 1011 ssss 0110 imm16", "sout imm16,rs", 0},
+ {"------", 12, 8, "0011 1010 ssss 0110 imm16", "soutb imm16,rbs", 0},
+ {"---V--", 21, 16, "0011 1011 ssN0 1011 0000 aaaa dddd 1000", "soutd @ro,@rs,ra", 0},
+ {"---V--", 21, 8, "0011 1010 ssN0 1011 0000 aaaa dddd 1000", "soutdb @ro,@rs,ra", 0},
+ {"---V--", 11, 16, "0011 1011 ssN0 1011 0000 aaaa dddd 0000", "sotdr @ro,@rs,ra", 0},
+ {"---V--", 11, 8, "0011 1010 ssN0 1011 0000 aaaa dddd 0000", "sotdrb @ro,@rs,ra", 0},
+ {"---V--", 21, 16, "0011 1011 ssN0 0011 0000 aaaa dddd 1000", "souti @ro,@rs,ra", 0},
+ {"---V--", 21, 8, "0011 1010 ssN0 0011 0000 aaaa dddd 1000", "soutib @ro,@rs,ra", 0},
+ {"---V--", 11, 16, "0011 1011 ssN0 0011 0000 aaaa dddd 0000", "sotir @ro,@rs,ra", 0},
+ {"---V--", 11, 8, "0011 1010 ssN0 0011 0000 aaaa dddd 0000", "sotirb @ro,@rs,ra", 0},
{"CZSV--", 13, 16, "1011 0011 dddd 1001 1111 1111 nim8", "sra rd,imm8", 0},
{"CZSV--", 13, 8, "1011 0010 dddd 1001 iiii iiii 1111 nim4", "srab rbd,imm4", 0},
@@ -532,7 +551,7 @@ struct op opt[] =
{"*", 0, 0, 0, 0, 0}
};
-int
+static int
count ()
{
struct op *p = opt;
@@ -547,8 +566,7 @@ count ()
}
-static
-int
+static int
func (a, b)
struct op *a;
struct op *b;
@@ -565,7 +583,6 @@ func (a, b)
struct tok_struct
{
-
char *match;
char *token;
int length;
@@ -573,7 +590,6 @@ struct tok_struct
struct tok_struct args[] =
{
-
{"address_src(rs)", "CLASS_X+(ARG_RS)",},
{"address_dst(rd)", "CLASS_X+(ARG_RD)",},
@@ -616,6 +632,8 @@ struct tok_struct args[] =
{"@ra", "CLASS_IR+(ARG_RA)",},
{"@rb", "CLASS_IR+(ARG_RB)",},
{"@rs", "CLASS_IR+(ARG_RS)",},
+ {"@ri", "CLASS_IRO+(ARG_RS)",},
+ {"@ro", "CLASS_IRO+(ARG_RD)",},
{"imm8", "CLASS_IMM+(ARG_IMM8)",},
{"i2", "CLASS_IMM+(ARG_IMM2)",},
@@ -741,7 +759,7 @@ translate (table, x, length)
return x;
}
-void
+static void
chewbits (bits, length)
char *bits;
int *length;
@@ -769,9 +787,7 @@ chewbits (bits, length)
printf ("}");
}
-
-static
-int
+static int
chewname (name)
char **name;
{
@@ -813,8 +829,7 @@ chewname (name)
return nargs;
}
-static
-void
+static void
sub (x, c)
char *x;
char c;
@@ -835,6 +850,7 @@ sub (x, c)
#if 0
#define D(x) ((x) == '1' || (x) =='0')
#define M(y) (strncmp(y,x,4)==0)
+static void
printmangled (x)
char *x;
{
@@ -866,10 +882,10 @@ printmangled (x)
}
}
-
#endif
+
/*#define WORK_TYPE*/
-void
+static void
print_type (n)
struct op *n;
{
@@ -896,8 +912,7 @@ print_type (n)
#endif
}
-
-void
+static void
internal ()
{
int c = count ();
@@ -905,15 +920,13 @@ internal ()
struct op *p = opt;
memcpy (new, p, c * sizeof (struct op));
- /* sort all names in table alphabetically */
+ /* Sort all names in table alphabetically. */
qsort (new, c, sizeof (struct op), func);
p = new;
- while (p->flags[0] != '*')
+ while (p->flags && p->flags[0] != '*')
{
- /* If there are any @rs, sub the ssss into a ssn0,
- (rs), (ssn0)
- */
+ /* If there are any @rs, sub the ssss into a ssn0, (rs), (ssn0). */
int loop = 1;
printf ("\"%s\",%2d, ", p->flags, p->cycles);
@@ -928,7 +941,7 @@ internal ()
{
char c;
- /* skip the r and sub the string */
+ /* Skip the r and sub the string. */
s++;
c = s[1];
sub (p->bits, c);
@@ -952,8 +965,7 @@ internal ()
}
}
-static
-void
+static void
gas ()
{
int c = count ();
@@ -964,7 +976,7 @@ gas ()
memcpy (new, p, c * sizeof (struct op));
- /* sort all names in table alphabetically */
+ /* Sort all names in table alphabetically. */
qsort (new, c, sizeof (struct op), func);
printf ("/* DO NOT EDIT! -*- buffer-read-only: t -*-\n");
@@ -981,6 +993,7 @@ gas ()
printf ("#define ARG_RB 0x04\n");
printf ("#define ARG_RR 0x05\n");
printf ("#define ARG_RX 0x06\n");
+
printf ("#define ARG_IMM4 0x01\n");
printf ("#define ARG_IMM8 0x02\n");
printf ("#define ARG_IMM16 0x03\n");
@@ -998,7 +1011,7 @@ gas ()
printf ("#define ARG_NIM4 0x0c\n");
printf ("#define ARG_DISP8 0x0c\n");
printf ("#define ARG_IMM4M1 0x0d\n");
- printf ("#define CLASS_MASK 0x1fff0\n");
+
printf ("#define CLASS_X 0x10\n");
printf ("#define CLASS_BA 0x20\n");
printf ("#define CLASS_DA 0x30\n");
@@ -1018,9 +1031,10 @@ gas ()
printf ("#define CLASS_BIT 0x500\n");
printf ("#define CLASS_FLAGS 0x600\n");
printf ("#define CLASS_IR 0x700\n");
- printf ("#define CLASS_DISP8 0x800\n");
+ printf ("#define CLASS_IRO 0x800\n");
+ printf ("#define CLASS_DISP8 0x900\n");
- printf ("#define CLASS_BIT_1OR2 0x900\n");
+ printf ("#define CLASS_BIT_1OR2 0xa00\n");
printf ("#define CLASS_REG 0x7000\n");
printf ("#define CLASS_REG_BYTE 0x2000\n");
printf ("#define CLASS_REG_WORD 0x3000\n");
@@ -1028,6 +1042,7 @@ gas ()
printf ("#define CLASS_REG_LONG 0x5000\n");
printf ("#define CLASS_REGN0 0x8000\n");
printf ("#define CLASS_PR 0x10000\n");
+ printf ("#define CLASS_MASK 0x1fff0\n");
printf ("#define OPC_adc 0\n");
printf ("#define OPC_adcb 1\n");
@@ -1085,139 +1100,155 @@ gas ()
printf ("#define OPC_incb 53\n");
printf ("#define OPC_ind 54\n");
printf ("#define OPC_indb 55\n");
- printf ("#define OPC_inib 56\n");
- printf ("#define OPC_inibr 57\n");
- printf ("#define OPC_iret 58\n");
- printf ("#define OPC_jp 59\n");
- printf ("#define OPC_jr 60\n");
- printf ("#define OPC_ld 61\n");
- printf ("#define OPC_lda 62\n");
- printf ("#define OPC_ldar 63\n");
- printf ("#define OPC_ldb 64\n");
- printf ("#define OPC_ldctl 65\n");
- printf ("#define OPC_ldir 66\n");
- printf ("#define OPC_ldirb 67\n");
- printf ("#define OPC_ldk 68\n");
- printf ("#define OPC_ldl 69\n");
- printf ("#define OPC_ldm 70\n");
- printf ("#define OPC_ldps 71\n");
- printf ("#define OPC_ldr 72\n");
- printf ("#define OPC_ldrb 73\n");
- printf ("#define OPC_ldrl 74\n");
- printf ("#define OPC_mbit 75\n");
- printf ("#define OPC_mreq 76\n");
- printf ("#define OPC_mres 77\n");
- printf ("#define OPC_mset 78\n");
- printf ("#define OPC_mult 79\n");
- printf ("#define OPC_multl 80\n");
- printf ("#define OPC_neg 81\n");
- printf ("#define OPC_negb 82\n");
- printf ("#define OPC_nop 83\n");
- printf ("#define OPC_or 84\n");
- printf ("#define OPC_orb 85\n");
- printf ("#define OPC_out 86\n");
- printf ("#define OPC_outb 87\n");
- printf ("#define OPC_outd 88\n");
- printf ("#define OPC_outdb 89\n");
- printf ("#define OPC_outib 90\n");
- printf ("#define OPC_outibr 91\n");
- printf ("#define OPC_pop 92\n");
- printf ("#define OPC_popl 93\n");
- printf ("#define OPC_push 94\n");
- printf ("#define OPC_pushl 95\n");
- printf ("#define OPC_res 96\n");
- printf ("#define OPC_resb 97\n");
- printf ("#define OPC_resflg 98\n");
- printf ("#define OPC_ret 99\n");
- printf ("#define OPC_rl 100\n");
- printf ("#define OPC_rlb 101\n");
- printf ("#define OPC_rlc 102\n");
- printf ("#define OPC_rlcb 103\n");
- printf ("#define OPC_rldb 104\n");
- printf ("#define OPC_rr 105\n");
- printf ("#define OPC_rrb 106\n");
- printf ("#define OPC_rrc 107\n");
- printf ("#define OPC_rrcb 108\n");
- printf ("#define OPC_rrdb 109\n");
- printf ("#define OPC_sbc 110\n");
- printf ("#define OPC_sbcb 111\n");
- printf ("#define OPC_sda 112\n");
- printf ("#define OPC_sdab 113\n");
- printf ("#define OPC_sdal 114\n");
- printf ("#define OPC_sdl 115\n");
- printf ("#define OPC_sdlb 116\n");
- printf ("#define OPC_sdll 117\n");
- printf ("#define OPC_set 118\n");
- printf ("#define OPC_setb 119\n");
- printf ("#define OPC_setflg 120\n");
- printf ("#define OPC_sinb 121\n");
- printf ("#define OPC_sind 122\n");
- printf ("#define OPC_sindb 123\n");
- printf ("#define OPC_sinib 124\n");
- printf ("#define OPC_sinibr 125\n");
- printf ("#define OPC_sla 126\n");
- printf ("#define OPC_slab 127\n");
- printf ("#define OPC_slal 128\n");
- printf ("#define OPC_sll 129\n");
- printf ("#define OPC_sllb 130\n");
- printf ("#define OPC_slll 131\n");
- printf ("#define OPC_sout 132\n");
- printf ("#define OPC_soutb 133\n");
- printf ("#define OPC_soutd 134\n");
- printf ("#define OPC_soutdb 135\n");
- printf ("#define OPC_soutib 136\n");
- printf ("#define OPC_soutibr 137\n");
- printf ("#define OPC_sra 138\n");
- printf ("#define OPC_srab 139\n");
- printf ("#define OPC_sral 140\n");
- printf ("#define OPC_srl 141\n");
- printf ("#define OPC_srlb 142\n");
- printf ("#define OPC_srll 143\n");
- printf ("#define OPC_sub 144\n");
- printf ("#define OPC_subb 145\n");
- printf ("#define OPC_subl 146\n");
- printf ("#define OPC_tcc 147\n");
- printf ("#define OPC_tccb 148\n");
- printf ("#define OPC_test 149\n");
- printf ("#define OPC_testb 150\n");
- printf ("#define OPC_testl 151\n");
- printf ("#define OPC_trdb 152\n");
- printf ("#define OPC_trdrb 153\n");
- printf ("#define OPC_trib 154\n");
- printf ("#define OPC_trirb 155\n");
- printf ("#define OPC_trtdrb 156\n");
- printf ("#define OPC_trtib 157\n");
- printf ("#define OPC_trtirb 158\n");
- printf ("#define OPC_trtrb 159\n");
- printf ("#define OPC_tset 160\n");
- printf ("#define OPC_tsetb 161\n");
- printf ("#define OPC_xor 162\n");
- printf ("#define OPC_xorb 163\n");
-
- printf ("#define OPC_ldd 164 \n");
- printf ("#define OPC_lddb 165 \n");
- printf ("#define OPC_lddr 166 \n");
- printf ("#define OPC_lddrb 167 \n");
- printf ("#define OPC_ldi 168 \n");
- printf ("#define OPC_ldib 169 \n");
- printf ("#define OPC_sc 170\n");
- printf ("#define OPC_bpt 171\n");
- printf ("#define OPC_ext0e 172\n");
- printf ("#define OPC_ext0f 172\n");
- printf ("#define OPC_ext8e 172\n");
- printf ("#define OPC_ext8f 172\n");
- printf ("#define OPC_rsvd36 172\n");
- printf ("#define OPC_rsvd38 172\n");
- printf ("#define OPC_rsvd78 172\n");
- printf ("#define OPC_rsvd7e 172\n");
- printf ("#define OPC_rsvd9d 172\n");
- printf ("#define OPC_rsvd9f 172\n");
- printf ("#define OPC_rsvdb9 172\n");
- printf ("#define OPC_rsvdbf 172\n");
- printf ("#define OPC_outi 173\n");
- printf ("#define OPC_ldctlb 174\n");
- printf ("#define OPC_sin 175\n");
- printf ("#define OPC_trtdb 176\n");
+ printf ("#define OPC_indr 56\n");
+ printf ("#define OPC_indrb 57\n");
+ printf ("#define OPC_ini 58\n");
+ printf ("#define OPC_inib 59\n");
+ printf ("#define OPC_inir 60\n");
+ printf ("#define OPC_inirb 61\n");
+ printf ("#define OPC_iret 62\n");
+ printf ("#define OPC_jp 63\n");
+ printf ("#define OPC_jr 64\n");
+ printf ("#define OPC_ld 65\n");
+ printf ("#define OPC_lda 66\n");
+ printf ("#define OPC_ldar 67\n");
+ printf ("#define OPC_ldb 68\n");
+ printf ("#define OPC_ldctl 69\n");
+ printf ("#define OPC_ldir 70\n");
+ printf ("#define OPC_ldirb 71\n");
+ printf ("#define OPC_ldk 72\n");
+ printf ("#define OPC_ldl 73\n");
+ printf ("#define OPC_ldm 74\n");
+ printf ("#define OPC_ldps 75\n");
+ printf ("#define OPC_ldr 76\n");
+ printf ("#define OPC_ldrb 77\n");
+ printf ("#define OPC_ldrl 78\n");
+ printf ("#define OPC_mbit 79\n");
+ printf ("#define OPC_mreq 80\n");
+ printf ("#define OPC_mres 81\n");
+ printf ("#define OPC_mset 82\n");
+ printf ("#define OPC_mult 83\n");
+ printf ("#define OPC_multl 84\n");
+ printf ("#define OPC_neg 85\n");
+ printf ("#define OPC_negb 86\n");
+ printf ("#define OPC_nop 87\n");
+ printf ("#define OPC_or 88\n");
+ printf ("#define OPC_orb 89\n");
+ printf ("#define OPC_otdr 90\n");
+ printf ("#define OPC_otdrb 91\n");
+ printf ("#define OPC_otir 92\n");
+ printf ("#define OPC_otirb 93\n");
+ printf ("#define OPC_out 94\n");
+ printf ("#define OPC_outb 95\n");
+ printf ("#define OPC_outd 96\n");
+ printf ("#define OPC_outdb 97\n");
+ printf ("#define OPC_outi 98\n");
+ printf ("#define OPC_outib 99\n");
+ printf ("#define OPC_pop 100\n");
+ printf ("#define OPC_popl 101\n");
+ printf ("#define OPC_push 102\n");
+ printf ("#define OPC_pushl 103\n");
+ printf ("#define OPC_res 104\n");
+ printf ("#define OPC_resb 105\n");
+ printf ("#define OPC_resflg 106\n");
+ printf ("#define OPC_ret 107\n");
+ printf ("#define OPC_rl 108\n");
+ printf ("#define OPC_rlb 109\n");
+ printf ("#define OPC_rlc 110\n");
+ printf ("#define OPC_rlcb 111\n");
+ printf ("#define OPC_rldb 112\n");
+ printf ("#define OPC_rr 113\n");
+ printf ("#define OPC_rrb 114\n");
+ printf ("#define OPC_rrc 115\n");
+ printf ("#define OPC_rrcb 116\n");
+ printf ("#define OPC_rrdb 117\n");
+ printf ("#define OPC_sbc 118\n");
+ printf ("#define OPC_sbcb 119\n");
+ printf ("#define OPC_sda 120\n");
+ printf ("#define OPC_sdab 121\n");
+ printf ("#define OPC_sdal 122\n");
+ printf ("#define OPC_sdl 123\n");
+ printf ("#define OPC_sdlb 124\n");
+ printf ("#define OPC_sdll 125\n");
+ printf ("#define OPC_set 126\n");
+ printf ("#define OPC_setb 127\n");
+ printf ("#define OPC_setflg 128\n");
+ printf ("#define OPC_sin 129\n");
+ printf ("#define OPC_sinb 130\n");
+ printf ("#define OPC_sind 131\n");
+ printf ("#define OPC_sindb 132\n");
+ printf ("#define OPC_sindr 133\n");
+ printf ("#define OPC_sindrb 134\n");
+ printf ("#define OPC_sini 135\n");
+ printf ("#define OPC_sinib 136\n");
+ printf ("#define OPC_sinir 137\n");
+ printf ("#define OPC_sinirb 138\n");
+ printf ("#define OPC_sla 139\n");
+ printf ("#define OPC_slab 140\n");
+ printf ("#define OPC_slal 141\n");
+ printf ("#define OPC_sll 142\n");
+ printf ("#define OPC_sllb 143\n");
+ printf ("#define OPC_slll 144\n");
+ printf ("#define OPC_sotdr 145\n");
+ printf ("#define OPC_sotdrb 146\n");
+ printf ("#define OPC_sotir 147\n");
+ printf ("#define OPC_sotirb 148\n");
+ printf ("#define OPC_sout 149\n");
+ printf ("#define OPC_soutb 150\n");
+ printf ("#define OPC_soutd 151\n");
+ printf ("#define OPC_soutdb 152\n");
+ printf ("#define OPC_souti 153\n");
+ printf ("#define OPC_soutib 154\n");
+ printf ("#define OPC_sra 155\n");
+ printf ("#define OPC_srab 156\n");
+ printf ("#define OPC_sral 157\n");
+ printf ("#define OPC_srl 158\n");
+ printf ("#define OPC_srlb 159\n");
+ printf ("#define OPC_srll 160\n");
+ printf ("#define OPC_sub 161\n");
+ printf ("#define OPC_subb 162\n");
+ printf ("#define OPC_subl 163\n");
+ printf ("#define OPC_tcc 164\n");
+ printf ("#define OPC_tccb 165\n");
+ printf ("#define OPC_test 166\n");
+ printf ("#define OPC_testb 167\n");
+ printf ("#define OPC_testl 168\n");
+ printf ("#define OPC_trdb 169\n");
+ printf ("#define OPC_trdrb 170\n");
+ printf ("#define OPC_trib 171\n");
+ printf ("#define OPC_trirb 172\n");
+ printf ("#define OPC_trtdrb 173\n");
+ printf ("#define OPC_trtib 174\n");
+ printf ("#define OPC_trtirb 175\n");
+ printf ("#define OPC_trtrb 176\n");
+ printf ("#define OPC_tset 177\n");
+ printf ("#define OPC_tsetb 178\n");
+ printf ("#define OPC_xor 179\n");
+ printf ("#define OPC_xorb 180\n");
+
+ printf ("#define OPC_ldd 181\n");
+ printf ("#define OPC_lddb 182\n");
+ printf ("#define OPC_lddr 183\n");
+ printf ("#define OPC_lddrb 184\n");
+ printf ("#define OPC_ldi 185\n");
+ printf ("#define OPC_ldib 186\n");
+ printf ("#define OPC_sc 187\n");
+ printf ("#define OPC_bpt 188\n");
+ printf ("#define OPC_ext0e 188\n");
+ printf ("#define OPC_ext0f 188\n");
+ printf ("#define OPC_ext8e 188\n");
+ printf ("#define OPC_ext8f 188\n");
+ printf ("#define OPC_rsvd36 188\n");
+ printf ("#define OPC_rsvd38 188\n");
+ printf ("#define OPC_rsvd78 188\n");
+ printf ("#define OPC_rsvd7e 188\n");
+ printf ("#define OPC_rsvd9d 188\n");
+ printf ("#define OPC_rsvd9f 188\n");
+ printf ("#define OPC_rsvdb9 188\n");
+ printf ("#define OPC_rsvdbf 188\n");
+ printf ("#define OPC_ldctlb 189\n");
+ printf ("#define OPC_trtdb 190\n");
+ printf ("#define OPC_brk 191\n");
#if 0
for (i = 0; toks[i].token; i++)
printf ("#define %s\t0x%x\n", toks[i].token, i * 16);
@@ -1290,7 +1321,6 @@ gas ()
printf ("#endif\n");
}
-
int
main (ac, av)
int ac;
@@ -1315,16 +1345,11 @@ main (ac, av)
{
gas ();
}
- else if (ac == 2 && strcmp (av[1], "-d") == 0)
- {
- /*dis();*/
- }
else
{
printf ("Usage: %s -t\n", av[0]);
- printf ("-t : generate new z8.c internal table\n");
+ printf ("-t : generate new internal table\n");
printf ("-a : generate new table for gas\n");
- printf ("-d : generate new table for disassemble\n");
printf ("-h : generate new table for humans\n");
}
return 0;
diff --git a/readline/ChangeLog.gdb b/readline/ChangeLog.gdb
index 28376b78e8b..affba35f7c1 100644
--- a/readline/ChangeLog.gdb
+++ b/readline/ChangeLog.gdb
@@ -1,3 +1,13 @@
+2003-06-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * support/config.guess: Update to 2003-06-12 version.
+ * support/config.sub: Update to 2003-06-13 version.
+
+2003-05-25 Mark Kettenis <kettenis@gnu.org>
+
+ * aclocal.m4: Don't add wcwidth.o if we don't have wchar.h.
+ * configure: Regenerate.
+
2003-05-13 Andreas Jaeger <aj@suse.de>
* support/config.guess: Update to 2003-05-09 version.
diff --git a/readline/aclocal.m4 b/readline/aclocal.m4
index bc43d8db013..a87e2dcb93b 100644
--- a/readline/aclocal.m4
+++ b/readline/aclocal.m4
@@ -1654,13 +1654,13 @@ AC_CHECK_HEADERS(langinfo.h)
AC_CHECK_FUNC(mbrtowc, AC_DEFINE(HAVE_MBRTOWC))
AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE(HAVE_MBSRTOWCS))
-AC_CHECK_FUNC(wcwidth, have_wcwidth=yes)
-if test "$have_wcwidth" = yes; then
- AC_DEFINE(HAVE_WCWIDTH)
- AC_SUBST(WCWIDTH_OBJ,)
+AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH))
+if test "$ac_cv_func_wcwidth" = no && test "$ac_cv_header_wchar_h" = yes; then
+ WCWIDTH_OBJ=wcwidth.o
else
- AC_SUBST(WCWIDTH_OBJ,wcwidth.o)
+ WCWIDTH_OBJ=
fi
+AC_SUBST(WCWIDTH_OBJ)
AC_CACHE_CHECK([for mbstate_t], bash_cv_have_mbstate_t,
[AC_TRY_RUN([
diff --git a/readline/configure b/readline/configure
index b5c2e8dcbf9..236327cf7f6 100755
--- a/readline/configure
+++ b/readline/configure
@@ -6235,20 +6235,19 @@ fi
echo "$as_me:$LINENO: result: $ac_cv_func_wcwidth" >&5
echo "${ECHO_T}$ac_cv_func_wcwidth" >&6
if test $ac_cv_func_wcwidth = yes; then
- have_wcwidth=yes
-fi
-
-if test "$have_wcwidth" = yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_WCWIDTH 1
_ACEOF
+fi
-else
+if test "$ac_cv_func_wcwidth" = no && test "$ac_cv_header_wchar_h" = yes; then
WCWIDTH_OBJ=wcwidth.o
-
+else
+ WCWIDTH_OBJ=
fi
+
echo "$as_me:$LINENO: checking for mbstate_t" >&5
echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
if test "${bash_cv_have_mbstate_t+set}" = set; then
diff --git a/readline/support/config.guess b/readline/support/config.guess
index 6bdac8d7b61..fa58459974e 100755
--- a/readline/support/config.guess
+++ b/readline/support/config.guess
@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-timestamp='2003-05-09'
+timestamp='2003-06-12'
# 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
@@ -106,6 +106,7 @@ trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
dummy=$tmp/dummy ;
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
@@ -282,6 +283,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# 1.2 uses "1.2" for uname -r.
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
exit 0 ;;
+ Alpha*:OpenVMS:*:*)
+ echo alpha-hp-vms
+ exit 0 ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# Should we change UNAME_MACHINE based on the output of uname instead
@@ -320,6 +324,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4
exit 0 ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit 0 ;;
DRS?6000:UNIX_SV:4.2*:7*)
case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7 && exit 0 ;;
@@ -767,8 +774,8 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit 0 ;;
- x86:Interix*:3*)
- echo i586-pc-interix3
+ x86:Interix*:[34]*)
+ echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
exit 0 ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
@@ -797,6 +804,9 @@ EOF
arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+ exit 0 ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
diff --git a/readline/support/config.sub b/readline/support/config.sub
index fe4f1edf3c0..725707f709a 100755
--- a/readline/support/config.sub
+++ b/readline/support/config.sub
@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-timestamp='2003-05-09'
+timestamp='2003-06-13'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -229,7 +229,7 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
- | clipper \
+ | c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
| fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
@@ -261,7 +261,7 @@ case $basic_machine in
| sh64 | sh64le \
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
| strongarm \
- | tahoe | thumb | tic80 | tron \
+ | tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
| x86 | xscale | xstormy16 | xtensa \
@@ -771,18 +771,24 @@ case $basic_machine in
pentiumpro | p6 | 6x86 | athlon | athlon_*)
basic_machine=i686-pc
;;
- pentiumii | pentium2)
+ pentiumii | pentium2 | pentiumiii | pentium3)
basic_machine=i686-pc
;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
- pentiumii-* | pentium2-*)
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
pn)
basic_machine=pn-gould
;;
@@ -922,10 +928,6 @@ case $basic_machine in
basic_machine=t90-cray
os=-unicos
;;
- tic4x | c4x*)
- basic_machine=tic4x-unknown
- os=-coff
- ;;
tic54x | c54x*)
basic_machine=tic54x-unknown
os=-coff
@@ -1131,7 +1133,7 @@ case $os in
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix*)
+ | -powermax* | -dnix* | -nx6 | -nx7)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1277,6 +1279,9 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index fb3e1b786ea..c7172f9d152 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,31 @@
+2003-06-23 Michael Snyder <msnyder@redhat.com>
+
+ * nrun.c (main): Delete h8/300 ifdef (sim now handles signals).
+ * sim-reg.c: Fix cut-and-paste bug in comment.
+
+2003-06-22 Andrew Cagney <cagney@redhat.com>
+
+ From matthew green <mrg@redhat.com>:
+ * sim-fpu.h: Update copyright.
+ (sim_fpu_fraction, sim_fpu_guard): New prototypes.
+ * sim-fpu.c: Update copyright.
+ (sim_fpu_fraction, sim_fpu_guard): New inline functions.
+
+2003-06-17 Frank Ch. Eigler <fche@redhat.com>
+
+ From Doug Evans <dje@sebabeach.org>:
+ * cgen-trace.h (sim_disasm_read_memory): Update args to be compatible
+ with disassemble_info:read_memory_func.
+ * cgen-trace.c (sim_disasm_read_memory): Ditto.
+
+2003-06-04 Michael Snyder <msnyder@redhat.com>
+
+ * common/run.c (main): Remove SIM_H8300 ifdef.
+ (usage): Ditto.
+ * common/sim-options.c (STANDARD_OPTIONS): Add SIM_H8300SX.
+ (standard_options): Add '-x' for h8/300sx.
+ (standard_option_handler): Add case for SIM_H8300SX.
+
2003-04-13 Michael Snyder <msnyder@redhat.com>
* Make-common.in (sim-events.o, sim-config.o): Depend on sim-main.h.
diff --git a/sim/common/cgen-trace.c b/sim/common/cgen-trace.c
index 765ab57ab03..d978d3e57f6 100644
--- a/sim/common/cgen-trace.c
+++ b/sim/common/cgen-trace.c
@@ -322,12 +322,12 @@ sim_disasm_sprintf VPARAMS ((SFILE *f, const char *format, ...))
/* Memory read support for an opcodes disassembler. */
int
-sim_disasm_read_memory (bfd_vma memaddr, bfd_byte *myaddr, int length,
+sim_disasm_read_memory (bfd_vma memaddr, bfd_byte *myaddr, unsigned int length,
struct disassemble_info *info)
{
SIM_CPU *cpu = (SIM_CPU *) info->application_data;
SIM_DESC sd = CPU_STATE (cpu);
- int length_read;
+ unsigned length_read;
length_read = sim_core_read_buffer (sd, cpu, read_map, myaddr, memaddr,
length);
diff --git a/sim/common/cgen-trace.h b/sim/common/cgen-trace.h
index be1dd1dff4e..623fc1eb6c7 100644
--- a/sim/common/cgen-trace.h
+++ b/sim/common/cgen-trace.h
@@ -81,7 +81,7 @@ extern int sim_disasm_sprintf (SFILE *, const char *, ...);
#ifdef __BFD_H_SEEN__
struct disassemble_info;
extern int
-sim_disasm_read_memory (bfd_vma memaddr_, bfd_byte *myaddr_, int length_,
+sim_disasm_read_memory (bfd_vma memaddr_, bfd_byte *myaddr_, unsigned int length_,
struct disassemble_info *info_);
extern void
sim_disasm_perror_memory (int status_, bfd_vma memaddr_,
diff --git a/sim/common/nrun.c b/sim/common/nrun.c
index 7c77f5c3b44..8dfa94658b0 100644
--- a/sim/common/nrun.c
+++ b/sim/common/nrun.c
@@ -176,11 +176,6 @@ main (int argc, char **argv)
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)
{
@@ -198,7 +193,6 @@ main (int argc, char **argv)
break;
}
-#endif
return sigrc;
}
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-fpu.c b/sim/common/sim-fpu.c
index 14505f64c4b..845248adb59 100644
--- a/sim/common/sim-fpu.c
+++ b/sim/common/sim-fpu.c
@@ -2,7 +2,7 @@
of the floating point routines in libgcc1.c for targets without
hardware floating point. */
-/* Copyright (C) 1994,1997-1998 Free Software Foundation, Inc.
+/* Copyright 1994, 1997, 1998, 2003 Free Software Foundation, Inc.
This file is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@@ -2188,6 +2188,22 @@ sim_fpu_exp (const sim_fpu *d)
}
+INLINE_SIM_FPU (unsigned64)
+sim_fpu_fraction (const sim_fpu *d)
+{
+ return d->fraction;
+}
+
+
+INLINE_SIM_FPU (unsigned64)
+sim_fpu_guard (const sim_fpu *d, int is_double)
+{
+ unsigned64 rv;
+ unsigned64 guardmask = LSMASK64 (NR_GUARDS - 1, 0);
+ rv = (d->fraction & guardmask) >> NR_PAD;
+ return rv;
+}
+
INLINE_SIM_FPU (int)
sim_fpu_is (const sim_fpu *d)
diff --git a/sim/common/sim-fpu.h b/sim/common/sim-fpu.h
index 72323f5247b..579fbaaf152 100644
--- a/sim/common/sim-fpu.h
+++ b/sim/common/sim-fpu.h
@@ -1,5 +1,7 @@
/* Simulator Floating-point support.
- Copyright (C) 1997, 1998, 2002 Free Software Foundation, Inc.
+
+ Copyright 1997, 1998, 2002, 2003 Free Software Foundation, Inc.
+
Contributed by Cygnus Support.
This file is part of GDB, the GNU debugger.
@@ -316,6 +318,8 @@ INLINE_SIM_FPU (int) sim_fpu_is_denorm (const sim_fpu *s); /* !zero */
INLINE_SIM_FPU (int) sim_fpu_sign (const sim_fpu *s);
INLINE_SIM_FPU (int) sim_fpu_exp (const sim_fpu *s);
+INLINE_SIM_FPU (unsigned64) sim_fpu_fraction (const sim_fpu *s);
+INLINE_SIM_FPU (unsigned64) sim_fpu_guard (const sim_fpu *s, int is_double);
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/common/sim-reg.c b/sim/common/sim-reg.c
index 3f3dc41cd47..75cfb0a25a9 100644
--- a/sim/common/sim-reg.c
+++ b/sim/common/sim-reg.c
@@ -36,8 +36,8 @@ sim_fetch_register (SIM_DESC sd, int rn, unsigned char *buf, int length)
return (* CPU_REG_FETCH (cpu)) (cpu, rn, buf, length);
}
-/* Generic implementation of sim_fetch_register for simulators using
- CPU_REG_FETCH.
+/* Generic implementation of sim_store_register for simulators using
+ CPU_REG_STORE.
The contents of BUF are in target byte order. */
/* ??? Obviously the interface needs to be extended to handle multiple
cpus. */
diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog
index 3256284ad41..f8e70a531c5 100644
--- a/sim/d10v/ChangeLog
+++ b/sim/d10v/ChangeLog
@@ -1,3 +1,8 @@
+2003-06-22 Andrew Cagney <cagney@redhat.com>
+
+ * interp.c (xfer_mem): Simplify. Only do a single partial
+ transfer. Problem reported by Tom Rix.
+
2003-05-07 Andrew Cagney <cagney@redhat.com>
* interp.c (sim_d10v_translate_addr): Add "regcache" parameter.
diff --git a/sim/d10v/interp.c b/sim/d10v/interp.c
index 30239ab0247..284a4e144c4 100644
--- a/sim/d10v/interp.c
+++ b/sim/d10v/interp.c
@@ -720,49 +720,39 @@ xfer_mem (SIM_ADDR virt,
int size,
int write_p)
{
- int xfered = 0;
-
- while (0 < size)
- {
- uint8 *memory;
- unsigned long phys;
- int phys_size;
- phys_size = sim_d10v_translate_addr (virt, size, &phys, NULL,
- dmap_register, imap_register);
- if (phys_size == 0)
- return xfered;
+ uint8 *memory;
+ unsigned long phys;
+ int phys_size;
+ phys_size = sim_d10v_translate_addr (virt, size, &phys, NULL,
+ dmap_register, imap_register);
+ if (phys_size == 0)
+ return 0;
- memory = map_memory (phys);
+ memory = map_memory (phys);
#ifdef DEBUG
- if ((d10v_debug & DEBUG_INSTRUCTION) != 0)
- {
- (*d10v_callback->printf_filtered)
- (d10v_callback,
- "sim_%s %d bytes: 0x%08lx (%s) -> 0x%08lx (%s) -> 0x%08lx (%s)\n",
+ if ((d10v_debug & DEBUG_INSTRUCTION) != 0)
+ {
+ (*d10v_callback->printf_filtered)
+ (d10v_callback,
+ "sim_%s %d bytes: 0x%08lx (%s) -> 0x%08lx (%s) -> 0x%08lx (%s)\n",
(write_p ? "write" : "read"),
- phys_size, virt, last_from,
- phys, last_to,
- (long) memory, last_segname);
- }
+ phys_size, virt, last_from,
+ phys, last_to,
+ (long) memory, last_segname);
+ }
#endif
- if (write_p)
- {
- memcpy (memory, buffer, phys_size);
- }
- else
- {
- memcpy (buffer, memory, phys_size);
- }
-
- virt += phys_size;
- buffer += phys_size;
- xfered += phys_size;
- size -= phys_size;
+ if (write_p)
+ {
+ memcpy (memory, buffer, phys_size);
}
-
- return xfered;
+ else
+ {
+ memcpy (buffer, memory, phys_size);
+ }
+
+ return phys_size;
}
diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog
index 600e9cc08a9..cd81e6eed8b 100644
--- a/sim/h8300/ChangeLog
+++ b/sim/h8300/ChangeLog
@@ -1,3 +1,41 @@
+2003-06-18 Michael Snyder <msnyder@redhat.com>
+
+ * compile.c: Replace "Hitachi" with "Renesas".
+ (decode): Distinguish AV_H8S from AV_H8H.
+ (sim_resume): H8SX can use any register for TAS.
+ (decode): Add support for VECIND.
+ (sim_resume): Implement rte/l and rts/l.
+ (GETSR): New macro (actually old macro reincarnated).
+ (decode): Add handling for IMM2.
+ (sim_resume): Drop extra block around jmp, jsr, rts.
+ Add handling for trapa and rte.
+ For divxu.b, change 0xffff mask to 0xff.
+ (set_h8300h): Add bfd_mach_h8300sxn machine.
+
+2003-06-18 Corinna Vinschen <vinschen@redhat.com>
+
+ * sim-main.h (enum h8_regnum): Turn around order of MACH, MACL
+ and SBR, VBR.
+
+2003-06-05 Michael Snyder <msnyder@redhat.com>
+
+ * compile.c (sim_fetch_register): Handle SBR, VBR, MACH, MACL.
+ (sim_store_register): Ditto.
+
+2003-06-04 Michael Snyder <msnyder@redhat.com>
+
+ * compile.c (sim_info): Fix typo in output.
+
+ * 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..f416695277d 100644
--- a/sim/h8300/compile.c
+++ b/sim/h8300/compile.c
@@ -1,5 +1,5 @@
/*
- * Simulator for the Hitachi H8/300 architecture.
+ * Simulator for the Renesas (formerly Hitachi) H8/300 architecture.
*
* Written by Steve Chamberlain of Cygnus Support. sac@cygnus.com
*
@@ -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,452 @@ 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)
+
+#define GETSR(SD) \
+ /* 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
+
#ifdef __CHAR_IS_SIGNED__
#define SEXTCHAR(x) ((char) (x))
@@ -121,17 +508,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 +534,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 +583,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 +601,19 @@ 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_H8S && !h8300smode) ||
+ (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 +622,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;
- if ((int) looking_for & (int) B30)
+ looking_for = (op_type) (looking_for & ~B11);
+ thisnib &= 0xd;
+ }
+ else if (looking_for & B10)
{
- if (!(((int) thisnib & 0x8) == 0))
+ if (!((thisnib & 0x2) == 0))
goto fail;
- looking_for = (op_type) ((int) looking_for & ~(int) B30);
+ looking_for = (op_type) (looking_for & ~B10);
}
- if (looking_for & DBIT)
+ if (looking_for & B01)
+ {
+ if (!((thisnib & 0x1) != 0))
+ goto fail;
+
+ looking_for = (op_type) (looking_for & ~B01);
+ thisnib &= 0xe;
+ }
+ else if (looking_for & B00)
+ {
+ if (!((thisnib & 0x1) == 0))
+ goto fail;
+
+ 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 +704,449 @@ 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 & 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)
+ {
+ reg[opnum] = thisnib;
}
- else if (looking_for & (REG | IND | INC | DEC))
+ else if (looking_for & CTRL)
{
- if (looking_for & REG)
+ 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 & SIZE) == L_16 ||
+ (looking_for & SIZE) == L_16U)
+ {
+ 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 & ABSJMP)
{
- abs = (data[1] << 16) | (data[2] << 8) | (data[3]);
+ 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 & MEMIND)
+ else if ((looking_for & MODE) == MEMIND)
{
- abs = data[1];
+ cst[opnum] = data[1];
}
- else if (looking_for & L_32)
+ else if ((looking_for & MODE) == VECIND)
{
- int i = len >> 1;
-
- abs = (data[i] << 24)
- | (data[i + 1] << 16)
- | (data[i + 2] << 8)
- | (data[i + 3]);
-
- plen = 32;
+ /* FIXME: Multiplier should be 2 for "normal" mode. */
+ cst[opnum] = ((data[1] & 0x7f) + 0x80) * 4;
+ cst[opnum] += h8_get_vbr (sd); /* Add vector base reg. */
}
- 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)
- {
- abs = SEXTCHAR (data[len >> 1]);
- }
- else if (looking_for & ABS8MEM)
+ if ((looking_for & MODE) == ABS)
{
- 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_2)
{
- plen = 3;
-
- bit = thisnib;
+ cst[opnum] = thisnib & 3;
+ }
+ else if ((looking_for & SIZE) == L_3 ||
+ (looking_for & SIZE) == L_3NZ)
+ {
+ 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 & MODE) == LOWREG)
+ {
+ p->type = X (OP_LOWREG, bitfrom (x));
+ p->reg = reg[opnum];
+ }
+ else if ((x & MODE) == PREINC)
+ {
+ /* 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 & MODE) == POSTINC)
+ {
+ /* 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 & INC)
+ else if ((x & MODE) == PREDEC)
{
- p->type = X (OP_INC, size);
- p->reg = rn & 0x7;
+ /* 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 & DEC)
+ else if ((x & MODE) == POSTDEC)
{
- p->type = X (OP_DEC, size);
- p->reg = rn & 0x7;
+ /* 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 & IND)
+ else if ((x & MODE) == IND)
{
- p->type = X (OP_DISP, size);
- p->reg = rn & 0x7;
+ /* 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 ||
+ (x & MODE) == VECIND)
{
- 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 0x%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)
{
@@ -499,7 +1182,7 @@ decode (int addr, unsigned char *data, decoded_inst *dst)
return;
}
else
- printf ("Don't understand %x \n", looking_for);
+ printf ("Don't understand 0x%x \n", looking_for);
}
len++;
@@ -509,165 +1192,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);
- t &= cpu.mask;
+ 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);
- 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_POSTINC, SW): /* Register indirect w/post-incr: 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_POSTINC, SL): /* Register indirect w/post-incr: 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;
- t += 4;
- t = t & cpu.mask;
+ case X (OP_POSTDEC, SB): /* Register indirect w/post-decr: 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);
- return r;
+ *val = r;
+ break;
+ case X (OP_POSTDEC, SW): /* Register indirect w/post-decr: 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_POSTDEC, SL): /* Register indirect w/post-decr: 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_DISP, SB):
+ 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;
+
+ 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);
+ *val = GET_MEMORY_W (t);
+ break;
+
+ 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 +1537,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_DEC, SW):
- t = (GET_L_REG (rn) - 2) & cpu.mask;
+ 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_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 +1736,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 +1756,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 +1818,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 +1890,56 @@ 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;
+ }
+
+ /* Get Status Register (flags). */
+ GETSR (sd);
- GETSR ();
- GETEXR ();
+ 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 +1947,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 +1963,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;
- case O (O_SUBX, SB):
- rd = fetch (&code->dst);
- ea = fetch (&code->src);
+ 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_ADDX, SB):
- rd = fetch (&code->dst);
- ea = fetch (&code->src);
- ea = C + ea;
+ 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, 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;
-#define EA ea = fetch (&code->src);
-#define RD_EA ea = fetch (&code->src); rd = fetch (&code->dst);
+ 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;
- 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_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_ADD, SB):
- rd = GET_B_REG (code->dst.reg);
- ea = fetch (&code->src);
+ 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;
- case O (O_ADD, SW):
- rd = GET_W_REG (code->dst.reg);
- ea = fetch (&code->src);
+
+ 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;
- case O (O_ADD, SL):
- rd = GET_L_REG (code->dst.reg);
- ea = fetch (&code->src);
+
+ 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_NEG, SB): /* neg.b */
+ /* Fetch ea. */
+ if (fetch2 (sd, &code->src, &ea))
+ goto end;
+ ea = -ea;
+ rd = 0;
+ res = rd + ea;
+ goto alu8;
- LOGOP (O_AND, RD_EA;
- res = rd & ea);
+ 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;
- LOGOP (O_OR, RD_EA;
- res = rd | ea);
+ 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;
- LOGOP (O_XOR, RD_EA;
- res = rd ^ ea);
+ 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;
+ 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;
- case O (O_MOV_TO_MEM, SB):
- res = GET_B_REG (code->src.reg);
+ 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;
+
+ 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_MOV_TO_MEM, SW):
- res = GET_W_REG (code->src.reg);
+
+ 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_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_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_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_TO_REG, SB):
- res = fetch (&code->src);
- SET_B_REG (code->dst.reg, res);
+ 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): /* movmd.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): /* movmd.w */
+ 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): /* movmd.l */
+ 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, SB):
- case O (O_LDC, SW):
- res = fetch (&code->src);
+ case O (O_LDC, SW): /* ldc.w */
+ if (fetch (sd, &code->src, &res))
+ goto end;
+
+ /* 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 +2511,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 +2529,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 +2547,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;
- case O (O_BRA, SB):
+ 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, 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 +2711,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 +2744,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 +2755,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 +2767,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 +2778,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 +2828,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 +2852,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 +2889,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 +2917,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 +2958,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 +2981,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 +2996,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 +3043,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 +3063,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 +3083,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 +3092,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,356 +3118,1244 @@ 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_JSR, SB):
- {
- int tmp;
- pc = fetch (&code->src);
- call:
- tmp = cpu.regs[7];
+ 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;
- if (h8300hmode)
+ 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))
{
- tmp -= 4;
- SET_MEMORY_L (tmp, code->next_pc);
+ c = rd & 0x80;
+ rd <<= 1;
+ if (c)
+ rd |= 1;
}
else
{
- tmp -= 2;
- SET_MEMORY_W (tmp, code->next_pc);
+ c = rd & 1;
+ rd = ((unsigned char) rd) >> 1;
+ if (c)
+ rd |= 0x80;
}
- cpu.regs[7] = tmp;
+ v = 0;
+ goto shift8;
+
+ case O (O_ROTL, SW):
+ case O (O_ROTR, SW):
+ if (fetch2 (sd, &code->dst, &rd))
goto end;
- }
- case O (O_BSR, SB):
- pc = code->src.literal;
- goto call;
- case O (O_RTS, SN):
- {
- int tmp;
+ 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;
+ }
- tmp = cpu.regs[7];
+ v = 0;
+ goto shift16;
- if (h8300hmode)
+ 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))
{
- pc = GET_MEMORY_L (tmp);
- tmp += 4;
+ c = rd & 0x80000000;
+ rd <<= 1;
+ if (c)
+ rd |= 1;
}
else
{
- pc = GET_MEMORY_W (tmp);
- tmp += 2;
+ c = rd & 1;
+ rd = ((unsigned int) rd) >> 1;
+ if (c)
+ rd |= 0x80000000;
}
- cpu.regs[7] = tmp;
+ v = 0;
+ goto shift32;
+
+ case O (O_ROTXL, SB):
+ case O (O_ROTXR, SB):
+ if (fetch2 (sd, &code->dst, &rd))
goto end;
- }
- case O (O_ILL, SB):
- cpu.state = SIM_STATE_STOPPED;
- cpu.exception = SIGILL;
+ 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_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_JSR, SN):
+ case O (O_JSR, SL):
+ case O (O_JSR, SB): /* jsr, jump to subroutine */
+ case O (O_JSR, SW):
+ if (fetch (sd, &code->src, &pc))
+ goto end;
+ call:
+ tmp = h8_get_reg (sd, SP_REGNUM);
+
+ if (h8300hmode)
+ {
+ tmp -= 4;
+ SET_MEMORY_L (tmp, code->next_pc);
+ }
else
- cpu.exception = SIGTRAP;
+ {
+ tmp -= 2;
+ SET_MEMORY_W (tmp, code->next_pc);
+ }
+ h8_set_reg (sd, SP_REGNUM, tmp);
+
+ goto end;
+
+ 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_RTE, SN): /* rte, return from exception */
+ rte:
+ /* Pops exr and ccr before pc -- otherwise identical to rts. */
+ tmp = h8_get_reg (sd, SP_REGNUM);
+
+ if (h8300smode) /* pop exr */
+ {
+ h8_set_exr (sd, GET_MEMORY_L (tmp));
+ tmp += 4;
+ }
+ if (h8300hmode)
+ {
+ h8_set_ccr (sd, GET_MEMORY_L (tmp));
+ tmp += 4;
+ pc = GET_MEMORY_L (tmp);
+ tmp += 4;
+ }
+ else
+ {
+ h8_set_ccr (sd, GET_MEMORY_W (tmp));
+ tmp += 2;
+ pc = GET_MEMORY_W (tmp);
+ tmp += 2;
+ }
+
+ GETSR (sd);
+ h8_set_reg (sd, SP_REGNUM, tmp);
+ goto end;
+
+ case O (O_RTS, SN): /* rts, return from subroutine */
+ rts:
+ tmp = h8_get_reg (sd, SP_REGNUM);
+
+ if (h8300hmode)
+ {
+ pc = GET_MEMORY_L (tmp);
+ tmp += 4;
+ }
+ else
+ {
+ pc = GET_MEMORY_W (tmp);
+ tmp += 2;
+ }
+
+ h8_set_reg (sd, SP_REGNUM, tmp);
+ goto end;
+
+ case O (O_ILL, SB): /* illegal */
+ sim_engine_set_run_state (sd, sim_stopped, SIGILL);
+ goto end;
+
+ 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
+ {
+ /* Treat it as a sigtrap. */
+ sim_engine_set_run_state (sd, sim_stopped, SIGTRAP);
+ }
+ goto end;
+
+ case O (O_TRAPA, SB): /* trapa */
+ if (fetch (sd, &code->src, &res))
+ goto end; /* res is vector number. */
+
+ tmp = h8_get_reg (sd, SP_REGNUM);
+ tmp -= 4;
+ SET_MEMORY_L (tmp, code->next_pc);
+ tmp -= 4;
+ SET_MEMORY_L (tmp, h8_get_ccr (sd));
+ intMaskBit = 1;
+ BUILDSR (sd);
+
+ if (h8300smode)
+ {
+ tmp -= 4;
+ SET_MEMORY_L (tmp, h8_get_exr (sd));
+ }
+
+ h8_set_reg (sd, SP_REGNUM, tmp);
+
+ /* FIXME: "normal" mode should use 2-byte ptrs. */
+ pc = GET_MEMORY_L (0x20 + res * 4);
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;
- case O (O_TAS, SB):
- if (!h8300smode || code->src.type != X (OP_REG, SL))
- goto illegal;
- switch (code->src.reg)
+ if (bit != 0)
{
- case R0_REGNUM:
- case R1_REGNUM:
- case R4_REGNUM:
- case R5_REGNUM:
- break;
- default:
- goto illegal;
+ if (fetch (sd, &code->dst, &ea))
+ goto end;
+
+ ea &= bit;
+ while (!(bit & 1))
+ {
+ ea >>= 1;
+ bit >>= 1;
+ }
}
- res = fetch (&code->src);
- store (&code->src, res | 0x80);
- goto just_flags_log8;
+ if (store (sd, &code->op3, ea))
+ goto end;
- 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;
+ goto next;
+ 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;
}
- 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;
- }
+ nz = !h8_get_macZ (sd);
+ n = h8_get_macN (sd);
+ v = h8_get_macV (sd);
- case O (O_DIVS, SB):
- {
+ if (store (sd, &code->dst, res))
+ goto end;
- 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;
+ 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;
}
- case O (O_DIVS, SW):
- {
- rd = GET_L_REG (code->dst.reg);
- ea = SEXTSHORT (GET_W_REG (code->src.reg));
- if (ea)
+ 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 (!h8300sxmode) /* h8sx can use any register. */
+ switch (code->src.reg)
{
- tmp = (int) rd % (int) ea;
- rd = (int) rd / (int) ea;
- n = rd & 0x80000000;
- nz = 1;
+ case R0_REGNUM:
+ case R1_REGNUM:
+ case R4_REGNUM:
+ case R5_REGNUM:
+ break;
+ default:
+ goto illegal;
}
- 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. */
+
+ 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, SW): /* divu.w */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ n = ea & 0x8000;
+ nz = ea & 0xffff;
+ if (ea)
+ res = (unsigned) (UEXTSHORT (rd) / UEXTSHORT (ea));
+ else
+ res = 0;
+
+ if (store (sd, &code->dst, res))
+ goto end;
+ goto next;
+
+ 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 & 0xff) | (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 */
+ case O (O_RTEL, SN): /* rte/l, ldm plus rte */
+ case O (O_RTSL, SN): /* rts/l, ldm plus rts */
{
int nregs, firstreg, i;
- nregs = GET_MEMORY_B (pc + 1);
- nregs >>= 4;
- nregs &= 0xf;
- firstreg = GET_MEMORY_B (pc + 3);
- firstreg &= 0xf;
+ nregs = ((GET_MEMORY_B (pc + 1) >> 4) & 0xf);
+ firstreg = code->dst.reg & 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;
+ switch (code->opcode) {
+ case O (O_RTEL, SN):
+ goto rte;
+ case O (O_RTSL, SN):
+ goto rts;
+ case O (O_LDM, SL):
+ goto next;
+ default:
+ goto illegal;
+ }
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))
+ res = GET_B_REG (code->src.reg); /* FIXME fetch? */
+ 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))
+ 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 && (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);
+ GETSR (sd);
}
- 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 +4364,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 +4381,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 +4388,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 +4395,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 +4431,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 +4441,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 +4452,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 +4462,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 +4475,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 +4492,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 +4509,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 +4538,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 +4576,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 +4586,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 +4607,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 +4628,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 +4646,36 @@ 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 SBR_REGNUM:
+ h8_set_sbr (sd, intval);
+ break;
+ case VBR_REGNUM:
+ h8_set_vbr (sd, intval);
+ break;
+ case MACH_REGNUM:
+ h8_set_mach (sd, intval);
+ break;
+ case MACL_REGNUM:
+ h8_set_macl (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 +4687,38 @@ 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 SBR_REGNUM:
+ v = h8_get_sbr (sd);
+ break;
+ case VBR_REGNUM:
+ v = h8_get_vbr (sd);
+ break;
+ case MACH_REGNUM:
+ v = h8_get_mach (sd);
+ break;
+ case MACL_REGNUM:
+ v = h8_get_macl (sd);
break;
case R0_REGNUM:
case R1_REGNUM:
@@ -2518,18 +4728,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 +4761,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 +4772,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 +4809,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 +4822,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 +4834,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 || machine == bfd_mach_h8300sxn)
+ 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 +4964,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 +4990,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 +5035,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 +5049,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..6acf901d5de
--- /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,
+ MACH_REGNUM = 14,
+ MACL_REGNUM = 15,
+ SBR_REGNUM = 16,
+ VBR_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/mips/ChangeLog b/sim/mips/ChangeLog
index 4d20a000d9f..e5b5216f0d1 100644
--- a/sim/mips/ChangeLog
+++ b/sim/mips/ChangeLog
@@ -1,3 +1,7 @@
+2003-06-17 Richard Sandiford <rsandifo@redhat.com>
+
+ * mips.igen (do_dmultx): Fix check for negative operands.
+
2003-05-16 Ian Lance Taylor <ian@airs.com>
* Makefile.in (SHELL): Make sure this is defined.
diff --git a/sim/mips/mips.igen b/sim/mips/mips.igen
index 81fb2001b27..358c8ab1750 100644
--- a/sim/mips/mips.igen
+++ b/sim/mips/mips.igen
@@ -1347,12 +1347,12 @@
sign = 0;
if (signed_p)
{
- if (op1 < 0)
+ if ((signed64) op1 < 0)
{
op1 = - op1;
++sign;
}
- if (op2 < 0)
+ if ((signed64) op2 < 0)
{
op2 = - op2;
++sign;
diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog
index b7b1de52fda..391cfecedee 100644
--- a/sim/ppc/ChangeLog
+++ b/sim/ppc/ChangeLog
@@ -1,3 +1,128 @@
+2003-06-22 Andrew Cagney <cagney@redhat.com>
+
+ Written by matthew green <mrg@redhat.com>, with fixes from Aldy
+ Hernandez <aldyh@redhat.com>, Jim Wilson <wilson@redhat.com>, and
+ Nick Clifton <nickc@redhat.com>.
+
+ * ppc-instructions: Include altivec.igen and e500.igen.
+ (model_busy, model_data): Add vr_busy and vscr_busy.
+ (model_trace_release): Trace vr_busy and vscr_busy.
+ (model_new_cycle): Update vr_busy and vscr_busy.
+ (model_make_busy): Update vr_busy and vscr_busy.
+ * registers.c (register_description): Add Altivec and e500
+ registers.
+ * psim.c (psim_read_register, psim_read_register): Handle Altivec
+ and e500 registers.
+ * ppc-spr-table (SPEFSCR): Add VRSAVE and SPEFSCR registers.
+ * configure.in (sim_filter): When *altivec* add "av". When *spe*
+ or *simd* add e500.
+ (sim_float): When *altivec* define WITH_ALTIVEC. When *spe* add
+ WITH_E500.
+ * configure: Re-generate.
+ * e500.igen, altivec.igen: New files.
+ * e500_expression.h, altivec_expression.h: New files.
+ * idecode_expression.h: Update copyright. Include
+ "e500_expression.h" and "altivec_expression.h".
+ * e500_registers.h, altivec_registers.h: New files.
+ * registers.h: Update copyright. Include "e500_registers.h" and
+ "altivec_registers.h".
+ (registers): Add Altivec and e500 specific registers.
+ * Makefile.in (IDECODE_H): Add "idecode_e500.h" and
+ "idecode_altivec.h".
+ (REGISTERS_H): Add "e500_registers.h" and "altivec_registers.h".
+ (tmp-igen): Add dependencies on altivec.igen and e500.igen .
+
+2003-06-22 Andrew Cagney <cagney@redhat.com>
+
+ Problems reported by Joshua LeVasseur.
+ * emul_chirp.c: Update copyright.
+ (chirp_emul_nextprop): Return the first property.
+ * hw_htab.c: Update copyright.
+ (htab_decode_hash_table): Fix check for htab size.
+
+2003-06-21 Andrew Cagney <cagney@redhat.com>
+
+ * interrupts.c: Update copyright.
+ (external_interrupt): Fix test for already pending interrupt.
+ Problem found by Joshua LeVasseur.
+
+ * ppc-instructions: Add missing +8 line. Found by blofeldus at
+ yahoo.com.
+
+2003-06-21 Andrew Cagney <cagney@redhat.com>
+
+ From Ian Lance Taylor <ian@airs.com>: * hw_nvram.c
+ (hw_nvram_init_address): Correct call to memset--swap second and
+ third arguments.
+
+2003-06-21 Andrew Cagney <cagney@redhat.com>
+
+ * hw_com.c (hw_com_device_init_data): Check that the output, and
+ not input file opened. Pointed out by masahino tky3.3web.ne.jp.
+
+2003-06-20 Andrew Cagney <cagney@redhat.com>
+
+ * sim_calls.c (sim_create_inferior): Assert that
+ psim_write_register succeeded.
+ (sim_fetch_register, sim_store_register): Make "regname" constant.
+ Delete Altivec hack. Return result from psim_read_register /
+ psim_write_register.
+ * psim.h (psim_read_register, psim_write_register): Change return
+ type to int. Update comments.
+ * psim.c: Update copyright.
+ (psim_stack): Assert that the psim_read_register worked.
+ (psim_read_register, psim_read_register): Return the register's
+ size. Allocate the cooked buffer dynamically.
+ * hw_register.c: Update copyright.
+ (do_register_init): Check that psim_write_register succeeded.
+ * hw_init.c: Update copyright.
+ (create_ppc_elf_stack_frame, create_ppc_aix_stack_frame): Assert
+ that the register transfer worked.
+
+2003-06-19 Andrew Cagney <cagney@redhat.com>
+
+ * ld-insn.h: Update copyright.
+ (cache_fields): Define.
+ (insn_table_fields): Add insn_field_6 and insn_field_7.
+ (load_insn_table): Pass in the "cache_rules".
+ * ld-insn.c: Update copyright.
+ (load_insn_table): Add parameter "cache_rules". Handle "cache",
+ "computed" and "scratch" fields.
+ (main): Pass "cache_rules" to load_insn_table.
+ * ld-cache.h: Update copyright.
+ (append_cache_table): Declare.
+ * ld-cache.c: Update copyright.
+ (append_cache_table): New function.
+ (load_cache_table): Call.
+ * gen-model.c: Include "ld-cache.h".
+ * gen-itable.c: Include "ld-cache.h".
+ * igen.c: Move #include "ld-cache.h" to earlier. Update
+ copyright.
+ (main): Permit a NULL "cache_rules". Pass address of
+ "cache_rules" to load_insn_table.
+ * Makefile.in (tmp-ld-insn): Add "ld-cache.o".
+ (tmp-igen): Do not include ppc-cache-rules.
+ (gen-itable.o, gen-model.o): Add "ld-cache.h".
+ * ppc-cache-rules: Delete file.
+ * ppc-instructions: Add cache rules.
+
+2003-06-19 Andrew Cagney <cagney@redhat.com>
+
+ * Makefile.in (ICACHE_CFLAGS, SEMANTICS_CFLAGS): Delete.
+ (SIM_FPU_FLAGS): Define.
+ (icache.o): Delete explicit compile command.
+ (semantics.o, idecode.o): Delete explicit compile command.
+ (NOWARN_CFLAGS, STD_CFLAGS): Append SIM_FPU_CFLAGS.
+ * gen-support.c (gen_support_c): Generate #include of
+ "sim-inline.h" and "sim-fpu.h", but conditional on
+ HAVE_COMMON_FPU.
+ * gen-idecode.c (gen_idecode_c): Ditto.
+ * igen.c (gen_icache_c, gen_semantics_c): Wrap #include of
+ "sim-inline.h" and "sim-fpu.h" in HAVE_COMMON_FPU conditional.
+ Move to before "support.h".
+ * Makefile.in, gen-support.c, gen-idecode.c, igen.c: Update
+ copyright.
+
2003-05-16 Ian Lance Taylor <ian@airs.com>
* Makefile.in (various): Use $(SHELL) whenever we invoke
diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in
index 0fb8f4846d5..015fad0bfb4 100644
--- a/sim/ppc/Makefile.in
+++ b/sim/ppc/Makefile.in
@@ -1,7 +1,7 @@
#
# This file is part of the program psim.
#
-# Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
+# Copyright 1994, 1995, 1996, 1997, 2003 Andrew Cagney
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -112,9 +112,10 @@ CONFIG_CFLAGS = $(BSWAP_CFLAGS) \
$(STDIO_CFLAGS) \
$(TERMIO_CFLAGS) \
$(DEVZERO_CFLAGS)
+SIM_FPU_CFLAGS = @sim_fpu_cflags@
-STD_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(INTL_CFLAGS)
-NOWARN_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES)
+STD_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(INTL_CFLAGS) $(SIM_FPU_CFLAGS)
+NOWARN_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(SIM_FPU_CFLAGS)
BUILD_CFLAGS = -g -O $(INCLUDES) $(WARNING_CFLAGS)
BUILD_LDFLAGS =
@@ -147,6 +148,7 @@ MAKEOVERRIDES=
LIB_INCLUDES = -I$(srcdir)/../../include
BFD_INCLUDES = -I../../bfd -I$(srcdir)/../../bfd
GDB_INCLUDES = -I../../gdb -I$(srcdir)/../../gdb -I$(srcdir)/../../gdb/config -I$(srcdir)/../../mmalloc
+
INCLUDES = -I. -I$(srcdir) $(LIB_INCLUDES) $(BFD_INCLUDES) $(GDB_INCLUDES)
LIBIBERTY_LIB = ../../libiberty/libiberty.a
@@ -185,13 +187,15 @@ PSIM_H = \
IDECODE_H = \
idecode.h \
- idecode_expression.h \
+ idecode_expression.h e500_expression.h altivec_expression.h \
idecode_branch.h \
idecode_fields.h \
icache.h
REGISTERS_H = \
registers.h \
+ e500_registers.h \
+ altivec_registers.h \
spreg.h
CPU_H = \
@@ -319,9 +323,6 @@ LIB_OBJ = \
GDB_OBJ = sim_calls.o @sim_callback@
-ICACHE_CFLAGS = @sim_fpu_cflags@
-SEMANTICS_CFLAGS = @sim_fpu_cflags@
-
HW_SRC = @sim_hw_src@
HW_OBJ = @sim_hw_obj@
@@ -367,7 +368,6 @@ interrupts.o: interrupts.c $(CPU_H) $(IDECODE_H) os_emul.h
# Given that inlines are turned on now, rebuild idecode whenever
# anything changes.
idecode.o: idecode.c $(CPU_H) $(IDECODE_H) semantics.h $(LIB_INLINE_SRC) $(BUILT_SRC)
- $(CC) -c $(NOWARN_CFLAGS) $<
# double.o: double.c dp-bit.c
@@ -394,10 +394,8 @@ device_table.o: device_table.c $(DEVICE_TABLE_H) events.h hw.c
cap.o: cap.c cap.h $(BASICS_H)
semantics.o: semantics.c semantics.h $(CPU_H) $(IDECODE_H)
- $(CC) -c $(SEMANTICS_CFLAGS) $(NOWARN_CFLAGS) $<
icache.o: icache.c icache.h $(IDECODE_H) $(CPU_H)
- $(CC) -c $(ICACHE_CFLAGS) $(NOWARN_CFLAGS) $<
support.o: support.c support.h $(IDECODE_H) $(CPU_H)
@@ -463,11 +461,9 @@ tmp-dgen: dgen ppc-spr-table $(srcdir)/../../move-if-change
$(SHELL) $(srcdir)/../../move-if-change tmp-spreg.c spreg.c
touch tmp-dgen
-
-tmp-igen: igen ppc-instructions $(IGEN_OPCODE_RULES) ppc-cache-rules $(srcdir)/../../move-if-change tmp-ld-decode tmp-ld-cache tmp-ld-insn tmp-filter
+tmp-igen: igen $(srcdir)/ppc-instructions $(srcdir)/altivec.igen $(srcdir)/e500.igen $(IGEN_OPCODE_RULES) $(srcdir)/../../move-if-change tmp-ld-decode tmp-ld-cache tmp-ld-insn tmp-filter
./igen $(IGEN_FLAGS) \
-o $(srcdir)/$(IGEN_OPCODE_RULES) \
- -k $(srcdir)/ppc-cache-rules \
-I $(srcdir) -i $(srcdir)/ppc-instructions \
-n icache.h -hc tmp-icache.h \
-n icache.c -c tmp-icache.c \
@@ -538,12 +534,12 @@ tmp-ld-cache: ld-cache.o misc.o lf.o table.o filter_host.o
ld-insn.o: ld-insn.c misc.h lf.h table.h ld-insn.h ld-decode.h igen.h
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/ld-insn.c
tmp-ld-insn: ld-insn.o misc.o lf.o table.o ld-decode.o filter_host.o filter.o
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-ld-insn -DMAIN $(srcdir)/ld-insn.c misc.o lf.o table.o ld-decode.o filter_host.o filter.o $(BUILD_LIBS)
+ $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-ld-insn -DMAIN $(srcdir)/ld-insn.c ld-cache.o misc.o lf.o table.o ld-decode.o filter_host.o filter.o $(BUILD_LIBS)
-gen-model.o: gen-model.c misc.h lf.h table.h gen-model.h ld-decode.h igen.h ld-insn.h
+gen-model.o: gen-model.c misc.h lf.h table.h gen-model.h ld-decode.h igen.h ld-insn.h ld-cache.h
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-model.c
-gen-itable.o: gen-itable.c misc.h lf.h table.h gen-itable.h ld-decode.h igen.h ld-insn.h igen.h
+gen-itable.o: gen-itable.c misc.h lf.h table.h gen-itable.h ld-decode.h igen.h ld-insn.h igen.h ld-cache.h
$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-itable.c
gen-icache.o: gen-icache.c misc.h lf.h table.h gen-icache.h ld-decode.h igen.h ld-insn.h gen-semantics.h gen-idecode.h
diff --git a/sim/ppc/altivec.igen b/sim/ppc/altivec.igen
new file mode 100644
index 00000000000..9f10b261929
--- /dev/null
+++ b/sim/ppc/altivec.igen
@@ -0,0 +1,2356 @@
+# Altivec instruction set, for PSIM, the PowerPC simulator.
+
+# Copyright 2003 Free Software Foundation, Inc.
+
+# Contributed by Red Hat Inc; developed under contract from Motorola.
+# Written by matthew green <mrg@redhat.com>.
+
+# This file is part of GDB.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA. */
+
+
+#
+# Motorola AltiVec instructions.
+#
+
+:cache:av:::VS:VS:
+:cache:av::vreg *:vS:VS:(cpu_registers(processor)->altivec.vr + VS)
+:cache:av::unsigned32:VS_BITMASK:VS:(1 << VS)
+:cache:av:::VA:VA:
+:cache:av::vreg *:vA:VA:(cpu_registers(processor)->altivec.vr + VA)
+:cache:av::unsigned32:VA_BITMASK:VA:(1 << VA)
+:cache:av:::VB:VB:
+:cache:av::vreg *:vB:VB:(cpu_registers(processor)->altivec.vr + VB)
+:cache:av::unsigned32:VB_BITMASK:VB:(1 << VB)
+:cache:av:::VC:VC:
+:cache:av::vreg *:vC:VC:(cpu_registers(processor)->altivec.vr + VC)
+:cache:av::unsigned32:VC_BITMASK:VC:(1 << VC)
+
+# Flags for model.h
+::model-macro:::
+ #define PPC_INSN_INT_VR(OUT_MASK, IN_MASK, OUT_VMASK, IN_VMASK) \
+ do { \
+ if (CURRENT_MODEL_ISSUE > 0) \
+ ppc_insn_int_vr(MY_INDEX, cpu_model(processor), OUT_MASK, IN_MASK, OUT_VMASK, IN_VMASK); \
+ } while (0)
+
+ #define PPC_INSN_VR(OUT_VMASK, IN_VMASK) \
+ do { \
+ if (CURRENT_MODEL_ISSUE > 0) \
+ ppc_insn_vr(MY_INDEX, cpu_model(processor), OUT_VMASK, IN_VMASK); \
+ } while (0)
+
+ #define PPC_INSN_VR_CR(OUT_VMASK, IN_VMASK, CR_MASK) \
+ do { \
+ if (CURRENT_MODEL_ISSUE > 0) \
+ ppc_insn_vr_cr(MY_INDEX, cpu_model(processor), OUT_VMASK, IN_VMASK, CR_MASK); \
+ } while (0)
+
+ #define PPC_INSN_VR_VSCR(OUT_VMASK, IN_VMASK) \
+ do { \
+ if (CURRENT_MODEL_ISSUE > 0) \
+ ppc_insn_vr_vscr(MY_INDEX, cpu_model(processor), OUT_VMASK, IN_VMASK); \
+ } while (0)
+
+ #define PPC_INSN_FROM_VSCR(VR_MASK) \
+ do { \
+ if (CURRENT_MODEL_ISSUE > 0) \
+ ppc_insn_from_vscr(MY_INDEX, cpu_model(processor), VR_MASK); \
+ } while (0)
+
+ #define PPC_INSN_TO_VSCR(VR_MASK) \
+ do { \
+ if (CURRENT_MODEL_ISSUE > 0) \
+ ppc_insn_to_vscr(MY_INDEX, cpu_model(processor), VR_MASK); \
+ } while (0)
+
+# Trace waiting for AltiVec registers to become available
+void::model-static::model_trace_altivec_busy_p:model_data *model_ptr, unsigned32 vr_busy
+ int i;
+ if (vr_busy) {
+ vr_busy &= model_ptr->vr_busy;
+ for(i = 0; i < 32; i++) {
+ if (((1 << i) & vr_busy) != 0) {
+ TRACE(trace_model, ("Waiting for register v%d.\n", i));
+ }
+ }
+ }
+ if (model_ptr->vscr_busy)
+ TRACE(trace_model, ("Waiting for VSCR\n"));
+
+# Trace making AltiVec registers busy
+void::model-static::model_trace_altivec_make_busy:model_data *model_ptr, unsigned32 vr_mask, unsigned32 cr_mask
+ int i;
+ if (vr_mask) {
+ for(i = 0; i < 32; i++) {
+ if (((1 << i) & vr_mask) != 0) {
+ TRACE(trace_model, ("Register v%d is now busy.\n", i));
+ }
+ }
+ }
+ if (cr_mask) {
+ for(i = 0; i < 8; i++) {
+ if (((1 << i) & cr_mask) != 0) {
+ TRACE(trace_model, ("Register cr%d is now busy.\n", i));
+ }
+ }
+ }
+
+# Schedule an AltiVec instruction that takes integer input registers and produces output registers
+void::model-function::ppc_insn_int_vr:itable_index index, model_data *model_ptr, const unsigned32 out_mask, const unsigned32 in_mask, const unsigned32 out_vmask, const unsigned32 in_vmask
+ const unsigned32 int_mask = out_mask | in_mask;
+ const unsigned32 vr_mask = out_vmask | in_vmask;
+ model_busy *busy_ptr;
+
+ if ((model_ptr->int_busy & int_mask) != 0 || (model_ptr->vr_busy & vr_mask)) {
+ model_new_cycle(model_ptr); /* don't count first dependency as a stall */
+
+ while ((model_ptr->int_busy & int_mask) != 0 || (model_ptr->vr_busy & vr_mask)) {
+ if (WITH_TRACE && ppc_trace[trace_model]) {
+ model_trace_busy_p(model_ptr, int_mask, 0, 0, PPC_NO_SPR);
+ model_trace_altivec_busy_p(model_ptr, vr_mask);
+ }
+
+ model_ptr->nr_stalls_data++;
+ model_new_cycle(model_ptr);
+ }
+ }
+
+ busy_ptr = model_wait_for_unit(index, model_ptr, &model_ptr->timing[index]);
+ model_ptr->int_busy |= out_mask;
+ busy_ptr->int_busy |= out_mask;
+ model_ptr->vr_busy |= out_vmask;
+ busy_ptr->vr_busy |= out_vmask;
+
+ if (out_mask)
+ busy_ptr->nr_writebacks = (PPC_ONE_BIT_SET_P(out_vmask)) ? 1 : 2;
+
+ if (out_vmask)
+ busy_ptr->nr_writebacks += (PPC_ONE_BIT_SET_P(out_vmask)) ? 1 : 2;
+
+ if (WITH_TRACE && ppc_trace[trace_model]) {
+ model_trace_make_busy(model_ptr, out_mask, 0, 0);
+ model_trace_altivec_make_busy(model_ptr, vr_mask, 0);
+ }
+
+# Schedule an AltiVec instruction that takes vector input registers and produces vector output registers
+void::model-function::ppc_insn_vr:itable_index index, model_data *model_ptr, const unsigned32 out_vmask, const unsigned32 in_vmask
+ const unsigned32 vr_mask = out_vmask | in_vmask;
+ model_busy *busy_ptr;
+
+ if (model_ptr->vr_busy & vr_mask) {
+ model_new_cycle(model_ptr); /* don't count first dependency as a stall */
+
+ while (model_ptr->vr_busy & vr_mask) {
+ if (WITH_TRACE && ppc_trace[trace_model]) {
+ model_trace_altivec_busy_p(model_ptr, vr_mask);
+ }
+
+ model_ptr->nr_stalls_data++;
+ model_new_cycle(model_ptr);
+ }
+ }
+
+ busy_ptr = model_wait_for_unit(index, model_ptr, &model_ptr->timing[index]);
+ model_ptr->vr_busy |= out_vmask;
+ busy_ptr->vr_busy |= out_vmask;
+ if (out_vmask)
+ busy_ptr->nr_writebacks = (PPC_ONE_BIT_SET_P(out_vmask)) ? 1 : 2;
+
+ if (WITH_TRACE && ppc_trace[trace_model]) {
+ model_trace_altivec_make_busy(model_ptr, vr_mask, 0);
+ }
+
+# Schedule an AltiVec instruction that takes vector input registers and produces vector output registers, touches CR
+void::model-function::ppc_insn_vr_cr:itable_index index, model_data *model_ptr, const unsigned32 out_vmask, const unsigned32 in_vmask, const unsigned32 cr_mask
+ const unsigned32 vr_mask = out_vmask | in_vmask;
+ model_busy *busy_ptr;
+
+ if ((model_ptr->vr_busy & vr_mask) || (model_ptr->cr_fpscr_busy & cr_mask)) {
+ model_new_cycle(model_ptr); /* don't count first dependency as a stall */
+
+ while ((model_ptr->vr_busy & vr_mask) || (model_ptr->cr_fpscr_busy & cr_mask)) {
+ if (WITH_TRACE && ppc_trace[trace_model]) {
+ model_trace_busy_p(model_ptr, 0, 0, cr_mask, PPC_NO_SPR);
+ model_trace_altivec_busy_p(model_ptr, vr_mask);
+ }
+
+ model_ptr->nr_stalls_data++;
+ model_new_cycle(model_ptr);
+ }
+ }
+
+ busy_ptr = model_wait_for_unit(index, model_ptr, &model_ptr->timing[index]);
+ model_ptr->cr_fpscr_busy |= cr_mask;
+ busy_ptr->cr_fpscr_busy |= cr_mask;
+ model_ptr->vr_busy |= out_vmask;
+ busy_ptr->vr_busy |= out_vmask;
+
+ if (out_vmask)
+ busy_ptr->nr_writebacks = (PPC_ONE_BIT_SET_P(out_vmask)) ? 1 : 2;
+
+ if (cr_mask)
+ busy_ptr->nr_writebacks++;
+
+ if (WITH_TRACE && ppc_trace[trace_model])
+ model_trace_altivec_make_busy(model_ptr, vr_mask, cr_mask);
+
+# Schedule an AltiVec instruction that takes vector input registers and produces vector output registers, touches VSCR
+void::model-function::ppc_insn_vr_vscr:itable_index index, model_data *model_ptr, const unsigned32 out_vmask, const unsigned32 in_vmask
+ const unsigned32 vr_mask = out_vmask | in_vmask;
+ model_busy *busy_ptr;
+
+ if ((model_ptr->vr_busy & vr_mask) != 0 || model_ptr->vscr_busy != 0) {
+ model_new_cycle(model_ptr); /* don't count first dependency as a stall */
+
+ while ((model_ptr->vr_busy & vr_mask) != 0 || model_ptr->vscr_busy != 0) {
+ if (WITH_TRACE && ppc_trace[trace_model])
+ model_trace_altivec_busy_p(model_ptr, vr_mask);
+
+ model_ptr->nr_stalls_data++;
+ model_new_cycle(model_ptr);
+ }
+ }
+
+ busy_ptr = model_wait_for_unit(index, model_ptr, &model_ptr->timing[index]);
+ model_ptr->vr_busy |= out_vmask;
+ busy_ptr->vr_busy |= out_vmask;
+ model_ptr->vscr_busy = 1;
+ busy_ptr->vscr_busy = 1;
+
+ if (out_vmask)
+ busy_ptr->nr_writebacks = 1 + (PPC_ONE_BIT_SET_P(out_vmask)) ? 1 : 2;
+
+ if (WITH_TRACE && ppc_trace[trace_model])
+ model_trace_altivec_make_busy(model_ptr, vr_mask, 0);
+
+# Schedule an MFVSCR instruction that VSCR input register and produces an AltiVec output register
+void::model-function::ppc_insn_from_vscr:itable_index index, model_data *model_ptr, const unsigned32 vr_mask
+ model_busy *busy_ptr;
+
+ while ((model_ptr->vr_busy & vr_mask) != 0 || model_ptr->vscr_busy != 0) {
+ if (WITH_TRACE && ppc_trace[trace_model])
+ model_trace_altivec_busy_p(model_ptr, vr_mask);
+
+ model_ptr->nr_stalls_data++;
+ model_new_cycle(model_ptr);
+ }
+ busy_ptr = model_wait_for_unit(index, model_ptr, &model_ptr->timing[index]);
+ model_ptr->cr_fpscr_busy |= vr_mask;
+ busy_ptr->cr_fpscr_busy |= vr_mask;
+
+ if (vr_mask)
+ busy_ptr->nr_writebacks = 1;
+
+ model_ptr->vr_busy |= vr_mask;
+ if (WITH_TRACE && ppc_trace[trace_model])
+ model_trace_altivec_make_busy(model_ptr, vr_mask, 0);
+
+# Schedule an MTVSCR instruction that one AltiVec input register and produces a vscr output register
+void::model-function::ppc_insn_to_vscr:itable_index index, model_data *model_ptr, const unsigned32 vr_mask
+ model_busy *busy_ptr;
+
+ while ((model_ptr->vr_busy & vr_mask) != 0 || model_ptr->vscr_busy != 0) {
+ if (WITH_TRACE && ppc_trace[trace_model])
+ model_trace_altivec_busy_p(model_ptr, vr_mask);
+
+ model_ptr->nr_stalls_data++;
+ model_new_cycle(model_ptr);
+ }
+ busy_ptr = model_wait_for_unit(index, model_ptr, &model_ptr->timing[index]);
+ busy_ptr ->vscr_busy = 1;
+ model_ptr->vscr_busy = 1;
+ busy_ptr->nr_writebacks = 1;
+
+ TRACE(trace_model,("Making VSCR busy.\n"));
+
+# The follow are AltiVec saturate operations
+
+signed8::model-function::altivec_signed_saturate_8:signed16 val, int *sat
+ signed8 rv;
+ if (val > 127) {
+ rv = 127;
+ *sat = 1;
+ } else if (val < -128) {
+ rv = -128;
+ *sat = 1;
+ } else {
+ rv = val;
+ *sat = 0;
+ }
+ return rv;
+
+signed16::model-function::altivec_signed_saturate_16:signed32 val, int *sat
+ signed16 rv;
+ if (val > 32767) {
+ rv = 32767;
+ *sat = 1;
+ } else if (val < -32768) {
+ rv = -32768;
+ *sat = 1;
+ } else {
+ rv = val;
+ *sat = 0;
+ }
+ return rv;
+
+signed32::model-function::altivec_signed_saturate_32:signed64 val, int *sat
+ signed32 rv;
+ if (val > 2147483647) {
+ rv = 2147483647;
+ *sat = 1;
+ } else if (val < -2147483648LL) {
+ rv = -2147483648LL;
+ *sat = 1;
+ } else {
+ rv = val;
+ *sat = 0;
+ }
+ return rv;
+
+unsigned8::model-function::altivec_unsigned_saturate_8:signed16 val, int *sat
+ unsigned8 rv;
+ if (val > 255) {
+ rv = 255;
+ *sat = 1;
+ } else if (val < 0) {
+ rv = 0;
+ *sat = 1;
+ } else {
+ rv = val;
+ *sat = 0;
+ }
+ return rv;
+
+unsigned16::model-function::altivec_unsigned_saturate_16:signed32 val, int *sat
+ unsigned16 rv;
+ if (val > 65535) {
+ rv = 65535;
+ *sat = 1;
+ } else if (val < 0) {
+ rv = 0;
+ *sat = 1;
+ } else {
+ rv = val;
+ *sat = 0;
+ }
+ return rv;
+
+unsigned32::model-function::altivec_unsigned_saturate_32:signed64 val, int *sat
+ unsigned32 rv;
+ if (val > 4294967295LL) {
+ rv = 4294967295LL;
+ *sat = 1;
+ } else if (val < 0) {
+ rv = 0;
+ *sat = 1;
+ } else {
+ rv = val;
+ *sat = 0;
+ }
+ return rv;
+
+#
+# Load instructions, 6-14 ... 6-22.
+#
+
+0.31,6.VS,11.RA,16.RB,21.7,31.0:X:av:lvebx %VD, %RA, %RB:Load Vector Element Byte Indexed
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned_word eb;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + *rB;
+ eb = EA & 0xf;
+ (*vS).b[AV_BINDEX(eb)] = MEM(unsigned, EA, 1);
+ PPC_INSN_INT_VR(0, RA_BITMASK | RB_BITMASK, VS_BITMASK, 0);
+
+0.31,6.VS,11.RA,16.RB,21.39,31.0:X:av:lvehx %VD, %RA, %RB:Load Vector Element Half Word Indexed
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned_word eb;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = (b + *rB) & ~1;
+ eb = EA & 0xf;
+ (*vS).h[AV_HINDEX(eb/2)] = MEM(unsigned, EA, 2);
+ PPC_INSN_INT_VR(0, RA_BITMASK | RB_BITMASK, VS_BITMASK, 0);
+
+0.31,6.VS,11.RA,16.RB,21.71,31.0:X:av:lvewx %VD, %RA, %RB:Load Vector Element Word Indexed
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned_word eb;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = (b + *rB) & ~3;
+ eb = EA & 0xf;
+ (*vS).w[eb/4] = MEM(unsigned, EA, 4);
+ PPC_INSN_INT_VR(0, RA_BITMASK | RB_BITMASK, VS_BITMASK, 0);
+
+
+0.31,6.VS,11.RA,16.RB,21.6,31.0:X:av:lvsl %VD, %RA, %RB:Load Vector for Shift Left
+ unsigned_word b;
+ unsigned_word addr;
+ int i, j;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ addr = b + *rB;
+ j = addr & 0xf;
+ for (i = 0; i < 16; i++)
+ if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN)
+ (*vS).b[AV_BINDEX(i)] = j++;
+ else
+ (*vS).b[AV_BINDEX(15 - i)] = j++;
+ PPC_INSN_INT_VR(0, RA_BITMASK | RB_BITMASK, VS_BITMASK, 0);
+
+0.31,6.VS,11.RA,16.RB,21.38,31.0:X:av:lvsr %VD, %RA, %RB:Load Vector for Shift Right
+ unsigned_word b;
+ unsigned_word addr;
+ int i, j;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ addr = b + *rB;
+ j = 0x10 - (addr & 0xf);
+ for (i = 0; i < 16; i++)
+ if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN)
+ (*vS).b[AV_BINDEX(i)] = j++;
+ else
+ (*vS).b[AV_BINDEX(15 - i)] = j++;
+ PPC_INSN_INT_VR(0, RA_BITMASK | RB_BITMASK, VS_BITMASK, 0);
+
+
+0.31,6.VS,11.RA,16.RB,21.103,31.0:X:av:lvx %VD, %RA, %RB:Load Vector Indexed
+ unsigned_word b;
+ unsigned_word EA;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = (b + *rB) & ~0xf;
+ if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN) {
+ (*vS).w[0] = MEM(unsigned, EA + 0, 4);
+ (*vS).w[1] = MEM(unsigned, EA + 4, 4);
+ (*vS).w[2] = MEM(unsigned, EA + 8, 4);
+ (*vS).w[3] = MEM(unsigned, EA + 12, 4);
+ } else {
+ (*vS).w[0] = MEM(unsigned, EA + 12, 4);
+ (*vS).w[1] = MEM(unsigned, EA + 8, 4);
+ (*vS).w[2] = MEM(unsigned, EA + 4, 4);
+ (*vS).w[3] = MEM(unsigned, EA + 0, 4);
+ }
+ PPC_INSN_INT_VR(0, RA_BITMASK | RB_BITMASK, VS_BITMASK, 0);
+
+0.31,6.VS,11.RA,16.RB,21.359,31.0:X:av:lvxl %VD, %RA, %RB:Load Vector Indexed LRU
+ unsigned_word b;
+ unsigned_word EA;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = (b + *rB) & ~0xf;
+ if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN) {
+ (*vS).w[0] = MEM(unsigned, EA + 0, 4);
+ (*vS).w[1] = MEM(unsigned, EA + 4, 4);
+ (*vS).w[2] = MEM(unsigned, EA + 8, 4);
+ (*vS).w[3] = MEM(unsigned, EA + 12, 4);
+ } else {
+ (*vS).w[0] = MEM(unsigned, EA + 12, 4);
+ (*vS).w[1] = MEM(unsigned, EA + 8, 4);
+ (*vS).w[2] = MEM(unsigned, EA + 4, 4);
+ (*vS).w[3] = MEM(unsigned, EA + 0, 4);
+ }
+ PPC_INSN_INT_VR(0, RA_BITMASK | RB_BITMASK, VS_BITMASK, 0);
+
+#
+# Move to/from VSCR instructions, 6-23 & 6-24.
+#
+
+0.4,6.VS,11.0,16.0,21.1540:VX:av:mfvscr %VS:Move from Vector Status and Control Register
+ (*vS).w[0] = 0;
+ (*vS).w[1] = 0;
+ (*vS).w[2] = 0;
+ (*vS).w[3] = VSCR;
+ PPC_INSN_FROM_VSCR(VS_BITMASK);
+
+0.4,6.0,11.0,16.VB,21.1604:VX:av:mtvscr %VB:Move to Vector Status and Control Register
+ VSCR = (*vB).w[3];
+ PPC_INSN_TO_VSCR(VB_BITMASK);
+
+#
+# Store instructions, 6-25 ... 6-29.
+#
+
+0.31,6.VS,11.RA,16.RB,21.135,31.0:X:av:stvebx %VD, %RA, %RB:Store Vector Element Byte Indexed
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned_word eb;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + *rB;
+ eb = EA & 0xf;
+ if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN)
+ STORE(EA, 1, (*vS).b[eb]);
+ else
+ STORE(EA, 1, (*vS).b[15-eb]);
+ PPC_INSN_INT_VR(0, RA_BITMASK | RB_BITMASK, VS_BITMASK, 0);
+
+0.31,6.VS,11.RA,16.RB,21.167,31.0:X:av:stvehx %VD, %RA, %RB:Store Vector Element Half Word Indexed
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned_word eb;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = (b + *rB) & ~1;
+ eb = EA & 0xf;
+ if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN)
+ STORE(EA, 2, (*vS).h[eb/2]);
+ else
+ STORE(EA, 2, (*vS).h[7-eb]);
+ PPC_INSN_INT_VR(0, RA_BITMASK | RB_BITMASK, VS_BITMASK, 0);
+
+0.31,6.VS,11.RA,16.RB,21.199,31.0:X:av:stvewx %VD, %RA, %RB:Store Vector Element Word Indexed
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned_word eb;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = (b + *rB) & ~3;
+ eb = EA & 0xf;
+ if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN)
+ STORE(EA, 4, (*vS).w[eb/4]);
+ else
+ STORE(EA, 4, (*vS).w[3-(eb/4)]);
+ PPC_INSN_INT_VR(0, RA_BITMASK | RB_BITMASK, VS_BITMASK, 0);
+
+0.31,6.VS,11.RA,16.RB,21.231,31.0:X:av:stvx %VD, %RA, %RB:Store Vector Indexed
+ unsigned_word b;
+ unsigned_word EA;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = (b + *rB) & ~0xf;
+ if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN) {
+ STORE(EA + 0, 4, (*vS).w[0]);
+ STORE(EA + 4, 4, (*vS).w[1]);
+ STORE(EA + 8, 4, (*vS).w[2]);
+ STORE(EA + 12, 4, (*vS).w[3]);
+ } else {
+ STORE(EA + 12, 4, (*vS).w[0]);
+ STORE(EA + 8, 4, (*vS).w[1]);
+ STORE(EA + 4, 4, (*vS).w[2]);
+ STORE(EA + 0, 4, (*vS).w[3]);
+ }
+ PPC_INSN_INT_VR(0, RA_BITMASK | RB_BITMASK, VS_BITMASK, 0);
+
+0.31,6.VS,11.RA,16.RB,21.487,31.0:X:av:stvxl %VD, %RA, %RB:Store Vector Indexed LRU
+ unsigned_word b;
+ unsigned_word EA;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = (b + *rB) & ~0xf;
+ if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN) {
+ STORE(EA + 0, 4, (*vS).w[0]);
+ STORE(EA + 4, 4, (*vS).w[1]);
+ STORE(EA + 8, 4, (*vS).w[2]);
+ STORE(EA + 12, 4, (*vS).w[3]);
+ } else {
+ STORE(EA + 12, 4, (*vS).w[0]);
+ STORE(EA + 8, 4, (*vS).w[1]);
+ STORE(EA + 4, 4, (*vS).w[2]);
+ STORE(EA + 0, 4, (*vS).w[3]);
+ }
+ PPC_INSN_INT_VR(0, RA_BITMASK | RB_BITMASK, VS_BITMASK, 0);
+
+#
+# Vector Add instructions, 6-30 ... 6-40.
+#
+
+0.4,6.VS,11.VA,16.VB,21.384:VX:av:vaddcuw %VD, %VA, %VB:Vector Add Carryout Unsigned Word
+ unsigned64 temp;
+ int i;
+ for (i = 0; i < 4; i++) {
+ temp = (unsigned64)(*vA).w[i] + (unsigned64)(*vB).w[i];
+ (*vS).w[i] = temp >> 32;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.10:VX:av:vaddfp %VD, %VA, %VB:Vector Add Floating Point
+ int i;
+ unsigned32 f;
+ sim_fpu a, b, d;
+ for (i = 0; i < 4; i++) {
+ sim_fpu_32to (&a, (*vA).w[i]);
+ sim_fpu_32to (&b, (*vB).w[i]);
+ sim_fpu_add (&d, &a, &b);
+ sim_fpu_to32 (&f, &d);
+ (*vS).w[i] = f;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.768:VX:av:vaddsbs %VD, %VA, %VB:Vector Add Signed Byte Saturate
+ int i, sat, tempsat;
+ signed16 temp;
+ for (i = 0; i < 16; i++) {
+ temp = (signed16)(signed8)(*vA).b[i] + (signed16)(signed8)(*vB).b[i];
+ (*vS).b[i] = altivec_signed_saturate_8(temp, &tempsat);
+ sat |= tempsat;
+ }
+ ALTIVEC_SET_SAT(sat);
+ PPC_INSN_VR_VSCR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.832:VX:av:vaddshs %VD, %VA, %VB:Vector Add Signed Half Word Saturate
+ int i, sat, tempsat;
+ signed32 temp, a, b;
+ for (i = 0; i < 8; i++) {
+ a = (signed32)(signed16)(*vA).h[i];
+ b = (signed32)(signed16)(*vB).h[i];
+ temp = a + b;
+ (*vS).h[i] = altivec_signed_saturate_16(temp, &tempsat);
+ sat |= tempsat;
+ }
+ ALTIVEC_SET_SAT(sat);
+ PPC_INSN_VR_VSCR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.896:VX:av:vaddsws %VD, %VA, %VB:Vector Add Signed Word Saturate
+ int i, sat, tempsat;
+ signed64 temp;
+ for (i = 0; i < 4; i++) {
+ temp = (signed64)(signed32)(*vA).w[i] + (signed64)(signed32)(*vB).w[i];
+ (*vS).w[i] = altivec_signed_saturate_32(temp, &tempsat);
+ sat |= tempsat;
+ }
+ ALTIVEC_SET_SAT(sat);
+ PPC_INSN_VR_VSCR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.0:VX:av:vaddubm %VD, %VA, %VB:Vector Add Unsigned Byte Modulo
+ int i;
+ for (i = 0; i < 16; i++)
+ (*vS).b[i] = ((*vA).b[i] + (*vB).b[i]) & 0xff;
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.512:VX:av:vaddubs %VD, %VA, %VB:Vector Add Unsigned Byte Saturate
+ int i, sat, tempsat;
+ signed16 temp;
+ sat = 0;
+ for (i = 0; i < 16; i++) {
+ temp = (signed16)(unsigned8)(*vA).b[i] + (signed16)(unsigned8)(*vB).b[i];
+ (*vS).b[i] = altivec_unsigned_saturate_8(temp, &tempsat);
+ sat |= tempsat;
+ }
+ ALTIVEC_SET_SAT(sat);
+ PPC_INSN_VR_VSCR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.64:VX:av:vadduhm %VD, %VA, %VB:Vector Add Unsigned Half Word Modulo
+ int i;
+ for (i = 0; i < 8; i++)
+ (*vS).h[i] = ((*vA).h[i] + (*vB).h[i]) & 0xffff;
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.576:VX:av:vadduhs %VD, %VA, %VB:Vector Add Unsigned Half Word Saturate
+ int i, sat, tempsat;
+ signed32 temp;
+ for (i = 0; i < 8; i++) {
+ temp = (signed32)(unsigned16)(*vA).h[i] + (signed32)(unsigned16)(*vB).h[i];
+ (*vS).h[i] = altivec_unsigned_saturate_16(temp, &tempsat);
+ sat |= tempsat;
+ }
+ ALTIVEC_SET_SAT(sat);
+ PPC_INSN_VR_VSCR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.128:VX:av:vadduwm %VD, %VA, %VB:Vector Add Unsigned Word Modulo
+ int i;
+ for (i = 0; i < 4; i++)
+ (*vS).w[i] = (*vA).w[i] + (*vB).w[i];
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.640:VX:av:vadduws %VD, %VA, %VB:Vector Add Unsigned Word Saturate
+ int i, sat, tempsat;
+ signed64 temp;
+ for (i = 0; i < 4; i++) {
+ temp = (signed64)(unsigned32)(*vA).w[i] + (signed64)(unsigned32)(*vB).w[i];
+ (*vS).w[i] = altivec_unsigned_saturate_32(temp, &tempsat);
+ sat |= tempsat;
+ }
+ ALTIVEC_SET_SAT(sat);
+ PPC_INSN_VR_VSCR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+#
+# Vector AND instructions, 6-41, 6-42
+#
+
+0.4,6.VS,11.VA,16.VB,21.1028:VX:av:vand %VD, %VA, %VB:Vector Logical AND
+ int i;
+ for (i = 0; i < 4; i++)
+ (*vS).w[i] = (*vA).w[i] & (*vB).w[i];
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.1092:VX:av:vandc %VD, %VA, %VB:Vector Logical AND with Compliment
+ int i;
+ for (i = 0; i < 4; i++)
+ (*vS).w[i] = (*vA).w[i] & ~((*vB).w[i]);
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+
+#
+# Vector Average instructions, 6-43, 6-48
+#
+
+0.4,6.VS,11.VA,16.VB,21.1282:VX:av:vavgsb %VD, %VA, %VB:Vector Average Signed Byte
+ int i;
+ signed16 temp, a, b;
+ for (i = 0; i < 16; i++) {
+ a = (signed16)(signed8)(*vA).b[i];
+ b = (signed16)(signed8)(*vB).b[i];
+ temp = a + b + 1;
+ (*vS).b[i] = (temp >> 1) & 0xff;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.1346:VX:av:vavgsh %VD, %VA, %VB:Vector Average Signed Half Word
+ int i;
+ signed32 temp, a, b;
+ for (i = 0; i < 8; i++) {
+ a = (signed32)(signed16)(*vA).h[i];
+ b = (signed32)(signed16)(*vB).h[i];
+ temp = a + b + 1;
+ (*vS).h[i] = (temp >> 1) & 0xffff;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.1410:VX:av:vavgsw %VD, %VA, %VB:Vector Average Signed Word
+ int i;
+ signed64 temp, a, b;
+ for (i = 0; i < 4; i++) {
+ a = (signed64)(signed32)(*vA).w[i];
+ b = (signed64)(signed32)(*vB).w[i];
+ temp = a + b + 1;
+ (*vS).w[i] = (temp >> 1) & 0xffffffff;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.1026:VX:av:vavgub %VD, %VA, %VB:Vector Average Unsigned Byte
+ int i;
+ unsigned16 temp, a, b;
+ for (i = 0; i < 16; i++) {
+ a = (*vA).b[i];
+ b = (*vB).b[i];
+ temp = a + b + 1;
+ (*vS).b[i] = (temp >> 1) & 0xff;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.1090:VX:av:vavguh %VD, %VA, %VB:Vector Average Unsigned Half Word
+ int i;
+ unsigned32 temp, a, b;
+ for (i = 0; i < 8; i++) {
+ a = (*vA).h[i];
+ b = (*vB).h[i];
+ temp = a + b + 1;
+ (*vS).h[i] = (temp >> 1) & 0xffff;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.1154:VX:av:vavguw %VD, %VA, %VB:Vector Average Unsigned Word
+ int i;
+ unsigned64 temp, a, b;
+ for (i = 0; i < 4; i++) {
+ a = (*vA).w[i];
+ b = (*vB).w[i];
+ temp = a + b + 1;
+ (*vS).w[i] = (temp >> 1) & 0xffffffff;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+#
+# Vector Fixed Point Convert instructions, 6-49, 6-50
+#
+
+0.4,6.VS,11.UIMM,16.VB,21.842:VX:av:vcfsx %VD, %VB, %UIMM:Vector Convert From Signed Fixed-Point Word
+ int i;
+ unsigned32 f;
+ sim_fpu b, div, d;
+ for (i = 0; i < 4; i++) {
+ sim_fpu_32to (&b, (*vB).w[i]);
+ sim_fpu_u32to (&div, 2 << UIMM, sim_fpu_round_default);
+ sim_fpu_div (&d, &b, &div);
+ sim_fpu_to32 (&f, &d);
+ (*vS).w[i] = f;
+ }
+ PPC_INSN_VR(VS_BITMASK, VB_BITMASK);
+
+0.4,6.VS,11.UIMM,16.VB,21.778:VX:av:vcfux %VD, %VA, %UIMM:Vector Convert From Unsigned Fixed-Point Word
+ int i;
+ unsigned32 f;
+ sim_fpu b, d, div;
+ for (i = 0; i < 4; i++) {
+ sim_fpu_32to (&b, (*vB).w[i]);
+ sim_fpu_u32to (&div, 2 << UIMM, sim_fpu_round_default);
+ sim_fpu_div (&d, &b, &div);
+ sim_fpu_to32u (&f, &d, sim_fpu_round_default);
+ (*vS).w[i] = f;
+ }
+ PPC_INSN_VR(VS_BITMASK, VB_BITMASK);
+
+#
+# Vector Compare instructions, 6-51 ... 6-64
+#
+
+0.4,6.VS,11.VA,16.VB,21.RC,22.966:VXR:av:vcmpbpfpx %VD, %VA, %VB:Vector Compare Bounds Floating Point
+ int i, le, ge;
+ sim_fpu a, b, d;
+ for (i = 0; i < 4; i++) {
+ sim_fpu_32to (&a, (*vA).w[i]);
+ sim_fpu_32to (&b, (*vB).w[i]);
+ le = sim_fpu_is_le(&a, &b);
+ ge = sim_fpu_is_ge(&a, &b);
+ (*vS).w[i] = (le ? 0 : 1 << 31) | (ge ? 0 : 1 << 30);
+ }
+ if (RC)
+ ALTIVEC_SET_CR6(vS, 0);
+ PPC_INSN_VR_CR(VS_BITMASK, VA_BITMASK | VB_BITMASK, RC ? 0x000000f0 : 0);
+
+0.4,6.VS,11.VA,16.VB,21.RC,22.198:VXR:av:vcmpeqfpx %VD, %VA, %VB:Vector Compare Equal-to-Floating Point
+ int i;
+ sim_fpu a, b;
+ for (i = 0; i < 4; i++) {
+ sim_fpu_32to (&a, (*vA).w[i]);
+ sim_fpu_32to (&b, (*vB).w[i]);
+ if (sim_fpu_is_eq(&a, &b))
+ (*vS).w[i] = 0xffffffff;
+ else
+ (*vS).w[i] = 0;
+ }
+ if (RC)
+ ALTIVEC_SET_CR6(vS, 1);
+ PPC_INSN_VR_CR(VS_BITMASK, VA_BITMASK | VB_BITMASK, RC ? 0x000000f0 : 0);
+
+0.4,6.VS,11.VA,16.VB,21.RC,22.6:VXR:av:vcmpequbx %VD, %VA, %VB:Vector Compare Equal-to Unsigned Byte
+ int i;
+ for (i = 0; i < 16; i++)
+ if ((*vA).b[i] == (*vB).b[i])
+ (*vS).b[i] = 0xff;
+ else
+ (*vS).b[i] = 0;
+ if (RC)
+ ALTIVEC_SET_CR6(vS, 1);
+ PPC_INSN_VR_CR(VS_BITMASK, VA_BITMASK | VB_BITMASK, RC ? 0x000000f0 : 0);
+
+0.4,6.VS,11.VA,16.VB,21.RC,22.70:VXR:av:vcmpequhx %VD, %VA, %VB:Vector Compare Equal-to Unsigned Half Word
+ int i;
+ for (i = 0; i < 8; i++)
+ if ((*vA).h[i] == (*vB).h[i])
+ (*vS).h[i] = 0xffff;
+ else
+ (*vS).h[i] = 0;
+ if (RC)
+ ALTIVEC_SET_CR6(vS, 1);
+ PPC_INSN_VR_CR(VS_BITMASK, VA_BITMASK | VB_BITMASK, RC ? 0x000000f0 : 0);
+
+0.4,6.VS,11.VA,16.VB,21.RC,22.134:VXR:av:vcmpequwx %VD, %VA, %VB:Vector Compare Equal-to Unsigned Word
+ int i;
+ for (i = 0; i < 4; i++)
+ if ((*vA).w[i] == (*vB).w[i])
+ (*vS).w[i] = 0xffffffff;
+ else
+ (*vS).w[i] = 0;
+ if (RC)
+ ALTIVEC_SET_CR6(vS, 1);
+ PPC_INSN_VR_CR(VS_BITMASK, VA_BITMASK | VB_BITMASK, RC ? 0x000000f0 : 0);
+
+0.4,6.VS,11.VA,16.VB,21.RC,22.454:VXR:av:vcmpgefpx %VD, %VA, %VB:Vector Compare Greater-Than-or-Equal-to Floating Point
+ int i;
+ sim_fpu a, b;
+ for (i = 0; i < 4; i++) {
+ sim_fpu_32to (&a, (*vA).w[i]);
+ sim_fpu_32to (&b, (*vB).w[i]);
+ if (sim_fpu_is_ge(&a, &b))
+ (*vS).w[i] = 0xffffffff;
+ else
+ (*vS).w[i] = 0;
+ }
+ if (RC)
+ ALTIVEC_SET_CR6(vS, 1);
+ PPC_INSN_VR_CR(VS_BITMASK, VA_BITMASK | VB_BITMASK, RC ? 0x000000f0 : 0);
+
+0.4,6.VS,11.VA,16.VB,21.RC,22.710:VXR:av:vcmpgtfpx %VD, %VA, %VB:Vector Compare Greater-Than Floating Point
+ int i;
+ sim_fpu a, b;
+ for (i = 0; i < 4; i++) {
+ sim_fpu_32to (&a, (*vA).w[i]);
+ sim_fpu_32to (&b, (*vB).w[i]);
+ if (sim_fpu_is_gt(&a, &b))
+ (*vS).w[i] = 0xffffffff;
+ else
+ (*vS).w[i] = 0;
+ }
+ if (RC)
+ ALTIVEC_SET_CR6(vS, 1);
+ PPC_INSN_VR_CR(VS_BITMASK, VA_BITMASK | VB_BITMASK, RC ? 0x000000f0 : 0);
+
+0.4,6.VS,11.VA,16.VB,21.RC,22.774:VXR:av:vcmpgtsbx %VD, %VA, %VB:Vector Compare Greater-Than Signed Byte
+ int i;
+ signed8 a, b;
+ for (i = 0; i < 16; i++) {
+ a = (*vA).b[i];
+ b = (*vB).b[i];
+ if (a > b)
+ (*vS).b[i] = 0xff;
+ else
+ (*vS).b[i] = 0;
+ }
+ if (RC)
+ ALTIVEC_SET_CR6(vS, 1);
+ PPC_INSN_VR_CR(VS_BITMASK, VA_BITMASK | VB_BITMASK, RC ? 0x000000f0 : 0);
+
+0.4,6.VS,11.VA,16.VB,21.RC,22.838:VXR:av:vcmpgtshx %VD, %VA, %VB:Vector Compare Greater-Than Signed Half Word
+ int i;
+ signed16 a, b;
+ for (i = 0; i < 8; i++) {
+ a = (*vA).h[i];
+ b = (*vB).h[i];
+ if (a > b)
+ (*vS).h[i] = 0xffff;
+ else
+ (*vS).h[i] = 0;
+ }
+ if (RC)
+ ALTIVEC_SET_CR6(vS, 1);
+ PPC_INSN_VR_CR(VS_BITMASK, VA_BITMASK | VB_BITMASK, RC ? 0x000000f0 : 0);
+
+0.4,6.VS,11.VA,16.VB,21.RC,22.902:VXR:av:vcmpgtswx %VD, %VA, %VB:Vector Compare Greater-Than Signed Word
+ int i;
+ signed32 a, b;
+ for (i = 0; i < 4; i++) {
+ a = (*vA).w[i];
+ b = (*vB).w[i];
+ if (a > b)
+ (*vS).w[i] = 0xffffffff;
+ else
+ (*vS).w[i] = 0;
+ }
+ if (RC)
+ ALTIVEC_SET_CR6(vS, 1);
+ PPC_INSN_VR_CR(VS_BITMASK, VA_BITMASK | VB_BITMASK, RC ? 0x000000f0 : 0);
+
+0.4,6.VS,11.VA,16.VB,21.RC,22.518:VXR:av:vcmpgtubx %VD, %VA, %VB:Vector Compare Greater-Than Unsigned Byte
+ int i;
+ unsigned8 a, b;
+ for (i = 0; i < 16; i++) {
+ a = (*vA).b[i];
+ b = (*vB).b[i];
+ if (a > b)
+ (*vS).b[i] = 0xff;
+ else
+ (*vS).b[i] = 0;
+ }
+ if (RC)
+ ALTIVEC_SET_CR6(vS, 1);
+ PPC_INSN_VR_CR(VS_BITMASK, VA_BITMASK | VB_BITMASK, RC ? 0x000000f0 : 0);
+
+0.4,6.VS,11.VA,16.VB,21.RC,22.582:VXR:av:vcmpgtuhx %VD, %VA, %VB:Vector Compare Greater-Than Unsigned Half Word
+ int i;
+ unsigned16 a, b;
+ for (i = 0; i < 8; i++) {
+ a = (*vA).h[i];
+ b = (*vB).h[i];
+ if (a > b)
+ (*vS).h[i] = 0xffff;
+ else
+ (*vS).h[i] = 0;
+ }
+ if (RC)
+ ALTIVEC_SET_CR6(vS, 1);
+ PPC_INSN_VR_CR(VS_BITMASK, VA_BITMASK | VB_BITMASK, RC ? 0x000000f0 : 0);
+
+0.4,6.VS,11.VA,16.VB,21.RC,22.646:VXR:av:vcmpgtuwx %VD, %VA, %VB:Vector Compare Greater-Than Unsigned Word
+ int i;
+ unsigned32 a, b;
+ for (i = 0; i < 4; i++) {
+ a = (*vA).w[i];
+ b = (*vB).w[i];
+ if (a > b)
+ (*vS).w[i] = 0xffffffff;
+ else
+ (*vS).w[i] = 0;
+ }
+ if (RC)
+ ALTIVEC_SET_CR6(vS, 1);
+ PPC_INSN_VR_CR(VS_BITMASK, VA_BITMASK | VB_BITMASK, RC ? 0x000000f0 : 0);
+
+#
+# Vector Convert instructions, 6-65, 6-66.
+#
+
+0.4,6.VS,11.UIMM,16.VB,21.970:VX:av:vctsxs %VD, %VB, %UIMM:Vector Convert to Signed Fixed-Point Word Saturate
+ int i, sat, tempsat;
+ signed64 temp;
+ sim_fpu a, b, m;
+ sat = 0;
+ for (i = 0; i < 4; i++) {
+ sim_fpu_32to (&b, (*vB).w[i]);
+ sim_fpu_u32to (&m, 2 << UIMM, sim_fpu_round_default);
+ sim_fpu_mul (&a, &b, &m);
+ sim_fpu_to64i (&temp, &a, sim_fpu_round_default);
+ (*vS).w[i] = altivec_signed_saturate_32(temp, &tempsat);
+ sat |= tempsat;
+ }
+ ALTIVEC_SET_SAT(sat);
+ PPC_INSN_VR_VSCR(VS_BITMASK, VB_BITMASK);
+
+0.4,6.VS,11.UIMM,16.VB,21.906:VX:av:vctuxs %VD, %VB, %UIMM:Vector Convert to Unsigned Fixed-Point Word Saturate
+ int i, sat, tempsat;
+ signed64 temp;
+ sim_fpu a, b, m;
+ sat = 0;
+ for (i = 0; i < 4; i++) {
+ sim_fpu_32to (&b, (*vB).w[i]);
+ sim_fpu_u32to (&m, 2 << UIMM, sim_fpu_round_default);
+ sim_fpu_mul (&a, &b, &m);
+ sim_fpu_to64u (&temp, &a, sim_fpu_round_default);
+ (*vS).w[i] = altivec_unsigned_saturate_32(temp, &tempsat);
+ sat |= tempsat;
+ }
+ ALTIVEC_SET_SAT(sat);
+ PPC_INSN_VR_VSCR(VS_BITMASK, VB_BITMASK);
+
+#
+# Vector Estimate instructions, 6-67 ... 6-70.
+#
+
+0.4,6.VS,11.0,16.VB,21.394:VX:av:vexptefp %VD, %VB:Vector 2 Raised to the Exponent Estimate Floating Point
+ int i;
+ unsigned32 f;
+ signed32 bi;
+ sim_fpu b, d;
+ for (i = 0; i < 4; i++) {
+ /*HACK!*/
+ sim_fpu_32to (&b, (*vB).w[i]);
+ sim_fpu_to32i (&bi, &b, sim_fpu_round_default);
+ bi = 2 ^ bi;
+ sim_fpu_32to (&d, bi);
+ sim_fpu_to32 (&f, &d);
+ (*vS).w[i] = f;
+ }
+ PPC_INSN_VR_VSCR(VS_BITMASK, VB_BITMASK);
+
+0.4,6.VS,11.0,16.VB,21.458:VX:av:vlogefp %VD, %VB:Vector Log2 Estimate Floating Point
+ int i;
+ unsigned32 c, u, f;
+ sim_fpu b, cfpu, d;
+ for (i = 0; i < 4; i++) {
+ /*HACK!*/
+ sim_fpu_32to (&b, (*vB).w[i]);
+ sim_fpu_to32u (&u, &b, sim_fpu_round_default);
+ for (c = 0; (u /= 2) > 1; c++)
+ ;
+ sim_fpu_32to (&cfpu, c);
+ sim_fpu_add (&d, &b, &cfpu);
+ sim_fpu_to32 (&f, &d);
+ (*vS).w[i] = f;
+ }
+ PPC_INSN_VR_VSCR(VS_BITMASK, VB_BITMASK);
+
+#
+# Vector Multiply Add instruction, 6-71
+#
+
+0.4,6.VS,11.VA,16.VB,21.VC,26.46:VAX:av:vmaddfp %VD, %VA, %VB, %VC:Vector Multiply Add Floating Point
+ int i;
+ unsigned32 f;
+ sim_fpu a, b, c, d, e;
+ for (i = 0; i < 4; i++) {
+ sim_fpu_32to (&a, (*vA).w[i]);
+ sim_fpu_32to (&b, (*vB).w[i]);
+ sim_fpu_32to (&c, (*vC).w[i]);
+ sim_fpu_mul (&e, &a, &c);
+ sim_fpu_add (&d, &e, &b);
+ sim_fpu_to32 (&f, &d);
+ (*vS).w[i] = f;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK | VC_BITMASK);
+
+
+#
+# Vector Maximum instructions, 6-72 ... 6-78.
+#
+
+0.4,6.VS,11.VA,16.VB,21.1034:VX:av:vmaxfp %VD, %VA, %VB:Vector Maximum Floating Point
+ int i;
+ unsigned32 f;
+ sim_fpu a, b, d;
+ for (i = 0; i < 4; i++) {
+ sim_fpu_32to (&a, (*vA).w[i]);
+ sim_fpu_32to (&b, (*vB).w[i]);
+ sim_fpu_max (&d, &a, &b);
+ sim_fpu_to32 (&f, &d);
+ (*vS).w[i] = f;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.258:VX:av:vmaxsb %VD, %VA, %VB:Vector Maximum Signed Byte
+ int i;
+ signed8 a, b;
+ for (i = 0; i < 16; i++) {
+ a = (*vA).b[i];
+ b = (*vB).b[i];
+ if (a > b)
+ (*vS).b[i] = a;
+ else
+ (*vS).b[i] = b;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.322:VX:av:vmaxsh %VD, %VA, %VB:Vector Maximum Signed Half Word
+ int i;
+ signed16 a, b;
+ for (i = 0; i < 8; i++) {
+ a = (*vA).h[i];
+ b = (*vB).h[i];
+ if (a > b)
+ (*vS).h[i] = a;
+ else
+ (*vS).h[i] = b;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.386:VX:av:vmaxsw %VD, %VA, %VB:Vector Maximum Signed Word
+ int i;
+ signed32 a, b;
+ for (i = 0; i < 4; i++) {
+ a = (*vA).w[i];
+ b = (*vB).w[i];
+ if (a > b)
+ (*vS).w[i] = a;
+ else
+ (*vS).w[i] = b;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.2:VX:av:vmaxub %VD, %VA, %VB:Vector Maximum Unsigned Byte
+ int i;
+ unsigned8 a, b;
+ for (i = 0; i < 16; i++) {
+ a = (*vA).b[i];
+ b = (*vB).b[i];
+ if (a > b)
+ (*vS).b[i] = a;
+ else
+ (*vS).b[i] = b;
+ };
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.66:VX:av:vmaxus %VD, %VA, %VB:Vector Maximum Unsigned Half Word
+ int i;
+ unsigned16 a, b;
+ for (i = 0; i < 8; i++) {
+ a = (*vA).h[i];
+ b = (*vB).h[i];
+ if (a > b)
+ (*vS).h[i] = a;
+ else
+ (*vS).h[i] = b;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.130:VX:av:vmaxuw %VD, %VA, %VB:Vector Maximum Unsigned Word
+ int i;
+ unsigned32 a, b;
+ for (i = 0; i < 4; i++) {
+ a = (*vA).w[i];
+ b = (*vB).w[i];
+ if (a > b)
+ (*vS).w[i] = a;
+ else
+ (*vS).w[i] = b;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+
+#
+# Vector Multiple High instructions, 6-79, 6-80.
+#
+
+0.4,6.VS,11.VA,16.VB,21.VC,26.32:VAX:av:vmhaddshs %VD, %VA, %VB, %VC:Vector Multiple High and Add Signed Half Word Saturate
+ int i, sat, tempsat;
+ signed16 a, b;
+ signed32 prod, temp, c;
+ for (i = 0; i < 8; i++) {
+ a = (*vA).h[i];
+ b = (*vB).h[i];
+ c = (signed32)(signed16)(*vC).h[i];
+ prod = (signed32)a * (signed32)b;
+ temp = (prod >> 15) + c;
+ (*vS).h[i] = altivec_signed_saturate_16(temp, &tempsat);
+ sat |= tempsat;
+ }
+ ALTIVEC_SET_SAT(sat);
+ PPC_INSN_VR_VSCR(VS_BITMASK, VA_BITMASK | VB_BITMASK | VC_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.VC,26.33:VAX:av:vmhraddshs %VD, %VA, %VB, %VC:Vector Multiple High Round and Add Signed Half Word Saturate
+ int i, sat, tempsat;
+ signed16 a, b;
+ signed32 prod, temp, c;
+ for (i = 0; i < 8; i++) {
+ a = (*vA).h[i];
+ b = (*vB).h[i];
+ c = (signed32)(signed16)(*vC).h[i];
+ prod = (signed32)a * (signed32)b;
+ prod += 0x4000;
+ temp = (prod >> 15) + c;
+ (*vS).h[i] = altivec_signed_saturate_16(temp, &tempsat);
+ sat |= tempsat;
+ }
+ ALTIVEC_SET_SAT(sat);
+ PPC_INSN_VR_VSCR(VS_BITMASK, VA_BITMASK | VB_BITMASK | VC_BITMASK);
+
+
+#
+# Vector Minimum instructions, 6-81 ... 6-87
+#
+
+0.4,6.VS,11.VA,16.VB,21.1098:VX:av:vminfp %VD, %VA, %VB:Vector Minimum Floating Point
+ int i;
+ unsigned32 f;
+ sim_fpu a, b, d;
+ for (i = 0; i < 4; i++) {
+ sim_fpu_32to (&a, (*vA).w[i]);
+ sim_fpu_32to (&b, (*vB).w[i]);
+ sim_fpu_min (&d, &a, &b);
+ sim_fpu_to32 (&f, &d);
+ (*vS).w[i] = f;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.770:VX:av:vminsb %VD, %VA, %VB:Vector Minimum Signed Byte
+ int i;
+ signed8 a, b;
+ for (i = 0; i < 16; i++) {
+ a = (*vA).b[i];
+ b = (*vB).b[i];
+ if (a < b)
+ (*vS).b[i] = a;
+ else
+ (*vS).b[i] = b;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.834:VX:av:vminsh %VD, %VA, %VB:Vector Minimum Signed Half Word
+ int i;
+ signed16 a, b;
+ for (i = 0; i < 8; i++) {
+ a = (*vA).h[i];
+ b = (*vB).h[i];
+ if (a < b)
+ (*vS).h[i] = a;
+ else
+ (*vS).h[i] = b;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.898:VX:av:vminsw %VD, %VA, %VB:Vector Minimum Signed Word
+ int i;
+ signed32 a, b;
+ for (i = 0; i < 4; i++) {
+ a = (*vA).w[i];
+ b = (*vB).w[i];
+ if (a < b)
+ (*vS).w[i] = a;
+ else
+ (*vS).w[i] = b;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.514:VX:av:vminub %VD, %VA, %VB:Vector Minimum Unsigned Byte
+ int i;
+ unsigned8 a, b;
+ for (i = 0; i < 16; i++) {
+ a = (*vA).b[i];
+ b = (*vB).b[i];
+ if (a < b)
+ (*vS).b[i] = a;
+ else
+ (*vS).b[i] = b;
+ };
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.578:VX:av:vminuh %VD, %VA, %VB:Vector Minimum Unsigned Half Word
+ int i;
+ unsigned16 a, b;
+ for (i = 0; i < 8; i++) {
+ a = (*vA).h[i];
+ b = (*vB).h[i];
+ if (a < b)
+ (*vS).h[i] = a;
+ else
+ (*vS).h[i] = b;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.642:VX:av:vminuw %VD, %VA, %VB:Vector Minimum Unsigned Word
+ int i;
+ unsigned32 a, b;
+ for (i = 0; i < 4; i++) {
+ a = (*vA).w[i];
+ b = (*vB).w[i];
+ if (a < b)
+ (*vS).w[i] = a;
+ else
+ (*vS).w[i] = b;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+
+#
+# Vector Multiply Low instruction, 6-88
+#
+
+0.4,6.VS,11.VA,16.VB,21.VC,26.34:VAX:av:vmladduhm %VD, %VA, %VB, %VC:Vector Multiply Low and Add Unsigned Half Word Modulo
+ int i;
+ unsigned16 a, b, c;
+ unsigned32 prod;
+ for (i = 0; i < 8; i++) {
+ a = (*vA).h[i];
+ b = (*vB).h[i];
+ c = (*vC).h[i];
+ prod = (unsigned32)a * (unsigned32)b;
+ (*vS).h[i] = (prod + c) & 0xffff;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK | VC_BITMASK);
+
+
+#
+# Vector Merge instructions, 6-89 ... 6-94
+#
+
+0.4,6.VS,11.VA,16.VB,21.12:VX:av:vmrghb %VD, %VA, %VB:Vector Merge High Byte
+ int i;
+ for (i = 0; i < 16; i += 2) {
+ (*vS).b[AV_BINDEX(i)] = (*vA).b[AV_BINDEX(i/2)];
+ (*vS).b[AV_BINDEX(i+1)] = (*vB).b[AV_BINDEX(i/2)];
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.76:VX:av:vmrghh %VD, %VA, %VB:Vector Merge High Half Word
+ int i;
+ for (i = 0; i < 8; i += 2) {
+ (*vS).h[AV_HINDEX(i)] = (*vA).h[AV_HINDEX(i/2)];
+ (*vS).h[AV_HINDEX(i+1)] = (*vB).h[AV_HINDEX(i/2)];
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.140:VX:av:vmrghw %VD, %VA, %VB:Vector Merge High Word
+ int i;
+ for (i = 0; i < 4; i += 2) {
+ (*vS).w[i] = (*vA).w[i/2];
+ (*vS).w[i+1] = (*vB).w[i/2];
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.268:VX:av:vmrglb %VD, %VA, %VB:Vector Merge Low Byte
+ int i;
+ for (i = 0; i < 16; i += 2) {
+ (*vS).b[AV_BINDEX(i)] = (*vA).b[AV_BINDEX((i/2) + 8)];
+ (*vS).b[AV_BINDEX(i+1)] = (*vB).b[AV_BINDEX((i/2) + 8)];
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.332:VX:av:vmrglh %VD, %VA, %VB:Vector Merge Low Half Word
+ int i;
+ for (i = 0; i < 8; i += 2) {
+ (*vS).h[AV_HINDEX(i)] = (*vA).h[AV_HINDEX((i/2) + 4)];
+ (*vS).h[AV_HINDEX(i+1)] = (*vB).h[AV_HINDEX((i/2) + 4)];
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.396:VX:av:vmrglw %VD, %VA, %VB:Vector Merge Low Word
+ int i;
+ for (i = 0; i < 4; i += 2) {
+ (*vS).w[i] = (*vA).w[(i/2) + 2];
+ (*vS).w[i+1] = (*vB).w[(i/2) + 2];
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+
+#
+# Vector Multiply Sum instructions, 6-95 ... 6-100
+#
+
+0.4,6.VS,11.VA,16.VB,21.VC,26.37:VAX:av:vmsummbm %VD, %VA, %VB, %VC:Vector Multiply Sum Mixed-Sign Byte Modulo
+ int i, j;
+ signed32 temp;
+ signed16 prod, a;
+ unsigned16 b;
+ for (i = 0; i < 4; i++) {
+ temp = (*vC).w[i];
+ for (j = 0; j < 4; j++) {
+ a = (signed16)(signed8)(*vA).b[i*4+j];
+ b = (*vB).b[i*4+j];
+ prod = a * b;
+ temp += (signed32)prod;
+ }
+ (*vS).w[i] = temp;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK | VC_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.VC,26.40:VAX:av:vmsumshm %VD, %VA, %VB, %VC:Vector Multiply Sum Signed Half Word Modulo
+ int i, j;
+ signed32 temp, prod, a, b;
+ for (i = 0; i < 4; i++) {
+ temp = (*vC).w[i];
+ for (j = 0; j < 2; j++) {
+ a = (signed32)(signed16)(*vA).h[i*2+j];
+ b = (signed32)(signed16)(*vB).h[i*2+j];
+ prod = a * b;
+ temp += prod;
+ }
+ (*vS).w[i] = temp;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK | VC_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.VC,26.41:VAX:av:vmsumshs %VD, %VA, %VB, %VC:Vector Multiply Sum Signed Half Word Saturate
+ int i, j, sat, tempsat;
+ signed64 temp;
+ signed32 prod, a, b;
+ sat = 0;
+ for (i = 0; i < 4; i++) {
+ temp = (signed64)(signed32)(*vC).w[i];
+ for (j = 0; j < 2; j++) {
+ a = (signed32)(signed16)(*vA).h[i*2+j];
+ b = (signed32)(signed16)(*vB).h[i*2+j];
+ prod = a * b;
+ temp += (signed64)prod;
+ }
+ (*vS).w[i] = altivec_signed_saturate_32(temp, &tempsat);
+ sat |= tempsat;
+ }
+ ALTIVEC_SET_SAT(sat);
+ PPC_INSN_VR_VSCR(VS_BITMASK, VA_BITMASK | VB_BITMASK | VC_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.VC,26.36:VAX:av:vmsumubm %VD, %VA, %VB, %VC:Vector Multiply Sum Unsigned Byte Modulo
+ int i, j;
+ unsigned32 temp;
+ unsigned16 prod, a, b;
+ for (i = 0; i < 4; i++) {
+ temp = (*vC).w[i];
+ for (j = 0; j < 4; j++) {
+ a = (*vA).b[i*4+j];
+ b = (*vB).b[i*4+j];
+ prod = a * b;
+ temp += prod;
+ }
+ (*vS).w[i] = temp;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK | VC_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.VC,26.38:VAX:av:vmsumuhm %VD, %VA, %VB, %VC:Vector Multiply Sum Unsigned Half Word Modulo
+ int i, j;
+ unsigned32 temp, prod, a, b;
+ for (i = 0; i < 4; i++) {
+ temp = (*vC).w[i];
+ for (j = 0; j < 2; j++) {
+ a = (*vA).h[i*2+j];
+ b = (*vB).h[i*2+j];
+ prod = a * b;
+ temp += prod;
+ }
+ (*vS).w[i] = temp;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK | VC_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.VC,26.39:VAX:av:vmsumuhs %VD, %VA, %VB, %VC:Vector Multiply Sum Unsigned Half Word Saturate
+ int i, j, sat, tempsat;
+ unsigned32 temp, prod, a, b;
+ sat = 0;
+ for (i = 0; i < 4; i++) {
+ temp = (*vC).w[i];
+ for (j = 0; j < 2; j++) {
+ a = (*vA).h[i*2+j];
+ b = (*vB).h[i*2+j];
+ prod = a * b;
+ temp += prod;
+ }
+ (*vS).w[i] = altivec_unsigned_saturate_32(temp, &tempsat);
+ sat |= tempsat;
+ }
+ ALTIVEC_SET_SAT(sat);
+ PPC_INSN_VR_VSCR(VS_BITMASK, VA_BITMASK | VB_BITMASK | VC_BITMASK);
+
+
+#
+# Vector Multiply Even/Odd instructions, 6-101 ... 6-108
+#
+
+0.4,6.VS,11.VA,16.VB,21.776:VX:av:vmulesb %VD, %VA, %VB:Vector Multiply Even Signed Byte
+ int i;
+ signed8 a, b;
+ signed16 prod;
+ for (i = 0; i < 8; i++) {
+ a = (*vA).b[AV_BINDEX(i*2)];
+ b = (*vB).b[AV_BINDEX(i*2)];
+ prod = a * b;
+ (*vS).h[AV_HINDEX(i)] = prod;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.840:VX:av:vmulesh %VD, %VA, %VB:Vector Multiply Even Signed Half Word
+ int i;
+ signed16 a, b;
+ signed32 prod;
+ for (i = 0; i < 4; i++) {
+ a = (*vA).h[AV_HINDEX(i*2)];
+ b = (*vB).h[AV_HINDEX(i*2)];
+ prod = a * b;
+ (*vS).w[i] = prod;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.520:VX:av:vmuleub %VD, %VA, %VB:Vector Multiply Even Unsigned Byte
+ int i;
+ unsigned8 a, b;
+ unsigned16 prod;
+ for (i = 0; i < 8; i++) {
+ a = (*vA).b[AV_BINDEX(i*2)];
+ b = (*vB).b[AV_BINDEX(i*2)];
+ prod = a * b;
+ (*vS).h[AV_HINDEX(i)] = prod;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.584:VX:av:vmuleuh %VD, %VA, %VB:Vector Multiply Even Unsigned Half Word
+ int i;
+ unsigned16 a, b;
+ unsigned32 prod;
+ for (i = 0; i < 4; i++) {
+ a = (*vA).h[AV_HINDEX(i*2)];
+ b = (*vB).h[AV_HINDEX(i*2)];
+ prod = a * b;
+ (*vS).w[i] = prod;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.264:VX:av:vmulosb %VD, %VA, %VB:Vector Multiply Odd Signed Byte
+ int i;
+ signed8 a, b;
+ signed16 prod;
+ for (i = 0; i < 8; i++) {
+ a = (*vA).b[AV_BINDEX((i*2)+1)];
+ b = (*vB).b[AV_BINDEX((i*2)+1)];
+ prod = a * b;
+ (*vS).h[AV_HINDEX(i)] = prod;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.328:VX:av:vmulosh %VD, %VA, %VB:Vector Multiply Odd Signed Half Word
+ int i;
+ signed16 a, b;
+ signed32 prod;
+ for (i = 0; i < 4; i++) {
+ a = (*vA).h[AV_HINDEX((i*2)+1)];
+ b = (*vB).h[AV_HINDEX((i*2)+1)];
+ prod = a * b;
+ (*vS).w[i] = prod;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.8:VX:av:vmuloub %VD, %VA, %VB:Vector Multiply Odd Unsigned Byte
+ int i;
+ unsigned8 a, b;
+ unsigned16 prod;
+ for (i = 0; i < 8; i++) {
+ a = (*vA).b[AV_BINDEX((i*2)+1)];
+ b = (*vB).b[AV_BINDEX((i*2)+1)];
+ prod = a * b;
+ (*vS).h[AV_HINDEX(i)] = prod;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.72:VX:av:vmulouh %VD, %VA, %VB:Vector Multiply Odd Unsigned Half Word
+ int i;
+ unsigned16 a, b;
+ unsigned32 prod;
+ for (i = 0; i < 4; i++) {
+ a = (*vA).h[AV_HINDEX((i*2)+1)];
+ b = (*vB).h[AV_HINDEX((i*2)+1)];
+ prod = a * b;
+ (*vS).w[i] = prod;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+
+#
+# Vector Negative Multiply-Subtract instruction, 6-109
+#
+
+0.4,6.VS,11.VA,16.VB,21.VC,26.47:VX:av:vnmsubfp %VD, %VA, %VB, %VC:Vector Negative Multiply-Subtract Floating Point
+ int i;
+ unsigned32 f;
+ sim_fpu a, b, c, d, i1, i2;
+ for (i = 0; i < 4; i++) {
+ sim_fpu_32to (&a, (*vA).w[i]);
+ sim_fpu_32to (&b, (*vB).w[i]);
+ sim_fpu_32to (&c, (*vC).w[i]);
+ sim_fpu_mul (&i1, &a, &c);
+ sim_fpu_sub (&i2, &i1, &b);
+ sim_fpu_neg (&d, &i2);
+ sim_fpu_to32 (&f, &d);
+ (*vS).w[i] = f;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK | VC_BITMASK);
+
+
+#
+# Vector Logical OR instructions, 6-110, 6-111, 6-177
+#
+
+0.4,6.VS,11.VA,16.VB,21.1284:VX:av:vnor %VD, %VA, %VB:Vector Logical NOR
+ int i;
+ for (i = 0; i < 4; i++)
+ (*vS).w[i] = ~((*vA).w[i] | (*vB).w[i]);
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.1156:VX:av:vor %VD, %VA, %VB:Vector Logical OR
+ int i;
+ for (i = 0; i < 4; i++)
+ (*vS).w[i] = (*vA).w[i] | (*vB).w[i];
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.1220:VX:av:vxor %VD, %VA, %VB:Vector Logical XOR
+ int i;
+ for (i = 0; i < 4; i++)
+ (*vS).w[i] = (*vA).w[i] ^ (*vB).w[i];
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+
+#
+# Vector Permute instruction, 6-112
+#
+
+0.4,6.VS,11.VA,16.VB,21.VC,26.43:VX:av:vperm %VD, %VA, %VB, %VC:Vector Permute
+ int i, who;
+ for (i = 0; i < 16; i++) {
+ who = (*vC).b[AV_BINDEX(i)] & 0x1f;
+ if (who & 0x10)
+ (*vS).b[AV_BINDEX(i)] = (*vB).b[AV_BINDEX(who & 0xf)];
+ else
+ (*vS).b[AV_BINDEX(i)] = (*vA).b[AV_BINDEX(who & 0xf)];
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK | VC_BITMASK);
+
+
+#
+# Vector Pack instructions, 6-113 ... 6-121
+#
+
+0.4,6.VS,11.VA,16.VB,21.782:VX:av:vpkpx %VD, %VA, %VB:Vector Pack Pixel32
+ int i;
+ for (i = 0; i < 4; i++) {
+ (*vS).h[AV_HINDEX(i+4)] = ((((*vB).w[i]) >> 9) & 0xfc00)
+ | ((((*vB).w[i]) >> 6) & 0x03e0)
+ | ((((*vB).w[i]) >> 3) & 0x001f);
+ (*vS).h[AV_HINDEX(i)] = ((((*vA).w[i]) >> 9) & 0xfc00)
+ | ((((*vA).w[i]) >> 6) & 0x03e0)
+ | ((((*vA).w[i]) >> 3) & 0x001f);
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.398:VX:av:vpkshss %VD, %VA, %VB:Vector Pack Signed Half Word Signed Saturate
+ int i, sat, tempsat;
+ signed16 temp;
+ sat = 0;
+ for (i = 0; i < 16; i++) {
+ if (i < 8)
+ temp = (*vA).h[AV_HINDEX(i)];
+ else
+ temp = (*vB).h[AV_HINDEX(i-8)];
+ (*vS).b[AV_BINDEX(i)] = altivec_signed_saturate_8(temp, &tempsat);
+ sat |= tempsat;
+ }
+ ALTIVEC_SET_SAT(sat);
+ PPC_INSN_VR_VSCR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.270:VX:av:vpkshus %VD, %VA, %VB:Vector Pack Signed Half Word Unsigned Saturate
+ int i, sat, tempsat;
+ signed16 temp;
+ sat = 0;
+ for (i = 0; i < 16; i++) {
+ if (i < 8)
+ temp = (*vA).h[AV_HINDEX(i)];
+ else
+ temp = (*vB).h[AV_HINDEX(i-8)];
+ (*vS).b[AV_BINDEX(i)] = altivec_unsigned_saturate_8(temp, &tempsat);
+ sat |= tempsat;
+ }
+ ALTIVEC_SET_SAT(sat);
+ PPC_INSN_VR_VSCR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.462:VX:av:vpkswss %VD, %VA, %VB:Vector Pack Signed Word Signed Saturate
+ int i, sat, tempsat;
+ signed32 temp;
+ sat = 0;
+ for (i = 0; i < 8; i++) {
+ if (i < 4)
+ temp = (*vA).w[i];
+ else
+ temp = (*vB).w[i-4];
+ (*vS).h[AV_HINDEX(i)] = altivec_signed_saturate_16(temp, &tempsat);
+ sat |= tempsat;
+ }
+ ALTIVEC_SET_SAT(sat);
+ PPC_INSN_VR_VSCR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.334:VX:av:vpkswus %VD, %VA, %VB:Vector Pack Signed Word Unsigned Saturate
+ int i, sat, tempsat;
+ signed32 temp;
+ sat = 0;
+ for (i = 0; i < 8; i++) {
+ if (i < 4)
+ temp = (*vA).w[i];
+ else
+ temp = (*vB).w[i-4];
+ (*vS).h[AV_HINDEX(i)] = altivec_unsigned_saturate_16(temp, &tempsat);
+ sat |= tempsat;
+ }
+ ALTIVEC_SET_SAT(sat);
+ PPC_INSN_VR_VSCR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.14:VX:av:vpkuhum %VD, %VA, %VB:Vector Pack Unsigned Half Word Unsigned Modulo
+ int i;
+ for (i = 0; i < 16; i++)
+ if (i < 8)
+ (*vS).b[AV_BINDEX(i)] = (*vA).h[AV_HINDEX(i)];
+ else
+ (*vS).b[AV_BINDEX(i)] = (*vB).h[AV_HINDEX(i-8)];
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.142:VX:av:vpkuhus %VD, %VA, %VB:Vector Pack Unsigned Half Word Unsigned Saturate
+ int i, sat, tempsat;
+ signed16 temp;
+ sat = 0;
+ for (i = 0; i < 16; i++) {
+ if (i < 8)
+ temp = (*vA).h[AV_HINDEX(i)];
+ else
+ temp = (*vB).h[AV_HINDEX(i-8)];
+ /* force positive in signed16, ok as we'll toss the bit away anyway */
+ temp &= ~0x8000;
+ (*vS).b[AV_BINDEX(i)] = altivec_unsigned_saturate_8(temp, &tempsat);
+ sat |= tempsat;
+ }
+ ALTIVEC_SET_SAT(sat);
+ PPC_INSN_VR_VSCR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.78:VX:av:vpkuwum %VD, %VA, %VB:Vector Pack Unsigned Word Unsigned Modulo
+ int i;
+ for (i = 0; i < 8; i++)
+ if (i < 8)
+ (*vS).h[AV_HINDEX(i)] = (*vA).w[i];
+ else
+ (*vS).h[AV_HINDEX(i)] = (*vB).w[i-8];
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.206:VX:av:vpkuwus %VD, %VA, %VB:Vector Pack Unsigned Word Unsigned Saturate
+ int i, sat, tempsat;
+ signed32 temp;
+ sat = 0;
+ for (i = 0; i < 8; i++) {
+ if (i < 4)
+ temp = (*vA).w[i];
+ else
+ temp = (*vB).w[i-4];
+ /* force positive in signed32, ok as we'll toss the bit away anyway */
+ temp &= ~0x80000000;
+ (*vS).h[AV_HINDEX(i)] = altivec_unsigned_saturate_16(temp, &tempsat);
+ sat |= tempsat;
+ }
+ ALTIVEC_SET_SAT(sat);
+ PPC_INSN_VR_VSCR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+
+#
+# Vector Reciprocal instructions, 6-122, 6-123, 6-131
+#
+
+0.4,6.VS,11.0,16.VB,21.266:VX:av:vrefp %VD, %VB:Vector Reciprocal Estimate Floating Point
+ int i;
+ unsigned32 f;
+ sim_fpu op, d;
+ for (i = 0; i < 4; i++) {
+ sim_fpu_32to (&op, (*vB).w[i]);
+ sim_fpu_div (&d, &sim_fpu_one, &op);
+ sim_fpu_to32 (&f, &d);
+ (*vS).w[i] = f;
+ }
+ PPC_INSN_VR(VS_BITMASK, VB_BITMASK);
+
+0.4,6.VS,11.0,16.VB,21.330:VX:av:vrsqrtefp %VD, %VB:Vector Reciprocal Square Root Estimate Floating Point
+ int i;
+ unsigned32 f;
+ sim_fpu op, i1, one, d;
+ for (i = 0; i < 4; i++) {
+ sim_fpu_32to (&op, (*vB).w[i]);
+ sim_fpu_sqrt (&i1, &op);
+ sim_fpu_div (&d, &sim_fpu_one, &i1);
+ sim_fpu_to32 (&f, &d);
+ (*vS).w[i] = f;
+ }
+ PPC_INSN_VR(VS_BITMASK, VB_BITMASK);
+
+
+#
+# Vector Round instructions, 6-124 ... 6-127
+#
+
+0.4,6.VS,11.0,16.VB,21.714:VX:av:vrfim %VD, %VB:Vector Round to Floating-Point Integer towards Minus Infinity
+ int i;
+ unsigned32 f;
+ sim_fpu op;
+ for (i = 0; i < 4; i++) {
+ sim_fpu_32to (&op, (*vB).w[i]);
+ sim_fpu_round_32(&op, sim_fpu_round_down, sim_fpu_denorm_default);
+ sim_fpu_to32 (&f, &op);
+ (*vS).w[i] = f;
+ }
+ PPC_INSN_VR(VS_BITMASK, VB_BITMASK);
+
+0.4,6.VS,11.0,16.VB,21.522:VX:av:vrfin %VD, %VB:Vector Round to Floating-Point Integer Nearest
+ int i;
+ unsigned32 f;
+ sim_fpu op;
+ for (i = 0; i < 4; i++) {
+ sim_fpu_32to (&op, (*vB).w[i]);
+ sim_fpu_round_32(&op, sim_fpu_round_near, sim_fpu_denorm_default);
+ sim_fpu_to32 (&f, &op);
+ (*vS).w[i] = f;
+ }
+ PPC_INSN_VR(VS_BITMASK, VB_BITMASK);
+
+0.4,6.VS,11.0,16.VB,21.650:VX:av:vrfip %VD, %VB:Vector Round to Floating-Point Integer towards Plus Infinity
+ int i;
+ unsigned32 f;
+ sim_fpu op;
+ for (i = 0; i < 4; i++) {
+ sim_fpu_32to (&op, (*vB).w[i]);
+ sim_fpu_round_32(&op, sim_fpu_round_up, sim_fpu_denorm_default);
+ sim_fpu_to32 (&f, &op);
+ (*vS).w[i] = f;
+ }
+ PPC_INSN_VR(VS_BITMASK, VB_BITMASK);
+
+0.4,6.VS,11.0,16.VB,21.586:VX:av:vrfiz %VD, %VB:Vector Round to Floating-Point Integer towards Zero
+ int i;
+ unsigned32 f;
+ sim_fpu op;
+ for (i = 0; i < 4; i++) {
+ sim_fpu_32to (&op, (*vB).w[i]);
+ sim_fpu_round_32(&op, sim_fpu_round_zero, sim_fpu_denorm_default);
+ sim_fpu_to32 (&f, &op);
+ (*vS).w[i] = f;
+ }
+ PPC_INSN_VR(VS_BITMASK, VB_BITMASK);
+
+
+#
+# Vector Rotate Left instructions, 6-128 ... 6-130
+#
+
+0.4,6.VS,11.VA,16.VB,21.4:VX:av:vrlb %VD, %VA, %VB:Vector Rotate Left Integer Byte
+ int i;
+ unsigned16 temp;
+ for (i = 0; i < 16; i++) {
+ temp = (unsigned16)(*vA).b[i] << (((*vB).b[i]) & 7);
+ (*vS).b[i] = (temp & 0xff) | ((temp >> 8) & 0xff);
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.68:VX:av:vrlh %VD, %VA, %VB:Vector Rotate Left Integer Half Word
+ int i;
+ unsigned32 temp;
+ for (i = 0; i < 8; i++) {
+ temp = (unsigned32)(*vA).h[i] << (((*vB).h[i]) & 0xf);
+ (*vS).h[i] = (temp & 0xffff) | ((temp >> 16) & 0xffff);
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.132:VX:av:vrlw %VD, %VA, %VB:Vector Rotate Left Integer Word
+ int i;
+ unsigned64 temp;
+ for (i = 0; i < 4; i++) {
+ temp = (unsigned64)(*vA).w[i] << (((*vB).w[i]) & 0x1f);
+ (*vS).w[i] = (temp & 0xffffffff) | ((temp >> 32) & 0xffffffff);
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+
+#
+# Vector Conditional Select instruction, 6-133
+#
+
+0.4,6.VS,11.VA,16.VB,21.VC,26.42:VAX:av:vsel %VD, %VA, %VB, %VC:Vector Conditional Select
+ int i;
+ unsigned32 c;
+ for (i = 0; i < 4; i++) {
+ c = (*vC).w[i];
+ (*vS).w[i] = ((*vB).w[i] & c) | ((*vA).w[i] & ~c);
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK | VC_BITMASK);
+
+#
+# Vector Shift Left instructions, 6-134 ... 6-139
+#
+
+0.4,6.VS,11.VA,16.VB,21.452:VX:av:vsl %VD, %VA, %VB:Vector Shift Left
+ int sh, i, j, carry, new_carry;
+ sh = (*vB).b[0] & 7; /* don't bother checking everything */
+ carry = 0;
+ for (j = 3; j >= 0; j--) {
+ if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN)
+ i = j;
+ else
+ i = (j + 2) % 4;
+ new_carry = (*vA).w[i] >> (32 - sh);
+ (*vS).w[i] = ((*vA).w[i] << sh) | carry;
+ carry = new_carry;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.260:VX:av:vslb %VD, %VA, %VB:Vector Shift Left Integer Byte
+ int i, sh;
+ for (i = 0; i < 16; i++) {
+ sh = ((*vB).b[i]) & 7;
+ (*vS).b[i] = (*vA).b[i] << sh;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.0,22.SH,26.44:VX:av:vsldol %VD, %VA, %VB:Vector Shift Left Double by Octet Immediate
+ int i, j;
+ for (j = 0, i = SH; i < 16; i++)
+ (*vS).b[j++] = (*vA).b[i];
+ for (i = 0; i < SH; i++)
+ (*vS).b[j++] = (*vB).b[i];
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.324:VX:av:vslh %VD, %VA, %VB:Vector Shift Left Half Word
+ int i, sh;
+ for (i = 0; i < 8; i++) {
+ sh = ((*vB).h[i]) & 0xf;
+ (*vS).h[i] = (*vA).h[i] << sh;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.1036:VX:av:vslo %VD, %VA, %VB:Vector Shift Left by Octet
+ int i, sh;
+ if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN)
+ sh = ((*vB).b[AV_BINDEX(15)] >> 3) & 0xf;
+ else
+ sh = ((*vB).b[AV_BINDEX(0)] >> 3) & 0xf;
+ for (i = 0; i < 16; i++) {
+ if (15 - i > sh)
+ (*vS).b[AV_BINDEX(i)] = (*vA).b[AV_BINDEX(i + sh)];
+ else
+ (*vS).b[AV_BINDEX(i)] = 0;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.388:VX:av:vslw %VD, %VA, %VB:Vector Shift Left Integer Word
+ int i, sh;
+ for (i = 0; i < 4; i++) {
+ sh = ((*vB).w[i]) & 0x1f;
+ (*vS).w[i] = (*vA).w[i] << sh;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+
+#
+# Vector Splat instructions, 6-140 ... 6-145
+#
+
+0.4,6.VS,11.UIMM,16.VB,21.524:VX:av:vspltb %VD, %VB, %UIMM:Vector Splat Byte
+ int i;
+ unsigned8 b;
+ b = (*vB).b[AV_BINDEX(UIMM & 0xf)];
+ for (i = 0; i < 16; i++)
+ (*vS).b[i] = b;
+ PPC_INSN_VR(VS_BITMASK, VB_BITMASK);
+
+0.4,6.VS,11.UIMM,16.VB,21.588:VX:av:vsplth %VD, %VB, %UIMM:Vector Splat Half Word
+ int i;
+ unsigned16 h;
+ h = (*vB).h[AV_HINDEX(UIMM & 0x7)];
+ for (i = 0; i < 8; i++)
+ (*vS).h[i] = h;
+ PPC_INSN_VR(VS_BITMASK, VB_BITMASK);
+
+0.4,6.VS,11.SIMM,16.0,21.780:VX:av:vspltisb %VD, %SIMM:Vector Splat Immediate Signed Byte
+ int i;
+ signed8 b = SIMM;
+ /* manual 5-bit signed extension */
+ if (b & 0x10)
+ b -= 0x20;
+ for (i = 0; i < 16; i++)
+ (*vS).b[i] = b;
+ PPC_INSN_VR(VS_BITMASK, 0);
+
+0.4,6.VS,11.SIMM,16.0,21.844:VX:av:vspltish %VD, %SIMM:Vector Splat Immediate Signed Half Word
+ int i;
+ signed16 h = SIMM;
+ /* manual 5-bit signed extension */
+ if (h & 0x10)
+ h -= 0x20;
+ for (i = 0; i < 8; i++)
+ (*vS).h[i] = h;
+ PPC_INSN_VR(VS_BITMASK, 0);
+
+0.4,6.VS,11.SIMM,16.0,21.908:VX:av:vspltisw %VD, %SIMM:Vector Splat Immediate Signed Word
+ int i;
+ signed32 w = SIMM;
+ /* manual 5-bit signed extension */
+ if (w & 0x10)
+ w -= 0x20;
+ for (i = 0; i < 4; i++)
+ (*vS).w[i] = w;
+ PPC_INSN_VR(VS_BITMASK, 0);
+
+0.4,6.VS,11.UIMM,16.VB,21.652:VX:av:vspltw %VD, %VB, %UIMM:Vector Splat Word
+ int i;
+ unsigned32 w;
+ w = (*vB).w[UIMM & 0x3];
+ for (i = 0; i < 4; i++)
+ (*vS).w[i] = w;
+ PPC_INSN_VR(VS_BITMASK, VB_BITMASK);
+
+
+#
+# Vector Shift Right instructions, 6-146 ... 6-154
+#
+
+0.4,6.VS,11.VA,16.VB,21.708:VX:av:vsr %VD, %VA, %VB:Vector Shift Right
+ int sh, i, j, carry, new_carry;
+ sh = (*vB).b[0] & 7; /* don't bother checking everything */
+ carry = 0;
+ for (j = 0; j < 4; j++) {
+ if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN)
+ i = j;
+ else
+ i = (j + 2) % 4;
+ new_carry = (*vA).w[i] << (32 - sh);
+ (*vS).w[i] = ((*vA).w[i] >> sh) | carry;
+ carry = new_carry;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.772:VX:av:vsrab %VD, %VA, %VB:Vector Shift Right Algebraic Byte
+ int i, sh;
+ signed16 a;
+ for (i = 0; i < 16; i++) {
+ sh = ((*vB).b[i]) & 7;
+ a = (signed16)(signed8)(*vA).b[i];
+ (*vS).b[i] = (a >> sh) & 0xff;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.836:VX:av:vsrah %VD, %VA, %VB:Vector Shift Right Algebraic Half Word
+ int i, sh;
+ signed32 a;
+ for (i = 0; i < 8; i++) {
+ sh = ((*vB).h[i]) & 0xf;
+ a = (signed32)(signed16)(*vA).h[i];
+ (*vS).h[i] = (a >> sh) & 0xffff;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.900:VX:av:vsraw %VD, %VA, %VB:Vector Shift Right Algebraic Word
+ int i, sh;
+ signed64 a;
+ for (i = 0; i < 4; i++) {
+ sh = ((*vB).w[i]) & 0xf;
+ a = (signed64)(signed32)(*vA).w[i];
+ (*vS).w[i] = (a >> sh) & 0xffffffff;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.516:VX:av:vsrb %VD, %VA, %VB:Vector Shift Right Byte
+ int i, sh;
+ for (i = 0; i < 16; i++) {
+ sh = ((*vB).b[i]) & 7;
+ (*vS).b[i] = (*vA).b[i] >> sh;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.580:VX:av:vsrh %VD, %VA, %VB:Vector Shift Right Half Word
+ int i, sh;
+ for (i = 0; i < 8; i++) {
+ sh = ((*vB).h[i]) & 0xf;
+ (*vS).h[i] = (*vA).h[i] >> sh;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.1100:VX:av:vsro %VD, %VA, %VB:Vector Shift Right Octet
+ int i, sh;
+ if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN)
+ sh = ((*vB).b[AV_BINDEX(15)] >> 3) & 0xf;
+ else
+ sh = ((*vB).b[AV_BINDEX(0)] >> 3) & 0xf;
+ for (i = 0; i < 16; i++) {
+ if (i < sh)
+ (*vS).b[AV_BINDEX(i)] = 0;
+ else
+ (*vS).b[AV_BINDEX(i)] = (*vA).b[AV_BINDEX(i - sh)];
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.644:VX:av:vsrw %VD, %VA, %VB:Vector Shift Right Word
+ int i, sh;
+ for (i = 0; i < 4; i++) {
+ sh = ((*vB).w[i]) & 0x1f;
+ (*vS).w[i] = (*vA).w[i] >> sh;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+
+#
+# Vector Subtract instructions, 6-155 ... 6-165
+#
+
+0.4,6.VS,11.VA,16.VB,21.1408:VX:av:vsubcuw %VD, %VA, %VB:Vector Subtract Carryout Unsigned Word
+ int i;
+ signed64 temp, a, b;
+ for (i = 0; i < 4; i++) {
+ a = (signed64)(unsigned32)(*vA).w[i];
+ b = (signed64)(unsigned32)(*vB).w[i];
+ temp = a - b;
+ (*vS).w[i] = ~(temp >> 32) & 1;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.74:VX:av:vsubfp %VD, %VA, %VB:Vector Subtract Floating Point
+ int i;
+ unsigned32 f;
+ sim_fpu a, b, d;
+ for (i = 0; i < 4; i++) {
+ sim_fpu_32to (&a, (*vA).w[i]);
+ sim_fpu_32to (&b, (*vB).w[i]);
+ sim_fpu_sub (&d, &a, &b);
+ sim_fpu_to32 (&f, &d);
+ (*vS).w[i] = f;
+ }
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.1792:VX:av:vsubsbs %VD, %VA, %VB:Vector Subtract Signed Byte Saturate
+ int i, sat, tempsat;
+ signed16 temp;
+ sat = 0;
+ for (i = 0; i < 16; i++) {
+ temp = (signed16)(signed8)(*vA).b[i] - (signed16)(signed8)(*vB).b[i];
+ (*vS).b[i] = altivec_signed_saturate_8(temp, &tempsat);
+ sat |= tempsat;
+ }
+ ALTIVEC_SET_SAT(sat);
+ PPC_INSN_VR_VSCR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.1856:VX:av:vsubshs %VD, %VA, %VB:Vector Subtract Signed Half Word Saturate
+ int i, sat, tempsat;
+ signed32 temp;
+ sat = 0;
+ for (i = 0; i < 8; i++) {
+ temp = (signed32)(signed16)(*vA).h[i] - (signed32)(signed16)(*vB).h[i];
+ (*vS).h[i] = altivec_signed_saturate_16(temp, &tempsat);
+ sat |= tempsat;
+ }
+ ALTIVEC_SET_SAT(sat);
+ PPC_INSN_VR_VSCR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.1920:VX:av:vsubsws %VD, %VA, %VB:Vector Subtract Signed Word Saturate
+ int i, sat, tempsat;
+ signed64 temp;
+ sat = 0;
+ for (i = 0; i < 4; i++) {
+ temp = (signed64)(signed32)(*vA).w[i] - (signed64)(signed32)(*vB).w[i];
+ (*vS).w[i] = altivec_signed_saturate_32(temp, &tempsat);
+ sat |= tempsat;
+ }
+ ALTIVEC_SET_SAT(sat);
+ PPC_INSN_VR_VSCR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.1024:VX:av:vsububm %VD, %VA, %VB:Vector Subtract Unsigned Byte Modulo
+ int i;
+ for (i = 0; i < 16; i++)
+ (*vS).b[i] = (*vA).b[i] - (*vB).b[i];
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.1536:VX:av:vsububs %VD, %VA, %VB:Vector Subtract Unsigned Byte Saturate
+ int i, sat, tempsat;
+ signed16 temp;
+ sat = 0;
+ for (i = 0; i < 16; i++) {
+ temp = (signed16)(unsigned8)(*vA).b[i] - (signed16)(unsigned8)(*vB).b[i];
+ (*vS).b[i] = altivec_unsigned_saturate_8(temp, &tempsat);
+ sat |= tempsat;
+ }
+ ALTIVEC_SET_SAT(sat);
+ PPC_INSN_VR_VSCR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.1088:VX:av:vsubuhm %VD, %VA, %VB:Vector Subtract Unsigned Half Word Modulo
+ int i;
+ for (i = 0; i < 8; i++)
+ (*vS).h[i] = ((*vA).h[i] - (*vB).h[i]) & 0xffff;
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.1600:VX:av:vsubuhs %VD, %VA, %VB:Vector Subtract Unsigned Half Word Saturate
+ int i, sat, tempsat;
+ signed32 temp;
+ for (i = 0; i < 8; i++) {
+ temp = (signed32)(unsigned16)(*vA).h[i] - (signed32)(unsigned16)(*vB).h[i];
+ (*vS).h[i] = altivec_unsigned_saturate_16(temp, &tempsat);
+ sat |= tempsat;
+ }
+ ALTIVEC_SET_SAT(sat);
+ PPC_INSN_VR_VSCR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.1152:VX:av:vsubuwm %VD, %VA, %VB:Vector Subtract Unsigned Word Modulo
+ int i;
+ for (i = 0; i < 4; i++)
+ (*vS).w[i] = (*vA).w[i] - (*vB).w[i];
+ PPC_INSN_VR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.1664:VX:av:vsubuws %VD, %VA, %VB:Vector Subtract Unsigned Word Saturate
+ int i, sat, tempsat;
+ signed64 temp;
+ for (i = 0; i < 4; i++) {
+ temp = (signed64)(unsigned32)(*vA).w[i] - (signed64)(unsigned32)(*vB).w[i];
+ (*vS).w[i] = altivec_unsigned_saturate_32(temp, &tempsat);
+ sat |= tempsat;
+ }
+ ALTIVEC_SET_SAT(sat);
+ PPC_INSN_VR_VSCR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+
+#
+# Vector Sum instructions, 6-166 ... 6-170
+#
+
+0.4,6.VS,11.VA,16.VB,21.1928:VX:av:vsumsws %VD, %VA, %VB:Vector Sum Across Signed Word Saturate
+ int i, sat;
+ signed64 temp;
+ temp = (signed64)(signed32)(*vB).w[3];
+ for (i = 0; i < 4; i++)
+ temp += (signed64)(signed32)(*vA).w[i];
+ (*vS).w[3] = altivec_signed_saturate_32(temp, &sat);
+ (*vS).w[0] = (*vS).w[1] = (*vS).w[2] = 0;
+ ALTIVEC_SET_SAT(sat);
+ PPC_INSN_VR_VSCR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.1672:VX:av:vsum2sws %VD, %VA, %VB:Vector Sum Across Partial (1/2) Signed Word Saturate
+ int i, j, sat, tempsat;
+ signed64 temp;
+ for (j = 0; j < 4; j += 2) {
+ temp = (signed64)(signed32)(*vB).w[j+1];
+ temp += (signed64)(signed32)(*vA).w[j] + (signed64)(signed32)(*vA).w[j+1];
+ (*vS).w[j+1] = altivec_signed_saturate_32(temp, &tempsat);
+ sat |= tempsat;
+ }
+ (*vS).w[0] = (*vS).w[2] = 0;
+ ALTIVEC_SET_SAT(sat);
+ PPC_INSN_VR_VSCR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.1800:VX:av:vsum4sbs %VD, %VA, %VB:Vector Sum Across Partial (1/4) Signed Byte Saturate
+ int i, j, sat, tempsat;
+ signed64 temp;
+ for (j = 0; j < 4; j++) {
+ temp = (signed64)(signed32)(*vB).w[j];
+ for (i = 0; i < 4; i++)
+ temp += (signed64)(signed8)(*vA).b[i+(j*4)];
+ (*vS).w[j] = altivec_signed_saturate_32(temp, &tempsat);
+ sat |= tempsat;
+ }
+ ALTIVEC_SET_SAT(sat);
+ PPC_INSN_VR_VSCR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.1608:VX:av:vsum4shs %VD, %VA, %VB:Vector Sum Across Partial (1/4) Signed Half Word Saturate
+ int i, j, sat, tempsat;
+ signed64 temp;
+ for (j = 0; j < 4; j++) {
+ temp = (signed64)(signed32)(*vB).w[j];
+ for (i = 0; i < 2; i++)
+ temp += (signed64)(signed16)(*vA).h[i+(j*2)];
+ (*vS).w[j] = altivec_signed_saturate_32(temp, &tempsat);
+ sat |= tempsat;
+ }
+ ALTIVEC_SET_SAT(sat);
+ PPC_INSN_VR_VSCR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+0.4,6.VS,11.VA,16.VB,21.1544:VX:av:vsum4ubs %VD, %VA, %VB:Vector Sum Across Partial (1/4) Unsigned Byte Saturate
+ int i, j, sat, tempsat;
+ signed64 utemp;
+ signed64 temp;
+ for (j = 0; j < 4; j++) {
+ utemp = (signed64)(unsigned32)(*vB).w[j];
+ for (i = 0; i < 4; i++)
+ utemp += (signed64)(unsigned16)(*vA).b[i+(j*4)];
+ temp = utemp;
+ (*vS).w[j] = altivec_unsigned_saturate_32(temp, &tempsat);
+ sat |= tempsat;
+ }
+ ALTIVEC_SET_SAT(sat);
+ PPC_INSN_VR_VSCR(VS_BITMASK, VA_BITMASK | VB_BITMASK);
+
+
+#
+# Vector Unpack instructions, 6-171 ... 6-176
+#
+
+0.4,6.VS,11.0,16.VB,21.846:VX:av:vupkhpx %VD, %VB:Vector Unpack High Pixel16
+ int i;
+ unsigned16 h;
+ for (i = 0; i < 4; i++) {
+ h = (*vB).h[AV_HINDEX(i)];
+ (*vS).w[i] = ((h & 0x8000) ? 0xff000000 : 0)
+ | ((h & 0x7c00) << 6)
+ | ((h & 0x03e0) << 3)
+ | ((h & 0x001f));
+ }
+ PPC_INSN_VR(VS_BITMASK, VB_BITMASK);
+
+0.4,6.VS,11.0,16.VB,21.526:VX:av:vupkhsb %VD, %VB:Vector Unpack High Signed Byte
+ int i;
+ for (i = 0; i < 8; i++)
+ (*vS).h[AV_HINDEX(i)] = (signed16)(signed8)(*vB).b[AV_BINDEX(i)];
+ PPC_INSN_VR(VS_BITMASK, VB_BITMASK);
+
+0.4,6.VS,11.0,16.VB,21.590:VX:av:vupkhsh %VD, %VB:Vector Unpack High Signed Half Word
+ int i;
+ for (i = 0; i < 4; i++)
+ (*vS).w[i] = (signed32)(signed16)(*vB).h[AV_HINDEX(i)];
+ PPC_INSN_VR(VS_BITMASK, VB_BITMASK);
+
+0.4,6.VS,11.0,16.VB,21.974:VX:av:vupklpx %VD, %VB:Vector Unpack Low Pixel16
+ int i;
+ unsigned16 h;
+ for (i = 0; i < 4; i++) {
+ h = (*vB).h[AV_HINDEX(i + 4)];
+ (*vS).w[i] = ((h & 0x8000) ? 0xff000000 : 0)
+ | ((h & 0x7c00) << 6)
+ | ((h & 0x03e0) << 3)
+ | ((h & 0x001f));
+ }
+ PPC_INSN_VR(VS_BITMASK, VB_BITMASK);
+
+0.4,6.VS,11.0,16.VB,21.654:VX:av:vupklsb %VD, %VB:Vector Unpack Low Signed Byte
+ int i;
+ for (i = 0; i < 8; i++)
+ (*vS).h[AV_HINDEX(i)] = (signed16)(signed8)(*vB).b[AV_BINDEX(i + 8)];
+ PPC_INSN_VR(VS_BITMASK, VB_BITMASK);
+
+0.4,6.VS,11.0,16.VB,21.718:VX:av:vupklsh %VD, %VB:Vector Unpack Low Signed Half Word
+ int i;
+ for (i = 0; i < 4; i++)
+ (*vS).w[i] = (signed32)(signed16)(*vB).h[AV_HINDEX(i + 4)];
+ PPC_INSN_VR(VS_BITMASK, VB_BITMASK);
diff --git a/sim/ppc/altivec_expression.h b/sim/ppc/altivec_expression.h
new file mode 100644
index 00000000000..6cf2e7648c3
--- /dev/null
+++ b/sim/ppc/altivec_expression.h
@@ -0,0 +1,50 @@
+/* Altivec expression macros, for PSIM, the PowerPC simulator.
+
+ Copyright 2003 Free Software Foundation, Inc.
+
+ Contributed by Red Hat Inc; developed under contract from Motorola.
+ Written by matthew green <mrg@redhat.com>.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* AltiVec macro helpers. */
+
+#define ALTIVEC_SET_CR6(vS, checkone) \
+do { \
+ if (checkone && ((*vS).w[0] == 0xffffffff && \
+ (*vS).w[1] == 0xffffffff && \
+ (*vS).w[2] == 0xffffffff && \
+ (*vS).w[3] == 0xffffffff)) \
+ CR_SET(6, 1 << 3); \
+ else if ((*vS).w[0] == 0 && \
+ (*vS).w[1] == 0 && \
+ (*vS).w[2] == 0 && \
+ (*vS).w[3] == 0) \
+ CR_SET(6, 1 << 1); \
+ else \
+ CR_SET(6, 0); \
+} while (0)
+
+#define VSCR_SAT 0x00000001
+#define VSCR_NJ 0x00010000
+
+#define ALTIVEC_SET_SAT(sat) \
+do { \
+ if (sat) \
+ VSCR |= VSCR_SAT; \
+} while (0)
diff --git a/sim/ppc/altivec_registers.h b/sim/ppc/altivec_registers.h
new file mode 100644
index 00000000000..923f5c4401c
--- /dev/null
+++ b/sim/ppc/altivec_registers.h
@@ -0,0 +1,63 @@
+/* Altivec registers, for PSIM, the PowerPC simulator.
+
+ Copyright 2003 Free Software Foundation, Inc.
+
+ Contributed by Red Hat Inc; developed under contract from Motorola.
+ Written by matthew green <mrg@redhat.com>.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Manage this as 4 32-bit entities, 8 16-bit entities or 16 8-bit
+ entities. */
+typedef union
+{
+ unsigned8 b[16];
+ unsigned16 h[8];
+ unsigned32 w[4];
+} vreg;
+
+typedef unsigned32 vscreg;
+
+struct altivec_regs {
+ /* AltiVec Registers */
+ vreg vr[32];
+ vscreg vscr;
+};
+
+/* AltiVec registers */
+#define VR(N) cpu_registers(processor)->altivec.vr[N]
+
+/* AltiVec vector status and control register */
+#define VSCR cpu_registers(processor)->altivec.vscr
+
+/* AltiVec endian helpers, wrong endian hosts vs targets need to be
+ sure to get the right bytes/halfs/words when the order matters.
+ Note that many AltiVec instructions do not depend on byte order and
+ work on N independant bits of data. This is only for the
+ instructions that actually move data around. */
+
+#if (WITH_HOST_BYTE_ORDER == BIG_ENDIAN)
+#define AV_BINDEX(x) ((x) & 15)
+#define AV_HINDEX(x) ((x) & 7)
+#else
+static char endian_b2l_bindex[16] = { 3, 2, 1, 0, 7, 6, 5, 4,
+ 11, 10, 9, 8, 15, 14, 13, 12 };
+static char endian_b2l_hindex[16] = { 1, 0, 3, 2, 5, 4, 7, 6 };
+#define AV_BINDEX(x) endian_b2l_bindex[(x) & 15]
+#define AV_HINDEX(x) endian_b2l_hindex[(x) & 7]
+#endif
diff --git a/sim/ppc/configure b/sim/ppc/configure
index c6f70630f27..a48a8310911 100755
--- a/sim/ppc/configure
+++ b/sim/ppc/configure
@@ -163,7 +163,7 @@ ac_help="$ac_help
ac_help="$ac_help
--enable-sim-filter=rule Specify filter rules."
ac_help="$ac_help
- --enable-sim-float Specify whether to use host floating point or simulate."
+ --enable-sim-float Specify whether the target has hard, soft, altivec or e500 floating point."
ac_help="$ac_help
--enable-sim-hardware=list Specify the hardware to be included in the build."
ac_help="$ac_help
@@ -3036,13 +3036,21 @@ if test "${enable_sim_float+set}" = set; then
case "${enableval}" in
yes | hard) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT";;
no | soft) sim_float="-DWITH_FLOATING_POINT=SOFT_FLOATING_POINT";;
+ altivec) sim_float="-DWITH_ALTIVEC" ; sim_filter="${sim_filter},av" ;;
+ *spe*|*simd*) sim_float="-DWITH_E500" ; sim_filter="${sim_filter},e500" ;;
*) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-float"" 1>&2; exit 1; }; sim_float="";;
esac
if test x"$silent" != x"yes" && test x"$sim_float" != x""; then
echo "Setting float flags = $sim_float" 6>&1
fi
else
- sim_float=""
+
+case "${target}" in
+ *altivec*) sim_float="-DWITH_ALTIVEC" ; sim_filter="${sim_filter},av" ;;
+ *spe*|*simd*) sim_float="-DWITH_E500" ; sim_filter="${sim_filter},e500" ;;
+ *) sim_float=""
+esac
+
fi
@@ -3103,14 +3111,14 @@ else
if test "x$cross_compiling" = "xno"; then
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3107: checking whether byte ordering is bigendian" >&5
+echo "configure:3115: checking whether byte ordering is bigendian" >&5
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF
-#line 3114 "configure"
+#line 3122 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -3121,11 +3129,11 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:3125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
# It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <<EOF
-#line 3129 "configure"
+#line 3137 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -3136,7 +3144,7 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:3140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_bigendian=yes
else
@@ -3156,7 +3164,7 @@ if test "$cross_compiling" = yes; then
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3160 "configure"
+#line 3168 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
@@ -3169,7 +3177,7 @@ main () {
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
-if { (eval echo configure:3173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_bigendian=no
else
@@ -3623,7 +3631,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:3627: checking host system type" >&5
+echo "configure:3635: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -3644,7 +3652,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:3648: checking target system type" >&5
+echo "configure:3656: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -3662,7 +3670,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:3666: checking build system type" >&5
+echo "configure:3674: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -3709,12 +3717,12 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x,"
echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
-echo "configure:3713: checking for st_blksize in struct stat" >&5
+echo "configure:3721: checking for st_blksize in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3718 "configure"
+#line 3726 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -3722,7 +3730,7 @@ int main() {
struct stat s; s.st_blksize;
; return 0; }
EOF
-if { (eval echo configure:3726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_blksize=yes
else
@@ -3743,12 +3751,12 @@ EOF
fi
echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
-echo "configure:3747: checking for st_blocks in struct stat" >&5
+echo "configure:3755: checking for st_blocks in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3752 "configure"
+#line 3760 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -3756,7 +3764,7 @@ int main() {
struct stat s; s.st_blocks;
; return 0; }
EOF
-if { (eval echo configure:3760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_blocks=yes
else
@@ -3779,12 +3787,12 @@ else
fi
echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
-echo "configure:3783: checking for st_rdev in struct stat" >&5
+echo "configure:3791: checking for st_rdev in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3788 "configure"
+#line 3796 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -3792,7 +3800,7 @@ int main() {
struct stat s; s.st_rdev;
; return 0; }
EOF
-if { (eval echo configure:3796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_rdev=yes
else
@@ -3813,12 +3821,12 @@ EOF
fi
echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
-echo "configure:3817: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:3825: checking whether struct tm is in sys/time.h or time.h" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3822 "configure"
+#line 3830 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
@@ -3826,7 +3834,7 @@ int main() {
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
-if { (eval echo configure:3830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm=time.h
else
@@ -3847,12 +3855,12 @@ EOF
fi
echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
-echo "configure:3851: checking for tm_zone in struct tm" >&5
+echo "configure:3859: checking for tm_zone in struct tm" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3856 "configure"
+#line 3864 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_cv_struct_tm>
@@ -3860,7 +3868,7 @@ int main() {
struct tm tm; tm.tm_zone;
; return 0; }
EOF
-if { (eval echo configure:3864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm_zone=yes
else
@@ -3880,12 +3888,12 @@ EOF
else
echo $ac_n "checking for tzname""... $ac_c" 1>&6
-echo "configure:3884: checking for tzname" >&5
+echo "configure:3892: checking for tzname" >&5
if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3889 "configure"
+#line 3897 "configure"
#include "confdefs.h"
#include <time.h>
#ifndef tzname /* For SGI. */
@@ -3895,7 +3903,7 @@ int main() {
atoi(*tzname);
; return 0; }
EOF
-if { (eval echo configure:3899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_var_tzname=yes
else
@@ -3918,12 +3926,12 @@ fi
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:3922: checking for uid_t in sys/types.h" >&5
+echo "configure:3930: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3927 "configure"
+#line 3935 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
@@ -3952,7 +3960,7 @@ EOF
fi
echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
-echo "configure:3956: checking type of array argument to getgroups" >&5
+echo "configure:3964: checking type of array argument to getgroups" >&5
if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3960,7 +3968,7 @@ else
ac_cv_type_getgroups=cross
else
cat > conftest.$ac_ext <<EOF
-#line 3964 "configure"
+#line 3972 "configure"
#include "confdefs.h"
/* Thanks to Mike Rendell for this test. */
@@ -3985,7 +3993,7 @@ main()
}
EOF
-if { (eval echo configure:3989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_type_getgroups=gid_t
else
@@ -3999,7 +4007,7 @@ fi
if test $ac_cv_type_getgroups = cross; then
cat > conftest.$ac_ext <<EOF
-#line 4003 "configure"
+#line 4011 "configure"
#include "confdefs.h"
#include <unistd.h>
EOF
@@ -4023,12 +4031,12 @@ EOF
echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:4027: checking for mode_t" >&5
+echo "configure:4035: checking for mode_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4032 "configure"
+#line 4040 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -4056,12 +4064,12 @@ EOF
fi
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:4060: checking for off_t" >&5
+echo "configure:4068: 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 4065 "configure"
+#line 4073 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -4089,12 +4097,12 @@ EOF
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:4093: checking for pid_t" >&5
+echo "configure:4101: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4098 "configure"
+#line 4106 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -4122,12 +4130,12 @@ EOF
fi
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:4126: checking return type of signal handlers" >&5
+echo "configure:4134: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4131 "configure"
+#line 4139 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -4144,7 +4152,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:4148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -4163,12 +4171,12 @@ EOF
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:4167: checking for size_t" >&5
+echo "configure:4175: 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 4172 "configure"
+#line 4180 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -4196,12 +4204,12 @@ EOF
fi
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:4200: checking for uid_t in sys/types.h" >&5
+echo "configure:4208: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4205 "configure"
+#line 4213 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
@@ -4233,12 +4241,12 @@ fi
for ac_func in access cfgetispeed cfgetospeed cfsetispeed cfsetospeed chdir chmod chown dup dup2 fchmod fchown fcntl fstat fstatfs getdirentries getegid geteuid getgid getpid getppid getrusage gettimeofday getuid ioctl kill link lseek lstat mkdir pipe readlink rmdir setreuid setregid stat sigprocmask stat symlink tcgetattr tcsetattr tcsendbreak tcdrain tcflush tcflow tcgetpgrp tcsetpgrp time umask unlink
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4237: checking for $ac_func" >&5
+echo "configure:4245: 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 4242 "configure"
+#line 4250 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4261,7 +4269,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4273: \"$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
@@ -4290,17 +4298,17 @@ for ac_hdr in fcntl.h stdlib.h string.h strings.h sys/ioctl.h sys/param.h sys/re
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4294: checking for $ac_hdr" >&5
+echo "configure:4302: 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 4299 "configure"
+#line 4307 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4312: \"$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*
@@ -4331,12 +4339,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:4335: checking for $ac_hdr that defines DIR" >&5
+echo "configure:4343: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4340 "configure"
+#line 4348 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@@ -4344,7 +4352,7 @@ int main() {
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:4348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
@@ -4369,7 +4377,7 @@ done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:4373: checking for opendir in -ldir" >&5
+echo "configure:4381: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4377,7 +4385,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4381 "configure"
+#line 4389 "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
@@ -4388,7 +4396,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:4392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4400: \"$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
@@ -4410,7 +4418,7 @@ fi
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:4414: checking for opendir in -lx" >&5
+echo "configure:4422: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4418,7 +4426,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4422 "configure"
+#line 4430 "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
@@ -4429,7 +4437,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:4433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4454,12 +4462,12 @@ fi
sim_termio=""
echo $ac_n "checking for struct termios""... $ac_c" 1>&6
-echo "configure:4458: checking for struct termios" >&5
+echo "configure:4466: checking for struct termios" >&5
if eval "test \"`echo '$''{'ac_cv_termios_struct'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4463 "configure"
+#line 4471 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/termios.h>
@@ -4472,7 +4480,7 @@ static struct termios x;
x.c_cc[NCCS] = 0;
; return 0; }
EOF
-if { (eval echo configure:4476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_termios_struct=yes
else
@@ -4491,12 +4499,12 @@ fi
if test "$ac_cv_termios_struct" = "yes"; then
echo $ac_n "checking for c_line field in struct termios""... $ac_c" 1>&6
-echo "configure:4495: checking for c_line field in struct termios" >&5
+echo "configure:4503: checking for c_line field in struct termios" >&5
if eval "test \"`echo '$''{'ac_cv_termios_cline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4500 "configure"
+#line 4508 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/termios.h>
@@ -4504,7 +4512,7 @@ int main() {
static struct termios x; x.c_line = 0;
; return 0; }
EOF
-if { (eval echo configure:4508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_termios_cline=yes
else
@@ -4527,12 +4535,12 @@ fi
if test "$ac_cv_termios_struct" != "yes"; then
echo $ac_n "checking for struct termio""... $ac_c" 1>&6
-echo "configure:4531: checking for struct termio" >&5
+echo "configure:4539: checking for struct termio" >&5
if eval "test \"`echo '$''{'ac_cv_termio_struct'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4536 "configure"
+#line 4544 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/termio.h>
@@ -4545,7 +4553,7 @@ static struct termio x;
x.c_cc[NCC] = 0;
; return 0; }
EOF
-if { (eval echo configure:4549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_termio_struct=yes
else
@@ -4567,12 +4575,12 @@ fi
if test "$ac_cv_termio_struct" = "yes"; then
echo $ac_n "checking for c_line field in struct termio""... $ac_c" 1>&6
-echo "configure:4571: checking for c_line field in struct termio" >&5
+echo "configure:4579: checking for c_line field in struct termio" >&5
if eval "test \"`echo '$''{'ac_cv_termio_cline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4576 "configure"
+#line 4584 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/termio.h>
@@ -4580,7 +4588,7 @@ int main() {
static struct termio x; x.c_line = 0;
; return 0; }
EOF
-if { (eval echo configure:4584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_termio_cline=yes
else
@@ -4603,7 +4611,7 @@ fi
sim_devzero=""
echo $ac_n "checking for /dev/zero""... $ac_c" 1>&6
-echo "configure:4607: checking for /dev/zero" >&5
+echo "configure:4615: checking for /dev/zero" >&5
if eval "test \"`echo '$''{'ac_cv_devzero'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4611,7 +4619,7 @@ else
ac_cv_devzero=no
else
cat > conftest.$ac_ext <<EOF
-#line 4615 "configure"
+#line 4623 "configure"
#include "confdefs.h"
#include <fcntl.h>
main () {
@@ -4630,7 +4638,7 @@ main () {
return 0;
}
EOF
-if { (eval echo configure:4634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_devzero=yes
else
@@ -4652,7 +4660,7 @@ else
fi
echo $ac_n "checking for common simulator directory""... $ac_c" 1>&6
-echo "configure:4656: checking for common simulator directory" >&5
+echo "configure:4664: checking for common simulator directory" >&5
if test -f "${srcdir}/../common/callback.c"; then
echo "$ac_t""yes" 1>&6
sim_callback="callback.o targ-map.o"
@@ -4664,7 +4672,7 @@ else
fi
echo $ac_n "checking for common simulator directory fpu implementation""... $ac_c" 1>&6
-echo "configure:4668: checking for common simulator directory fpu implementation" >&5
+echo "configure:4676: checking for common simulator directory fpu implementation" >&5
if test -f "${srcdir}/../common/sim-fpu.c"; then
echo "$ac_t""yes" 1>&6
sim_fpu_cflags="-DHAVE_COMMON_FPU -I${srcdir}/../common"
@@ -4676,12 +4684,12 @@ else
fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:4680: checking for Cygwin environment" >&5
+echo "configure:4688: 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 4685 "configure"
+#line 4693 "configure"
#include "confdefs.h"
int main() {
@@ -4692,7 +4700,7 @@ int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:4696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
@@ -4709,19 +4717,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:4713: checking for mingw32 environment" >&5
+echo "configure:4721: 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 4718 "configure"
+#line 4726 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:4725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
@@ -4740,7 +4748,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:4744: checking for executable suffix" >&5
+echo "configure:4752: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4750,7 +4758,7 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:4754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:4762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj | *.ilk | *.pdb) ;;
@@ -4779,7 +4787,7 @@ AR=${AR-ar}
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4783: checking for $ac_word" >&5
+echo "configure:4791: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
diff --git a/sim/ppc/configure.in b/sim/ppc/configure.in
index e130b3afb2a..0d7a0940e29 100644
--- a/sim/ppc/configure.in
+++ b/sim/ppc/configure.in
@@ -190,15 +190,23 @@ fi])dnl
AC_ARG_ENABLE(sim-float,
-[ --enable-sim-float Specify whether to use host floating point or simulate.],
+[ --enable-sim-float Specify whether the target has hard, soft, altivec or e500 floating point.],
[case "${enableval}" in
yes | hard) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT";;
no | soft) sim_float="-DWITH_FLOATING_POINT=SOFT_FLOATING_POINT";;
+ altivec) sim_float="-DWITH_ALTIVEC" ; sim_filter="${sim_filter},av" ;;
+ *spe*|*simd*) sim_float="-DWITH_E500" ; sim_filter="${sim_filter},e500" ;;
*) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-float"); sim_float="";;
esac
if test x"$silent" != x"yes" && test x"$sim_float" != x""; then
echo "Setting float flags = $sim_float" 6>&1
-fi],[sim_float=""])dnl
+fi],[
+case "${target}" in
+ *altivec*) sim_float="-DWITH_ALTIVEC" ; sim_filter="${sim_filter},av" ;;
+ *spe*|*simd*) sim_float="-DWITH_E500" ; sim_filter="${sim_filter},e500" ;;
+ *) sim_float=""
+esac
+])dnl
AC_ARG_ENABLE(sim-hardware,
diff --git a/sim/ppc/e500.igen b/sim/ppc/e500.igen
new file mode 100644
index 00000000000..f4ebfc7ffaf
--- /dev/null
+++ b/sim/ppc/e500.igen
@@ -0,0 +1,3348 @@
+# e500 core instructions, for PSIM, the PowerPC simulator.
+
+# Copyright 2003 Free Software Foundation, Inc.
+
+# Contributed by Red Hat Inc; developed under contract from Motorola.
+# Written by matthew green <mrg@redhat.com>.
+
+# This file is part of GDB.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with This program; see the file COPYING. If not, write to
+# the Free Software Foundation, 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+#
+# e500 Core Complex Instructions
+#
+
+:cache:e500::signed_word *:rAh:RA:(cpu_registers(processor)->e500.gprh + RA)
+:cache:e500::signed_word *:rSh:RS:(cpu_registers(processor)->e500.gprh + RS)
+:cache:e500::signed_word *:rBh:RB:(cpu_registers(processor)->e500.gprh + RB)
+
+# Flags for model.h
+::model-macro:::
+ #define PPC_INSN_INT_SPR(OUT_MASK, IN_MASK, SPR) \
+ do { \
+ if (CURRENT_MODEL_ISSUE > 0) \
+ ppc_insn_int_spr(MY_INDEX, cpu_model(processor), OUT_MASK, IN_MASK, SPR); \
+ } while (0)
+
+# Schedule an instruction that takes 2 integer register and produces a special purpose output register plus an integer output register
+void::model-function::ppc_insn_int_spr:itable_index index, model_data *model_ptr, const unsigned32 out_mask, const unsigned32 in_mask, const unsigned nSPR
+ const unsigned32 int_mask = out_mask | in_mask;
+ model_busy *busy_ptr;
+
+ while ((model_ptr->int_busy & int_mask) != 0 || model_ptr->spr_busy[nSPR] != 0) {
+ if (WITH_TRACE && ppc_trace[trace_model])
+ model_trace_busy_p(model_ptr, int_mask, 0, 0, nSPR);
+
+ model_ptr->nr_stalls_data++;
+ model_new_cycle(model_ptr);
+ }
+
+ busy_ptr = model_wait_for_unit(index, model_ptr, &model_ptr->timing[index]);
+ busy_ptr->int_busy |= out_mask;
+ model_ptr->int_busy |= out_mask;
+ busy_ptr->spr_busy = nSPR;
+ model_ptr->spr_busy[nSPR] = 1;
+ busy_ptr->nr_writebacks = (PPC_ONE_BIT_SET_P(out_mask)) ? 3 : 2;
+ TRACE(trace_model,("Making register %s busy.\n", spr_name(nSPR)));
+
+#
+# SPE Modulo Fractional Multiplication handling support
+#
+:function:e500::unsigned64:ev_multiply16_smf:signed16 a, signed16 b, int *sat
+ signed32 a32 = a, b32 = b, rv32;
+ rv32 = a * b;
+ *sat = (rv32 & (3<<30)) == (3<<30);
+ return (signed64)rv32 << 1;
+
+:function:e500::unsigned64:ev_multiply32_smf:signed32 a, signed32 b, int *sat
+ signed64 rv64, a64 = a, b64 = b;
+ rv64 = a64 * b64;
+ *sat = (rv64 & ((signed64)3<<62)) == ((signed64)3<<62);
+ /* Loses top sign bit. */
+ return rv64 << 1;
+#
+# SPE Saturation handling support
+#
+:function:e500::signed32:ev_multiply16_ssf:signed16 a, signed16 b, int *sat
+ signed32 rv32;
+ if (a == 0xffff8000 && b == 0xffff8000)
+ {
+ rv32 = 0x7fffffffL;
+ * sat = 1;
+ return rv32;
+ }
+ else
+ {
+ signed32 a32 = a, b32 = b;
+
+ rv32 = a * b;
+ * sat = (rv32 & (3<<30)) == (3<<30);
+ return (signed64)rv32 << 1;
+ }
+
+:function:e500::signed64:ev_multiply32_ssf:signed32 a, signed32 b, int *sat
+ signed64 rv64;
+ if (a == 0x80000000 && b == 0x80000000)
+ {
+ rv64 = 0x7fffffffffffffffLL;
+ * sat = 1;
+ return rv64;
+ }
+ else
+ {
+ signed64 a64 = a, b64 = b;
+ rv64 = a64 * b64;
+ *sat = (rv64 & ((signed64)3<<62)) == ((signed64)3<<62);
+ /* Loses top sign bit. */
+ return rv64 << 1;
+ }
+
+#
+# SPE FP handling support
+#
+
+:function:e500::void:ev_check_guard:sim_fpu *a, int fg, int fx, cpu *processor
+ unsigned64 guard;
+ guard = sim_fpu_guard(a, 0);
+ if (guard & 1)
+ EV_SET_SPEFSCR_BITS(fg);
+ if (guard & ~1)
+ EV_SET_SPEFSCR_BITS(fx);
+
+:function:e500::void:booke_sim_fpu_32to:sim_fpu *dst, unsigned32 packed
+ sim_fpu_32to (dst, packed);
+
+ /* Set normally unused fields to allow booke arithmetic. */
+ if (dst->class == sim_fpu_class_infinity)
+ {
+ dst->normal_exp = 128;
+ dst->fraction = ((unsigned64)1 << 60);
+ }
+ else if (dst->class == sim_fpu_class_qnan
+ || dst->class == sim_fpu_class_snan)
+ {
+ dst->normal_exp = 128;
+ /* This is set, but without the implicit bit, so we have to or
+ in the implicit bit. */
+ dst->fraction |= ((unsigned64)1 << 60);
+ }
+
+:function:e500::int:booke_sim_fpu_add:sim_fpu *d, sim_fpu *a, sim_fpu *b, int inv, int over, int under, cpu *processor
+ int invalid_operand, overflow_result, underflow_result;
+ int dest_exp;
+
+ invalid_operand = 0;
+ overflow_result = 0;
+ underflow_result = 0;
+
+ /* Treat NaN, Inf, and denorm like normal numbers, and signal invalid
+ operand if it hasn't already been done. */
+ if (EV_IS_INFDENORMNAN (a))
+ {
+ a->class = sim_fpu_class_number;
+
+ EV_SET_SPEFSCR_BITS (inv);
+ invalid_operand = 1;
+ }
+ if (EV_IS_INFDENORMNAN (b))
+ {
+ b->class = sim_fpu_class_number;
+
+ if (! invalid_operand)
+ {
+ EV_SET_SPEFSCR_BITS (inv);
+ invalid_operand = 1;
+ }
+ }
+
+ sim_fpu_add (d, a, b);
+
+ dest_exp = booke_sim_fpu_exp (d);
+ /* If this is a denorm, force to zero, and signal underflow if
+ we haven't already indicated invalid operand. */
+ if (dest_exp <= -127)
+ {
+ int sign = d->sign;
+
+ *d = sim_fpu_zero;
+ d->sign = sign;
+ if (! invalid_operand)
+ {
+ EV_SET_SPEFSCR_BITS (under);
+ underflow_result = 1;
+ }
+ }
+ /* If this is Inf/NaN, force to pmax/nmax, and signal overflow if
+ we haven't already indicated invalid operand. */
+ else if (dest_exp >= 127)
+ {
+ int sign = d->sign;
+
+ *d = sim_fpu_max32;
+ d->sign = sign;
+ if (! invalid_operand)
+ {
+ EV_SET_SPEFSCR_BITS (over);
+ overflow_result = 1;
+ }
+ }
+ /* Destination sign is sign of operand with larger magnitude, or
+ the sign of the first operand if operands have the same
+ magnitude. Thus if the result is zero, we force it to have
+ the sign of the first operand. */
+ else if (d->fraction == 0)
+ d->sign = a->sign;
+
+ return invalid_operand || overflow_result || underflow_result;
+
+:function:e500::unsigned32:ev_fs_add:unsigned32 aa, unsigned32 bb, int inv, int over, int under, int fg, int fx, cpu *processor
+ sim_fpu a, b, d;
+ unsigned32 w;
+ int exception;
+
+ booke_sim_fpu_32to (&a, aa);
+ booke_sim_fpu_32to (&b, bb);
+
+ exception = booke_sim_fpu_add (&d, &a, &b, inv, over, under,
+ processor);
+
+ sim_fpu_to32 (&w, &d);
+ if (! exception)
+ ev_check_guard(&d, fg, fx, processor);
+ return w;
+
+:function:e500::unsigned32:ev_fs_sub:unsigned32 aa, unsigned32 bb, int inv, int over, int under, int fg, int fx, cpu *processor
+ sim_fpu a, b, d;
+ unsigned32 w;
+ int exception;
+
+ booke_sim_fpu_32to (&a, aa);
+ booke_sim_fpu_32to (&b, bb);
+
+ /* Invert sign of second operand, and add. */
+ b.sign = ! b.sign;
+ exception = booke_sim_fpu_add (&d, &a, &b, inv, over, under,
+ processor);
+
+ sim_fpu_to32 (&w, &d);
+ if (! exception)
+ ev_check_guard(&d, fg, fx, processor);
+ return w;
+
+# sim_fpu_exp leaves the normal_exp field undefined for Inf and NaN.
+# The booke algorithms require exp values, so we fake them here.
+# fixme: It also apparently does the same for zero, but should not.
+:function:e500::unsigned32:booke_sim_fpu_exp:sim_fpu *x
+ int y = sim_fpu_is (x);
+ if (y == SIM_FPU_IS_PZERO || y == SIM_FPU_IS_NZERO)
+ return 0;
+ else if (y == SIM_FPU_IS_SNAN || y == SIM_FPU_IS_QNAN
+ || y == SIM_FPU_IS_NINF || y == SIM_FPU_IS_PINF)
+ return 128;
+ else
+ return sim_fpu_exp (x);
+
+:function:e500::unsigned32:ev_fs_mul:unsigned32 aa, unsigned32 bb, int inv, int over, int under, int fg, int fx, cpu *processor
+ sim_fpu a, b, d;
+ unsigned32 w;
+ int sa, sb, ea, eb, ei;
+ sim_fpu_32to (&a, aa);
+ sim_fpu_32to (&b, bb);
+ sa = sim_fpu_sign(&a);
+ sb = sim_fpu_sign(&b);
+ ea = booke_sim_fpu_exp(&a);
+ eb = booke_sim_fpu_exp(&b);
+ ei = ea + eb + 127;
+ if (sim_fpu_is_zero (&a) || sim_fpu_is_zero (&b))
+ w = 0;
+ else if (sa == sb) {
+ if (ei >= 254) {
+ w = EV_PMAX;
+ EV_SET_SPEFSCR_BITS(over);
+ } else if (ei < 1) {
+ d = sim_fpu_zero;
+ sim_fpu_to32 (&w, &d);
+ w &= 0x7fffffff; /* Clear sign bit. */
+ } else {
+ goto normal_mul;
+ }
+ } else {
+ if (ei >= 254) {
+ w = EV_NMAX;
+ EV_SET_SPEFSCR_BITS(over);
+ } else if (ei < 1) {
+ d = sim_fpu_zero;
+ sim_fpu_to32 (&w, &d);
+ w |= 0x80000000; /* Set sign bit. */
+ } else {
+ normal_mul:
+ if (EV_IS_INFDENORMNAN(&a) || EV_IS_INFDENORMNAN(&b))
+ EV_SET_SPEFSCR_BITS(inv);
+ sim_fpu_mul (&d, &a, &b);
+ sim_fpu_to32 (&w, &d);
+ }
+ }
+ return w;
+
+:function:e500::unsigned32:ev_fs_div:unsigned32 aa, unsigned32 bb, int inv, int over, int under, int dbz, int fg, int fx, cpu *processor
+ sim_fpu a, b, d;
+ unsigned32 w;
+ int sa, sb, ea, eb, ei;
+
+ sim_fpu_32to (&a, aa);
+ sim_fpu_32to (&b, bb);
+ sa = sim_fpu_sign(&a);
+ sb = sim_fpu_sign(&b);
+ ea = booke_sim_fpu_exp(&a);
+ eb = booke_sim_fpu_exp(&b);
+ ei = ea - eb + 127;
+
+ /* Special cases to handle behaviour of e500 hardware.
+ cf case 107543. */
+ if (sim_fpu_is_nan (&a) || sim_fpu_is_nan (&b)
+ || sim_fpu_is_zero (&a) || sim_fpu_is_zero (&b))
+ {
+ if (sim_fpu_is_snan (&a) || sim_fpu_is_snan (&b))
+ {
+ if (bb == 0x3f800000)
+ w = EV_PMAX;
+ else if (aa == 0x7fc00001)
+ w = 0x3fbffffe;
+ else
+ goto normal_div;
+ }
+ else
+ goto normal_div;
+ }
+ else if (sim_fpu_is_infinity (&a) && sim_fpu_is_infinity (&b))
+ {
+ if (sa == sb)
+ sim_fpu_32to (&d, 0x3f800000);
+ else
+ sim_fpu_32to (&d, 0xbf800000);
+ sim_fpu_to32 (&w, &d);
+ }
+ else if (sa == sb) {
+ if (ei > 254) {
+ w = EV_PMAX;
+ EV_SET_SPEFSCR_BITS(over);
+ } else if (ei <= 1) {
+ d = sim_fpu_zero;
+ sim_fpu_to32 (&w, &d);
+ w &= 0x7fffffff; /* Clear sign bit. */
+ } else {
+ goto normal_div;
+ }
+ } else {
+ if (ei > 254) {
+ w = EV_NMAX;
+ EV_SET_SPEFSCR_BITS(over);
+ } else if (ei <= 1) {
+ d = sim_fpu_zero;
+ sim_fpu_to32 (&w, &d);
+ w |= 0x80000000; /* Set sign bit. */
+ } else {
+ normal_div:
+ if (EV_IS_INFDENORMNAN(&a) || EV_IS_INFDENORMNAN(&b))
+ EV_SET_SPEFSCR_BITS(inv);
+ if (sim_fpu_is_zero (&b))
+ {
+ if (sim_fpu_is_zero (&a))
+ EV_SET_SPEFSCR_BITS(dbz);
+ else
+ EV_SET_SPEFSCR_BITS(inv);
+ w = sa ? EV_NMAX : EV_PMAX;
+ }
+ else
+ {
+ sim_fpu_div (&d, &a, &b);
+ sim_fpu_to32 (&w, &d);
+ ev_check_guard(&d, fg, fx, processor);
+ }
+ }
+ }
+ return w;
+
+
+#
+# A.2.7 Integer SPE Simple Instructions
+#
+
+0.4,6.RS,11.RA,16.RB,21.512:X:e500:evaddw %RS,%RA,%RB:Vector Add Word
+ unsigned32 w1, w2;
+ w1 = *rBh + *rAh;
+ w2 = *rB + *rA;
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ //printf("evaddw: *rSh = %08x; *rS = %08x; w1 = %08x w2 = %08x\n", *rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.IMM,16.RB,21.514:X:e500:evaddiw %RS,%RB,%IMM:Vector Add Immediate Word
+ unsigned32 w1, w2;
+ w1 = *rBh + IMM;
+ w2 = *rB + IMM;
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ //printf("evaddiw: *rSh = %08x; *rS = %08x; w1 = %08x w2 = %08x\n", *rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.516:X:e500:evsubfw %RS,%RA,%RB:Vector Subtract from Word
+ unsigned32 w1, w2;
+ w1 = *rBh - *rAh;
+ w2 = *rB - *rA;
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ //printf("evsubfw: *rSh = %08x; *rS = %08x; w1 = %08x w2 = %08x\n", *rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.IMM,16.RB,21.518:X:e500:evsubifw %RS,%RB,%IMM:Vector Subtract Immediate from Word
+ unsigned32 w1, w2;
+ w1 = *rBh - IMM;
+ w2 = *rB - IMM;
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ //printf("evsubifw: *rSh = %08x; *rS = %08x; IMM = %d\n", *rSh, *rS, IMM);
+ PPC_INSN_INT(RS_BITMASK, RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.0,21.520:X:e500:evabs %RS,%RA:Vector Absolute Value
+ signed32 w1, w2;
+ w1 = *rAh;
+ if (w1 < 0 && w1 != 0x80000000)
+ w1 = -w1;
+ w2 = *rA;
+ if (w2 < 0 && w2 != 0x80000000)
+ w2 = -w2;
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.0,21.521:X:e500:evneg %RS,%RA:Vector Negate
+ signed32 w1, w2;
+ w1 = *rAh;
+ /* the negative most negative number is the most negative number */
+ if (w1 != 0x80000000)
+ w1 = -w1;
+ w2 = *rA;
+ if (w2 != 0x80000000)
+ w2 = -w2;
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.0,21.522:X:e500:evextsb %RS,%RA:Vector Extend Signed Byte
+ unsigned64 w1, w2;
+ w1 = *rAh & 0xff;
+ if (w1 & 0x80)
+ w1 |= 0xffffff00;
+ w2 = *rA & 0xff;
+ if (w2 & 0x80)
+ w2 |= 0xffffff00;
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK , 0);
+
+0.4,6.RS,11.RA,16.0,21.523:X:e500:evextsb %RS,%RA:Vector Extend Signed Half Word
+ unsigned64 w1, w2;
+ w1 = *rAh & 0xffff;
+ if (w1 & 0x8000)
+ w1 |= 0xffff0000;
+ w2 = *rA & 0xffff;
+ if (w2 & 0x8000)
+ w2 |= 0xffff0000;
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.529:X:e500:evand %RS,%RA,%RB:Vector AND
+ unsigned32 w1, w2;
+ w1 = *rBh & *rAh;
+ w2 = *rB & *rA;
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.535:X:e500:evor %RS,%RA,%RB:Vector OR
+ unsigned32 w1, w2;
+ w1 = *rBh | *rAh;
+ w2 = *rB | *rA;
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.534:X:e500:evxor %RS,%RA,%RB:Vector XOR
+ unsigned32 w1, w2;
+ w1 = *rBh ^ *rAh;
+ w2 = *rB ^ *rA;
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.542:X:e500:evnand %RS,%RA,%RB:Vector NAND
+ unsigned32 w1, w2;
+ w1 = ~(*rBh & *rAh);
+ w2 = ~(*rB & *rA);
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.536:X:e500:evnor %RS,%RA,%RB:Vector NOR
+ unsigned32 w1, w2;
+ w1 = ~(*rBh | *rAh);
+ w2 = ~(*rB | *rA);
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.537:X:e500:eveqv %RS,%RA,%RB:Vector Equivalent
+ unsigned32 w1, w2;
+ w1 = (~*rBh) ^ *rAh;
+ w2 = (~*rB) ^ *rA;
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.530:X:e500:evandc %RS,%RA,%RB:Vector AND with Compliment
+ unsigned32 w1, w2;
+ w1 = (~*rBh) & *rAh;
+ w2 = (~*rB) & *rA;
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ //printf("evandc: *rSh = %08x; *rS = %08x\n", *rSh, *rS);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.539:X:e500:evorc %RS,%RA,%RB:Vector OR with Compliment
+ unsigned32 w1, w2;
+ w1 = (~*rBh) | *rAh;
+ w2 = (~*rB) | *rA;
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ //printf("evorc: *rSh = %08x; *rS = %08x\n", *rSh, *rS);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.552:X:e500:evrlw %RS,%RA,%RB:Vector Rotate Left Word
+ unsigned32 nh, nl, w1, w2;
+ nh = *rBh & 0x1f;
+ nl = *rB & 0x1f;
+ w1 = ((unsigned32)*rAh) << nh | ((unsigned32)*rAh) >> (32 - nh);
+ w2 = ((unsigned32)*rA) << nl | ((unsigned32)*rA) >> (32 - nl);
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ //printf("evrlw: nh %d nl %d *rSh = %08x; *rS = %08x\n", nh, nl, *rSh, *rS);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.UIMM,21.554:X:e500:evrlwi %RS,%RA,%UIMM:Vector Rotate Left Word Immediate
+ unsigned32 w1, w2, imm;
+ imm = (unsigned32)UIMM;
+ w1 = ((unsigned32)*rAh) << imm | ((unsigned32)*rAh) >> (32 - imm);
+ w2 = ((unsigned32)*rA) << imm | ((unsigned32)*rA) >> (32 - imm);
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.548:X:e500:evslw %RS,%RA,%RB:Vector Shift Left Word
+ unsigned32 nh, nl, w1, w2;
+ nh = *rBh & 0x1f;
+ nl = *rB & 0x1f;
+ w1 = ((unsigned32)*rAh) << nh;
+ w2 = ((unsigned32)*rA) << nl;
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.UIMM,21.550:X:e500:evslwi %RS,%RA,%UIMM:Vector Shift Left Word Immediate
+ unsigned32 w1, w2, imm = UIMM;
+ w1 = ((unsigned32)*rAh) << imm;
+ w2 = ((unsigned32)*rA) << imm;
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.545:X:e500:evsrws %RS,%RA,%RB:Vector Shift Right Word Signed
+ signed32 w1, w2;
+ unsigned32 nh, nl;
+ nh = *rBh & 0x1f;
+ nl = *rB & 0x1f;
+ w1 = ((signed32)*rAh) >> nh;
+ w2 = ((signed32)*rA) >> nl;
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ //printf("evsrws: nh %d nl %d *rSh = %08x; *rS = %08x\n", nh, nl, *rSh, *rS);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.544:X:e500:evsrwu %RS,%RA,%RB:Vector Shift Right Word Unsigned
+ unsigned32 w1, w2, nh, nl;
+ nh = *rBh & 0x1f;
+ nl = *rB & 0x1f;
+ w1 = ((unsigned32)*rAh) >> nh;
+ w2 = ((unsigned32)*rA) >> nl;
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.UIMM,21.547:X:e500:evsrwis %RS,%RA,%UIMM:Vector Shift Right Word Immediate Signed
+ signed32 w1, w2;
+ unsigned32 imm = UIMM;
+ w1 = ((signed32)*rAh) >> imm;
+ w2 = ((signed32)*rA) >> imm;
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.UIMM,21.546:X:e500:evsrwiu %RS,%RA,%UIMM:Vector Shift Right Word Immediate Unsigned
+ unsigned32 w1, w2, imm = UIMM;
+ w1 = ((unsigned32)*rAh) >> imm;
+ w2 = ((unsigned32)*rA) >> imm;
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.0,21.525:X:e500:evcntlzw %RS,%RA:Vector Count Leading Zeros Word
+ unsigned32 w1, w2, mask, c1, c2;
+ for (c1 = 0, mask = 0x80000000, w1 = *rAh;
+ !(w1 & mask) && mask != 0; mask >>= 1)
+ c1++;
+ for (c2 = 0, mask = 0x80000000, w2 = *rA;
+ !(w2 & mask) && mask != 0; mask >>= 1)
+ c2++;
+ EV_SET_REG2(*rSh, *rS, c1, c2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.0,21.526:X:e500:evcntlsw %RS,%RA:Vector Count Leading Sign Bits Word
+ unsigned32 w1, w2, mask, sign_bit, c1, c2;
+ for (c1 = 0, mask = 0x80000000, w1 = *rAh, sign_bit = w1 & mask;
+ ((w1 & mask) == sign_bit) && mask != 0;
+ mask >>= 1, sign_bit >>= 1)
+ c1++;
+ for (c2 = 0, mask = 0x80000000, w2 = *rA, sign_bit = w2 & mask;
+ ((w2 & mask) == sign_bit) && mask != 0;
+ mask >>= 1, sign_bit >>= 1)
+ c2++;
+ EV_SET_REG2(*rSh, *rS, c1, c2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.0,21.524:X:e500:evrndw %RS,%RA:Vector Round Word
+ unsigned32 w1, w2;
+ w1 = ((unsigned32)*rAh + 0x8000) & 0xffff0000;
+ w2 = ((unsigned32)*rA + 0x8000) & 0xffff0000;
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ //printf("evrndw: *rSh = %08x; *rS = %08x\n", *rSh, *rS);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.556:X:e500:evmergehi %RS,%RA,%RB:Vector Merge Hi
+ unsigned32 w1, w2;
+ w1 = *rAh;
+ w2 = *rBh;
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.557:X:e500:evmergelo %RS,%RA,%RB:Vector Merge Low
+ unsigned32 w1, w2;
+ w1 = *rA;
+ w2 = *rB;
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.559:X:e500:evmergelohi %RS,%RA,%RB:Vector Merge Low Hi
+ unsigned32 w1, w2;
+ w1 = *rA;
+ w2 = *rBh;
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.558:X:e500:evmergehilo %RS,%RA,%RB:Vector Merge Hi Low
+ unsigned32 w1, w2;
+ w1 = *rAh;
+ w2 = *rB;
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.SIMM,16.0,21.553:X:e500:evsplati %RS,%SIMM:Vector Splat Immediate
+ unsigned32 w;
+ w = SIMM & 0x1f;
+ if (w & 0x10)
+ w |= 0xffffffe0;
+ EV_SET_REG2(*rSh, *rS, w, w);
+ PPC_INSN_INT(RS_BITMASK, 0, 0);
+
+0.4,6.RS,11.SIMM,16.0,21.555:X:e500:evsplatfi %RS,%SIMM:Vector Splat Fractional Immediate
+ unsigned32 w;
+ w = SIMM << 27;
+ EV_SET_REG2(*rSh, *rS, w, w);
+ PPC_INSN_INT(RS_BITMASK, 0, 0);
+
+0.4,6.BF,9.0,11.RA,16.RB,21.561:X:e500:evcmpgts %BF,%RA,%RB:Vector Compare Greater Than Signed
+ signed32 ah, al, bh, bl;
+ int w, ch, cl;
+ ah = *rAh;
+ al = *rA;
+ bh = *rBh;
+ bl = *rB;
+ if (ah > bh)
+ ch = 1;
+ else
+ ch = 0;
+ if (al > bl)
+ cl = 1;
+ else
+ cl = 0;
+ w = ch << 3 | cl << 2 | (ch | cl) << 1 | (ch & cl);
+ CR_SET(BF, w);
+ PPC_INSN_INT_CR(0, RA_BITMASK | RB_BITMASK, BF_BITMASK);
+
+0.4,6.BF,9.0,11.RA,16.RB,21.560:X:e500:evcmpgtu %BF,%RA,%RB:Vector Compare Greater Than Unsigned
+ unsigned32 ah, al, bh, bl;
+ int w, ch, cl;
+ ah = *rAh;
+ al = *rA;
+ bh = *rBh;
+ bl = *rB;
+ if (ah > bh)
+ ch = 1;
+ else
+ ch = 0;
+ if (al > bl)
+ cl = 1;
+ else
+ cl = 0;
+ w = ch << 3 | cl << 2 | (ch | cl) << 1 | (ch & cl);
+ CR_SET(BF, w);
+ PPC_INSN_INT_CR(0, RA_BITMASK | RB_BITMASK, BF_BITMASK);
+
+0.4,6.BF,9.0,11.RA,16.RB,21.563:X:e500:evcmplts %BF,%RA,%RB:Vector Compare Less Than Signed
+ signed32 ah, al, bh, bl;
+ int w, ch, cl;
+ ah = *rAh;
+ al = *rA;
+ bh = *rBh;
+ bl = *rB;
+ if (ah < bh)
+ ch = 1;
+ else
+ ch = 0;
+ if (al < bl)
+ cl = 1;
+ else
+ cl = 0;
+ w = ch << 3 | cl << 2 | (ch | cl) << 1 | (ch & cl);
+ CR_SET(BF, w);
+ PPC_INSN_INT_CR(0, RA_BITMASK | RB_BITMASK, BF_BITMASK);
+
+0.4,6.BF,9.0,11.RA,16.RB,21.562:X:e500:evcmpltu %BF,%RA,%RB:Vector Compare Less Than Unsigned
+ unsigned32 ah, al, bh, bl;
+ int w, ch, cl;
+ ah = *rAh;
+ al = *rA;
+ bh = *rBh;
+ bl = *rB;
+ if (ah < bh)
+ ch = 1;
+ else
+ ch = 0;
+ if (al < bl)
+ cl = 1;
+ else
+ cl = 0;
+ w = ch << 3 | cl << 2 | (ch | cl) << 1 | (ch & cl);
+ CR_SET(BF, w);
+ PPC_INSN_INT_CR(0, RA_BITMASK | RB_BITMASK, BF_BITMASK);
+
+0.4,6.BF,9.0,11.RA,16.RB,21.564:X:e500:evcmpeq %BF,%RA,%RB:Vector Compare Equal
+ unsigned32 ah, al, bh, bl;
+ int w, ch, cl;
+ ah = *rAh;
+ al = *rA;
+ bh = *rBh;
+ bl = *rB;
+ if (ah == bh)
+ ch = 1;
+ else
+ ch = 0;
+ if (al == bl)
+ cl = 1;
+ else
+ cl = 0;
+ w = ch << 3 | cl << 2 | (ch | cl) << 1 | (ch & cl);
+ CR_SET(BF, w);
+ //printf("evcmpeq: ch %d cl %d BF %d, CR is now %08x\n", ch, cl, BF, CR);
+ PPC_INSN_INT_CR(0, RA_BITMASK | RB_BITMASK, BF_BITMASK);
+
+0.4,6.RS,11.RA,16.RB,21.79,29.CRFS:X:e500:evsel %RS,%RA,%RB,%CRFS:Vector Select
+ unsigned32 w1, w2;
+ int cr;
+ cr = CR_FIELD(CRFS);
+ if (cr & 8)
+ w1 = *rAh;
+ else
+ w1 = *rBh;
+ if (cr & 4)
+ w2 = *rA;
+ else
+ w2 = *rB;
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.527:X:e500:brinc %RS,%RA,%RB:Bit Reversed Increment
+ unsigned32 w1, w2, a, d, mask;
+ mask = (*rB) & 0xffff;
+ a = (*rA) & 0xffff;
+ d = EV_BITREVERSE16(1 + EV_BITREVERSE16(a | ~mask));
+ *rS = ((*rA) & 0xffff0000) | (d & 0xffff);
+ //printf("brinc: *rS = %08x\n", *rS);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+#
+# A.2.8 Integer SPE Complex Instructions
+#
+
+0.4,6.RS,11.RA,16.RB,21.1031:EVX:e500:evmhossf %RS,%RA,%RB:Vector Multiply Half Words Odd Signed Saturate Fractional
+ signed16 al, ah, bl, bh;
+ signed32 tl, th;
+ int movl, movh;
+
+ al = (signed16) EV_LOHALF (*rA);
+ ah = (signed16) EV_LOHALF (*rAh);
+ bl = (signed16) EV_LOHALF (*rB);
+ bh = (signed16) EV_LOHALF (*rBh);
+ tl = ev_multiply16_ssf (al, bl, &movl);
+ th = ev_multiply16_ssf (ah, bh, &movh);
+ EV_SET_REG2 (*rSh, *rS, EV_SATURATE (movh, 0x7fffffff, th),
+ EV_SATURATE (movl, 0x7fffffff, tl));
+ EV_SET_SPEFSCR_OV (movl, movh);
+ PPC_INSN_INT_SPR (RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.1063:EVX:e500:evmhossfa %RS,%RA,%RB:Vector Multiply Half Words Odd Signed Saturate Fractional Accumulate
+ signed16 al, ah, bl, bh;
+ signed32 tl, th;
+ int movl, movh;
+
+ al = (signed16) EV_LOHALF (*rA);
+ ah = (signed16) EV_LOHALF (*rAh);
+ bl = (signed16) EV_LOHALF (*rB);
+ bh = (signed16) EV_LOHALF (*rBh);
+ tl = ev_multiply16_ssf (al, bl, &movl);
+ th = ev_multiply16_ssf (ah, bh, &movh);
+ EV_SET_REG2 (*rSh, *rS, EV_SATURATE (movh, 0x7fffffff, th),
+ EV_SATURATE (movl, 0x7fffffff, tl));
+ EV_SET_SPEFSCR_OV (movl, movh);
+ PPC_INSN_INT_SPR (RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.1039:EVX:e500:evmhosmf %RS,%RA,%RB:Vector Multiply Half Words Odd Signed Modulo Fractional
+ signed16 al, ah, bl, bh;
+ signed32 tl, th;
+ int dummy;
+
+ al = (signed16) EV_LOHALF (*rA);
+ ah = (signed16) EV_LOHALF (*rAh);
+ bl = (signed16) EV_LOHALF (*rB);
+ bh = (signed16) EV_LOHALF (*rBh);
+ tl = ev_multiply16_smf (al, bl, & dummy);
+ th = ev_multiply16_smf (ah, bh, & dummy);
+ EV_SET_REG2 (*rSh, *rS, th, tl);
+ PPC_INSN_INT (RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1071:EVX:e500:evmhosmfa %RS,%RA,%RB:Vector Multiply Half Words Odd Signed Modulo Fractional Accumulate
+ signed32 al, ah, bl, bh;
+ signed32 tl, th;
+ int dummy;
+
+ al = (signed16) EV_LOHALF (*rA);
+ ah = (signed16) EV_LOHALF (*rAh);
+ bl = (signed16) EV_LOHALF (*rB);
+ bh = (signed16) EV_LOHALF (*rBh);
+ tl = ev_multiply16_smf (al, bl, & dummy);
+ th = ev_multiply16_smf (ah, bh, & dummy);
+ EV_SET_REG2_ACC (*rSh, *rS, th, tl);
+ PPC_INSN_INT (RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1037:EVX:e500:evmhosmi %RS,%RA,%RB:Vector Multiply Half Words Odd Signed Modulo Integer
+ signed32 al, ah, bl, bh, tl, th;
+ al = (signed32)(signed16)EV_LOHALF(*rA);
+ ah = (signed32)(signed16)EV_LOHALF(*rAh);
+ bl = (signed32)(signed16)EV_LOHALF(*rB);
+ bh = (signed32)(signed16)EV_LOHALF(*rBh);
+ tl = al * bl;
+ th = ah * bh;
+ EV_SET_REG2(*rSh, *rS, th, tl);
+ //printf("evmhosmi: *rSh = %08x; *rS = %08x\n", *rSh, *rS);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1069:EVX:e500:evmhosmia %RS,%RA,%RB:Vector Multiply Half Words Odd Signed Modulo Integer Accumulate
+ signed32 al, ah, bl, bh, tl, th;
+ al = (signed32)(signed16)EV_LOHALF(*rA);
+ ah = (signed32)(signed16)EV_LOHALF(*rAh);
+ bl = (signed32)(signed16)EV_LOHALF(*rB);
+ bh = (signed32)(signed16)EV_LOHALF(*rBh);
+ tl = al * bl;
+ th = ah * bh;
+ EV_SET_REG2_ACC(*rSh, *rS, th, tl);
+ //printf("evmhosmia: ACC = %08x; *rSh = %08x; *rS = %08x\n", ACC, *rSh, *rS);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1036:EVX:e500:evmhoumi %RS,%RA,%RB:Vector Multiply Half Words Odd Unsigned Modulo Integer
+ unsigned32 al, ah, bl, bh, tl, th;
+ al = (unsigned32)(unsigned16)EV_LOHALF(*rA);
+ ah = (unsigned32)(unsigned16)EV_LOHALF(*rAh);
+ bl = (unsigned32)(unsigned16)EV_LOHALF(*rB);
+ bh = (unsigned32)(unsigned16)EV_LOHALF(*rBh);
+ tl = al * bl;
+ th = ah * bh;
+ EV_SET_REG2(*rSh, *rS, th, tl);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1068:EVX:e500:evmhoumia %RS,%RA,%RB:Vector Multiply Half Words Odd Unsigned Modulo Integer Accumulate
+ unsigned32 al, ah, bl, bh, tl, th;
+ al = (unsigned32)(unsigned16)EV_LOHALF(*rA);
+ ah = (unsigned32)(unsigned16)EV_LOHALF(*rAh);
+ bl = (unsigned32)(unsigned16)EV_LOHALF(*rB);
+ bh = (unsigned32)(unsigned16)EV_LOHALF(*rBh);
+ tl = al * bl;
+ th = ah * bh;
+ EV_SET_REG2_ACC(*rSh, *rS, th, tl);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1027:EVX:e500:evmhessf %RS,%RA,%RB:Vector Multiply Half Words Even Signed Saturate Fractional
+ signed16 al, ah, bl, bh;
+ signed32 tl, th;
+ int movl, movh;
+
+ al = (signed16) EV_HIHALF (*rA);
+ ah = (signed16) EV_HIHALF (*rAh);
+ bl = (signed16) EV_HIHALF (*rB);
+ bh = (signed16) EV_HIHALF (*rBh);
+ tl = ev_multiply16_ssf (al, bl, &movl);
+ th = ev_multiply16_ssf (ah, bh, &movh);
+ EV_SET_REG2 (*rSh, *rS, EV_SATURATE (movh, 0x7fffffff, th),
+ EV_SATURATE (movl, 0x7fffffff, tl));
+ EV_SET_SPEFSCR_OV (movl, movh);
+ PPC_INSN_INT_SPR (RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.1059:EVX:e500:evmhessfa %RS,%RA,%RB:Vector Multiply Half Words Even Signed Saturate Fractional Accumulate
+ signed16 al, ah, bl, bh;
+ signed32 tl, th;
+ int movl, movh;
+
+ al = (signed16) EV_HIHALF (*rA);
+ ah = (signed16) EV_HIHALF (*rAh);
+ bl = (signed16) EV_HIHALF (*rB);
+ bh = (signed16) EV_HIHALF (*rBh);
+ tl = ev_multiply16_ssf (al, bl, &movl);
+ th = ev_multiply16_ssf (ah, bh, &movh);
+ EV_SET_REG2_ACC (*rSh, *rS, EV_SATURATE (movh, 0x7fffffff, th),
+ EV_SATURATE (movl, 0x7fffffff, tl));
+ EV_SET_SPEFSCR_OV (movl, movh);
+ PPC_INSN_INT_SPR (RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.1035:EVX:e500:evmhesmf %RS,%RA,%RB:Vector Multiply Half Words Even Signed Modulo Fractional
+ signed16 al, ah, bl, bh;
+ signed64 tl, th;
+ int movl, movh;
+
+ al = (signed16) EV_HIHALF (*rA);
+ ah = (signed16) EV_HIHALF (*rAh);
+ bl = (signed16) EV_HIHALF (*rB);
+ bh = (signed16) EV_HIHALF (*rBh);
+ tl = ev_multiply16_smf (al, bl, &movl);
+ th = ev_multiply16_smf (ah, bh, &movh);
+ EV_SET_REG2 (*rSh, *rS, th, tl);
+ EV_SET_SPEFSCR_OV (movl, movh);
+ PPC_INSN_INT_SPR (RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.1067:EVX:e500:evmhesmfa %RS,%RA,%RB:Vector Multiply Half Words Even Signed Modulo Fractional Accumulate
+ signed16 al, ah, bl, bh;
+ signed32 tl, th;
+ int dummy;
+
+ al = (signed16) EV_HIHALF (*rA);
+ ah = (signed16) EV_HIHALF (*rAh);
+ bl = (signed16) EV_HIHALF (*rB);
+ bh = (signed16) EV_HIHALF (*rBh);
+ tl = ev_multiply16_smf (al, bl, & dummy);
+ th = ev_multiply16_smf (ah, bh, & dummy);
+ EV_SET_REG2_ACC (*rSh, *rS, th, tl);
+ PPC_INSN_INT (RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1033:EVX:e500:evmhesmi %RS,%RA,%RB:Vector Multiply Half Words Even Signed Modulo Integer
+ signed16 al, ah, bl, bh;
+ signed32 tl, th;
+
+ al = (signed16) EV_HIHALF (*rA);
+ ah = (signed16) EV_HIHALF (*rAh);
+ bl = (signed16) EV_HIHALF (*rB);
+ bh = (signed16) EV_HIHALF (*rBh);
+ tl = al * bl;
+ th = ah * bh;
+ EV_SET_REG2 (*rSh, *rS, th, tl);
+ PPC_INSN_INT (RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1065:EVX:e500:evmhesmia %RS,%RA,%RB:Vector Multiply Half Words Even Signed Modulo Integer Accumulate
+ signed32 al, ah, bl, bh, tl, th;
+ al = (signed32)(signed16)EV_HIHALF(*rA);
+ ah = (signed32)(signed16)EV_HIHALF(*rAh);
+ bl = (signed32)(signed16)EV_HIHALF(*rB);
+ bh = (signed32)(signed16)EV_HIHALF(*rBh);
+ tl = al * bl;
+ th = ah * bh;
+ EV_SET_REG2_ACC(*rSh, *rS, th, tl);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1032:EVX:e500:evmheumi %RS,%RA,%RB:Vector Multiply Half Words Even Unsigned Modulo Integer
+ unsigned32 al, ah, bl, bh, tl, th;
+ al = (unsigned32)(unsigned16)EV_HIHALF(*rA);
+ ah = (unsigned32)(unsigned16)EV_HIHALF(*rAh);
+ bl = (unsigned32)(unsigned16)EV_HIHALF(*rB);
+ bh = (unsigned32)(unsigned16)EV_HIHALF(*rBh);
+ tl = al * bl;
+ th = ah * bh;
+ EV_SET_REG2(*rSh, *rS, th, tl);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1064:EVX:e500:evmheumia %RS,%RA,%RB:Vector Multiply Half Words Even Unsigned Modulo Integer Accumulate
+ unsigned32 al, ah, bl, bh, tl, th;
+ al = (unsigned32)(unsigned16)EV_HIHALF(*rA);
+ ah = (unsigned32)(unsigned16)EV_HIHALF(*rAh);
+ bl = (unsigned32)(unsigned16)EV_HIHALF(*rB);
+ bh = (unsigned32)(unsigned16)EV_HIHALF(*rBh);
+ tl = al * bl;
+ th = ah * bh;
+ EV_SET_REG2_ACC(*rSh, *rS, th, tl);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1287:EVX:e500:evmhossfaaw %RS,%RA,%RB:Vector Multiply Half Words Odd Signed Saturate Fractional and Accumulate into Words
+ signed16 al, ah, bl, bh;
+ signed32 t1, t2;
+ signed64 tl, th;
+ int movl, movh, ovl, ovh;
+
+ al = (signed16) EV_LOHALF (*rA);
+ ah = (signed16) EV_LOHALF (*rAh);
+ bl = (signed16) EV_LOHALF (*rB);
+ bh = (signed16) EV_LOHALF (*rBh);
+ t1 = ev_multiply16_ssf (ah, bh, &movh);
+ t2 = ev_multiply16_ssf (al, bl, &movl);
+ th = EV_ACCHIGH + EV_SATURATE (movh, 0x7fffffff, t1);
+ tl = EV_ACCLOW + EV_SATURATE (movl, 0x7fffffff, t2);
+ ovh = EV_SAT_P_S32 (th);
+ ovl = EV_SAT_P_S32 (tl);
+ EV_SET_REG2_ACC (*rSh, *rS, EV_SATURATE_ACC (ovh, th, 0x80000000, 0x7fffffff, th),
+ EV_SATURATE_ACC (ovl, tl, 0x80000000, 0x7fffffff, tl));
+ EV_SET_SPEFSCR_OV (movl | ovl, movh | ovh);
+ PPC_INSN_INT_SPR (RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.1285:EVX:e500:evmhossiaaw %RS,%RA,%RB:Vector Multiply Half Words Odd Signed Saturate Integer and Accumulate into Words
+ signed32 al, ah, bl, bh;
+ signed64 t1, t2, tl, th;
+ int ovl, ovh;
+ al = (signed32)(signed16)EV_LOHALF(*rA);
+ ah = (signed32)(signed16)EV_LOHALF(*rAh);
+ bl = (signed32)(signed16)EV_LOHALF(*rB);
+ bh = (signed32)(signed16)EV_LOHALF(*rBh);
+ t1 = ah * bh;
+ t2 = al * bl;
+ th = EV_ACCHIGH + t1;
+ tl = EV_ACCLOW + t2;
+ ovh = EV_SAT_P_S32(th);
+ ovl = EV_SAT_P_S32(tl);
+ EV_SET_REG2_ACC(*rSh, *rS, EV_SATURATE_ACC(ovh, th, 0x80000000, 0x7fffffff, th),
+ EV_SATURATE_ACC(ovl, tl, 0x80000000, 0x7fffffff, tl));
+ //printf("evmhossiaaw: ovh %d ovl %d al %d ah %d bl %d bh %d t1 %qd t2 %qd tl %qd th %qd\n", ovh, ovl, al, ah, bl, bh, t1, t2, tl, th);
+ //printf("evmhossiaaw: ACC = %08x.%08x; *rSh = %08x; *rS = %08x\n", (int)(ACC >> 32), (int)ACC, *rSh, *rS);
+ EV_SET_SPEFSCR_OV(ovl, ovh);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.1295:EVX:e500:evmhosmfaaw %RS,%RA,%RB:Vector Multiply Half Words Odd Signed Modulo Fractional and Accumulate into Words
+ signed32 al, ah, bl, bh;
+ signed64 t1, t2, tl, th;
+ al = (signed32)(signed16)EV_LOHALF(*rA);
+ ah = (signed32)(signed16)EV_LOHALF(*rAh);
+ bl = (signed32)(signed16)EV_LOHALF(*rB);
+ bh = (signed32)(signed16)EV_LOHALF(*rBh);
+ t1 = ((signed64)ah * bh) << 1;
+ t2 = ((signed64)al * bl) << 1;
+ th = EV_ACCHIGH + (t1 & 0xffffffff);
+ tl = EV_ACCLOW + (t2 & 0xffffffff);
+ EV_SET_REG2_ACC(*rSh, *rS, th & 0xffffffff, tl & 0xffffffff);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1293:EVX:e500:evmhosmiaaw %RS,%RA,%RB:Vector Multiply Half Words Odd Signed Modulo Integer and Accumulate into Words
+ signed32 al, ah, bl, bh;
+ signed64 t1, t2, tl, th;
+ al = (signed32)(signed16)EV_LOHALF(*rA);
+ ah = (signed32)(signed16)EV_LOHALF(*rAh);
+ bl = (signed32)(signed16)EV_LOHALF(*rB);
+ bh = (signed32)(signed16)EV_LOHALF(*rBh);
+ t1 = ah * bh;
+ t2 = al * bl;
+ th = EV_ACCHIGH + t1;
+ tl = EV_ACCLOW + t2;
+ EV_SET_REG2_ACC(*rSh, *rS, th & 0xffffffff, tl & 0xffffffff);
+ //printf("evmhosmiaaw: al %d ah %d bl %d bh %d t1 %qd t2 %qd tl %qd th %qd\n", al, ah, bl, bh, t1, t2, tl, th);
+ //printf("evmhosmiaaw: ACC = %08x.%08x; *rSh = %08x; *rS = %08x\n", (int)(ACC >> 32), (int)ACC, *rSh, *rS);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1284:EVX:e500:evmhousiaaw %RS,%RA,%RB:Vector Multiply Half Words Odd Unsigned Saturate Integer and Accumulate into Words
+ unsigned32 al, ah, bl, bh;
+ unsigned64 t1, t2;
+ signed64 tl, th;
+ int ovl, ovh;
+ al = (unsigned32)(unsigned16)EV_LOHALF(*rA);
+ ah = (unsigned32)(unsigned16)EV_LOHALF(*rAh);
+ bl = (unsigned32)(unsigned16)EV_LOHALF(*rB);
+ bh = (unsigned32)(unsigned16)EV_LOHALF(*rBh);
+ t1 = ah * bh;
+ t2 = al * bl;
+ th = (signed64)EV_ACCHIGH + (signed64)t1;
+ tl = (signed64)EV_ACCLOW + (signed64)t2;
+ ovh = EV_SAT_P_U32(th);
+ ovl = EV_SAT_P_U32(tl);
+ EV_SET_REG2_ACC(*rSh, *rS, EV_SATURATE_ACC(ovh, th, 0, 0xffffffff, th),
+ EV_SATURATE_ACC(ovl, tl, 0, 0xffffffff, tl));
+ //printf("evmhousiaaw: al %u ah %u bl %u bh %u t1 %qu t2 %qu tl %qu th %qu\n", al, ah, bl, bh, t1, t2, tl, th);
+ //printf("evmhousiaaw: ACC = %08x.%08x; *rSh = %08x; *rS = %08x\n", (int)(ACC >> 32), (int)ACC, *rSh, *rS);
+ EV_SET_SPEFSCR_OV(ovl, ovh);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.1292:EVX:e500:evmhoumiaaw %RS,%RA,%RB:Vector Multiply Half Words Odd Unsigned Modulo Integer and Accumulate into Words
+ unsigned32 al, ah, bl, bh;
+ unsigned32 t1, t2;
+ signed64 tl, th;
+ al = (unsigned32)(unsigned16)EV_LOHALF(*rA);
+ ah = (unsigned32)(unsigned16)EV_LOHALF(*rAh);
+ bl = (unsigned32)(unsigned16)EV_LOHALF(*rB);
+ bh = (unsigned32)(unsigned16)EV_LOHALF(*rBh);
+ t1 = ah * bh;
+ t2 = al * bl;
+ th = EV_ACCHIGH + t1;
+ tl = EV_ACCLOW + t2;
+ EV_SET_REG2_ACC(*rSh, *rS, th & 0xffffffff, tl & 0xffffffff);
+ //printf("evmhoumiaaw: al %u ah %u bl %u bh %u t1 %qu t2 %qu tl %qu th %qu\n", al, ah, bl, bh, t1, t2, tl, th);
+ //printf("evmhoumiaaw: ACC = %08x.%08x; *rSh = %08x; *rS = %08x\n", (int)(ACC >> 32), (int)ACC, *rSh, *rS);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1283:EVX:e500:evmhessfaaw %RS,%RA,%RB:Vector Multiply Half Words Even Signed Saturate Fractional and Accumulate into Words
+ signed16 al, ah, bl, bh;
+ signed32 t1, t2;
+ signed64 tl, th;
+ int movl, movh, ovl, ovh;
+
+ al = (signed16) EV_HIHALF (*rA);
+ ah = (signed16) EV_HIHALF (*rAh);
+ bl = (signed16) EV_HIHALF (*rB);
+ bh = (signed16) EV_HIHALF (*rBh);
+ t1 = ev_multiply16_ssf (ah, bh, &movh);
+ t2 = ev_multiply16_ssf (al, bl, &movl);
+ th = EV_ACCHIGH + EV_SATURATE (movh, 0x7fffffff, t1);
+ tl = EV_ACCLOW + EV_SATURATE (movl, 0x7fffffff, t2);
+ ovh = EV_SAT_P_S32 (th);
+ ovl = EV_SAT_P_S32 (tl);
+ EV_SET_REG2_ACC (*rSh, *rS, EV_SATURATE_ACC (ovh, th, 0x80000000, 0x7fffffff, th),
+ EV_SATURATE_ACC (ovl, tl, 0x80000000, 0x7fffffff, tl));
+ EV_SET_SPEFSCR_OV (movl | ovl, movh | ovh);
+ PPC_INSN_INT_SPR (RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.1281:EVX:e500:evmhessiaaw %RS,%RA,%RB:Vector Multiply Half Words Even Signed Saturate Integer and Accumulate into Words
+ signed32 al, ah, bl, bh;
+ signed64 t1, t2, tl, th;
+ int ovl, ovh;
+ al = (signed32)(signed16)EV_HIHALF(*rA);
+ ah = (signed32)(signed16)EV_HIHALF(*rAh);
+ bl = (signed32)(signed16)EV_HIHALF(*rB);
+ bh = (signed32)(signed16)EV_HIHALF(*rBh);
+ t1 = ah * bh;
+ t2 = al * bl;
+ th = EV_ACCHIGH + t1;
+ tl = EV_ACCLOW + t2;
+ ovh = EV_SAT_P_S32(th);
+ ovl = EV_SAT_P_S32(tl);
+ EV_SET_REG2_ACC(*rSh, *rS, EV_SATURATE_ACC(ovh, th, 0x80000000, 0x7fffffff, th),
+ EV_SATURATE_ACC(ovl, tl, 0x80000000, 0x7fffffff, tl));
+ //printf("evmhessiaaw: ovh %d ovl %d al %d ah %d bl %d bh %d t1 %qd t2 %qd tl %qd th %qd\n", ovh, ovl, al, ah, bl, bh, t1, t2, tl, th);
+ //printf("evmhessiaaw: ACC = %08x.%08x; *rSh = %08x; *rS = %08x\n", (int)(ACC >> 32), (int)ACC, *rSh, *rS);
+ EV_SET_SPEFSCR_OV(ovl, ovh);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.1291:EVX:e500:evmhesmfaaw %RS,%RA,%RB:Vector Multiply Half Words Even Signed Modulo Fractional and Accumulate into Words
+ signed16 al, ah, bl, bh;
+ signed32 t1, t2, th, tl;
+ int dummy;
+
+ al = (signed16)EV_HIHALF(*rA);
+ ah = (signed16)EV_HIHALF(*rAh);
+ bl = (signed16)EV_HIHALF(*rB);
+ bh = (signed16)EV_HIHALF(*rBh);
+ t1 = ev_multiply16_smf (ah, bh, &dummy);
+ t2 = ev_multiply16_smf (al, bl, &dummy);
+ th = EV_ACCHIGH + t1;
+ tl = EV_ACCLOW + t2;
+ EV_SET_REG2_ACC(*rSh, *rS, th, tl);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1289:EVX:e500:evmhesmiaaw %RS,%RA,%RB:Vector Multiply Half Words Even Signed Modulo Integer and Accumulate into Words
+ signed32 al, ah, bl, bh;
+ signed64 t1, t2, tl, th;
+ al = (signed32)(signed16)EV_HIHALF(*rA);
+ ah = (signed32)(signed16)EV_HIHALF(*rAh);
+ bl = (signed32)(signed16)EV_HIHALF(*rB);
+ bh = (signed32)(signed16)EV_HIHALF(*rBh);
+ t1 = ah * bh;
+ t2 = al * bl;
+ th = EV_ACCHIGH + t1;
+ tl = EV_ACCLOW + t2;
+ EV_SET_REG2_ACC(*rSh, *rS, th & 0xffffffff, tl & 0xffffffff);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1280:EVX:e500:evmheusiaaw %RS,%RA,%RB:Vector Multiply Half Words Even Unsigned Saturate Integer and Accumulate into Words
+ unsigned32 al, ah, bl, bh;
+ unsigned64 t1, t2;
+ signed64 tl, th;
+ int ovl, ovh;
+ al = (unsigned32)(unsigned16)EV_HIHALF(*rA);
+ ah = (unsigned32)(unsigned16)EV_HIHALF(*rAh);
+ bl = (unsigned32)(unsigned16)EV_HIHALF(*rB);
+ bh = (unsigned32)(unsigned16)EV_HIHALF(*rBh);
+ t1 = ah * bh;
+ t2 = al * bl;
+ th = (signed64)EV_ACCHIGH + (signed64)t1;
+ tl = (signed64)EV_ACCLOW + (signed64)t2;
+ ovh = EV_SAT_P_U32(th);
+ ovl = EV_SAT_P_U32(tl);
+ EV_SET_REG2_ACC(*rSh, *rS, EV_SATURATE_ACC(ovh, th, 0, 0xffffffff, th),
+ EV_SATURATE_ACC(ovl, tl, 0, 0xffffffff, tl));
+ EV_SET_SPEFSCR_OV(ovl, ovh);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.1288:EVX:e500:evmheumiaaw %RS,%RA,%RB:Vector Multiply Half Words Even Unsigned Modulo Integer and Accumulate into Words
+ unsigned32 al, ah, bl, bh;
+ unsigned32 t1, t2;
+ unsigned64 tl, th;
+ al = (unsigned32)(unsigned16)EV_HIHALF(*rA);
+ ah = (unsigned32)(unsigned16)EV_HIHALF(*rAh);
+ bl = (unsigned32)(unsigned16)EV_HIHALF(*rB);
+ bh = (unsigned32)(unsigned16)EV_HIHALF(*rBh);
+ t1 = ah * bh;
+ t2 = al * bl;
+ th = EV_ACCHIGH + t1;
+ tl = EV_ACCLOW + t2;
+ EV_SET_REG2_ACC(*rSh, *rS, th & 0xffffffff, tl & 0xffffffff);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+
+0.4,6.RS,11.RA,16.RB,21.1415:EVX:e500:evmhossfanw %RS,%RA,%RB:Vector Multiply Half Words Odd Signed Saturate Fractional and Accumulate Negative into Words
+ signed16 al, ah, bl, bh;
+ signed32 t1, t2;
+ signed64 tl, th;
+ int movl, movh, ovl, ovh;
+
+ al = (signed16) EV_LOHALF (*rA);
+ ah = (signed16) EV_LOHALF (*rAh);
+ bl = (signed16) EV_LOHALF (*rB);
+ bh = (signed16) EV_LOHALF (*rBh);
+ t1 = ev_multiply16_ssf (ah, bh, &movh);
+ t2 = ev_multiply16_ssf (al, bl, &movl);
+ th = EV_ACCHIGH - EV_SATURATE (movh, 0x7fffffff, t1);
+ tl = EV_ACCLOW - EV_SATURATE (movl, 0x7fffffff, t2);
+ ovh = EV_SAT_P_S32 (th);
+ ovl = EV_SAT_P_S32 (tl);
+ EV_SET_REG2_ACC (*rSh, *rS, EV_SATURATE_ACC (ovh, th, 0x80000000, 0x7fffffff, th),
+ EV_SATURATE_ACC (ovl, tl, 0x80000000, 0x7fffffff, tl));
+ EV_SET_SPEFSCR_OV (movl | ovl, movh | ovh);
+ PPC_INSN_INT_SPR (RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.1413:EVX:e500:evmhossianw %RS,%RA,%RB:Vector Multiply Half Words Odd Signed Saturate Integer and Accumulate Negative into Words
+ signed32 al, ah, bl, bh;
+ signed64 t1, t2, tl, th;
+ int ovl, ovh;
+ al = (signed32)(signed16)EV_LOHALF(*rA);
+ ah = (signed32)(signed16)EV_LOHALF(*rAh);
+ bl = (signed32)(signed16)EV_LOHALF(*rB);
+ bh = (signed32)(signed16)EV_LOHALF(*rBh);
+ t1 = ah * bh;
+ t2 = al * bl;
+ th = EV_ACCHIGH - t1;
+ tl = EV_ACCLOW - t2;
+ ovh = EV_SAT_P_S32(th);
+ ovl = EV_SAT_P_S32(tl);
+ EV_SET_REG2_ACC(*rSh, *rS, EV_SATURATE_ACC(ovh, th, 0x80000000, 0x7fffffff, th),
+ EV_SATURATE_ACC(ovl, tl, 0x80000000, 0x7fffffff, tl));
+ EV_SET_SPEFSCR_OV(ovl, ovh);
+ //printf("evmhossianw: ACC = %08x; *rSh = %08x; *rS = %08x\n", ACC, *rSh, *rS);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.1423:EVX:e500:evmhosmfanw %RS,%RA,%RB:Vector Multiply Half Words Odd Signed Modulo Fractional and Accumulate Negative into Words
+ signed32 al, ah, bl, bh;
+ signed64 t1, t2, tl, th;
+ al = (signed32)(signed16)EV_LOHALF(*rA);
+ ah = (signed32)(signed16)EV_LOHALF(*rAh);
+ bl = (signed32)(signed16)EV_LOHALF(*rB);
+ bh = (signed32)(signed16)EV_LOHALF(*rBh);
+ t1 = ((signed64)ah * bh) << 1;
+ t2 = ((signed64)al * bl) << 1;
+ th = EV_ACCHIGH - (t1 & 0xffffffff);
+ tl = EV_ACCLOW - (t2 & 0xffffffff);
+ EV_SET_REG2_ACC(*rSh, *rS, th & 0xffffffff, tl & 0xffffffff);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1421:EVX:e500:evmhosmianw %RS,%RA,%RB:Vector Multiply Half Words Odd Signed Modulo Integer and Accumulate Negative into Words
+ signed32 al, ah, bl, bh;
+ signed64 t1, t2, tl, th;
+ al = (signed32)(signed16)EV_LOHALF(*rA);
+ ah = (signed32)(signed16)EV_LOHALF(*rAh);
+ bl = (signed32)(signed16)EV_LOHALF(*rB);
+ bh = (signed32)(signed16)EV_LOHALF(*rBh);
+ t1 = ah * bh;
+ t2 = al * bl;
+ th = EV_ACCHIGH - t1;
+ tl = EV_ACCLOW - t2;
+ EV_SET_REG2_ACC(*rSh, *rS, th & 0xffffffff, tl & 0xffffffff);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1412:EVX:e500:evmhousianw %RS,%RA,%RB:Vector Multiply Half Words Odd Unsigned Saturate Integer and Accumulate Negative into Words
+ unsigned32 al, ah, bl, bh;
+ unsigned64 t1, t2;
+ signed64 tl, th;
+ int ovl, ovh;
+ al = (unsigned32)(unsigned16)EV_LOHALF(*rA);
+ ah = (unsigned32)(unsigned16)EV_LOHALF(*rAh);
+ bl = (unsigned32)(unsigned16)EV_LOHALF(*rB);
+ bh = (unsigned32)(unsigned16)EV_LOHALF(*rBh);
+ t1 = ah * bh;
+ t2 = al * bl;
+ th = (signed64)EV_ACCHIGH - (signed64)t1;
+ tl = (signed64)EV_ACCLOW - (signed64)t2;
+ ovl = EV_SAT_P_U32(tl);
+ ovh = EV_SAT_P_U32(th);
+ EV_SET_REG2_ACC(*rSh, *rS, EV_SATURATE_ACC(ovh, th, 0, 0xffffffff, th),
+ EV_SATURATE_ACC(ovl, tl, 0, 0xffffffff, tl));
+ //printf("evmhousianw: ovh %d ovl %d al %d ah %d bl %d bh %d t1 %qd t2 %qd tl %qd th %qd\n", ovh, ovl, al, ah, bl, bh, t1, t2, tl, th);
+ //printf("evmoussianw: ACC = %08x.%08x; *rSh = %08x; *rS = %08x\n", (int)(ACC >> 32), (int)ACC, *rSh, *rS);
+ EV_SET_SPEFSCR_OV(ovl, ovh);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.1420:EVX:e500:evmhoumianw %RS,%RA,%RB:Vector Multiply Half Words Odd Unsigned Modulo Integer and Accumulate Negative into Words
+ unsigned32 al, ah, bl, bh;
+ unsigned32 t1, t2;
+ unsigned64 tl, th;
+ al = (unsigned32)(unsigned16)EV_LOHALF(*rA);
+ ah = (unsigned32)(unsigned16)EV_LOHALF(*rAh);
+ bl = (unsigned32)(unsigned16)EV_LOHALF(*rB);
+ bh = (unsigned32)(unsigned16)EV_LOHALF(*rBh);
+ t1 = ah * bh;
+ t2 = al * bl;
+ th = EV_ACCHIGH - t1;
+ tl = EV_ACCLOW - t2;
+ EV_SET_REG2_ACC(*rSh, *rS, th & 0xffffffff, tl & 0xffffffff);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1411:EVX:e500:evmhessfanw %RS,%RA,%RB:Vector Multiply Half Words Even Signed Saturate Fractional and Accumulate Negative into Words
+ signed16 al, ah, bl, bh;
+ signed32 t1, t2;
+ signed64 tl, th;
+ int movl, movh, ovl, ovh;
+
+ al = (signed16) EV_HIHALF (*rA);
+ ah = (signed16) EV_HIHALF (*rAh);
+ bl = (signed16) EV_HIHALF (*rB);
+ bh = (signed16) EV_HIHALF (*rBh);
+ t1 = ev_multiply16_ssf (ah, bh, &movh);
+ t2 = ev_multiply16_ssf (al, bl, &movl);
+ th = EV_ACCHIGH - EV_SATURATE (movh, 0x7fffffff, t1);
+ tl = EV_ACCLOW - EV_SATURATE (movl, 0x7fffffff, t2);
+ ovh = EV_SAT_P_S32 (th);
+ ovl = EV_SAT_P_S32 (tl);
+ EV_SET_REG2_ACC (*rSh, *rS, EV_SATURATE_ACC (ovh, th, 0x80000000, 0x7fffffff, th),
+ EV_SATURATE_ACC (ovl, tl, 0x80000000, 0x7fffffff, tl));
+ EV_SET_SPEFSCR_OV (movl | ovl, movh | ovh);
+ PPC_INSN_INT_SPR (RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.1409:EVX:e500:evmhessianw %RS,%RA,%RB:Vector Multiply Half Words Even Signed Saturate Integer and Accumulate Negative into Words
+ signed32 al, ah, bl, bh;
+ signed64 t1, t2, tl, th;
+ int ovl, ovh;
+ al = (signed32)(signed16)EV_HIHALF(*rA);
+ ah = (signed32)(signed16)EV_HIHALF(*rAh);
+ bl = (signed32)(signed16)EV_HIHALF(*rB);
+ bh = (signed32)(signed16)EV_HIHALF(*rBh);
+ t1 = ah * bh;
+ t2 = al * bl;
+ th = EV_ACCHIGH - t1;
+ tl = EV_ACCLOW - t2;
+ ovh = EV_SAT_P_S32(th);
+ ovl = EV_SAT_P_S32(tl);
+ EV_SET_REG2_ACC(*rSh, *rS, EV_SATURATE_ACC(ovh, th, 0x80000000, 0x7fffffff, th),
+ EV_SATURATE_ACC(ovl, tl, 0x80000000, 0x7fffffff, tl));
+ EV_SET_SPEFSCR_OV(ovl, ovh);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.1419:EVX:e500:evmhesmfanw %RS,%RA,%RB:Vector Multiply Half Words Even Signed Modulo Fractional and Accumulate Negative into Words
+ signed32 al, ah, bl, bh;
+ signed64 t1, t2, tl, th;
+ al = (unsigned32)(unsigned16)EV_HIHALF(*rA);
+ ah = (unsigned32)(unsigned16)EV_HIHALF(*rAh);
+ bl = (unsigned32)(unsigned16)EV_HIHALF(*rB);
+ bh = (unsigned32)(unsigned16)EV_HIHALF(*rBh);
+ t1 = ((signed64)ah * bh) << 1;
+ t2 = ((signed64)al * bl) << 1;
+ th = EV_ACCHIGH - (t1 & 0xffffffff);
+ tl = EV_ACCLOW - (t2 & 0xffffffff);
+ EV_SET_REG2_ACC(*rSh, *rS, th & 0xffffffff, tl & 0xffffffff);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1417:EVX:e500:evmhesmianw %RS,%RA,%RB:Vector Multiply Half Words Even Signed Modulo Integer and Accumulate Negative into Words
+ signed32 al, ah, bl, bh;
+ signed64 t1, t2, tl, th;
+ al = (signed32)(signed16)EV_HIHALF(*rA);
+ ah = (signed32)(signed16)EV_HIHALF(*rAh);
+ bl = (signed32)(signed16)EV_HIHALF(*rB);
+ bh = (signed32)(signed16)EV_HIHALF(*rBh);
+ t1 = ah * bh;
+ t2 = al * bl;
+ th = EV_ACCHIGH - t1;
+ tl = EV_ACCLOW - t2;
+ EV_SET_REG2_ACC(*rSh, *rS, th & 0xffffffff, tl & 0xffffffff);
+ //printf("evmhesmianw: al %d ah %d bl %d bh %d t1 %qd t2 %qd tl %qd th %qd\n", al, ah, bl, bh, t1, t2, tl, th);
+ //printf("evmhesmianw: ACC = %08x.%08x; *rSh = %08x; *rS = %08x\n", (int)(ACC >> 32), (int)ACC, *rSh, *rS);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1408:EVX:e500:evmheusianw %RS,%RA,%RB:Vector Multiply Half Words Even Unsigned Saturate Integer and Accumulate Negative into Words
+ unsigned32 al, ah, bl, bh;
+ unsigned64 t1, t2;
+ signed64 tl, th;
+ int ovl, ovh;
+ al = (unsigned32)(unsigned16)EV_HIHALF(*rA);
+ ah = (unsigned32)(unsigned16)EV_HIHALF(*rAh);
+ bl = (unsigned32)(unsigned16)EV_HIHALF(*rB);
+ bh = (unsigned32)(unsigned16)EV_HIHALF(*rBh);
+ t1 = ah * bh;
+ t2 = al * bl;
+ th = (signed64)EV_ACCHIGH - (signed64)t1;
+ tl = (signed64)EV_ACCLOW - (signed64)t2;
+ ovl = EV_SAT_P_U32(tl);
+ ovh = EV_SAT_P_U32(th);
+ EV_SET_REG2_ACC(*rSh, *rS, EV_SATURATE_ACC(ovh, th, 0, 0xffffffff, th),
+ EV_SATURATE_ACC(ovl, tl, 0, 0xffffffff, tl));
+ //printf("evmheusianw: ovh %d ovl %d al %u ah %u bl %u bh %u t1 %qu t2 %qu tl %qd th %qd\n", ovh, ovl, al, ah, bl, bh, t1, t2, tl, th);
+ //printf("evmheusianw: ACC = %08x.%08x; *rSh = %08x; *rS = %08x\n", (int)(ACC >> 32), (int)ACC, *rSh, *rS);
+ EV_SET_SPEFSCR_OV(ovl, ovh);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.1416:EVX:e500:evmheumianw %RS,%RA,%RB:Vector Multiply Half Words Even Unsigned Modulo Integer and Accumulate Negative into Words
+ unsigned32 al, ah, bl, bh;
+ unsigned32 t1, t2;
+ unsigned64 tl, th;
+ al = (unsigned32)(unsigned16)EV_HIHALF(*rA);
+ ah = (unsigned32)(unsigned16)EV_HIHALF(*rAh);
+ bl = (unsigned32)(unsigned16)EV_HIHALF(*rB);
+ bh = (unsigned32)(unsigned16)EV_HIHALF(*rBh);
+ t1 = ah * bh;
+ t2 = al * bl;
+ th = EV_ACCHIGH - t1;
+ tl = EV_ACCLOW - t2;
+ EV_SET_REG2_ACC(*rSh, *rS, th & 0xffffffff, tl & 0xffffffff);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1327:EVX:e500:evmhogsmfaa %RS,%RA,%RB:Multiply Half Words Odd Guarded Signed Modulo Fractional and Accumulate
+ signed32 a, b;
+ signed64 t1, t2;
+ a = (signed32)(signed16)EV_LOHALF(*rA);
+ b = (signed32)(signed16)EV_LOHALF(*rB);
+ t1 = EV_MUL16_SSF(a, b);
+ if (t1 & ((unsigned64)1 << 32))
+ t1 |= 0xfffffffe00000000;
+ t2 = ACC + t1;
+ EV_SET_REG1_ACC(*rSh, *rS, t2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1325:EVX:e500:evmhogsmiaa %RS,%RA,%RB:Multiply Half Words Odd Guarded Signed Modulo Integer and Accumulate
+ signed32 a, b;
+ signed64 t1, t2;
+ a = (signed32)(signed16)EV_LOHALF(*rA);
+ b = (signed32)(signed16)EV_LOHALF(*rB);
+ t1 = (signed64)a * (signed64)b;
+ t2 = (signed64)ACC + t1;
+ EV_SET_REG1_ACC(*rSh, *rS, t2);
+ //printf("evmhogsmiaa: a %d b %d t1 %qd t2 %qd\n", a, b, t1, t2);
+ //printf("evmhogsmiaa: ACC = %08x.%08x; *rSh = %08x; *rS = %08x\n", (int)(ACC >> 32), (int)ACC, *rSh, *rS);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1324:EVX:e500:evmhogumiaa %RS,%RA,%RB:Multiply Half Words Odd Guarded Unsigned Modulo Integer and Accumulate
+ unsigned32 a, b;
+ unsigned64 t1, t2;
+ a = (unsigned32)(unsigned16)EV_LOHALF(*rA);
+ b = (unsigned32)(unsigned16)EV_LOHALF(*rB);
+ t1 = a * b;
+ t2 = ACC + t1;
+ EV_SET_REG1_ACC(*rSh, *rS, t2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1323:EVX:e500:evmhegsmfaa %RS,%RA,%RB:Multiply Half Words Even Guarded Signed Modulo Fractional and Accumulate
+ signed32 a, b;
+ signed64 t1, t2;
+ a = (signed32)(signed16)EV_HIHALF(*rA);
+ b = (signed32)(signed16)EV_HIHALF(*rB);
+ t1 = EV_MUL16_SSF(a, b);
+ if (t1 & ((unsigned64)1 << 32))
+ t1 |= 0xfffffffe00000000;
+ t2 = ACC + t1;
+ EV_SET_REG1_ACC(*rSh, *rS, t2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1321:EVX:e500:evmhegsmiaa %RS,%RA,%RB:Multiply Half Words Even Guarded Signed Modulo Integer and Accumulate
+ signed32 a, b;
+ signed64 t1, t2;
+ a = (signed32)(signed16)EV_HIHALF(*rA);
+ b = (signed32)(signed16)EV_HIHALF(*rB);
+ t1 = (signed64)(a * b);
+ t2 = ACC + t1;
+ EV_SET_REG1_ACC(*rSh, *rS, t2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1320:EVX:e500:evmhegumiaa %RS,%RA,%RB:Multiply Half Words Even Guarded Unsigned Modulo Integer and Accumulate
+ unsigned32 a, b;
+ unsigned64 t1, t2;
+ a = (unsigned32)(unsigned16)EV_HIHALF(*rA);
+ b = (unsigned32)(unsigned16)EV_HIHALF(*rB);
+ t1 = a * b;
+ t2 = ACC + t1;
+ EV_SET_REG1_ACC(*rSh, *rS, t2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+
+0.4,6.RS,11.RA,16.RB,21.1455:EVX:e500:evmhogsmfan %RS,%RA,%RB:Multiply Half Words Odd Guarded Signed Modulo Fractional and Accumulate Negative
+ signed32 a, b;
+ signed64 t1, t2;
+ a = (signed32)(signed16)EV_LOHALF(*rA);
+ b = (signed32)(signed16)EV_LOHALF(*rB);
+ t1 = EV_MUL16_SSF(a, b);
+ if (t1 & ((unsigned64)1 << 32))
+ t1 |= 0xfffffffe00000000;
+ t2 = ACC - t1;
+ EV_SET_REG1_ACC(*rSh, *rS, t2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1453:EVX:e500:evmhogsmian %RS,%RA,%RB:Multiply Half Words Odd Guarded Signed Modulo Integer and Accumulate Negative
+ signed32 a, b;
+ signed64 t1, t2;
+ a = (signed32)(signed16)EV_LOHALF(*rA);
+ b = (signed32)(signed16)EV_LOHALF(*rB);
+ t1 = (signed64)a * (signed64)b;
+ t2 = ACC - t1;
+ EV_SET_REG1_ACC(*rSh, *rS, t2);
+ //printf("evmhogsmian: a %d b %d t1 %qd t2 %qd\n", a, b, t1, t2);
+ //printf("evmhogsmian: ACC = %08x.%08x; *rSh = %08x; *rS = %08x\n", (int)(ACC >> 32), (int)ACC, *rSh, *rS);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1452:EVX:e500:evmhogumian %RS,%RA,%RB:Multiply Half Words Odd Guarded Unsigned Modulo Integer and Accumulate Negative
+ unsigned32 a, b;
+ unsigned64 t1, t2;
+ a = (unsigned32)(unsigned16)EV_LOHALF(*rA);
+ b = (unsigned32)(unsigned16)EV_LOHALF(*rB);
+ t1 = (unsigned64)a * (unsigned64)b;
+ t2 = ACC - t1;
+ EV_SET_REG1_ACC(*rSh, *rS, t2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1451:EVX:e500:evmhegsmfan %RS,%RA,%RB:Multiply Half Words Even Guarded Signed Modulo Fractional and Accumulate Negative
+ signed32 a, b;
+ signed64 t1, t2;
+ a = (signed32)(signed16)EV_HIHALF(*rA);
+ b = (signed32)(signed16)EV_HIHALF(*rB);
+ t1 = EV_MUL16_SSF(a, b);
+ if (t1 & ((unsigned64)1 << 32))
+ t1 |= 0xfffffffe00000000;
+ t2 = ACC - t1;
+ EV_SET_REG1_ACC(*rSh, *rS, t2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1449:EVX:e500:evmhegsmian %RS,%RA,%RB:Multiply Half Words Even Guarded Signed Modulo Integer and Accumulate Negative
+ signed32 a, b;
+ signed64 t1, t2;
+ a = (signed32)(signed16)EV_HIHALF(*rA);
+ b = (signed32)(signed16)EV_HIHALF(*rB);
+ t1 = (signed64)a * (signed64)b;
+ t2 = ACC - t1;
+ EV_SET_REG1_ACC(*rSh, *rS, t2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1448:EVX:e500:evmhegumian %RS,%RA,%RB:Multiply Half Words Even Guarded Unsigned Modulo Integer and Accumulate Negative
+ unsigned32 a, b;
+ unsigned64 t1, t2;
+ a = (unsigned32)(unsigned16)EV_HIHALF(*rA);
+ b = (unsigned32)(unsigned16)EV_HIHALF(*rB);
+ t1 = (unsigned64)a * (unsigned64)b;
+ t2 = ACC - t1;
+ EV_SET_REG1_ACC(*rSh, *rS, t2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+
+0.4,6.RS,11.RA,16.RB,21.1095:EVX:e500:evmwhssf %RS,%RA,%RB:Vector Multiply Word High Signed Saturate Fractional
+ signed32 al, ah, bl, bh;
+ signed64 t1, t2;
+ int movl, movh;
+ al = *rA;
+ ah = *rAh;
+ bl = *rB;
+ bh = *rBh;
+ t1 = ev_multiply32_ssf(al, bl, &movl);
+ t2 = ev_multiply32_ssf(ah, bh, &movh);
+ EV_SET_REG2(*rSh, *rS, EV_SATURATE(movh, 0x7fffffff, t2 >> 32),
+ EV_SATURATE(movl, 0x7fffffff, t1 >> 32));
+ EV_SET_SPEFSCR_OV(movl, movh);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.1127:EVX:e500:evmwhssfa %RS,%RA,%RB:Vector Multiply Word High Signed Saturate Fractional and Accumulate
+ signed32 al, ah, bl, bh;
+ signed64 t1, t2;
+ int movl, movh;
+ al = *rA;
+ ah = *rAh;
+ bl = *rB;
+ bh = *rBh;
+ t1 = ev_multiply32_ssf(al, bl, &movl);
+ t2 = ev_multiply32_ssf(ah, bh, &movh);
+ EV_SET_REG2_ACC(*rSh, *rS, EV_SATURATE(movh, 0x7fffffff, t2 >> 32),
+ EV_SATURATE(movl, 0x7fffffff, t1 >> 32));
+ EV_SET_SPEFSCR_OV(movl, movh);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.1103:EVX:e500:evmwhsmf %RS,%RA,%RB:Vector Multiply Word High Signed Modulo Fractional
+ signed32 al, ah, bl, bh;
+ signed64 t1, t2;
+ al = *rA;
+ ah = *rAh;
+ bl = *rB;
+ bh = *rBh;
+ t1 = EV_MUL32_SSF(al, bl);
+ t2 = EV_MUL32_SSF(ah, bh);
+ EV_SET_REG2(*rSh, *rS, t2 >> 32, t1 >> 32);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1135:EVX:e500:evmwhsmfa %RS,%RA,%RB:Vector Multiply Word High Signed Modulo Fractional and Accumulate
+ signed32 al, ah, bl, bh;
+ signed64 t1, t2;
+ al = *rA;
+ ah = *rAh;
+ bl = *rB;
+ bh = *rBh;
+ t1 = EV_MUL32_SSF(al, bl);
+ t2 = EV_MUL32_SSF(ah, bh);
+ EV_SET_REG2_ACC(*rSh, *rS, t2 >> 32, t1 >> 32);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1101:EVX:e500:evmwhsmi %RS,%RA,%RB:Vector Multiply Word High Signed Modulo Integer
+ signed32 al, ah, bl, bh;
+ signed64 t1, t2;
+ al = *rA;
+ ah = *rAh;
+ bl = *rB;
+ bh = *rBh;
+ t1 = (signed64)al * (signed64)bl;
+ t2 = (signed64)ah * (signed64)bh;
+ EV_SET_REG2(*rSh, *rS, t2 >> 32, t1 >> 32);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1133:EVX:e500:evmwhsmia %RS,%RA,%RB:Vector Multiply Word High Signed Modulo Integer and Accumulate
+ signed32 al, ah, bl, bh;
+ signed64 t1, t2;
+ al = *rA;
+ ah = *rAh;
+ bl = *rB;
+ bh = *rBh;
+ t1 = (signed64)al * (signed64)bl;
+ t2 = (signed64)ah * (signed64)bh;
+ EV_SET_REG2_ACC(*rSh, *rS, t2 >> 32, t1 >> 32);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1100:EVX:e500:evmwhumi %RS,%RA,%RB:Vector Multiply Word High Unsigned Modulo Integer
+ unsigned32 al, ah, bl, bh;
+ unsigned64 t1, t2;
+ al = *rA;
+ ah = *rAh;
+ bl = *rB;
+ bh = *rBh;
+ t1 = (unsigned64)al * (unsigned64)bl;
+ t2 = (unsigned64)ah * (unsigned64)bh;
+ EV_SET_REG2(*rSh, *rS, t2 >> 32, t1 >> 32);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1132:EVX:e500:evmwhumia %RS,%RA,%RB:Vector Multiply Word High Unsigned Modulo Integer and Accumulate
+ unsigned32 al, ah, bl, bh;
+ unsigned64 t1, t2;
+ al = *rA;
+ ah = *rAh;
+ bl = *rB;
+ bh = *rBh;
+ t1 = (unsigned64)al * (unsigned64)bl;
+ t2 = (unsigned64)ah * (unsigned64)bh;
+ EV_SET_REG2_ACC(*rSh, *rS, t2 >> 32, t1 >> 32);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+
+0.4,6.RS,11.RA,16.RB,21.1091:EVX:e500:evmwlssf %RS,%RA,%RB:Vector Multiply Word Low Signed Saturate Fractional
+ signed32 al, ah, bl, bh;
+ signed64 t1, t2;
+ int movl, movh;
+ al = *rA;
+ ah = *rAh;
+ bl = *rB;
+ bh = *rBh;
+ t1 = ev_multiply32_ssf(al, bl, &movl);
+ t2 = ev_multiply32_ssf(ah, bh, &movh);
+ EV_SET_REG2(*rSh, *rS, EV_SATURATE(movh, 0xffffffff, t2),
+ EV_SATURATE(movl, 0xffffffff, t1));
+ EV_SET_SPEFSCR_OV(movl, movh);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.1123:EVX:e500:evmwlssfa %RS,%RA,%RB:Vector Multiply Word Low Signed Saturate Fractional and Accumulate
+ signed32 al, ah, bl, bh;
+ signed64 t1, t2;
+ int movl, movh;
+ al = *rA;
+ ah = *rAh;
+ bl = *rB;
+ bh = *rBh;
+ t1 = ev_multiply32_ssf(al, bl, &movl);
+ t2 = ev_multiply32_ssf(ah, bh, &movh);
+ EV_SET_REG2_ACC(*rSh, *rS, EV_SATURATE(movh, 0xffffffff, t2),
+ EV_SATURATE(movl, 0xffffffff, t1));
+ EV_SET_SPEFSCR_OV(movl, movh);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.1099:EVX:e500:evmwlsmf %RS,%RA,%RB:Vector Multiply Word Low Signed Modulo Fractional
+ signed32 al, ah, bl, bh;
+ signed64 t1, t2;
+ al = *rA;
+ ah = *rAh;
+ bl = *rB;
+ bh = *rBh;
+ t1 = EV_MUL32_SSF(al, bl);
+ t2 = EV_MUL32_SSF(ah, bh);
+ EV_SET_REG2(*rSh, *rS, t2, t1);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1131:EVX:e500:evmwlsmfa %RS,%RA,%RB:Vector Multiply Word Low Signed Modulo Fractional and Accumulate
+ signed32 al, ah, bl, bh;
+ signed64 t1, t2;
+ al = *rA;
+ ah = *rAh;
+ bl = *rB;
+ bh = *rBh;
+ t1 = EV_MUL32_SSF(al, bl);
+ t2 = EV_MUL32_SSF(ah, bh);
+ EV_SET_REG2_ACC(*rSh, *rS, t2, t1);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1096:EVX:e500:evmwlumi %RS,%RA,%RB:Vector Multiply Word Low Unsigned Modulo Integer
+ unsigned32 al, ah, bl, bh;
+ unsigned64 t1, t2;
+ al = *rA;
+ ah = *rAh;
+ bl = *rB;
+ bh = *rBh;
+ t1 = (unsigned64)al * (unsigned64)bl;
+ t2 = (unsigned64)ah * (unsigned64)bh;
+ EV_SET_REG2(*rSh, *rS, t2, t1);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1128:EVX:e500:evmwlumia %RS,%RA,%RB:Vector Multiply Word Low Unsigned Modulo Integer and Accumulate
+ unsigned32 al, ah, bl, bh;
+ unsigned64 t1, t2;
+ al = *rA;
+ ah = *rAh;
+ bl = *rB;
+ bh = *rBh;
+ t1 = (unsigned64)al * (unsigned64)bl;
+ t2 = (unsigned64)ah * (unsigned64)bh;
+ EV_SET_REG2_ACC(*rSh, *rS, t2, t1);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+
+0.4,6.RS,11.RA,16.RB,21.1347:EVX:e500:evmwlssfaaw %RS,%RA,%RB:Vector Multiply Word Low Signed Saturate Fractional and Accumulate in Words
+ signed32 al, ah, bl, bh;
+ signed64 t1, t2, tl, th;
+ int movl, movh, ovl, ovh;
+ al = *rA;
+ ah = *rAh;
+ bl = *rB;
+ bh = *rBh;
+ t1 = ev_multiply32_ssf(ah, bh, &movh);
+ t2 = ev_multiply32_ssf(al, bl, &movl);
+ th = EV_ACCHIGH + EV_SATURATE(movh, 0xffffffff, t1);
+ tl = EV_ACCLOW + EV_SATURATE(movl, 0xffffffff, t2);
+ ovh = EV_SAT_P_S32(th);
+ ovl = EV_SAT_P_S32(tl);
+ EV_SET_REG2_ACC(*rSh, *rS, EV_SATURATE_ACC(ovh, th, 0x80000000, 0x7fffffff, th),
+ EV_SATURATE_ACC(ovl, tl, 0x80000000, 0x7fffffff, tl));
+ EV_SET_SPEFSCR_OV(movl | ovl, movh | ovh);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.1345:EVX:e500:evmwlssiaaw %RS,%RA,%RB:Vector Multiply Word Low Signed Saturate Integer and Accumulate in Words
+ signed32 al, ah, bl, bh;
+ signed64 t1, t2, tl, th;
+ int ovl, ovh;
+ al = *rA;
+ ah = *rAh;
+ bl = *rB;
+ bh = *rBh;
+ t1 = (signed64)ah * (signed64)bh;
+ t2 = (signed64)al * (signed64)bl;
+ th = EV_ACCHIGH + (t1 & 0xffffffff);
+ tl = EV_ACCLOW + (t2 & 0xffffffff);
+ ovh = EV_SAT_P_S32(th);
+ ovl = EV_SAT_P_S32(tl);
+ EV_SET_REG2_ACC(*rSh, *rS, EV_SATURATE_ACC(ovh, th, 0x80000000, 0x7fffffff, th),
+ EV_SATURATE_ACC(ovl, tl, 0x80000000, 0x7fffffff, tl));
+ EV_SET_SPEFSCR_OV(ovl, ovh);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.1355:EVX:e500:evmwlsmfaaw %RS,%RA,%RB:Vector Multiply Word Low Signed Modulo Fractional and Accumulate in Words
+ signed32 al, ah, bl, bh;
+ signed64 t1, t2;
+ int mov;
+ al = *rA;
+ ah = *rAh;
+ bl = *rB;
+ bh = *rBh;
+ t1 = ev_multiply32_smf(ah, bh, &mov);
+ t2 = ev_multiply32_smf(al, bl, &mov);
+ EV_SET_REG2_ACC(*rSh, *rS, EV_ACCHIGH + (t1 & 0xffffffff),
+ EV_ACCLOW + (t2 & 0xffffffff));
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1353:EVX:e500:evmwlsmiaaw %RS,%RA,%RB:Vector Multiply Word Low Signed Modulo Integer and Accumulate in Words
+ signed32 al, ah, bl, bh;
+ signed64 t1, t2;
+ al = *rA;
+ ah = *rAh;
+ bl = *rB;
+ bh = *rBh;
+ t1 = (signed64)ah * (signed64)bh;
+ t2 = (signed64)al * (signed64)bl;
+ EV_SET_REG2_ACC(*rSh, *rS, EV_ACCHIGH + (t1 & 0xffffffff),
+ EV_ACCLOW + (t2 & 0xffffffff));
+ //printf("evmwlsmiaaw: al %d ah %d bl %d bh %d t1 %qd t2 %qd\n", al, ah, bl, bh, t1, t2);
+ //printf("evmwlsmiaaw: *rSh = %08x; *rS = %08x\n", *rSh, *rS);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1344:EVX:e500:evmwlusiaaw %RS,%RA,%RB:Vector Multiply Word Low Unsigned Saturate Integer and Accumulate in Words
+ unsigned32 al, ah, bl, bh;
+ unsigned64 t1, t2, tl, th;
+ int ovl, ovh;
+ al = *rA;
+ ah = *rAh;
+ bl = *rB;
+ bh = *rBh;
+ t1 = (unsigned64)ah * (unsigned64)bh;
+ t2 = (unsigned64)al * (unsigned64)bl;
+ th = EV_ACCHIGH + (t1 & 0xffffffff);
+ tl = EV_ACCLOW + (t2 & 0xffffffff);
+ ovh = (th >> 32);
+ ovl = (tl >> 32);
+ EV_SET_REG2_ACC(*rSh, *rS, EV_SATURATE(ovh, 0xffffffff, th),
+ EV_SATURATE(ovl, 0xffffffff, tl));
+ EV_SET_SPEFSCR_OV(ovl, ovh);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.1352:EVX:e500:evmwlumiaaw %RS,%RA,%RB:Vector Multiply Word Low Unsigned Modulo Integer and Accumulate in Words
+ unsigned32 al, ah, bl, bh;
+ unsigned64 t1, t2;
+ al = *rA;
+ ah = *rAh;
+ bl = *rB;
+ bh = *rBh;
+ t1 = (unsigned64)ah * (unsigned64)bh;
+ t2 = (unsigned64)al * (unsigned64)bl;
+ EV_SET_REG2_ACC(*rSh, *rS, EV_ACCHIGH + (t1 & 0xffffffff),
+ EV_ACCLOW + (t2 & 0xffffffff));
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+
+0.4,6.RS,11.RA,16.RB,21.1475:EVX:e500:evmwlssfanw %RS,%RA,%RB:Vector Multiply Word Low Signed Saturate Fractional and Accumulate Negative in Words
+ signed32 al, ah, bl, bh;
+ signed64 t1, t2, tl, th;
+ int movl, movh, ovl, ovh;
+ al = *rA;
+ ah = *rAh;
+ bl = *rB;
+ bh = *rBh;
+ t1 = ev_multiply32_ssf(ah, bh, &movh);
+ t2 = ev_multiply32_ssf(al, bl, &movl);
+ th = EV_ACCHIGH - EV_SATURATE(movh, 0xffffffff, t1);
+ tl = EV_ACCLOW - EV_SATURATE(movl, 0xffffffff, t2);
+ ovh = EV_SAT_P_S32(th);
+ ovl = EV_SAT_P_S32(tl);
+ EV_SET_REG2_ACC(*rSh, *rS, EV_SATURATE_ACC(ovh, th, 0x80000000, 0x7fffffff, th),
+ EV_SATURATE_ACC(ovl, tl, 0x80000000, 0x7fffffff, tl));
+ EV_SET_SPEFSCR_OV(movl | ovl, movh | ovh);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.1473:EVX:e500:evmwlssianw %RS,%RA,%RB:Vector Multiply Word Low Signed Saturate Integer and Accumulate Negative in Words
+ signed32 al, ah, bl, bh;
+ signed64 t1, t2, tl, th;
+ int ovl, ovh;
+ al = *rA;
+ ah = *rAh;
+ bl = *rB;
+ bh = *rBh;
+ t1 = (signed64)ah * (signed64)bh;
+ t2 = (signed64)al * (signed64)bl;
+ th = EV_ACCHIGH - (t1 & 0xffffffff);
+ tl = EV_ACCLOW - (t2 & 0xffffffff);
+ ovh = EV_SAT_P_S32(th);
+ ovl = EV_SAT_P_S32(tl);
+ EV_SET_REG2_ACC(*rSh, *rS, EV_SATURATE_ACC(ovh, th, 0x80000000, 0x7fffffff, th),
+ EV_SATURATE_ACC(ovl, tl, 0x80000000, 0x7fffffff, tl));
+ EV_SET_SPEFSCR_OV(ovl, ovh);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.1483:EVX:e500:evmwlsmfanw %RS,%RA,%RB:Vector Multiply Word Low Signed Modulo Fractional and Accumulate Negative in Words
+ signed32 al, ah, bl, bh;
+ signed64 t1, t2;
+ int mov;
+ al = *rA;
+ ah = *rAh;
+ bl = *rB;
+ bh = *rBh;
+ t1 = ev_multiply32_smf(ah, bh, &mov);
+ t2 = ev_multiply32_smf(al, bl, &mov);
+ EV_SET_REG2_ACC(*rSh, *rS, EV_ACCHIGH - (t1 & 0xffffffff),
+ EV_ACCLOW - (t2 & 0xffffffff));
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1481:EVX:e500:evmwlsmianw %RS,%RA,%RB:Vector Multiply Word Low Signed Modulo Integer and Accumulate Negative in Words
+ signed32 al, ah, bl, bh;
+ signed64 t1, t2;
+ al = *rA;
+ ah = *rAh;
+ bl = *rB;
+ bh = *rBh;
+ t1 = (signed64)ah * (signed64)bh;
+ t2 = (signed64)al * (signed64)bl;
+ EV_SET_REG2_ACC(*rSh, *rS, EV_ACCHIGH - (t1 & 0xffffffff),
+ EV_ACCLOW - (t2 & 0xffffffff));
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1472:EVX:e500:evmwlusianw %RS,%RA,%RB:Vector Multiply Word Low Unsigned Saturate Integer and Accumulate Negative in Words
+ unsigned32 al, ah, bl, bh;
+ unsigned64 t1, t2, tl, th;
+ int ovl, ovh;
+ al = *rA;
+ ah = *rAh;
+ bl = *rB;
+ bh = *rBh;
+ t1 = (unsigned64)ah * (unsigned64)bh;
+ t2 = (unsigned64)al * (unsigned64)bl;
+ th = EV_ACCHIGH - (t1 & 0xffffffff);
+ tl = EV_ACCLOW - (t2 & 0xffffffff);
+ ovh = (th >> 32);
+ ovl = (tl >> 32);
+ EV_SET_REG2_ACC(*rSh, *rS, EV_SATURATE(ovh, 0xffffffff, th),
+ EV_SATURATE(ovl, 0xffffffff, tl));
+ //printf("evmwlusianw: ovl %d ovh %d al %d ah %d bl %d bh %d t1 %qd t2 %qd th %qd tl %qd\n", ovl, ovh, al, ah, al, bh, t1, t2, th, tl);
+ //printf("evmwlusianw: ACC = %08x.%08x; *rSh = %08x; *rS = %08x\n", (int)(ACC >> 32), (int)ACC, *rSh, *rS);
+ EV_SET_SPEFSCR_OV(ovl, ovh);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.1480:EVX:e500:evmwlumianw %RS,%RA,%RB:Vector Multiply Word Low Unsigned Modulo Integer and Accumulate Negative in Words
+ unsigned32 al, ah, bl, bh;
+ unsigned64 t1, t2;
+ al = *rA;
+ ah = *rAh;
+ bl = *rB;
+ bh = *rBh;
+ t1 = (unsigned64)ah * (unsigned64)bh;
+ t2 = (unsigned64)al * (unsigned64)bl;
+ EV_SET_REG2_ACC(*rSh, *rS, EV_ACCHIGH - (t1 & 0xffffffff),
+ EV_ACCLOW - (t2 & 0xffffffff));
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+
+0.4,6.RS,11.RA,16.RB,21.1107:EVX:e500:evmwssf %RS,%RA,%RB:Vector Multiply Word Signed Saturate Fractional
+ signed32 a, b;
+ signed64 t;
+ int movl;
+ a = *rA;
+ b = *rB;
+ t = ev_multiply32_ssf(a, b, &movl);
+ EV_SET_REG1(*rSh, *rS, EV_SATURATE(movl, 0x7fffffffffffffff, t));
+ EV_SET_SPEFSCR_OV(movl, 0);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.1139:EVX:e500:evmwssfa %RS,%RA,%RB:Vector Multiply Word Signed Saturate Fractional and Accumulate
+ signed32 a, b;
+ signed64 t;
+ int movl;
+ a = *rA;
+ b = *rB;
+ t = ev_multiply32_ssf(a, b, &movl);
+ EV_SET_REG1_ACC(*rSh, *rS, EV_SATURATE(movl, 0x7fffffffffffffff, t));
+ EV_SET_SPEFSCR_OV(movl, 0);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.1115:EVX:e500:evmwsmf %RS,%RA,%RB:Vector Multiply Word Signed Modulo Fractional
+ signed32 a, b;
+ signed64 t;
+ int movl;
+ a = *rA;
+ b = *rB;
+ t = ev_multiply32_smf(a, b, &movl);
+ EV_SET_REG1(*rSh, *rS, t);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1147:EVX:e500:evmwsmfa %RS,%RA,%RB:Vector Multiply Word Signed Modulo Fractional and Accumulate
+ signed32 a, b;
+ signed64 t;
+ int movl;
+ a = *rA;
+ b = *rB;
+ t = ev_multiply32_smf(a, b, &movl);
+ EV_SET_REG1_ACC(*rSh, *rS, t);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1113:EVX:e500:evmwsmi %RS,%RA,%RB:Vector Multiply Word Signed Modulo Integer
+ signed32 a, b;
+ signed64 t;
+ int movl;
+ a = *rA;
+ b = *rB;
+ t = (signed64)a * (signed64)b;
+ EV_SET_REG1(*rSh, *rS, t);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1145:EVX:e500:evmwsmia %RS,%RA,%RB:Vector Multiply Word Signed Modulo Integer and Accumulate
+ signed32 a, b;
+ signed64 t;
+ int movl;
+ a = *rA;
+ b = *rB;
+ t = (signed64)a * (signed64)b;
+ EV_SET_REG1_ACC(*rSh, *rS, t);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1112:EVX:e500:evmwumi %RS,%RA,%RB:Vector Multiply Word Unigned Modulo Integer
+ unsigned32 a, b;
+ unsigned64 t;
+ int movl;
+ a = *rA;
+ b = *rB;
+ t = (signed64)a * (signed64)b;
+ EV_SET_REG1(*rSh, *rS, t);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1144:EVX:e500:evmwumia %RS,%RA,%RB:Vector Multiply Word Unigned Modulo Integer and Accumulate
+ unsigned32 a, b;
+ unsigned64 t;
+ int movl;
+ a = *rA;
+ b = *rB;
+ t = (signed64)a * (signed64)b;
+ EV_SET_REG1_ACC(*rSh, *rS, t);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+
+0.4,6.RS,11.RA,16.RB,21.1363:EVX:e500:evmwssfaa %RS,%RA,%RB:Vector Multiply Word Signed Saturate Fractional Add and Accumulate
+ signed64 t1, t2;
+ signed32 a, b;
+ int movl;
+ a = *rA;
+ b = *rB;
+ t1 = ev_multiply32_ssf(a, b, &movl);
+ t2 = ACC + EV_SATURATE(movl, 0x7fffffffffffffff, t1);
+ EV_SET_REG1_ACC(*rSh, *rS, t2);
+ EV_SET_SPEFSCR_OV(movl, 0);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.1371:EVX:e500:evmwsmfaa %RS,%RA,%RB:Vector Multiply Word Signed Modulo Fractional Add and Accumulate
+ signed64 t1, t2;
+ signed32 a, b;
+ int movl;
+ a = *rA;
+ b = *rB;
+ t1 = ev_multiply32_smf(a, b, &movl);
+ t2 = ACC + t1;
+ EV_SET_REG1_ACC(*rSh, *rS, t2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1369:EVX:e500:evmwsmiaa %RS,%RA,%RB:Vector Multiply Word Signed Modulo Integer And and Accumulate
+ signed64 t1, t2;
+ signed32 a, b;
+ a = *rA;
+ b = *rB;
+ t1 = (signed64)a * (signed64)b;
+ t2 = ACC + t1;
+ EV_SET_REG1_ACC(*rSh, *rS, t2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1368:EVX:e500:evmwumiaa %RS,%RA,%RB:Vector Multiply Word Unsigned Modulo Integer Add and Accumulate
+ unsigned64 t1, t2;
+ unsigned32 a, b;
+ a = *rA;
+ b = *rB;
+ t1 = (unsigned64)a * (unsigned64)b;
+ t2 = ACC + t1;
+ EV_SET_REG1_ACC(*rSh, *rS, t2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+
+0.4,6.RS,11.RA,16.RB,21.1491:EVX:e500:evmwssfan %RS,%RA,%RB:Vector Multiply Word Signed Saturate Fractional and Accumulate Negative
+ signed64 t1, t2;
+ signed32 a, b;
+ int movl;
+ a = *rA;
+ b = *rB;
+ t1 = ev_multiply32_ssf(a, b, &movl);
+ t2 = ACC - EV_SATURATE(movl, 0x7fffffffffffffff, t1);
+ EV_SET_REG1_ACC(*rSh, *rS, t2);
+ EV_SET_SPEFSCR_OV(movl, 0);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.1499:EVX:e500:evmwsmfan %RS,%RA,%RB:Vector Multiply Word Signed Modulo Fractional and Accumulate Negative
+ signed64 t1, t2;
+ signed32 a, b;
+ int movl;
+ a = *rA;
+ b = *rB;
+ t1 = ev_multiply32_smf(a, b, &movl);
+ t2 = ACC - t1;
+ EV_SET_REG1_ACC(*rSh, *rS, t2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1497:EVX:e500:evmwsmian %RS,%RA,%RB:Vector Multiply Word Signed Modulo Integer and Accumulate Negative
+ signed64 t1, t2;
+ signed32 a, b;
+ a = *rA;
+ b = *rB;
+ t1 = (signed64)a * (signed64)b;
+ t2 = ACC - t1;
+ EV_SET_REG1_ACC(*rSh, *rS, t2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1496:EVX:e500:evmwumian %RS,%RA,%RB:Vector Multiply Word Unsigned Modulo Integer and Accumulate Negative
+ unsigned64 t1, t2;
+ unsigned32 a, b;
+ a = *rA;
+ b = *rB;
+ t1 = (unsigned64)a * (unsigned64)b;
+ t2 = ACC - t1;
+ EV_SET_REG1_ACC(*rSh, *rS, t2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
+
+
+0.4,6.RS,11.RA,16.0,21.1217:EVX:e500:evaddssiaaw %RS,%RA:Vector Add Signed Saturate Integer to Accumulator Word
+ signed64 t1, t2;
+ signed32 al, ah;
+ int ovl, ovh;
+ al = *rA;
+ ah = *rAh;
+ t1 = (signed64)EV_ACCHIGH + (signed64)ah;
+ t2 = (signed64)EV_ACCLOW + (signed64)al;
+ ovh = EV_SAT_P_S32(t1);
+ ovl = EV_SAT_P_S32(t2);
+ EV_SET_REG2_ACC(*rSh, *rS, EV_SATURATE_ACC(ovh, t1 & ((unsigned64)1 << 32), 0x80000000, 0x7fffffff, t1),
+ EV_SATURATE_ACC(ovl, t2 & ((unsigned64)1 << 32), 0x80000000, 0x7fffffff, t2));
+ EV_SET_SPEFSCR_OV(ovl, ovh);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.0,21.1225:EVX:e500:evaddsmiaaw %RS,%RA:Vector Add Signed Modulo Integer to Accumulator Word
+ signed64 t1, t2;
+ signed32 al, ah;
+ al = *rA;
+ ah = *rAh;
+ t1 = (signed64)EV_ACCHIGH + (signed64)ah;
+ t2 = (signed64)EV_ACCLOW + (signed64)al;
+ EV_SET_REG2_ACC(*rSh, *rS, t1, t2);
+ //printf("evaddsmiaaw: al %d ah %d t1 %qd t2 %qd\n", al, ah, t1, t2);
+ //printf("evaddsmiaaw: ACC = %08x.%08x; *rSh = %08x; *rS = %08x\n", (int)(ACC >> 32), (int)ACC, *rSh, *rS);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.0,21.1216:EVX:e500:evaddusiaaw %RS,%RA:Vector Add Unsigned Saturate Integer to Accumulator Word
+ signed64 t1, t2;
+ unsigned32 al, ah;
+ int ovl, ovh;
+ al = *rA;
+ ah = *rAh;
+ t1 = (signed64)EV_ACCHIGH + (signed64)ah;
+ t2 = (signed64)EV_ACCLOW + (signed64)al;
+ ovh = EV_SAT_P_U32(t1);
+ ovl = EV_SAT_P_U32(t2);
+ EV_SET_REG2_ACC(*rSh, *rS, EV_SATURATE(ovh, 0xffffffff, t1),
+ EV_SATURATE(ovl, 0xffffffff, t2));
+ //printf("evaddusiaaw: ovl %d ovh %d al %d ah %d t1 %qd t2 %qd\n", ovl, ovh, al, ah, t1, t2);
+ //printf("evaddusiaaw: ACC = %08x.%08x; *rSh = %08x; *rS = %08x\n", (int)(ACC >> 32), (int)ACC, *rSh, *rS);
+ EV_SET_SPEFSCR_OV(ovl, ovh);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.0,21.1224:EVX:e500:evaddumiaaw %RS,%RA:Vector Add Unsigned Modulo Integer to Accumulator Word
+ unsigned64 t1, t2;
+ unsigned32 al, ah;
+ al = *rA;
+ ah = *rAh;
+ t1 = (unsigned64)EV_ACCHIGH + (unsigned64)ah;
+ t2 = EV_ACCLOW + al;
+ EV_SET_REG2_ACC(*rSh, *rS, t1, t2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK, 0);
+
+
+0.4,6.RS,11.RA,16.0,21.1219:EVX:e500:evsubfssiaaw %RS,%RA:Vector Subtract Signed Saturate Integer to Accumulator Word
+ signed64 t1, t2;
+ signed32 al, ah;
+ int ovl, ovh;
+ al = *rA;
+ ah = *rAh;
+ t1 = (signed64)EV_ACCHIGH - (signed64)ah;
+ t2 = (signed64)EV_ACCLOW - (signed64)al;
+ ovh = EV_SAT_P_S32(t1);
+ ovl = EV_SAT_P_S32(t2);
+ EV_SET_REG2_ACC(*rSh, *rS, EV_SATURATE_ACC(ovh, t1, 0x80000000, 0x7fffffff, t1),
+ EV_SATURATE_ACC(ovl, t2, 0x80000000, 0x7fffffff, t2));
+ EV_SET_SPEFSCR_OV(ovl, ovh);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.0,21.1227:EVX:e500:evsubfsmiaaw %RS,%RA:Vector Subtract Signed Modulo Integer to Accumulator Word
+ signed64 t1, t2;
+ signed32 al, ah;
+ al = *rA;
+ ah = *rAh;
+ t1 = (signed64)EV_ACCHIGH - (signed64)ah;
+ t2 = (signed64)EV_ACCLOW - (signed64)al;
+ EV_SET_REG2_ACC(*rSh, *rS, t1, t2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.0,21.1218:EVX:e500:evsubfusiaaw %RS,%RA:Vector Subtract Unsigned Saturate Integer to Accumulator Word
+ signed64 t1, t2;
+ unsigned32 al, ah;
+ int ovl, ovh;
+
+ al = *rA;
+ ah = *rAh;
+ t1 = (signed64)EV_ACCHIGH - (signed64)ah;
+ t2 = (signed64)EV_ACCLOW - (signed64)al;
+ ovh = EV_SAT_P_U32(t1);
+ ovl = EV_SAT_P_U32(t2);
+ EV_SET_REG2_ACC(*rSh, *rS, EV_SATURATE(ovh, 0, t1),
+ EV_SATURATE(ovl, 0, t2));
+ EV_SET_SPEFSCR_OV(ovl, ovh);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.0,21.1226:EVX:e500:evsubfumiaaw %RS,%RA:Vector Subtract Unsigned Modulo Integer to Accumulator Word
+ unsigned64 t1, t2;
+ unsigned32 al, ah;
+ al = *rA;
+ ah = *rAh;
+ t1 = (unsigned64)EV_ACCHIGH - (unsigned64)ah;
+ t2 = (unsigned64)EV_ACCLOW - (unsigned64)al;
+ EV_SET_REG2_ACC(*rSh, *rS, t1, t2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK, 0);
+
+
+0.4,6.RS,11.RA,16.0,21.1220:EVX:e500:evmra %RS,%RA:Initialize Accumulator
+ EV_SET_REG2_ACC(*rSh, *rS, *rAh, *rA);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.1222:EVX:e500:evdivws %RS,%RA,%RB:Vector Divide Word Signed
+ signed32 dividendh, dividendl, divisorh, divisorl;
+ signed32 w1, w2;
+ int ovh, ovl;
+ dividendh = *rAh;
+ dividendl = *rA;
+ divisorh = *rBh;
+ divisorl = *rB;
+ if (dividendh < 0 && divisorh == 0) {
+ w1 = 0x80000000;
+ ovh = 1;
+ } else if (dividendh > 0 && divisorh == 0) {
+ w1 = 0x7fffffff;
+ ovh = 1;
+ } else if (dividendh == 0x80000000 && divisorh == -1) {
+ w1 = 0x7fffffff;
+ ovh = 1;
+ } else {
+ w1 = dividendh / divisorh;
+ ovh = 0;
+ }
+ if (dividendl < 0 && divisorl == 0) {
+ w2 = 0x80000000;
+ ovl = 1;
+ } else if (dividendl > 0 && divisorl == 0) {
+ w2 = 0x7fffffff;
+ ovl = 1;
+ } else if (dividendl == 0x80000000 && divisorl == -1) {
+ w2 = 0x7fffffff;
+ ovl = 1;
+ } else {
+ w2 = dividendl / divisorl;
+ ovl = 0;
+ }
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ EV_SET_SPEFSCR_OV(ovl, ovh);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK, spr_spefscr);
+
+
+0.4,6.RS,11.RA,16.RB,21.1223:EVX:e500:evdivwu %RS,%RA,%RB:Vector Divide Word Unsigned
+ unsigned32 dividendh, dividendl, divisorh, divisorl;
+ unsigned32 w1, w2;
+ int ovh, ovl;
+ dividendh = *rAh;
+ dividendl = *rA;
+ divisorh = *rBh;
+ divisorl = *rB;
+ if (divisorh == 0) {
+ w1 = 0xffffffff;
+ ovh = 1;
+ } else {
+ w1 = dividendh / divisorh;
+ ovh = 0;
+ }
+ if (divisorl == 0) {
+ w2 = 0xffffffff;
+ ovl = 1;
+ } else {
+ w2 = dividendl / divisorl;
+ ovl = 0;
+ }
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ EV_SET_SPEFSCR_OV(ovl, ovh);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK, spr_spefscr);
+
+
+#
+# A.2.9 Floating Point SPE Instructions
+#
+
+0.4,6.RS,11.RA,16.0,21.644:EVX:e500:evfsabs %RS,%RA:Vector Floating-Point Absolute Value
+ unsigned32 w1, w2;
+ w1 = *rAh & 0x7fffffff;
+ w2 = *rA & 0x7fffffff;
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.0,21.645:EVX:e500:evfsnabs %RS,%RA:Vector Floating-Point Negative Absolute Value
+ unsigned32 w1, w2;
+ w1 = *rAh | 0x80000000;
+ w2 = *rA | 0x80000000;
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.0,21.646:EVX:e500:evfsneg %RS,%RA:Vector Floating-Point Negate
+ unsigned32 w1, w2;
+ w1 = *rAh;
+ w2 = *rA;
+ w1 = (w1 & 0x7fffffff) | ((~w1) & 0x80000000);
+ w2 = (w2 & 0x7fffffff) | ((~w2) & 0x80000000);
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.640:EVX:e500:evfsadd %RS,%RA,%RB:Vector Floating-Point Add
+ unsigned32 w1, w2;
+ w1 = ev_fs_add (*rAh, *rBh, spefscr_finvh, spefscr_fovfh, spefscr_funfh, spefscr_fgh, spefscr_fxh, processor);
+ w2 = ev_fs_add (*rA, *rB, spefscr_finv, spefscr_fovf, spefscr_funf, spefscr_fgh, spefscr_fxh, processor);
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.641:EVX:e500:evfssub %RS,%RA,%RB:Vector Floating-Point Subtract
+ unsigned32 w1, w2;
+ w1 = ev_fs_sub (*rAh, *rBh, spefscr_finvh, spefscr_fovfh, spefscr_funfh, spefscr_fgh, spefscr_fxh, processor);
+ w2 = ev_fs_sub (*rA, *rB, spefscr_finv, spefscr_fovf, spefscr_funf, spefscr_fgh, spefscr_fxh, processor);
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.648:EVX:e500:evfsmul %RS,%RA,%RB:Vector Floating-Point Multiply
+ unsigned32 w1, w2;
+ w1 = ev_fs_mul (*rAh, *rBh, spefscr_finvh, spefscr_fovfh, spefscr_funfh, spefscr_fgh, spefscr_fxh, processor);
+ w2 = ev_fs_mul (*rA, *rB, spefscr_finv, spefscr_fovf, spefscr_funf, spefscr_fgh, spefscr_fxh, processor);
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.649:EVX:e500:evfsdiv %RS,%RA,%RB:Vector Floating-Point Divide
+ signed32 w1, w2;
+ w1 = ev_fs_div (*rAh, *rBh, spefscr_finvh, spefscr_fovfh, spefscr_funfh, spefscr_fdbzh, spefscr_fgh, spefscr_fxh, processor);
+ w2 = ev_fs_div (*rA, *rB, spefscr_finv, spefscr_fovf, spefscr_funf, spefscr_fdbz, spefscr_fg, spefscr_fx, processor);
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.BF,9./,11.RA,16.RB,21.652:EVX:e500:evfscmpgt %BF,%RA,%RB:Vector Floating-Point Compare Greater Than
+ sim_fpu al, ah, bl, bh;
+ int w, ch, cl;
+ sim_fpu_32to (&al, *rA);
+ sim_fpu_32to (&ah, *rAh);
+ sim_fpu_32to (&bl, *rB);
+ sim_fpu_32to (&bh, *rBh);
+ if (EV_IS_INFDENORMNAN(&al) || EV_IS_INFDENORMNAN(&bl))
+ EV_SET_SPEFSCR_BITS(spefscr_finv);
+ if (EV_IS_INFDENORMNAN(&ah) || EV_IS_INFDENORMNAN(&bh))
+ EV_SET_SPEFSCR_BITS(spefscr_finvh);
+ if (sim_fpu_is_gt(&ah, &bh))
+ ch = 1;
+ else
+ ch = 0;
+ if (sim_fpu_is_gt(&al, &bl))
+ cl = 1;
+ else
+ cl = 0;
+ w = ch << 3 | cl << 2 | (ch | cl) << 1 | (ch & cl);
+ CR_SET(BF, w);
+ PPC_INSN_INT_SPR(0, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.BF,9./,11.RA,16.RB,21.653:EVX:e500:evfscmplt %BF,%RA,%RB:Vector Floating-Point Compare Less Than
+ sim_fpu al, ah, bl, bh;
+ int w, ch, cl;
+ sim_fpu_32to (&al, *rA);
+ sim_fpu_32to (&ah, *rAh);
+ sim_fpu_32to (&bl, *rB);
+ sim_fpu_32to (&bh, *rBh);
+ if (EV_IS_INFDENORMNAN(&al) || EV_IS_INFDENORMNAN(&bl))
+ EV_SET_SPEFSCR_BITS(spefscr_finv);
+ if (EV_IS_INFDENORMNAN(&ah) || EV_IS_INFDENORMNAN(&bh))
+ EV_SET_SPEFSCR_BITS(spefscr_finvh);
+ if (sim_fpu_is_lt(&ah, &bh))
+ ch = 1;
+ else
+ ch = 0;
+ if (sim_fpu_is_lt(&al, &bl))
+ cl = 1;
+ else
+ cl = 0;
+ w = ch << 3 | cl << 2 | (ch | cl) << 1 | (ch & cl);
+ CR_SET(BF, w);
+ PPC_INSN_INT_SPR(0, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.BF,9./,11.RA,16.RB,21.654:EVX:e500:evfscmpeq %BF,%RA,%RB:Vector Floating-Point Compare Equal
+ sim_fpu al, ah, bl, bh;
+ int w, ch, cl;
+ sim_fpu_32to (&al, *rA);
+ sim_fpu_32to (&ah, *rAh);
+ sim_fpu_32to (&bl, *rB);
+ sim_fpu_32to (&bh, *rBh);
+ if (EV_IS_INFDENORMNAN(&al) || EV_IS_INFDENORMNAN(&bl))
+ EV_SET_SPEFSCR_BITS(spefscr_finv);
+ if (EV_IS_INFDENORMNAN(&ah) || EV_IS_INFDENORMNAN(&bh))
+ EV_SET_SPEFSCR_BITS(spefscr_finvh);
+ if (sim_fpu_is_eq(&ah, &bh))
+ ch = 1;
+ else
+ ch = 0;
+ if (sim_fpu_is_eq(&al, &bl))
+ cl = 1;
+ else
+ cl = 0;
+ w = ch << 3 | cl << 2 | (ch | cl) << 1 | (ch & cl);
+ CR_SET(BF, w);
+ PPC_INSN_INT_SPR(0, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.BF,9./,11.RA,16.RB,21.668:EVX:e500:evfststgt %BF,%RA,%RB:Vector Floating-Point Test Greater Than
+ sim_fpu al, ah, bl, bh;
+ int w, ch, cl;
+ sim_fpu_32to (&al, *rA);
+ sim_fpu_32to (&ah, *rAh);
+ sim_fpu_32to (&bl, *rB);
+ sim_fpu_32to (&bh, *rBh);
+ if (sim_fpu_is_gt(&ah, &bh))
+ ch = 1;
+ else
+ ch = 0;
+ if (sim_fpu_is_gt(&al, &bl))
+ cl = 1;
+ else
+ cl = 0;
+ w = ch << 3 | cl << 2 | (ch | cl) << 1 | (ch & cl);
+ CR_SET(BF, w);
+ PPC_INSN_INT_CR(0, RA_BITMASK | RB_BITMASK, BF_BITMASK);
+
+0.4,6.BF,9./,11.RA,16.RB,21.669:EVX:e500:evfststlt %BF,%RA,%RB:Vector Floating-Point Test Less Than
+ sim_fpu al, ah, bl, bh;
+ int w, ch, cl;
+ sim_fpu_32to (&al, *rA);
+ sim_fpu_32to (&ah, *rAh);
+ sim_fpu_32to (&bl, *rB);
+ sim_fpu_32to (&bh, *rBh);
+ if (sim_fpu_is_lt(&ah, &bh))
+ ch = 1;
+ else
+ ch = 0;
+ if (sim_fpu_is_lt(&al, &bl))
+ cl = 1;
+ else
+ cl = 0;
+ w = ch << 3 | cl << 2 | (ch | cl) << 1 | (ch & cl);
+ CR_SET(BF, w);
+ PPC_INSN_INT_CR(0, RA_BITMASK | RB_BITMASK, BF_BITMASK);
+
+0.4,6.BF,9./,11.RA,16.RB,21.670:EVX:e500:evfststeq %BF,%RA,%RB:Vector Floating-Point Test Equal
+ sim_fpu al, ah, bl, bh;
+ int w, ch, cl;
+ sim_fpu_32to (&al, *rA);
+ sim_fpu_32to (&ah, *rAh);
+ sim_fpu_32to (&bl, *rB);
+ sim_fpu_32to (&bh, *rBh);
+ if (sim_fpu_is_eq(&ah, &bh))
+ ch = 1;
+ else
+ ch = 0;
+ if (sim_fpu_is_eq(&al, &bl))
+ cl = 1;
+ else
+ cl = 0;
+ w = ch << 3 | cl << 2 | (ch | cl) << 1 | (ch & cl);
+ CR_SET(BF, w);
+ PPC_INSN_INT_CR(0, RA_BITMASK | RB_BITMASK, BF_BITMASK);
+
+0.4,6.RS,11.0,16.RB,21.656:EVX:e500:evfscfui %RS,%RB:Vector Convert Floating-Point from Unsigned Integer
+ unsigned32 f, w1, w2;
+ sim_fpu b;
+
+ sim_fpu_u32to (&b, *rBh, sim_fpu_round_default);
+ sim_fpu_to32 (&w1, &b);
+ sim_fpu_u32to (&b, *rB, sim_fpu_round_default);
+ sim_fpu_to32 (&w2, &b);
+
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RB_BITMASK, 0);
+
+0.4,6.RS,11.0,16.RB,21.664:EVX:e500:evfsctuiz %RS,%RB:Vector Convert Floating-Point to Unsigned Integer with Round toward Zero
+ unsigned32 w1, w2;
+ sim_fpu b;
+
+ sim_fpu_32to (&b, *rBh);
+ sim_fpu_to32u (&w1, &b, sim_fpu_round_zero);
+ sim_fpu_32to (&b, *rB);
+ sim_fpu_to32u (&w2, &b, sim_fpu_round_zero);
+
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RB_BITMASK, 0);
+
+0.4,6.RS,11.0,16.RB,21.657:EVX:e500:evfscfsi %RS,%RB:Vector Convert Floating-Point from Signed Integer
+ signed32 w1, w2;
+ sim_fpu b, x, y;
+
+ sim_fpu_i32to (&b, *rBh, sim_fpu_round_default);
+ sim_fpu_to32 (&w1, &b);
+ sim_fpu_i32to (&b, *rB, sim_fpu_round_default);
+ sim_fpu_to32 (&w2, &b);
+
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RB_BITMASK, 0);
+
+0.4,6.RS,11.0,16.RB,21.658:EVX:e500:evfscfuf %RS,%RB:Vector Convert Floating-Point from Unsigned Fraction
+ unsigned32 w1, w2, bh, bl;
+ sim_fpu b, x, y;
+ bh = *rBh;
+ if (bh == 0xffffffff)
+ sim_fpu_to32 (&w1, &sim_fpu_one);
+ else {
+ sim_fpu_u64to (&x, 0x100000000, sim_fpu_round_default);
+ sim_fpu_u32to (&y, bh, sim_fpu_round_default);
+ sim_fpu_div (&b, &y, &x);
+ sim_fpu_to32 (&w1, &b);
+ }
+ bl = *rB;
+ if (bl == 0xffffffff)
+ sim_fpu_to32 (&w2, &sim_fpu_one);
+ else {
+ sim_fpu_u64to (&x, 0x100000000, sim_fpu_round_default);
+ sim_fpu_u32to (&y, bl, sim_fpu_round_default);
+ sim_fpu_div (&b, &y, &x);
+ sim_fpu_to32 (&w2, &b);
+ }
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RB_BITMASK, 0);
+
+0.4,6.RS,11.0,16.RB,21.659:EVX:e500:evfscfsf %RS,%RB:Vector Convert Floating-Point from Signed Fraction
+ unsigned32 w1, w2;
+ sim_fpu b, x, y;
+
+ sim_fpu_u32to (&x, 0x80000000, sim_fpu_round_default);
+ sim_fpu_i32to (&y, *rBh, sim_fpu_round_default);
+ sim_fpu_div (&b, &y, &x);
+ sim_fpu_to32 (&w1, &b);
+
+ sim_fpu_u32to (&x, 0x80000000, sim_fpu_round_default);
+ sim_fpu_i32to (&y, *rB, sim_fpu_round_default);
+ sim_fpu_div (&b, &y, &x);
+ sim_fpu_to32 (&w2, &b);
+
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RB_BITMASK, 0);
+
+0.4,6.RS,11.0,16.RB,21.660:EVX:e500:evfsctui %RS,%RB:Vector Convert Floating-Point to Unsigned Integer
+ unsigned32 w1, w2;
+ sim_fpu b;
+
+ sim_fpu_32to (&b, *rBh);
+ sim_fpu_to32u (&w1, &b, sim_fpu_round_default);
+ sim_fpu_32to (&b, *rB);
+ sim_fpu_to32u (&w2, &b, sim_fpu_round_default);
+
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RB_BITMASK, 0);
+
+0.4,6.RS,11.0,16.RB,21.661:EVX:e500:evfsctsi %RS,%RB:Vector Convert Floating-Point to Signed Integer
+ signed32 w1, w2;
+ sim_fpu b;
+
+ sim_fpu_32to (&b, *rBh);
+ sim_fpu_to32i (&w1, &b, sim_fpu_round_default);
+ sim_fpu_32to (&b, *rB);
+ sim_fpu_to32i (&w2, &b, sim_fpu_round_default);
+
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RB_BITMASK, 0);
+
+0.4,6.RS,11.0,16.RB,21.666:EVX:e500:evfsctsiz %RS,%RB:Vector Convert Floating-Point to Signed Integer with Round toward Zero
+ signed32 w1, w2;
+ sim_fpu b;
+
+ sim_fpu_32to (&b, *rBh);
+ sim_fpu_to32i (&w1, &b, sim_fpu_round_zero);
+ sim_fpu_32to (&b, *rB);
+ sim_fpu_to32i (&w2, &b, sim_fpu_round_zero);
+
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RB_BITMASK, 0);
+
+0.4,6.RS,11.0,16.RB,21.662:EVX:e500:evfsctuf %RS,%RB:Vector Convert Floating-Point to Unsigned Fraction
+ unsigned32 w1, w2;
+ sim_fpu b, x, y;
+
+ sim_fpu_u64to (&x, 0x100000000, sim_fpu_round_default);
+ sim_fpu_32to (&y, *rBh);
+ sim_fpu_mul (&b, &y, &x);
+ sim_fpu_to32u (&w1, &b, sim_fpu_round_default);
+
+ sim_fpu_u64to (&x, 0x100000000, sim_fpu_round_default);
+ sim_fpu_32to (&y, *rB);
+ sim_fpu_mul (&b, &y, &x);
+ sim_fpu_to32u (&w2, &b, sim_fpu_round_default);
+
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RB_BITMASK, 0);
+
+0.4,6.RS,11.0,16.RB,21.663:EVX:e500:evfsctsf %RS,%RB:Vector Convert Floating-Point to Signed Fraction
+ signed32 w1, w2;
+ sim_fpu b, x, y;
+
+ sim_fpu_32to (&y, *rBh);
+ sim_fpu_u32to (&x, 0x80000000, sim_fpu_round_default);
+ sim_fpu_mul (&b, &y, &x);
+ sim_fpu_to32i (&w1, &b, sim_fpu_round_near);
+
+ sim_fpu_32to (&y, *rB);
+ sim_fpu_u32to (&x, 0x80000000, sim_fpu_round_default);
+ sim_fpu_mul (&b, &y, &x);
+ sim_fpu_to32i (&w2, &b, sim_fpu_round_near);
+
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RB_BITMASK, 0);
+
+
+0.4,6.RS,11.RA,16.0,21.708:EVX:e500:efsabs %RS,%RA:Floating-Point Absolute Value
+ unsigned32 w1, w2;
+ w1 = *rSh;
+ w2 = *rA & 0x7fffffff;
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.0,21.709:EVX:e500:efsnabs %RS,%RA:Floating-Point Negative Absolute Value
+ unsigned32 w1, w2;
+ w1 = *rSh;
+ w2 = *rA | 0x80000000;
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.0,21.710:EVX:e500:efsneg %RS,%RA:Floating-Point Negate
+ unsigned32 w1, w2;
+ w1 = *rSh;
+ w2 = (*rA & 0x7fffffff) | ((~*rA) & 0x80000000);
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.RB,21.704:EVX:e500:efsadd %RS,%RA,%RB:Floating-Point Add
+ unsigned32 w;
+ w = ev_fs_add (*rA, *rB, spefscr_finv, spefscr_fovf, spefscr_funf, spefscr_fgh, spefscr_fxh, processor);
+ EV_SET_REG(*rS, w);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.705:EVX:e500:efssub %RS,%RA,%RB:Floating-Point Subtract
+ unsigned32 w;
+ w = ev_fs_sub (*rA, *rB, spefscr_finv, spefscr_fovf, spefscr_funf, spefscr_fgh, spefscr_fxh, processor);
+ EV_SET_REG(*rS, w);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.712:EVX:e500:efsmul %RS,%RA,%RB:Floating-Point Multiply
+ unsigned32 w;
+ w = ev_fs_mul (*rA, *rB, spefscr_finv, spefscr_fovf, spefscr_funf, spefscr_fgh, spefscr_fxh, processor);
+ EV_SET_REG(*rS, w);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.RS,11.RA,16.RB,21.713:EVX:e500:efsdiv %RS,%RA,%RB:Floating-Point Divide
+ unsigned32 w;
+ w = ev_fs_div (*rA, *rB, spefscr_finv, spefscr_fovf, spefscr_funf, spefscr_fdbz, spefscr_fg, spefscr_fx, processor);
+ EV_SET_REG(*rS, w);
+ PPC_INSN_INT_SPR(RS_BITMASK, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.BF,9./,11.RA,16.RB,21.716:EVX:e500:efscmpgt %BF,%RA,%RB:Floating-Point Compare Greater Than
+ sim_fpu a, b;
+ int w, cl;
+ sim_fpu_32to (&a, *rA);
+ sim_fpu_32to (&b, *rB);
+ if (EV_IS_INFDENORMNAN(&a) || EV_IS_INFDENORMNAN(&b))
+ EV_SET_SPEFSCR_BITS(spefscr_finv);
+ if (sim_fpu_is_gt(&a, &b))
+ cl = 1;
+ else
+ cl = 0;
+ w = cl << 2 | cl << 1;
+ CR_SET(BF, w);
+ PPC_INSN_INT_SPR(0, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.BF,9./,11.RA,16.RB,21.717:EVX:e500:efscmplt %BF,%RA,%RB:Floating-Point Compare Less Than
+ sim_fpu al, bl;
+ int w, cl;
+ sim_fpu_32to (&al, *rA);
+ sim_fpu_32to (&bl, *rB);
+ if (EV_IS_INFDENORMNAN(&al) || EV_IS_INFDENORMNAN(&bl))
+ EV_SET_SPEFSCR_BITS(spefscr_finv);
+ if (sim_fpu_is_lt(&al, &bl))
+ cl = 1;
+ else
+ cl = 0;
+ w = cl << 2 | cl << 1;
+ CR_SET(BF, w);
+ PPC_INSN_INT_SPR(0, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.BF,9./,11.RA,16.RB,21.718:EVX:e500:efscmpeq %BF,%RA,%RB:Floating-Point Compare Equal
+ sim_fpu al, bl;
+ int w, cl;
+ sim_fpu_32to (&al, *rA);
+ sim_fpu_32to (&bl, *rB);
+ if (EV_IS_INFDENORMNAN(&al) || EV_IS_INFDENORMNAN(&bl))
+ EV_SET_SPEFSCR_BITS(spefscr_finv);
+ if (sim_fpu_is_eq(&al, &bl))
+ cl = 1;
+ else
+ cl = 0;
+ w = cl << 2 | cl << 1;
+ CR_SET(BF, w);
+ PPC_INSN_INT_SPR(0, RA_BITMASK | RB_BITMASK, spr_spefscr);
+
+0.4,6.BF,9./,11.RA,16.RB,21.732:EVX:e500:efststgt %BF,%RA,%RB:Floating-Point Test Greater Than
+ sim_fpu al, bl;
+ int w, cl;
+ sim_fpu_32to (&al, *rA);
+ sim_fpu_32to (&bl, *rB);
+ if (sim_fpu_is_gt(&al, &bl))
+ cl = 1;
+ else
+ cl = 0;
+ w = cl << 2 | cl << 1;
+ CR_SET(BF, w);
+ PPC_INSN_INT_CR(0, RA_BITMASK | RB_BITMASK, BF_BITMASK);
+
+0.4,6.BF,9./,11.RA,16.RB,21.733:EVX:e500:efststlt %BF,%RA,%RB:Floating-Point Test Less Than
+ sim_fpu al, bl;
+ int w, cl;
+ sim_fpu_32to (&al, *rA);
+ sim_fpu_32to (&bl, *rB);
+ if (sim_fpu_is_lt(&al, &bl))
+ cl = 1;
+ else
+ cl = 0;
+ w = cl << 2 | cl << 1;
+ CR_SET(BF, w);
+ PPC_INSN_INT_CR(0, RA_BITMASK | RB_BITMASK, BF_BITMASK);
+
+0.4,6.BF,9./,11.RA,16.RB,21.734:EVX:e500:efststeq %BF,%RA,%RB:Floating-Point Test Equal
+ sim_fpu al, bl;
+ int w, cl;
+ sim_fpu_32to (&al, *rA);
+ sim_fpu_32to (&bl, *rB);
+ if (sim_fpu_is_eq(&al, &bl))
+ cl = 1;
+ else
+ cl = 0;
+ w = cl << 2 | cl << 1;
+ CR_SET(BF, w);
+ PPC_INSN_INT_CR(0, RA_BITMASK | RB_BITMASK, BF_BITMASK);
+
+0.4,6.RS,11.0,16.RB,21.721:EVX:e500:efscfsi %RS,%RB:Convert Floating-Point from Signed Integer
+ signed32 f, w1, w2;
+ sim_fpu b;
+ w1 = *rSh;
+ sim_fpu_i32to (&b, *rB, sim_fpu_round_default);
+ sim_fpu_to32 (&w2, &b);
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RB_BITMASK, 0);
+
+0.4,6.RS,11.0,16.RB,21.720:EVX:e500:efscfui %RS,%RB:Convert Floating-Point from Unsigned Integer
+ unsigned32 w1, w2;
+ sim_fpu b;
+ w1 = *rSh;
+ sim_fpu_u32to (&b, *rB, sim_fpu_round_default);
+ sim_fpu_to32 (&w2, &b);
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RB_BITMASK, 0);
+
+0.4,6.RS,11.0,16.RB,21.723:EVX:e500:efscfsf %RS,%RB:Convert Floating-Point from Signed Fraction
+ unsigned32 w1, w2;
+ sim_fpu b, x, y;
+ w1 = *rSh;
+ sim_fpu_u32to (&x, 0x80000000, sim_fpu_round_default);
+ sim_fpu_i32to (&y, *rB, sim_fpu_round_default);
+ sim_fpu_div (&b, &y, &x);
+ sim_fpu_to32 (&w2, &b);
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RB_BITMASK, 0);
+
+0.4,6.RS,11.0,16.RB,21.722:EVX:e500:efscfuf %RS,%RB:Convert Floating-Point from Unsigned Fraction
+ unsigned32 w1, w2, bl;
+ sim_fpu b, x, y;
+ w1 = *rSh;
+ bl = *rB;
+ if (bl == 0xffffffff)
+ sim_fpu_to32 (&w2, &sim_fpu_one);
+ else {
+ sim_fpu_u64to (&x, 0x100000000, sim_fpu_round_default);
+ sim_fpu_u32to (&y, bl, sim_fpu_round_default);
+ sim_fpu_div (&b, &y, &x);
+ sim_fpu_to32 (&w2, &b);
+ }
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RB_BITMASK, 0);
+
+0.4,6.RS,11.0,16.RB,21.725:EVX:e500:efsctsi %RS,%RB:Convert Floating-Point to Signed Integer
+ signed64 temp;
+ signed32 w1, w2;
+ sim_fpu b;
+ w1 = *rSh;
+ sim_fpu_32to (&b, *rB);
+ sim_fpu_to32i (&w2, &b, sim_fpu_round_default);
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RB_BITMASK, 0);
+
+0.4,6.RS,11.0,16.RB,21.730:EVX:e500:efsctsiz %RS,%RB:Convert Floating-Point to Signed Integer with Round toward Zero
+ signed64 temp;
+ signed32 w1, w2;
+ sim_fpu b;
+ w1 = *rSh;
+ sim_fpu_32to (&b, *rB);
+ sim_fpu_to32i (&w2, &b, sim_fpu_round_zero);
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RB_BITMASK, 0);
+
+0.4,6.RS,11.0,16.RB,21.724:EVX:e500:efsctui %RS,%RB:Convert Floating-Point to Unsigned Integer
+ unsigned64 temp;
+ signed32 w1, w2;
+ sim_fpu b;
+ w1 = *rSh;
+ sim_fpu_32to (&b, *rB);
+ sim_fpu_to32u (&w2, &b, sim_fpu_round_default);
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RB_BITMASK, 0);
+
+0.4,6.RS,11.0,16.RB,21.728:EVX:e500:efsctuiz %RS,%RB:Convert Floating-Point to Unsigned Integer with Round toward Zero
+ unsigned64 temp;
+ signed32 w1, w2;
+ sim_fpu b;
+ w1 = *rSh;
+ sim_fpu_32to (&b, *rB);
+ sim_fpu_to32u (&w2, &b, sim_fpu_round_zero);
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RB_BITMASK, 0);
+
+0.4,6.RS,11.0,16.RB,21.727:EVX:e500:efsctsf %RS,%RB:Convert Floating-Point to Signed Fraction
+ unsigned32 w1, w2;
+ sim_fpu b, x, y;
+ w1 = *rSh;
+ sim_fpu_32to (&y, *rB);
+ sim_fpu_u32to (&x, 0x80000000, sim_fpu_round_default);
+ sim_fpu_mul (&b, &y, &x);
+ sim_fpu_to32i (&w2, &b, sim_fpu_round_default);
+ sim_fpu_to32 (&w2, &b);
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RB_BITMASK, 0);
+
+0.4,6.RS,11.0,16.RB,21.726:EVX:e500:efsctuf %RS,%RB:Convert Floating-Point to Unsigned Fraction
+ unsigned32 w1, w2;
+ sim_fpu b, x, y;
+ w1 = *rSh;
+ sim_fpu_u64to (&x, 0x100000000, sim_fpu_round_default);
+ sim_fpu_32to (&y, *rB);
+ sim_fpu_mul (&b, &y, &x);
+ sim_fpu_to32u (&w2, &b, sim_fpu_round_default);
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, RB_BITMASK, 0);
+
+
+#
+# A.2.10 Vector Load/Store Instructions
+#
+
+0.4,6.RS,11.RA,16.UIMM,21.769:EVX:e500:evldd %RS,%RA,%UIMM:Vector Load Double Word into Double Word
+ unsigned64 m;
+ unsigned_word b;
+ unsigned_word EA;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + (UIMM << 3);
+ m = MEM(unsigned, EA, 8);
+ EV_SET_REG1(*rSh, *rS, m);
+ //printf("evldd(%d<-%d + %u): m %08x.%08x, *rSh %x *rS %x\n", RS, RA, UIMM, (int)(m >> 32), (int)m, *rSh, *rS);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1), 0);
+
+0.4,6.RS,11.RA,16.RB,21.768:EVX:e500:evlddx %RS,%RA,%RB:Vector Load Double Word into Double Word Indexed
+ unsigned64 m;
+ unsigned_word b;
+ unsigned_word EA;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + *rB;
+ m = MEM(unsigned, EA, 8);
+ EV_SET_REG1(*rSh, *rS, m);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1) | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.UIMM,21.771:EVX:e500:evldw %RS,%RA,%UIMM:Vector Load Double into Two Words
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned32 w1, w2;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + (UIMM << 3);
+ w1 = MEM(unsigned, EA, 4);
+ w2 = MEM(unsigned, EA + 4, 4);
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1), 0);
+
+0.4,6.RS,11.RA,16.RB,21.770:EVX:e500:evldwx %RS,%RA,%RB:Vector Load Double into Two Words Indexed
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned32 w1, w2;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + *rB;
+ w1 = MEM(unsigned, EA, 4);
+ w2 = MEM(unsigned, EA + 4, 4);
+ EV_SET_REG2(*rSh, *rS, w1, w2);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1) | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.UIMM,21.773:EVX:e500:evldh %RS,%RA,%UIMM:Vector Load Double into 4 Half Words
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned16 h1, h2, h3, h4;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + (UIMM << 3);
+ h1 = MEM(unsigned, EA, 2);
+ h2 = MEM(unsigned, EA + 2, 2);
+ h3 = MEM(unsigned, EA + 4, 2);
+ h4 = MEM(unsigned, EA + 6, 2);
+ EV_SET_REG4(*rSh, *rS, h1, h2, h3, h4);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1), 0);
+
+0.4,6.RS,11.RA,16.RB,21.772:EVX:e500:evldhx %RS,%RA,%RB:Vector Load Double into 4 Half Words Indexed
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned16 h1, h2, h3, h4;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + *rB;
+ h1 = MEM(unsigned, EA, 2);
+ h2 = MEM(unsigned, EA + 2, 2);
+ h3 = MEM(unsigned, EA + 4, 2);
+ h4 = MEM(unsigned, EA + 6, 2);
+ EV_SET_REG4(*rSh, *rS, h1, h2, h3, h4);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1) | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.UIMM,21.785:EVX:e500:evlwhe %RS,%RA,%UIMM:Vector Load Word into Two Half Words Even
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned16 h1, h2, h3, h4;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + (UIMM << 2);
+ h1 = MEM(unsigned, EA, 2);
+ h2 = 0;
+ h3 = MEM(unsigned, EA + 2, 2);
+ h4 = 0;
+ EV_SET_REG4(*rSh, *rS, h1, h2, h3, h4);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1), 0);
+
+0.4,6.RS,11.RA,16.RB,21.784:EVX:e500:evlwhex %RS,%RA,%RB:Vector Load Word into Two Half Words Even Indexed
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned16 h1, h2, h3, h4;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + *rB;
+ h1 = MEM(unsigned, EA, 2);
+ h2 = 0;
+ h3 = MEM(unsigned, EA + 2, 2);
+ h4 = 0;
+ EV_SET_REG4(*rSh, *rS, h1, h2, h3, h4);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1) | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.UIMM,21.789:EVX:e500:evlwhou %RS,%RA,%UIMM:Vector Load Word into Two Half Words Odd Unsigned zero-extended
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned16 h1, h2, h3, h4;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + (UIMM << 2);
+ h1 = 0;
+ h2 = MEM(unsigned, EA, 2);
+ h3 = 0;
+ h4 = MEM(unsigned, EA + 2, 2);
+ EV_SET_REG4(*rSh, *rS, h1, h2, h3, h4);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1), 0);
+
+0.4,6.RS,11.RA,16.RB,21.788:EVX:e500:evlwhoux %RS,%RA,%RB:Vector Load Word into Two Half Words Odd Unsigned Indexed zero-extended
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned16 h1, h2, h3, h4;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + *rB;
+ h1 = 0;
+ h2 = MEM(unsigned, EA, 2);
+ h3 = 0;
+ h4 = MEM(unsigned, EA + 2, 2);
+ EV_SET_REG4(*rSh, *rS, h1, h2, h3, h4);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1) | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.UIMM,21.791:EVX:e500:evlwhos %RS,%RA,%UIMM:Vector Load Word into Half Words Odd Signed with sign extension
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned16 h1, h2, h3, h4;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + (UIMM << 2);
+ h2 = MEM(unsigned, EA, 2);
+ if (h2 & 0x8000)
+ h1 = 0xffff;
+ else
+ h1 = 0;
+ h4 = MEM(unsigned, EA + 2, 2);
+ if (h4 & 0x8000)
+ h3 = 0xffff;
+ else
+ h3 = 0;
+ EV_SET_REG4(*rSh, *rS, h1, h2, h3, h4);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1), 0);
+
+0.4,6.RS,11.RA,16.RB,21.790:EVX:e500:evlwhosx %RS,%RA,%RB:Vector Load Word into Half Words Odd Signed Indexed with sign extension
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned16 h1, h2, h3, h4;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + *rB;
+ h2 = MEM(unsigned, EA, 2);
+ if (h2 & 0x8000)
+ h1 = 0xffff;
+ else
+ h1 = 0;
+ h4 = MEM(unsigned, EA + 2, 2);
+ if (h4 & 0x8000)
+ h3 = 0xffff;
+ else
+ h3 = 0;
+ EV_SET_REG4(*rSh, *rS, h1, h2, h3, h4);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1) | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.UIMM,21.793:EVX:e500:evlwwsplat %RS,%RA,%UIMM:Vector Load Word into Word and Splat
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned32 w1;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + (UIMM << 2);
+ w1 = MEM(unsigned, EA, 4);
+ EV_SET_REG2(*rSh, *rS, w1, w1);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1), 0);
+
+0.4,6.RS,11.RA,16.RB,21.792:EVX:e500:evlwwsplatx %RS,%RA,%RB:Vector Load Word into Word and Splat Indexed
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned32 w1;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + *rB;
+ w1 = MEM(unsigned, EA, 4);
+ EV_SET_REG2(*rSh, *rS, w1, w1);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1) | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.UIMM,21.797:EVX:e500:evlwhsplat %RS,%RA,%UIMM:Vector Load Word into 2 Half Words and Splat
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned16 h1, h2;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + (UIMM << 2);
+ h1 = MEM(unsigned, EA, 2);
+ h2 = MEM(unsigned, EA + 2, 2);
+ EV_SET_REG4(*rSh, *rS, h1, h1, h2, h2);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1), 0);
+
+0.4,6.RS,11.RA,16.RB,21.796:EVX:e500:evlwhsplatx %RS,%RA,%RB:Vector Load Word into 2 Half Words and Splat Indexed
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned16 h1, h2;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + *rB;
+ h1 = MEM(unsigned, EA, 2);
+ h2 = MEM(unsigned, EA + 2, 2);
+ EV_SET_REG4(*rSh, *rS, h1, h1, h2, h2);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1) | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.UIMM,21.777:EVX:e500:evlhhesplat %RS,%RA,%UIMM:Vector Load Half Word into Half Words Even and Splat
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned16 h;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + (UIMM << 1);
+ h = MEM(unsigned, EA, 2);
+ EV_SET_REG4(*rSh, *rS, h, 0, h, 0);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1), 0);
+
+0.4,6.RS,11.RA,16.RB,21.776:EVX:e500:evlhhesplatx %RS,%RA,%RB:Vector Load Half Word into Half Words Even and Splat Indexed
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned16 h;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + *rB;
+ h = MEM(unsigned, EA, 2);
+ EV_SET_REG4(*rSh, *rS, h, 0, h, 0);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1) | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.UIMM,21.781:EVX:e500:evlhhousplat %RS,%RA,%UIMM:Vector Load Half Word into Half Word Odd Unsigned and Splat
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned16 h;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + (UIMM << 1);
+ h = MEM(unsigned, EA, 2);
+ EV_SET_REG4(*rSh, *rS, 0, h, 0, h);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1), 0);
+
+0.4,6.RS,11.RA,16.RB,21.780:EVX:e500:evlhhousplatx %RS,%RA,%RB:Vector Load Half Word into Half Word Odd Unsigned and Splat Indexed
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned16 h;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + *rB;
+ h = MEM(unsigned, EA, 2);
+ EV_SET_REG4(*rSh, *rS, 0, h, 0, h);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1) | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.UIMM,21.783:EVX:e500:evlhhossplat %RS,%RA,%UIMM:Vector Load Half Word into Half Word Odd Signed and Splat
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned16 h1, h2;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + (UIMM << 1);
+ h2 = MEM(unsigned, EA, 2);
+ if (h2 & 0x8000)
+ h1 = 0xffff;
+ else
+ h1 = 0;
+ EV_SET_REG4(*rSh, *rS, h1, h2, h1, h2);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1), 0);
+
+0.4,6.RS,11.RA,16.RB,21.782:EVX:e500:evlhhossplatx %RS,%RA,%RB:Vector Load Half Word into Half Word Odd Signed and Splat Indexed
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned16 h1, h2;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + *rB;
+ h2 = MEM(unsigned, EA, 2);
+ if (h2 & 0x8000)
+ h1 = 0xffff;
+ else
+ h1 = 0;
+ EV_SET_REG4(*rSh, *rS, h1, h2, h1, h2);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1) | RB_BITMASK, 0);
+
+
+0.4,6.RS,11.RA,16.UIMM,21.801:EVX:e500:evstdd %RS,%RA,%UIMM:Vector Store Double of Double
+ unsigned_word b;
+ unsigned_word EA;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + (UIMM << 3);
+ STORE(EA, 4, (*rSh));
+ STORE(EA + 4, 4, (*rS));
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1), 0);
+
+0.4,6.RS,11.RA,16.RB,21.800:EVX:e500:evstddx %RS,%RA,%RB:Vector Store Double of Double Indexed
+ unsigned_word b;
+ unsigned_word EA;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + *rB;
+ STORE(EA, 4, (*rSh));
+ STORE(EA + 4, 4, (*rS));
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1) | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.UIMM,21.803:EVX:e500:evstdw %RS,%RA,%UIMM:Vector Store Double of Two Words
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned32 w1, w2;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + (UIMM << 3);
+ w1 = *rSh;
+ w2 = *rS;
+ STORE(EA + 0, 4, w1);
+ STORE(EA + 4, 4, w2);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1), 0);
+
+0.4,6.RS,11.RA,16.RB,21.802:EVX:e500:evstdwx %RS,%RA,%RB:Vector Store Double of Two Words Indexed
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned32 w1, w2;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + *rB;
+ w1 = *rSh;
+ w2 = *rS;
+ STORE(EA + 0, 4, w1);
+ STORE(EA + 4, 4, w2);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1) | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.UIMM,21.805:EVX:e500:evstdh %RS,%RA,%UIMM:Vector Store Double of Four Half Words
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned16 h1, h2, h3, h4;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + (UIMM << 3);
+ h1 = EV_HIHALF(*rSh);
+ h2 = EV_LOHALF(*rSh);
+ h3 = EV_HIHALF(*rS);
+ h4 = EV_LOHALF(*rS);
+ STORE(EA + 0, 2, h1);
+ STORE(EA + 2, 2, h2);
+ STORE(EA + 4, 2, h3);
+ STORE(EA + 6, 2, h4);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1), 0);
+
+0.4,6.RS,11.RA,16.RB,21.804:EVX:e500:evstdhx %RS,%RA,%RB:Vector Store Double of Four Half Words Indexed
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned16 h1, h2, h3, h4;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + *rB;
+ h1 = EV_HIHALF(*rSh);
+ h2 = EV_LOHALF(*rSh);
+ h3 = EV_HIHALF(*rS);
+ h4 = EV_LOHALF(*rS);
+ STORE(EA + 0, 2, h1);
+ STORE(EA + 2, 2, h2);
+ STORE(EA + 4, 2, h3);
+ STORE(EA + 6, 2, h4);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1) | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.UIMM,21.825:EVX:e500:evstwwe %RS,%RA,%UIMM:Vector Store Word of Word from Even
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned32 w;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + (UIMM << 3);
+ w = *rSh;
+ STORE(EA, 4, w);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1), 0);
+
+0.4,6.RS,11.RA,16.RB,21.824:EVX:e500:evstwwex %RS,%RA,%RB:Vector Store Word of Word from Even Indexed
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned32 w;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + *rB;
+ w = *rSh;
+ STORE(EA, 4, w);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1) | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.UIMM,21.829:EVX:e500:evstwwo %RS,%RA,%UIMM:Vector Store Word of Word from Odd
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned32 w;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + (UIMM << 3);
+ w = *rS;
+ STORE(EA, 4, w);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1), 0);
+
+0.4,6.RS,11.RA,16.RB,21.828:EVX:e500:evstwwox %RS,%RA,%RB:Vector Store Word of Word from Odd Indexed
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned32 w;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + *rB;
+ w = *rS;
+ STORE(EA, 4, w);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1) | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.UIMM,21.817:EVX:e500:evstwhe %RS,%RA,%UIMM:Vector Store Word of Two Half Words from Even
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned16 h1, h2;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + (UIMM << 3);
+ h1 = EV_HIHALF(*rSh);
+ h2 = EV_HIHALF(*rS);
+ STORE(EA + 0, 2, h1);
+ STORE(EA + 2, 2, h2);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1), 0);
+
+0.4,6.RS,11.RA,16.RB,21.816:EVX:e500:evstwhex %RS,%RA,%RB:Vector Store Word of Two Half Words from Even Indexed
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned16 h1, h2;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + *rB;
+ h1 = EV_HIHALF(*rSh);
+ h2 = EV_HIHALF(*rS);
+ STORE(EA + 0, 2, h1);
+ STORE(EA + 2, 2, h2);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1) | RB_BITMASK, 0);
+
+0.4,6.RS,11.RA,16.UIMM,21.821:EVX:e500:evstwho %RS,%RA,%UIMM:Vector Store Word of Two Half Words from Odd
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned16 h1, h2;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + (UIMM << 3);
+ h1 = EV_LOHALF(*rSh);
+ h2 = EV_LOHALF(*rS);
+ STORE(EA + 0, 2, h1);
+ STORE(EA + 2, 2, h2);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1), 0);
+
+0.4,6.RS,11.RA,16.RB,21.820:EVX:e500:evstwhox %RS,%RA,%RB:Vector Store Word of Two Half Words from Odd Indexed
+ unsigned_word b;
+ unsigned_word EA;
+ unsigned16 h1, h2;
+ if (RA_is_0) b = 0;
+ else b = *rA;
+ EA = b + *rB;
+ h1 = EV_LOHALF(*rSh);
+ h2 = EV_LOHALF(*rS);
+ STORE(EA + 0, 2, h1);
+ STORE(EA + 2, 2, h2);
+ PPC_INSN_INT(RS_BITMASK, (RA_BITMASK & ~1) | RB_BITMASK, 0);
+
+
+#
+# 4.5.1 Integer Select Instruction
+#
+
+0.31,6.RS,11.RA,16.RB,21.CRB,26.30:X:e500:isel %RS,%RA,%RB,%CRB:Integer Select
+ if (CR & (1 << (31 - (unsigned)CRB)))
+ if (RA_is_0)
+ EV_SET_REG1(*rSh, *rS, 0);
+ else
+ EV_SET_REG2(*rSh, *rS, *rAh, *rA);
+ else
+ EV_SET_REG2(*rSh, *rS, *rBh, *rB);
+ PPC_INSN_INT(RS_BITMASK, RA_BITMASK | RB_BITMASK, 0);
diff --git a/sim/ppc/e500_expression.h b/sim/ppc/e500_expression.h
new file mode 100644
index 00000000000..c634a1ca354
--- /dev/null
+++ b/sim/ppc/e500_expression.h
@@ -0,0 +1,173 @@
+/* e500 expression macros, for PSIM, the PowerPC simulator.
+
+ Copyright 2003 Free Software Foundation, Inc.
+
+ Contributed by Red Hat Inc; developed under contract from Motorola.
+ Written by matthew green <mrg@redhat.com>.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* e500 register dance */
+#define EV_SET_REG4(sh, sl, h0, h1, h2, h3) do { \
+ (sh) = (((h0) & 0xffff) << 16) | ((h1) & 0xffff); \
+ (sl) = (((h2) & 0xffff) << 16) | ((h3) & 0xffff); \
+} while (0)
+#define EV_SET_REG4_ACC(sh, sl, h0, h1, h2, h3) do { \
+ (sh) = (((h0) & 0xffff) << 16) | ((h1) & 0xffff); \
+ (sl) = (((h2) & 0xffff) << 16) | ((h3) & 0xffff); \
+ ACC = ((unsigned64)(sh) << 32) | (sl & 0xffffffff); \
+} while (0)
+
+#define EV_SET_REG2(sh, sl, dh, dl) do { \
+ (sh) = (dh) & 0xffffffff; \
+ (sl) = (dl) & 0xffffffff; \
+} while (0)
+#define EV_SET_REG2_ACC(sh, sl, dh, dl) do { \
+ (sh) = (dh) & 0xffffffff; \
+ (sl) = (dl) & 0xffffffff; \
+ ACC = ((unsigned64)(sh) << 32) | ((sl) & 0xffffffff); \
+} while (0)
+
+#define EV_SET_REG1(sh, sl, d) do { \
+ (sh) = ((unsigned64)(d) >> 32) & 0xffffffff; \
+ (sl) = (d) & 0xffffffff; \
+} while (0)
+#define EV_SET_REG1_ACC(sh, sl, d) do { \
+ (sh) = ((unsigned64)(d) >> 32) & 0xffffffff; \
+ (sl) = (d) & 0xffffffff; \
+ ACC = (d); \
+} while (0)
+
+#define EV_SET_REG(s, d) do { \
+ (s) = (d) & 0xffffffff; \
+} while (0)
+
+/* get the low or high half word of a word */
+#define EV_LOHALF(x) ((unsigned32)(x) & 0xffff)
+#define EV_HIHALF(x) (((unsigned32)(x) >> 16) & 0xffff)
+
+/* partially visible accumulator accessors */
+#define EV_SET_ACC(rh, rl) \
+ ACC = ((unsigned64)(rh) << 32) | ((rl) & 0xffffffff)
+
+#define EV_ACCLOW (ACC & 0xffffffff)
+#define EV_ACCHIGH ((ACC >> 32) & 0xffffffff)
+
+/* bit manipulation macros needed for e500 SPE */
+#define EV_BITREVERSE16(x) \
+ (((x) & 0x0001) << 15) \
+ | (((x) & 0x0002) << 13) \
+ | (((x) & 0x0004) << 11) \
+ | (((x) & 0x0008) << 9) \
+ | (((x) & 0x0010) << 7) \
+ | (((x) & 0x0020) << 5) \
+ | (((x) & 0x0040) << 3) \
+ | (((x) & 0x0080) << 1) \
+ | (((x) & 0x0100) >> 1) \
+ | (((x) & 0x0200) >> 3) \
+ | (((x) & 0x0400) >> 5) \
+ | (((x) & 0x0800) >> 7) \
+ | (((x) & 0x1000) >> 9) \
+ | (((x) & 0x2000) >> 11) \
+ | (((x) & 0x4000) >> 13) \
+ | (((x) & 0x8000) >> 15)
+
+/* saturation helpers */
+#define EV_MUL16_SSF(a,b) ((signed64)((signed32)(signed16)(a) * (signed32)(signed16)(b)) << 1)
+/* this one loses the top sign bit; be careful */
+#define EV_MUL32_SSF(a,b) (((signed64)(signed32)(a) * (signed64)(signed32)(b)) << 1)
+#define EV_SAT_P_S32(x) ((((signed64)(x)) < -0x80000000LL) || (((signed64)(x)) > 0x7fffffffLL))
+#define EV_SAT_P_U32(x) ((((signed64)(x)) < -0LL) || (((signed64)(x)) > 0xffffffffLL))
+
+#define EV_SATURATE(flag, sat_val, val) \
+ ((flag) ? (sat_val) : (val))
+
+#define EV_SATURATE_ACC(flag, sign, negative_sat_val, positive_sat_val, val) \
+ ((flag) ? ((((sign) >> 63) & 1) ? (negative_sat_val) : (positive_sat_val)) : (val))
+
+/* SPEFSCR handling. */
+
+/* These bits must be clear. */
+#define EV_SPEFSCR_MASK (BIT(40) | BIT(41) | spefscr_mode | BIT(56))
+
+/* The Inexact and Divide by zero sticky bits are based on others. */
+#define EV_SET_SPEFSCR(bits) do { \
+ int finxs = (bits) & (spefscr_fgh|spefscr_fxh|spefscr_fg|spefscr_fx); \
+ int fdbzs = (bits) & (spefscr_fdbzh|spefscr_fdbz); \
+ SPREG(spr_spefscr) = ((bits) & ~EV_SPEFSCR_MASK) | \
+ (finxs ? spefscr_finxs : 0) | \
+ (fdbzs ? spefscr_fdbzs : 0); \
+} while (0)
+
+#define EV_SET_SPEFSCR_BITS(s) \
+ EV_SET_SPEFSCR(SPREG(spr_spefscr) | (s))
+
+#define EV_SET_SPEFSCR_OV(l,h) do { \
+ unsigned32 _sPefScR = SPREG(spr_spefscr); \
+ if (l) \
+ _sPefScR |= spefscr_ov | spefscr_sov; \
+ else \
+ _sPefScR &= ~spefscr_ov; \
+ if (h) \
+ _sPefScR |= spefscr_ovh | spefscr_sovh; \
+ else \
+ _sPefScR &= ~spefscr_ovh; \
+ EV_SET_SPEFSCR(_sPefScR); \
+} while (0)
+
+/* SPE floating point helpers. */
+
+#define EV_PMAX 0x7f7fffff
+#define EV_NMAX 0xff7fffff
+#define EV_PMIN 0x00800001
+#define EV_NMIN 0x80800001
+
+#define EV_IS_INFDENORMNAN(x) \
+ (sim_fpu_is_infinity(x) || sim_fpu_is_denorm(x) || sim_fpu_is_nan(x))
+
+/* These aren't used (yet?) For now, SPU is always enabled.
+ Would be nice if they were generated by igen for e500. */
+#define SPU_BEGIN \
+{ \
+ if (MSR & msr_e500_spu_enable) { \
+
+#define SPU_END \
+ } else { \
+ /* FIXME: raise SPU unavailable. */ \
+ } \
+}
+
+/* These are also not yet used. */
+#define SPU_FP_BEGIN \
+{
+
+#define SPU_FP_END \
+ { \
+ unsigned s = SPEFSCR; \
+ /* Check SPEFSCR; raise exceptions if any required. */ \
+ if (((spefscr_finxe || spefscr_finve) \
+ && (s & (spefscr_finvh|spefscr_finv))) \
+ || ((spefscr_finxe || spefscr_fdbze) \
+ && (s & (spefscr_fdbzh|spefscr_fdbz))) \
+ || ((spefscr_finxe || spefscr_funfe) \
+ && (s & (spefscr_funfh|spefscr_funf))) \
+ || ((spefscr_finxe || spefscr_fovfe) \
+ && (s & (spefscr_fovfh|spefscr_fovf)))) \
+ /* FIXME: raise exceptions. */; \
+ } \
+}
diff --git a/sim/ppc/e500_registers.h b/sim/ppc/e500_registers.h
new file mode 100644
index 00000000000..cd12ab5ec27
--- /dev/null
+++ b/sim/ppc/e500_registers.h
@@ -0,0 +1,83 @@
+/* e500 registers, for PSIM, the PowerPC simulator.
+
+ Copyright 2003 Free Software Foundation, Inc.
+
+ Contributed by Red Hat Inc; developed under contract from Motorola.
+ Written by matthew green <mrg@redhat.com>.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* e500 accumulator. */
+
+typedef unsigned64 accreg;
+
+enum {
+ msr_e500_spu_enable = BIT(38)
+};
+
+/* E500 regsiters. */
+
+enum
+ {
+ spefscr_sovh = BIT(32), /* summary integer overlow (high) */
+ spefscr_ovh = BIT(33), /* int overflow (high) */
+ spefscr_fgh = BIT(34), /* FP guard (high) */
+ spefscr_fxh = BIT(35), /* FP sticky (high) */
+ spefscr_finvh = BIT(36), /* FP invalid operand (high) */
+ spefscr_fdbzh = BIT(37), /* FP divide by zero (high) */
+ spefscr_funfh = BIT(38), /* FP underflow (high) */
+ spefscr_fovfh = BIT(39), /* FP overflow (high) */
+ spefscr_finxs = BIT(42), /* FP inexact sticky */
+ spefscr_finvs = BIT(43), /* FP invalid operand sticky */
+ spefscr_fdbzs = BIT(44), /* FP divide by zero sticky */
+ spefscr_funfs = BIT(45), /* FP underflow sticky */
+ spefscr_fovfs = BIT(46), /* FP overflow sticky */
+ spefscr_mode = BIT(47), /* SPU MODE (read only) */
+ spefscr_sov = BIT(48), /* Summary integer overlow (low) */
+ spefscr_ov = BIT(49), /* int overflow (low) */
+ spefscr_fg = BIT(50), /* FP guard (low) */
+ spefscr_fx = BIT(51), /* FP sticky (low) */
+ spefscr_finv = BIT(52), /* FP invalid operand (low) */
+ spefscr_fdbz = BIT(53), /* FP divide by zero (low) */
+ spefscr_funf = BIT(54), /* FP underflow (low) */
+ spefscr_fovf = BIT(55), /* FP overflow (low) */
+ spefscr_finxe = BIT(57), /* FP inexact enable */
+ spefscr_finve = BIT(58), /* FP invalid operand enable */
+ spefscr_fdbze = BIT(59), /* FP divide by zero enable */
+ spefscr_funfe = BIT(60), /* FP underflow enable */
+ spefscr_fovfe = BIT(61), /* FP overflow enable */
+ spefscr_frmc0 = BIT(62), /* FP round mode control */
+ spefscr_frmc1 = BIT(63),
+ spefscr_frmc = (spefscr_frmc0 | spefscr_frmc1),
+};
+
+struct e500_regs {
+ /* e500 high bits. */
+ signed_word gprh[32];
+ /* Accumulator */
+ accreg acc;
+};
+
+/* SPE partially visible acculator */
+#define ACC cpu_registers(processor)->e500.acc
+
+/* e500 register high bits */
+#define GPRH(N) cpu_registers(processor)->e500.gprh[N]
+
+/* e500 unified vector register */
+#define EVR(N) ((((unsigned64)GPRH(N)) << 32) | GPR(N))
diff --git a/sim/ppc/emul_chirp.c b/sim/ppc/emul_chirp.c
index c4deb186668..976f766aa36 100644
--- a/sim/ppc/emul_chirp.c
+++ b/sim/ppc/emul_chirp.c
@@ -1,6 +1,6 @@
/* This file is part of the program psim.
- Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
+ Copyright 1994, 1995, 1996, 1997, 2003 Andrew Cagney
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -584,10 +584,15 @@ chirp_emul_nextprop(os_emul_data *data,
if (chirp_read_t2h_args(&args, sizeof(args), 3, 1, data, processor, cia))
return -1;
phandle = external_to_device(data->root, args.phandle);
- emul_read_string(previous,
- args.previous,
- sizeof(previous),
- processor, cia);
+ if (args.previous != 0)
+ emul_read_string(previous,
+ args.previous,
+ sizeof(previous),
+ processor, cia);
+ else
+ /* If previous is NULL, make it look like the empty string. The
+ next property after the empty string is the first property. */
+ strcpy (previous, "");
TRACE(trace_os_emul, ("nextprop - in - phandle=0x%lx(0x%lx`%s') previous=`%s' buf=0x%lx\n",
(unsigned long)args.phandle,
(unsigned long)phandle,
@@ -602,11 +607,19 @@ chirp_emul_nextprop(os_emul_data *data,
else {
const device_property *prev_prop = device_find_property(phandle, previous);
if (prev_prop == NULL) {
- args.flag = -1; /* name invalid */
+ if (strcmp (previous, "") == 0)
+ args.flag = 0; /* No properties */
+ else
+ args.flag = -1; /* name invalid */
}
else {
const device_property *next_prop;
- next_prop = device_next_property(prev_prop);
+ if (strcmp (previous, "") == 0) {
+ next_prop = prev_prop; /* The first property. */
+ }
+ else {
+ next_prop = device_next_property(prev_prop);
+ }
if (next_prop == NULL) {
args.flag = 0; /* last property */
}
diff --git a/sim/ppc/gen-idecode.c b/sim/ppc/gen-idecode.c
index 3b88866aa86..8c29cc456a6 100644
--- a/sim/ppc/gen-idecode.c
+++ b/sim/ppc/gen-idecode.c
@@ -1,6 +1,6 @@
/* This file is part of the program psim.
- Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
+ Copyright 1994, 1995, 1996, 1997, 2003 Andrew Cagney
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -1499,6 +1499,10 @@ gen_idecode_c(lf *file,
lf_printf(file, "#include \"idecode.h\"\n");
lf_printf(file, "#include \"semantics.h\"\n");
lf_printf(file, "#include \"icache.h\"\n");
+ lf_printf(file, "#ifdef HAVE_COMMON_FPU\n");
+ lf_printf(file, "#include \"sim-inline.h\"\n");
+ lf_printf(file, "#include \"sim-fpu.h\"\n");
+ lf_printf(file, "#endif\n");
lf_printf(file, "#include \"support.h\"\n");
lf_printf(file, "\n");
lf_printf(file, "#include <setjmp.h>\n");
diff --git a/sim/ppc/gen-itable.c b/sim/ppc/gen-itable.c
index 132aa291e08..4897b98774c 100644
--- a/sim/ppc/gen-itable.c
+++ b/sim/ppc/gen-itable.c
@@ -26,6 +26,7 @@
#include "filter.h"
+#include "ld-cache.h"
#include "ld-decode.h"
#include "ld-insn.h"
diff --git a/sim/ppc/gen-model.c b/sim/ppc/gen-model.c
index 34c1b90f5ce..b4614312d69 100644
--- a/sim/ppc/gen-model.c
+++ b/sim/ppc/gen-model.c
@@ -25,6 +25,7 @@
#include "filter.h"
+#include "ld-cache.h"
#include "ld-decode.h"
#include "ld-insn.h"
diff --git a/sim/ppc/gen-support.c b/sim/ppc/gen-support.c
index d3067c33348..ed02d7dc75a 100644
--- a/sim/ppc/gen-support.c
+++ b/sim/ppc/gen-support.c
@@ -1,6 +1,6 @@
/* This file is part of the program psim.
- Copyright (C) 1994-1995, Andrew Cagney <cagney@highland.com.au>
+ Copyright 1994, 1995, 2003 Andrew Cagney
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -122,6 +122,10 @@ gen_support_c(insn_table *table,
{
lf_printf(file, "#include \"cpu.h\"\n");
lf_printf(file, "#include \"idecode.h\"\n");
+ lf_printf(file, "#ifdef HAVE_COMMON_FPU\n");
+ lf_printf(file, "#include \"sim-inline.h\"\n");
+ lf_printf(file, "#include \"sim-fpu.h\"\n");
+ lf_printf(file, "#endif\n");
lf_printf(file, "#include \"support.h\"\n");
lf_printf(file, "\n");
diff --git a/sim/ppc/hw_com.c b/sim/ppc/hw_com.c
index 436232289d2..ff8afe73482 100644
--- a/sim/ppc/hw_com.c
+++ b/sim/ppc/hw_com.c
@@ -249,7 +249,7 @@ hw_com_device_init_data(device *me)
if (device_find_property(me, "output-file") != NULL) {
const char *output_file = device_find_string_property(me, "output-file");
com->output.file = fopen(output_file, "w");
- if (com->input.file == NULL)
+ if (com->output.file == NULL)
device_error(me, "Problem opening output file %s\n", output_file);
if (device_find_property(me, "output-buffering") != NULL) {
const char *buffering = device_find_string_property(me, "output-buffering");
diff --git a/sim/ppc/hw_htab.c b/sim/ppc/hw_htab.c
index 50a7b6adfcc..d5360686b45 100644
--- a/sim/ppc/hw_htab.c
+++ b/sim/ppc/hw_htab.c
@@ -1,6 +1,6 @@
/* This file is part of the program psim.
- Copyright (C) 1994-1996, Andrew Cagney <cagney@highland.com.au>
+ Copyright 1994, 1995, 1996, 2003 Andrew Cagney
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -217,14 +217,21 @@ htab_decode_hash_table(device *me,
device_error(parent, "must be a htab device");
htab_ra = device_find_integer_property(parent, "real-address");
htab_nr_bytes = device_find_integer_property(parent, "nr-bytes");
+ if (htab_nr_bytes < 0x10000) {
+ device_error(parent, "htab size 0x%x less than 0x1000",
+ htab_nr_bytes);
+ }
for (n = htab_nr_bytes; n > 1; n = n / 2) {
if (n % 2 != 0)
device_error(parent, "htab size 0x%x not a power of two",
htab_nr_bytes);
}
*htaborg = htab_ra;
+ /* Position the HTABMASK ready for use against a hashed address and
+ not ready for insertion into SDR1.HTABMASK. */
*htabmask = MASKED32(htab_nr_bytes - 1, 7, 31-6);
- if ((htab_ra & INSERTED32(*htabmask, 7, 15)) != 0) {
+ /* Check that the MASK and ADDRESS do not overlap. */
+ if ((htab_ra & (*htabmask)) != 0) {
device_error(parent, "htaborg 0x%lx not aligned to htabmask 0x%lx",
(unsigned long)*htaborg, (unsigned long)*htabmask);
}
diff --git a/sim/ppc/hw_init.c b/sim/ppc/hw_init.c
index 86e753c608a..253ef7c5323 100644
--- a/sim/ppc/hw_init.c
+++ b/sim/ppc/hw_init.c
@@ -1,6 +1,6 @@
/* This file is part of the program psim.
- Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
+ Copyright 1994, 1997, 2003 Andrew Cagney
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -591,16 +591,16 @@ create_ppc_elf_stack_frame(device *me,
start_argv, start_envp);
/* set up the registers */
- psim_write_register(device_system(me), -1,
- &top_of_stack, "sp", cooked_transfer);
- psim_write_register(device_system(me), -1,
- &argc, "r3", cooked_transfer);
- psim_write_register(device_system(me), -1,
- &start_argv, "r4", cooked_transfer);
- psim_write_register(device_system(me), -1,
- &start_envp, "r5", cooked_transfer);
- psim_write_register(device_system(me), -1,
- &start_aux, "r6", cooked_transfer);
+ ASSERT (psim_write_register(device_system(me), -1,
+ &top_of_stack, "sp", cooked_transfer) > 0);
+ ASSERT (psim_write_register(device_system(me), -1,
+ &argc, "r3", cooked_transfer) > 0);
+ ASSERT (psim_write_register(device_system(me), -1,
+ &start_argv, "r4", cooked_transfer) > 0);
+ ASSERT (psim_write_register(device_system(me), -1,
+ &start_envp, "r5", cooked_transfer) > 0);
+ ASSERT (psim_write_register(device_system(me), -1,
+ &start_aux, "r6", cooked_transfer) > 0);
}
static void
@@ -619,16 +619,16 @@ create_ppc_aix_stack_frame(device *me,
create_ppc_elf_stack_frame(me, bottom_of_stack, argv, envp);
/* extract argument addresses from registers */
- psim_read_register(device_system(me), 0,
- &top_of_stack, "r1", cooked_transfer);
- psim_read_register(device_system(me), 0,
- &core_argc, "r3", cooked_transfer);
- psim_read_register(device_system(me), 0,
- &core_argv, "r4", cooked_transfer);
- psim_read_register(device_system(me), 0,
- &core_envp, "r5", cooked_transfer);
- psim_read_register(device_system(me), 0,
- &core_aux, "r6", cooked_transfer);
+ ASSERT (psim_read_register(device_system(me), 0,
+ &top_of_stack, "r1", cooked_transfer) > 0);
+ ASSERT (psim_read_register(device_system(me), 0,
+ &core_argc, "r3", cooked_transfer) > 0);
+ ASSERT (psim_read_register(device_system(me), 0,
+ &core_argv, "r4", cooked_transfer) > 0);
+ ASSERT (psim_read_register(device_system(me), 0,
+ &core_envp, "r5", cooked_transfer) > 0);
+ ASSERT (psim_read_register(device_system(me), 0,
+ &core_aux, "r6", cooked_transfer) > 0);
/* extract arguments from registers */
device_error(me, "Unfinished procedure create_ppc_aix_stack_frame\n");
diff --git a/sim/ppc/hw_nvram.c b/sim/ppc/hw_nvram.c
index 4c87d05d9be..32308f754a0 100644
--- a/sim/ppc/hw_nvram.c
+++ b/sim/ppc/hw_nvram.c
@@ -140,7 +140,7 @@ hw_nvram_init_address(device *me)
nvram->memory = zalloc(nvram->sizeof_memory);
}
else
- memset(nvram->memory, nvram->sizeof_memory, 0);
+ memset(nvram->memory, 0, nvram->sizeof_memory);
if (device_find_property(me, "timezone") == NULL)
nvram->timezone = 0;
diff --git a/sim/ppc/hw_register.c b/sim/ppc/hw_register.c
index f361e462527..549ecf9a7d1 100644
--- a/sim/ppc/hw_register.c
+++ b/sim/ppc/hw_register.c
@@ -1,6 +1,6 @@
/* This file is part of the program psim.
- Copyright (C) 1994-1996, Andrew Cagney <cagney@highland.com.au>
+ Copyright 1994, 1995, 1996, 2003 Andrew Cagney
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -98,10 +98,11 @@ do_register_init(device *me,
DTRACE(register, ("%d.%s=0x%lx\n", processor, name,
(unsigned long)value));
}
- psim_write_register(system, processor, /* all processors */
- &value,
- name,
- cooked_transfer);
+ if (psim_write_register(system, processor, /* all processors */
+ &value,
+ name,
+ cooked_transfer) <= 0)
+ error("Invalid register name %s\n", name);
}
}
diff --git a/sim/ppc/idecode_expression.h b/sim/ppc/idecode_expression.h
index 1f9b7259add..936583ce9db 100644
--- a/sim/ppc/idecode_expression.h
+++ b/sim/ppc/idecode_expression.h
@@ -1,6 +1,6 @@
/* This file is part of the program psim.
- Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
+ Copyright 1994, 1995, 1996, 1997, 2003 Andrew Cagney
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -18,6 +18,13 @@
*/
+/* Additional, and optional expressions. */
+#ifdef WITH_ALTIVEC
+#include "altivec_expression.h"
+#endif
+#ifdef WITH_E500
+#include "e500_expression.h"
+#endif
/* 32bit target expressions:
diff --git a/sim/ppc/igen.c b/sim/ppc/igen.c
index 7008e961e0a..cc096626f84 100644
--- a/sim/ppc/igen.c
+++ b/sim/ppc/igen.c
@@ -1,6 +1,6 @@
/* This file is part of the program psim.
- Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
+ Copyright 1994, 1995, 1996, 1997, 2003 Andrew Cagney
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -29,8 +29,8 @@
#include "filter.h"
-#include "ld-decode.h"
#include "ld-cache.h"
+#include "ld-decode.h"
#include "ld-insn.h"
#include "igen.h"
@@ -220,9 +220,11 @@ gen_semantics_c(insn_table *table,
lf_printf(file, "#include \"cpu.h\"\n");
lf_printf(file, "#include \"idecode.h\"\n");
lf_printf(file, "#include \"semantics.h\"\n");
- lf_printf(file, "#include \"support.h\"\n");
+ lf_printf(file, "#ifdef HAVE_COMMON_FPU\n");
lf_printf(file, "#include \"sim-inline.h\"\n");
lf_printf(file, "#include \"sim-fpu.h\"\n");
+ lf_printf(file, "#endif\n");
+ lf_printf(file, "#include \"support.h\"\n");
lf_printf(file, "\n");
lf_printf(file, "int option_mpc860c0 = 0;\n");
lf_printf(file, "\n");
@@ -306,9 +308,11 @@ gen_icache_c(insn_table *table,
lf_printf(file, "#include \"idecode.h\"\n");
lf_printf(file, "#include \"semantics.h\"\n");
lf_printf(file, "#include \"icache.h\"\n");
- lf_printf(file, "#include \"support.h\"\n");
+ lf_printf(file, "#ifdef HAVE_COMMON_FPU\n");
lf_printf(file, "#include \"sim-inline.h\"\n");
lf_printf(file, "#include \"sim-fpu.h\"\n");
+ lf_printf(file, "#endif\n");
+ lf_printf(file, "#include \"support.h\"\n");
lf_printf(file, "\n");
insn_table_traverse_function(table,
file, NULL,
@@ -476,11 +480,12 @@ main(int argc,
force_decode_gen_type(optarg);
break;
case 'i':
- if (decode_rules == NULL || cache_rules == NULL) {
- fprintf(stderr, "Must specify decode and cache tables\n");
+ if (decode_rules == NULL) {
+ fprintf(stderr, "Must specify decode tables\n");
exit (1);
}
- instructions = load_insn_table(optarg, decode_rules, filters, includes);
+ instructions = load_insn_table(optarg, decode_rules, filters, includes,
+ &cache_rules);
fprintf(stderr, "\texpanding ...\n");
insn_table_expand_insns(instructions);
break;
diff --git a/sim/ppc/interrupts.c b/sim/ppc/interrupts.c
index 681e791af7e..dafb2b33144 100644
--- a/sim/ppc/interrupts.c
+++ b/sim/ppc/interrupts.c
@@ -1,6 +1,6 @@
/* This file is part of the program psim.
- Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
+ Copyright 1994, 1995, 1996, 1997, 2003 Andrew Cagney
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -522,7 +522,7 @@ external_interrupt(cpu *processor,
{
interrupts *ints = cpu_interrupts(processor);
if (is_asserted) {
- if (!ints->pending_interrupts & external_interrupt_pending) {
+ if (!(ints->pending_interrupts & external_interrupt_pending)) {
ints->pending_interrupts |= external_interrupt_pending;
if (cpu_registers(processor)->msr & msr_external_interrupt_enable)
schedule_hardware_interrupt_delivery(processor);
diff --git a/sim/ppc/ld-cache.c b/sim/ppc/ld-cache.c
index 135013e5f23..ef16c675437 100644
--- a/sim/ppc/ld-cache.c
+++ b/sim/ppc/ld-cache.c
@@ -1,6 +1,6 @@
/* This file is part of the program psim.
- Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
+ Copyright 1994, 1995, 1996, 1997, 2003 Andrew Cagney
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -46,6 +46,24 @@ static const name_map cache_type_map[] = {
};
+void
+append_cache_rule (cache_table **table, char *type, char *field_name,
+ char *derived_name, char *type_def,
+ char *expression, table_entry *file_entry)
+{
+ while ((*table) != NULL)
+ table = &(*table)->next;
+ (*table) = ZALLOC(cache_table);
+ (*table)->type = name2i(type, cache_type_map);
+ (*table)->field_name = field_name;
+ (*table)->derived_name = derived_name;
+ (*table)->type_def = (strlen(type_def) > 0 ? type_def : NULL);
+ (*table)->expression = (strlen(expression) > 0 ? expression : NULL);
+ (*table)->file_entry = file_entry;
+ (*table)->next = NULL;
+}
+
+
cache_table *
load_cache_table(char *file_name,
int hi_bit_nr)
@@ -55,19 +73,13 @@ load_cache_table(char *file_name,
cache_table *table = NULL;
cache_table **curr_rule = &table;
while ((entry = table_entry_read(file)) != NULL) {
- cache_table *new_rule = ZALLOC(cache_table);
- new_rule->type = name2i(entry->fields[ca_type], cache_type_map);
- new_rule->field_name = entry->fields[ca_field_name];
- new_rule->derived_name = entry->fields[ca_derived_name];
- new_rule->type_def = (strlen(entry->fields[ca_type_def])
- ? entry->fields[ca_type_def]
- : NULL);
- new_rule->expression = (strlen(entry->fields[ca_expression]) > 0
- ? entry->fields[ca_expression]
- : NULL);
- new_rule->file_entry = entry;
- *curr_rule = new_rule;
- curr_rule = &new_rule->next;
+ append_cache_rule (curr_rule, entry->fields[ca_type],
+ entry->fields[ca_field_name],
+ entry->fields[ca_derived_name],
+ entry->fields[ca_type_def],
+ entry->fields[ca_expression],
+ entry);
+ curr_rule = &(*curr_rule)->next;
}
return table;
}
diff --git a/sim/ppc/ld-cache.h b/sim/ppc/ld-cache.h
index 72e39504380..a3fd0a49b45 100644
--- a/sim/ppc/ld-cache.h
+++ b/sim/ppc/ld-cache.h
@@ -1,6 +1,6 @@
/* This file is part of the program psim.
- Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
+ Copyright 1994, 1995, 1996, 1997, 2003, Andrew Cagney
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -79,3 +79,13 @@ struct _cache_table {
extern cache_table *load_cache_table
(char *file_name,
int hi_bit_nr);
+
+extern void append_cache_rule
+(cache_table **table,
+ char *type,
+ char *field_name,
+ char *derived_name,
+ char *type_def,
+ char *expression,
+ table_entry *file_entry);
+
diff --git a/sim/ppc/ld-insn.c b/sim/ppc/ld-insn.c
index 28b6b559897..e3b1ba579c7 100644
--- a/sim/ppc/ld-insn.c
+++ b/sim/ppc/ld-insn.c
@@ -1,6 +1,6 @@
/* This file is part of the program psim.
- Copyright (C) 1994,1995,1996, Andrew Cagney <cagney@highland.com.au>
+ Copyright 1994, 1995, 1996, 2003 Andrew Cagney
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -332,7 +332,8 @@ insn_table *
load_insn_table(const char *file_name,
decode_table *decode_rules,
filter *filters,
- table_include *includes)
+ table_include *includes,
+ cache_table **cache_rules)
{
table *file = table_open(file_name, nr_insn_table_fields, nr_insn_model_table_fields);
insn_table *table = ZALLOC(insn_table);
@@ -344,6 +345,33 @@ load_insn_table(const char *file_name,
|| it_is("internal", file_entry->fields[insn_flags])) {
insn_table_insert_function(table, file_entry);
}
+ else if ((it_is("function", file_entry->fields[insn_form])
+ || it_is("internal", file_entry->fields[insn_form]))
+ && !is_filtered_out(file_entry->fields[insn_flags], filters)) {
+ /* Ok, this is evil. Need to convert a new style function into
+ an old style function. Construct an old style table and then
+ copy it back. */
+ char *fields[nr_insn_table_fields];
+ memset (fields, 0, sizeof fields);
+ fields[insn_flags] = file_entry->fields[insn_form];
+ fields[function_type] = file_entry->fields[insn_name];
+ fields[function_name] = file_entry->fields[insn_comment];
+ fields[function_param] = file_entry->fields[insn_field_6];
+ memcpy (file_entry->fields, fields,
+ sizeof (fields[0]) * file_entry->nr_fields);
+ insn_table_insert_function(table, file_entry);
+#if 0
+ ":" "..."
+ ":" <filter-flags>
+ ":" <filter-models>
+ ":" <typedef>
+ ":" <name>
+ [ ":" <parameter-list> ]
+ <nl>
+ [ <function-model> ]
+ <code-block>
+#endif
+ }
else if (it_is("model", file_entry->fields[insn_flags])) {
model_table_insert(table, file_entry);
}
@@ -366,6 +394,18 @@ load_insn_table(const char *file_name,
&& !is_filtered_out(file_entry->fields[insn_flags], filters)) {
parse_include_entry (file, file_entry, filters, includes);
}
+ else if ((it_is("cache", file_entry->fields[insn_form])
+ || it_is("compute", file_entry->fields[insn_form])
+ || it_is("scratch", file_entry->fields[insn_form]))
+ && !is_filtered_out(file_entry->fields[insn_flags], filters)) {
+ append_cache_rule (cache_rules,
+ file_entry->fields[insn_form], /* type */
+ file_entry->fields[cache_name],
+ file_entry->fields[cache_derived_name],
+ file_entry->fields[cache_type_def],
+ file_entry->fields[cache_expression],
+ file_entry);
+ }
else {
insn_fields *fields;
/* skip instructions that aren't relevant to the mode */
@@ -930,6 +970,7 @@ main(int argc, char **argv)
filter *filters = NULL;
decode_table *decode_rules = NULL;
insn_table *instructions = NULL;
+ cache_table *cache_rules = NULL;
if (argc != 5)
error("Usage: insn <filter> <hi-bit-nr> <decode-table> <insn-table>\n");
@@ -938,7 +979,8 @@ main(int argc, char **argv)
hi_bit_nr = a2i(argv[2]);
ASSERT(hi_bit_nr < insn_bit_size);
decode_rules = load_decode_table(argv[3], hi_bit_nr);
- instructions = load_insn_table(argv[4], decode_rules, filters, NULL);
+ instructions = load_insn_table(argv[4], decode_rules, filters, NULL,
+ &cache_rules);
insn_table_expand_insns(instructions);
dump_insn_table(instructions, 0, -1);
diff --git a/sim/ppc/ld-insn.h b/sim/ppc/ld-insn.h
index 06bf838b70e..4e1b7f76d19 100644
--- a/sim/ppc/ld-insn.h
+++ b/sim/ppc/ld-insn.h
@@ -1,6 +1,6 @@
/* This file is part of the program psim.
- Copyright (C) 1994,1995,1996, Andrew Cagney <cagney@highland.com.au>
+ Copyright 1994, 1995, 1996, 2003 Andrew Cagney
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -119,6 +119,8 @@ typedef enum {
insn_mnemonic,
insn_name,
insn_comment,
+ insn_field_6,
+ insn_field_7,
nr_insn_table_fields
} insn_table_fields;
@@ -139,6 +141,13 @@ typedef enum {
include_path = insn_name,
} model_include_fields;
+typedef enum {
+ cache_type_def = insn_name,
+ cache_derived_name = insn_comment,
+ cache_name = insn_field_6,
+ cache_expression = insn_field_7,
+} cache_fields;
+
typedef struct _insn insn;
struct _insn {
table_entry *file_entry;
@@ -189,7 +198,8 @@ extern insn_table *load_insn_table
(const char *file_name,
decode_table *decode_rules,
filter *filters,
- table_include *includes);
+ table_include *includes,
+ cache_table **cache_rules);
model *models;
model *last_model;
diff --git a/sim/ppc/ppc-cache-rules b/sim/ppc/ppc-cache-rules
deleted file mode 100644
index 2b5f4722175..00000000000
--- a/sim/ppc/ppc-cache-rules
+++ /dev/null
@@ -1,65 +0,0 @@
-#
-# This file is part of the program psim.
-#
-# Copyright (C) 1994-1995, Andrew Cagney <cagney@highland.com.au>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-cache:RA:RA::
-cache:RA:rA:signed_word *:(cpu_registers(processor)->gpr + RA)
-cache:RA:RA_BITMASK:unsigned32:(1 << RA)
-compute:RA:RA_is_0:int:(RA == 0)
-cache:RT:RT::
-cache:RT:rT:signed_word *:(cpu_registers(processor)->gpr + RT)
-cache:RT:RT_BITMASK:unsigned32:(1 << RT)
-cache:RS:RS::
-cache:RS:rS:signed_word *:(cpu_registers(processor)->gpr + RS)
-cache:RS:RS_BITMASK:unsigned32:(1 << RS)
-cache:RB:RB::
-cache:RB:rB:signed_word *:(cpu_registers(processor)->gpr + RB)
-cache:RB:RB_BITMASK:unsigned32:(1 << RB)
-scratch:FRA:FRA::
-cache:FRA:frA:unsigned64 *:(cpu_registers(processor)->fpr + FRA)
-cache:FRA:FRA_BITMASK:unsigned32:(1 << FRA)
-scratch:FRB:FRB::
-cache:FRB:frB:unsigned64 *:(cpu_registers(processor)->fpr + FRB)
-cache:FRB:FRB_BITMASK:unsigned32:(1 << FRB)
-scratch:FRC:FRC::
-cache:FRC:frC:unsigned64 *:(cpu_registers(processor)->fpr + FRC)
-cache:FRC:FRC_BITMASK:unsigned32:(1 << FRC)
-scratch:FRS:FRS::
-cache:FRS:frS:unsigned64 *:(cpu_registers(processor)->fpr + FRS)
-cache:FRS:FRS_BITMASK:unsigned32:(1 << FRS)
-scratch:FRT:FRT::
-cache:FRT:frT:unsigned64 *:(cpu_registers(processor)->fpr + FRT)
-cache:FRT:FRT_BITMASK:unsigned32:(1 << FRT)
-cache:SI:EXTS_SI:unsigned_word:((signed_word)(signed16)instruction)
-scratch:BI:BI::
-cache:BI:BIT32_BI::BIT32(BI)
-cache:BF:BF::
-cache:BF:BF_BITMASK:unsigned32:(1 << BF)
-scratch:BA:BA::
-cache:BA:BIT32_BA::BIT32(BA)
-cache:BA:BA_BITMASK:unsigned32:(1 << BA)
-scratch:BB:BB::
-cache:BB:BIT32_BB::BIT32(BB)
-cache:BB:BB_BITMASK:unsigned32:(1 << BB)
-cache:BT:BT::
-cache:BT:BT_BITMASK:unsigned32:(1 << BT)
-cache:BD:EXTS_BD_0b00:unsigned_word:(((signed_word)(signed16)instruction) & ~3)
-cache:LI:EXTS_LI_0b00:unsigned_word:((((signed_word)(signed32)(instruction << 6)) >> 6) & ~0x3)
-cache:D:EXTS_D:unsigned_word:((signed_word)(signed16)(instruction))
-cache:DS:EXTS_DS_0b00:unsigned_word:(((signed_word)(signed16)instruction) & ~0x3)
-#compute:SPR:SPR_is_256:int:(SPR == 256)
diff --git a/sim/ppc/ppc-instructions b/sim/ppc/ppc-instructions
index 6ba0090cac1..a930dc81c14 100644
--- a/sim/ppc/ppc-instructions
+++ b/sim/ppc/ppc-instructions
@@ -1,7 +1,7 @@
#
# This file is part of the program psim.
#
-# Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
+# Copyright 1994, 1995, 1996, 1997, 2003 Andrew Cagney
#
# --
#
@@ -33,6 +33,53 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
+
+:cache::::RA:RA:
+:cache:::signed_word *:rA:RA:(cpu_registers(processor)->gpr + RA)
+:cache:::unsigned32:RA_BITMASK:RA:(1 << RA)
+:compute:::int:RA_is_0:RA:(RA == 0)
+:cache::::RT:RT:
+:cache:::signed_word *:rT:RT:(cpu_registers(processor)->gpr + RT)
+:cache:::unsigned32:RT_BITMASK:RT:(1 << RT)
+:cache::::RS:RS:
+:cache:::signed_word *:rS:RS:(cpu_registers(processor)->gpr + RS)
+:cache:::unsigned32:RS_BITMASK:RS:(1 << RS)
+:cache::::RB:RB:
+:cache:::signed_word *:rB:RB:(cpu_registers(processor)->gpr + RB)
+:cache:::unsigned32:RB_BITMASK:RB:(1 << RB)
+:scratch::::FRA:FRA:
+:cache:::unsigned64 *:frA:FRA:(cpu_registers(processor)->fpr + FRA)
+:cache:::unsigned32:FRA_BITMASK:FRA:(1 << FRA)
+:scratch::::FRB:FRB:
+:cache:::unsigned64 *:frB:FRB:(cpu_registers(processor)->fpr + FRB)
+:cache:::unsigned32:FRB_BITMASK:FRB:(1 << FRB)
+:scratch::::FRC:FRC:
+:cache:::unsigned64 *:frC:FRC:(cpu_registers(processor)->fpr + FRC)
+:cache:::unsigned32:FRC_BITMASK:FRC:(1 << FRC)
+:scratch::::FRS:FRS:
+:cache:::unsigned64 *:frS:FRS:(cpu_registers(processor)->fpr + FRS)
+:cache:::unsigned32:FRS_BITMASK:FRS:(1 << FRS)
+:scratch::::FRT:FRT:
+:cache:::unsigned64 *:frT:FRT:(cpu_registers(processor)->fpr + FRT)
+:cache:::unsigned32:FRT_BITMASK:FRT:(1 << FRT)
+:cache:::unsigned_word:EXTS_SI:SI:((signed_word)(signed16)instruction)
+:scratch::::BI:BI:
+:cache::::BIT32_BI:BI:BIT32(BI)
+:cache::::BF:BF:
+:cache:::unsigned32:BF_BITMASK:BF:(1 << BF)
+:scratch::::BA:BA:
+:cache::::BIT32_BA:BA:BIT32(BA)
+:cache:::unsigned32:BA_BITMASK:BA:(1 << BA)
+:scratch::::BB:BB:
+:cache::::BIT32_BB:BB:BIT32(BB)
+:cache:::unsigned32:BB_BITMASK:BB:(1 << BB)
+:cache::::BT:BT:
+:cache:::unsigned32:BT_BITMASK:BT:(1 << BT)
+:cache:::unsigned_word:EXTS_BD_0b00:BD:(((signed_word)(signed16)instruction) & ~3)
+:cache:::unsigned_word:EXTS_LI_0b00:LI:((((signed_word)(signed32)(instruction << 6)) >> 6) & ~0x3)
+:cache:::unsigned_word:EXTS_D:D:((signed_word)(signed16)(instruction))
+:cache:::unsigned_word:EXTS_DS_0b00:DS:(((signed_word)(signed16)instruction) & ~0x3)
+#:compute:::int:SPR_is_256:SPR:(SPR == 256)
# PowerPC models
::model:604:ppc604: PPC_UNIT_BAD, PPC_UNIT_BAD, 1, 1, 0
@@ -151,6 +198,8 @@
unsigned32 fp_busy; /* floating point registers that are busy */
unsigned32 cr_fpscr_busy; /* CR/FPSCR registers that are busy */
signed16 spr_busy; /* SPR register that is busy or PPC_NO_SPR */
+ unsigned32 vr_busy; /* AltiVec registers that are busy */
+ signed16 vscr_busy; /* AltiVec status register busy */
signed16 issue; /* # of cycles until unit can accept another insn */
signed16 done; /* # of cycles until insn is done */
signed16 nr_writebacks; /* # of registers this unit writes back */
@@ -181,6 +230,8 @@
unsigned32 fp_busy; /* floating point registers that are busy */
unsigned32 cr_fpscr_busy; /* CR/FPSCR registers that are busy */
unsigned8 spr_busy[nr_of_sprs]; /* SPR registers that are busy */
+ unsigned32 vr_busy; /* AltiVec registers that are busy */
+ unsigned8 vscr_busy; /* AltiVec SC register busy */
unsigned8 busy[nr_ppc_function_units]; /* whether a function is busy or not */
};
@@ -273,6 +324,15 @@ void::model-static::model_trace_release:model_data *model_ptr, model_busy *busy
}
if (busy->spr_busy != PPC_NO_SPR)
TRACE(trace_model, ("Register %s is now available.\n", spr_name(busy->spr_busy)));
+ if (busy->vr_busy) {
+ for(i = 0; i < 32; i++) {
+ if (((1 << i) & busy->vr_busy) != 0) {
+ TRACE(trace_model, ("Register v%d is now available.\n", i));
+ }
+ }
+ }
+ if (busy->vscr_busy)
+ TRACE(trace_model, ("VSCR Register is now available.\n", spr_name(busy->spr_busy)));
# Trace making registers busy
void::model-static::model_trace_make_busy:model_data *model_ptr, unsigned32 int_mask, unsigned32 fp_mask, unsigned32 cr_mask
@@ -351,6 +411,8 @@ void::model-internal::model_new_cycle:model_data *model_ptr
model_ptr->cr_fpscr_busy &= ~cur_busy->cr_fpscr_busy;
if (cur_busy->spr_busy != PPC_NO_SPR)
model_ptr->spr_busy[cur_busy->spr_busy] = 0;
+ model_ptr->vr_busy &= ~cur_busy->vr_busy;
+ model_ptr->vscr_busy = ~cur_busy->vscr_busy;
if (WITH_TRACE && ppc_trace[trace_model])
model_trace_release(model_ptr, cur_busy);
@@ -407,6 +469,8 @@ model_busy *::model-internal::model_make_busy:model_data *model_ptr, ppc_functio
busy->fp_busy = 0;
busy->cr_fpscr_busy = 0;
busy->nr_writebacks = 0;
+ busy->vr_busy = 0;
+ busy->vscr_busy = 0;
}
busy->unit = unit;
@@ -2256,6 +2320,7 @@ void::function::invalid_zero_divide_operation:cpu *processor, unsigned_word cia,
GPR(r) = 0;
}
GPR(r) |= INSERTED(MEM(unsigned, EA, 1), i, i+7);
+ i = i + 8;
if (i == 64) i = 32;
EA = EA + 1;
n = n - 1;
@@ -4925,3 +4990,6 @@ void::function::invalid_zero_divide_operation:cpu *processor, unsigned_word cia,
0.31,6.RT,11.RA,16.RB,21.310,31./:X:earwax::External Control In Word Indexed
0.31,6.RS,11.RA,16.RB,21.438,31./:X:earwax::External Control Out Word Indexed
+
+:include:::altivec.igen
+:include:::e500.igen
diff --git a/sim/ppc/ppc-spr-table b/sim/ppc/ppc-spr-table
index 373fb6b50e1..221ccbeacf0 100644
--- a/sim/ppc/ppc-spr-table
+++ b/sim/ppc/ppc-spr-table
@@ -31,6 +31,7 @@ DEC:22:0:0
SDR1:25:0:0
SRR0:26:0:0
SRR1:27:0:0
+VRSAVE:256:0:0
SPRG0:272:0:0
SPRG1:273:0:0
SPRG2:274:0:0
@@ -39,6 +40,7 @@ EAR:282:0:0
TBL:284:0:0
TBU:285:0:0
PVR:287:0:0
+SPEFSCR:512:0:0
IBAT0U:528:0:0
IBAT0L:529:0:0
IBAT1U:530:0:0
diff --git a/sim/ppc/psim.c b/sim/ppc/psim.c
index 76bb4523342..c20effb6f59 100644
--- a/sim/ppc/psim.c
+++ b/sim/ppc/psim.c
@@ -1,6 +1,6 @@
/* This file is part of the program psim.
- Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
+ Copyright 1994, 1995, 1996, 1997, 2003 Andrew Cagney
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -729,7 +729,8 @@ psim_stack(psim *system,
"/openprom/init/stack");
if (stack_device != (device*)0) {
unsigned_word stack_pointer;
- psim_read_register(system, 0, &stack_pointer, "sp", cooked_transfer);
+ ASSERT (psim_read_register(system, 0, &stack_pointer, "sp",
+ cooked_transfer) > 0);
device_ioctl(stack_device,
NULL, /*cpu*/
0, /*cia*/
@@ -766,7 +767,7 @@ psim_run(psim *system)
/* storage manipulation functions */
INLINE_PSIM\
-(void)
+(int)
psim_read_register(psim *system,
int which_cpu,
void *buf,
@@ -774,7 +775,7 @@ psim_read_register(psim *system,
transfer_mode mode)
{
register_descriptions description;
- char cooked_buf[sizeof(unsigned_8)];
+ char *cooked_buf;
cpu *processor;
/* find our processor */
@@ -792,7 +793,8 @@ psim_read_register(psim *system,
/* find the register description */
description = register_description(reg);
if (description.type == reg_invalid)
- error("psim_read_register() invalid register name `%s'\n", reg);
+ return 0;
+ cooked_buf = alloca (description.size);
/* get the cooked value */
switch (description.type) {
@@ -846,6 +848,30 @@ psim_read_register(psim *system,
*(unsigned_word*)cooked_buf = model_get_number_of_cycles(cpu_model(processor));
break;
+#ifdef WITH_ALTIVEC
+ case reg_vr:
+ *(vreg*)cooked_buf = cpu_registers(processor)->altivec.vr[description.index];
+ break;
+
+ case reg_vscr:
+ *(vscreg*)cooked_buf = cpu_registers(processor)->altivec.vscr;
+ break;
+#endif
+
+#ifdef WITH_E500
+ case reg_gprh:
+ *(gpreg*)cooked_buf = cpu_registers(processor)->e500.gprh[description.index];
+ break;
+
+ case reg_evr:
+ *(unsigned64*)cooked_buf = EVR(description.index);
+ break;
+
+ case reg_acc:
+ *(accreg*)cooked_buf = cpu_registers(processor)->e500.acc;
+ break;
+#endif
+
default:
printf_filtered("psim_read_register(processor=0x%lx,buf=0x%lx,reg=%s) %s\n",
(unsigned long)processor, (unsigned long)buf, reg,
@@ -871,18 +897,34 @@ psim_read_register(psim *system,
case 8:
*(unsigned_8*)buf = H2T_8(*(unsigned_8*)cooked_buf);
break;
+#ifdef WITH_ALTIVEC
+ case 16:
+ if (CURRENT_HOST_BYTE_ORDER != CURRENT_TARGET_BYTE_ORDER)
+ {
+ union { vreg v; unsigned_8 d[2]; } h, t;
+ memcpy(&h.v/*dest*/, cooked_buf/*src*/, description.size);
+ { _SWAP_8(t.d[0] =, h.d[1]); }
+ { _SWAP_8(t.d[1] =, h.d[0]); }
+ memcpy(buf/*dest*/, &t/*src*/, description.size);
+ break;
+ }
+ else
+ memcpy(buf/*dest*/, cooked_buf/*src*/, description.size);
+ break;
+#endif
}
}
else {
memcpy(buf/*dest*/, cooked_buf/*src*/, description.size);
}
+ return description.size;
}
INLINE_PSIM\
-(void)
+(int)
psim_write_register(psim *system,
int which_cpu,
const void *buf,
@@ -891,7 +933,7 @@ psim_write_register(psim *system,
{
cpu *processor;
register_descriptions description;
- char cooked_buf[sizeof(unsigned_8)];
+ char *cooked_buf;
/* find our processor */
if (which_cpu == MAX_NR_PROCESSORS) {
@@ -901,21 +943,23 @@ psim_write_register(psim *system,
else
which_cpu = system->last_cpu;
}
+
+ /* find the description of the register */
+ description = register_description(reg);
+ if (description.type == reg_invalid)
+ return 0;
+ cooked_buf = alloca (description.size);
+
if (which_cpu == -1) {
int i;
for (i = 0; i < system->nr_cpus; i++)
psim_write_register(system, i, buf, reg, mode);
- return;
+ return description.size;
}
ASSERT(which_cpu >= 0 && which_cpu < system->nr_cpus);
processor = system->processors[which_cpu];
- /* find the description of the register */
- description = register_description(reg);
- if (description.type == reg_invalid)
- error("psim_write_register() invalid register name %s\n", reg);
-
/* If the data is comming in raw (target order), need to cook it
into host order before putting it into PSIM's internal structures */
if (mode == raw_transfer) {
@@ -932,6 +976,20 @@ psim_write_register(psim *system,
case 8:
*(unsigned_8*)cooked_buf = T2H_8(*(unsigned_8*)buf);
break;
+#ifdef WITH_ALTIVEC
+ case 16:
+ if (CURRENT_HOST_BYTE_ORDER != CURRENT_TARGET_BYTE_ORDER)
+ {
+ union { vreg v; unsigned_8 d[2]; } h, t;
+ memcpy(&t.v/*dest*/, buf/*src*/, description.size);
+ { _SWAP_8(h.d[0] =, t.d[1]); }
+ { _SWAP_8(h.d[1] =, t.d[0]); }
+ memcpy(cooked_buf/*dest*/, &h/*src*/, description.size);
+ break;
+ }
+ else
+ memcpy(cooked_buf/*dest*/, buf/*src*/, description.size);
+#endif
}
}
else {
@@ -973,6 +1031,35 @@ psim_write_register(psim *system,
cpu_registers(processor)->fpscr = *(fpscreg*)cooked_buf;
break;
+#ifdef WITH_E500
+ case reg_gprh:
+ cpu_registers(processor)->e500.gprh[description.index] = *(gpreg*)cooked_buf;
+ break;
+
+ case reg_evr:
+ {
+ unsigned64 v;
+ v = *(unsigned64*)cooked_buf;
+ cpu_registers(processor)->e500.gprh[description.index] = v >> 32;
+ cpu_registers(processor)->gpr[description.index] = v;
+ break;
+ }
+
+ case reg_acc:
+ cpu_registers(processor)->e500.acc = *(accreg*)cooked_buf;
+ break;
+#endif
+
+#ifdef WITH_ALTIVEC
+ case reg_vr:
+ cpu_registers(processor)->altivec.vr[description.index] = *(vreg*)cooked_buf;
+ break;
+
+ case reg_vscr:
+ cpu_registers(processor)->altivec.vscr = *(vscreg*)cooked_buf;
+ break;
+#endif
+
default:
printf_filtered("psim_write_register(processor=0x%lx,cooked_buf=0x%lx,reg=%s) %s\n",
(unsigned long)processor, (unsigned long)cooked_buf, reg,
@@ -981,6 +1068,7 @@ psim_write_register(psim *system,
}
+ return description.size;
}
diff --git a/sim/ppc/psim.h b/sim/ppc/psim.h
index f0cf3a5d8b4..8c1c9209039 100644
--- a/sim/ppc/psim.h
+++ b/sim/ppc/psim.h
@@ -138,21 +138,24 @@ extern event_queue *psim_event_queue
-/* manipulate the state (registers or memory) of a processor within
+/* Manipulate the state (registers or memory) of a processor within
the system. In the case of memory, the read/write is performed
using the specified processors address translation tables.
Where applicable, WHICH_CPU == -1 indicates all processors and
- WHICH_CPU == <nr_cpus> indicates the `current' processor. */
+ WHICH_CPU == <nr_cpus> indicates the `current' processor.
-extern void psim_read_register
+ The register functions return the size of the register, or 0 if the
+ register's name is not recognized. */
+
+extern int psim_read_register
(psim *system,
int which_cpu,
void *host_ordered_buf,
const char reg[],
transfer_mode mode);
-extern void psim_write_register
+extern int psim_write_register
(psim *system,
int which_cpu,
const void *buf,
diff --git a/sim/ppc/registers.c b/sim/ppc/registers.c
index 2181cedd94a..832360103f7 100644
--- a/sim/ppc/registers.c
+++ b/sim/ppc/registers.c
@@ -150,6 +150,35 @@ register_description(const char reg[])
description.index = spr_ctr;
description.size = sizeof(unsigned_word);
}
+#ifdef WITH_ALTIVEC
+ else if (reg[0] == 'v' && reg[1] == 'r' && are_digits(reg + 2)) {
+ description.type = reg_vr;
+ description.index = atoi(reg+2);
+ description.size = sizeof(vreg);
+ }
+ else if (!strcmp(reg, "vscr")) {
+ description.type = reg_vscr;
+ description.index = 0;
+ description.size = sizeof(vscreg);
+ }
+#endif
+#ifdef WITH_E500
+ else if (reg[0] == 'e' && reg[1] == 'v' && are_digits(reg + 2)) {
+ description.type = reg_evr;
+ description.index = atoi(reg+2);
+ description.size = sizeof(unsigned64);
+ }
+ else if (reg[0] == 'r' && reg[1] == 'h' && are_digits(reg + 2)) {
+ description.type = reg_gprh;
+ description.index = atoi(reg+2);
+ description.size = sizeof(gpreg);
+ }
+ else if (!strcmp(reg, "acc")) {
+ description.type = reg_acc;
+ description.index = 0;
+ description.size = sizeof(unsigned64);
+ }
+#endif
else {
sprs spr = find_spr(reg);
if (spr != nr_of_sprs) {
diff --git a/sim/ppc/registers.h b/sim/ppc/registers.h
index 4da6ea4bbe6..15c9d43c9d6 100644
--- a/sim/ppc/registers.h
+++ b/sim/ppc/registers.h
@@ -1,6 +1,6 @@
/* This file is part of the program psim.
- Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
+ Copyright 1994, 1997, 2003 Andrew Cagney
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -28,6 +28,19 @@
*
*/
+/* FIXME:
+
+ For the moment use macro's to determine if the E500 or Altivec
+ registers should be included. IGEN should instead of a :register:
+ field to facilitate the specification and generation of per ISA
+ registers. */
+
+#ifdef WITH_E500
+#include "e500_registers.h"
+#endif
+#if WITH_ALTIVEC
+#include "altivec_registers.h"
+#endif
/**
** General Purpose Registers
@@ -228,7 +241,6 @@ enum {
srr1_subsequent_instruction = BIT(47)
};
-
/**
** storage interrupt registers
**/
@@ -264,8 +276,14 @@ typedef struct _registers {
/* Segment Registers */
sreg sr[nr_of_srs];
-} registers;
+#if WITH_ALTIVEC
+ struct altivec_regs altivec;
+#endif
+#if WITH_E500
+ struct e500_regs e500;
+#endif
+} registers;
/* dump out all the registers */
@@ -281,6 +299,12 @@ typedef enum {
reg_gpr, reg_fpr, reg_spr, reg_msr,
reg_cr, reg_fpscr, reg_pc, reg_sr,
reg_insns, reg_stalls, reg_cycles,
+#ifdef WITH_ALTIVEC
+ reg_vr, reg_vscr,
+#endif
+#ifdef WITH_E500
+ reg_acc, reg_gprh, reg_evr,
+#endif
nr_register_types
} register_types;
diff --git a/sim/ppc/sim_calls.c b/sim/ppc/sim_calls.c
index 22aa21b18dd..040ce833202 100644
--- a/sim/ppc/sim_calls.c
+++ b/sim/ppc/sim_calls.c
@@ -1,6 +1,6 @@
/* This file is part of the program psim.
- Copyright (C) 1994-1996,1998, Andrew Cagney <cagney@highland.com.au>
+ Copyright 1994, 1995, 1996, 1998, 2003 Andrew Cagney
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -180,7 +180,7 @@ sim_write (SIM_DESC sd, SIM_ADDR mem, unsigned char *buf, int length)
int
sim_fetch_register (SIM_DESC sd, int regno, unsigned char *buf, int length)
{
- char *regname;
+ const char *regname;
if (simulator == NULL) {
return 0;
@@ -194,43 +194,33 @@ sim_fetch_register (SIM_DESC sd, int regno, unsigned char *buf, int length)
But there are loops that just walk through the entire list of
names and try to get everything. */
regname = gdbarch_register_name (current_gdbarch, regno);
- /* FIXME: ezannoni 2002/04/15 Remove the 'vr' and 'vscr' check
- once AltiVec support is committed. */
- if (! regname || regname[0] == '\0'
- || (regname[0] == 'v' && regname[1] == 'r')
- || (strcmp (regname, "vscr") == 0))
+ if (! regname || regname[0] == '\0')
return -1;
TRACE(trace_gdb, ("sim_fetch_register(regno=%d(%s), buf=0x%lx)\n",
regno, regname, (long)buf));
- psim_read_register(simulator, MAX_NR_PROCESSORS,
- buf, regname, raw_transfer);
- return -1;
+ return psim_read_register(simulator, MAX_NR_PROCESSORS,
+ buf, regname, raw_transfer);
}
int
sim_store_register (SIM_DESC sd, int regno, unsigned char *buf, int length)
{
- char *regname;
+ const char *regname;
if (simulator == NULL)
return 0;
/* See comments in sim_fetch_register, above. */
regname = gdbarch_register_name (current_gdbarch, regno);
- /* FIXME: ezannoni 2002/04/15 Remove the 'vr' and 'vscr' check
- once AltiVec support is committed. */
- if (! regname || regname[0] == '\0'
- || (regname[0] == 'v' && regname[1] == 'r')
- || (strcmp (regname, "vscr") == 0))
+ if (! regname || regname[0] == '\0')
return -1;
TRACE(trace_gdb, ("sim_store_register(regno=%d(%s), buf=0x%lx)\n",
regno, regname, (long)buf));
- psim_write_register(simulator, MAX_NR_PROCESSORS,
- buf, regname, raw_transfer);
- return -1;
+ return psim_write_register(simulator, MAX_NR_PROCESSORS,
+ buf, regname, raw_transfer);
}
@@ -263,8 +253,8 @@ sim_create_inferior (SIM_DESC sd,
psim_init(simulator);
psim_stack(simulator, argv, envp);
- psim_write_register(simulator, -1 /* all start at same PC */,
- &entry_point, "pc", cooked_transfer);
+ ASSERT (psim_write_register(simulator, -1 /* all start at same PC */,
+ &entry_point, "pc", cooked_transfer) > 0);
return SIM_RC_OK;
}