aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog16
-rw-r--r--Makefile.in20
-rw-r--r--bfd/ChangeLog331
-rw-r--r--bfd/Makefile.am39
-rw-r--r--bfd/Makefile.in41
-rw-r--r--bfd/archures.c25
-rw-r--r--bfd/bfd-in2.h33
-rw-r--r--bfd/bfd.c159
-rw-r--r--bfd/coff-h8300.c97
-rw-r--r--bfd/coff-stgo32.c99
-rw-r--r--bfd/coff-tic4x.c26
-rw-r--r--bfd/coffcode.h2
-rw-r--r--bfd/config.bfd40
-rwxr-xr-xbfd/configure76
-rw-r--r--bfd/configure.in48
-rw-r--r--bfd/doc/Makefile.in2
-rw-r--r--bfd/elf-bfd.h105
-rw-r--r--bfd/elf-eh-frame.c196
-rw-r--r--bfd/elf.c57
-rw-r--r--bfd/elf32-arm.h21
-rw-r--r--bfd/elf32-cris.c3
-rw-r--r--bfd/elf32-h8300.c217
-rw-r--r--bfd/elf32-i386.c17
-rw-r--r--bfd/elf32-ppc.c21
-rw-r--r--bfd/elf32-qnx.c92
-rw-r--r--bfd/elf32-qnx.h32
-rw-r--r--bfd/elf32-sh.c23
-rw-r--r--bfd/elf32-sh64-com.c2
-rw-r--r--bfd/elf32-v850.c8
-rw-r--r--bfd/elf64-mips.c25
-rw-r--r--bfd/elf64-mmix.c5
-rw-r--r--bfd/elf64-ppc.c82
-rw-r--r--bfd/elf64-ppc.h2
-rw-r--r--bfd/elf64-sparc.c29
-rw-r--r--bfd/elfarm-nabi.c23
-rw-r--r--bfd/elfcode.h60
-rw-r--r--bfd/elfcore.h46
-rw-r--r--bfd/elflink.h238
-rw-r--r--bfd/elfxx-ia64.c6
-rw-r--r--bfd/elfxx-target.h12
-rw-r--r--bfd/format.c54
-rw-r--r--bfd/libbfd-in.h3
-rw-r--r--bfd/libbfd.h3
-rw-r--r--bfd/po/SRC-POTFILES.in9
-rw-r--r--bfd/po/da.po340
-rw-r--r--bfd/reloc.c27
-rw-r--r--bfd/reloc16.c71
-rw-r--r--bfd/simple.c15
-rw-r--r--bfd/targets.c71
-rw-r--r--bfd/version.h2
-rw-r--r--bfd/vms-gsd.c8
-rw-r--r--bfd/vms.c2
-rw-r--r--config/ChangeLog6
-rw-r--r--config/mpw-mh-mpw157
-rw-r--r--config/mpw/ChangeLog53
-rw-r--r--config/mpw/MoveIfChange19
-rw-r--r--config/mpw/README23
-rw-r--r--config/mpw/forward-include3
-rw-r--r--config/mpw/g-mpw-make.sed293
-rw-r--r--config/mpw/mpw-touch7
-rw-r--r--config/mpw/mpw-true1
-rw-r--r--config/mpw/null-command1
-rw-r--r--config/mpw/open-brace4
-rw-r--r--config/mpw/tr-7to8-src9
-rw-r--r--config/mpw/true1
-rw-r--r--configure.in2
-rw-r--r--gdb/ChangeLog891
-rw-r--r--gdb/MAINTAINERS1
-rw-r--r--gdb/Makefile.in73
-rw-r--r--gdb/PROBLEMS15
-rw-r--r--gdb/a68v-nat.c26
-rw-r--r--gdb/ada-lang.c7
-rw-r--r--gdb/alpha-nat.c26
-rw-r--r--gdb/alpha-tdep.c2
-rw-r--r--gdb/arch-utils.c2
-rw-r--r--gdb/arm-tdep.c12
-rw-r--r--gdb/blockframe.c858
-rw-r--r--gdb/breakpoint.c2
-rw-r--r--gdb/breakpoint.h11
-rw-r--r--gdb/buildsym.c14
-rw-r--r--gdb/buildsym.h3
-rw-r--r--gdb/c-exp.y2
-rw-r--r--gdb/cli/cli-cmds.c97
-rw-r--r--gdb/coffread.c25
-rw-r--r--gdb/complaints.c2
-rw-r--r--gdb/complaints.h18
-rw-r--r--gdb/config.in5
-rw-r--r--gdb/config/djgpp/fnchange.lst13
-rw-r--r--gdb/config/h8500/tm-h8500.h12
-rw-r--r--gdb/config/i386/i386v42mp.mt2
-rw-r--r--gdb/config/i386/nm-i386v42mp.h69
-rw-r--r--gdb/config/i386/nm-linux.h3
-rw-r--r--gdb/config/i386/nm-ptx4.h2
-rw-r--r--gdb/config/i386/nm-symmetry.h2
-rw-r--r--gdb/config/i386/tm-i386v42mp.h93
-rw-r--r--gdb/config/m32r/tm-m32r.h4
-rw-r--r--gdb/config/m68k/nm-sun3.h2
-rw-r--r--gdb/config/m68k/tm-delta68.h4
-rw-r--r--gdb/config/m68k/tm-linux.h6
-rw-r--r--gdb/config/mn10200/tm-mn10200.h8
-rw-r--r--gdb/config/nm-gnu.h2
-rw-r--r--gdb/config/nm-m3.h2
-rw-r--r--gdb/config/pa/tm-hppa.h131
-rw-r--r--gdb/config/pa/tm-hppa64.h10
-rw-r--r--gdb/config/sparc/nm-nbsd.h2
-rw-r--r--gdb/config/sparc/nm-sun4os4.h2
-rw-r--r--gdb/config/sparc/nm-sun4sol2.h2
-rw-r--r--gdb/config/sparc/tm-sparc.h11
-rw-r--r--gdb/config/sparc/tm-sparclet.h8
-rw-r--r--gdb/config/z8k/tm-z8k.h11
-rwxr-xr-xgdb/configure167
-rw-r--r--gdb/configure.in17
-rw-r--r--gdb/core-sol2.c30
-rw-r--r--gdb/corelow.c2
-rw-r--r--gdb/cris-tdep.c13
-rw-r--r--gdb/d10v-tdep.c19
-rw-r--r--gdb/dbxread.c22
-rw-r--r--gdb/doc/ChangeLog5
-rw-r--r--gdb/doc/gdbint.texinfo6
-rw-r--r--gdb/dwarf2cfi.c105
-rw-r--r--gdb/dwarf2read.c83
-rw-r--r--gdb/dwarfread.c46
-rw-r--r--gdb/elfread.c8
-rw-r--r--gdb/event-loop.c7
-rw-r--r--gdb/event-top.c33
-rw-r--r--gdb/f-exp.y3
-rw-r--r--gdb/findvar.c9
-rw-r--r--gdb/frame.c698
-rw-r--r--gdb/frame.h210
-rw-r--r--gdb/frv-tdep.c5
-rw-r--r--gdb/gdb_thread_db.h3
-rw-r--r--gdb/gdbarch.c90
-rw-r--r--gdb/gdbarch.h69
-rwxr-xr-xgdb/gdbarch.sh8
-rw-r--r--gdb/gdbtypes.c10
-rw-r--r--gdb/gdbtypes.h35
-rw-r--r--gdb/gnu-nat.c32
-rw-r--r--gdb/go32-nat.c4
-rw-r--r--gdb/h8300-tdep.c84
-rw-r--r--gdb/h8500-tdep.c115
-rw-r--r--gdb/hp300ux-nat.c2
-rw-r--r--gdb/hppa-tdep.c298
-rw-r--r--gdb/hppab-nat.c4
-rw-r--r--gdb/hppah-nat.c6
-rw-r--r--gdb/hppam3-nat.c6
-rw-r--r--gdb/hpread.c31
-rw-r--r--gdb/hpux-thread.c9
-rw-r--r--gdb/i386-linux-nat.c198
-rw-r--r--gdb/i386-linux-tdep.c32
-rw-r--r--gdb/i386-tdep.c144
-rw-r--r--gdb/i386-tdep.h25
-rw-r--r--gdb/i386gnu-nat.c8
-rw-r--r--gdb/i386v-nat.c2
-rw-r--r--gdb/i387-tdep.c61
-rw-r--r--gdb/ia64-aix-nat.c16
-rw-r--r--gdb/ia64-linux-nat.c4
-rw-r--r--gdb/ia64-tdep.c14
-rw-r--r--gdb/infcmd.c146
-rw-r--r--gdb/infptrace.c31
-rw-r--r--gdb/irix4-nat.c16
-rw-r--r--gdb/irix5-nat.c20
-rw-r--r--gdb/lin-lwp.c7
-rw-r--r--gdb/lynx-nat.c38
-rw-r--r--gdb/m2-exp.y2
-rw-r--r--gdb/m68hc11-tdep.c4
-rw-r--r--gdb/m68k-tdep.c21
-rw-r--r--gdb/m68knbsd-nat.c14
-rw-r--r--gdb/macroscope.c43
-rw-r--r--gdb/macrotab.c8
-rw-r--r--gdb/macrotab.h9
-rw-r--r--gdb/mcore-tdep.c5
-rw-r--r--gdb/mdebugread.c64
-rw-r--r--gdb/mi/ChangeLog24
-rw-r--r--gdb/mi/gdbmi.texinfo16
-rw-r--r--gdb/mi/mi-cmd-var.c2
-rw-r--r--gdb/mi/mi-main.c32
-rw-r--r--gdb/mips-linux-nat.c4
-rw-r--r--gdb/mips-linux-tdep.c8
-rw-r--r--gdb/mips-nat.c2
-rw-r--r--gdb/mips-tdep.c27
-rw-r--r--gdb/mipsm3-nat.c16
-rw-r--r--gdb/mipsv4-nat.c14
-rw-r--r--gdb/mn10300-tdep.c8
-rw-r--r--gdb/monitor.c39
-rw-r--r--gdb/ns32k-tdep.c5
-rw-r--r--gdb/ns32knbsd-nat.c10
-rw-r--r--gdb/objc-lang.c4
-rw-r--r--gdb/p-exp.y8
-rw-r--r--gdb/ppc-bdm.c36
-rw-r--r--gdb/ppc-sysv-tdep.c12
-rw-r--r--gdb/printcmd.c120
-rw-r--r--gdb/ptx4-nat.c2
-rw-r--r--gdb/regcache.c496
-rw-r--r--gdb/regcache.h99
-rw-r--r--gdb/remote-array.c37
-rw-r--r--gdb/remote-e7000.c35
-rw-r--r--gdb/remote-es.c100
-rw-r--r--gdb/remote-mips.c2
-rw-r--r--gdb/remote-rdi.c2
-rw-r--r--gdb/remote-rdp.c38
-rw-r--r--gdb/remote-sds.c6
-rw-r--r--gdb/remote-sim.c37
-rw-r--r--gdb/remote-st.c37
-rw-r--r--gdb/remote-vx.c4
-rw-r--r--gdb/remote-vx68.c32
-rw-r--r--gdb/remote-vxmips.c38
-rw-r--r--gdb/remote-vxsparc.c37
-rw-r--r--gdb/remote.c3
-rw-r--r--gdb/rs6000-tdep.c34
-rw-r--r--gdb/s390-tdep.c22
-rw-r--r--gdb/sh-tdep.c31
-rw-r--r--gdb/sol-thread.c27
-rw-r--r--gdb/sparc-nat.c116
-rw-r--r--gdb/sparc-tdep.c249
-rw-r--r--gdb/stabsread.c60
-rw-r--r--gdb/stabsread.h4
-rw-r--r--gdb/stack.c6
-rw-r--r--gdb/sun3-nat.c31
-rw-r--r--gdb/symm-nat.c78
-rw-r--r--gdb/symtab.c178
-rw-r--r--gdb/symtab.h7
-rw-r--r--gdb/target.c3
-rw-r--r--gdb/target.h16
-rw-r--r--gdb/testsuite/ChangeLog11
-rw-r--r--gdb/testsuite/gdb.asm/asm-source.exp2
-rw-r--r--gdb/testsuite/gdb.chill/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.chill/chexp.exp900
-rw-r--r--gdb/testsuite/gdb.chill/pr-5016.exp1
-rw-r--r--gdb/testsuite/gdb.mi/ChangeLog31
-rw-r--r--gdb/testsuite/gdb.mi/mi-console.exp17
-rw-r--r--gdb/testsuite/gdb.mi/mi-disassemble.exp50
-rw-r--r--gdb/testsuite/gdb.mi/mi-eval.exp45
-rw-r--r--gdb/testsuite/gdb.mi/mi-read-memory.exp18
-rw-r--r--gdb/testsuite/gdb.mi/mi-regs.exp50
-rw-r--r--gdb/testsuite/gdb.mi/mi-return.exp36
-rw-r--r--gdb/testsuite/gdb.mi/mi-stack.exp19
-rw-r--r--gdb/testsuite/gdb.mi/mi-stepi.exp27
-rw-r--r--gdb/testsuite/gdb.mi/mi-var-block.exp71
-rw-r--r--gdb/testsuite/gdb.mi/mi-var-cmd.exp16
-rw-r--r--gdb/testsuite/gdb.mi/mi-watch.exp29
-rw-r--r--gdb/testsuite/gdb.mi/mi1-console.exp17
-rw-r--r--gdb/testsuite/gdb.mi/mi1-disassemble.exp50
-rw-r--r--gdb/testsuite/gdb.mi/mi1-eval.exp45
-rw-r--r--gdb/testsuite/gdb.mi/mi1-read-memory.exp17
-rw-r--r--gdb/testsuite/gdb.mi/mi1-regs.exp50
-rw-r--r--gdb/testsuite/gdb.mi/mi1-return.exp36
-rw-r--r--gdb/testsuite/gdb.mi/mi1-stack.exp19
-rw-r--r--gdb/testsuite/gdb.mi/mi1-stepi.exp27
-rw-r--r--gdb/testsuite/gdb.mi/mi1-var-block.exp71
-rw-r--r--gdb/testsuite/gdb.mi/mi1-var-cmd.exp16
-rw-r--r--gdb/testsuite/gdb.mi/mi1-watch.exp29
-rw-r--r--gdb/testsuite/lib/mi-support.exp21
-rw-r--r--gdb/thread-db.c102
-rw-r--r--gdb/tui/ChangeLog22
-rw-r--r--gdb/tui/tuiIO.c15
-rw-r--r--gdb/tui/tuiStack.c2
-rw-r--r--gdb/tui/tuiWin.c19
-rw-r--r--gdb/utils.c74
-rw-r--r--gdb/v850-tdep.c4
-rw-r--r--gdb/v850ice.c21
-rw-r--r--gdb/valops.c199
-rw-r--r--gdb/values.c4
-rw-r--r--gdb/varobj.c115
-rw-r--r--gdb/vax-tdep.c2
-rw-r--r--gdb/version.in2
-rw-r--r--gdb/win32-nat.c8
-rw-r--r--gdb/wince.c4
-rw-r--r--gdb/x86-64-linux-nat.c2
-rw-r--r--gdb/x86-64-linux-tdep.c6
-rw-r--r--gdb/x86-64-tdep.c406
-rw-r--r--gdb/x86-64-tdep.h1
-rw-r--r--gdb/xcoffread.c24
-rw-r--r--gdb/xstormy16-tdep.c10
-rw-r--r--gdb/z8k-tdep.c115
-rw-r--r--include/ChangeLog20
-rw-r--r--include/bfdlink.h5
-rw-r--r--include/getopt.h6
-rw-r--r--include/opcode/tic4x.h16
-rw-r--r--include/partition.h4
-rw-r--r--opcodes/ChangeLog39
-rw-r--r--opcodes/Makefile.am6
-rw-r--r--opcodes/Makefile.in8
-rw-r--r--opcodes/ia64-asmtab.c4
-rw-r--r--opcodes/ia64-gen.c1206
-rw-r--r--opcodes/ia64-opc-a.c567
-rw-r--r--opcodes/ia64-opc-b.c496
-rw-r--r--opcodes/ia64-opc-d.c41
-rw-r--r--opcodes/ia64-opc-f.c1057
-rw-r--r--opcodes/ia64-opc-i.c169
-rw-r--r--opcodes/ia64-opc-m.c831
-rw-r--r--opcodes/ia64-opc-x.c85
-rw-r--r--opcodes/ppc-dis.c21
-rw-r--r--opcodes/ppc-opc.c14
-rw-r--r--sim/common/ChangeLog9
-rw-r--r--sim/common/Make-common.in4
-rw-r--r--sim/common/run.c2
-rw-r--r--sim/d10v/ChangeLog4
-rw-r--r--sim/d10v/simops.c3
-rw-r--r--sim/igen/ChangeLog6
-rw-r--r--sim/igen/gen-engine.c12
300 files changed, 9952 insertions, 9099 deletions
diff --git a/ChangeLog b/ChangeLog
index 8a3bf45..f36c879 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2002-11-13 Bruce Korb <bkorb@gnu.org>
+
+ * Makefile.tpl: syntactic cleanup
+
+2002-11-04 Kevin Buettner <kevinb@redhat.com>
+
+ * Makefile.def (host_modules): Add rda.
+ * Makefile.in: Regenerate.
+ * configure.in (target_tool): Add target-rda to list.
+
+2002-10-25 Phil Edwards <pme@gcc.gnu.org>
+
+ * Makefile.tpl (bootstrap): Add bubblestrap, quickstrap, cleanstrap,
+ and restrap targets to this rule.
+ * Makefile.in: Regenerate.
+
2002-10-24 Hans-Peter Nilsson <hp@bitrange.com>
* configure.in (i[3456]86-*-linux*): Add check to disable
diff --git a/Makefile.in b/Makefile.in
index ce4bffa..6f76897 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -760,7 +760,8 @@ ALL_TARGET_MODULES = \
all-target-libjava \
all-target-zlib \
all-target-boehm-gc \
- all-target-qthreads
+ all-target-qthreads \
+ all-target-rda
# This is a list of the configure targets for all of the modules which
# are compiled using the target tools.
@@ -779,7 +780,8 @@ CONFIGURE_TARGET_MODULES = \
configure-target-libjava \
configure-target-zlib \
configure-target-boehm-gc \
- configure-target-qthreads
+ configure-target-qthreads \
+ configure-target-rda
# This is a list of the check targets for all of the modules which are
# compiled using $(TARGET_FLAGS_TO_PASS).
@@ -795,7 +797,8 @@ CHECK_TARGET_MODULES = \
check-target-libjava \
check-target-zlib \
check-target-boehm-gc \
- check-target-qthreads
+ check-target-qthreads \
+ check-target-rda
# This is a list of the install targets for all of the modules which are
# compiled using $(TARGET_FLAGS_TO_PASS).
@@ -812,7 +815,8 @@ INSTALL_TARGET_MODULES = \
install-target-libjava \
install-target-zlib \
install-target-boehm-gc \
- install-target-qthreads
+ install-target-qthreads \
+ install-target-rda
# This is a list of the targets for which we can do a clean-{target}.
CLEAN_MODULES = \
@@ -892,7 +896,8 @@ CLEAN_TARGET_MODULES = \
clean-target-libjava \
clean-target-zlib \
clean-target-boehm-gc \
- clean-target-qthreads
+ clean-target-qthreads \
+ clean-target-rda
# All of the x11 modules that can be cleaned
CLEAN_X11_MODULES = \
@@ -1527,8 +1532,8 @@ all-gcc:
# In theory, on an SMP all those dependencies can be resolved
# in parallel.
#
-.PHONY: bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean
-bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean: all-bootstrap
+.PHONY: bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap
+bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap: all-bootstrap
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
@@ -1762,6 +1767,7 @@ all-target-libjava: configure-target-libjava
all-target-zlib: configure-target-zlib
all-target-boehm-gc: configure-target-boehm-gc
all-target-qthreads: configure-target-qthreads
+all-target-rda: configure-target-rda
### other supporting targets
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 7e6a412..479674b 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,334 @@
+2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
+
+ * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
+ jsr after a short jump.
+ * elf32-h8300.c (elf32_h8_relax_section): Likewise.
+
+2002-11-15 Klee Dienes <kdienes@apple.com>
+
+ * pef.c (bfd_pef_convert_architecture): Move declaration of
+ ARCH_POWERPC and ARCH_M68K to the start of the function.
+
+2002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
+
+ * coff-tic4x.c (tic4x_howto_table): Formatting fixup
+
+2002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
+ For bpo_gregs_section->contents, allocate _raw_size, not
+ _cooked_size.
+
+2002-11-13 Klee Dienes <kdienes@apple.com>
+
+ * config.bfd: Add entries for powerpc-*-darwin and cousins.
+
+2002-11-13 H.J. Lu <hjl@gnu.org>
+
+ * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
+
+2002-11-13 Klee Dienes <kdienes@apple.com>
+ Alan Modra <amodra@bigpond.net.au>
+
+ * bfd.c (struct bfd_preserve): New.
+ (bfd_preserve_save): New function.
+ (bfd_preserve_restore): Ditto.
+ (bfd_preserve_finish): Ditto.
+ * bfd-in2.h: Regenerate.
+ * mach-o.c: Formatting.
+ (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
+ (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
+ (bfd_mach_o_core_p): Ditto.
+ (bfd_mach_o_scan): Pass in mdata.
+ * mach-o.h (bfd_mach_o_scan): Update prototype.
+ * pef.c: Formatting.
+ (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
+ (bfd_pef_xlib_object_p): Ditto.
+ (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
+ * pef.h (bfd_pef_scan): Update prototype.
+ * xsym.c: Formatting, K&R fixes.
+ (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
+ (bfd_sym_scan): New function split out from bfd_sym_object_p.
+ * xsym.h (bfd_sym_scan): Declare.
+ * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
+ * elfcore.h (elf_core_file_p): Likewise.
+ * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
+
+2002-11-12 Nick Clifton <nickc@redhat.com>
+
+ * po/da.po: Updated Danish translation.
+
+2002-11-12 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.h (elf_link_add_object_symbols): Optimize stabs for
+ relocatable link too.
+ (elf_link_input_bfd): When emitting relocs, adjust offsets for
+ eh_frame and stab sections. Zap deleted relocs.
+ (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
+ (elf_bfd_discard_info): Run for relocatable link too.
+ * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
+ Handle ld -r case.
+ (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
+ * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
+
+ * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
+ (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
+ (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
+ (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
+ (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
+ (struct elf_link_hash_table): Add eh_info.
+ (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
+ (_bfd_elf_discard_section_eh_frame): Update prototype.
+ (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
+ (_bfd_elf_write_section_eh_frame): Likewise.
+ (_bfd_elf_write_section_eh_frame_hdr): Likewise.
+ * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
+ param. Get "hdr_info" from link hash table.
+ (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
+ header section from link hash table. Save header section to elf_tdata.
+ (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
+ header section from link hash table. Don't alloc hdr_info. Clear
+ hdr_sec instead of setting "strip".
+ (_bfd_elf_eh_frame_section_offset): Formatting.
+ (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
+ Get header section from link hash table.
+ (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
+ Get header section from link hash table.
+ * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
+ (get_program_header_size): Likewise.
+ (_bfd_elf_section_offset): Formatting.
+ * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
+ section pointer in link hash table.
+ (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
+ and _bfd_elf_write_section_eh_frame calls. Update comment about
+ eh_frame entries.
+ (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
+ _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
+
+ * po/SRC-POTFILES.in: Regenerate.
+
+ * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
+ relocs for discarded FDEs. Remove dead code.
+ (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
+ * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
+ Tidy conditions under which stabs are edited. Formatting.
+ * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
+ from discarded relocs.
+ * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
+ section adjustments after testing magic values.
+
+2002-11-12 Thomas Moestl <tmm@FreeBSD.org>
+
+ * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
+ references to large plt symbols.
+
+2002-11-12 Klee Dienes <kdienes@apple.com>
+
+ * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
+ looking for an unused section name.
+
+2002-11-11 Kazu Hirata <kazu@cs.umass.edu>
+
+ * coff-h8300.c: Fix formatting.
+ * elf32-h8300.c: Likewise.
+ * reloc16.c: Likewise.
+
+2002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
+
+ * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
+ section when dynamic section unused; _bfd_strip_section_from_output
+ instead.
+
+2002-11-08 Alan Modra <amodra@bigpond.net.au>
+
+ * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
+ and sym_vec.
+
+ * dwarf2.c: Revert last change.
+
+2002-11-07 Michal Ludvig <mludvig@suse.cz>
+
+ * 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().
+ * reloc.c (bfd_perform_relocation): Add sanity check.
+ * simple.c (simple_get_relocated_section_contents): If the section
+ does not have any relocs associated with it, just return the
+ unadjusted contents.
+
+2002-11-07 Hans-Peter Nilsson <hp@axis.com>
+
+ * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
+ case R_CRIS_32_GOT>: Correct test for filling in constant .got
+ contents, enabling for a non-DSO, for symbols defined in the
+ program with --export-dynamic.
+
+2002-11-07 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c: Comment typo fixes.
+ (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
+
+2002-11-07 Nick Clifton <nickc@redhat.com>
+
+ * po/da.po: Updated Danish translation.
+
+2002-11-06 Alexandre Oliva <aoliva@redhat.com>
+
+ * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
+ exactly three internal relocs per external reloc. Set reloc_count
+ to the external reloc count.
+
+2002-11-06 Klee Dienes <kdienes@apple.com>
+
+ * coff-stgo32.c (stub_bytes): Mark as const.
+ Fix comment formatting.
+
+2002-11-06 Klee Dienes <kdienes@apple.com>
+
+ * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
+ xsym.lo.
+ (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
+ (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
+ * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
+ * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
+ * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
+ sym.
+ (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
+ * Makefile.in: Regenerate.
+ * doc/Makefile.in: Regenerate.
+ * bfd-in2.h: Regenerate.
+ * xsym.c: New file. Contains support for the Apple/Metrowerks
+ xSYM debugging format.
+ * xsym.h: New file.
+ * pef.c: New file. Contains support for the Apple Code Fragment
+ Manager Preferred Executable Format
+ * pef.h: New file.
+ * pef-traceback.h: New file. Contains support for parsing PowerPC
+ traceback tables as used by PEF executables (and perhaps other
+ systems as well).
+ * mach-o.c: New file. Contains support for the Mach-O object file
+ format.
+ * mach-o.h: New file.
+ * mach-o-target.c: New file. Declares the mach-o targets
+ themselves. Included three times by mach-o.c; each time with a
+ different set of macros set.
+
+2002-11-06 Graeme Peterson <gp@qnx.com>
+
+ * Makefile.am: Remove entries for elf32-qnx.[ch].
+ * Makefile.in: Regenerate.
+ * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
+ ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
+ bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
+ * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
+ bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
+ and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
+ bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
+ * configure: Regenerate.
+ * elf32-qnx.c: Remove.
+ * elf32-qnx.h: Remove.
+ * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
+ is_contained_by_filepos, and copy_private_bfd_data_p.
+ * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
+ is_contained_by_filepos, and copy_private_bfd_data_p.
+ * elf32-i386.c: Remove QNX extended bfd support.
+ * elf32-ppc.c: Remove QNX extended bfd support.
+ * elf32-sh.c: Remove QNX extended bfd support.
+ * elfarm-nabi.c: Remove QNX extended bfd support.
+ * targets.c: Remove qnx vectors.
+ * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
+ (elf_backend_is_contained_by_filepos): Remove.
+ (elf_backend_copy_private_bfd_data_p): Remove.
+ * po/SRC-POTFILES.in: Regenerate.
+
+2002-11-06 David O'Brien <obrien@FreeBSD.org>
+ Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
+ dynamic relocs against section symbols for the output section vma.
+
+2002-11-05 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
+ t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
+
+2002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
+ Alan Modra <amodra@bigpond.net.au>
+
+ * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
+ vectors in target_selvecs.
+ (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
+ in target_selvecs.
+ (sh-*-netbsdelf*): Likewise.
+ * configure.in (assocvecs): New variable. Handle assocvecs like
+ selvecs.
+ * configure: Regenerate.
+ * format.c (bfd_check_format_matches): Store bfd_target pointers
+ in matching_vector instead of target names. Select first target
+ from bfd_associated_vector that matches a list of ambiguous targets.
+ * targets.c (_bfd_associated_vector): New array.
+ (bfd_associated_vector): New variable.
+ (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
+ * libbfd-in.h (bfd_associated_vector): Declare.
+ * libbfd.h: Regenerate.
+
+2002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
+
+ * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
+ non-NULL before dereferencing.
+
+2002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+ * vms.c (vms_object_p): Restore the start address when returning
+ NULL.
+
+2002-11-04 Alan Modra <amodra@bigpond.net.au>
+ Hans-Peter Nilsson <hp@axis.com>
+
+ * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
+ (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
+ Set up a larger symshndxbuf, and write it out. Free it on
+ exit rather than freeing symbuf twice. Correct section index
+ on output section symbol loop.
+ (elf_link_output_sym): Accumulate symbol extension section
+ indices, reallocating symshndxbuf rather than writing it out.
+ (elf_link_flush_output_syms): Don't flush symshndxbuf.
+ * elf.c (assign_section_numbers): Init i_shdrp to all zero.
+ Use bfd_zalloc to clear i_shdrp[0] too.
+
+2002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
+
+ * elf32-sh64-com.c (sh64_address_in_cranges): Use
+ _raw_size of cranges section if _cooked_size not yet set.
+
+2002-11-03 Hans-Peter Nilsson <hp@axis.com>
+
+ * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
+ for bfd_elf32_swap_symbol_out.
+
+2002-10-31 David O'Brien <obrien@FreeBSD.org>
+
+ * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
+ signed and unsigned in comparison.
+
+2002-10-30 Daniel Jacobowitz <drow@mvista.com>
+
+ * coffcode.h: Remove extraneous '\'.
+
+2002-10-28 H.J. Lu <hjl@gnu.org>
+
+ * Makefile.am (targets.lo): Depend on Makefile instead of
+ config.status.
+ (archures.lo): Likewise.
+ * Makefile.in: Regenerated.
+
+2002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
+ bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
+ targ_selvecs.
+
2002-10-25 Jim Wilson <wilson@redhat.com>
* elf64-sh64.c (sh_elf64_relocate_section): Call
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index ecd583a..0c1a798 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -233,7 +233,6 @@ BFD32_BACKENDS = \
elf32-or32.lo \
elf32-pj.lo \
elf32-ppc.lo \
- elf32-qnx.lo \
elf32-s390.lo \
elf32-sh.lo \
elf32-sh64.lo \
@@ -267,6 +266,7 @@ BFD32_BACKENDS = \
m68klynx.lo \
m68knetbsd.lo \
m88kmach3.lo \
+ mach-o.lo \
mipsbsd.lo \
newsos3.lo \
nlm.lo \
@@ -278,6 +278,7 @@ BFD32_BACKENDS = \
oasys.lo \
pc532-mach.lo \
pdp11.lo \
+ pef.lo \
pe-arm.lo \
pei-arm.lo \
pe-i386.lo \
@@ -307,7 +308,8 @@ BFD32_BACKENDS = \
vms-hdr.lo \
vms-misc.lo \
vms-tir.lo \
- xcofflink.lo
+ xcofflink.lo \
+ xsym.lo
BFD32_BACKENDS_CFILES = \
aout-adobe.c \
@@ -388,7 +390,6 @@ BFD32_BACKENDS_CFILES = \
elf32-or32.c \
elf32-pj.c \
elf32-ppc.c \
- elf32-qnx.c \
elf32-sh64.c \
elf32-sh64-com.c \
elf32-s390.c \
@@ -422,6 +423,7 @@ BFD32_BACKENDS_CFILES = \
m68klynx.c \
m68knetbsd.c \
m88kmach3.c \
+ mach-o.c \
mipsbsd.c \
newsos3.c \
nlm.c \
@@ -433,6 +435,7 @@ BFD32_BACKENDS_CFILES = \
oasys.c \
pc532-mach.c \
pdp11.c \
+ pef.c \
pe-arm.c \
pei-arm.c \
pe-i386.c \
@@ -461,7 +464,8 @@ BFD32_BACKENDS_CFILES = \
vms-hdr.c \
vms-misc.c \
vms-tir.c \
- xcofflink.c
+ xcofflink.c \
+ xsym.c
# The .o files needed by all of the 64 bit vectors that are configured into
# target_vector in targets.c if configured with --enable-targets=all
@@ -561,13 +565,14 @@ CFILES = $(SOURCE_CFILES) $(BUILD_CFILES)
## This is a list of all .h files which are in the source tree.
SOURCE_HFILES = \
aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h \
- elf-bfd.h elf-hppa.h elf32-arm.h elf32-hppa.h elf32-qnx.h \
+ elf-bfd.h elf-hppa.h elf32-arm.h elf32-hppa.h \
elf64-hppa.h elfcode.h elfcore.h elflink.h \
freebsd.h genlink.h go32stub.h \
libaout.h libbfd.h libcoff.h libecoff.h libhppa.h libieee.h \
- libnlm.h liboasys.h libpei.h libxcoff.h \
+ libnlm.h liboasys.h libpei.h libxcoff.h mach-o.h \
netbsd.h nlm-target.h nlmcode.h nlmswap.h ns32k.h \
- peicode.h som.h version.h vms.h xcoff-target.h
+ pef.h pef-traceback.h peicode.h som.h version.h \
+ vms.h xcoff-target.h xsym.h
## ... and all .h files which are in the build tree.
BUILD_HFILES = \
@@ -654,10 +659,10 @@ targmatch.h: config.bfd targmatch.sed
# When compiling archures.c and targets.c, supply the default target
# info from configure.
-targets.lo: targets.c config.status
+targets.lo: targets.c Makefile
$(LIBTOOL) --mode=compile $(COMPILE) -c $(TDEFAULTS) $(srcdir)/targets.c
-archures.lo: archures.c config.status
+archures.lo: archures.c Makefile
$(LIBTOOL) --mode=compile $(COMPILE) -c $(TDEFAULTS) $(srcdir)/archures.c
elf32-target.h : elfxx-target.h
@@ -1099,7 +1104,7 @@ elfarm-oabi.lo: elfarm-oabi.c $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
elfarm-nabi.lo: elfarm-nabi.c $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
$(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- elf32-arm.h elf32-target.h elf32-qnx.h
+ elf32-arm.h elf32-target.h
elf32-avr.lo: elf32-avr.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/avr.h $(INCDIR)/elf/reloc-macros.h \
@@ -1146,7 +1151,7 @@ elf32-i370.lo: elf32-i370.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf32-i386.lo: elf32-i386.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h elf32-qnx.h
+ elf32-target.h
elf32-i860.lo: elf32-i860.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/i860.h $(INCDIR)/elf/reloc-macros.h \
@@ -1217,10 +1222,7 @@ elf32-pj.lo: elf32-pj.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf32-ppc.lo: elf32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h elf32-qnx.h
-elf32-qnx.lo: elf32-qnx.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h elf32-qnx.h
+ elf32-target.h
elf32-sh64.lo: elf32-sh64.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/../opcodes/sh64-opc.h \
@@ -1237,7 +1239,7 @@ elf32-s390.lo: elf32-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf32-sh.lo: elf32-sh.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h elf32-qnx.h
+ elf32-target.h
elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sparc.h \
@@ -1332,6 +1334,8 @@ m68knetbsd.lo: m68knetbsd.c netbsd.h $(INCDIR)/filenames.h \
m88kmach3.lo: m88kmach3.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
+mach-o.lo: mach-o.c mach-o.h $(INCDIR)/filenames.h \
+ $(INCDIR)/libiberty.h mach-o-target.c
mipsbsd.lo: mipsbsd.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
@@ -1363,6 +1367,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
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 \
@@ -1455,6 +1461,7 @@ vms-tir.lo: vms-tir.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
xcofflink.lo: xcofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/xcoff.h libcoff.h \
libxcoff.h
+xsym.lo: xsym.c xsym.h $(INCDIR)/filenames.h
aix5ppc-core.lo: aix5ppc-core.c
aout64.lo: aout64.c aoutx.h $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
$(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.h \
diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index a3a0d40..0104743 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -360,7 +360,6 @@ BFD32_BACKENDS = \
elf32-or32.lo \
elf32-pj.lo \
elf32-ppc.lo \
- elf32-qnx.lo \
elf32-s390.lo \
elf32-sh.lo \
elf32-sh64.lo \
@@ -394,6 +393,7 @@ BFD32_BACKENDS = \
m68klynx.lo \
m68knetbsd.lo \
m88kmach3.lo \
+ mach-o.lo \
mipsbsd.lo \
newsos3.lo \
nlm.lo \
@@ -405,6 +405,7 @@ BFD32_BACKENDS = \
oasys.lo \
pc532-mach.lo \
pdp11.lo \
+ pef.lo \
pe-arm.lo \
pei-arm.lo \
pe-i386.lo \
@@ -434,7 +435,8 @@ BFD32_BACKENDS = \
vms-hdr.lo \
vms-misc.lo \
vms-tir.lo \
- xcofflink.lo
+ xcofflink.lo \
+ xsym.lo
BFD32_BACKENDS_CFILES = \
@@ -516,7 +518,6 @@ BFD32_BACKENDS_CFILES = \
elf32-or32.c \
elf32-pj.c \
elf32-ppc.c \
- elf32-qnx.c \
elf32-sh64.c \
elf32-sh64-com.c \
elf32-s390.c \
@@ -550,6 +551,7 @@ BFD32_BACKENDS_CFILES = \
m68klynx.c \
m68knetbsd.c \
m88kmach3.c \
+ mach-o.c \
mipsbsd.c \
newsos3.c \
nlm.c \
@@ -561,6 +563,7 @@ BFD32_BACKENDS_CFILES = \
oasys.c \
pc532-mach.c \
pdp11.c \
+ pef.c \
pe-arm.c \
pei-arm.c \
pe-i386.c \
@@ -589,7 +592,8 @@ BFD32_BACKENDS_CFILES = \
vms-hdr.c \
vms-misc.c \
vms-tir.c \
- xcofflink.c
+ xcofflink.c \
+ xsym.c
# The .o files needed by all of the 64 bit vectors that are configured into
@@ -695,13 +699,14 @@ CFILES = $(SOURCE_CFILES) $(BUILD_CFILES)
SOURCE_HFILES = \
aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h \
- elf-bfd.h elf-hppa.h elf32-arm.h elf32-hppa.h elf32-qnx.h \
+ elf-bfd.h elf-hppa.h elf32-arm.h elf32-hppa.h \
elf64-hppa.h elfcode.h elfcore.h elflink.h \
freebsd.h genlink.h go32stub.h \
libaout.h libbfd.h libcoff.h libecoff.h libhppa.h libieee.h \
- libnlm.h liboasys.h libpei.h libxcoff.h \
+ libnlm.h liboasys.h libpei.h libxcoff.h mach-o.h \
netbsd.h nlm-target.h nlmcode.h nlmswap.h ns32k.h \
- peicode.h som.h version.h vms.h xcoff-target.h
+ pef.h pef-traceback.h peicode.h som.h version.h \
+ vms.h xcoff-target.h xsym.h
BUILD_HFILES = \
@@ -780,7 +785,7 @@ configure.in version.h
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-TAR = tar
+TAR = gtar
GZIP_ENV = --best
SOURCES = $(libbfd_a_SOURCES) $(libbfd_la_SOURCES)
OBJECTS = $(libbfd_a_OBJECTS) $(libbfd_la_OBJECTS)
@@ -1201,10 +1206,10 @@ targmatch.h: config.bfd targmatch.sed
# When compiling archures.c and targets.c, supply the default target
# info from configure.
-targets.lo: targets.c config.status
+targets.lo: targets.c Makefile
$(LIBTOOL) --mode=compile $(COMPILE) -c $(TDEFAULTS) $(srcdir)/targets.c
-archures.lo: archures.c config.status
+archures.lo: archures.c Makefile
$(LIBTOOL) --mode=compile $(COMPILE) -c $(TDEFAULTS) $(srcdir)/archures.c
elf32-target.h : elfxx-target.h
@@ -1630,7 +1635,7 @@ elfarm-oabi.lo: elfarm-oabi.c $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
elfarm-nabi.lo: elfarm-nabi.c $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
$(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
- elf32-arm.h elf32-target.h elf32-qnx.h
+ elf32-arm.h elf32-target.h
elf32-avr.lo: elf32-avr.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/avr.h $(INCDIR)/elf/reloc-macros.h \
@@ -1677,7 +1682,7 @@ elf32-i370.lo: elf32-i370.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf32-i386.lo: elf32-i386.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h elf32-qnx.h
+ elf32-target.h
elf32-i860.lo: elf32-i860.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/i860.h $(INCDIR)/elf/reloc-macros.h \
@@ -1748,10 +1753,7 @@ elf32-pj.lo: elf32-pj.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf32-ppc.lo: elf32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h elf32-qnx.h
-elf32-qnx.lo: elf32-qnx.c $(INCDIR)/filenames.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h elf32-qnx.h
+ elf32-target.h
elf32-sh64.lo: elf32-sh64.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/../opcodes/sh64-opc.h \
@@ -1768,7 +1770,7 @@ elf32-s390.lo: elf32-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf32-sh.lo: elf32-sh.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h elf32-qnx.h
+ elf32-target.h
elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sparc.h \
@@ -1863,6 +1865,8 @@ m68knetbsd.lo: m68knetbsd.c netbsd.h $(INCDIR)/filenames.h \
m88kmach3.lo: m88kmach3.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
+mach-o.lo: mach-o.c mach-o.h $(INCDIR)/filenames.h \
+ $(INCDIR)/libiberty.h mach-o-target.c
mipsbsd.lo: mipsbsd.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
@@ -1894,6 +1898,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
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 \
@@ -1986,6 +1992,7 @@ vms-tir.lo: vms-tir.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
xcofflink.lo: xcofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/xcoff.h libcoff.h \
libxcoff.h
+xsym.lo: xsym.c xsym.h $(INCDIR)/filenames.h
aix5ppc-core.lo: aix5ppc-core.c
aout64.lo: aout64.c aoutx.h $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
$(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.h \
diff --git a/bfd/archures.c b/bfd/archures.c
index 1ab0cfa..485fef2 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
@@ -4,21 +4,21 @@
Free Software Foundation, Inc.
Hacked by John Gilmore and Steve Chamberlain of Cygnus Support.
-This file is part of BFD, the Binary File Descriptor library.
+ This file is part of BFD, the Binary File Descriptor library.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -160,6 +160,7 @@ DESCRIPTION
. bfd_arch_alliant, {* Alliant *}
. bfd_arch_convex, {* Convex *}
. bfd_arch_m88k, {* Motorola 88xxx *}
+. bfd_arch_m98k, {* Motorola 98xxx *}
. bfd_arch_pyramid, {* Pyramid Technology *}
. bfd_arch_h8300, {* Hitachi H8/300 *}
.#define bfd_mach_h8300 1
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 018a0fd..8f4a48b 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -1551,6 +1551,7 @@ enum bfd_architecture
bfd_arch_alliant, /* Alliant */
bfd_arch_convex, /* Convex */
bfd_arch_m88k, /* Motorola 88xxx */
+ bfd_arch_m98k, /* Motorola 98xxx */
bfd_arch_pyramid, /* Pyramid Technology */
bfd_arch_h8300, /* Hitachi H8/300 */
#define bfd_mach_h8300 1
@@ -3533,6 +3534,11 @@ struct _bfd
struct cisco_core_struct *cisco_core_data;
struct versados_data_struct *versados_data;
struct netbsd_core_struct *netbsd_core_data;
+ struct mach_o_data_struct *mach_o_data;
+ struct mach_o_fat_data_struct *mach_o_fat_data;
+ struct bfd_pef_data_struct *pef_data;
+ struct bfd_pef_xlib_data_struct *pef_xlib_data;
+ struct bfd_sym_data_struct *sym_data;
PTR any;
}
tdata;
@@ -3733,6 +3739,27 @@ extern bfd_byte *bfd_get_relocated_section_contents
boolean
bfd_alt_mach_code PARAMS ((bfd *abfd, int alternative));
+struct bfd_preserve
+{
+ PTR marker;
+ PTR tdata;
+ flagword flags;
+ const struct bfd_arch_info *arch_info;
+ struct sec *sections;
+ struct sec **section_tail;
+ unsigned int section_count;
+ struct bfd_hash_table section_htab;
+};
+
+boolean
+bfd_preserve_save PARAMS ((bfd *, struct bfd_preserve *));
+
+void
+bfd_preserve_restore PARAMS ((bfd *, struct bfd_preserve *));
+
+void
+bfd_preserve_finish PARAMS ((bfd *, struct bfd_preserve *));
+
/* Extracted from archive.c. */
symindex
bfd_get_next_mapent PARAMS ((bfd *abfd, symindex previous, carsym **sym));
@@ -3795,7 +3822,11 @@ enum bfd_flavour
bfd_target_msdos_flavour,
bfd_target_ovax_flavour,
bfd_target_evax_flavour,
- bfd_target_mmo_flavour
+ bfd_target_mmo_flavour,
+ bfd_target_mach_o_flavour,
+ bfd_target_pef_flavour,
+ bfd_target_pef_xlib_flavour,
+ bfd_target_sym_flavour
};
enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
diff --git a/bfd/bfd.c b/bfd/bfd.c
index bf45162..5412ac8 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -4,21 +4,21 @@
Free Software Foundation, Inc.
Written by Cygnus Support.
-This file is part of BFD, the Binary File Descriptor library.
+ This file is part of BFD, the Binary File Descriptor library.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/*
SECTION
@@ -180,6 +180,11 @@ CODE_FRAGMENT
. struct cisco_core_struct *cisco_core_data;
. struct versados_data_struct *versados_data;
. struct netbsd_core_struct *netbsd_core_data;
+. struct mach_o_data_struct *mach_o_data;
+. struct mach_o_fat_data_struct *mach_o_fat_data;
+. struct bfd_pef_data_struct *pef_data;
+. struct bfd_pef_xlib_data_struct *pef_xlib_data;
+. struct bfd_sym_data_struct *sym_data;
. PTR any;
. }
. tdata;
@@ -1387,3 +1392,133 @@ bfd_alt_mach_code (abfd, alternative)
return false;
}
+
+/*
+CODE_FRAGMENT
+
+.struct bfd_preserve
+.{
+. PTR marker;
+. PTR tdata;
+. flagword flags;
+. const struct bfd_arch_info *arch_info;
+. struct sec *sections;
+. struct sec **section_tail;
+. unsigned int section_count;
+. struct bfd_hash_table section_htab;
+.};
+.
+*/
+
+/*
+FUNCTION
+ bfd_preserve_save
+
+SYNOPSIS
+ boolean bfd_preserve_save (bfd *, struct bfd_preserve *);
+
+DESCRIPTION
+ When testing an object for compatibility with a particular
+ target back-end, the back-end object_p function needs to set
+ up certain fields in the bfd on successfully recognizing the
+ object. This typically happens in a piecemeal fashion, with
+ failures possible at many points. On failure, the bfd is
+ supposed to be restored to its initial state, which is
+ virtually impossible. However, restoring a subset of the bfd
+ state works in practice. This function stores the subset and
+ reinitializes the bfd.
+
+*/
+
+boolean
+bfd_preserve_save (abfd, preserve)
+ bfd *abfd;
+ struct bfd_preserve *preserve;
+{
+ preserve->tdata = abfd->tdata.any;
+ preserve->arch_info = abfd->arch_info;
+ preserve->flags = abfd->flags;
+
+ preserve->sections = abfd->sections;
+ preserve->section_tail = abfd->section_tail;
+ preserve->section_count = abfd->section_count;
+ preserve->section_htab = abfd->section_htab;
+
+ if (! bfd_hash_table_init (&abfd->section_htab, bfd_section_hash_newfunc))
+ return false;
+
+ abfd->tdata.any = NULL;
+ abfd->arch_info = &bfd_default_arch_struct;
+ abfd->flags = 0;
+
+ abfd->sections = NULL;
+ abfd->section_tail = &abfd->sections;
+ abfd->section_count = 0;
+
+ return true;
+}
+
+/*
+FUNCTION
+ bfd_preserve_restore
+
+SYNOPSIS
+ void bfd_preserve_restore (bfd *, struct bfd_preserve *);
+
+DESCRIPTION
+ This function restores bfd state saved by bfd_preserve_save.
+ If MARKER is non-NULL in struct bfd_preserve then that block
+ and all subsequently bfd_alloc'd memory is freed.
+
+*/
+
+void
+bfd_preserve_restore (abfd, preserve)
+ bfd *abfd;
+ struct bfd_preserve *preserve;
+{
+ bfd_hash_table_free (&abfd->section_htab);
+
+ abfd->tdata.any = preserve->tdata;
+ abfd->arch_info = preserve->arch_info;
+ abfd->flags = preserve->flags;
+
+ abfd->section_htab = preserve->section_htab;
+ abfd->sections = preserve->sections;
+ abfd->section_tail = preserve->section_tail;
+ abfd->section_count = preserve->section_count;
+
+ /* bfd_release frees all memory more recently bfd_alloc'd than
+ its arg, as well as its arg. */
+ if (preserve->marker != NULL)
+ {
+ bfd_release (abfd, preserve->marker);
+ preserve->marker = NULL;
+ }
+}
+
+/*
+FUNCTION
+ bfd_preserve_finish
+
+SYNOPSIS
+ void bfd_preserve_finish (bfd *, struct bfd_preserve *);
+
+DESCRIPTION
+ This function should be called when the bfd state saved by
+ bfd_preserve_save is no longer needed. ie. when the back-end
+ object_p function returns with success.
+
+*/
+
+void
+bfd_preserve_finish (abfd, preserve)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ struct bfd_preserve *preserve;
+{
+ /* It would be nice to be able to free more memory here, eg. old
+ tdata, but that's not possible since these blocks are sitting
+ inside bfd_alloc'd memory. The section hash is on a separate
+ objalloc. */
+ bfd_hash_table_free (&preserve->section_htab);
+}
diff --git a/bfd/coff-h8300.c b/bfd/coff-h8300.c
index 82b7bca..c83015e 100644
--- a/bfd/coff-h8300.c
+++ b/bfd/coff-h8300.c
@@ -4,21 +4,21 @@
Free Software Foundation, Inc.
Written by Steve Chamberlain, <sac@cygnus.com>.
-This file is part of BFD, the Binary File Descriptor library.
+ This file is part of BFD, the Binary File Descriptor library.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -87,8 +87,7 @@ static boolean h8300_bfd_link_add_symbols PARAMS ((bfd *, struct bfd_link_info *
the generic linker hash table, not the COFF backend linker hash
table! We use this to attach additional data structures we
need while linking on the h8300. */
-struct h8300_coff_link_hash_table
-{
+struct h8300_coff_link_hash_table {
/* The main hash table. */
struct generic_link_hash_table root;
@@ -135,7 +134,7 @@ funcvec_hash_newfunc (entry, gen_table, string)
/* Call the allocation method of the superclass. */
ret = ((struct funcvec_hash_entry *)
- bfd_hash_newfunc ((struct bfd_hash_entry *) ret, gen_table, string));
+ bfd_hash_newfunc ((struct bfd_hash_entry *) ret, gen_table, string));
if (ret == NULL)
return NULL;
@@ -165,8 +164,8 @@ funcvec_hash_table_init (table, abfd, newfunc)
struct funcvec_hash_table *table;
bfd *abfd;
struct bfd_hash_entry *(*newfunc) PARAMS ((struct bfd_hash_entry *,
- struct bfd_hash_table *,
- const char *));
+ struct bfd_hash_table *,
+ const char *));
{
/* Initialize our local fields, then call the generic initialization
routine. */
@@ -232,8 +231,7 @@ special (abfd, reloc_entry, symbol, data, input_section, output_bfd,
return bfd_reloc_ok;
}
-static reloc_howto_type howto_table[] =
-{
+static reloc_howto_type howto_table[] = {
HOWTO (R_RELBYTE, 0, 0, 8, false, 0, complain_overflow_bitfield, special, "8", false, 0x000000ff, 0x000000ff, false),
HOWTO (R_RELWORD, 0, 1, 16, false, 0, complain_overflow_bitfield, special, "16", false, 0x0000ffff, 0x0000ffff, false),
HOWTO (R_RELLONG, 0, 2, 32, false, 0, complain_overflow_bitfield, special, "32", false, 0xffffffff, 0xffffffff, false),
@@ -270,9 +268,9 @@ static reloc_howto_type howto_table[] =
/* Turn a howto into a reloc number. */
#define SELECT_RELOC(x,howto) \
- { x.r_type = select_reloc(howto); }
+ { x.r_type = select_reloc (howto); }
-#define BADMAG(x) (H8300BADMAG(x) && H8300HBADMAG(x) && H8300SBADMAG(x))
+#define BADMAG(x) (H8300BADMAG (x) && H8300HBADMAG (x) && H8300SBADMAG (x))
#define H8300 1 /* Customize coffcode.h */
#define __A_MAGIC_SET__
@@ -365,15 +363,15 @@ rtype2howto (internal, dst)
}
}
-#define RTYPE2HOWTO(internal, relocentry) rtype2howto(internal,relocentry)
+#define RTYPE2HOWTO(internal, relocentry) rtype2howto (internal, relocentry)
/* Perform any necessary magic to the addend in a reloc entry. */
#define CALC_ADDEND(abfd, symbol, ext_reloc, cache_ptr) \
- cache_ptr->addend = ext_reloc.r_offset;
+ cache_ptr->addend = ext_reloc.r_offset;
#define RELOC_PROCESSING(relent,reloc,symbols,abfd,section) \
- reloc_processing(relent, reloc, symbols, abfd, section)
+ reloc_processing (relent, reloc, symbols, abfd, section)
static void
reloc_processing (relent, reloc, symbols, abfd, section)
@@ -483,8 +481,15 @@ h8300_reloc16_estimate (abfd, input_section, reloc, shrink, link_info)
/* If the distance is within -128..+128 inclusive, then we can relax
this jump. +128 is valid since the target will move two bytes
closer if we do relax this branch. */
- if ((int)gap >= -128 && (int)gap <= 128 )
+ if ((int) gap >= -128 && (int) gap <= 128)
{
+ bfd_byte code;
+
+ if (!bfd_get_section_contents (abfd, input_section, & code,
+ reloc->address, 1))
+ break;
+ code = bfd_get_8 (abfd, & code);
+
/* It's possible we may be able to eliminate this branch entirely;
if the previous instruction is a branch around this instruction,
and there's no label at this instruction, then we can reverse
@@ -496,9 +501,25 @@ h8300_reloc16_estimate (abfd, input_section, reloc, shrink, link_info)
lab1: lab1:
This saves 4 bytes instead of two, and should be relatively
- common. */
-
- if (gap <= 126
+ common.
+
+ Only perform this optimisation for jumps (code 0x5a) not
+ subroutine calls, as otherwise it could transform:
+
+ mov.w r0,r0
+ beq .L1
+ jsr @_bar
+ .L1: rts
+ _bar: rts
+ into:
+ mov.w r0,r0
+ bne _bar
+ rts
+ _bar: rts
+
+ which changes the call (jsr) into a branch (bne). */
+ if (code == 0x5a
+ && gap <= 126
&& last_reloc
&& last_reloc->howto->type == R_PCRBYTE)
{
@@ -546,7 +567,7 @@ h8300_reloc16_estimate (abfd, input_section, reloc, shrink, link_info)
/* If the distance is within -128..+128 inclusive, then we can relax
this jump. +128 is valid since the target will move two bytes
closer if we do relax this branch. */
- if ((int)gap >= -128 && (int)gap <= 128 )
+ if ((int) gap >= -128 && (int) gap <= 128)
{
/* Change the reloc type. */
reloc->howto = howto_table + 15;
@@ -736,7 +757,7 @@ h8300_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
/* Sanity check. */
if (value <= 0xff
|| (value >= 0x0000ff00 && value <= 0x0000ffff)
- || (value >= 0x00ffff00 && value <= 0x00ffffff)
+ || (value >= 0x00ffff00 && value <= 0x00ffffff)
|| (value >= 0xffffff00 && value <= 0xffffffff))
{
/* Everything looks OK. Apply the relocation and update the
@@ -804,7 +825,7 @@ h8300_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
/* Fix the opcode. For all the move insns, we simply
need to turn off bit 0x20 in the previous byte. */
- data[dst_address - 1] &= ~0x20;
+ data[dst_address - 1] &= ~0x20;
dst_address += 2;
src_address += 4;
}
@@ -815,7 +836,7 @@ h8300_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
reloc->howto->name, reloc->addend, input_section->owner,
input_section, reloc->address)))
abort ();
- }
+ }
break;
/* A 16bit absolute branch that is now an 8-bit pc-relative branch. */
@@ -912,14 +933,14 @@ h8300_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
abort ();
}
- /* Output the target. */
- bfd_put_8 (abfd, gap, data + dst_address - 1);
+ /* Output the target. */
+ bfd_put_8 (abfd, gap, data + dst_address - 1);
- /* We don't advance dst_address -- the 8bit reloc is applied at
- dst_address - 1, so the next insn should begin at dst_address. */
- src_address += 2;
+ /* We don't advance dst_address -- the 8bit reloc is applied at
+ dst_address - 1, so the next insn should begin at dst_address. */
+ src_address += 2;
- break;
+ break;
/* Similarly for a 24bit absolute that is now 8 bits. */
case R_JMPL2:
diff --git a/bfd/coff-stgo32.c b/bfd/coff-stgo32.c
index 5d867ea..5c80b11 100644
--- a/bfd/coff-stgo32.c
+++ b/bfd/coff-stgo32.c
@@ -32,8 +32,7 @@
image and NOT in the file.
To be compatible with any existing executables I have fixed this
- here and NOT in the DJGPP startup code.
- */
+ here and NOT in the DJGPP startup code. */
#define TARGET_SYM go32stubbedcoff_vec
#define TARGET_NAME "coff-go32-exe"
@@ -55,40 +54,32 @@
#include "bfd.h"
-/* At first the prototypes */
+/* At first the prototypes. */
static void
-adjust_filehdr_in_post PARAMS ((bfd * abfd, PTR src, PTR dst));
+adjust_filehdr_in_post PARAMS ((bfd *, PTR, PTR));
static void
-adjust_filehdr_out_pre PARAMS ((bfd * abfd, PTR in, PTR out));
+adjust_filehdr_out_pre PARAMS ((bfd *, PTR, PTR));
static void
-adjust_filehdr_out_post PARAMS ((bfd * abfd, PTR in, PTR out));
-
+adjust_filehdr_out_post PARAMS ((bfd *, PTR, PTR));
static void
-adjust_scnhdr_in_post PARAMS ((bfd * abfd, PTR ext, PTR in));
+adjust_scnhdr_in_post PARAMS ((bfd *, PTR, PTR));
static void
-adjust_scnhdr_out_pre PARAMS ((bfd * abfd, PTR in, PTR out));
+adjust_scnhdr_out_pre PARAMS ((bfd *, PTR, PTR));
static void
-adjust_scnhdr_out_post PARAMS ((bfd * abfd, PTR in, PTR out));
-
+adjust_scnhdr_out_post PARAMS ((bfd *, PTR, PTR));
static void
-adjust_aux_in_post PARAMS ((bfd * abfd, PTR ext1, int type, int class, int indx,
- int numaux, PTR in1));
+adjust_aux_in_post PARAMS ((bfd *, PTR, int, int, int, int, PTR));
static void
-adjust_aux_out_pre PARAMS ((bfd * abfd, PTR inp, int type, int class, int indx,
- int numaux, PTR extp));
+adjust_aux_out_pre PARAMS ((bfd *, PTR, int, int, int, int, PTR));
static void
-adjust_aux_out_post PARAMS ((bfd * abfd, PTR inp, int type, int class, int indx,
- int numaux, PTR extp));
-
+adjust_aux_out_post PARAMS ((bfd *, PTR, int, int, int, int, PTR));
static void
-create_go32_stub PARAMS ((bfd * abfd));
+create_go32_stub PARAMS ((bfd *));
-/*
- All that ..._PRE and ...POST functions are called from the corresponding
+/* All that ..._PRE and ...POST functions are called from the corresponding
coff_swap... functions. The ...PRE functions are called at the beginning
- of the function and the ...POST functions at the end of the swap routines.
- */
+ of the function and the ...POST functions at the end of the swap routines. */
#define COFF_ADJUST_FILEHDR_IN_POST adjust_filehdr_in_post
#define COFF_ADJUST_FILEHDR_OUT_PRE adjust_filehdr_out_pre
@@ -103,23 +94,23 @@ create_go32_stub PARAMS ((bfd * abfd));
#define COFF_ADJUST_AUX_OUT_POST adjust_aux_out_post
static boolean
- go32_stubbed_coff_bfd_copy_private_bfd_data PARAMS ((bfd * ibfd, bfd * obfd));
+ go32_stubbed_coff_bfd_copy_private_bfd_data PARAMS ((bfd *, bfd *));
#define coff_bfd_copy_private_bfd_data go32_stubbed_coff_bfd_copy_private_bfd_data
#include "coff-i386.c"
-/* I hold in the usrdata the stub */
+/* I hold in the usrdata the stub. */
#define bfd_coff_go32stub bfd_usrdata
/* This macro is used, because I cannot assume the endianess of the
- host system */
+ host system. */
#define _H(index) (H_GET_16 (abfd, (header+index*2)))
/* These bytes are a 2048-byte DOS executable, which loads the COFF
- image into memory and then runs it. It is called 'stub' */
+ image into memory and then runs it. It is called 'stub'. */
-static unsigned char stub_bytes[STUBSIZE] =
+static const unsigned char stub_bytes[STUBSIZE] =
{
#include "go32stub.h"
};
@@ -129,10 +120,10 @@ static unsigned char stub_bytes[STUBSIZE] =
technique is in any function the same. For the ...in function,
all the pointers are adjusted by adding STUBSIZE and for the
...out function, it is subtracted first and after calling the
- standard swap function it is reset to the old value */
+ standard swap function it is reset to the old value. */
/* This macro is used for adjusting the filepointers, which
- is done only, if the pointer is nonzero */
+ is done only, if the pointer is nonzero. */
#define ADJUST_VAL(val,diff) \
if (val != 0) val += diff
@@ -148,13 +139,13 @@ adjust_filehdr_in_post (abfd, src, dst)
ADJUST_VAL (filehdr_dst->f_symptr, STUBSIZE);
- /* Save now the stub to be used later */
+ /* Save now the stub to be used later. */
bfd_coff_go32stub (abfd) = (PTR) bfd_alloc (abfd, (bfd_size_type) STUBSIZE);
/* Since this function returns no status, I do not set here
any bfd_error_...
That means, before the use of bfd_coff_go32stub (), this value
- should be checked if it is != NULL */
+ should be checked if it is != NULL. */
if (bfd_coff_go32stub (abfd) == NULL)
return;
memcpy (bfd_coff_go32stub (abfd), filehdr_src->stub, STUBSIZE);
@@ -169,14 +160,14 @@ adjust_filehdr_out_pre (abfd, in, out)
struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
FILHDR *filehdr_out = (FILHDR *) out;
- /* Generate the stub */
+ /* Generate the stub. */
create_go32_stub (abfd);
- /* Copy the stub to the file header */
+ /* Copy the stub to the file header. */
if (bfd_coff_go32stub (abfd) != NULL)
memcpy (filehdr_out->stub, bfd_coff_go32stub (abfd), STUBSIZE);
else
- /* use the default */
+ /* Use the default. */
memcpy (filehdr_out->stub, stub_bytes, STUBSIZE);
ADJUST_VAL (filehdr_in->f_symptr, -STUBSIZE);
@@ -189,7 +180,7 @@ adjust_filehdr_out_post (abfd, in, out)
PTR out ATTRIBUTE_UNUSED;
{
struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
- /* undo the above change */
+ /* Undo the above change. */
ADJUST_VAL (filehdr_in->f_symptr, STUBSIZE);
}
@@ -286,8 +277,7 @@ adjust_aux_out_post (abfd, inp, type, class, indx, numaux, extp)
}
}
-/*
- That's the function, which creates the stub. There are
+/* That's the function, which creates the stub. There are
different cases from where the stub is taken.
At first the environment variable $(GO32STUB) is checked and then
$(STUB) if it was not set.
@@ -297,14 +287,13 @@ adjust_aux_out_post (abfd, inp, type, class, indx, numaux, extp)
file.
If there was any error, the standard stub (compiled in this file)
- is taken.
- */
+ is taken. */
static void
create_go32_stub (abfd)
bfd *abfd;
{
- /* Do it only once */
+ /* Do it only once. */
if (bfd_coff_go32stub (abfd) == NULL)
{
char *stub;
@@ -315,9 +304,9 @@ create_go32_stub (abfd)
unsigned long coff_start;
long exe_start;
- /* Check at first the environment variable $(GO32STUB) */
+ /* Check at first the environment variable $(GO32STUB). */
stub = getenv ("GO32STUB");
- /* Now check the environment variable $(STUB) */
+ /* Now check the environment variable $(STUB). */
if (stub == NULL)
stub = getenv ("STUB");
if (stub == NULL)
@@ -336,19 +325,19 @@ create_go32_stub (abfd)
close (f);
goto stub_end;
}
- if (_H (0) != 0x5a4d) /* it is not an exe file */
+ if (_H (0) != 0x5a4d) /* It is not an exe file. */
{
close (f);
goto stub_end;
}
/* Compute the size of the stub (it is every thing up
- to the beginning of the coff image) */
+ to the beginning of the coff image). */
coff_start = (long) _H (2) * 512L;
if (_H (1))
coff_start += (long) _H (1) - 512L;
/* Currently there is only a fixed stub size of 2048 bytes
- supported */
+ supported. */
if (coff_start != 2048)
{
close (f);
@@ -370,7 +359,7 @@ create_go32_stub (abfd)
close (f);
goto stub_end;
}
- /* Now we found a correct stub (hopefully) */
+ /* Now we found a correct stub (hopefully). */
bfd_coff_go32stub (abfd)
= (PTR) bfd_alloc (abfd, (bfd_size_type) coff_start);
if (bfd_coff_go32stub (abfd) == NULL)
@@ -389,39 +378,35 @@ create_go32_stub (abfd)
}
stub_end:
/* There was something wrong above, so use now the standard builtin
- stub */
+ stub. */
if (bfd_coff_go32stub (abfd) == NULL)
{
bfd_coff_go32stub (abfd)
= (PTR) bfd_alloc (abfd, (bfd_size_type) STUBSIZE);
if (bfd_coff_go32stub (abfd) == NULL)
- {
- return;
- }
-
+ return;
memcpy (bfd_coff_go32stub (abfd), stub_bytes, STUBSIZE);
}
}
/* If ibfd was a stubbed coff image, copy the stub from that bfd
- to the new obfd.
- */
+ to the new obfd. */
static boolean
go32_stubbed_coff_bfd_copy_private_bfd_data (ibfd, obfd)
bfd *ibfd;
bfd *obfd;
{
- /* check if both are the same targets */
+ /* Check if both are the same targets. */
if (ibfd->xvec != obfd->xvec)
return true;
- /* check if both have a valid stub */
+ /* Check if both have a valid stub. */
if (bfd_coff_go32stub (ibfd) == NULL
|| bfd_coff_go32stub (obfd) == NULL)
return true;
- /* Now copy the stub */
+ /* Now copy the stub. */
memcpy (bfd_coff_go32stub (obfd), bfd_coff_go32stub (ibfd), STUBSIZE);
return true;
diff --git a/bfd/coff-tic4x.c b/bfd/coff-tic4x.c
index 561d161..8afd04a 100644
--- a/bfd/coff-tic4x.c
+++ b/bfd/coff-tic4x.c
@@ -123,20 +123,20 @@ tic4x_relocation (abfd, reloc_entry, symbol, data, input_section,
reloc_howto_type tic4x_howto_table[] =
{
- HOWTO(R_RELWORD, 0, 2, 16, false, 0, complain_overflow_signed, tic4x_relocation, "RELWORD", true, 0x0000ffff, 0x0000ffff, false),
+ HOWTO(R_RELWORD, 0, 2, 16, false, 0, complain_overflow_signed, tic4x_relocation, "RELWORD", true, 0x0000ffff, 0x0000ffff, false),
HOWTO(R_REL24, 0, 2, 24, false, 0, complain_overflow_bitfield, tic4x_relocation, "REL24", true, 0x00ffffff, 0x00ffffff, false),
- HOWTO(R_RELLONG, 0, 2, 32, false, 0, complain_overflow_dont, tic4x_relocation, "RELLONG", true, 0xffffffff, 0xffffffff, false),
- HOWTO(R_PCRWORD, 0, 2, 16, true, 0, complain_overflow_signed, tic4x_relocation, "PCRWORD", true, 0x0000ffff, 0x0000ffff, false),
- HOWTO(R_PCR24, 0, 2, 24, true, 0, complain_overflow_signed, tic4x_relocation, "PCR24", true, 0x00ffffff, 0x00ffffff, false),
- HOWTO(R_PARTLS16, 0, 2, 16, false, 0, complain_overflow_dont, tic4x_relocation, "PARTLS16", true, 0x0000ffff, 0x0000ffff, false),
- HOWTO(R_PARTMS8, 16, 2, 16, false, 0, complain_overflow_dont, tic4x_relocation, "PARTMS8", true, 0x0000ffff, 0x0000ffff, false),
- HOWTO(R_RELWORD, 0, 2, 16, false, 0, complain_overflow_signed, tic4x_relocation, "ARELWORD", true, 0x0000ffff, 0x0000ffff, false),
- HOWTO(R_REL24, 0, 2, 24, false, 0, complain_overflow_signed, tic4x_relocation, "AREL24", true, 0x00ffffff, 0x00ffffff, false),
- HOWTO(R_RELLONG, 0, 2, 32, false, 0, complain_overflow_signed, tic4x_relocation, "ARELLONG", true, 0xffffffff, 0xffffffff, false),
- HOWTO(R_PCRWORD, 0, 2, 16, true, 0, complain_overflow_signed, tic4x_relocation, "APCRWORD", true, 0x0000ffff, 0x0000ffff, false),
- HOWTO(R_PCR24, 0, 2, 24, true, 0, complain_overflow_signed, tic4x_relocation, "APCR24", true, 0x00ffffff, 0x00ffffff, false),
- HOWTO(R_PARTLS16, 0, 2, 16, false, 0, complain_overflow_dont, tic4x_relocation, "APARTLS16", true, 0x0000ffff, 0x0000ffff, false),
- HOWTO(R_PARTMS8, 16, 2, 16, false, 0, complain_overflow_dont, tic4x_relocation, "APARTMS8", true, 0x0000ffff, 0x0000ffff, false),
+ HOWTO(R_RELLONG, 0, 2, 32, false, 0, complain_overflow_dont, tic4x_relocation, "RELLONG", true, 0xffffffff, 0xffffffff, false),
+ HOWTO(R_PCRWORD, 0, 2, 16, true, 0, complain_overflow_signed, tic4x_relocation, "PCRWORD", true, 0x0000ffff, 0x0000ffff, false),
+ HOWTO(R_PCR24, 0, 2, 24, true, 0, complain_overflow_signed, tic4x_relocation, "PCR24", true, 0x00ffffff, 0x00ffffff, false),
+ HOWTO(R_PARTLS16, 0, 2, 16, false, 0, complain_overflow_dont, tic4x_relocation, "PARTLS16", true, 0x0000ffff, 0x0000ffff, false),
+ HOWTO(R_PARTMS8, 16, 2, 16, false, 0, complain_overflow_dont, tic4x_relocation, "PARTMS8", true, 0x0000ffff, 0x0000ffff, false),
+ HOWTO(R_RELWORD, 0, 2, 16, false, 0, complain_overflow_signed, tic4x_relocation, "ARELWORD", true, 0x0000ffff, 0x0000ffff, false),
+ HOWTO(R_REL24, 0, 2, 24, false, 0, complain_overflow_signed, tic4x_relocation, "AREL24", true, 0x00ffffff, 0x00ffffff, false),
+ HOWTO(R_RELLONG, 0, 2, 32, false, 0, complain_overflow_signed, tic4x_relocation, "ARELLONG", true, 0xffffffff, 0xffffffff, false),
+ HOWTO(R_PCRWORD, 0, 2, 16, true, 0, complain_overflow_signed, tic4x_relocation, "APCRWORD", true, 0x0000ffff, 0x0000ffff, false),
+ HOWTO(R_PCR24, 0, 2, 24, true, 0, complain_overflow_signed, tic4x_relocation, "APCR24", true, 0x00ffffff, 0x00ffffff, false),
+ HOWTO(R_PARTLS16, 0, 2, 16, false, 0, complain_overflow_dont, tic4x_relocation, "APARTLS16", true, 0x0000ffff, 0x0000ffff, false),
+ HOWTO(R_PARTMS8, 16, 2, 16, false, 0, complain_overflow_dont, tic4x_relocation, "APARTMS8", true, 0x0000ffff, 0x0000ffff, false),
};
#define HOWTO_SIZE (sizeof(tic4x_howto_table) / sizeof(tic4x_howto_table[0]))
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index e47b4d0..694fb12 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -1246,7 +1246,7 @@ Special entry points for gdb to swap in coff symbol table parts:
. struct coff_link_hash_entry *, struct internal_syment *,
. bfd_vma *));
.
-. boolean (*_bfd_coff_adjust_symndx)\
+. boolean (*_bfd_coff_adjust_symndx)
. PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
. struct internal_reloc *, boolean *));
.
diff --git a/bfd/config.bfd b/bfd/config.bfd
index fdc7bbe..9270d7e 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -139,8 +139,8 @@ case "${targ}" in
targ_underscore=yes
;;
arm-*-nto* | nto*arm*)
- targ_defvec=bfd_elf32_littlearmqnx_vec
- targ_selvecs=bfd_elf32_bigarmqnx_vec
+ targ_defvec=bfd_elf32_littlearm_vec
+ targ_selvecs=bfd_elf32_bigarm_vec
;;
arm-*-riscix*)
targ_defvec=riscix_vec
@@ -370,8 +370,8 @@ case "${targ}" in
targ_defvec=bfd_elf32_i386_vec
targ_selvecs=i386coff_vec
;;
- i[3456]86-*-nto-qnx*)
- targ_defvec=bfd_elf32_i386qnx_vec
+ i[3456]86-*-nto*)
+ targ_defvec=bfd_elf32_i386_vec
targ_selvecs=i386coff_vec
;;
i[3456]86-*-chorus*)
@@ -393,6 +393,11 @@ case "${targ}" in
targ_defvec=bfd_elf32_i386_vec
targ_selvecs="i386coff_vec i386aout_vec"
;;
+ i[3456]86-*-darwin* | i[3456]86-*-macos10* | i[3456]86-*-rhapsody*)
+ targ_defvec=mach_o_le_vec
+ targ_selvecs="mach_o_le_vec mach_o_be_vec mach_o_fat_vec pef_vec pef_xlib_vec sym_vec"
+ targ_archs="bfd_i386_arch bfd_powerpc_arch bfd_rs6000_arch"
+ ;;
i[3456]86-sequent-bsd*)
targ_defvec=i386dynix_vec
targ_underscore=yes
@@ -691,11 +696,11 @@ case "${targ}" in
;;
mips*el-*-netbsd*)
targ_defvec=bfd_elf32_littlemips_vec
- targ_selvecs="bfd_elf32_bigmips_vec ecoff_little_vec ecoff_big_vec"
+ targ_selvecs="bfd_elf32_bigmips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec ecoff_little_vec ecoff_big_vec"
;;
mips*-*-netbsd*)
targ_defvec=bfd_elf32_bigmips_vec
- targ_selvecs="bfd_elf32_littlemips_vec ecoff_big_vec ecoff_little_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
@@ -885,6 +890,11 @@ case "${targ}" in
targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec"
targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec"
;;
+ powerpc-*-darwin* | powerpc-*-macos10* | powerpc-*-rhapsody*)
+ targ_defvec=mach_o_be_vec
+ targ_selvecs="mach_o_be_vec mach_o_le_vec mach_o_fat_vec pef_vec pef_xlib_vec sym_vec"
+ targ_archs="bfd_powerpc_arch bfd_rs6000_arch bfd_i386_arch"
+ ;;
powerpc-*-macos* | powerpc-*-mpw*)
targ_defvec=pmac_xcoff_vec
;;
@@ -893,12 +903,12 @@ case "${targ}" in
targ_selvecs="nlm32_powerpc_vec rs6000coff_vec"
;;
powerpc-*-nto*)
- targ_defvec=bfd_elf32_powerpcqnx_vec
- targ_selvecs="rs6000coff_vec bfd_elf32_powerpcleqnx_vec ppcboot_vec"
+ targ_defvec=bfd_elf32_powerpc_vec
+ targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec"
;;
powerpcle-*-nto*)
- targ_defvec=bfd_elf32_powerpcleqnx_vec
- targ_selvecs="rs6000coff_vec bfd_elf32_powerpcqnx_vec ppcboot_vec"
+ targ_defvec=bfd_elf32_powerpcle_vec
+ targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
;;
powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \
powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-vxworks* |\
@@ -949,7 +959,7 @@ case "${targ}" in
targ_defvec=bfd_elf32_shblin_vec
targ_selvecs=bfd_elf32_shlin_vec
#ifdef BFD64
- targ_selvecs="${targ_selvecs} bfd_elf32_sh64_vec bfd_elf32_sh64l_vec bfd_elf64_sh64_vec bfd_elf64_sh64l_vec"
+ targ_selvecs="${targ_selvecs} bfd_elf32_sh64lin_vec bfd_elf32_sh64blin_vec bfd_elf64_sh64lin_vec bfd_elf64_sh64blin_vec"
#endif
;;
sh*eb-*-linux*)
@@ -985,7 +995,7 @@ case "${targ}" in
targ_defvec=bfd_elf32_shlnbsd_vec
targ_selvecs="bfd_elf32_shnbsd_vec shcoff_vec shlcoff_vec"
#ifdef BFD64
- targ_selvecs="${targ_selvecs} bfd_elf32_sh64_vec bfd_elf32_sh64l_vec bfd_elf64_sh64_vec bfd_elf64_sh64l_vec"
+ targ_selvecs="${targ_selvecs} bfd_elf32_sh64lnbsd_vec bfd_elf32_sh64nbsd_vec bfd_elf64_sh64lnbsd_vec bfd_elf64_sh64nbsd_vec"
#endif
;;
sh*le-*-netbsdelf*)
@@ -996,7 +1006,7 @@ case "${targ}" in
targ_defvec=bfd_elf32_shnbsd_vec
targ_selvecs="bfd_elf32_shlnbsd_vec shcoff_vec shlcoff_vec"
#ifdef BFD64
- targ_selvecs="${targ_selvecs} bfd_elf32_sh64_vec bfd_elf32_sh64l_vec bfd_elf64_sh64_vec bfd_elf64_sh64l_vec"
+ targ_selvecs="${targ_selvecs} bfd_elf32_sh64lnbsd_vec bfd_elf32_sh64nbsd_vec bfd_elf64_sh64lnbsd_vec bfd_elf64_sh64nbsd_vec"
#endif
;;
sh*-*-netbsdelf*)
@@ -1021,8 +1031,8 @@ case "${targ}" in
targ_underscore=yes
;;
sh-*-nto*)
- targ_defvec=bfd_elf32_shqnx_vec
- targ_selvecs="bfd_elf32_shlqnx_vec shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec"
+ targ_defvec=bfd_elf32_sh_vec
+ targ_selvecs="bfd_elf32_shl_vec shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec"
targ_underscore=yes
;;
sh-*-pe)
diff --git a/bfd/configure b/bfd/configure
index 794cb62..6eb4abb 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -5975,12 +5975,14 @@ fi
all_targets=false
defvec=
selvecs=
+assocvecs=
selarchs=
TDEFINES=
for targ in $target $canon_targets
do
if test "x$targ" = "xall"; then
all_targets=true
+ assocvecs="$assocvecs $targ_defvec $targ_selvecs"
else
. $srcdir/config.bfd
if test "x$targ" = "x$target"; then
@@ -6011,6 +6013,17 @@ done
selvecs="$f"
+# uniq the associated vectors in all the configured targets.
+f=""
+for i in $assocvecs ; do
+ case " $f " in
+ *" $i "*) ;;
+ *) f="$f $i" ;;
+ esac
+done
+assocvecs="$f"
+
+
# uniq the architectures in all the configured targets.
f=""
for i in $selarchs ; do
@@ -6061,8 +6074,7 @@ do
bfd_elf32_big_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
bfd_elf32_bigarm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
- bfd_elf32_bigarm_vec) tb="$tb elfarm-nabi.lo elf32-qnx.lo elf32.lo $elf" ;;
- bfd_elf32_bigarmqnx_vec) tb="$tb elfarm-nabi.lo elf32-qnx.lo elf32.lo $elf" ;;
+ bfd_elf32_bigarm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
@@ -6074,9 +6086,8 @@ do
bfd_elf32_hppa_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;;
- bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386.lo elf32-qnx.lo elf32.lo $elf" ;;
- bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32-qnx.lo elf32.lo $elf" ;;
- bfd_elf32_i386qnx_vec) tb="$tb elf32-i386.lo elf32-qnx.lo elf32.lo $elf" ;;
+ bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
+ bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;;
@@ -6086,8 +6097,7 @@ do
bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
- bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32-qnx.lo elf32.lo $elf" ;;
- bfd_elf32_littlearmqnx_vec) tb="$tb elfarm-nabi.lo elf32-qnx.lo elf32.lo $elf" ;;
+ bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
bfd_elf32_m68hc11_vec) tb="$tb elf32-m68hc11.lo elf32.lo $elf" ;;
@@ -6106,10 +6116,8 @@ do
bfd_elf32_or32_big_vec) tb="$tb elf32-or32.lo elf32.lo $elf" ;;
bfd_elf32_pj_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
bfd_elf32_pjl_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
- bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32-qnx.lo elf32.lo $elf" ;;
- bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32-qnx.lo elf32.lo $elf" ;;
- bfd_elf32_powerpcleqnx_vec) tb="$tb elf32-ppc.lo elf32-qnx.lo elf32.lo $elf" ;;
- bfd_elf32_powerpcqnx_vec) tb="$tb elf32-ppc.lo elf32-qnx.lo elf32.lo $elf" ;;
+ bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
+ bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
bfd_elf32_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;;
# FIXME: We include cofflink.lo not because it's needed for
# bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec
@@ -6120,14 +6128,12 @@ do
bfd_elf32_sh64blin_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
bfd_elf32_sh64lnbsd_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;;
bfd_elf32_sh64nbsd_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;;
- bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32-qnx.lo elf32.lo $elf coff-sh.lo" ;;
- bfd_elf32_shblin_vec) tb="$tb elf32-sh.lo elf32-qnx.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
- bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32-qnx.lo elf32.lo elf32-qnx.lo $elf coff-sh.lo" ;;
- bfd_elf32_shlin_vec) tb="$tb elf32-sh.lo elf32-qnx.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
- bfd_elf32_shlnbsd_vec) tb="$tb elf32-sh.lo elf32-qnx.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
- bfd_elf32_shlqnx_vec) tb="$tb elf32-sh.lo elf32-qnx.lo elf32.lo $elf coff-sh.lo" ;;
- bfd_elf32_shnbsd_vec) tb="$tb elf32-sh.lo elf32-qnx.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
- bfd_elf32_shqnx_vec) tb="$tb elf32-sh.lo elf32-qnx.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_shblin_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_shlin_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_shlnbsd_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_shnbsd_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
@@ -6320,9 +6326,12 @@ if test x${all_targets} = xtrue ; then
selvecs=
havevecs=
selarchs=
+ test -n "$assocvecs" &&
+ assocvecs=`echo $assocvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
else # all_targets is true
# Only set these if they will be nonempty, for the clever echo.
havevecs=
+ assocvecs=
test -n "$selvecs" &&
havevecs=`echo $selvecs | sed -e 's/^/-DHAVE_/' -e 's/ \(.\)/ -DHAVE_\1/g'`
test -n "$selvecs" &&
@@ -6343,10 +6352,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:6347: checking for gcc version with buggy 64-bit support" >&5
+echo "configure:6356: 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 6350 "configure"
+#line 6359 "configure"
#include "confdefs.h"
:__GNUC__:__GNUC_MINOR__:__i386__:
EOF
@@ -6383,6 +6392,7 @@ esac
tdefaults=""
test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"
+test -n "${assocvecs}" && tdefaults="${tdefaults} -DASSOCIATED_VECS='${assocvecs}'"
test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'"
test -n "${havevecs}" && tdefaults="${tdefaults} ${havevecs}"
@@ -6391,17 +6401,17 @@ 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:6395: checking for $ac_hdr" >&5
+echo "configure:6405: 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 6400 "configure"
+#line 6410 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6415: \"$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*
@@ -6430,12 +6440,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6434: checking for $ac_func" >&5
+echo "configure:6444: 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 6439 "configure"
+#line 6449 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6458,7 +6468,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6472: \"$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
@@ -6483,7 +6493,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:6487: checking for working mmap" >&5
+echo "configure:6497: 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
@@ -6491,7 +6501,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 6495 "configure"
+#line 6505 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -6644,7 +6654,7 @@ main()
}
EOF
-if { (eval echo configure:6648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6658: \"$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
@@ -6669,12 +6679,12 @@ fi
for ac_func in madvise mprotect
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6673: checking for $ac_func" >&5
+echo "configure:6683: 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 6678 "configure"
+#line 6688 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6697,7 +6707,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6711: \"$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 b59089d..cb39e8f 100644
--- a/bfd/configure.in
+++ b/bfd/configure.in
@@ -471,12 +471,14 @@ fi
all_targets=false
defvec=
selvecs=
+assocvecs=
selarchs=
TDEFINES=
for targ in $target $canon_targets
do
if test "x$targ" = "xall"; then
all_targets=true
+ assocvecs="$assocvecs $targ_defvec $targ_selvecs"
else
. $srcdir/config.bfd
if test "x$targ" = "x$target"; then
@@ -507,6 +509,17 @@ done
selvecs="$f"
+# uniq the associated vectors in all the configured targets.
+f=""
+for i in $assocvecs ; do
+ case " $f " in
+ *" $i "*) ;;
+ *) f="$f $i" ;;
+ esac
+done
+assocvecs="$f"
+
+
# uniq the architectures in all the configured targets.
f=""
for i in $selarchs ; do
@@ -557,8 +570,7 @@ do
bfd_elf32_big_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
bfd_elf32_bigarm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
- bfd_elf32_bigarm_vec) tb="$tb elfarm-nabi.lo elf32-qnx.lo elf32.lo $elf" ;;
- bfd_elf32_bigarmqnx_vec) tb="$tb elfarm-nabi.lo elf32-qnx.lo elf32.lo $elf" ;;
+ bfd_elf32_bigarm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
@@ -570,9 +582,8 @@ do
bfd_elf32_hppa_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;;
- bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386.lo elf32-qnx.lo elf32.lo $elf" ;;
- bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32-qnx.lo elf32.lo $elf" ;;
- bfd_elf32_i386qnx_vec) tb="$tb elf32-i386.lo elf32-qnx.lo elf32.lo $elf" ;;
+ bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
+ bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;;
@@ -582,8 +593,7 @@ do
bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
- bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32-qnx.lo elf32.lo $elf" ;;
- bfd_elf32_littlearmqnx_vec) tb="$tb elfarm-nabi.lo elf32-qnx.lo elf32.lo $elf" ;;
+ bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
bfd_elf32_m68hc11_vec) tb="$tb elf32-m68hc11.lo elf32.lo $elf" ;;
@@ -602,10 +612,8 @@ do
bfd_elf32_or32_big_vec) tb="$tb elf32-or32.lo elf32.lo $elf" ;;
bfd_elf32_pj_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
bfd_elf32_pjl_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
- bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32-qnx.lo elf32.lo $elf" ;;
- bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32-qnx.lo elf32.lo $elf" ;;
- bfd_elf32_powerpcleqnx_vec) tb="$tb elf32-ppc.lo elf32-qnx.lo elf32.lo $elf" ;;
- bfd_elf32_powerpcqnx_vec) tb="$tb elf32-ppc.lo elf32-qnx.lo elf32.lo $elf" ;;
+ bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
+ bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
bfd_elf32_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;;
# FIXME: We include cofflink.lo not because it's needed for
# bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec
@@ -616,14 +624,12 @@ do
bfd_elf32_sh64blin_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
bfd_elf32_sh64lnbsd_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;;
bfd_elf32_sh64nbsd_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;;
- bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32-qnx.lo elf32.lo $elf coff-sh.lo" ;;
- bfd_elf32_shblin_vec) tb="$tb elf32-sh.lo elf32-qnx.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
- bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32-qnx.lo elf32.lo elf32-qnx.lo $elf coff-sh.lo" ;;
- bfd_elf32_shlin_vec) tb="$tb elf32-sh.lo elf32-qnx.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
- bfd_elf32_shlnbsd_vec) tb="$tb elf32-sh.lo elf32-qnx.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
- bfd_elf32_shlqnx_vec) tb="$tb elf32-sh.lo elf32-qnx.lo elf32.lo $elf coff-sh.lo" ;;
- bfd_elf32_shnbsd_vec) tb="$tb elf32-sh.lo elf32-qnx.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
- bfd_elf32_shqnx_vec) tb="$tb elf32-sh.lo elf32-qnx.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_shblin_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_shlin_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_shlnbsd_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_shnbsd_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
@@ -816,9 +822,12 @@ if test x${all_targets} = xtrue ; then
selvecs=
havevecs=
selarchs=
+ test -n "$assocvecs" &&
+ assocvecs=`echo $assocvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
else # all_targets is true
# Only set these if they will be nonempty, for the clever echo.
havevecs=
+ assocvecs=
test -n "$selvecs" &&
havevecs=`echo $selvecs | sed -e 's/^/-DHAVE_/' -e 's/ \(.\)/ -DHAVE_\1/g'`
test -n "$selvecs" &&
@@ -866,6 +875,7 @@ AC_SUBST(bfd_default_target_size)
tdefaults=""
test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"
+test -n "${assocvecs}" && tdefaults="${tdefaults} -DASSOCIATED_VECS='${assocvecs}'"
test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'"
test -n "${havevecs}" && tdefaults="${tdefaults} ${havevecs}"
AC_SUBST(tdefaults)
diff --git a/bfd/doc/Makefile.in b/bfd/doc/Makefile.in
index d25bbf2..ec09ffb 100644
--- a/bfd/doc/Makefile.in
+++ b/bfd/doc/Makefile.in
@@ -245,7 +245,7 @@ DIST_COMMON = ChangeLog Makefile.am Makefile.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-TAR = tar
+TAR = gtar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index dcccc48..2fae2b4 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -235,11 +235,79 @@ enum elf_link_info_type
ELF_INFO_TYPE_STABS,
ELF_INFO_TYPE_MERGE,
ELF_INFO_TYPE_EH_FRAME,
- ELF_INFO_TYPE_EH_FRAME_HDR,
ELF_INFO_TYPE_JUST_SYMS,
ELF_INFO_TYPE_LAST
};
+/* Structures used by the eh_frame optimization code. */
+struct cie_header
+{
+ unsigned int length;
+ unsigned int id;
+};
+
+struct cie
+{
+ struct cie_header hdr;
+ unsigned char version;
+ unsigned char augmentation[20];
+ unsigned int code_align;
+ int data_align;
+ unsigned int ra_column;
+ unsigned int augmentation_size;
+ struct elf_link_hash_entry *personality;
+ unsigned char per_encoding;
+ unsigned char lsda_encoding;
+ unsigned char fde_encoding;
+ unsigned char initial_insn_length;
+ unsigned char make_relative;
+ unsigned char make_lsda_relative;
+ unsigned char initial_instructions[50];
+};
+
+struct eh_cie_fde
+{
+ unsigned int offset;
+ unsigned int size;
+ asection *sec;
+ unsigned int new_offset;
+ unsigned char fde_encoding;
+ unsigned char lsda_encoding;
+ unsigned char lsda_offset;
+ unsigned char cie : 1;
+ unsigned char removed : 1;
+ unsigned char make_relative : 1;
+ unsigned char make_lsda_relative : 1;
+ unsigned char per_encoding_relative : 1;
+};
+
+struct eh_frame_sec_info
+{
+ unsigned int count;
+ unsigned int alloced;
+ struct eh_cie_fde entry[1];
+};
+
+struct eh_frame_array_ent
+{
+ bfd_vma initial_loc;
+ bfd_vma fde;
+};
+
+struct eh_frame_hdr_info
+{
+ struct cie last_cie;
+ asection *last_cie_sec;
+ asection *hdr_sec;
+ unsigned int last_cie_offset;
+ unsigned int fde_count, array_count;
+ struct eh_frame_array_ent *array;
+ /* TRUE if .eh_frame_hdr should contain the sorted search table.
+ We build it if we successfully read all .eh_frame input sections
+ and recognize them. */
+ boolean table;
+};
+
/* Cached start, size and alignment of PT_TLS segment. */
struct elf_link_tls_segment
{
@@ -294,6 +362,9 @@ struct elf_link_hash_table
/* A pointer to information used to merge SEC_MERGE sections. */
PTR merge_info;
+ /* Used by eh_frame code when editing .eh_frame. */
+ struct eh_frame_hdr_info eh_info;
+
/* A linked list of local symbols to be added to .dynsym. */
struct elf_link_local_dynamic_entry *dynlocal;
@@ -770,22 +841,6 @@ struct elf_backend_data
boolean (*elf_backend_write_section)
PARAMS ((bfd *, asection *, bfd_byte *));
- /* This function, if defined, sets up the file positions for non PT_LOAD
- segments, especially for segments containing non-allocated sections. */
- void (*set_nonloadable_filepos)
- PARAMS ((bfd *, Elf_Internal_Phdr *));
-
- /* This function, if defined, returns true if the section is contained
- within the segment. File positions are compared. */
- boolean (*is_contained_by_filepos)
- PARAMS ((asection *, Elf_Internal_Phdr *));
-
- /* This function, if defined, returns true if copy_private_bfd_data
- should be called. It provides a way of overriding default
- test conditions in _bfd_elf_copy_private_section_data. */
- boolean (*copy_private_bfd_data_p)
- PARAMS ((bfd *, asection *, bfd *, asection *));
-
/* The level of IRIX compatibility we're striving for.
MIPS ELF specific function. */
irix_compat_t (*elf_backend_mips_irix_compat)
@@ -1134,12 +1189,12 @@ struct elf_obj_tdata
include this field for a MIPS ELF target. */
asection **local_stubs;
- /* Used to determine if the e_flags field has been initialized */
- boolean flags_init;
-
/* Used to determine if PT_GNU_EH_FRAME segment header should be
created. */
- boolean eh_frame_hdr;
+ asection *eh_frame_hdr;
+
+ /* Used to determine if the e_flags field has been initialized */
+ boolean flags_init;
/* Number of symbol version definitions we are about to emit. */
unsigned int cverdefs;
@@ -1382,16 +1437,16 @@ extern void _bfd_elf_strtab_finalize
PARAMS ((struct elf_strtab_hash *));
extern boolean _bfd_elf_discard_section_eh_frame
- PARAMS ((bfd *, struct bfd_link_info *, asection *, asection *,
+ PARAMS ((bfd *, struct bfd_link_info *, asection *,
boolean (*) (bfd_vma, PTR), struct elf_reloc_cookie *));
extern boolean _bfd_elf_discard_section_eh_frame_hdr
- PARAMS ((bfd *, struct bfd_link_info *, asection *));
+ PARAMS ((bfd *, struct bfd_link_info *));
extern bfd_vma _bfd_elf_eh_frame_section_offset
PARAMS ((bfd *, asection *, bfd_vma));
extern boolean _bfd_elf_write_section_eh_frame
- PARAMS ((bfd *, asection *, asection *, bfd_byte *));
+ PARAMS ((bfd *, struct bfd_link_info *, asection *, bfd_byte *));
extern boolean _bfd_elf_write_section_eh_frame_hdr
- PARAMS ((bfd *, asection *));
+ PARAMS ((bfd *, struct bfd_link_info *));
extern boolean _bfd_elf_maybe_strip_eh_frame_hdr
PARAMS ((struct bfd_link_info *));
diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c
index e80fc6c..fa152ab 100644
--- a/bfd/elf-eh-frame.c
+++ b/bfd/elf-eh-frame.c
@@ -26,74 +26,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define EH_FRAME_HDR_SIZE 8
-struct cie_header
-{
- unsigned int length;
- unsigned int id;
-};
-
-struct cie
-{
- struct cie_header hdr;
- unsigned char version;
- unsigned char augmentation[20];
- unsigned int code_align;
- int data_align;
- unsigned int ra_column;
- unsigned int augmentation_size;
- struct elf_link_hash_entry *personality;
- unsigned char per_encoding;
- unsigned char lsda_encoding;
- unsigned char fde_encoding;
- unsigned char initial_insn_length;
- unsigned char make_relative;
- unsigned char make_lsda_relative;
- unsigned char initial_instructions[50];
-};
-
-struct eh_cie_fde
-{
- unsigned int offset;
- unsigned int size;
- asection *sec;
- unsigned int new_offset;
- unsigned char fde_encoding;
- unsigned char lsda_encoding;
- unsigned char lsda_offset;
- unsigned char cie : 1;
- unsigned char removed : 1;
- unsigned char make_relative : 1;
- unsigned char make_lsda_relative : 1;
- unsigned char per_encoding_relative : 1;
-};
-
-struct eh_frame_sec_info
-{
- unsigned int count;
- unsigned int alloced;
- struct eh_cie_fde entry[1];
-};
-
-struct eh_frame_array_ent
-{
- bfd_vma initial_loc;
- bfd_vma fde;
-};
-
-struct eh_frame_hdr_info
-{
- struct cie last_cie;
- asection *last_cie_sec;
- unsigned int last_cie_offset;
- unsigned int fde_count, array_count;
- struct eh_frame_array_ent *array;
- /* TRUE if .eh_frame_hdr should contain the sorted search table.
- We build it if we successfully read all .eh_frame input sections
- and recognize them. */
- boolean table;
- boolean strip;
-};
-
static bfd_vma read_unsigned_leb128
PARAMS ((bfd *, char *, unsigned int *));
static bfd_signed_vma read_signed_leb128
@@ -282,11 +214,11 @@ int cie_compare (c1, c2)
deleted. */
boolean
-_bfd_elf_discard_section_eh_frame (abfd, info, sec, ehdrsec,
+_bfd_elf_discard_section_eh_frame (abfd, info, sec,
reloc_symbol_deleted_p, cookie)
bfd *abfd;
struct bfd_link_info *info;
- asection *sec, *ehdrsec;
+ asection *sec;
boolean (*reloc_symbol_deleted_p) PARAMS ((bfd_vma, PTR));
struct elf_reloc_cookie *cookie;
{
@@ -294,12 +226,12 @@ _bfd_elf_discard_section_eh_frame (abfd, info, sec, ehdrsec,
bfd_byte *last_cie, *last_fde;
struct cie_header hdr;
struct cie cie;
+ struct elf_link_hash_table *htab;
struct eh_frame_hdr_info *hdr_info;
struct eh_frame_sec_info *sec_info = NULL;
unsigned int leb128_tmp;
unsigned int cie_usage_count, last_cie_ndx, i, offset;
unsigned int make_relative, make_lsda_relative;
- Elf_Internal_Rela *rel;
bfd_size_type new_size;
unsigned int ptr_size;
@@ -317,10 +249,8 @@ _bfd_elf_discard_section_eh_frame (abfd, info, sec, ehdrsec,
return false;
}
- BFD_ASSERT (elf_section_data (ehdrsec)->sec_info_type
- == ELF_INFO_TYPE_EH_FRAME_HDR);
- hdr_info = (struct eh_frame_hdr_info *)
- elf_section_data (ehdrsec)->sec_info;
+ htab = elf_hash_table (info);
+ hdr_info = &htab->eh_info;
/* Read the frame unwind information from abfd. */
@@ -414,7 +344,7 @@ _bfd_elf_discard_section_eh_frame (abfd, info, sec, ehdrsec,
/* 64-bit .eh_frame is not supported. */
goto free_no_table;
buf += 4;
- if ((buf - ehbuf) + hdr.length > sec->_raw_size)
+ if ((bfd_size_type) (buf - ehbuf) + hdr.length > sec->_raw_size)
/* CIE/FDE not contained fully in this .eh_frame input section. */
goto free_no_table;
@@ -555,10 +485,9 @@ _bfd_elf_discard_section_eh_frame (abfd, info, sec, ehdrsec,
+ ((buf - ehbuf + per_width - 1)
& ~((bfd_size_type) per_width - 1)));
ENSURE_NO_RELOCS (buf);
- rel = GET_RELOC (buf);
/* Ensure we have a reloc here, against
a global symbol. */
- if (rel != NULL)
+ if (GET_RELOC (buf) != NULL)
{
unsigned long r_symndx;
@@ -626,8 +555,7 @@ _bfd_elf_discard_section_eh_frame (abfd, info, sec, ehdrsec,
goto free_no_table;
ENSURE_NO_RELOCS (buf);
- rel = GET_RELOC (buf);
- if (rel == NULL)
+ if (GET_RELOC (buf) == NULL)
/* This should not happen. */
goto free_no_table;
if ((*reloc_symbol_deleted_p) (buf - ehbuf, cookie))
@@ -636,7 +564,6 @@ _bfd_elf_discard_section_eh_frame (abfd, info, sec, ehdrsec,
be deleted. */
new_size -= hdr.length + 4;
sec_info->entry[sec_info->count].removed = 1;
- memset (rel, 0, sizeof (*rel));
}
else
{
@@ -654,7 +581,6 @@ _bfd_elf_discard_section_eh_frame (abfd, info, sec, ehdrsec,
cie_usage_count++;
hdr_info->fde_count++;
}
- cookie->rel = rel;
if (cie.lsda_encoding != DW_EH_PE_omit)
{
unsigned int dummy;
@@ -745,36 +671,27 @@ free_no_table:
input sections. It finalizes the size of .eh_frame_hdr section. */
boolean
-_bfd_elf_discard_section_eh_frame_hdr (abfd, info, sec)
+_bfd_elf_discard_section_eh_frame_hdr (abfd, info)
bfd *abfd;
struct bfd_link_info *info;
- asection *sec;
{
+ struct elf_link_hash_table *htab;
struct eh_frame_hdr_info *hdr_info;
- unsigned int ptr_size;
-
- ptr_size = (elf_elfheader (abfd)->e_ident[EI_CLASS]
- == ELFCLASS64) ? 8 : 4;
-
- if ((elf_section_data (sec)->sec_info_type
- != ELF_INFO_TYPE_EH_FRAME_HDR)
- || ! info->eh_frame_hdr)
- {
- _bfd_strip_section_from_output (info, sec);
- return false;
- }
+ asection *sec;
- hdr_info = (struct eh_frame_hdr_info *)
- elf_section_data (sec)->sec_info;
- if (hdr_info->strip)
+ htab = elf_hash_table (info);
+ hdr_info = &htab->eh_info;
+ sec = hdr_info->hdr_sec;
+ if (sec == NULL)
return false;
+
sec->_cooked_size = EH_FRAME_HDR_SIZE;
if (hdr_info->table)
sec->_cooked_size += 4 + hdr_info->fde_count * 8;
/* Request program headers to be recalculated. */
elf_tdata (abfd)->program_header_size = 0;
- elf_tdata (abfd)->eh_frame_hdr = true;
+ elf_tdata (abfd)->eh_frame_hdr = sec;
return true;
}
@@ -787,21 +704,21 @@ boolean
_bfd_elf_maybe_strip_eh_frame_hdr (info)
struct bfd_link_info *info;
{
- asection *sec, *o;
+ asection *o;
bfd *abfd;
+ struct elf_link_hash_table *htab;
struct eh_frame_hdr_info *hdr_info;
- sec = bfd_get_section_by_name (elf_hash_table (info)->dynobj, ".eh_frame_hdr");
- if (sec == NULL || bfd_is_abs_section (sec->output_section))
+ htab = elf_hash_table (info);
+ hdr_info = &htab->eh_info;
+ if (hdr_info->hdr_sec == NULL)
return true;
- hdr_info
- = bfd_zmalloc (sizeof (struct eh_frame_hdr_info));
- if (hdr_info == NULL)
- return false;
-
- elf_section_data (sec)->sec_info = hdr_info;
- elf_section_data (sec)->sec_info_type = ELF_INFO_TYPE_EH_FRAME_HDR;
+ if (bfd_is_abs_section (hdr_info->hdr_sec->output_section))
+ {
+ hdr_info->hdr_sec = NULL;
+ return true;
+ }
abfd = NULL;
if (info->eh_frame_hdr)
@@ -816,11 +733,12 @@ _bfd_elf_maybe_strip_eh_frame_hdr (info)
if (abfd == NULL)
{
- _bfd_strip_section_from_output (info, sec);
- hdr_info->strip = true;
+ _bfd_strip_section_from_output (info, hdr_info->hdr_sec);
+ hdr_info->hdr_sec = NULL;
+ return true;
}
- else
- hdr_info->table = true;
+
+ hdr_info->table = true;
return true;
}
@@ -878,9 +796,8 @@ _bfd_elf_eh_frame_section_offset (output_bfd, sec, offset)
for run-time relocation against LSDA field. */
if (sec_info->entry[mid].make_lsda_relative
&& ! sec_info->entry[mid].cie
- && (offset
- == (sec_info->entry[mid].offset + 8
- + sec_info->entry[mid].lsda_offset)))
+ && (offset == (sec_info->entry[mid].offset + 8
+ + sec_info->entry[mid].lsda_offset)))
return (bfd_vma) -2;
return (offset + sec_info->entry[mid].new_offset
@@ -891,12 +808,14 @@ _bfd_elf_eh_frame_section_offset (output_bfd, sec, offset)
contents. */
boolean
-_bfd_elf_write_section_eh_frame (abfd, sec, ehdrsec, contents)
+_bfd_elf_write_section_eh_frame (abfd, info, sec, contents)
bfd *abfd;
- asection *sec, *ehdrsec;
+ struct bfd_link_info *info;
+ asection *sec;
bfd_byte *contents;
{
struct eh_frame_sec_info *sec_info;
+ struct elf_link_hash_table *htab;
struct eh_frame_hdr_info *hdr_info;
unsigned int i;
bfd_byte *p, *buf;
@@ -914,19 +833,13 @@ _bfd_elf_write_section_eh_frame (abfd, sec, ehdrsec, contents)
sec->_raw_size);
sec_info = (struct eh_frame_sec_info *)
elf_section_data (sec)->sec_info;
- hdr_info = NULL;
- if (ehdrsec
- && (elf_section_data (ehdrsec)->sec_info_type
- == ELF_INFO_TYPE_EH_FRAME_HDR))
- {
- hdr_info = (struct eh_frame_hdr_info *)
- elf_section_data (ehdrsec)->sec_info;
- if (hdr_info->table && hdr_info->array == NULL)
- hdr_info->array
- = bfd_malloc (hdr_info->fde_count * sizeof(*hdr_info->array));
- if (hdr_info->array == NULL)
- hdr_info = NULL;
- }
+ htab = elf_hash_table (info);
+ hdr_info = &htab->eh_info;
+ if (hdr_info->table && hdr_info->array == NULL)
+ hdr_info->array
+ = bfd_malloc (hdr_info->fde_count * sizeof(*hdr_info->array));
+ if (hdr_info->array == NULL)
+ hdr_info = NULL;
p = contents;
for (i = 0; i < sec_info->count; ++i)
@@ -1174,24 +1087,21 @@ vma_compare (a, b)
sorted by increasing initial_loc) */
boolean
-_bfd_elf_write_section_eh_frame_hdr (abfd, sec)
+_bfd_elf_write_section_eh_frame_hdr (abfd, info)
bfd *abfd;
- asection *sec;
+ struct bfd_link_info *info;
{
+ struct elf_link_hash_table *htab;
struct eh_frame_hdr_info *hdr_info;
- unsigned int ptr_size;
+ asection *sec;
bfd_byte *contents;
asection *eh_frame_sec;
bfd_size_type size;
- ptr_size = (elf_elfheader (sec->owner)->e_ident[EI_CLASS]
- == ELFCLASS64) ? 8 : 4;
-
- BFD_ASSERT (elf_section_data (sec)->sec_info_type
- == ELF_INFO_TYPE_EH_FRAME_HDR);
- hdr_info = (struct eh_frame_hdr_info *)
- elf_section_data (sec)->sec_info;
- if (hdr_info->strip)
+ htab = elf_hash_table (info);
+ hdr_info = &htab->eh_info;
+ sec = hdr_info->hdr_sec;
+ if (sec == NULL)
return true;
size = EH_FRAME_HDR_SIZE;
diff --git a/bfd/elf.c b/bfd/elf.c
index f184c9f..c5987fe 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -2671,18 +2671,17 @@ assign_section_numbers (abfd)
/* Set up the list of section header pointers, in agreement with the
indices. */
amt = section_number * sizeof (Elf_Internal_Shdr *);
- i_shdrp = (Elf_Internal_Shdr **) bfd_alloc (abfd, amt);
+ i_shdrp = (Elf_Internal_Shdr **) bfd_zalloc (abfd, amt);
if (i_shdrp == NULL)
return false;
amt = sizeof (Elf_Internal_Shdr);
- i_shdrp[0] = (Elf_Internal_Shdr *) bfd_alloc (abfd, amt);
+ i_shdrp[0] = (Elf_Internal_Shdr *) bfd_zalloc (abfd, amt);
if (i_shdrp[0] == NULL)
{
bfd_release (abfd, i_shdrp);
return false;
}
- memset (i_shdrp[0], 0, sizeof (Elf_Internal_Shdr));
elf_elfsections (abfd) = i_shdrp;
@@ -3450,10 +3449,9 @@ map_sections_to_segments (abfd)
/* If there is a .eh_frame_hdr section, throw in a PT_GNU_EH_FRAME
segment. */
- eh_frame_hdr = NULL;
- if (elf_tdata (abfd)->eh_frame_hdr)
- eh_frame_hdr = bfd_get_section_by_name (abfd, ".eh_frame_hdr");
- if (eh_frame_hdr != NULL && (eh_frame_hdr->flags & SEC_LOAD))
+ eh_frame_hdr = elf_tdata (abfd)->eh_frame_hdr;
+ if (eh_frame_hdr != NULL
+ && (eh_frame_hdr->output_section->flags & SEC_LOAD) != 0)
{
amt = sizeof (struct elf_segment_map);
m = (struct elf_segment_map *) bfd_zalloc (abfd, amt);
@@ -3462,7 +3460,7 @@ map_sections_to_segments (abfd)
m->next = NULL;
m->p_type = PT_GNU_EH_FRAME;
m->count = 1;
- m->sections[0] = eh_frame_hdr;
+ m->sections[0] = eh_frame_hdr->output_section;
*pm = m;
pm = &m->next;
@@ -3960,11 +3958,6 @@ Error: First section in segment (%s) starts at 0x%x whereas the segment starts a
}
}
- /* If additional nonloadable filepos adjustments are required,
- do them now. */
- if (bed->set_nonloadable_filepos)
- (*bed->set_nonloadable_filepos) (abfd, phdrs);
-
/* Clear out any program headers we allocated but did not use. */
for (; count < alloc; count++, p++)
{
@@ -4038,8 +4031,7 @@ get_program_header_size (abfd)
++segs;
}
- if (elf_tdata (abfd)->eh_frame_hdr
- && bfd_get_section_by_name (abfd, ".eh_frame_hdr") != NULL)
+ if (elf_tdata (abfd)->eh_frame_hdr)
{
/* We need a PT_GNU_EH_FRAME segment. */
++segs;
@@ -4560,13 +4552,6 @@ copy_private_bfd_data (ibfd, obfd)
&& (section->lma + section->_raw_size \
<= SEGMENT_END (segment, base)))
- /* Returns true if the given section is contained within the
- given segment. Filepos addresses are compared in an elf
- backend function. */
-#define IS_CONTAINED_BY_FILEPOS(sec, seg, bed) \
- (bed->is_contained_by_filepos \
- && (*bed->is_contained_by_filepos) (sec, seg))
-
/* Special case: corefile "NOTE" section containing regs, prpsinfo etc. */
#define IS_COREFILE_NOTE(p, s) \
(p->p_type == PT_NOTE \
@@ -4602,9 +4587,7 @@ copy_private_bfd_data (ibfd, obfd)
? IS_CONTAINED_BY_LMA (section, segment, segment->p_paddr) \
: IS_CONTAINED_BY_VMA (section, segment)) \
&& (section->flags & SEC_ALLOC) != 0) \
- || IS_COREFILE_NOTE (segment, section) \
- || (IS_CONTAINED_BY_FILEPOS (section, segment, bed) \
- && (section->flags & SEC_ALLOC) == 0)) \
+ || IS_COREFILE_NOTE (segment, section)) \
&& section->output_section != NULL \
&& ! section->segment_mark)
@@ -4849,7 +4832,6 @@ copy_private_bfd_data (ibfd, obfd)
/* Match up the physical address of the segment with the
LMA address of the output section. */
if (IS_CONTAINED_BY_LMA (output_section, segment, map->p_paddr)
- || IS_CONTAINED_BY_FILEPOS (section, segment, bed)
|| IS_COREFILE_NOTE (segment, section)
|| (bed->want_p_paddr_set_to_zero &&
IS_CONTAINED_BY_VMA (output_section, segment))
@@ -5086,7 +5068,6 @@ copy_private_bfd_data (ibfd, obfd)
#undef SEGMENT_END
#undef IS_CONTAINED_BY_VMA
#undef IS_CONTAINED_BY_LMA
-#undef IS_CONTAINED_BY_FILEPOS
#undef IS_COREFILE_NOTE
#undef IS_SOLARIS_PT_INTERP
#undef INCLUDE_SECTION_IN_SEGMENT
@@ -5106,26 +5087,12 @@ _bfd_elf_copy_private_section_data (ibfd, isec, obfd, osec)
asection *osec;
{
Elf_Internal_Shdr *ihdr, *ohdr;
- const struct elf_backend_data *bed = get_elf_backend_data (ibfd);
if (ibfd->xvec->flavour != bfd_target_elf_flavour
|| obfd->xvec->flavour != bfd_target_elf_flavour)
return true;
- /* Copy over private BFD data if it has not already been copied.
- This must be done here, rather than in the copy_private_bfd_data
- entry point, because the latter is called after the section
- contents have been set, which means that the program headers have
- already been worked out. The backend function provides a way to
- override the test conditions and code path for the call to
- copy_private_bfd_data. */
- if (bed->copy_private_bfd_data_p)
- {
- if ((*bed->copy_private_bfd_data_p) (ibfd, isec, obfd, osec))
- if (! copy_private_bfd_data (ibfd, obfd))
- return false;
- }
- else if (elf_tdata (obfd)->segment_map == NULL && elf_tdata (ibfd)->phdr != NULL)
+ if (elf_tdata (obfd)->segment_map == NULL && elf_tdata (ibfd)->phdr != NULL)
{
asection *s;
@@ -7358,9 +7325,9 @@ _bfd_elf_section_offset (abfd, info, sec, offset)
switch (sec_data->sec_info_type)
{
case ELF_INFO_TYPE_STABS:
- return _bfd_stab_section_offset
- (abfd, &elf_hash_table (info)->merge_info, sec, &sec_data->sec_info,
- offset);
+ return _bfd_stab_section_offset (abfd,
+ &elf_hash_table (info)->merge_info,
+ sec, &sec_data->sec_info, offset);
case ELF_INFO_TYPE_EH_FRAME:
return _bfd_elf_eh_frame_section_offset (abfd, sec, offset);
default:
diff --git a/bfd/elf32-arm.h b/bfd/elf32-arm.h
index 5901aea..d0e7085 100644
--- a/bfd/elf32-arm.h
+++ b/bfd/elf32-arm.h
@@ -367,13 +367,6 @@ static const insn16 t2a1_bx_pc_insn = 0x4778;
static const insn16 t2a2_noop_insn = 0x46c0;
static const insn32 t2a3_b_insn = 0xea000000;
-static const insn16 t2a1_push_insn = 0xb540;
-static const insn16 t2a2_ldr_insn = 0x4e03;
-static const insn16 t2a3_mov_insn = 0x46fe;
-static const insn16 t2a4_bx_insn = 0x4730;
-static const insn32 t2a5_pop_insn = 0xe8bd4040;
-static const insn32 t2a6_bx_insn = 0xe12fff1e;
-
#ifndef ELFARM_NABI_C_INCLUDED
boolean
bfd_elf32_arm_allocate_interworking_sections (info)
@@ -3225,19 +3218,7 @@ elf32_arm_size_dynamic_sections (output_bfd, info)
if (strip)
{
- asection ** spp;
-
- for (spp = &s->output_section->owner->sections;
- *spp != NULL;
- spp = &(*spp)->next)
- {
- if (*spp == s->output_section)
- {
- bfd_section_list_remove (s->output_section->owner, spp);
- --s->output_section->owner->section_count;
- break;
- }
- }
+ _bfd_strip_section_from_output (info, s);
continue;
}
diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c
index 8eff52d..dfbdbe7 100644
--- a/bfd/elf32-cris.c
+++ b/bfd/elf32-cris.c
@@ -1022,7 +1022,8 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
BFD_ASSERT (off != (bfd_vma) -1);
if (!elf_hash_table (info)->dynamic_sections_created
- || (! info->shared && h->dynindx == -1)
+ || (! info->shared
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
|| (info->shared
&& (info->symbolic || h->dynindx == -1)
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)))
diff --git a/bfd/elf32-h8300.c b/bfd/elf32-h8300.c
index c1c77ec..9cb900b 100644
--- a/bfd/elf32-h8300.c
+++ b/bfd/elf32-h8300.c
@@ -2,21 +2,21 @@
Copyright 1993, 1995, 1998, 1999, 2001, 2002
Free Software Foundation, Inc.
-This file is part of BFD, the Binary File Descriptor library.
+ This file is part of BFD, the Binary File Descriptor library.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -61,8 +61,7 @@ static bfd_reloc_status_type special
/* This does not include any relocation information, but should be
good enough for GDB or objdump to read the file. */
-static reloc_howto_type h8_elf_howto_table[] =
-{
+static reloc_howto_type h8_elf_howto_table[] = {
#define R_H8_NONE_X 0
HOWTO (R_H8_NONE, /* type */
0, /* rightshift */
@@ -221,16 +220,14 @@ static reloc_howto_type h8_elf_howto_table[] =
/* This structure is used to map BFD reloc codes to H8 ELF relocs. */
-struct elf_reloc_map
-{
+struct elf_reloc_map {
bfd_reloc_code_real_type bfd_reloc_val;
unsigned char howto_index;
};
/* An array mapping BFD reloc codes to SH ELF relocs. */
-static const struct elf_reloc_map h8_reloc_map[] =
-{
+static const struct elf_reloc_map h8_reloc_map[] = {
{ BFD_RELOC_NONE, R_H8_NONE_X },
{ BFD_RELOC_32, R_H8_DIR32_X },
{ BFD_RELOC_16, R_H8_DIR16_X },
@@ -271,7 +268,7 @@ elf32_h8_info_to_howto (abfd, bfd_reloc, elf_reloc)
r = ELF32_R_TYPE (elf_reloc->r_info);
for (i = 0; i < sizeof (h8_elf_howto_table) / sizeof (reloc_howto_type); i++)
- if (h8_elf_howto_table[i].type== r)
+ if (h8_elf_howto_table[i].type == r)
{
bfd_reloc->howto = &h8_elf_howto_table[i];
return;
@@ -830,14 +827,34 @@ elf32_h8_relax_section (abfd, sec, link_info, again)
elf_section_data (sec)->this_hdr.contents = contents;
symtab_hdr->contents = (unsigned char *) isymbuf;
+ /* Get the instruction code being relaxed. */
+ code = bfd_get_8 (abfd, contents + irel->r_offset - 1);
+
/* If the previous instruction conditionally jumped around
this instruction, we may be able to reverse the condition
and redirect the previous instruction to the target of
this instruction.
Such sequences are used by the compiler to deal with
- long conditional branches. */
- if ((int) gap <= 130
+ long conditional branches.
+
+ Only perform this optimisation for jumps (code 0x5a) not
+ subroutine calls, as otherwise it could transform:
+
+ mov.w r0,r0
+ beq .L1
+ jsr @_bar
+ .L1: rts
+ _bar: rts
+ into:
+ mov.w r0,r0
+ bne _bar
+ rts
+ _bar: rts
+
+ which changes the call (jsr) into a branch (bne). */
+ if (code == 0x5a
+ && (int) gap <= 130
&& (int) gap >= -128
&& last_reloc
&& ELF32_R_TYPE (last_reloc->r_info) == R_H8_PCREL8
@@ -870,11 +887,10 @@ elf32_h8_relax_section (abfd, sec, link_info, again)
= ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
ELF32_R_TYPE (R_H8_NONE));
- last_reloc->r_info
+ last_reloc->r_info
= ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
- ELF32_R_TYPE (R_H8_PCREL8));
- last_reloc->r_addend = irel->r_addend;
-
+ ELF32_R_TYPE (R_H8_PCREL8));
+ last_reloc->r_addend = irel->r_addend;
code = bfd_get_8 (abfd,
contents + last_reloc->r_offset - 1);
@@ -894,9 +910,6 @@ elf32_h8_relax_section (abfd, sec, link_info, again)
}
}
- /* We could not eliminate this jump, so just shorten it. */
- code = bfd_get_8 (abfd, contents + irel->r_offset - 1);
-
if (code == 0x5e)
bfd_put_8 (abfd, 0x55, contents + irel->r_offset - 1);
else if (code == 0x5a)
@@ -938,18 +951,18 @@ elf32_h8_relax_section (abfd, sec, link_info, again)
/* If the distance is within -126..+130 inclusive, then we can
relax this jump. +130 is valid since the target will move
two bytes closer if we do relax this branch. */
- if ((int)gap >= -126 && (int)gap <= 130)
+ if ((int) gap >= -126 && (int) gap <= 130)
{
- unsigned char code;
+ unsigned char code;
- /* Note that we've changed the relocs, section contents,
+ /* Note that we've changed the relocs, section contents,
etc. */
- elf_section_data (sec)->relocs = internal_relocs;
- elf_section_data (sec)->this_hdr.contents = contents;
+ elf_section_data (sec)->relocs = internal_relocs;
+ elf_section_data (sec)->this_hdr.contents = contents;
symtab_hdr->contents = (unsigned char *) isymbuf;
- /* Get the opcode. */
- code = bfd_get_8 (abfd, contents + irel->r_offset - 2);
+ /* Get the opcode. */
+ code = bfd_get_8 (abfd, contents + irel->r_offset - 2);
if (code == 0x58)
{
@@ -967,18 +980,18 @@ elf32_h8_relax_section (abfd, sec, link_info, again)
abort ();
/* Fix the relocation's type. */
- irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+ irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
R_H8_PCREL8);
- irel->r_offset--;
+ irel->r_offset--;
- /* Delete two bytes of data. */
- if (!elf32_h8_relax_delete_bytes (abfd, sec,
+ /* Delete two bytes of data. */
+ if (!elf32_h8_relax_delete_bytes (abfd, sec,
irel->r_offset + 1, 2))
goto error_return;
- /* That will change things, so, we should relax again.
+ /* That will change things, so, we should relax again.
Note that this is not required, and it may be slow. */
- *again = true;
+ *again = true;
}
break;
}
@@ -990,53 +1003,53 @@ elf32_h8_relax_section (abfd, sec, link_info, again)
bfd_vma value = symval + irel->r_addend;
if ((bfd_get_mach (abfd) == bfd_mach_h8300
- && value >= 0xff00
- && value <= 0xffff)
- || ((bfd_get_mach (abfd) == bfd_mach_h8300h
+ && value >= 0xff00
+ && value <= 0xffff)
+ || ((bfd_get_mach (abfd) == bfd_mach_h8300h
|| bfd_get_mach (abfd) == bfd_mach_h8300s)
&& value >= 0xffff00
&& value <= 0xffffff))
{
- unsigned char code;
+ unsigned char code;
- /* Note that we've changed the relocs, section contents,
+ /* Note that we've changed the relocs, section contents,
etc. */
- elf_section_data (sec)->relocs = internal_relocs;
- elf_section_data (sec)->this_hdr.contents = contents;
+ elf_section_data (sec)->relocs = internal_relocs;
+ elf_section_data (sec)->this_hdr.contents = contents;
symtab_hdr->contents = (unsigned char *) isymbuf;
- /* Get the opcode. */
- code = bfd_get_8 (abfd, contents + irel->r_offset - 2);
+ /* Get the opcode. */
+ code = bfd_get_8 (abfd, contents + irel->r_offset - 2);
- /* Sanity check. */
- if (code != 0x6a)
+ /* Sanity check. */
+ if (code != 0x6a)
abort ();
- code = bfd_get_8 (abfd, contents + irel->r_offset - 1);
+ code = bfd_get_8 (abfd, contents + irel->r_offset - 1);
- if ((code & 0xf0) == 0x00)
+ if ((code & 0xf0) == 0x00)
bfd_put_8 (abfd,
(code & 0xf) | 0x20,
- contents + irel->r_offset - 2);
- else if ((code & 0xf0) == 0x80)
+ contents + irel->r_offset - 2);
+ else if ((code & 0xf0) == 0x80)
bfd_put_8 (abfd,
(code & 0xf) | 0x30,
- contents + irel->r_offset - 2);
- else
+ contents + irel->r_offset - 2);
+ else
abort ();
- /* Fix the relocation's type. */
- irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+ /* Fix the relocation's type. */
+ irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
R_H8_DIR8);
- /* Delete two bytes of data. */
- if (!elf32_h8_relax_delete_bytes (abfd, sec,
+ /* Delete two bytes of data. */
+ if (!elf32_h8_relax_delete_bytes (abfd, sec,
irel->r_offset + 1, 2))
goto error_return;
- /* That will change things, so, we should relax again.
+ /* That will change things, so, we should relax again.
Note that this is not required, and it may be slow. */
- *again = true;
+ *again = true;
}
break;
}
@@ -1048,52 +1061,52 @@ elf32_h8_relax_section (abfd, sec, link_info, again)
bfd_vma value = symval + irel->r_addend;
if ((bfd_get_mach (abfd) == bfd_mach_h8300
- && value >= 0xff00
- && value <= 0xffff)
- || ((bfd_get_mach (abfd) == bfd_mach_h8300h
+ && value >= 0xff00
+ && value <= 0xffff)
+ || ((bfd_get_mach (abfd) == bfd_mach_h8300h
|| bfd_get_mach (abfd) == bfd_mach_h8300s)
&& value >= 0xffff00
&& value <= 0xffffff))
{
- unsigned char code;
+ unsigned char code;
- /* Note that we've changed the relocs, section contents,
+ /* Note that we've changed the relocs, section contents,
etc. */
- elf_section_data (sec)->relocs = internal_relocs;
- elf_section_data (sec)->this_hdr.contents = contents;
+ elf_section_data (sec)->relocs = internal_relocs;
+ elf_section_data (sec)->this_hdr.contents = contents;
symtab_hdr->contents = (unsigned char *) isymbuf;
- /* Get the opcode. */
- code = bfd_get_8 (abfd, contents + irel->r_offset - 2);
+ /* Get the opcode. */
+ code = bfd_get_8 (abfd, contents + irel->r_offset - 2);
- /* Sanity check. */
- if (code != 0x6a)
+ /* Sanity check. */
+ if (code != 0x6a)
abort ();
- code = bfd_get_8 (abfd, contents + irel->r_offset - 1);
+ code = bfd_get_8 (abfd, contents + irel->r_offset - 1);
- if ((code & 0xf0) == 0x00)
+ if ((code & 0xf0) == 0x00)
bfd_put_8 (abfd,
(code & 0xf) | 0x20,
- contents + irel->r_offset - 2);
- else if ((code & 0xf0) == 0x80)
+ contents + irel->r_offset - 2);
+ else if ((code & 0xf0) == 0x80)
bfd_put_8 (abfd,
(code & 0xf) | 0x30,
- contents + irel->r_offset - 2);
- else
+ contents + irel->r_offset - 2);
+ else
abort ();
- /* Fix the relocation's type. */
- irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+ /* Fix the relocation's type. */
+ irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
R_H8_DIR8);
- /* Delete two bytes of data. */
- if (!elf32_h8_relax_delete_bytes (abfd, sec, irel->r_offset, 2))
+ /* Delete two bytes of data. */
+ if (!elf32_h8_relax_delete_bytes (abfd, sec, irel->r_offset, 2))
goto error_return;
- /* That will change things, so, we should relax again.
+ /* That will change things, so, we should relax again.
Note that this is not required, and it may be slow. */
- *again = true;
+ *again = true;
}
}
@@ -1107,34 +1120,34 @@ elf32_h8_relax_section (abfd, sec, link_info, again)
if (value <= 0x7fff || value >= 0xff8000)
{
- unsigned char code;
+ unsigned char code;
- /* Note that we've changed the relocs, section contents,
+ /* Note that we've changed the relocs, section contents,
etc. */
- elf_section_data (sec)->relocs = internal_relocs;
- elf_section_data (sec)->this_hdr.contents = contents;
+ elf_section_data (sec)->relocs = internal_relocs;
+ elf_section_data (sec)->this_hdr.contents = contents;
symtab_hdr->contents = (unsigned char *) isymbuf;
- /* Get the opcode. */
- code = bfd_get_8 (abfd, contents + irel->r_offset - 1);
+ /* Get the opcode. */
+ code = bfd_get_8 (abfd, contents + irel->r_offset - 1);
- /* We just need to turn off bit 0x20. */
- code &= ~0x20;
+ /* We just need to turn off bit 0x20. */
+ code &= ~0x20;
- bfd_put_8 (abfd, code, contents + irel->r_offset - 1);
+ bfd_put_8 (abfd, code, contents + irel->r_offset - 1);
- /* Fix the relocation's type. */
- irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+ /* Fix the relocation's type. */
+ irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
R_H8_DIR16A8);
- /* Delete two bytes of data. */
- if (!elf32_h8_relax_delete_bytes (abfd, sec,
+ /* Delete two bytes of data. */
+ if (!elf32_h8_relax_delete_bytes (abfd, sec,
irel->r_offset + 1, 2))
goto error_return;
- /* That will change things, so, we should relax again.
+ /* That will change things, so, we should relax again.
Note that this is not required, and it may be slow. */
- *again = true;
+ *again = true;
}
break;
}
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index e26ee79..ed601a7 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -3429,20 +3429,3 @@ elf_i386_post_process_headers (abfd, link_info)
#undef elf_backend_post_process_headers
#undef elf32_bed
-
-/* QNX support. */
-#include "elf32-qnx.h"
-
-#undef TARGET_LITTLE_SYM
-#define TARGET_LITTLE_SYM bfd_elf32_i386qnx_vec
-#undef TARGET_LITTLE_NAME
-#define TARGET_LITTLE_NAME "elf32-i386-nto"
-
-#define elf32_bed elf32_i386_qnx_bed
-
-#include "elf32-target.h"
-
-#undef elf_backend_set_nonloadable_filepos
-#undef elf_backend_is_contained_by_filepos
-#undef elf_backend_copy_private_bfd_data_p
-#undef elf32_bed
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 56df535..243ff14 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -3850,24 +3850,3 @@ ppc_elf_grok_psinfo (abfd, note)
#define elf_backend_reloc_type_class ppc_elf_reloc_type_class
#include "elf32-target.h"
-
-/* QNX support. */
-#include "elf32-qnx.h"
-
-#undef TARGET_LITTLE_SYM
-#define TARGET_LITTLE_SYM bfd_elf32_powerpcleqnx_vec
-#undef TARGET_LITTLE_NAME
-#define TARGET_LITTLE_NAME "elf32-powerpcle-nto"
-#undef TARGET_BIG_SYM
-#define TARGET_BIG_SYM bfd_elf32_powerpcqnx_vec
-#undef TARGET_BIG_NAME
-#define TARGET_BIG_NAME "elf32-powerpc-nto"
-
-#define elf32_bed elf32_ppc_qnx_bed
-
-#include "elf32-target.h"
-
-#undef elf_backend_set_nonloadable_filepos
-#undef elf_backend_is_contained_by_filepos
-#undef elf_backend_copy_private_bfd_data_p
-#undef elf32_bed
diff --git a/bfd/elf32-qnx.c b/bfd/elf32-qnx.c
deleted file mode 100644
index b397c38..0000000
--- a/bfd/elf32-qnx.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/* QNX specific support for 32-bit ELF
- Copyright 2002 Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "bfd.h"
-#include "sysdep.h"
-#include "elf-bfd.h"
-#include "elf32-qnx.h"
-
-/* Returns the end address of the segment + 1. */
-#define SEGMENT_END(segment, start) \
- (start + (segment->p_memsz > segment->p_filesz \
- ? segment->p_memsz : segment->p_filesz))
-
-boolean
-elf_qnx_copy_private_bfd_data_p (ibfd, isec, obfd, osec)
- bfd *ibfd ATTRIBUTE_UNUSED;
- asection *isec;
- bfd *obfd ATTRIBUTE_UNUSED;
- asection *osec ATTRIBUTE_UNUSED;
-{
- return isec->next == NULL;
-}
-
-boolean
-elf_qnx_is_contained_by_filepos (section, segment)
- asection *section;
- Elf_Internal_Phdr *segment;
-{
- return ((bfd_vma) section->filepos >= segment->p_offset
- && ((bfd_vma) section->filepos + section->_raw_size
- <= SEGMENT_END (segment, segment->p_offset)));
-}
-
-void
-elf_qnx_set_nonloadable_filepos (abfd, phdrs)
- bfd *abfd;
- Elf_Internal_Phdr *phdrs;
-{
- struct elf_segment_map *m;
- Elf_Internal_Phdr *p;
- file_ptr off = 0;
-
- for (m = elf_tdata (abfd)->segment_map, p = phdrs;
- m != NULL;
- m = m->next, p++)
- {
- unsigned int i;
- asection **secpp;
-
- for (i = 0, secpp = m->sections; i < m->count; i++, secpp++)
- {
- asection *sec;
-
- sec = *secpp;
-
- if (p->p_type == PT_LOAD)
- off = sec->filepos;
- else
- {
- if (i == 0)
- {
- if (sec->filepos)
- p->p_offset = sec->filepos;
- else
- p->p_offset = off;
- }
- if (!sec->filepos)
- {
- off += sec->_raw_size;
- p->p_filesz += sec->_raw_size;
- }
- }
- }
- }
- return;
-}
diff --git a/bfd/elf32-qnx.h b/bfd/elf32-qnx.h
deleted file mode 100644
index 0e79d7e..0000000
--- a/bfd/elf32-qnx.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* QNX specific support for 32-bit ELF
- Copyright 2002 Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-boolean elf_qnx_copy_private_bfd_data_p
- PARAMS ((bfd *, asection *, bfd *, asection *));
-boolean elf_qnx_is_contained_by_filepos
- PARAMS ((asection *, Elf_Internal_Phdr *));
-void elf_qnx_set_nonloadable_filepos
- PARAMS ((bfd *, Elf_Internal_Phdr *));
-
-#undef elf_backend_set_nonloadable_filepos
-#define elf_backend_set_nonloadable_filepos elf_qnx_set_nonloadable_filepos
-#undef elf_backend_is_contained_by_filepos
-#define elf_backend_is_contained_by_filepos elf_qnx_is_contained_by_filepos
-#undef elf_backend_copy_private_bfd_data_p
-#define elf_backend_copy_private_bfd_data_p elf_qnx_copy_private_bfd_data_p
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index 0f681a8..f52245b 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -7449,29 +7449,6 @@ elf32_shlin_grok_psinfo (abfd, note)
#include "elf32-target.h"
-/* QNX support. */
-#include "elf32-qnx.h"
-
-#undef TARGET_LITTLE_SYM
-#define TARGET_LITTLE_SYM bfd_elf32_shlqnx_vec
-#undef TARGET_LITTLE_NAME
-#define TARGET_LITTLE_NAME "elf32-shl-nto"
-#undef TARGET_BIG_SYM
-#define TARGET_BIG_SYM bfd_elf32_shqnx_vec
-#undef TARGET_BIG_NAME
-#define TARGET_BIG_NAME "elf32-sh-nto"
-#undef ELF_MAXPAGESIZE
-#define ELF_MAXPAGESIZE 0x1000
-
-#define elf32_bed elf32_sh_qnx_bed
-
-#include "elf32-target.h"
-
-#undef elf_backend_set_nonloadable_filepos
-#undef elf_backend_is_contained_by_filepos
-#undef elf_backend_copy_private_bfd_data_p
-#undef elf32_bed
-
/* NetBSD support. */
#undef TARGET_BIG_SYM
#define TARGET_BIG_SYM bfd_elf32_shnbsd_vec
diff --git a/bfd/elf32-sh64-com.c b/bfd/elf32-sh64-com.c
index ae2cab4..df0c463 100644
--- a/bfd/elf32-sh64-com.c
+++ b/bfd/elf32-sh64-com.c
@@ -127,7 +127,7 @@ sh64_address_in_cranges (cranges, addr, rangep)
else
{
cranges_contents
- = bfd_malloc (cranges->_cooked_size == 0
+ = bfd_malloc (cranges->_cooked_size != 0
? cranges->_cooked_size : cranges->_raw_size);
if (cranges_contents == NULL)
return false;
diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c
index 57ed958..bf92ccf 100644
--- a/bfd/elf32-v850.c
+++ b/bfd/elf32-v850.c
@@ -2388,7 +2388,7 @@ v850_elf_relax_delete_bytes (abfd, sec, addr, toaddr, count)
if (isym.st_value + isym.st_size >= toaddr)
isym.st_size += count;
- bfd_elf32_swap_symbol_out (abfd, & isym, shndx, esym);
+ bfd_elf32_swap_symbol_out (abfd, & isym, esym, shndx);
}
else if (isym.st_shndx == sec_shndx
&& isym.st_value < addr + count)
@@ -2401,7 +2401,7 @@ v850_elf_relax_delete_bytes (abfd, sec, addr, toaddr, count)
&& isym.st_value < addr + count)
isym.st_value = addr;
- bfd_elf32_swap_symbol_out (abfd, & isym, shndx, esym);
+ bfd_elf32_swap_symbol_out (abfd, & isym, esym, shndx);
}
}
@@ -2426,7 +2426,7 @@ v850_elf_relax_delete_bytes (abfd, sec, addr, toaddr, count)
if ((sym_hash)->root.u.def.value + isym.st_size >= toaddr)
{
isym.st_size += count;
- bfd_elf32_swap_symbol_out (abfd, & isym, shndx, esym);
+ bfd_elf32_swap_symbol_out (abfd, & isym, esym, shndx);
}
(sym_hash)->root.u.def.value -= count;
@@ -2445,7 +2445,7 @@ v850_elf_relax_delete_bytes (abfd, sec, addr, toaddr, count)
&& (sym_hash)->root.u.def.value < addr + count)
(sym_hash)->root.u.def.value = addr;
- bfd_elf32_swap_symbol_out (abfd, & isym, shndx, esym);
+ bfd_elf32_swap_symbol_out (abfd, & isym, esym, shndx);
}
if (shndx)
diff --git a/bfd/elf64-mips.c b/bfd/elf64-mips.c
index bf98c91..f06d065 100644
--- a/bfd/elf64-mips.c
+++ b/bfd/elf64-mips.c
@@ -2073,7 +2073,7 @@ mips_elf64_slurp_one_reloc_table (abfd, asect, symbols, rel_hdr)
rela.r_addend = 0;
}
- /* Each entry represents up to three actual relocations. */
+ /* Each entry represents exactly three actual relocations. */
used_sym = false;
used_ssym = false;
@@ -2096,27 +2096,6 @@ mips_elf64_slurp_one_reloc_table (abfd, asect, symbols, rel_hdr)
break;
}
- if (type == R_MIPS_NONE)
- {
- /* There are no more relocations in this entry. If this
- is the first entry, we need to generate a dummy
- relocation so that the generic linker knows that
- there has been a break in the sequence of relocations
- applying to a particular address. */
- if (ir == 0)
- {
- relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
- if ((abfd->flags & (EXEC_P | DYNAMIC)) == 0)
- relent->address = rela.r_offset;
- else
- relent->address = rela.r_offset - asect->vma;
- relent->addend = 0;
- relent->howto = &howto_table[(int) R_MIPS_NONE];
- ++relent;
- }
- break;
- }
-
/* Some types require symbols, whereas some do not. */
switch (type)
{
@@ -2194,7 +2173,7 @@ mips_elf64_slurp_one_reloc_table (abfd, asect, symbols, rel_hdr)
}
}
- asect->reloc_count += relent - relents;
+ asect->reloc_count += (relent - relents) / 3;
if (allocated != NULL)
free (allocated);
diff --git a/bfd/elf64-mmix.c b/bfd/elf64-mmix.c
index 8b76f34..939d12f 100644
--- a/bfd/elf64-mmix.c
+++ b/bfd/elf64-mmix.c
@@ -2170,8 +2170,11 @@ _bfd_mmix_finalize_linker_allocated_gregs (abfd, link_info)
n_gregs = gregdata->n_allocated_bpo_gregs;
+ /* We need to have a _raw_size contents even though there's only
+ _cooked_size worth of data, since the generic relocation machinery
+ will allocate and copy that much temporarily. */
bpo_gregs_section->contents
- = contents = bfd_alloc (bpo_greg_owner, bpo_gregs_section->_cooked_size);
+ = contents = bfd_alloc (bpo_greg_owner, bpo_gregs_section->_raw_size);
if (contents == NULL)
return false;
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index da7c53f..384348e 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -1658,6 +1658,7 @@ ppc64_elf_merge_private_bfd_data (ibfd, obfd)
{
/* Check if we have the same endianess. */
if (ibfd->xvec->byteorder != obfd->xvec->byteorder
+ && ibfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN
&& obfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN)
{
const char *msg;
@@ -1785,19 +1786,19 @@ struct ppc_dyn_relocs
ppc_stub_plt_branch:
Similar to the above, but a 24 bit branch in the stub section won't
reach its destination.
- . addis %r12,%r2,xxx@ha
- . ld %r11,xxx@l(%r12)
+ . addis %r12,%r2,xxx@toc@ha
+ . ld %r11,xxx@toc@l(%r12)
. mtctr %r11
. bctr
ppc_stub_plt_call:
Used to call a function in a shared library.
- . addis %r12,%r2,xxx@ha
+ . addis %r12,%r2,xxx@toc@ha
. std %r2,40(%r1)
- . ld %r11,xxx+0@l(%r12)
- . ld %r2,xxx+8@l(%r12)
+ . ld %r11,xxx+0@toc@l(%r12)
+ . ld %r2,xxx+8@toc@l(%r12)
. mtctr %r11
- . ld %r11,xxx+16@l(%r12)
+ . ld %r11,xxx+16@toc@l(%r12)
. bctr
*/
@@ -1971,8 +1972,6 @@ static 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 *, boolean));
-static boolean edit_opd
- PARAMS ((bfd *, struct bfd_link_info *));
static boolean allocate_dynrelocs
PARAMS ((struct elf_link_hash_entry *, PTR));
static boolean readonly_dynrelocs
@@ -3538,8 +3537,8 @@ ppc64_elf_hide_symbol (info, h, force_local)
}
}
-static boolean
-edit_opd (obfd, info)
+boolean
+ppc64_elf_edit_opd (obfd, info)
bfd *obfd;
struct bfd_link_info *info;
{
@@ -3556,6 +3555,7 @@ edit_opd (obfd, info)
Elf_Internal_Sym *local_syms;
struct elf_link_hash_entry **sym_hashes;
bfd_vma offset;
+ bfd_size_type amt;
long *adjust;
boolean need_edit;
@@ -3563,9 +3563,16 @@ edit_opd (obfd, info)
if (sec == NULL)
continue;
+ amt = sec->_raw_size * sizeof (long) / 24;
adjust = (long *) elf_section_data (sec)->tdata;
- BFD_ASSERT (adjust != NULL);
- memset (adjust, 0, (size_t) sec->_raw_size * sizeof (long) / 24);
+ if (adjust == NULL)
+ {
+ /* Must be a ld -r link. ie. check_relocs hasn't been
+ called. */
+ adjust = (long *) bfd_zalloc (obfd, amt);
+ elf_section_data (sec)->tdata = adjust;
+ }
+ memset (adjust, 0, (size_t) amt);
if (sec->output_section == bfd_abs_section_ptr)
continue;
@@ -3768,14 +3775,29 @@ edit_opd (obfd, info)
{
/* Arrange for the function descriptor sym
to be dropped. */
- struct elf_link_hash_entry *fdh;
+ struct ppc_link_hash_entry *fdh;
struct ppc_link_hash_entry *fh;
fh = (struct ppc_link_hash_entry *) h;
- BFD_ASSERT (fh->is_func);
- fdh = fh->oh;
- fdh->root.u.def.value = 0;
- fdh->root.u.def.section = sym_sec;
+ fdh = (struct ppc_link_hash_entry *) fh->oh;
+ if (fdh == NULL)
+ {
+ const char *fd_name;
+ struct ppc_link_hash_table *htab;
+
+ fd_name = h->root.root.string + 1;
+ htab = ppc_hash_table (info);
+ fdh = (struct ppc_link_hash_entry *)
+ elf_link_hash_lookup (&htab->elf, fd_name,
+ false, false, false);
+ fdh->is_func_descriptor = 1;
+ fdh->oh = &fh->elf;
+ fh->is_func = 1;
+ fh->oh = &fdh->elf;
+ }
+
+ fdh->elf.root.u.def.value = 0;
+ fdh->elf.root.u.def.section = sym_sec;
}
}
else
@@ -3788,13 +3810,28 @@ edit_opd (obfd, info)
to this location in the opd section.
We've checked above that opd relocs are
ordered. */
- struct elf_link_hash_entry *fdh;
+ struct ppc_link_hash_entry *fdh;
struct ppc_link_hash_entry *fh;
fh = (struct ppc_link_hash_entry *) h;
- BFD_ASSERT (fh->is_func);
- fdh = fh->oh;
- fdh->root.u.def.value = wptr - sec->contents;
+ fdh = (struct ppc_link_hash_entry *) fh->oh;
+ if (fdh == NULL)
+ {
+ const char *fd_name;
+ struct ppc_link_hash_table *htab;
+
+ fd_name = h->root.root.string + 1;
+ htab = ppc_hash_table (info);
+ fdh = (struct ppc_link_hash_entry *)
+ elf_link_hash_lookup (&htab->elf, fd_name,
+ false, false, false);
+ fdh->is_func_descriptor = 1;
+ fdh->oh = &fh->elf;
+ fh->is_func = 1;
+ fh->oh = &fdh->elf;
+ }
+
+ fdh->elf.root.u.def.value = wptr - sec->contents;
}
else
{
@@ -4144,9 +4181,6 @@ ppc64_elf_size_dynamic_sections (output_bfd, info)
}
}
- if (!edit_opd (output_bfd, info))
- return false;
-
/* Allocate global sym .plt and .got entries, and space for global
sym dynamic relocs. */
elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, (PTR) info);
diff --git a/bfd/elf64-ppc.h b/bfd/elf64-ppc.h
index cabc388..21178d5 100644
--- a/bfd/elf64-ppc.h
+++ b/bfd/elf64-ppc.h
@@ -19,6 +19,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
boolean ppc64_elf_mark_entry_syms
PARAMS ((struct bfd_link_info *));
+boolean ppc64_elf_edit_opd
+ PARAMS ((bfd *, struct bfd_link_info *));
bfd_vma ppc64_elf_toc
PARAMS ((bfd *));
int ppc64_elf_setup_section_lists
diff --git a/bfd/elf64-sparc.c b/bfd/elf64-sparc.c
index f79d76c..ae4e57a 100644
--- a/bfd/elf64-sparc.c
+++ b/bfd/elf64-sparc.c
@@ -1563,6 +1563,9 @@ sparc64_elf_adjust_dynamic_symbol (info, h)
if (s->_raw_size == 0)
s->_raw_size = PLT_HEADER_SIZE;
+ /* To simplify matters later, just store the plt index here. */
+ h->plt.offset = s->_raw_size / PLT_ENTRY_SIZE;
+
/* If this symbol is not defined in a regular file, and we are
not generating a shared library, then set the symbol to this
location in the .plt. This is required to make function
@@ -1572,12 +1575,9 @@ sparc64_elf_adjust_dynamic_symbol (info, h)
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
{
h->root.u.def.section = s;
- h->root.u.def.value = s->_raw_size;
+ h->root.u.def.value = sparc64_elf_plt_entry_offset (h->plt.offset);
}
- /* To simplify matters later, just store the plt index here. */
- h->plt.offset = s->_raw_size / PLT_ENTRY_SIZE;
-
/* Make room for this entry. */
s->_raw_size += PLT_ENTRY_SIZE;
@@ -2164,11 +2164,9 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
else
{
+ outrel.r_addend = relocation + rel->r_addend;
if (r_type == R_SPARC_64)
- {
- outrel.r_info = ELF64_R_INFO (0, R_SPARC_RELATIVE);
- outrel.r_addend = relocation + rel->r_addend;
- }
+ outrel.r_info = ELF64_R_INFO (0, R_SPARC_RELATIVE);
else
{
long indx;
@@ -2198,6 +2196,13 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
osec = sec->output_section;
indx = elf_section_data (osec)->dynindx;
+ /* We are turning this relocation into one
+ against a section symbol, so subtract out
+ the output section's address but not the
+ offset of the input section in the output
+ section. */
+ outrel.r_addend -= osec->vma;
+
/* FIXME: we really should be able to link non-pic
shared libraries. */
if (indx == 0)
@@ -2216,7 +2221,6 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
ELF64_R_TYPE_INFO (
ELF64_R_TYPE_DATA (rel->r_info),
r_type));
- outrel.r_addend = relocation + rel->r_addend;
}
}
@@ -2580,11 +2584,10 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
/* The Solaris native linker silently disregards
overflows. We don't, but this breaks stabs debugging
info, whose relocations are only 32-bits wide. Ignore
- overflows in this case. */
+ overflows for discarded entries. */
if (r_type == R_SPARC_32
- && (input_section->flags & SEC_DEBUGGING) != 0
- && strcmp (bfd_section_name (input_bfd, input_section),
- ".stab") == 0)
+ && _bfd_elf_section_offset (output_bfd, info, input_section,
+ rel->r_offset) == (bfd_vma) -1)
break;
if (h != NULL)
diff --git a/bfd/elfarm-nabi.c b/bfd/elfarm-nabi.c
index bd34a14..dcf6808 100644
--- a/bfd/elfarm-nabi.c
+++ b/bfd/elfarm-nabi.c
@@ -750,26 +750,3 @@ elf32_arm_nabi_grok_psinfo (abfd, note)
#define elf_backend_grok_psinfo elf32_arm_nabi_grok_psinfo
#include "elf32-arm.h"
-
-/* QNX support. */
-#include "elf32-qnx.h"
-
-#undef TARGET_LITTLE_SYM
-#define TARGET_LITTLE_SYM bfd_elf32_littlearmqnx_vec
-#undef TARGET_LITTLE_NAME
-#define TARGET_LITTLE_NAME "elf32-littlearm-nto"
-#undef TARGET_BIG_SYM
-#define TARGET_BIG_SYM bfd_elf32_bigarmqnx_vec
-#undef TARGET_BIG_NAME
-#define TARGET_BIG_NAME "elf32-bigarm-nto"
-#undef ELF_MAXPAGESIZE
-#define ELF_MAXPAGESIZE 0x1000
-
-#define elf32_bed elf32_arm_qnx_bed
-
-#include "elf32-target.h"
-
-#undef elf_backend_set_nonloadable_filepos
-#undef elf_backend_is_contained_by_filepos
-#undef elf_backend_copy_private_bfd_data_p
-#undef elf32_bed
diff --git a/bfd/elfcode.h b/bfd/elfcode.h
index 4f54cd3..f523972 100644
--- a/bfd/elfcode.h
+++ b/bfd/elfcode.h
@@ -505,16 +505,6 @@ elf_file_p (x_ehdrp)
&& (x_ehdrp->e_ident[EI_MAG3] == ELFMAG3));
}
-struct bfd_preserve
-{
- const struct bfd_arch_info *arch_info;
- struct elf_obj_tdata *tdata;
- struct bfd_hash_table section_htab;
- struct sec *sections;
- struct sec **section_tail;
- unsigned int section_count;
-};
-
/* Check to see if the file associated with ABFD matches the target vector
that ABFD points to.
@@ -536,11 +526,10 @@ elf_object_p (abfd)
char *shstrtab; /* Internal copy of section header stringtab */
struct elf_backend_data *ebd;
struct bfd_preserve preserve;
- struct elf_obj_tdata *new_tdata = NULL;
asection *s;
bfd_size_type amt;
- preserve.arch_info = abfd->arch_info;
+ preserve.marker = NULL;
/* Read in the ELF header in external format. */
@@ -584,24 +573,14 @@ elf_object_p (abfd)
the tdata pointer in the bfd. */
amt = sizeof (struct elf_obj_tdata);
- new_tdata = (struct elf_obj_tdata *) bfd_zalloc (abfd, amt);
- if (new_tdata == NULL)
+ preserve.marker = bfd_zalloc (abfd, amt);
+ if (preserve.marker == NULL)
goto got_no_match;
- preserve.tdata = elf_tdata (abfd);
- elf_tdata (abfd) = new_tdata;
-
- /* Clear section information, since there might be a recognized bfd that
- we now check if we can replace, and we don't want to append to it. */
- preserve.sections = abfd->sections;
- preserve.section_tail = abfd->section_tail;
- preserve.section_count = abfd->section_count;
- preserve.section_htab = abfd->section_htab;
- abfd->sections = NULL;
- abfd->section_tail = &abfd->sections;
- abfd->section_count = 0;
- if (!bfd_hash_table_init (&abfd->section_htab, bfd_section_hash_newfunc))
+ if (!bfd_preserve_save (abfd, &preserve))
goto got_no_match;
+ elf_tdata (abfd) = preserve.marker;
+
/* Now that we know the byte order, swap in the rest of the header */
i_ehdrp = elf_elfheader (abfd);
elf_swap_ehdr_in (abfd, &x_ehdr, i_ehdrp);
@@ -633,8 +612,10 @@ elf_object_p (abfd)
/* Check that the ELF e_machine field matches what this particular
BFD format expects. */
if (ebd->elf_machine_code != i_ehdrp->e_machine
- && (ebd->elf_machine_alt1 == 0 || i_ehdrp->e_machine != ebd->elf_machine_alt1)
- && (ebd->elf_machine_alt2 == 0 || i_ehdrp->e_machine != ebd->elf_machine_alt2))
+ && (ebd->elf_machine_alt1 == 0
+ || i_ehdrp->e_machine != ebd->elf_machine_alt1)
+ && (ebd->elf_machine_alt2 == 0
+ || i_ehdrp->e_machine != ebd->elf_machine_alt2))
{
const bfd_target * const *target_ptr;
@@ -844,11 +825,8 @@ elf_object_p (abfd)
}
}
- /* It would be nice to be able to free more memory here, eg. old
- elf_elfsections, old tdata, but that's not possible since these
- blocks are sitting inside obj_alloc'd memory. */
- bfd_hash_table_free (&preserve.section_htab);
- return (abfd->xvec);
+ bfd_preserve_finish (abfd, &preserve);
+ return abfd->xvec;
got_wrong_format_error:
/* There is way too much undoing of half-known state here. The caller,
@@ -863,18 +841,8 @@ elf_object_p (abfd)
bfd_set_error (bfd_error_wrong_format);
got_no_match:
- abfd->arch_info = preserve.arch_info;
- if (new_tdata != NULL)
- {
- /* bfd_release frees all memory more recently bfd_alloc'd than
- its arg, as well as its arg. */
- bfd_release (abfd, new_tdata);
- elf_tdata (abfd) = preserve.tdata;
- abfd->section_htab = preserve.section_htab;
- abfd->sections = preserve.sections;
- abfd->section_tail = preserve.section_tail;
- abfd->section_count = preserve.section_count;
- }
+ if (preserve.marker != NULL)
+ bfd_preserve_restore (abfd, &preserve);
return NULL;
}
diff --git a/bfd/elfcore.h b/bfd/elfcore.h
index 7db5f72..264ff55 100644
--- a/bfd/elfcore.h
+++ b/bfd/elfcore.h
@@ -85,18 +85,18 @@ elf_core_file_p (abfd)
unsigned int phindex;
struct elf_backend_data *ebd;
struct bfd_preserve preserve;
- struct elf_obj_tdata *new_tdata = NULL;
bfd_size_type amt;
- preserve.arch_info = abfd->arch_info;
+ preserve.marker = NULL;
/* Read in the ELF header in external format. */
if (bfd_bread ((PTR) &x_ehdr, (bfd_size_type) sizeof (x_ehdr), abfd)
!= sizeof (x_ehdr))
{
if (bfd_get_error () != bfd_error_system_call)
- bfd_set_error (bfd_error_wrong_format);
- return NULL;
+ goto wrong;
+ else
+ goto fail;
}
/* Check the magic number. */
@@ -126,24 +126,14 @@ elf_core_file_p (abfd)
/* Give abfd an elf_obj_tdata. */
amt = sizeof (struct elf_obj_tdata);
- new_tdata = (struct elf_obj_tdata *) bfd_zalloc (abfd, amt);
- if (new_tdata == NULL)
- return NULL;
- preserve.tdata = elf_tdata (abfd);
- elf_tdata (abfd) = new_tdata;
-
- /* Clear section information, since there might be a recognized bfd that
- we now check if we can replace, and we don't want to append to it. */
- preserve.sections = abfd->sections;
- preserve.section_tail = abfd->section_tail;
- preserve.section_count = abfd->section_count;
- preserve.section_htab = abfd->section_htab;
- abfd->sections = NULL;
- abfd->section_tail = &abfd->sections;
- abfd->section_count = 0;
- if (!bfd_hash_table_init (&abfd->section_htab, bfd_section_hash_newfunc))
+ preserve.marker = bfd_zalloc (abfd, amt);
+ if (preserve.marker == NULL)
+ goto fail;
+ if (!bfd_preserve_save (abfd, &preserve))
goto fail;
+ elf_tdata (abfd) = preserve.marker;
+
/* Swap in the rest of the header, now that we have the byte order. */
i_ehdrp = elf_elfheader (abfd);
elf_swap_ehdr_in (abfd, &x_ehdr, i_ehdrp);
@@ -248,7 +238,7 @@ elf_core_file_p (abfd)
goto wrong;
}
- bfd_hash_table_free (&preserve.section_htab);
+ bfd_preserve_finish (abfd, &preserve);
return abfd->xvec;
wrong:
@@ -264,17 +254,7 @@ wrong:
bfd_set_error (bfd_error_wrong_format);
fail:
- abfd->arch_info = preserve.arch_info;
- if (new_tdata != NULL)
- {
- /* bfd_release frees all memory more recently bfd_alloc'd than
- its arg, as well as its arg. */
- bfd_release (abfd, new_tdata);
- elf_tdata (abfd) = preserve.tdata;
- abfd->section_htab = preserve.section_htab;
- abfd->sections = preserve.sections;
- abfd->section_tail = preserve.section_tail;
- abfd->section_count = preserve.section_count;
- }
+ if (preserve.marker != NULL)
+ bfd_preserve_restore (abfd, &preserve);
return NULL;
}
diff --git a/bfd/elflink.h b/bfd/elflink.h
index 03be87a..721b361 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -2208,10 +2208,9 @@ elf_link_add_object_symbols (abfd, info)
}
}
- /* If this is a non-traditional, non-relocateable link, try to
- optimize the handling of the .stab/.stabstr sections. */
+ /* If this is a non-traditional link, try to optimize the handling
+ of the .stab/.stabstr sections. */
if (! dynamic
- && ! info->relocateable
&& ! info->traditional_format
&& info->hash->creator->flavour == bfd_target_elf_flavour
&& is_elf_hash_table (info)
@@ -2342,6 +2341,7 @@ elf_link_create_dynamic_sections (abfd, info)
|| ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
|| ! bfd_set_section_alignment (abfd, s, 2))
return false;
+ elf_hash_table (info)->eh_info.hdr_sec = s;
}
/* Create sections to hold version informations. These are removed
@@ -4494,6 +4494,8 @@ struct elf_final_link_info
size_t symbuf_count;
/* Number of symbols which fit in symbuf. */
size_t symbuf_size;
+ /* And same for symshndxbuf. */
+ size_t shndxbuf_size;
};
static boolean elf_link_output_sym
@@ -4919,6 +4921,7 @@ elf_bfd_final_link (abfd, info)
Elf_Internal_Sym elfsym;
unsigned int i;
Elf_Internal_Shdr *symtab_hdr;
+ Elf_Internal_Shdr *symtab_shndx_hdr;
Elf_Internal_Shdr *symstrtab_hdr;
struct elf_backend_data *bed = get_elf_backend_data (abfd);
struct elf_outext_info eoinfo;
@@ -4972,6 +4975,7 @@ elf_bfd_final_link (abfd, info)
finfo.symbuf = NULL;
finfo.symshndxbuf = NULL;
finfo.symbuf_count = 0;
+ finfo.shndxbuf_size = 0;
finfo.first_tls_sec = NULL;
for (o = abfd->sections; o != (asection *) NULL; o = o->next)
if ((o->flags & SEC_THREAD_LOCAL) != 0
@@ -5192,9 +5196,7 @@ elf_bfd_final_link (abfd, info)
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
/* sh_name is set in prep_headers. */
symtab_hdr->sh_type = SHT_SYMTAB;
- symtab_hdr->sh_flags = 0;
- symtab_hdr->sh_addr = 0;
- symtab_hdr->sh_size = 0;
+ /* sh_flags, sh_addr and sh_size all start off zero. */
symtab_hdr->sh_entsize = sizeof (Elf_External_Sym);
/* sh_link is set in assign_section_numbers. */
/* sh_info is set below. */
@@ -5221,9 +5223,11 @@ elf_bfd_final_link (abfd, info)
goto error_return;
if (elf_numsections (abfd) > SHN_LORESERVE)
{
- amt = finfo.symbuf_size;
+ /* Wild guess at number of output symbols. realloc'd as needed. */
+ amt = 2 * max_sym_count + elf_numsections (abfd) + 1000;
+ finfo.shndxbuf_size = amt;
amt *= sizeof (Elf_External_Sym_Shndx);
- finfo.symshndxbuf = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
+ finfo.symshndxbuf = (Elf_External_Sym_Shndx *) bfd_zmalloc (amt);
if (finfo.symshndxbuf == NULL)
goto error_return;
}
@@ -5283,7 +5287,7 @@ elf_bfd_final_link (abfd, info)
if (! elf_link_output_sym (&finfo, (const char *) NULL,
&elfsym, o))
goto error_return;
- if (i == SHN_LORESERVE)
+ if (i == SHN_LORESERVE - 1)
i += SHN_HIRESERVE + 1 - SHN_LORESERVE;
}
}
@@ -5558,6 +5562,24 @@ elf_bfd_final_link (abfd, info)
/* Now we know the size of the symtab section. */
off += symtab_hdr->sh_size;
+ symtab_shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
+ if (symtab_shndx_hdr->sh_name != 0)
+ {
+ symtab_shndx_hdr->sh_type = SHT_SYMTAB_SHNDX;
+ symtab_shndx_hdr->sh_entsize = sizeof (Elf_External_Sym_Shndx);
+ symtab_shndx_hdr->sh_addralign = sizeof (Elf_External_Sym_Shndx);
+ amt = bfd_get_symcount (abfd) * sizeof (Elf_External_Sym_Shndx);
+ symtab_shndx_hdr->sh_size = amt;
+
+ off = _bfd_elf_assign_file_position_for_section (symtab_shndx_hdr,
+ off, true);
+
+ if (bfd_seek (abfd, symtab_shndx_hdr->sh_offset, SEEK_SET) != 0
+ || (bfd_bwrite ((PTR) finfo.symshndxbuf, amt, abfd) != amt))
+ return false;
+ }
+
+
/* Finish up and write out the symbol string table (.strtab)
section. */
symstrtab_hdr = &elf_tdata (abfd)->strtab_hdr;
@@ -5832,17 +5854,10 @@ elf_bfd_final_link (abfd, info)
goto error_return;
}
- if (info->eh_frame_hdr && elf_hash_table (info)->dynobj)
+ if (info->eh_frame_hdr)
{
- o = bfd_get_section_by_name (elf_hash_table (info)->dynobj,
- ".eh_frame_hdr");
- if (o
- && (elf_section_data (o)->sec_info_type
- == ELF_INFO_TYPE_EH_FRAME_HDR))
- {
- if (! _bfd_elf_write_section_eh_frame_hdr (abfd, o))
- goto error_return;
- }
+ if (! _bfd_elf_write_section_eh_frame_hdr (abfd, info))
+ goto error_return;
}
if (finfo.symstrtab != NULL)
@@ -5866,7 +5881,7 @@ elf_bfd_final_link (abfd, info)
if (finfo.symbuf != NULL)
free (finfo.symbuf);
if (finfo.symshndxbuf != NULL)
- free (finfo.symbuf);
+ free (finfo.symshndxbuf);
for (o = abfd->sections; o != NULL; o = o->next)
{
if ((o->flags & SEC_RELOC) != 0
@@ -5900,7 +5915,7 @@ elf_bfd_final_link (abfd, info)
if (finfo.symbuf != NULL)
free (finfo.symbuf);
if (finfo.symshndxbuf != NULL)
- free (finfo.symbuf);
+ free (finfo.symshndxbuf);
for (o = abfd->sections; o != NULL; o = o->next)
{
if ((o->flags & SEC_RELOC) != 0
@@ -5959,11 +5974,24 @@ elf_link_output_sym (finfo, name, elfsym, input_sec)
dest = finfo->symbuf + finfo->symbuf_count;
destshndx = finfo->symshndxbuf;
if (destshndx != NULL)
- destshndx += finfo->symbuf_count;
- elf_swap_symbol_out (finfo->output_bfd, elfsym, (PTR) dest, (PTR) destshndx);
- ++finfo->symbuf_count;
+ {
+ if (bfd_get_symcount (finfo->output_bfd) >= finfo->shndxbuf_size)
+ {
+ bfd_size_type amt;
- ++ bfd_get_symcount (finfo->output_bfd);
+ amt = finfo->shndxbuf_size * sizeof (Elf_External_Sym_Shndx);
+ finfo->symshndxbuf = destshndx = bfd_realloc (destshndx, amt * 2);
+ if (destshndx == NULL)
+ return false;
+ memset ((char *) destshndx + amt, 0, amt);
+ finfo->shndxbuf_size *= 2;
+ }
+ destshndx += bfd_get_symcount (finfo->output_bfd);
+ }
+
+ elf_swap_symbol_out (finfo->output_bfd, elfsym, (PTR) dest, (PTR) destshndx);
+ finfo->symbuf_count += 1;
+ bfd_get_symcount (finfo->output_bfd) += 1;
return true;
}
@@ -5988,20 +6016,6 @@ elf_link_flush_output_syms (finfo)
return false;
hdr->sh_size += amt;
-
- if (finfo->symshndxbuf != NULL)
- {
- hdr = &elf_tdata (finfo->output_bfd)->symtab_shndx_hdr;
- pos = hdr->sh_offset + hdr->sh_size;
- amt = finfo->symbuf_count * sizeof (Elf_External_Sym_Shndx);
- if (bfd_seek (finfo->output_bfd, pos, SEEK_SET) != 0
- || (bfd_bwrite ((PTR) finfo->symshndxbuf, amt, finfo->output_bfd)
- != amt))
- return false;
-
- hdr->sh_size += amt;
- }
-
finfo->symbuf_count = 0;
}
@@ -6818,12 +6832,7 @@ 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. We should really complain if
- anything in the final link tries to use it, but
- DWARF-based exception handling might have an entry in
- .eh_frame to describe a routine in the linkonce section,
- and it turns out to be hard to remove the .eh_frame
- entry too. FIXME. */
+ link-once sections. */
if (!finfo->info->relocateable
&& !elf_section_ignore_discarded_relocs (o))
{
@@ -6972,6 +6981,16 @@ elf_link_input_bfd (finfo, input_bfd)
next_erel = 0;
}
+ irela->r_offset = _bfd_elf_section_offset (output_bfd,
+ finfo->info, o,
+ irela->r_offset);
+ if (irela->r_offset >= (bfd_vma) -2)
+ {
+ /* This is a reloc for a deleted entry or somesuch. */
+ memset (irela, 0, sizeof (*irela));
+ continue;
+ }
+
irela->r_offset += o->output_offset;
/* Relocs in an executable have to be virtual addresses. */
@@ -7145,19 +7164,14 @@ elf_link_input_bfd (finfo, input_bfd)
return false;
break;
case ELF_INFO_TYPE_MERGE:
- if (! (_bfd_write_merged_section
- (output_bfd, o, elf_section_data (o)->sec_info)))
+ if (! _bfd_write_merged_section (output_bfd, o,
+ elf_section_data (o)->sec_info))
return false;
break;
case ELF_INFO_TYPE_EH_FRAME:
{
- asection *ehdrsec;
-
- ehdrsec
- = bfd_get_section_by_name (elf_hash_table (finfo->info)->dynobj,
- ".eh_frame_hdr");
- if (! (_bfd_elf_write_section_eh_frame (output_bfd, o, ehdrsec,
- contents)))
+ if (! _bfd_elf_write_section_eh_frame (output_bfd, finfo->info,
+ o, contents))
return false;
}
break;
@@ -8329,7 +8343,7 @@ elf_reloc_symbol_deleted_p (offset, cookie)
for (; rcookie->rel < rcookie->relend; rcookie->rel++)
{
- unsigned long r_symndx = ELF_R_SYM (rcookie->rel->r_info);
+ unsigned long r_symndx;
if (! rcookie->bad_symtab)
if (rcookie->rel->r_offset > offset)
@@ -8337,6 +8351,10 @@ elf_reloc_symbol_deleted_p (offset, cookie)
if (rcookie->rel->r_offset != offset)
continue;
+ r_symndx = ELF_R_SYM (rcookie->rel->r_info);
+ if (r_symndx == SHN_UNDEF)
+ return true;
+
if (r_symndx >= rcookie->locsymcount
|| ELF_ST_BIND (rcookie->locsyms[r_symndx].st_info) != STB_LOCAL)
{
@@ -8388,24 +8406,18 @@ elf_bfd_discard_info (output_bfd, info)
struct bfd_link_info *info;
{
struct elf_reloc_cookie cookie;
- asection *stab, *eh, *ehdr;
+ asection *stab, *eh;
Elf_Internal_Shdr *symtab_hdr;
struct elf_backend_data *bed;
bfd *abfd;
+ unsigned int count;
boolean ret = false;
- boolean strip = info->strip == strip_all || info->strip == strip_debugger;
- if (info->relocateable
- || info->traditional_format
+ if (info->traditional_format
|| info->hash->creator->flavour != bfd_target_elf_flavour
|| ! is_elf_hash_table (info))
return false;
- ehdr = NULL;
- if (elf_hash_table (info)->dynobj != NULL)
- ehdr = bfd_get_section_by_name (elf_hash_table (info)->dynobj,
- ".eh_frame_hdr");
-
for (abfd = info->input_bfds; abfd != NULL; abfd = abfd->link_next)
{
if (bfd_get_flavour (abfd) != bfd_target_elf_flavour)
@@ -8416,27 +8428,22 @@ elf_bfd_discard_info (output_bfd, info)
if ((abfd->flags & DYNAMIC) != 0)
continue;
- eh = NULL;
- if (ehdr)
- {
- eh = bfd_get_section_by_name (abfd, ".eh_frame");
- if (eh && (eh->_raw_size == 0
- || bfd_is_abs_section (eh->output_section)))
- eh = NULL;
- }
+ eh = bfd_get_section_by_name (abfd, ".eh_frame");
+ if (eh != NULL
+ && (eh->_raw_size == 0
+ || bfd_is_abs_section (eh->output_section)))
+ eh = NULL;
- stab = NULL;
- if (!strip)
- {
- stab = bfd_get_section_by_name (abfd, ".stab");
- if (stab && (stab->_raw_size == 0
- || bfd_is_abs_section (stab->output_section)))
- stab = NULL;
- }
- if ((! stab
- || elf_section_data(stab)->sec_info_type != ELF_INFO_TYPE_STABS)
- && ! eh
- && (strip || ! bed->elf_backend_discard_info))
+ stab = bfd_get_section_by_name (abfd, ".stab");
+ if (stab != NULL
+ && (stab->_raw_size == 0
+ || bfd_is_abs_section (stab->output_section)
+ || elf_section_data (stab)->sec_info_type != ELF_INFO_TYPE_STABS))
+ stab = NULL;
+
+ if (stab == NULL
+ && eh == NULL
+ && bed->elf_backend_discard_info == NULL)
continue;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
@@ -8445,8 +8452,7 @@ elf_bfd_discard_info (output_bfd, info)
cookie.bad_symtab = elf_bad_symtab (abfd);
if (cookie.bad_symtab)
{
- cookie.locsymcount =
- symtab_hdr->sh_size / sizeof (Elf_External_Sym);
+ cookie.locsymcount = symtab_hdr->sh_size / sizeof (Elf_External_Sym);
cookie.extsymoff = 0;
}
else
@@ -8465,16 +8471,19 @@ elf_bfd_discard_info (output_bfd, info)
return false;
}
- if (stab)
+ if (stab != NULL)
{
- cookie.rels = (NAME(_bfd_elf,link_read_relocs)
- (abfd, stab, (PTR) NULL, (Elf_Internal_Rela *) NULL,
- info->keep_memory));
- if (cookie.rels)
+ cookie.rels = NULL;
+ count = stab->reloc_count;
+ if (count != 0)
+ cookie.rels = (NAME(_bfd_elf,link_read_relocs)
+ (abfd, stab, (PTR) NULL, (Elf_Internal_Rela *) NULL,
+ info->keep_memory));
+ if (cookie.rels != NULL)
{
cookie.rel = cookie.rels;
- cookie.relend =
- cookie.rels + stab->reloc_count * bed->s->int_rels_per_ext_rel;
+ cookie.relend = cookie.rels;
+ cookie.relend += count * bed->s->int_rels_per_ext_rel;
if (_bfd_discard_section_stabs (abfd, stab,
elf_section_data (stab)->sec_info,
elf_reloc_symbol_deleted_p,
@@ -8485,39 +8494,32 @@ elf_bfd_discard_info (output_bfd, info)
}
}
- if (eh)
+ if (eh != NULL)
{
cookie.rels = NULL;
- cookie.rel = NULL;
- cookie.relend = NULL;
- if (eh->reloc_count)
+ count = eh->reloc_count;
+ if (count != 0)
cookie.rels = (NAME(_bfd_elf,link_read_relocs)
(abfd, eh, (PTR) NULL, (Elf_Internal_Rela *) NULL,
info->keep_memory));
- if (cookie.rels)
- {
- cookie.rel = cookie.rels;
- cookie.relend =
- cookie.rels + eh->reloc_count * bed->s->int_rels_per_ext_rel;
- }
- if (_bfd_elf_discard_section_eh_frame (abfd, info, eh, ehdr,
+ cookie.rel = cookie.rels;
+ cookie.relend = cookie.rels;
+ if (cookie.rels != NULL)
+ cookie.relend += count * bed->s->int_rels_per_ext_rel;
+
+ if (_bfd_elf_discard_section_eh_frame (abfd, info, eh,
elf_reloc_symbol_deleted_p,
&cookie))
- {
- /* Relocs have been edited. Ensure edited version is
- used later in relocate_section. */
- elf_section_data (eh)->relocs = cookie.rels;
- ret = true;
- }
- if (cookie.rels && elf_section_data (eh)->relocs != cookie.rels)
+ ret = true;
+
+ if (cookie.rels != NULL
+ && elf_section_data (eh)->relocs != cookie.rels)
free (cookie.rels);
}
- if (bed->elf_backend_discard_info)
- {
- if (bed->elf_backend_discard_info (abfd, &cookie, info))
- ret = true;
- }
+ if (bed->elf_backend_discard_info != NULL
+ && (*bed->elf_backend_discard_info) (abfd, &cookie, info))
+ ret = true;
if (cookie.locsyms != NULL
&& symtab_hdr->contents != (unsigned char *) cookie.locsyms)
@@ -8529,8 +8531,10 @@ elf_bfd_discard_info (output_bfd, info)
}
}
- if (ehdr && _bfd_elf_discard_section_eh_frame_hdr (output_bfd, info, ehdr))
+ if (info->eh_frame_hdr
+ && _bfd_elf_discard_section_eh_frame_hdr (output_bfd, info))
ret = true;
+
return ret;
}
diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c
index 5da8e43..ddd86fb 100644
--- a/bfd/elfxx-ia64.c
+++ b/bfd/elfxx-ia64.c
@@ -3204,13 +3204,11 @@ elfNN_ia64_install_dyn_reloc (abfd, info, sec, srel, offset, type,
{
Elf_Internal_Rela outrel;
- offset += sec->output_section->vma + sec->output_offset;
-
BFD_ASSERT (dynindx != -1);
outrel.r_info = ELFNN_R_INFO (dynindx, type);
outrel.r_addend = addend;
outrel.r_offset = _bfd_elf_section_offset (abfd, info, sec, offset);
- if ((outrel.r_offset | 1) == (bfd_vma) -1)
+ if (outrel.r_offset >= (bfd_vma) -2)
{
/* Run for the hills. We shouldn't be outputting a relocation
for this. So do what everyone else does and output a no-op. */
@@ -3218,6 +3216,8 @@ elfNN_ia64_install_dyn_reloc (abfd, info, sec, srel, offset, type,
outrel.r_addend = 0;
outrel.r_offset = 0;
}
+ else
+ outrel.r_offset += sec->output_section->vma + sec->output_offset;
bfd_elfNN_swap_reloca_out (abfd, &outrel,
((ElfNN_External_Rela *) srel->contents
diff --git a/bfd/elfxx-target.h b/bfd/elfxx-target.h
index 4f5b81c..f5b6a35 100644
--- a/bfd/elfxx-target.h
+++ b/bfd/elfxx-target.h
@@ -385,15 +385,6 @@
#ifndef elf_backend_write_section
#define elf_backend_write_section NULL
#endif
-#ifndef elf_backend_set_nonloadable_filepos
-#define elf_backend_set_nonloadable_filepos NULL
-#endif
-#ifndef elf_backend_is_contained_by_filepos
-#define elf_backend_is_contained_by_filepos NULL
-#endif
-#ifndef elf_backend_copy_private_bfd_data_p
-#define elf_backend_copy_private_bfd_data_p NULL
-#endif
#ifndef elf_backend_mips_irix_compat
#define elf_backend_mips_irix_compat NULL
#endif
@@ -492,9 +483,6 @@ static const struct elf_backend_data elfNN_bed =
elf_backend_discard_info,
elf_backend_ignore_discarded_relocs,
elf_backend_write_section,
- elf_backend_set_nonloadable_filepos,
- elf_backend_is_contained_by_filepos,
- elf_backend_copy_private_bfd_data_p,
elf_backend_mips_irix_compat,
elf_backend_mips_rtype_to_howto,
elf_backend_ecoff_debug_swap,
diff --git a/bfd/format.c b/bfd/format.c
index ef6b46e..33291d0 100644
--- a/bfd/format.c
+++ b/bfd/format.c
@@ -119,8 +119,9 @@ bfd_check_format_matches (abfd, format, matching)
char ***matching;
{
extern const bfd_target binary_vec;
- const bfd_target * const *target, *save_targ, *right_targ, *ar_right_targ;
- char **matching_vector = NULL;
+ const bfd_target * const *target;
+ const bfd_target **matching_vector = NULL;
+ const bfd_target *save_targ, *right_targ, *ar_right_targ;
int match_count;
int ar_match_index;
@@ -145,8 +146,8 @@ bfd_check_format_matches (abfd, format, matching)
bfd_size_type amt;
*matching = NULL;
- amt = sizeof (char *) * 2 * _bfd_target_vector_entries;
- matching_vector = (char **) bfd_malloc (amt);
+ amt = sizeof (*matching_vector) * 2 * _bfd_target_vector_entries;
+ matching_vector = (const bfd_target **) bfd_malloc (amt);
if (!matching_vector)
return false;
}
@@ -170,7 +171,7 @@ bfd_check_format_matches (abfd, format, matching)
abfd->xvec = right_targ; /* Set the target as returned. */
if (matching)
- free (matching_vector);
+ free ((PTR) matching_vector);
return true; /* File position has moved, BTW. */
}
@@ -193,7 +194,7 @@ bfd_check_format_matches (abfd, format, matching)
abfd->format = bfd_unknown;
if (matching)
- free (matching_vector);
+ free ((PTR) matching_vector);
bfd_set_error (bfd_error_file_not_recognized);
@@ -236,7 +237,7 @@ bfd_check_format_matches (abfd, format, matching)
}
if (matching)
- matching_vector[match_count] = temp->name;
+ matching_vector[match_count] = temp;
match_count++;
@@ -259,7 +260,7 @@ bfd_check_format_matches (abfd, format, matching)
if (ar_right_targ != bfd_default_vector[0])
ar_right_targ = *target;
if (matching)
- matching_vector[ar_match_index] = (*target)->name;
+ matching_vector[ar_match_index] = *target;
ar_match_index++;
}
else if (err != bfd_error_wrong_format)
@@ -268,7 +269,7 @@ bfd_check_format_matches (abfd, format, matching)
abfd->format = bfd_unknown;
if (matching)
- free (matching_vector);
+ free ((PTR) matching_vector);
return false;
}
@@ -289,7 +290,27 @@ bfd_check_format_matches (abfd, format, matching)
{
memcpy (matching_vector,
matching_vector + _bfd_target_vector_entries,
- sizeof (char *) * match_count);
+ sizeof (*matching_vector) * match_count);
+ }
+ }
+ }
+
+ if (match_count > 1 && bfd_associated_vector != NULL)
+ {
+ const bfd_target * const *assoc = bfd_associated_vector;
+
+ while ((right_targ = *assoc++) != NULL)
+ {
+ int i = match_count;
+
+ while (--i >= 0)
+ if (matching_vector[i] == right_targ)
+ break;
+
+ if (i >= 0)
+ {
+ match_count = 1;
+ break;
}
}
}
@@ -299,7 +320,7 @@ bfd_check_format_matches (abfd, format, matching)
abfd->xvec = right_targ; /* Change BFD's target permanently. */
if (matching)
- free (matching_vector);
+ free ((PTR) matching_vector);
return true; /* File position has moved, BTW. */
}
@@ -312,7 +333,7 @@ bfd_check_format_matches (abfd, format, matching)
bfd_set_error (bfd_error_file_not_recognized);
if (matching)
- free (matching_vector);
+ free ((PTR) matching_vector);
}
else
{
@@ -320,8 +341,15 @@ bfd_check_format_matches (abfd, format, matching)
if (matching)
{
- *matching = matching_vector;
+ *matching = (char **) matching_vector;
matching_vector[match_count] = NULL;
+ /* Return target names. This is a little nasty. Maybe we
+ should do another bfd_malloc? */
+ while (--match_count >= 0)
+ {
+ const char *name = matching_vector[match_count]->name;
+ *(const char **) &matching_vector[match_count] = name;
+ }
}
}
diff --git a/bfd/libbfd-in.h b/bfd/libbfd-in.h
index 776dcd6..00d5bd3 100644
--- a/bfd/libbfd-in.h
+++ b/bfd/libbfd-in.h
@@ -567,6 +567,9 @@ extern bfd *bfd_last_cache;
extern const bfd_target * const *bfd_target_vector;
extern const bfd_target *bfd_default_vector[];
+/* List of associated target vectors. */
+extern const bfd_target * const *bfd_associated_vector;
+
/* Functions shared by the ECOFF and MIPS ELF backends, which have no
other common header files. */
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index ef001f3..6d40e91 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -572,6 +572,9 @@ extern bfd *bfd_last_cache;
extern const bfd_target * const *bfd_target_vector;
extern const bfd_target *bfd_default_vector[];
+/* List of associated target vectors. */
+extern const bfd_target * const *bfd_associated_vector;
+
/* Functions shared by the ECOFF and MIPS ELF backends, which have no
other common header files. */
diff --git a/bfd/po/SRC-POTFILES.in b/bfd/po/SRC-POTFILES.in
index c95e01e..e11e314 100644
--- a/bfd/po/SRC-POTFILES.in
+++ b/bfd/po/SRC-POTFILES.in
@@ -152,8 +152,6 @@ elf32-openrisc.c
elf32-or32.c
elf32-pj.c
elf32-ppc.c
-elf32-qnx.c
-elf32-qnx.h
elf32-s390.c
elf32-sh.c
elf32-sh64-com.c
@@ -225,6 +223,8 @@ m68klinux.c
m68klynx.c
m68knetbsd.c
m88kmach3.c
+mach-o.c
+mach-o.h
merge.c
mipsbsd.c
mmo.c
@@ -253,6 +253,9 @@ pe-mcore.c
pe-mips.c
pe-ppc.c
pe-sh.c
+pef-traceback.h
+pef.c
+pef.h
pei-arm.c
pei-i386.c
pei-mcore.c
@@ -293,3 +296,5 @@ vms.c
vms.h
xcoff-target.h
xcofflink.c
+xsym.c
+xsym.h
diff --git a/bfd/po/da.po b/bfd/po/da.po
index 6f18484..89ed7d0 100644
--- a/bfd/po/da.po
+++ b/bfd/po/da.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: bfd 2.12.91\n"
"POT-Creation-Date: 2002-07-23 15:55-0400\n"
-"PO-Revision-Date: 2002-09-07 21:55+0200\n"
+"PO-Revision-Date: 2002-11-09 23:25+0100\n"
"Last-Translator: Keld Simonsen <keld@dkuug.dk>\n"
"Language-Team: Danish <dansk@klid.dk>\n"
"MIME-Version: 1.0\n"
@@ -21,27 +21,27 @@ msgstr "%s: Ukendt sektionstype i a.out.adobe-fil: %x\n"
#: aout-cris.c:208
#, c-format
msgid "%s: Invalid relocation type exported: %d"
-msgstr "%s: Ugyldig relokaliseringstype eksporteret: %d"
+msgstr "%s: Ugyldig relokeringstype eksporteret: %d"
#: aout-cris.c:252
#, c-format
msgid "%s: Invalid relocation type imported: %d"
-msgstr "%s: Ugyldig relokaliseringstype importeret: %d"
+msgstr "%s: Ugyldig relokeringstype importeret: %d"
#: aout-cris.c:263
#, c-format
msgid "%s: Bad relocation record imported: %d"
-msgstr "%s: Fejlagtig relokaliseringstype importeret: %d"
+msgstr "%s: Fejlagtig relokeringstype importeret: %d"
#: aoutx.h:1282 aoutx.h:1699
#, c-format
msgid "%s: can not represent section `%s' in a.out object file format"
-msgstr "%s: kan ikke representere sektionen \"%s\" i a.out-objektfilformat"
+msgstr "%s: kan ikke repræsentere sektionen \"%s\" i a.out-objektfilformat"
#: aoutx.h:1669
#, c-format
msgid "%s: can not represent section for symbol `%s' in a.out object file format"
-msgstr "%s: kan ikke representere sektion for symbolet \"%s\" i a.out-objektfilformat"
+msgstr "%s: kan ikke repræsentere sektion for symbolet \"%s\" i a.out-objektfilformat"
#: aoutx.h:1671
msgid "*unknown*"
@@ -50,7 +50,7 @@ msgstr "*ukendt*"
#: aoutx.h:3732
#, c-format
msgid "%s: relocateable link from %s to %s not supported"
-msgstr "%s: relokaliseringsbar lænke fra %s til %s understøttes inte"
+msgstr "%s: relokérbar lænke fra %s til %s understøttes ikke"
#: archive.c:1826
msgid "Warning: writing archive was slow: rewriting timestamp\n"
@@ -99,7 +99,7 @@ msgstr "Ingen symboler"
#: bfd.c:282
msgid "Archive has no index; run ranlib to add one"
-msgstr "Arkivet har intet index; kør ranlib for at tilføje ét"
+msgstr "Arkivet har intet indeks; kør ranlib til at tilføje ét"
#: bfd.c:283
msgid "No more archived files"
@@ -181,19 +181,19 @@ msgstr "IHIHALF mangler"
#: coff-a29k.c:212 coff-or32.c:229
msgid "Unrecognized reloc"
-msgstr "Ukendt relokalisering"
+msgstr "Ukendt relokering"
#: coff-a29k.c:408
msgid "missing IHCONST reloc"
-msgstr "IHCONST-relokalisering mangler"
+msgstr "IHCONST-relokering mangler"
#: coff-a29k.c:498
msgid "missing IHIHALF reloc"
-msgstr "IHIHALF-relokalisering mangler"
+msgstr "IHIHALF-relokering mangler"
#: coff-alpha.c:881 coff-alpha.c:918 coff-alpha.c:1989 coff-mips.c:1432
msgid "GP relative relocation used when GP not defined"
-msgstr "GP-relativ relokalisering bruges når GP ikke er defineret"
+msgstr "GP-relativ relokering bruges når GP ikke er defineret"
#: coff-alpha.c:1485
msgid "using multiple gp values"
@@ -231,22 +231,22 @@ msgstr " overvej omlænkning med --support-old-code aktiveret"
#: coff-arm.c:1785 coff-tic80.c:686 cofflink.c:3031
#, c-format
msgid "%s: bad reloc address 0x%lx in section `%s'"
-msgstr "%s: fejlagtig relokaliseringsadresse 0x%lx i sektionen \"%s\""
+msgstr "%s: fejlagtig relokeringsadresse 0x%lx i sektionen \"%s\""
#: coff-arm.c:2127
#, c-format
msgid "%s: illegal symbol index in reloc: %d"
-msgstr "%s: utilladt symbolindex i relokalisering: %d"
+msgstr "%s: ikke tilladt symbolindeks i relokering: %d"
#: coff-arm.c:2255
#, c-format
msgid "ERROR: %s is compiled for APCS-%d, whereas %s is compiled for APCS-%d"
-msgstr "FEJL: %s kompileret for APCS-%d, mens %s er kompileret for APCS-%d"
+msgstr "FEJL: %s oversat for APCS-%d, mens %s er oversat for APCS-%d"
#: coff-arm.c:2270 elf32-arm.h:2297
#, c-format
msgid "ERROR: %s passes floats in float registers, whereas %s passes them in integer registers"
-msgstr "FEJL: %s overfører flydende tal i flydende talsregister, mens %s overfører dem i heltalsregister"
+msgstr "FEJL: %s overfører flydende tal i flydendetalsregister, mens %s overfører dem i heltalsregister"
#: coff-arm.c:2273 elf32-arm.h:2302
#, c-format
@@ -256,12 +256,12 @@ msgstr "FEJL: %s overfører flydende tal i heltalsregister, mens %s overfører dem
#: coff-arm.c:2288
#, c-format
msgid "ERROR: %s is compiled as position independent code, whereas target %s is absolute position"
-msgstr "FEJL: %s er kompileret som positionsuafhængig kode, mens målet %s har absolut position"
+msgstr "FEJL: %s er oversat som positionsuafhængig kode, mens målet %s har absolut position"
#: coff-arm.c:2291
#, c-format
msgid "ERROR: %s is compiled as absolute position code, whereas target %s is position independent"
-msgstr "FEJL: %s er kompileret som kode med absolut position, mens målet %s er positionsuafhængigt"
+msgstr "FEJL: %s er oversat som kode med absolut position, mens målet %s er positionsuafhængigt"
#: coff-arm.c:2320 elf32-arm.h:2358
#, c-format
@@ -322,31 +322,31 @@ msgstr "usikker kaldskonvention for ikke-COFF-symbol"
#: coff-m68k.c:481 coff-mips.c:2429 elf32-m68k.c:2157 elf32-mips.c:1844
msgid "unsupported reloc type"
-msgstr "relokaliseringstypen understøttes ikke"
+msgstr "relokeringstypen understøttes ikke"
#: coff-mips.c:874 elf32-mips.c:1062 elf64-mips.c:1609
msgid "GP relative relocation when _gp not defined"
-msgstr "GP-relativ relokalisering når _gp ikke var defineret"
+msgstr "GP-relativ relokering når _gp ikke var defineret"
#. No other sections should appear in -membedded-pic
#. code.
#: coff-mips.c:2466
msgid "reloc against unsupported section"
-msgstr "relokalisering mod sektion som ikke understøttes"
+msgstr "relokering mod sektion som ikke understøttes"
#: coff-mips.c:2474
msgid "reloc not properly aligned"
-msgstr "relokalisering ikke på lige grænse"
+msgstr "relokering ikke på passende afrundet adresse"
#: coff-rs6000.c:2766
#, c-format
msgid "%s: unsupported relocation type 0x%02x"
-msgstr "%s: relokaliseringstypen 0x%02x understøttes ikke"
+msgstr "%s: relokeringstypen 0x%02x understøttes ikke"
#: coff-rs6000.c:2859
#, c-format
msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"
-msgstr "%s: TOC-relokalisering ved 0x%x til symbolet \"%s\" uden nogen TOC-post"
+msgstr "%s: TOC-relokering ved 0x%x til symbolet \"%s\" uden nogen TOC-post"
#: coff-rs6000.c:3590 coff64-rs6000.c:2091
#, c-format
@@ -356,17 +356,17 @@ msgstr "%s: symbolet \"%s\" har ukendt smclas %d"
#: coff-tic54x.c:279 coff-tic80.c:449
#, c-format
msgid "Unrecognized reloc type 0x%x"
-msgstr "Ukendt relokaliseringstype 0x%x"
+msgstr "Ukendt relokeringstype 0x%x"
#: coff-tic54x.c:390 coffcode.h:4974
#, c-format
msgid "%s: warning: illegal symbol index %ld in relocs"
-msgstr "%s: advarsel: utilladt symbolindex %ld i relokaliseringerne"
+msgstr "%s: advarsel: ikke tilladt symbolindeks %ld i relokeringerne"
#: coff-w65.c:363
#, c-format
msgid "ignoring reloc %s\n"
-msgstr "ignorerer relokalisering %s\n"
+msgstr "ignorerer relokering %s\n"
#: coffcode.h:1086
#, c-format
@@ -381,7 +381,7 @@ msgstr "Ukendt TI COFF-mål-id \"0x%x\""
#: coffcode.h:4365
#, c-format
msgid "%s: warning: illegal symbol index %ld in line numbers"
-msgstr "%s: advarsel: utilladt symbolindex %ld i linjenummer"
+msgstr "%s: advarsel: ikke tilladt symbolindeks %ld i linjenumre"
#: coffcode.h:4379
#, c-format
@@ -401,7 +401,7 @@ msgstr "advarsel: %s: lokalt symbol \"%s\" har ingen sektion"
#: coffcode.h:5012
#, c-format
msgid "%s: illegal relocation type %d at address 0x%lx"
-msgstr "%s: utilladt relokaliseringstype %d på adresse 0x%lx"
+msgstr "%s: ikke tilladt relokeringstype %d på adresse 0x%lx"
#: coffgen.c:1661
#, c-format
@@ -416,12 +416,12 @@ msgstr "Advarsel: typen på symbol \"%s\" ændredes fra %d til %d i %s"
#: cofflink.c:2321
#, c-format
msgid "%s: relocs in section `%s', but it has no contents"
-msgstr "%s: relokaliseringer i sektionen \"%s\", men den har intet indhold"
+msgstr "%s: relokeringer i sektionen \"%s\", men den har intet indhold"
#: cofflink.c:2664 coffswap.h:877
#, c-format
msgid "%s: %s: reloc overflow: 0x%lx > 0xffff"
-msgstr "%s: %s: relokalisering giver overløb: 0x%lx > 0xffff"
+msgstr "%s: %s: relokering giver overløb: 0x%lx > 0xffff"
#: cofflink.c:2673 coffswap.h:864
#, c-format
@@ -444,7 +444,7 @@ msgstr "Dwarf-fejl: Kan ikke finde sektionen .debug_abbrev."
#: dwarf2.c:560
#, c-format
msgid "Dwarf Error: Abbrev offset (%lu) greater than or equal to .debug_abbrev size (%lu)."
-msgstr "Dwarf-fejl: Forkortningsafstanden (%lu) større end eller lig med størrelsen .debug_abbrev (%lu)."
+msgstr "Dwarf-fejl: Forkortelsesafstanden (%lu) større end eller lig med størrelsen .debug_abbrev (%lu)."
#: dwarf2.c:757
#, c-format
@@ -471,7 +471,7 @@ msgstr "Dwarf-fejl: vanskabt linjenummerssektion."
#: dwarf2.c:1355 dwarf2.c:1566
#, c-format
msgid "Dwarf Error: Could not find abbrev number %u."
-msgstr "Dwarf-fejl: Kunne ikke finde forkortningsnumret %u."
+msgstr "Dwarf-fejl: Kunne ikke finde forkortelsesnumret %u."
#: dwarf2.c:1527
#, c-format
@@ -486,7 +486,7 @@ msgstr "Dwarf-fejl: fandt adressestørrelsen \"%u\", denne læser kan ikke håndter
#: dwarf2.c:1557
#, c-format
msgid "Dwarf Error: Bad abbrev number: %u."
-msgstr "Dwarf-fejl: Fejlagtigt forkortningsnummer: %u."
+msgstr "Dwarf-fejl: Fejlagtigt forkortelsesnummer: %u."
#: ecoff.c:1318
#, c-format
@@ -518,7 +518,7 @@ msgid ""
" End+1 symbol: %-7ld Type: %s"
msgstr ""
"\n"
-" Symbol slut+1: %-7ld Typ: %s"
+" Symbol slut+1: %-7ld Type: %s"
#: ecoff.c:1607
#, c-format
@@ -569,21 +569,21 @@ msgstr ""
#: elf64-sh64.c:1659
#, c-format
msgid "%s: warning: unresolvable relocation against symbol `%s' from %s section"
-msgstr "%s: advarsel: uløselig relokalisering mod symbol \"%s\" fra sektionen %s"
+msgstr "%s: advarsel: uløselig relokering mod symbol \"%s\" fra sektionen %s"
#: elf-m10200.c:446 elf-m10300.c:656 elf32-arm.h:2084 elf32-avr.c:833
#: elf32-cris.c:1403 elf32-d10v.c:481 elf32-fr30.c:635 elf32-frv.c:809
#: elf32-h8300.c:548 elf32-i860.c:1031 elf32-m32r.c:1278 elf32-openrisc.c:439
#: elf32-v850.c:1691 elf32-xstormy16.c:933 elf64-mmix.c:1302
msgid "internal error: out of range error"
-msgstr "intern fejl: udenfor intervallet"
+msgstr "intern fejl: uden for intervallet"
#: elf-m10200.c:450 elf-m10300.c:660 elf32-arm.h:2088 elf32-avr.c:837
#: elf32-cris.c:1407 elf32-d10v.c:485 elf32-fr30.c:639 elf32-frv.c:813
#: elf32-h8300.c:552 elf32-i860.c:1035 elf32-m32r.c:1282 elf32-openrisc.c:443
#: elf32-v850.c:1695 elf32-xstormy16.c:937 elf64-mmix.c:1306 elfxx-mips.c:5264
msgid "internal error: unsupported relocation error"
-msgstr "intern fejl: relokaliseringen understøttes ikke"
+msgstr "intern fejl: relokeringen understøttes ikke"
#: elf-m10200.c:454 elf-m10300.c:664 elf32-arm.h:2092 elf32-d10v.c:489
#: elf32-h8300.c:556 elf32-m32r.c:1286
@@ -652,7 +652,7 @@ msgstr " kræves fra %s:\n"
#: elf.c:1902
#, c-format
msgid "%s: invalid link %lu for reloc section %s (index %u)"
-msgstr "%s: ugyldig lænke %lu for relokaliseringssektion %s (index %u)"
+msgstr "%s: ugyldig lænke %lu for relokeringssektion %s (indeks %u)"
#: elf.c:3603
#, c-format
@@ -677,7 +677,7 @@ msgstr "%s: advarsel: allokeret sektion \"%s\" ikke i segment"
#: elf.c:4472
#, c-format
msgid "%s: symbol `%s' required but not present"
-msgstr "%s: symbol \"%s\" kræves men er ikke tilstede"
+msgstr "%s: symbol \"%s\" kræves, men er ikke tilstede"
#: elf.c:4749
#, c-format
@@ -687,7 +687,7 @@ msgstr "%s: advarsel: Tomt indlæsningsbart segment opdaget, er dette meningen?\n
#: elf.c:6193
#, c-format
msgid "%s: unsupported relocation type %s"
-msgstr "%s: relokaliseringstypen %s understøttes ikke"
+msgstr "%s: relokeringstypen %s understøttes ikke"
#: elf32-arm.h:1221
#, c-format
@@ -702,12 +702,12 @@ msgstr "%s: Advarsel: Thumb BLX-instruktionen bruger thumb-funktionen \"%s\" som
#: elf32-arm.h:1914 elf32-sh.c:4125
#, c-format
msgid "%s(%s+0x%lx): %s relocation against SEC_MERGE section"
-msgstr "%s(%s+0x%lx): %s relokalisering mod SEC_MERGE-sektion"
+msgstr "%s(%s+0x%lx): %s relokering mod SEC_MERGE-sektion"
#: elf32-arm.h:2008
#, c-format
msgid "%s: warning: unresolvable relocation %d against symbol `%s' from %s section"
-msgstr "%s: advarsel: uløselig relokalisering %d mod symbol \"%s\" fra sektionen %s"
+msgstr "%s: advarsel: uløselig relokering %d mod symbol \"%s\" fra sektionen %s"
#: elf32-arm.h:2176
#, c-format
@@ -717,12 +717,12 @@ msgstr "Advarsel: Fjerner samvirkendeflaget i %s eftersom ikke-samvirkende kode
#: elf32-arm.h:2271
#, c-format
msgid "ERROR: %s is compiled for EABI version %d, whereas %s is compiled for version %d"
-msgstr "FEJL: %s er kompileret for EABI version %d, mens %s er kompileret for version %d"
+msgstr "FEJL: %s er oversat for EABI version %d, mens %s er oversat for version %d"
#: elf32-arm.h:2285
#, c-format
msgid "ERROR: %s is compiled for APCS-%d, whereas target %s uses APCS-%d"
-msgstr "FEJL: %s er kompileret for APCS-%d, mens målet %s bruger APCS-%d"
+msgstr "FEJL: %s er oversat for APCS-%d, mens målet %s bruger APCS-%d"
#: elf32-arm.h:2313
#, c-format
@@ -794,7 +794,7 @@ msgstr " [Version2 EABI]"
#: elf32-arm.h:2457
msgid " [dynamic symbols use segment index]"
-msgstr " [dynamiske symboler bruger segmentindex]"
+msgstr " [dynamiske symboler bruger segmentindeks]"
#: elf32-arm.h:2460
msgid " [mapping symbols precede others]"
@@ -806,7 +806,7 @@ msgstr " <EABI-version genkendes ikke>"
#: elf32-arm.h:2474
msgid " [relocatable executable]"
-msgstr " [relokaliseringsbar kørbar fil]"
+msgstr " [relokérbar kørbar fil]"
#: elf32-arm.h:2477
msgid " [has entry point]"
@@ -820,17 +820,17 @@ msgstr "<Ukendte flagbit er sat>"
#: elf32-i860.c:1039 elf32-openrisc.c:447 elf32-v850.c:1699
#: elf32-xstormy16.c:941 elf64-mmix.c:1310
msgid "internal error: dangerous relocation"
-msgstr "intern fejl: farlig relokalisering"
+msgstr "intern fejl: farlig relokering"
#: elf32-cris.c:949
#, c-format
msgid "%s: unresolvable relocation %s against symbol `%s' from %s section"
-msgstr "%s: uløselig relokalisering %s mod symbol \"%s\" fra sektionen %s"
+msgstr "%s: uløselig relokering %s mod symbol \"%s\" fra sektionen %s"
#: elf32-cris.c:1012
#, c-format
msgid "%s: No PLT nor GOT for relocation %s against symbol `%s' from %s section"
-msgstr "%s: Hverken nogen PLT eller GOT for relokalisering %s mod symbol \"%s\" fra sektionen %s"
+msgstr "%s: Hverken nogen PLT eller GOT for relokering %s mod symbol \"%s\" fra sektionen %s"
#: elf32-cris.c:1015 elf32-cris.c:1141
msgid "[whose name is lost]"
@@ -839,27 +839,27 @@ msgstr "[hvis navn er tabt]"
#: elf32-cris.c:1130
#, c-format
msgid "%s: relocation %s with non-zero addend %d against local symbol from %s section"
-msgstr "%s: relokalisering %s med ikke-tomt addendum %d mod lokalt symbol fra sektionen %s"
+msgstr "%s: relokering %s med ikke-tomt addendum %d mod lokalt symbol fra sektionen %s"
#: elf32-cris.c:1137
#, c-format
msgid "%s: relocation %s with non-zero addend %d against symbol `%s' from %s section"
-msgstr "%s: relokalisering %s med ikke-tomt addendum %d mod symbol \"%s\" fra sektionen %s"
+msgstr "%s: relokering %s med ikke-tomt addendum %d mod symbol \"%s\" fra sektionen %s"
#: elf32-cris.c:1155
#, c-format
msgid "%s: relocation %s is not allowed for global symbol: `%s' from %s section"
-msgstr "%s: relokaliseringen %s er ikke tilladt for globalt symbol: \"%s\" fra sektionen %s"
+msgstr "%s: relokeringen %s er ikke tilladt for globalt symbol: \"%s\" fra sektionen %s"
#: elf32-cris.c:1170
#, c-format
msgid "%s: relocation %s in section %s with no GOT created"
-msgstr "%s: relokalisering %s i sektionen %s uden GOT oprettet"
+msgstr "%s: relokering %s i sektionen %s uden GOT oprettet"
#: elf32-cris.c:1288
#, c-format
msgid "%s: Internal inconsistency; no relocation section %s"
-msgstr "%s: Intern inkonsistens; ingen relokaliseringssektion %s"
+msgstr "%s: Intern inkonsistens; ingen relokeringssektion %s"
#: elf32-cris.c:2514
#, c-format
@@ -868,31 +868,31 @@ msgid ""
" relocation %s should not be used in a shared object; recompile with -fPIC"
msgstr ""
"%s, sektion %s:\n"
-" relokaliseringen %s bør ikke bruges i et delt objekt; genoversæt med -fPIC"
+" relokeringen %s bør ikke bruges i et delt objekt; genoversæt med -fPIC"
#: elf32-cris.c:2991
msgid " [symbols have a _ prefix]"
-msgstr " [symboler har et _-prefix]"
+msgstr " [symboler har et _-præfiks]"
#: elf32-cris.c:3030
#, c-format
msgid "%s: uses _-prefixed symbols, but writing file with non-prefixed symbols"
-msgstr "%s: bruger symboler med _-prefix, men skriver fil med symboler uden prefix"
+msgstr "%s: bruger symboler med _-præfiks, men skriver fil med symboler uden præfiks"
#: elf32-cris.c:3031
#, c-format
msgid "%s: uses non-prefixed symbols, but writing file with _-prefixed symbols"
-msgstr "%s: bruger symboler uden prefix, men skriver fil med symboler med _-prefix"
+msgstr "%s: bruger symboler uden præfiks, men skriver fil med symboler med _-præfiks"
#: elf32-frv.c:1217
#, c-format
msgid "%s: compiled with %s and linked with modules that use non-pic relocations"
-msgstr "%s: kompileret med %s og lænket med moduler som bruger ikke-pic-relokalisering"
+msgstr "%s: oversat med %s og lænket med moduler som bruger ikke-pic-relokering"
#: elf32-frv.c:1267
#, c-format
msgid "%s: compiled with %s and linked with modules compiled with %s"
-msgstr "%s: kompileret med %s og lænket med moduler som kompileredes med %s"
+msgstr "%s: oversat med %s og lænket med moduler som oversattes med %s"
#: elf32-frv.c:1279
#, c-format
@@ -907,7 +907,7 @@ msgstr "private flag = 0x%lx:"
#: elf32-gen.c:82 elf64-gen.c:82
#, c-format
msgid "%s: Relocations in generic ELF (EM: %d)"
-msgstr "%s: Relokalisering i generisk ELF (EM: %d)"
+msgstr "%s: Relokering i generisk ELF (EM: %d)"
#: elf32-hppa.c:671 elf64-ppc.c:2323
#, c-format
@@ -922,17 +922,17 @@ msgstr "%s(%s+0x%lx): kan ikke nå %s, genoversæt med -ffunction-sections"
#: elf32-hppa.c:1338 elf64-x86-64.c:673
#, c-format
msgid "%s: relocation %s can not be used when making a shared object; recompile with -fPIC"
-msgstr "%s: relokaliseringen %s kan ikke bruges når et delt objekt oprettes; genoversæt med -fPIC"
+msgstr "%s: relokeringen %s kan ikke bruges når et delt objekt oprettes; genoversæt med -fPIC"
#: elf32-hppa.c:1358
#, c-format
msgid "%s: relocation %s should not be used when making a shared object; recompile with -fPIC"
-msgstr "%s: relokaliseringen %s bør ikke bruges når et delt objekt oprettes; genoversæt med -fPIC"
+msgstr "%s: relokeringen %s bør ikke bruges når et delt objekt oprettes; genoversæt med -fPIC"
#: elf32-hppa.c:1551
#, c-format
msgid "Could not find relocation section for %s"
-msgstr "Kunne ikke finde relokaliseringssektion for %s"
+msgstr "Kunne ikke finde relokeringssektion for %s"
#: elf32-hppa.c:2855
#, c-format
@@ -956,12 +956,12 @@ msgstr ".got-sektionen følger ikke umiddelbart efter .plt-sektion"
#: elf32-i386.c:379
#, c-format
msgid "%s: invalid relocation type %d"
-msgstr "%s: ugyldig relokaliseringstype %d"
+msgstr "%s: ugyldig relokeringstype %d"
#: elf32-i386.c:876 elf32-s390.c:649 elf64-s390.c:595 elf64-x86-64.c:591
#, c-format
msgid "%s: bad symbol index: %d"
-msgstr "%s: fejlagtigt symbolindex: %d"
+msgstr "%s: fejlagtigt symbolindeks: %d"
#: elf32-i386.c:948
#, c-format
@@ -972,7 +972,7 @@ msgstr "%s: \"%s\" kaldt både som lokalt normalt symbol og lokalt trådsymbol"
#: elf64-x86-64.c:761
#, c-format
msgid "%s: bad relocation section name `%s'"
-msgstr "%s: fejlagtig relokaliseringssektionsnavn \"%s\""
+msgstr "%s: fejlagtig relokeringssektionsnavn \"%s\""
#: elf32-i386.c:1159 elf64-alpha.c:4768
#, c-format
@@ -983,28 +983,28 @@ msgstr "%s: lokal TLS-eksekveringskode kan ikke lænkes ind i delte objekter"
#: elf64-s390.c:1945 elf64-sparc.c:2578 elf64-x86-64.c:1948
#, c-format
msgid "%s(%s+0x%lx): unresolvable relocation against symbol `%s'"
-msgstr "%s(%s+0x%lx): uløselig relokalisering mod symbol \"%s\""
+msgstr "%s(%s+0x%lx): uløselig relokering mod symbol \"%s\""
#: elf32-i386.c:2784 elf32-s390.c:2019 elf64-ppc.c:5977 elf64-s390.c:1983
#: elf64-x86-64.c:1986
#, c-format
msgid "%s(%s+0x%lx): reloc against `%s': error %d"
-msgstr "%s(%s+0x%lx): relokalisering mod \"%s\": fejl %d"
+msgstr "%s(%s+0x%lx): relokering mod \"%s\": fejl %d"
#: elf32-m32r.c:924
msgid "SDA relocation when _SDA_BASE_ not defined"
-msgstr "SDA-relokalisering når _SDA_BASE_ ikke er defineret"
+msgstr "SDA-relokering når _SDA_BASE_ ikke er defineret"
#: elf32-ia64.c:3687 elf32-m32r.c:1013 elf32-ppc.c:2987 elf64-alpha.c:4185
#: elf64-alpha.c:4313 elf64-ia64.c:3687
#, c-format
msgid "%s: unknown relocation type %d"
-msgstr "%s: ukendt relokaliseringstype %d"
+msgstr "%s: ukendt relokeringstype %d"
#: elf32-m32r.c:1221
#, c-format
msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)"
-msgstr "%s: Målet (%s) for en %s-relokalisering er i forkert sektion (%s)"
+msgstr "%s: Målet (%s) for en %s-relokering er i forkert sektion (%s)"
#: elf32-m32r.c:1947
#, c-format
@@ -1035,16 +1035,16 @@ msgstr " [m68000]"
#: elf32-mcore.c:354 elf32-mcore.c:457
#, c-format
msgid "%s: Relocation %s (%d) is not currently supported.\n"
-msgstr "%s: Relokalisering %s (%d) understøttes ikke i øjeblikket.\n"
+msgstr "%s: Relokering %s (%d) understøttes ikke i øjeblikket.\n"
#: elf32-mcore.c:442
#, c-format
msgid "%s: Unknown relocation type %d\n"
-msgstr "%s: Ukendt relokaliseringstype %d\n"
+msgstr "%s: Ukendt relokeringstype %d\n"
#: elf32-mips.c:1152 elf64-mips.c:1783
msgid "32bits gp relative relocation occurs for an external symbol"
-msgstr "32-bit gp-relativ relokalisering forekom for et eksternt symbol"
+msgstr "32-bit gp-relativ relokering forekom for et eksternt symbol"
#: elf32-mips.c:1301
#, c-format
@@ -1054,12 +1054,12 @@ msgstr "Lænkning af mips16-objekter til %s-format understøttes ikke"
#: elf32-ppc.c:1460
#, c-format
msgid "%s: compiled with -mrelocatable and linked with modules compiled normally"
-msgstr "%s: kompileret med -mrelocatable og lænket med moduler som kompileredes normalt"
+msgstr "%s: oversat med -mrelocatable og lænket med moduler som oversattes normalt"
#: elf32-ppc.c:1468
#, c-format
msgid "%s: compiled normally and linked with modules compiled with -mrelocatable"
-msgstr "%s: kompileret normalt og lænket med moduler som kompileredes med -mrelocatable"
+msgstr "%s: oversat normalt og lænket med moduler som oversattes med -mrelocatable"
#: elf32-ppc.c:1494 elf64-sparc.c:2989 elfxx-mips.c:7713
#, c-format
@@ -1074,22 +1074,22 @@ msgstr "%s: Ukendt speciallænkertype %d"
#: elf32-ppc.c:2273 elf32-ppc.c:2307 elf32-ppc.c:2342
#, c-format
msgid "%s: relocation %s cannot be used when making a shared object"
-msgstr "%s: relokaliseringen %s kan ikke bruges når et delt objekt oprettes"
+msgstr "%s: relokeringen %s kan ikke bruges når et delt objekt oprettes"
#: elf32-ppc.c:3126 elf64-ppc.c:5473
#, c-format
msgid "%s: unknown relocation type %d for symbol %s"
-msgstr "%s: ukendt relokaliseringstype %d for symbol %s"
+msgstr "%s: ukendt relokeringstype %d for symbol %s"
#: elf32-ppc.c:3482 elf32-ppc.c:3503 elf32-ppc.c:3553
#, c-format
msgid "%s: The target (%s) of a %s relocation is in the wrong output section (%s)"
-msgstr "%s: Målet (%s) for en %s-relokalisering er i forkert uddatasektion (%s)"
+msgstr "%s: Målet (%s) for en %s-relokering er i forkert uddatasektion (%s)"
#: elf32-ppc.c:3619
#, c-format
msgid "%s: Relocation %s is not yet supported for symbol %s."
-msgstr "%s: Relokaliseringen %s understøttes ikke endnu for symbol %s."
+msgstr "%s: Relokeringen %s understøttes ikke endnu for symbol %s."
#: elf32-sh.c:1964
#, c-format
@@ -1109,7 +1109,7 @@ msgstr "%s: 0x%lx: advarsel: fejlagtig R_SH_USES-indlæsningsafstand"
#: elf32-sh.c:2008
#, c-format
msgid "%s: 0x%lx: warning: could not find expected reloc"
-msgstr "%s: 0x%lx: advarsel: kunne ikke finde forventet relokalisering"
+msgstr "%s: 0x%lx: advarsel: kunne ikke finde forventet relokering"
#: elf32-sh.c:2036
#, c-format
@@ -1119,7 +1119,7 @@ msgstr "%s: 0x%lx: advarsel: symbol i uventet sektion"
#: elf32-sh.c:2153
#, c-format
msgid "%s: 0x%lx: warning: could not find expected COUNT reloc"
-msgstr "%s: 0x%lx: advarsel: kunne ikke finde forventet COUNT-relokalisering"
+msgstr "%s: 0x%lx: advarsel: kunne ikke finde forventet COUNT-relokering"
#: elf32-sh.c:2162
#, c-format
@@ -1129,7 +1129,7 @@ msgstr "%s: 0x%lx: advarsel: fejlagtigt antal"
#: elf32-sh.c:2550 elf32-sh.c:2926
#, c-format
msgid "%s: 0x%lx: fatal: reloc overflow while relaxing"
-msgstr "%s: 0x%lx: fatalt: relokalisering giver overløb ved forenklingen"
+msgstr "%s: 0x%lx: fatalt: relokering giver overløb ved forenklingen"
#: elf32-sh.c:4073 elf64-sh64.c:1576
msgid "Unexpected STO_SH5_ISA32 on local symbol is not handled"
@@ -1138,17 +1138,17 @@ msgstr "Uventet STO_SH5_ISA32 på lokalt symbol håndteres ikke"
#: elf32-sh.c:4284
#, c-format
msgid "%s: 0x%lx: fatal: unaligned branch target for relax-support relocation"
-msgstr "%s: 0x%lx: fatalt: ujusteret grenmål for relokalisering for forenklingsunderstøttelse"
+msgstr "%s: 0x%lx: fatalt: ujusteret grenmål for relokering for forenklingsunderstøttelse"
#: elf32-sh64.c:203 elf64-sh64.c:2364
#, c-format
msgid "%s: compiled as 32-bit object and %s is 64-bit"
-msgstr "%s: kompileret som 32-bitsobjekt og %s er 64-bit"
+msgstr "%s: oversat som 32-bitsobjekt og %s er 64-bit"
#: elf32-sh64.c:206 elf64-sh64.c:2367
#, c-format
msgid "%s: compiled as 64-bit object and %s is 32-bit"
-msgstr "%s: kompileret som 64-bitsobjekt og %s er 32-bit"
+msgstr "%s: oversat som 64-bitsobjekt og %s er 32-bit"
#: elf32-sh64.c:208 elf64-sh64.c:2369
#, c-format
@@ -1176,27 +1176,27 @@ msgstr "%s: GAS-fejl: uventet PTB-instruktion med R_SH_PT_16"
#: elf32-sh64.c:593 elf64-sh64.c:1703
#, c-format
msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n"
-msgstr "%s: fejl: ojusteret relokaliseringstype %d på %08x relokalisering %08x\n"
+msgstr "%s: fejl: ujusteret relokeringstype %d på %08x relokering %08x\n"
#: elf32-sh64.c:677
-#, c-format
+#, fuzzy, c-format
msgid "%s: could not write out added .cranges entries"
-msgstr "%s: kunne ikke udskrive tilføjede .cranges-poster"
+msgstr "%s: kunne ikke udskrive tilføjede .crangives-poster"
#: elf32-sh64.c:739
-#, c-format
+#, fuzzy, c-format
msgid "%s: could not write out sorted .cranges entries"
-msgstr "%s: kunne ikke udskrive sorterede cranges-poster"
+msgstr "%s: kunne ikke udskrive sorterede crangives-poster"
#: elf32-sparc.c:1535 elf64-sparc.c:2224
#, c-format
msgid "%s: probably compiled without -fPIC?"
-msgstr "%s: nok kompileret uden -fPIC?"
+msgstr "%s: nok oversat uden -fPIC?"
#: elf32-sparc.c:2002
#, c-format
msgid "%s: compiled for a 64 bit system and target is 32 bit"
-msgstr "%s: kompileret for et 64-bitssystem og målet er 32-bit"
+msgstr "%s: oversat for et 64-bitssystem og målet er 32-bit"
#: elf32-sparc.c:2016
#, c-format
@@ -1204,22 +1204,22 @@ msgid "%s: linking little endian files with big endian files"
msgstr "%s: lænker little endian-filer med big endian-filer"
#: elf32-v850.c:682
-#, c-format
+#, fuzzy, c-format
msgid "Variable `%s' cannot occupy in multiple small data regions"
msgstr "Variabel \"%s\" kan ikke befinde sig i flere små dataområder"
#: elf32-v850.c:685
-#, c-format
+#, fuzzy, c-format
msgid "Variable `%s' can only be in one of the small, zero, and tiny data regions"
msgstr "Variabel \"%s\" kan kun være i et af de små, tomme og bittesmå dataområder"
#: elf32-v850.c:688
-#, c-format
+#, fuzzy, c-format
msgid "Variable `%s' cannot be in both small and zero data regions simultaneously"
msgstr "Variabel \"%s\" kan ikke være i både små og tomme dataområder samtidigt"
#: elf32-v850.c:691
-#, c-format
+#, fuzzy, c-format
msgid "Variable `%s' cannot be in both small and tiny data regions simultaneously"
msgstr "Variabel \"%s\" kan ikke være i både små og bittesmå dataområder samtidigt"
@@ -1230,7 +1230,7 @@ msgstr "Variabel \"%s\" kan ikke være i både tomme og bittesmå dataområder samti
#: elf32-v850.c:1072
msgid "FAILED to find previous HI16 reloc\n"
-msgstr "MISLYKKEDES med at finde tidligere HI16-relokalisering\n"
+msgstr "MISLYKKEDES med at finde tidligere HI16-relokering\n"
#: elf32-v850.c:1703
msgid "could not locate special linker symbol __gp"
@@ -1291,20 +1291,20 @@ msgstr "%s: advarsel: PLT-addendum %d til \"%s\" fra sektionen %s ignoreredes"
#: elf32-vax.c:1814
#, c-format
msgid "%s: warning: %s relocation against symbol `%s' from %s section"
-msgstr "%s: advarsel: %s-relokalisering mod symbol \"%s\" fra sektionen %s"
+msgstr "%s: advarsel: %s-relokering mod symbol \"%s\" fra sektionen %s"
#: elf32-vax.c:1820
#, c-format
msgid "%s: warning: %s relocation to 0x%x from %s section"
-msgstr "%s: advarsel: %s-relokalisering til 0x%x fra sektionen %s"
+msgstr "%s: advarsel: %s-relokering til 0x%x fra sektionen %s"
#: elf32-ia64.c:2280 elf32-xstormy16.c:414 elf64-ia64.c:2280
msgid "non-zero addend in @fptr reloc"
-msgstr "ikke-tomt addendum i @fptr-relokalisering"
+msgstr "ikke-tomt addendum i @fptr-relokering"
#: elf64-alpha.c:1097
msgid "GPDISP relocation did not find ldah and lda instructions"
-msgstr "GPDISP-relokalisering fandt ingen ldah- og lda-instruktioner"
+msgstr "GPDISP-relokering fandt ingen ldah- og lda-instruktioner"
#: elf64-alpha.c:3675
#, c-format
@@ -1314,12 +1314,12 @@ msgstr "%s: .got-subsegment overskrider 64 kB (størrelse %d)"
#: elf64-alpha.c:4498 elf64-alpha.c:4510
#, c-format
msgid "%s: gp-relative relocation against dynamic symbol %s"
-msgstr "%s: gp-relativ relokalisering mod dynamisk symbol %s"
+msgstr "%s: gp-relativ relokering mod dynamisk symbol %s"
#: elf64-alpha.c:4536 elf64-alpha.c:4676
#, c-format
msgid "%s: pc-relative relocation against dynamic symbol %s"
-msgstr "%s: pc-relativ relokalisering mod dynamisk symbol %s"
+msgstr "%s: pc-relativ relokering mod dynamisk symbol %s"
#: elf64-alpha.c:4564
#, c-format
@@ -1333,27 +1333,27 @@ msgstr "<ukendt>"
#: elf64-alpha.c:4594
#, c-format
msgid "%s: !samegp reloc against symbol without .prologue: %s"
-msgstr "%s: !samegp-relokalisering mod symbol uden .prologue: %s"
+msgstr "%s: !samegp-relokering mod symbol uden .prologue: %s"
#: elf64-alpha.c:4639
#, c-format
msgid "%s: unhandled dynamic relocation against %s"
-msgstr "%s: uhåndteret dynamisk relokalisering mod %s"
+msgstr "%s: uhåndteret dynamisk relokering mod %s"
#: elf64-alpha.c:4752
#, c-format
msgid "%s: dtp-relative relocation against dynamic symbol %s"
-msgstr "%s: dtp-relativ relokalisering mod dynamisk symbol %s"
+msgstr "%s: dtp-relativ relokering mod dynamisk symbol %s"
#: elf64-alpha.c:4775
#, c-format
msgid "%s: tp-relative relocation against dynamic symbol %s"
-msgstr "%s: tp-relativ relokalisering mod dynamisk symbol %s"
+msgstr "%s: tp-relativ relokering mod dynamisk symbol %s"
#: elf64-hppa.c:2080
#, c-format
msgid "stub entry for %s cannot load .plt, dp offset = %ld"
-msgstr "stubpost for %s kan ikke læse in .plt, dp-afstand = %ld"
+msgstr "stubpost for %s kan ikke indlæse .plt, dp-afstand = %ld"
#: elf64-mmix.c:1002
#, c-format
@@ -1361,28 +1361,28 @@ msgid ""
"%s: Internal inconsistency error for value for\n"
" linker-allocated global register: linked: 0x%lx%08lx != relaxed: 0x%lx%08lx\n"
msgstr ""
-"%s: Intern inkkonsistensfejl for værdien for\n"
-" lænkerallokeret globalt register: lænket: 0x%lx%08lx != afslappet: 0x%lx%08lx\n"
+"%s: Intern inkonsistensfejl for værdien for\n"
+" lænkerallokeret globalt register: lænket: 0x%lx%08lx != forenklet: 0x%lx%08lx\n"
#: elf64-mmix.c:1386
#, c-format
msgid "%s: base-plus-offset relocation against register symbol: (unknown) in %s"
-msgstr "%s: base-plus-afstandsrelokalisering mod registersymbol: (ukendt) i %s"
+msgstr "%s: base-plus-afstandsrelokering mod registersymbol: (ukendt) i %s"
#: elf64-mmix.c:1391
#, c-format
msgid "%s: base-plus-offset relocation against register symbol: %s in %s"
-msgstr "%s: base-plus-afstandsrelokalisering mod registersymbol: %s i %s"
+msgstr "%s: base-plus-afstandsrelokering mod registersymbol: %s i %s"
#: elf64-mmix.c:1435
#, c-format
msgid "%s: register relocation against non-register symbol: (unknown) in %s"
-msgstr "%s: registerrelokalisering mod ikke-registersymbol: (ukendt) i %s"
+msgstr "%s: registerrelokering mod ikke-registersymbol: (ukendt) i %s"
#: elf64-mmix.c:1440
#, c-format
msgid "%s: register relocation against non-register symbol: %s in %s"
-msgstr "%s: registerrelokalisering mod ikke-registersymbol: %s i %s"
+msgstr "%s: registerrelokering mod ikke-registersymbol: %s i %s"
#: elf64-mmix.c:1477
#, c-format
@@ -1415,17 +1415,17 @@ msgstr ""
#: elf64-ppc.c:1669 libbfd.c:1435
#, c-format
msgid "%s: compiled for a big endian system and target is little endian"
-msgstr "%s: kompileret for et big endian-system og målet er little endian"
+msgstr "%s: oversat for et big endian-system og målet er little endian"
#: elf64-ppc.c:1671 libbfd.c:1437
#, c-format
msgid "%s: compiled for a little endian system and target is big endian"
-msgstr "%s: kompileret for et little endian-system og målet er big endian"
+msgstr "%s: oversat for et little endian-system og målet er big endian"
#: elf64-ppc.c:3610
#, c-format
msgid "%s: unexpected reloc type %u in .opd section"
-msgstr "%s: uventet relokaliseringstype %u i .opd-sektion"
+msgstr "%s: uventet relokeringstype %u i .opd-sektion"
#: elf64-ppc.c:3630
#, c-format
@@ -1459,17 +1459,17 @@ msgstr "stubbe stemmer ikke overens med beregnet størrelse"
#: elf64-ppc.c:5828
#, c-format
msgid "%s: Relocation %s is not supported for symbol %s."
-msgstr "%s: Relokaliseringen %s understøttes ikke for symbol %s."
+msgstr "%s: Relokeringen %s understøttes ikke for symbol %s."
#: elf64-ppc.c:5872
#, c-format
msgid "%s: error: relocation %s not a multiple of 4"
-msgstr "%s: fejl: relokaliseringen %s er ikke en multipel af 4"
+msgstr "%s: fejl: relokeringen %s er ikke en multipel af 4"
#: elf64-sparc.c:1280
#, c-format
msgid "%s: check_relocs: unhandled reloc type %d"
-msgstr "%s: check_relocs: uhåndteret relokaliseringstype %d"
+msgstr "%s: check_relocs: uhåndteret relokeringstype %d"
#: elf64-sparc.c:1317
#, c-format
@@ -1504,7 +1504,7 @@ msgstr "%s: versionsantal (%ld) stemmer ikke med symbolantal (%ld)"
#: elflink.c:440
#, c-format
msgid "%s: Section %s is too large to add hole of %ld bytes"
-msgstr "%s: Sektionen %s er for stor til at stoppa hul med %ld byte i"
+msgstr "%s: Sektionen %s er for stor til at stoppe hul med %ld byte i"
#: elflink.h:1090
#, c-format
@@ -1547,7 +1547,7 @@ msgstr "Fejl: ikke mere hukommelse"
#: elflink.h:4781
msgid "Not enough memory to sort relocations"
-msgstr "Ikke nok hukommelse til at sortere relokaliseringer"
+msgstr "Ikke nok hukommelse til at sortere relokeringer"
#: elflink.h:5682 elflink.h:5725
#, c-format
@@ -1567,15 +1567,15 @@ msgstr "%s: kunne ikke finde uddatasektionen %s for inddatasektionen %s"
#: elflink.h:6486
#, c-format
msgid "%s: relocation size mismatch in %s section %s"
-msgstr "%s: relokaliseringsstørrelsen stemmer ikke overens i %s-sektionen %s"
+msgstr "%s: relokeringsstørrelsen stemmer ikke overens i %s-sektionen %s"
#: elflink.h:6849
msgid "warning: relocation against removed section; zeroing"
-msgstr "advarsel: relokalisering mod fjernet sektion; nulstiller"
+msgstr "advarsel: relokering mod fjernet sektion; nulstiller"
#: elflink.h:6879
msgid "warning: relocation against removed section"
-msgstr "advarsel: relokalisering mod fjernet sektion"
+msgstr "advarsel: relokering mod fjernet sektion"
#: elflink.h:6892
#, c-format
@@ -1598,12 +1598,12 @@ msgstr "%s: %s+0x%lx: hop til stubrutine som ikke er jal"
#: elfxx-mips.c:4270
#, c-format
msgid "%s: Malformed reloc detected for section %s"
-msgstr "%s: Fejlagtig relokalisering for sektion %s opdaget"
+msgstr "%s: Fejlagtig relokering for sektion %s opdaget"
#: elfxx-mips.c:4348
#, c-format
msgid "%s: CALL16 reloc at 0x%lx not against global symbol"
-msgstr "%s: CALL16-relokalisering ved 0x%lx er ikke mod globalt symbol"
+msgstr "%s: CALL16-relokering ved 0x%lx er ikke mod globalt symbol"
#: elfxx-mips.c:7301
#, c-format
@@ -1763,37 +1763,37 @@ msgstr "%s: uventet type efter ATN"
#: ihex.c:258
#, c-format
msgid "%s:%d: unexpected character `%s' in Intel Hex file\n"
-msgstr "%s:%d: uventet tegn \"%s\" i hexadecimal Intel-fil\n"
+msgstr "%s:%d: uventet tegn \"%s\" i heksadecimal Intel-fil\n"
#: ihex.c:366
#, c-format
msgid "%s:%u: bad checksum in Intel Hex file (expected %u, found %u)"
-msgstr "%s:%u: fejlagtig kontrolsum i hexadecimal Intel-fil (forventede %u, fandt %u)"
+msgstr "%s:%u: fejlagtig kontrolsum i heksadecimal Intel-fil (forventede %u, fandt %u)"
#: ihex.c:420
#, c-format
msgid "%s:%u: bad extended address record length in Intel Hex file"
-msgstr "%s:%u: fejlagtig længde på post for udvidet adresse i hexadecimal Intel-fil"
+msgstr "%s:%u: fejlagtig længde på post for udvidet adresse i heksadecimal Intel-fil"
#: ihex.c:437
#, c-format
msgid "%s:%u: bad extended start address length in Intel Hex file"
-msgstr "%s:%u: fejlagtig længde på udvidet startadresse i hexadecimal Intel-fil"
+msgstr "%s:%u: fejlagtig længde på udvidet startadresse i heksadecimal Intel-fil"
#: ihex.c:454
#, c-format
msgid "%s:%u: bad extended linear address record length in Intel Hex file"
-msgstr "%s:%u: fejlagtig længde på post for udvidet lineær adresse i hexadecimal Intel-fil"
+msgstr "%s:%u: fejlagtig længde på post for udvidet lineær adresse i heksadecimal Intel-fil"
#: ihex.c:471
#, c-format
msgid "%s:%u: bad extended linear start address length in Intel Hex file"
-msgstr "%s:%u: fejlagtig længde på post for udvidet lineær startadresse i hexadecimal Intel-fil"
+msgstr "%s:%u: fejlagtig længde på post for udvidet lineær startadresse i heksadecimal Intel-fil"
#: ihex.c:488
#, c-format
msgid "%s:%u: unrecognized ihex type %u in Intel Hex file\n"
-msgstr "%s:%u: ukendt ihex-type %u i hexadecimal Intel-fil\n"
+msgstr "%s:%u: ukendt ihex-type %u i heksadecimal Intel-fil\n"
#: ihex.c:607
#, c-format
@@ -1808,7 +1808,7 @@ msgstr "%s: fejlagtig sektionslængde i ihex_read_sektion"
#: ihex.c:860
#, c-format
msgid "%s: address 0x%s out of range for Intel Hex file"
-msgstr "%s: adressen 0x%s er udenfor intervallet for hexadecimal Intel-fil"
+msgstr "%s: adressen 0x%s er uden for intervallet for heksadecimal Intel-fil"
#: libbfd.c:492
#, c-format
@@ -1837,7 +1837,7 @@ msgstr "%s: indirekte symbol \"%s\" til \"%s\" er en løkke"
#: linker.c:2776
#, c-format
msgid "Attempt to do relocateable link with %s input and %s output"
-msgstr "Forsøg at lave en relokaliseringsbar lænke med %s-inddata og %s-uddata"
+msgstr "Forsøg at lave en relokérbar lænke med %s-inddata og %s-uddata"
#: merge.c:892
#, c-format
@@ -1852,7 +1852,7 @@ msgstr "%s: Ingen kerne til at allokere sektionsnavn %s\n"
#: mmo.c:536
#, c-format
msgid "%s: No core to allocate a symbol %d bytes long\n"
-msgstr "%s: Ingen kerne for at allokere et %d byte langt symbol\n"
+msgstr "%s: Ingen kerne til at allokere et %d byte langt symbol\n"
#: mmo.c:1245
#, c-format
@@ -1862,12 +1862,12 @@ msgstr "%s: ugyldig mmo-fil: initieringsværdi for $255 er ikke \"Main\"\n"
#: mmo.c:1391
#, c-format
msgid "%s: unsupported wide character sequence 0x%02X 0x%02X after symbol name starting with `%s'\n"
-msgstr "%s: bred tegnsekvens som ikke understøttes 0x%02X 0x%02X efter symbolnavnet som begynder med \"%s\"\n"
+msgstr "%s: bred tegn-sekvens som ikke understøttes 0x%02X 0x%02X efter symbolnavnet som begynder med \"%s\"\n"
#: mmo.c:1633
#, c-format
msgid "%s: invalid mmo file: unsupported lopcode `%d'\n"
-msgstr "%s: ugyldig mmo-fil: lopkod \"%d\" understøttes ikke\n"
+msgstr "%s: ugyldig mmo-fil: lopkode \"%d\" understøttes ikke\n"
#: mmo.c:1643
#, c-format
@@ -2028,7 +2028,7 @@ msgstr "%s: Ukendt maskintype (0x%x) i Import Library Format-arkiv"
#: peicode.h:1174
#, c-format
msgid "%s: Recognised but unhandled machine type (0x%x) in Import Library Format archive"
-msgstr "%s: Kendt men uhåndteret maskintype (0x%x) i Import Library Format-arkiv"
+msgstr "%s: Kendt, men uhåndteret maskintype (0x%x) i Import Library Format-arkiv"
#: peicode.h:1191
#, c-format
@@ -2101,15 +2101,15 @@ msgstr "som_sizeof_headers er ikke implementeret"
msgid "%s:%d: Unexpected character `%s' in S-record file\n"
msgstr "%s:%d: Uventet tegn \"%s\" i S-postfil\n"
-# Vad er stabs?
+# Hvad er stabs?
#: stabs.c:319
#, c-format
msgid "%s(%s+0x%lx): Stabs entry has invalid string index."
-msgstr "%s(%s+0x%lx): Stabpost har ugyldigt strengindex."
+msgstr "%s(%s+0x%lx): Stabpost har ugyldigt strengindeks."
#: syms.c:1044
msgid "Unsupported .stab relocation"
-msgstr ".stab-relokalisering som ikke understøttes"
+msgstr ".stab-relokering som ikke understøttes"
#: vms-gsd.c:356
#, c-format
@@ -2150,7 +2150,7 @@ msgstr "_bfd_vms_output_counted kaldt med nul byte"
#: vms-misc.c:924
msgid "_bfd_vms_output_counted called with too many bytes"
-msgstr "_bfd_vms_output_counted called kaldt med for mange byte"
+msgstr "_bfd_vms_output_counted kaldt med for mange byte"
#: vms-misc.c:1055
#, c-format
@@ -2169,7 +2169,7 @@ msgstr "Ingen hukommelse!"
#: vms-tir.c:362
#, c-format
msgid "bad section index in %s"
-msgstr "fejlagtigt sektionsindex i %s"
+msgstr "fejlagtigt sektionsindeks i %s"
#: vms-tir.c:375
#, c-format
@@ -2263,17 +2263,17 @@ msgstr "objektkode %d kunne ikke findes"
#: vms-tir.c:2019
#, c-format
msgid "SEC_RELOC with no relocs in section %s"
-msgstr "SEC_RELOC uden relokaliseringer i sektion %s"
+msgstr "SEC_RELOC uden relokeringer i sektion %s"
#: vms-tir.c:2307
#, c-format
msgid "Unhandled relocation %s"
-msgstr "Uhåndteret relokalisering %s"
+msgstr "Uhåndteret relokering %s"
#: xcofflink.c:1243
#, c-format
msgid "%s: `%s' has line numbers but no enclosing section"
-msgstr "%s: \"%s\" har linjenumre men ingen omsluttende sektion"
+msgstr "%s: \"%s\" har linjenumre, men ingen omsluttende sektion"
#: xcofflink.c:1296
#, c-format
@@ -2308,7 +2308,7 @@ msgstr "%s: fejlagtigt placeret XTY_LD \"%s\""
#: xcofflink.c:1957
#, c-format
msgid "%s: reloc %s:%d not in csect"
-msgstr "%s: relokaliseringen %s:%d er ikke i csect"
+msgstr "%s: relokeringen %s:%d er ikke i csect"
#: xcofflink.c:2092
#, c-format
@@ -2337,26 +2337,26 @@ msgstr "advarsel: forsøg på at eksportere udefineret symbol \"%s\""
#: xcofflink.c:4447
#, c-format
msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling"
-msgstr "TOC giver overløb: 0x%lx > 0x10000; prøv -mminimal-toc ved kompilering"
+msgstr "TOC giver overløb: 0x%lx > 0x10000; prøv -mminimal-toc ved oversættelse"
#: xcofflink.c:5287 xcofflink.c:5756 xcofflink.c:5818 xcofflink.c:6119
#, c-format
msgid "%s: loader reloc in unrecognized section `%s'"
-msgstr "%s: indlæserrelokalisering i ukendt sektion \"%s\""
+msgstr "%s: indlæserrelokering i ukendt sektion \"%s\""
#: xcofflink.c:5309 xcofflink.c:6130
#, c-format
msgid "%s: `%s' in loader reloc but not loader sym"
-msgstr "%s: \"%s\" i indlæserrelokalisering men ikke indlæsersym"
+msgstr "%s: \"%s\" i indlæserrelokering, men ikke indlæsersym"
#: xcofflink.c:5324
#, c-format
msgid "%s: loader reloc in read-only section %s"
-msgstr "%s: indlæserrelokalisering i skrivebeskyttet sektion %s"
+msgstr "%s: indlæserrelokering i skrivebeskyttet sektion %s"
#: elf32-ia64.c:2222 elf64-ia64.c:2222
msgid "@pltoff reloc against local symbol"
-msgstr "@pltoff-relokalisering mod lokalt symbol"
+msgstr "@pltoff-relokering mod lokalt symbol"
#: elf32-ia64.c:3562 elf64-ia64.c:3562
#, c-format
@@ -2376,12 +2376,12 @@ msgstr "%s: lænker ikke-pic-kode i delt bibliotek"
#: elf32-ia64.c:3891 elf64-ia64.c:3891
#, c-format
msgid "%s: @gprel relocation against dynamic symbol %s"
-msgstr "%s: @gprel-relokalisering mod dynamisk symbol %s"
+msgstr "%s: @gprel-relokering mod dynamisk symbol %s"
#: elf32-ia64.c:4030 elf64-ia64.c:4030
#, c-format
msgid "%s: dynamic relocation against speculation fixup"
-msgstr "%s: dynamisk relokalisering uden spekulationsrettelser"
+msgstr "%s: dynamisk relokering uden spekulationsrettelser"
#: elf32-ia64.c:4038 elf64-ia64.c:4038
#, c-format
@@ -2390,7 +2390,7 @@ msgstr "%s: spekulationsfix mod udefineret svagt symbol"
#: elf32-ia64.c:4271 elf64-ia64.c:4271
msgid "unsupported reloc"
-msgstr "relokaliseringen understøttes ikke"
+msgstr "relokeringen understøttes ikke"
#: elf32-ia64.c:4551 elf64-ia64.c:4551
#, c-format
@@ -2425,11 +2425,11 @@ msgstr "%s: linjenummer giver overløb: 0x%lx > 0xffff"
#: peigen.c:979 pepigen.c:979
#, c-format
msgid "%s: reloc overflow 1: 0x%lx > 0xffff"
-msgstr "%s: relokalisering giver overløb 1: 0x%lx > 0xffff"
+msgstr "%s: relokering giver overløb 1: 0x%lx > 0xffff"
#: peigen.c:993 pepigen.c:993
msgid "Export Directory [.edata (or where ever we found it)]"
-msgstr "Exportkatalog [.edata (eller hvor vi fandt det)]"
+msgstr "Eksportkatalog [.edata (eller hvor vi fandt det)]"
#: peigen.c:994 pepigen.c:994
msgid "Import Directory [parts of .idata]"
@@ -2449,7 +2449,7 @@ msgstr "Sikkerhedskatalog"
#: peigen.c:998 pepigen.c:998
msgid "Base Relocation Directory [.reloc]"
-msgstr "Baserelokaliseringskatalog [.reloc]"
+msgstr "Baserelokeringskatalog [.reloc]"
#: peigen.c:999 pepigen.c:999
msgid "Debug Directory"
@@ -2535,7 +2535,7 @@ msgstr ""
"\n"
"Importtabellerne (tolket indhold i %s-sektion)\n"
-# Vad er thunk?
+# Hvad er thunk?
#: peigen.c:1130 pepigen.c:1130
msgid ""
" vma: Hint Time Forward DLL First\n"
@@ -2555,7 +2555,7 @@ msgstr ""
#: peigen.c:1192 pepigen.c:1192
msgid "\tvma: Hint/Ord Member-Name Bound-To\n"
-msgstr "\tvma: Tips/Ordn Medlemsnavn Bundet till\n"
+msgstr "\tvma: Tips/Ordn Medlemsnavn Bundet til\n"
#: peigen.c:1217 pepigen.c:1217
msgid ""
@@ -2580,7 +2580,7 @@ msgid ""
"There is an export table in %s at 0x%lx\n"
msgstr ""
"\n"
-"Det findes en eksporttabel i %s ved 0x%lx\n"
+"Der findes en eksporttabel i %s ved 0x%lx\n"
#: peigen.c:1393 pepigen.c:1393
#, c-format
@@ -2600,7 +2600,7 @@ msgstr "Eksportflag \t\t\t%lx\n"
#: peigen.c:1400 pepigen.c:1400
#, c-format
msgid "Time/Date stamp \t\t%lx\n"
-msgstr "Tids/datostempel \t\t%lx\n"
+msgstr "Tids-/datostempel \t\t%lx\n"
#: peigen.c:1403 pepigen.c:1403
#, c-format
@@ -2694,7 +2694,7 @@ msgid ""
" \t\tAddress Address Handler Data Address Mask\n"
msgstr ""
" vma:\t\tStart- Slut- EH- EH- Prologsluts- Undtagelses-\n"
-" \t\tadresse adresse håndterere data adresse maske\n"
+" \t\tadresse adresse håndterer data adresse maske\n"
#: peigen.c:1624 pepigen.c:1624
msgid " Register save millicode"
@@ -2716,7 +2716,7 @@ msgid ""
msgstr ""
"\n"
"\n"
-"PE-filbaserelokaliseringer (tolket indhold i .reloc-sektionen)\n"
+"PE-filbaserelokeringer (tolket indhold i .reloc-sektionen)\n"
#: peigen.c:1712 pepigen.c:1712
#, c-format
@@ -2730,7 +2730,7 @@ msgstr ""
#: peigen.c:1725 pepigen.c:1725
#, c-format
msgid "\treloc %4d offset %4x [%4lx] %s"
-msgstr "\trelokalisering %4d afstand %4x [%4lx] %s"
+msgstr "\trelokering %4d afstand %4x [%4lx] %s"
#. The MS dumpbin program reportedly ands with 0xff0f before
#. printing the characteristics field. Not sure why. No reason to
diff --git a/bfd/reloc.c b/bfd/reloc.c
index b13f672..0885e03 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -4,21 +4,21 @@
Free Software Foundation, Inc.
Written by Cygnus Support.
-This file is part of BFD, the Binary File Descriptor library.
+ This file is part of BFD, the Binary File Descriptor library.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/*
SECTION
@@ -645,7 +645,8 @@ bfd_perform_relocation (abfd, reloc_entry, data, input_section, output_bfd,
reloc_target_output_section = symbol->section->output_section;
/* Convert input-section-relative symbol value to absolute. */
- if (output_bfd && ! howto->partial_inplace)
+ if ((output_bfd && ! howto->partial_inplace)
+ || reloc_target_output_section == NULL)
output_base = 0;
else
output_base = reloc_target_output_section->vma;
diff --git a/bfd/reloc16.c b/bfd/reloc16.c
index 1db8daf..44d4f4f 100644
--- a/bfd/reloc16.c
+++ b/bfd/reloc16.c
@@ -199,30 +199,31 @@ bfd_coff_reloc16_relax_section (abfd, input_section, link_info, again)
shrinks = (unsigned *) bfd_zmalloc (amt);
/* Loop until nothing changes in this section. */
- do {
- arelent **parent;
- unsigned int i;
- long j;
-
- another_pass = 0;
-
- for (i = 0, parent = reloc_vector; *parent; parent++, i++)
- {
- /* Let the target/machine dependent code examine each reloc
- in this section and attempt to shrink it. */
- shrink = bfd_coff_reloc16_estimate (abfd, input_section, *parent,
- shrinks[i], link_info);
-
- /* If it shrunk, note it in the shrinks array and set up for
- another pass. */
- if (shrink != shrinks[i])
- {
- another_pass = 1;
- for (j = i + 1; j <= reloc_count; j++)
- shrinks[j] += shrink - shrinks[i];
- }
- }
- }
+ do
+ {
+ arelent **parent;
+ unsigned int i;
+ long j;
+
+ another_pass = 0;
+
+ for (i = 0, parent = reloc_vector; *parent; parent++, i++)
+ {
+ /* Let the target/machine dependent code examine each reloc
+ in this section and attempt to shrink it. */
+ shrink = bfd_coff_reloc16_estimate (abfd, input_section, *parent,
+ shrinks[i], link_info);
+
+ /* If it shrunk, note it in the shrinks array and set up for
+ another pass. */
+ if (shrink != shrinks[i])
+ {
+ another_pass = 1;
+ for (j = i + 1; j <= reloc_count; j++)
+ shrinks[j] += shrink - shrinks[i];
+ }
+ }
+ }
while (another_pass);
shrink = shrinks[reloc_count];
@@ -235,12 +236,12 @@ bfd_coff_reloc16_relax_section (abfd, input_section, link_info, again)
}
bfd_byte *
-bfd_coff_reloc16_get_relocated_section_contents(in_abfd,
- link_info,
- link_order,
- data,
- relocateable,
- symbols)
+bfd_coff_reloc16_get_relocated_section_contents (in_abfd,
+ link_info,
+ link_order,
+ data,
+ relocateable,
+ symbols)
bfd *in_abfd;
struct bfd_link_info *link_info;
struct bfd_link_order *link_order;
@@ -266,11 +267,11 @@ bfd_coff_reloc16_get_relocated_section_contents(in_abfd,
symbols);
/* Read in the section. */
- if (!bfd_get_section_contents(input_bfd,
- input_section,
- data,
- (bfd_vma) 0,
- input_section->_raw_size))
+ if (!bfd_get_section_contents (input_bfd,
+ input_section,
+ data,
+ (bfd_vma) 0,
+ input_section->_raw_size))
return NULL;
reloc_vector = (arelent **) bfd_malloc ((bfd_size_type) reloc_size);
diff --git a/bfd/simple.c b/bfd/simple.c
index 10178a4..f0f5ee6 100644
--- a/bfd/simple.c
+++ b/bfd/simple.c
@@ -138,6 +138,21 @@ bfd_simple_get_relocated_section_contents (abfd, sec, outbuf)
int storage_needed, number_of_symbols;
asymbol **symbol_table;
+ if (! (sec->flags & SEC_RELOC))
+ {
+ bfd_size_type size = bfd_section_size (abfd, sec);
+
+ if (outbuf == NULL)
+ contents = bfd_malloc (size);
+ else
+ contents = outbuf;
+
+ if (contents)
+ bfd_get_section_contents (abfd, sec, contents, 0, size);
+
+ return contents;
+ }
+
/* In order to use bfd_get_relocated_section_contents, we need
to forge some data structures that it expects. */
diff --git a/bfd/targets.c b/bfd/targets.c
index e665898..6a68eaa 100644
--- a/bfd/targets.c
+++ b/bfd/targets.c
@@ -4,21 +4,21 @@
Free Software Foundation, Inc.
Written by Cygnus Support.
-This file is part of BFD, the Binary File Descriptor library.
+ This file is part of BFD, the Binary File Descriptor library.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -155,7 +155,11 @@ DESCRIPTION
. bfd_target_msdos_flavour,
. bfd_target_ovax_flavour,
. bfd_target_evax_flavour,
-. bfd_target_mmo_flavour
+. bfd_target_mmo_flavour,
+. bfd_target_mach_o_flavour,
+. bfd_target_pef_flavour,
+. bfd_target_pef_xlib_flavour,
+. bfd_target_sym_flavour
.};
.
.enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
@@ -508,7 +512,6 @@ extern const bfd_target bfd_elf32_big_generic_vec;
extern const bfd_target bfd_elf32_bigarc_vec;
extern const bfd_target bfd_elf32_bigarm_oabi_vec;
extern const bfd_target bfd_elf32_bigarm_vec;
-extern const bfd_target bfd_elf32_bigarmqnx_vec;
extern const bfd_target bfd_elf32_bigmips_vec;
extern const bfd_target bfd_elf32_cris_vec;
extern const bfd_target bfd_elf32_d10v_vec;
@@ -522,7 +525,6 @@ extern const bfd_target bfd_elf32_hppa_vec;
extern const bfd_target bfd_elf32_i370_vec;
extern const bfd_target bfd_elf32_i386_freebsd_vec;
extern const bfd_target bfd_elf32_i386_vec;
-extern const bfd_target bfd_elf32_i386qnx_vec;
extern const bfd_target bfd_elf32_i860_little_vec;
extern const bfd_target bfd_elf32_i860_vec;
extern const bfd_target bfd_elf32_i960_vec;
@@ -533,7 +535,6 @@ extern const bfd_target bfd_elf32_little_generic_vec;
extern const bfd_target bfd_elf32_littlearc_vec;
extern const bfd_target bfd_elf32_littlearm_oabi_vec;
extern const bfd_target bfd_elf32_littlearm_vec;
-extern const bfd_target bfd_elf32_littlearmqnx_vec;
extern const bfd_target bfd_elf32_littlemips_vec;
extern const bfd_target bfd_elf32_m32r_vec;
extern const bfd_target bfd_elf32_m68hc11_vec;
@@ -554,8 +555,6 @@ extern const bfd_target bfd_elf32_pj_vec;
extern const bfd_target bfd_elf32_pjl_vec;
extern const bfd_target bfd_elf32_powerpc_vec;
extern const bfd_target bfd_elf32_powerpcle_vec;
-extern const bfd_target bfd_elf32_powerpcleqnx_vec;
-extern const bfd_target bfd_elf32_powerpcqnx_vec;
extern const bfd_target bfd_elf32_s390_vec;
extern const bfd_target bfd_elf32_sh64_vec;
extern const bfd_target bfd_elf32_sh64l_vec;
@@ -568,9 +567,7 @@ extern const bfd_target bfd_elf32_shblin_vec;
extern const bfd_target bfd_elf32_shl_vec;
extern const bfd_target bfd_elf32_shlin_vec;
extern const bfd_target bfd_elf32_shlnbsd_vec;
-extern const bfd_target bfd_elf32_shlqnx_vec;
extern const bfd_target bfd_elf32_shnbsd_vec;
-extern const bfd_target bfd_elf32_shqnx_vec;
extern const bfd_target bfd_elf32_sparc_vec;
extern const bfd_target bfd_elf32_tradbigmips_vec;
extern const bfd_target bfd_elf32_tradlittlemips_vec;
@@ -652,6 +649,9 @@ extern const bfd_target m68knetbsd_vec;
extern const bfd_target m68ksysvcoff_vec;
extern const bfd_target m88kbcs_vec;
extern const bfd_target m88kmach3_vec;
+extern const bfd_target mach_o_be_vec;
+extern const bfd_target mach_o_le_vec;
+extern const bfd_target mach_o_fat_vec;
extern const bfd_target mcore_pe_big_vec;
extern const bfd_target mcore_pe_little_vec;
extern const bfd_target mcore_pei_big_vec;
@@ -668,6 +668,8 @@ extern const bfd_target or32coff_big_vec;
extern const bfd_target pc532machaout_vec;
extern const bfd_target pc532netbsd_vec;
extern const bfd_target pdp11_aout_vec;
+extern const bfd_target pef_vec;
+extern const bfd_target pef_xlib_vec;
extern const bfd_target pmac_xcoff_vec;
extern const bfd_target ppcboot_vec;
extern const bfd_target riscix_vec;
@@ -687,6 +689,7 @@ extern const bfd_target sparclynx_aout_vec;
extern const bfd_target sparclynx_coff_vec;
extern const bfd_target sparcnetbsd_vec;
extern const bfd_target sunos_big_vec;
+extern const bfd_target sym_vec;
extern const bfd_target tic30_aout_vec;
extern const bfd_target tic30_coff_vec;
extern const bfd_target tic4x_coff0_beh_vec;
@@ -793,7 +796,6 @@ static const bfd_target * const _bfd_target_vector[] = {
&bfd_elf32_bigarc_vec,
&bfd_elf32_bigarm_oabi_vec,
&bfd_elf32_bigarm_vec,
- &bfd_elf32_bigarmqnx_vec,
&bfd_elf32_bigmips_vec,
&bfd_elf32_cris_vec,
&bfd_elf32_d10v_vec,
@@ -807,7 +809,6 @@ static const bfd_target * const _bfd_target_vector[] = {
&bfd_elf32_i370_vec,
&bfd_elf32_i386_freebsd_vec,
&bfd_elf32_i386_vec,
- &bfd_elf32_i386qnx_vec,
&bfd_elf32_i860_little_vec,
&bfd_elf32_i860_vec,
&bfd_elf32_i960_vec,
@@ -820,7 +821,6 @@ static const bfd_target * const _bfd_target_vector[] = {
&bfd_elf32_littlearc_vec,
&bfd_elf32_littlearm_oabi_vec,
&bfd_elf32_littlearm_vec,
- &bfd_elf32_littlearmqnx_vec,
&bfd_elf32_littlemips_vec,
&bfd_elf32_m32r_vec,
&bfd_elf32_m68hc11_vec,
@@ -843,22 +843,20 @@ static const bfd_target * const _bfd_target_vector[] = {
&bfd_elf32_pjl_vec,
&bfd_elf32_powerpc_vec,
&bfd_elf32_powerpcle_vec,
- &bfd_elf32_powerpcleqnx_vec,
- &bfd_elf32_powerpcqnx_vec,
&bfd_elf32_s390_vec,
&bfd_elf32_sh_vec,
&bfd_elf32_shblin_vec,
&bfd_elf32_shl_vec,
&bfd_elf32_shlin_vec,
&bfd_elf32_shlnbsd_vec,
- &bfd_elf32_shlqnx_vec,
&bfd_elf32_shnbsd_vec,
- &bfd_elf32_shqnx_vec,
#ifdef BFD64
&bfd_elf32_sh64_vec,
&bfd_elf32_sh64l_vec,
&bfd_elf32_sh64lnbsd_vec,
&bfd_elf32_sh64nbsd_vec,
+ &bfd_elf32_sh64lin_vec,
+ &bfd_elf32_sh64blin_vec,
#endif
&bfd_elf32_sparc_vec,
&bfd_elf32_tradbigmips_vec,
@@ -889,6 +887,8 @@ static const bfd_target * const _bfd_target_vector[] = {
&bfd_elf64_sh64l_vec,
&bfd_elf64_sh64lnbsd_vec,
&bfd_elf64_sh64nbsd_vec,
+ &bfd_elf64_sh64lin_vec,
+ &bfd_elf64_sh64blin_vec,
#if 0
&bfd_elf64_sparc_vec,
#endif
@@ -967,6 +967,9 @@ static const bfd_target * const _bfd_target_vector[] = {
&m68ksysvcoff_vec,
&m88kbcs_vec,
&m88kmach3_vec,
+ &mach_o_be_vec,
+ &mach_o_le_vec,
+ &mach_o_fat_vec,
&mcore_pe_big_vec,
&mcore_pe_little_vec,
&mcore_pei_big_vec,
@@ -994,6 +997,8 @@ static const bfd_target * const _bfd_target_vector[] = {
&pc532machaout_vec,
&pc532netbsd_vec,
&pdp11_aout_vec,
+ &pef_vec,
+ &pef_xlib_vec,
#if 0
/* This has the same magic number as RS/6000. */
&pmac_xcoff_vec,
@@ -1023,6 +1028,7 @@ static const bfd_target * const _bfd_target_vector[] = {
&sparclynx_coff_vec,
&sparcnetbsd_vec,
&sunos_big_vec,
+ &sym_vec,
&tic30_aout_vec,
&tic30_coff_vec,
&tic54x_coff0_beh_vec,
@@ -1106,6 +1112,17 @@ const bfd_target *bfd_default_vector[] = {
NULL
};
+/* bfd_associated_vector[] contains the associated target vectors used
+ to reduce the ambiguity in bfd_check_format_matches. */
+
+static const bfd_target *_bfd_associated_vector[] = {
+#ifdef ASSOCIATED_VECS
+ ASSOCIATED_VECS,
+#endif
+ NULL
+};
+const bfd_target * const *bfd_associated_vector = _bfd_associated_vector;
+
/* When there is an ambiguous match, bfd_check_format_matches puts the
names of the matching targets in an array. This variable is the maximum
number of entries that the array could possibly need. */
diff --git a/bfd/version.h b/bfd/version.h
index cb9b9a4..001aec5 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1,3 +1,3 @@
-#define BFD_VERSION_DATE 20021025
+#define BFD_VERSION_DATE 20021115
#define BFD_VERSION @bfd_version@
#define BFD_VERSION_STRING @bfd_version_string@
diff --git a/bfd/vms-gsd.c b/bfd/vms-gsd.c
index 0024122..10fbb2d 100644
--- a/bfd/vms-gsd.c
+++ b/bfd/vms-gsd.c
@@ -420,7 +420,7 @@ _bfd_vms_slurp_gsd (abfd, objtype)
{
bfd_set_error (bfd_error_no_memory);
return -1;
- }
+ }
}
}
else
@@ -661,13 +661,13 @@ _bfd_vms_slurp_gsd (abfd, objtype)
}
else /* symbol reference */
{
- symbol->name =
+ symbol->name =
_bfd_vms_save_counted_string (vms_rec+8);
#if VMS_DEBUG
vms_debug(4, "egsd sym ref #%d (%s, %04x=%s)\n", abfd->symcount,
symbol->name, old_flags, flag2str(gsyflagdesc, old_flags));
#endif
- symbol->section = bfd_make_section (abfd, BFD_UND_SECTION_NAME);
+ symbol->section = bfd_make_section (abfd, BFD_UND_SECTION_NAME);
}
symbol->flags = new_flags;
@@ -901,7 +901,7 @@ _bfd_vms_write_gsd (abfd, objtype)
unsigned long ca_psindx = 0;
unsigned long psindx;
- if (old_flags & BSF_FUNCTION)
+ if ((old_flags & BSF_FUNCTION) && symbol->udata.p != NULL)
{
code_address = ((asymbol *) (symbol->udata.p))->value;
ca_psindx = ((asymbol *) (symbol->udata.p))->section->index;
diff --git a/bfd/vms.c b/bfd/vms.c
index fc6bcc3..41a9717 100644
--- a/bfd/vms.c
+++ b/bfd/vms.c
@@ -382,6 +382,7 @@ vms_object_p (abfd)
const struct bfd_target *target_vector = 0;
const bfd_arch_info_type *arch = 0;
PTR tdata_save = abfd->tdata.any;
+ bfd_vma saddr_save = bfd_get_start_address (abfd);
#if VMS_DEBUG
vms_debug (1, "vms_object_p(%p)\n", abfd);
@@ -519,6 +520,7 @@ vms_object_p (abfd)
if (abfd->tdata.any != tdata_save && abfd->tdata.any != NULL)
bfd_release (abfd, abfd->tdata.any);
abfd->tdata.any = tdata_save;
+ bfd_set_start_address (abfd, saddr_save);
return NULL;
}
diff --git a/config/ChangeLog b/config/ChangeLog
index 129ce61..3f985d3 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,9 @@
+2002-11-10 Stan Shebs <shebs@apple.com>
+
+ Retire common MPW configury bits.
+ * mpw-mh-mpw: Remove.
+ * mpw: Remove directory along with all of its files.
+
2002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* acinclude.m4: Allow for PWDCMD to override hardcoded pwd.
diff --git a/config/mpw-mh-mpw b/config/mpw-mh-mpw
deleted file mode 100644
index 543ef4f..0000000
--- a/config/mpw-mh-mpw
+++ /dev/null
@@ -1,157 +0,0 @@
-# This is an MPW makefile fragment.
-
-# Since there are a multiplicity of Mac compilers and two different
-# processors, this file is primarily a library of options for each
-# compiler. Somebody else (such as a configure or build script) will
-# make the actual choice.
-
-# Compiler to use for compiling.
-
-CC_MPW_C = C -d MPW_C -d ALMOST_STDC -d ANSI_PROTOTYPES -d MPW -mc68020 -model far -b -w
-
-CC_SC = SC -d ALMOST_STDC -d ANSI_PROTOTYPES -d MPW -mc68020 -model far -b -i '' -i :
-
-CC_MWC68K = MWC68K -d MPW -enum int -mpw_chars -sym on -w off -mc68020 -model far
-
-CC_PPCC = PPCC -d powerc=1 -d pascal= -d ALMOST_STDC -d ANSI_PROTOTYPES -d MPW -w
-
-CC_MRC = MrC -d powerc=1 -d pascal= -d ALMOST_STDC -d ANSI_PROTOTYPES -d MPW -i '' -i : -jm
-
-CC_SMrC = SMrC -d MPW
-
-# "-mpw_chars" is necessary because GNU sources often mix signed and
-# unsigned casually.
-# "-w off" is not a great idea, but CW7 is complaining about enum
-# assignments.
-# "-opt global,peep,l4,speed" is sometimes good, and sometimes bad.
-# We must use {CIncludes} so that MPW tools will work; {MWCIncludes}
-# defines stdout, islower, etc, in ways that are incompatible with MPW's
-# runtime. However, this cannot be done via -i "{CIncludes}", since
-# that does not affect how <>-type includes happen; instead, the variable
-# MWCIncludes must be set to point at {CIncludes}.
-
-CC_MWCPPC = MWCPPC -d MPW -enum int -mpw_chars -sym on -w off
-
-# Note that GCC does *not* wire in a definition of "pascal", so that
-# it can be handled in another way if desired.
-
-CC_68K_GCC = gC -Dpascal= -DANSI_PROTOTYPES -DMPW
-
-CC_PPC_GCC = gC -Dpowerc=1 -Dpascal= -DANSI_PROTOTYPES -DMPW
-
-# Nothing for the default CFLAGS.
-
-CFLAGS =
-
-# Tool to use for making libraries/archives.
-
-AR_LIB = Lib
-
-AR_MWLINK68K = MWLink68K -xm library
-
-AR_PPCLINK = PPCLink -xm library
-
-AR_MWLINKPPC = MWLinkPPC -xm library
-
-AR_AR = ar
-
-AR_FLAGS = -o
-
-RANLIB_NULL = null-command
-
-RANLIB_RANLIB = ranlib
-
-# Compiler and/or linker to use for linking.
-
-CC_LD_LINK = Link -w -d -model far {CC_LD_TOOL_FLAGS}
-
-CC_LD_MWLINK68K = MWLink68K -w {CC_LD_TOOL_FLAGS} -sym on -model far
-
-CC_LD_PPCLINK = PPCLink -main __start -outputformat xcoff
-
-CC_LD_MWLINKPPC = MWLinkPPC -w {CC_LD_TOOL_FLAGS} -sym on
-
-CC_LD_GLD = gC
-
-# Extension for linker output.
-
-PROG_EXT_68K =
-
-PROG_EXT_XCOFF = .xcoff
-
-# Nothing for the default LDFLAGS.
-
-LDFLAGS = -w
-
-CC_LD_TOOL_FLAGS = -c 'MPS ' -t MPST
-
-# Libraries to link against.
-
-# It would appear that the math libraries are not
-# needed except to provide a definition for scalb,
-# which is called from ldexp, which is referenced
-# in the m68k opcodes library.
-
-EXTRALIBS_C = \Option-d
- "{CLibraries}"StdClib.o \Option-d
- "{CLibraries}"Math.o \Option-d
- "{CLibraries}"CSANELib.o \Option-d
- "{Libraries}"Stubs.o \Option-d
- "{Libraries}"Runtime.o \Option-d
- "{Libraries}"Interface.o \Option-d
- "{Libraries}"ToolLibs.o
-
-EXTRALIBS_MWC68K = \Option-d
- "{CLibraries}"StdClib.o \Option-d
- "{CLibraries}"Math.o \Option-d
- "{CLibraries}"CSANELib.o \Option-d
- "{Libraries}"Stubs.o \Option-d
- "{Libraries}"Runtime.o \Option-d
- "{Libraries}"Interface.o \Option-d
- "{Libraries}"ToolLibs.o \Option-d
- "{MW68KLibraries}MPW ANSI (4i) C.68K.Lib"
-
-EXTRALIBS_PPC_XCOFF = \Option-d
- "{PPCLibraries}"StdCRuntime.o \Option-d
- "{PPCLibraries}"InterfaceLib.xcoff \Option-d
- "{PPCLibraries}"MathLib.xcoff \Option-d
- "{PPCLibraries}"StdCLib.xcoff \Option-d
- "{PPCLibraries}"PPCToolLibs.o \Option-d
- "{PPCLibraries}"PPCCRuntime.o \Option-d
- "{GCCPPCLibraries}"libgcc.xcoff
-
-EXTRALIBS_PPC = \Option-d
- "{PPCLibraries}"StdCRuntime.o \Option-d
- "{SharedLibraries}"InterfaceLib \Option-d
- "{SharedLibraries}"MathLib \Option-d
- "{SharedLibraries}"StdCLib \Option-d
- "{PPCLibraries}"PPCToolLibs.o \Option-d
- "{PPCLibraries}"PPCCRuntime.o \Option-d
- "{GCCPPCLibraries}"libgcc.xcoff
-
-EXTRALIBS_MWCPPC = \Option-d
- "{MWPPCLibraries}"MWStdCRuntime.Lib \Option-d
- "{MWPPCLibraries}"InterfaceLib \Option-d
- "{MWPPCLibraries}"StdCLib \Option-d
- "{MWPPCLibraries}"MathLib \Option-d
- "{MWPPCLibraries}"PPCToolLibs.o
-
-# Tool to make PEF with, if needed.
-
-MAKEPEF_NULL = null-command
-
-MAKEPEF_PPC = MakePEF
-
-MAKEPEF_FLAGS = \Option-d
- -l InterfaceLib.xcoff=InterfaceLib \Option-d
- -l MathLib.xcoff=MathLib \Option-d
- -l StdCLib.xcoff=StdCLib
-
-MAKEPEF_TOOL_FLAGS = -ft MPST -fc 'MPS '
-
-# Resource compiler to use.
-
-REZ_68K = Rez
-
-REZ_PPC = Rez -d WANT_CFRG
-
diff --git a/config/mpw/ChangeLog b/config/mpw/ChangeLog
deleted file mode 100644
index 3cdefbf..0000000
--- a/config/mpw/ChangeLog
+++ /dev/null
@@ -1,53 +0,0 @@
-Tue Nov 26 12:34:12 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * g-mpw-make.sed: Fix some comments.
-
-Mon Sep 16 14:42:52 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * g-mpw-make.sed (HLDENV): Edit out all references.
-
-Thu Aug 15 19:49:23 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * true: New script, identical to mpw-true.
- * g-mpw-make.sed: Add @DASH_C_FLAG@ and @SEGMENT_FLAG()@
- to the editors for compile commands.
-
-Thu Aug 1 15:01:42 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * mpw-true, mpw-touch, null-command: New scripts.
- * README: Describe usage in more detail.
-
-Tue Dec 12 14:51:51 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * g-mpw-make.sed: Don't edit out "version=" occurrences.
-
-Fri Dec 1 11:46:18 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * g-mpw-make.sed (bindir, libdir): Edit the positions of
- pathname separators to work with other pathnames better.
-
-Tue Nov 7 15:08:07 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * g-mpw-make.sed: Add comment about Duplicate vs Catenate,
- add additional pattern for editing link-compile commands.
-
-Tue Oct 24 14:28:51 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * g-mpw-make.sed: Add handling for *.tab.[hc] files.
- (CHILL_FOR_TARGET, CHILL_LIB): Edit out tricky definitions
- of these.
-
-Thu Sep 28 21:05:10 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * g-mpw-make.sed: New file, generic sed commands to translate
- Unix makefiles into MPW makefile syntax.
-
-Fri Mar 17 11:51:20 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * README: Clarify instructions.
- * fi: Remove.
-
-Wed Dec 21 15:45:53 1994 Stan Shebs <shebs@andros.cygnus.com>
-
- * MoveIfChange, README, fi, forward-include, open-brace,
- tr-7to8-src: New files.
diff --git a/config/mpw/MoveIfChange b/config/mpw/MoveIfChange
deleted file mode 100644
index 0dbc125..0000000
--- a/config/mpw/MoveIfChange
+++ /dev/null
@@ -1,19 +0,0 @@
-# Rename a file only if it is different from a previously existing
-# file of the same name. This is useful for keeping make from doing
-# too much work if the contents of a file haven't changed.
-
-# This is an MPW translation of the standard GNU sh script move-if-change.
-
-Set exit 0
-
-If "`exists -f "{2}"`"
- Compare "{1}" "{2}" >dev:null
- If {status} != 0
- Rename -y "{1}" "{2}"
- Else
- Echo "{2}" is unchanged
- Delete -i -y "{1}"
- End
-Else
- Rename -y "{1}" "{2}"
-End
diff --git a/config/mpw/README b/config/mpw/README
deleted file mode 100644
index 554700a..0000000
--- a/config/mpw/README
+++ /dev/null
@@ -1,23 +0,0 @@
-This directory contains MPW scripts and related files that are needed to
-build Cygnus GNU tools for MPW. The scripts should be somewhere on the
-command path; our usual practice has been to have a separate directory
-for the scripts, and put the tools (byacc, flex, and sed at least) there
-also; then it's easier to drag the support bits around as a group, or to
-upgrade MPW versions. The complete package of scripts and tool binaries
-is usually available as pub/mac/buildtools.cpt.hqx on ftp.cygnus.com.
-
-"tr-7to8-src" is actually the source to an MPW script that transforms
-sequences like "\Option-d" into the actual 8-bit chars that MPW needs.
-It's only the source because it can't itself include any 8-bit chars.
-It *can* be processed into a genuine "tr-7to8" by using itself:
-
- tr-7to8 tr-7to8-src | sed -e 's/Src//' >new-tr-7to8
-
-Use this to verify:
-
- compare tr-7to8 new-tr-7to8
-
-If you don't have a working tr-7to8, then you will have to manually
-replace all occurrences of "\Option-d" with real Option-d (which looks
-like a delta), then do similarly with all the other "\Option-..."
-strings, and then change "\SrcOption-d" into the string "\Option-d".
diff --git a/config/mpw/forward-include b/config/mpw/forward-include
deleted file mode 100644
index ddd6bd7..0000000
--- a/config/mpw/forward-include
+++ /dev/null
@@ -1,3 +0,0 @@
-Echo '#include' ¶""{1}"¶" >"{2}".tem
-MoveIfChange "{2}".tem "{2}"
-
diff --git a/config/mpw/g-mpw-make.sed b/config/mpw/g-mpw-make.sed
deleted file mode 100644
index e7d3c77..0000000
--- a/config/mpw/g-mpw-make.sed
+++ /dev/null
@@ -1,293 +0,0 @@
-# Sed commands to translate Unix makefiles into MPW makefiles.
-# These are nominally generic, but work best on the makefiles used
-# for GNU programs.
-
-# Whack out any commented-out lines that are probably commands;
-# they can only cause trouble later on.
-/^# /d
-
-# Change dependency char.
-/:$/s/:/ \\Option-f/g
-/^[^ :#][^:]*:/s/\([ ]*\):\([ ]*\)/ \\Option-f /g
-
-# Change syntax of Makefile vars.
-/\$/s/\${\([a-zA-Z0-9_-]*\)}/{\1}/g
-/\$/s/\$(\([a-zA-Z0-9_-]*\))/{\1}/g
-/ $@/s/ $@/ {Targ}/
-
-# Double-$ are literals to Unix but not to MPW make.
-/\$\$/s/\$\$/$/g
-
-# Change pathname syntax.
-/\//s,\.\./\/\.\./,:::,g
-/\//s,\.\./,::,g
-/\.\//s,\./,:,g
-/\//s,/,:,g
-# Undo excess changes.
-/and/s,and:or$,and/or,
-/and/s,and:or ,and/or ,
-/want/s,want:need,want/need,
-# Fixing up sed commands.
-/-e/s_":\([^:]*\):d"_"/\1/d"_g
-/-e/s_":\([^:]*\):,:\([^:]*\):d"_"/\1/,/\2/d"_g
-
-/=/s/ = \.$/ = :/
-
-# Make these go away so that later edits not confused.
-/HLDENV/s/{HLDENV}//
-
-# Comment out any explicit srcdir setting.
-/srcdir/s/^srcdir/# srcdir/
-
-/BASEDIR/s/^BASEDIR =.*$/BASEDIR = "{srcroot}"/
-/{BASEDIR}:/s/{BASEDIR}:/{BASEDIR}/g
-/{srcdir}:/s/{srcdir}:/"{srcdir}"/g
-/"{srcdir}":/s/"{srcdir}":/"{srcdir}"/g
-
-# Tweak some conventions that are backwards for the Mac.
-/bindir/s/{exec_prefix}:bin/{exec_prefix}bin:/
-/libdir/s/{exec_prefix}:lib/{exec_prefix}lib:/
-
-# Comment out settings of anything set by mpw host config.
-/CC/s/^CC *=/#CC =/
-/CFLAGS/s/^CFLAGS *=/#CFLAGS =/
-/AR/s/^AR *=/#AR =/
-/AR_FLAGS/s/^AR_FLAGS *=/#AR_FLAGS =/
-/RANLIB/s/^RANLIB *=/#RANLIB =/
-/CC_LD/s/^CC_LD *=/#CC_LD =/
-/LDFLAGS/s/^LDFLAGS *=/#LDFLAGS =/
-
-# Change -I usages.
-/-I/s/-I\./-i :/g
-/-I/s/-I::bfd/-i ::bfd:/g
-/-I/s/-I::include/-i ::include:/g
-/-I/s/-I/-i /g
-
-# Change -D usage.
-/-D/s/\([ =]\)-D\([^ ]*\)/\1-d \2/g
-
-# Change continuation char.
-/\\$/s/\\$/\\Option-d/
-
-# Change wildcard char.
-/\*/s/\*/\\Option-x/g
-
-# Change path of various types of source files. This rule does not allow
-# for file names with multiple dots in the name.
-/\.[chly]/s/\([ ><=]\)\([-a-zA-Z0-9_${}:"]*\)\.\([chly]\)/\1"{s}"\2.\3/g
-/\.[chly]/s/^\([-a-zA-Z0-9_${}:"]*\)\.\([chly]\)/"{s}"\1.\2/
-# Allow files named *.tab.[ch] as a special case.
-/\.tab\.[ch]/s/\([ ><=]\)\([-a-zA-Z0-9_${}:"]*\.tab\)\.\([ch]\)/\1"{s}"\2.\3/g
-/\.tab\.[ch]/s/^\([-a-zA-Z0-9_${}:"]*\.tab\)\.\([ch]\)/"{s}"\1.\2/
-# Fix some overenthusiasms.
-/{s}/s/"{s}""{srcdir}"/"{srcdir}"/g
-/{s}/s/"{s}"{\([a-zA-Z0-9_]*\)dir}/"{\1dir}"/g
-/{s}/s/"{s}"{\([a-zA-Z0-9_]*\)DIR}/"{\1DIR}"/g
-/{s}/s/"{s}""{\([a-zA-Z0-9_]*\)dir}"/"{\1dir}"/g
-/{s}/s/"{s}""{\([a-zA-Z0-9_]*\)DIR}"/"{\1DIR}"/g
-/{s}/s/"{s}":/:/g
-/{s}/s/^"{s}"//g
-/{s}/s/"{s}""{s}"/"{s}"/g
-/{s}/s/"{s}""{srcdir}"/"{s}"/g
-/{s}/s/"{srcdir}""{s}"/"{s}"/g
-
-# The .def files are also typically source files.
-/\.def/s/\([ ><]\)\([-a-zA-Z0-9_${}:"]*\)\.def/\1"{s}"\2.def/g
-/\.def/s/^\([-a-zA-Z0-9_${}:"]*\)\.def/"{s}"\1.def/g
-
-# Change extension and path of objects.
-/\.o/s/\([ =]\)\([-a-zA-Z0-9_${}:"]*\)\.o/\1"{o}"\2.c.o/g
-/\.o/s/^\([-a-zA-Z0-9_${}:"]*\)\.o/"{o}"\1.c.o/
-# Allow *.tab.o files as a special case of a 2-dot-name file.
-/\.o/s/\([ =]\)\([-a-zA-Z0-9_${}:"]*\)\.tab\.o/\1"{o}"\2.tab.c.o/g
-/\.o/s/^\([-a-zA-Z0-9_${}:"]*\)\.tab\.o/"{o}"\1.tab.c.o/
-# Clean up.
-/"{o}"/s/"{o}""{o}"/"{o}"/g
-/"{o}"/s/^"{o}"\([a-zA-Z0-9_]*\)=/\1=/
-
-# Change extension of libs.
-/\.a/s/lib\([a-z]*\)\.a/lib\1.o/g
-
-# Remove non-fail option.
-/-/s/^\([ ]*\)-/\1/
-# Fix overeagernesses - assumes no one-letter commands.
-/^[ ]*[a-z] /s/^\([ ]*\)\([a-z]\) /\1-\2 /
-
-# Remove non-echo option. (watch out for autoconf things)
-/@/s/^\([ ]*\)@/\1/
-
-# Change cp to Duplicate.
-# Catenate is perhaps more accurate, but the pattern would have to
-# identify the output file and add a '>' redirection into it.
-/cp/s/^\([ ]*\)cp /\1Duplicate -d -y /
-# Change mv to Rename.
-/mv/s/^\([ ]*\)mv /\1Rename -y /
-/Rename/s/^\([ ]*\)Rename -y -f/\1Rename -y/
-# Change rm to Delete.
-/rm -rf/s/^\([ ]*\)rm -rf /\1Delete -i -y /
-/rm -f/s/^\([ ]*\)rm -f /\1Delete -i -y /
-/rm/s/^\([ ]*\)rm /\1Delete -i -y /
-# Note that we don't mess with ln - directory-specific scripts
-# must decide what to do with symlinks.
-# Change cat to Catenate.
-/cat/s/^\([ ]*\)cat /\1Catenate /
-# Change touch to mpw-touch.
-/touch/s/^\([ ]*\)touch /\1mpw-touch /
-# Change mkdir to NewFolder.
-/mkdir/s/^\([ ]*\)mkdir /\1NewFolder /
-# Change var setting to Set.
-/=/s/^\([ ]*\)\([-a-zA-Z0-9_]*\)=\([^;]*\); \\Option-d/\1Set \2 \3/
-
-# Change tests.
-/if /s/if \[ *-f \([^ ]*\) ] *; *\\Option-d/If "`Exists "\1"`" != ""/
-/if /s/if \[ *-f \([^ ]*\) ] *; *then *\\Option-d/If "`Exists "\1"`" != ""/
-/if /s/if \[ ! *-f \([^ ]*\) ] *; *\\Option-d/If "`Exists "\1"`" == ""/
-/if /s/if \[ ! *-f \([^ ]*\) ] *; *then \\Option-d/If "`Exists "\1"`" == ""/
-
-/if /s/if \[ *-d \([^ ]*\) ] *; *\\Option-d/If "`Exists "\1"`" != ""/
-/if /s/if \[ *-d \([^ ]*\) ] *; *then *\\Option-d/If "`Exists "\1"`" != ""/
-/if /s/if \[ ! *-d \([^ ]*\) ] *; *\\Option-d/If "`Exists "\1"`" == ""/
-/if /s/if \[ ! *-d \([^ ]*\) ] *; *then *\\Option-d/If "`Exists "\1"`" == ""/
-
-/if /s/if \[ -d \([^ ]*\) ] *; then true *; else mkdir \([^ ;]*\) *; fi/If "`Exists "\1"`" != "" NewFolder \2 End If/
-
-/if /s/if \[ \([^ ]*\) = \([^ ]*\) ] *; *\\Option-d/If "\1" == "\2"/
-/if /s/if \[ \([^ ]*\) = \([^ ]*\) ] *; *then *\\Option-d/If "\1" == "\2"/
-
-/if /s/if \[ \([^ ]*\) != \([^ ]*\) ] *; *\\Option-d/If "\1" != "\2"/
-/if /s/if \[ \([^ ]*\) != \([^ ]*\) ] *; *then *\\Option-d/If "\1" != "\2"/
-
-/if /s/if \[ \([^ ]*\) -eq \([^ ]*\) ] *; *\\Option-d/If "\1" != "\2"/
-/if /s/if \[ \([^ ]*\) -eq \([^ ]*\) ] *; *then *\\Option-d/If "\1" != "\2"/
-
-/^[ ]*else true$/c\
- Else\
- mpw-true\
-
-
-/else/s/^\([ ]*\)else[ ]*$/\1Else/
-/else/s/^\([ ]*\)else[; ]*\\Option-d$/\1Else/
-
-/^[ ]*else[ ]*true[ ]*$/c\
- Else\
- mpw-true
-
-/^[ ]*else[ ]*true[; ]*fi$/c\
- Else\
- mpw-true\
- End If
-
-/fi/s/^\([ ]*\)fi *$/\1End/
-/fi/s/^\([ ]*\)fi *; *\\Option-d/\1End/
-
-# Change looping.
-/for/s/^\([ ]*\)for \([-a-zA-Z0-9_]*\) in \([^;]*\); *do *\\Option-d/\1For \2 In \3/
-/^\([ ]*\)do *\\Option-d/d
-/done/s/^\([ ]*\)done *; *\\Option-d/\1End/
-/done/s/^\([ ]*\)done$/\1End/
-
-# Trailing semicolons and continued lines are unneeded sh syntax.
-/; \\Option-d/s/; \\Option-d//
-
-# Change move-if-change to MoveIfChange.
-/move-if-change/s/\([^ ]*\)move-if-change/MoveIfChange/g
-
-# Change $(SHELL) to the script name by itself.
-/SHELL/s/^\([ ]*\){SHELL} /\1/
-
-# Change syntax of default rule dependency.
-/^\.c\.o/s/^\.c\.o \\Option-f$/.c.o \\Option-f .c/
-
-# Change default rule's action.
-/{CC} -c/s/{CC} -c \(.*\) \$<$/{CC} @DASH_C_FLAG@ {DepDir}{Default}.c \1 @SEGMENT_FLAG({Default})@ -o {TargDir}{Default}.c.o/
-
-# This is pretty disgusting, but I can't seem to detect empty rules.
-/Option-f$/s/Option-f$/Option-f _oldest/g
-
-# Remove -c from explicit compiler calls. (but should not if GCC)
-# Handle the case of a source file that is "{xxx}"file.c.
-/ -c /s/{\([A-Z_]*\)CC}\(.*\) -c \(.*\)"\([^"]*\)"\([-a-z_]*\)\.c/{\1CC}\2 @DASH_C_FLAG@ \3"\4"\5.c -o "{o}"\5.c.o/
-# Handle the case of a source file that is "{xxx}"dir:file.c.
-/ -c /s/{\([A-Z_]*\)CC}\(.*\) -c \(.*\)"\([^"]*\)"\([-a-z_]*\):\([-a-z_]*\)\.c/{\1CC}\2 @DASH_C_FLAG@ \3"\4"\5:\6.c -o "{o}"\6.c.o/
-
-# Change linking cc to linking sequence.
-/-o/s/^\([ ]*\){CC} \(.*\){\([A-Z_]*\)CFLAGS} \(.*\){LDFLAGS} \(.*\)-o \([^ ]*\) \(.*\)$/\1{CC_LD} \2 {\3CFLAGS} \4 {LDFLAGS} \5 -o \6{PROG_EXT} \7\
-\1{MAKEPEF} \6{PROG_EXT} -o \6 {MAKEPEF_TOOL_FLAGS} {MAKEPEF_FLAGS}\
-\1{REZ} "{s}"\6.r -o \6 -append -d PROG_NAME='"'\6'"' -d VERSION_STRING='"'{version}'"'/
-/-o/s/^\([ ]*\){CC} \(.*\){\([A-Z_]*\)CFLAGS} \(.*\)-o \([^ ]*\) \(.*\){LDFLAGS} \(.*\)$/\1{CC_LD} \2 {\3CFLAGS} \4 {LDFLAGS} \6 -o \5{PROG_EXT} \7\
-\1{MAKEPEF} \5{PROG_EXT} -o \5 {MAKEPEF_TOOL_FLAGS} {MAKEPEF_FLAGS}\
-\1{REZ} "{s}"\5.r -o \5 -append -d PROG_NAME='"'\5'"' -d VERSION_STRING='"'{version}'"'/
-/-o/s/^\([ ]*\){HOST_CC} \(.*\)-o \([^ ]*\) \(.*\)$/\1{HOST_CC_LD} \2 -o \3{PROG_EXT} \4\
-\1{MAKEPEF} \3{PROG_EXT} -o \3 {MAKEPEF_TOOL_FLAGS} {MAKEPEF_FLAGS}\
-\1{REZ} "{s}"\3.r -o \3 -append -d PROG_NAME='"'\3'"' -d VERSION_STRING='"'{version}'"'/
-
-# Comment out .NOEXPORT rules.
-/\.NOEXPORT/s/^\.NOEXPORT/#\.NOEXPORT/
-# Comment out .PHONY rules.
-/\.PHONY/s/^\.PHONY/#\.PHONY/
-# Comment out .PRECIOUS rules.
-/\.PRECIOUS/s/^\.PRECIOUS/#\.PRECIOUS/
-# Comment out .SUFFIXES rules.
-/\.SUFFIXES/s/^\.SUFFIXES/#\.SUFFIXES/
-
-# Set the install program appropriately.
-/INSTALL/s/^INSTALL *= *`.*`:install.sh -c/INSTALL = Duplicate -y/
-
-# Don't try to decide whether to use the tree's own tools.
-/bison/s/`.*bison:bison.*`/bison -y/
-/byacc/s/`.*byacc:byacc.*`/byacc/
-/flex/s/`.*flex:flex.*`/flex/
-
-# Turn transformed C comments in echo commands back into comments.
-/echo/s,echo '\(.*\):\\Option-x\(.*\)\\Option-x:\(.*\)',echo '\1/*\2*/\3',
-
-# Whack out various clever expressions that search for tools, since
-# the clever code is too /bin/sh specific.
-
-/^AR_FOR_TARGET = `/,/`$/c\
-AR_FOR_TARGET = ::binutils:ar\
-
-
-/^RANLIB_FOR_TARGET = `/,/`$/c\
-RANLIB_FOR_TARGET = ::binutils:ranlib\
-
-
-/^RANLIB_TEST_FOR_TARGET = /,/ranlib ] )$/c\
-RANLIB_TEST_FOR_TARGET = \
-
-
-/^EXPECT = `/,/`$/c\
-EXPECT = \
-
-
-/^RUNTEST = `/,/`$/c\
-RUNTEST = \
-
-
-/^CC_FOR_TARGET = `/,/`$/c\
-CC_FOR_TARGET = \
-
-
-/^CXX_FOR_TARGET = `/,/`$/c\
-CXX_FOR_TARGET = \
-
-
-/^CHILL_FOR_TARGET = `/,/`$/c\
-CHILL_FOR_TARGET = \
-
-
-/^CHILL_LIB = `/,/`$/c\
-CHILL_LIB = \
-
-/sanit/s/{start-sanit...-[a-z0-9]*}//
-/sanit/s/{end-sanit...-[a-z0-9]*}//
-
-# Add standard defines and default rules.
-/^# srcdir/a\
-\
-s = "{srcdir}"\
-\
-o = :\
-\
-"{o}" \\Option-f : "{s}"
-
diff --git a/config/mpw/mpw-touch b/config/mpw/mpw-touch
deleted file mode 100644
index c743a51..0000000
--- a/config/mpw/mpw-touch
+++ /dev/null
@@ -1,7 +0,0 @@
-# "Touch" command.
-
-If "`Exists "{1}"`" != ""
- SetFile -m . "{1}"
-Else
- Echo ' ' > "{1}"
-End If
diff --git a/config/mpw/mpw-true b/config/mpw/mpw-true
deleted file mode 100644
index 0506530..0000000
--- a/config/mpw/mpw-true
+++ /dev/null
@@ -1 +0,0 @@
-Exit 0
diff --git a/config/mpw/null-command b/config/mpw/null-command
deleted file mode 100644
index 4844c8e..0000000
--- a/config/mpw/null-command
+++ /dev/null
@@ -1 +0,0 @@
-# This command does nothing.
diff --git a/config/mpw/open-brace b/config/mpw/open-brace
deleted file mode 100644
index 58465dc..0000000
--- a/config/mpw/open-brace
+++ /dev/null
@@ -1,4 +0,0 @@
-# MPW makefiles seem not to have any way to get a literal open
-# brace into a rule anywhere, so this does the job.
-
-Echo '{'
diff --git a/config/mpw/tr-7to8-src b/config/mpw/tr-7to8-src
deleted file mode 100644
index b20b649..0000000
--- a/config/mpw/tr-7to8-src
+++ /dev/null
@@ -1,9 +0,0 @@
-StreamEdit -e \Option-d
- '/\Option-x/ \Option-d
- Replace /\Option-d\SrcOption-d/ "\Option-d\Option-d" -c \Option-5 ; \Option-d
- Replace /\Option-d\SrcOption-f/ "\Option-d\Option-f" -c \Option-5 ; \Option-d
- Replace /\Option-d\SrcOption-8/ "\Option-d\Option-8" -c \Option-5 ; \Option-d
- Replace /\Option-d\SrcOption-5/ "\Option-d\Option-5" -c \Option-5 ; \Option-d
- Replace /\Option-d\SrcOption-x/ "\Option-d\Option-x" -c \Option-5 ; \Option-d
- Replace /\Option-d\SrcOption-r/ "\Option-d\Option-r" -c \Option-5' \Option-d
- "{1}"
diff --git a/config/mpw/true b/config/mpw/true
deleted file mode 100644
index 0506530..0000000
--- a/config/mpw/true
+++ /dev/null
@@ -1 +0,0 @@
-Exit 0
diff --git a/configure.in b/configure.in
index 6b71494..21b86fd 100644
--- a/configure.in
+++ b/configure.in
@@ -76,7 +76,7 @@ target_libs="target-libiberty \
# list belongs in this list. those programs are also very likely
# candidates for the "native_only" list which follows
#
-target_tools="target-examples target-groff target-gperf"
+target_tools="target-examples target-groff target-gperf target-rda"
################################################################################
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2b1233c..d71c088 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,887 @@
+2002-11-15 David Carlton <carlton@math.stanford.edu>
+
+ * Merge from mainline; tag is carlton_dictionary-20021115-merge.
+
+2002-11-14 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.h: Move the most relevant interface functions to the start
+ of the file.
+
+2002-11-14 Andrew Cagney <ac131313@redhat.com>
+
+ * regcache.h (deprecated_registers): Rename registers.
+ * a68v-nat.c, alpha-nat.c, arch-utils.c, core-sol2.c: Update.
+ * hp300ux-nat.c, hppab-nat.c, hppah-nat.c: Update.
+ * hppam3-nat.c, hpux-thread.c, i386gnu-nat.c: Update.
+ * ia64-aix-nat.c, ia64-linux-nat.c, ia64-tdep.c: Update.
+ * irix4-nat.c, irix5-nat.c, lynx-nat.c, m68k-tdep.c: Update.
+ * m68knbsd-nat.c, mips-linux-tdep.c, mipsm3-nat.c: Update.
+ * mipsv4-nat.c, ns32knbsd-nat.c, ppc-bdm.c: Update.
+ * ppc-sysv-tdep.c, ptx4-nat.c, regcache.c, remote-es.c: Update.
+ * remote-sds.c, remote-vx68.c, remote-vxmips.c: Update.
+ * remote-vxsparc.c, rs6000-tdep.c, sol-thread.c: Update.
+ * sparc-nat.c, sparc-tdep.c, sun3-nat.c, symm-nat.c: Update.
+ * v850ice.c: Update.
+
+Wed Nov 13 19:51:05 2002 Andrew Cagney <cagney@redhat.com>
+
+ * utils.c (gdb_realpath): Add comment mentioning realpath with a
+ NULL buffer.
+
+2002-11-13 Andrew Cagney <cagney@redhat.com>
+
+ * regcache.h (deprecated_read_register_bytes): Rename
+ read_register_bytes.
+ (deprecated_write_register_bytes): Rename write_register_bytes.
+ * alpha-tdep.c, arm-tdep.c, cris-tdep.c, d10v-tdep.c: Update.
+ * dwarf2cfi.c, frv-tdep.c, hppa-tdep.c, ia64-tdep.c: Update.
+ * m68k-tdep.c, mcore-tdep.c, mips-tdep.c, mn10300-tdep.c: Update.
+ * ns32k-tdep.c, regcache.c, remote-sds.c, remote-vx.c: Update.
+ * remote.c, rs6000-tdep.c, s390-tdep.c, sh-tdep.c: Update.
+ * sparc-tdep.c, v850-tdep.c, vax-tdep.c, x86-64-tdep.c: Update.
+ * xstormy16-tdep.c, z8k-tdep.c, config/nm-gnu.h: Update.
+ * config/nm-m3.h, config/h8500/tm-h8500.h: Update.
+ * config/i386/nm-ptx4.h, config/i386/nm-symmetry.h: Update.
+ * config/m32r/tm-m32r.h, config/m68k/nm-sun3.h: Update.
+ * config/m68k/tm-delta68.h, config/m68k/tm-linux.h: Update.
+ * config/mn10200/tm-mn10200.h, config/pa/tm-hppa64.h: Update.
+ * config/sparc/nm-nbsd.h, config/sparc/nm-sun4os4.h: Update.
+ * config/sparc/nm-sun4sol2.h, config/sparc/tm-sparclet.h: Update.
+
+2002-11-13 Jim Blandy <jimb@redhat.com>
+
+ * findvar.c (read_var_value): Doc fix.
+
+2002-11-13 Andrew Cagney <cagney@redhat.com>
+
+ * regcache.c (struct regcache): Replace passthough_p with
+ readonly_p.
+ (regcache_xmalloc): Initialize readonly_p.
+ (build_regcache): Initialize readonly_p.
+ (regcache_save): New function.
+ (regcache_restore): New function.
+ (regcache_cpy): Re-implement using regcache_save and
+ regcache_restore.
+ (regcache_raw_read): Update.
+ (regcache_cooked_read): When a read-only cache, checked for cached
+ pseudo register values.
+ (regcache_raw_write): Assert that the cache is not read-only.
+ Remove code handling a non-passthrough cache.
+ * regcache.h (regcache_save): Declare.
+ (regcache_restore): Declare.
+
+2002-11-13 Andrew Cagney <cagney@redhat.com>
+
+ * regcache.c (struct regcache_descr): Add fields
+ sizeof_cooked_registers and sizeof_cooked_register_valid_p.
+ (init_legacy_regcache_descr): Compute the size of a cooked
+ register cache and then assign that to sizeof_raw_registers. Set
+ sizeof_raw_register_valid_p to sizeof_cooked_register_valid_p
+ (init_legacy_regcache_descr): Ditto.
+
+2002-11-13 Andrew Cagney <cagney@redhat.com>
+
+ * regcache.c (register_buffer): Move to near start of file, update
+ description.
+ (regcache_raw_read): Use.
+ (regcache_raw_write): Use.
+ (struct regcache): Rename raw_registers to registers and
+ raw_register_valid_p to register_valid_p.
+ (regcache_xmalloc): Update.
+ (regcache_xfree): Update.
+ (register_buffer): Update.
+ (regcache_cpy): Update.
+ (regcache_cpy_no_passthrough): Update.
+ (regcache_valid_p): Update.
+ (deprecated_grub_regcache_for_registers): Update.
+ (deprecated_grub_regcache_for_register_valid): Update.
+ (set_register_cached): Update.
+ (regcache_raw_write): Update.
+
+2002-11-13 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * p-exp.y (name_not_typename): Use copy_name to
+ set current_type variable for fields of THIS.
+
+2002-11-12 Daniel Jacobowitz <drow@mvista.com>
+
+ * gnu-nat.c (init_gnu_ops): Remove NULL initializations.
+ * monitor.c (init_base_monitor_ops): Likewise.
+ * ppc-bdm.c (init_bdm_ppc_ops): Likewise.
+ * remote-array.c (init_array_ops): Likewise.
+ * remote-e7000.c (init_e7000_ops): Likewise.
+ * remote-es.c (init_es1800_ops): Likewise.
+ (init_es1800_child_ops): Likewise.
+ * remote-rdp.c (init_remote_rdp_ops): Likewise.
+ * remote-sim.c (init_gdbsim_ops): Likewise.
+ * remote-st.c (init_st2000_ops): Likewise.
+ * sol-thread.c (init_sol_core_ops): Likewise.
+ (init_sol_thread_ops): Likewise.
+ * v850ice.c (init_850ice_ops): Likewise.
+ * win32-nat.c (init_child_ops): Likewise.
+ * wince.c (init_child_ops): Likewise.
+
+2002-11-12 Andrew Cagney <ac131313@redhat.com>
+
+ * utils.c (gdb_realpath): Make rp a constant pointer.
+
+2002-11-12 Andrew Cagney <ac131313@redhat.com>
+
+ * utils.c (gdb_realpath): Rewrite. Try, in order: realpath() with
+ a constant buffer; cannonicalize_file_name(); realpath() with a
+ pathconf() defined buffer, xstrdup().
+
+2002-11-12 Andrew Cagney <ac131313@redhat.com>
+
+ * config/djgpp/fnchange.lst: Fix typo, hang1.c to hang1.C; hang2.c
+ to hang2.C; hang3.c to hang3.C.
+
+2002-11-11 Elena Zannoni <ezannoni@redhat.com>
+
+ * findvar.c (read_var_value): Reenable TLS code.
+
+2002-11-11 Elena Zannoni <ezannoni@redhat.com>
+ Jim Blandy <jimb@redhat.com>
+
+ * gdb_thread_db.h (enum): Add TD_NOTALLOC.
+ * target.c (update_current_target): Add
+ to_get_thread_local_address.
+ * target.h (to_get_thread_local_address): Export.
+ (target_get_thread_local_address): Define.
+ (target_get_thread_local_address_p): Define.
+ * thread-db.c: Include solib-svr4.h.
+ (td_thr_tls_get_addr_p): Define.
+ (thread_db_load): Get a pointer to td_thr_tls_get_addr.
+ (thread_db_get_thread_local_address): New function.
+ (init_thread_db_ops): Initialize to_get_thread_local_address.
+ * configure.in: Add test for TD_NOTALLOC in thread_db.h.
+ * configure: Regenerate.
+ * config.in: Regenerate.
+
+2002-11-11 David Carlton <carlton@math.stanford.edu>
+
+ * linespec.c (set_flags): New function.
+ (decode_line_1): Move code into set_flags.
+
+2002-11-11 David Carlton <carlton@math.stanford.edu>
+
+ * linespec.c (decode_line_1): Move chunks of code to separate
+ functions.
+ (initialize_defaults): New function.
+ (decode_indirect): New function.
+
+2002-11-11 Andrew Cagney <ac131313@redhat.com>
+
+ * blockframe.c (sigtramp_saved_pc): Fix tipo. void_func_ptr
+ instead of void_code_ptr.
+ (sigtramp_saved_pc): Ditto.
+
+ * x86-64-tdep.c (i386_fp_regnum_p): Copy i386-tdep.c's
+ i386_fp_regnum_p.
+
+2002-11-10 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdbtypes.h (struct main_type): Move artificial flag out of
+ loc. New member of ``struct field'' named static_kind. Reduce
+ overloaded meaning of bitsize.
+ (FIELD_ARTIFICIAL, SET_FIELD_PHYSNAME, SET_FIELD_PHYSADDR)
+ (TYPE_FIELD_STATIC, TYPE_FIELD_STATIC_HAS_ADDR): Likewise.
+ (FIELD_STATIC_KIND, TYPE_FIELD_STATIC_KIND): New macros.
+
+ * ada-lang.c (fill_in_ada_prototype): Initialize static_kind for
+ new fields.
+ (template_to_fixed_record_type, template_to_static_fixed_type)
+ (to_record_with_fixed_variant_part): Likewise.
+ * coffread.c (coff_read_struct_type, coff_read_enum_type): Likewise.
+ * dwarf2read.c (dwarf2_add_field, read_enumeration): Likewise.
+ * dwarfread.c (struct_type, enum_type): Likewise.
+ * hpread.c (hpread_read_enum_type)
+ (hpread_read_function_type, hpread_read_doc_function_type)
+ (hpread_read_struct_type): Likewise.
+ * mdebugread.c (parse_symbol): Likewise.
+
+2002-11-10 Andrew Cagney <ac131313@redhat.com>
+
+ * breakpoint.h (deprecated_frame_in_dummy): Rename frame_in_dummy.
+ * stack.c (print_frame_info_base): Update.
+ (print_frame_info_base, frame_info): Update.
+ * sparc-tdep.c (sparc_init_extra_frame_info): Update.
+ (sparc_frame_saved_pc): Update.
+ * ada-lang.c (find_printable_frame): Update.
+ * breakpoint.c (deprecated_frame_in_dummy): Update.
+
+2002-11-09 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-linux-nat.c (ORIG_EAX): Define to -1 if not already
+ defined.
+ (regmap): Extend to cover all registers.
+ (PT_READ_U, PT_WRITE_U, PTRACE_XFER_TYPE,
+ OLD_CANNOT_FETCH_REGISTERS, OLD_CANNOT_STORE_REGISTERS): Remove
+ definitions.
+ (fetch_register, sore_register): Simplify.
+ (old_fetch_inferior_registers, old_store_inferior_registers):
+ Remove functions.
+ (cannot_fetch_register, cannot_store_register): Change
+ implementation to use regmap array to decide which registers
+ cannot be fetched/stored. This removes $orig_eax from the
+ registers that cannot be fetched/stored.
+ (fetch_inferior_registers): Call fetch_register directly instead
+ of calling old_fetch_inferior_registers.
+ (store_inferior_registers): Call store_register directly instead
+ of calling old_store_inferior_registers.
+ (i386_linux_dr_get): Replace PT_READ_U with PTRACE_PEEKUSER.
+ (i386_linux_dr_set): Replace PT_WRITE_U with PTRACE_POKEUSER.
+ * config/i386/nm-linux.h (U_REGS_OFFSET): Remove definition.
+
+2002-11-09 Klee Dienes <kdienes@apple.com>
+
+ * i387-tdep.c (i387_supply_register): When called with NULL as a
+ buffer, mark the register as not provided (to mirror the behavior
+ of supply_register).
+ (i387_supply_fxsave): Ditto.
+ (i387_supply_fsave): Ditto (inherits the behavior from
+ i387_supply_register).
+
+2002-11-09 Klee Dienes <kdienes@apple.com>
+
+ * blockframe.c (sigtramp_saved_pc): Use
+ builtin_type_void_code_ptr, not builtin_type_void_data_ptr (we are
+ extracting the PC). Use TYPE_LENGTH (builtin_type_void_code_ptr)
+ instead of (TARGET_PTR_BIT / TARGET_CHAR_BIT).
+
+2002-11-09 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.c (get_prev_frame): Test prev_p to identify a previously
+ unwound frame. Initialize prev_p.
+ * frame.h (struct frame_info): Add field prev_p. Expand prev/next
+ comment.
+
+2002-11-09 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.c (get_prev_frame): Cleanups. Eliminate redundant tests
+ for a NULL NEXT_FRAME. Simplify fromleaf initialization. Add
+ more comments. Zap dead code.
+
+2002-11-09 Mark Kettenis <kettenis@gnu.org>
+
+ * infcmd.c (print_vector_info, print_float_info): Move code that
+ checks whether the target has any registers and whether there is a
+ selected frame up, such that it is also used if a target provides
+ multi-arch definitions of these functions.
+
+2002-11-08 Andrew Cagney <ac131313@redhat.com>
+
+ * Makefile.in (DESTDIR): Define.
+ (install-only, install-gdbtk, uninstall-gdbtk): Add $(DESTDIR)
+ prefix.
+
+ * config/djgpp/fnchange.lst: 8.3 proof i386obsd-nat.c and
+ i386obsd-tdep.c. Rename to "gdb.cxx", paths containing "gdb.c++".
+
+2002-11-08 Andrew Cagney <ac131313@redhat.com>
+
+ * i386-linux-tdep.c: Include "reggroups.h".
+ (i386_linux_register_reggroup_p): New function.
+ (i386_linux_init_abi): Set register_reggroup_p to
+ i386_linux_register_reggroup_p.
+ * i386-tdep.h (i386_register_reggroup_p): Declare.
+ * i386-tdep.c: Include "reggroups.h".
+ (i386_init_reggroups): New function.
+ (i386_add_reggroups): New function.
+ (i386_register_reggroup_p): New function.
+ (i386_sse_reggroup, i386_mmx_reggroup): New variables.
+ (_initialize_i386_tdep): Call i386_init_reggroups.
+ (i386_gdbarch_init): Set register_reggroup_p and add in the i386
+ specific reggroups.
+
+2002-11-09 Mark Kettenis <kettenis@gnu.org>
+
+ * infptrace.c (child_xfer_memory): Make use of the new PT_IO
+ request that's available in *BSD.
+
+ * i386-tdep.h (IS_FPU_CTRL_REGNUM): Remove.
+
+ * i387-tdep.c (i387_fill_fxsave): Use FOOFF_REGNUM instead of
+ FDOFF_REGNUM.
+
+2002-11-08 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.c (set_unwind_by_pc): Use dummy_frame_register_unwind.
+ * dummy-frame.c (find_dummy_frame): Rename
+ generic_find_dummy_frame, make static. Return the dummy frame
+ instead of the regcache.
+ (generic_find_dummy_frame): Re-implement using find_dummy_frame,
+ (cached_find_dummy_frame): New function. Use find_dummy_frame.
+ (dummy_frame_register_unwind): Rename
+ generic_call_dummy_register_unwind. Use cached_find_dummy_frame.
+ * dummy-frame.h (dummy_frame_register_unwind): Rename
+ generic_call_dummy_register_unwind.
+
+2002-11-08 Mark Kettenis <kettenis@gnu.org>
+
+ * config/i386/tm-i386v42mp.h: Remove file. Move its contents,
+ except the inclusion of "i386/tm-i386.h", to...
+ * config/i386/nm-i386v42mp.h: ...here.
+ * config/i386/i386v42mp.mt (TM_FILE): Set to tm-i386.h.
+
+2002-11-08 Andrew Cagney <ac131313@redhat.com>
+
+ * Makefile.in (frame.o): Update dependencies.
+ * blockframe.c (current_frame, frame_obstack_alloc)
+ (frame_saved_regs_zalloc, get_current_frame)
+ (set_current_frame, create_new_frame)
+ (set_unwind_by_pc, get_next_frame)
+ (flush_cached_frames, reinit_frame_cache)
+ (frame_saved_regs_register_unwind)
+ (deprecated_generic_get_saved_register)
+ (get_prev_frame, get_frame_pc, get_frame_saved_regs)
+ (_initialize_blockframe): Move frame code from here...
+ * frame.c: ...to here. Include "gdb_obstack.h", "gdbcore.h",
+ "annotate.h" and "dummy-frame.h".
+ (_initialize_frame): New function.
+
+2002-11-08 Jim Blandy <jimb@redhat.com>
+
+ * dwarf2read.c (read_func_scope): Restore list_in_scope properly
+ when we finish a function a context.
+ * buildsym.h (outermost_context_p): New macro.
+ (Bug analyzed by David Edelsohn.)
+
+2002-11-08 Andrew Cagney <ac131313@redhat.com>
+
+ * blockframe.c: Include "dummy-frame.h".
+ (struct dummy_frame, dummy_frame_stack)
+ (generic_find_dummy_frame, deprecated_generic_find_dummy_frame)
+ (generic_pc_in_call_dummy, deprecated_read_register_dummy)
+ (generic_push_dummy_frame, generic_save_dummy_frame_tos)
+ (generic_save_call_dummy_addr, generic_pop_current_frame)
+ (generic_pop_dummy_frame, generic_fix_call_dummy)
+ (generic_fix_call_dummy, generic_call_dummy_register_unwind): Move
+ dummy frame code from here...
+ * dummy-frame.c: ...to here. New file.
+ * dummy-frame.h: New file.
+ (generic_call_dummy_register_unwind): Declare.
+ (generic_find_dummy_frame): Declare.
+ * Makefile.in (SFILES): Add dummy-frame.c.
+ (dummy-frame.o): Specify dependencies.
+ (dummy_frame_h): Define.
+ (COMMON_OBS): Add dummy-frame.o.
+ (blockframe.o): Update dependencies.
+
+2002-11-08 Jim Blandy <jimb@redhat.com>
+
+ * dwarf2read.c (read_func_scope): Restore local_symbols and
+ param_symbols after we finish the function context. (Based on a
+ patch from David Edelsohn.)
+
+2002-11-08 David Carlton <carlton@math.stanford.edu>
+
+ * linespec.c (symbol_found): New function.
+ (minsym_found): New function.
+ (decode_line_1): Separate out some code into separate functions.
+
+2002-11-08 Joel Brobecker <brobecker@gnat.com>
+
+ * i386-tdep.c (i386_frameless_signal_p): Make non static for
+ the benefit of the interix target.
+ * i386-tdep.h (i386_frameless_signal_p): Declare.
+
+2002-11-08 Andrew Cagney <ac131313@redhat.com>
+
+ * i386-tdep.h (i386_linux_orig_eax_regnum_p): Delete stray
+ declaration that snuck in from change below.
+
+2002-11-06 Andrew Cagney <cagney@redhat.com>
+
+ * i386-tdep.c (i386_mmx_regnum_p): Rename mmx_regnum_p. Update
+ all callers.
+ (i386_fp_regnum_p): New function. Use instead of FP_REGNUM_P.
+ (i386_fpc_regnum_p): New function. Use instead of FPC_REGNUM_P.
+ (i386_sse_regnum_p): New function. Use instead of SSE_REGNUM_P.
+ (i386_mxcsr_regnum_p): new function. Use instead of
+ MXCSR_REGNUM_P.
+ * i386-tdep.h (SSE_REGNUM_P): Delete macro.
+ (i386_sse_regnum_p): Declare.
+ (i386_mxcsr_regnum_p): Declare.
+ (FP_REGNUM_P, FPC_REGNUM_P): Delete macros.
+ (i386_fp_regnum_p, i386_fpc_regnum_p): Declare.
+ (IS_FP_REGNUM): Update definition.
+ (IS_FPU_CTRL_REGNUM): Update definition..
+ (IS_SSE_REGNUM): Update definition..
+ * i386v-nat.c (register_u_addr): Update.
+ * go32-nat.c (fetch_register): Update.
+ (store_register): Update.
+
+2002-11-07 Joel Brobecker <brobecker@gnat.com>
+
+ Preparation work to convert the hppa targets to multiarch partial.
+
+ * hppa-tdep.c: Add new functions replacing macro bodies from
+ config/pa/tm-hppa.h. These function will be used to initialize
+ the gdbarch structure. Import some comments from tm-hppa.h,
+ and place them where appropriate, to avoid loosing them when
+ we cleanup this file.
+ (hppa_reg_struct_has_addr): New function.
+ (hppa_inner_than): New function.
+ (hppa_stack_align): New function.
+ (hppa_pc_requires_run_before_use): New function.
+ (hppa_instruction_nullified): New function.
+ (hppa_register_byte): New function.
+ (hppa_register_virtual_type): New function.
+ (hppa_store_struct_return): New function.
+ (hppa_cannot_store_register): New function.
+ (hppa_frame_args_address): New function.
+ (hppa_frame_locals_address): New function.
+ (hppa_smash_text_address): New function.
+ (hppa_coerce_float_to_double): New function. Requires the inclusion
+ of "language.h".
+
+ * Makefile.in (hppa-tdep.o): Add dependency on language.h.
+
+ * tm-hppa.h (REG_STRUCT_HAS_ADDR): Change the definition of this
+ gdbarch-eligible macro to a call to the new associated function
+ created in hppa-tdep.c.
+ (INNER_THAN): Likewise.
+ (STACK_ALIGN): Likewise.
+ (PC_REQUIRES_RUN_BEFORE_USE): Likewise.
+ (INSTRUCTION_NULLIFIED): Likewise.
+ (REGISTER_BYTE): Likewise.
+ (REGISTER_VIRTUAL_TYPE): Likewise.
+ (STORE_STRUCT_RETURN): Likewise.
+ (CANNOT_STORE_REGISTER): Likewise.
+ (FRAME_ARGS_ADDRESS): Likewise.
+ (FRAME_LOCALS_ADDRESS): Likewise.
+ (SMASH_TEXT_ADDRESS): Likewise.
+ (COERCE_FLOAT_TO_DOUBLE): Likewise.
+ (ABOUT_TO_RETURN): Delete, as no longer used.
+
+2002-11-07 Fernando Nasser <fnasser@redhat.com>
+
+ * printcmd.c (disassemble_command): Remove obsolete function.
+ (_initialize_printcmd): Do not create disassemble command here.
+ * cli/cli-cmds.c (disassemble_command): New function. Implements
+ disassemble command.
+ (init_cli_cmds): Create disassemble command here instead.
+
+2002-11-07 Andrew Cagney <ac131313@redhat.com>
+
+ * MAINTAINERS: Add Daniel Jacobowitz to global maintainers list.
+
+2002-11-07 Andrew Cagney <ac131313@redhat.com>
+
+ * regcache.h (regcache_cooked_read_using_offset_hack)
+ (regcache_cooked_write_using_offset_hack): Delete declarations.
+ (register_changed): Delete declaration.
+ * regcache.c (regcache_cooked_read_using_offset_hack)
+ (regcache_cooked_write_using_offset_hack): Delete functions.
+ (cooked_xfer_using_offset_hack): Delete function.
+ (register_changed): Delete function.
+
+2002-11-07 Jim Blandy <jimb@redhat.com>
+
+ * macroscope.c: #include "complaints.h".
+ (sal_macro_scope): Cope with filenames that appear in the symtabs,
+ but not in the macro table.
+ * Makefile.in (macroscope.o): Record dependency.
+
+2002-11-07 Joel Brobecker <brobecker@gnat.com>
+
+ * PROBLEMS: Document gdb/816 (unable to read core file on alpha-osf).
+
+2002-11-07 Andrew Cagney <ac131313@redhat.com>
+
+ * regcache.c (deprecated_registers_fetched): Update.
+ * regcache.h (deprecated_registers_fetched): Rename
+ registers_fetched.
+ * remote-vxsparc.c (vx_read_register): Update.
+ * remote-vxmips.c (vx_read_register): Update.
+ * remote-vx68.c (vx_read_register): Update.
+ * irix5-nat.c (fetch_core_registers): Update.
+ * mipsm3-nat.c (fetch_inferior_registers): Update.
+ * sun3-nat.c (fetch_inferior_registers): Update.
+ * symm-nat.c (fetch_inferior_registers): Update.
+ * ns32knbsd-nat.c (fetch_inferior_registers): Update.
+ (fetch_core_registers): Update.
+ (fetch_kcore_registers): Update.
+ * mips-nat.c (fetch_inferior_registers): Update.
+ * corelow.c (get_core_registers): Update.
+ * a68v-nat.c (fetch_inferior_registers): Update.
+
+2002-11-06 Joel Brobecker <brobecker@gnat.com>
+
+ Put in place the framework necessary for multiarching the hppa targets.
+ * hppa-tdep.c (hppa_gdbarch_init): New function.
+ (hppa_dump_tdep): New function.
+ (_initialize_hppa_tdep): Register the hppa gdbarch init function and
+ tdep structure dumper.
+ * config/pa/tm-hppa.h (GDB_MULTI_ARCH): New macro, defined to 0
+ until the multi-arching conversion has partially been completed.
+
+2002-11-06 Andrew Cagney <ac131313@redhat.com>
+
+ * valops.c (value_assign): Merge lval_register case into
+ lval_reg_frame_relative. Use frame_register and
+ regcache_cooked_write instead of get_saved_register and
+ write_register_bytes. After flushing the register cache, try to
+ re-select the selected frame.
+
+2002-11-06 Andrew Cagney <ac131313@redhat.com>
+
+ * regcache.h (deprecated_register_valid): Rename register_valid.
+ * regcache.c: Update.
+ * ia64-aix-nat.c: Update.
+ * i386gnu-nat.c: Update.
+ * alpha-nat.c: Update.
+ * sparc-nat.c: Update.
+ * lynx-nat.c: Update.
+ * remote-mips.c: Update.
+
+2002-11-06 Joel Brobecker <brobecker@gnat.com>
+
+ * hppa-tdep.c (_initialize_hppa_tdep): Move function body
+ to end of file, to be more consistent with the pratice followed
+ by other targets.
+
+2002-11-06 Andrew Cagney <ac131313@redhat.com>
+
+ * infcmd.c: Include "reggroups.h" and <ctype.h>.
+ (print_float_info): Print registers in float_reggroup.
+ (print_vector_info): Print registers in vector_reggroup.
+ (default_print_registers_info): When all, print registers in
+ all_reggroup. Otherwize, print registers in general_reggroup.
+ (registers_info): Rewrite. Add support for register groups.
+ Eliminate a goto.
+
+2002-11-06 Elena Zannoni <ezannoni@redhat.com>
+
+ * symtab.c (methods_info): Delete. It has been ifdeffed out for
+ ages.
+ (symtab_symbol_info): Remove eons old ifdeffed out code.
+ (_initialize_symtab): Remove prehistoric disabled 'info methods'
+ command.
+
+2002-11-06 Theodore A. Roth <troth@openavr.org>
+
+ * c-exp.y: Add missing semi-colons.
+ * f-exp.y: Add missing semi-colons.
+ * m2-exp.y: Add missing semi-colons.
+ * p-exp.y: Add missing semi-colons.
+ Add empty action to start rule to avoid a type clash error when
+ building with bison >= 1.50.
+
+2002-11-06 Jim Blandy <jimb@redhat.com>
+
+ * macrotab.h (struct macro_source_file): Doc fix.
+
+2002-11-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * varobj.c (child_exists, cplus_number_of_children): Change
+ STREQ macro references to strcmp.
+ (cplus_name_of_child): Change code to handle the fact that
+ fields are not necessarily contiguous with regards to their
+ access control. This is a fix for PR gdb/792.
+
+2002-11-05 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (GET_SAVED_REGISTER): Change to a predicate function.
+ * gdbarch.h, gdbarch.c: Regnerate.
+ * frame.h (frame_register): Declare.
+ * frame.c (frame_register): New function.
+ (get_saved_register): Test GET_SAVED_REGISTER_P before calling
+ GET_SAVED_REGISTER, otherwize call
+ generic_unwind_get_saved_register.
+ (frame_register_read): Use frame_register instead of
+ get_saved_register.
+
+2002-11-05 Elena Zannoni <ezannoni@redhat.com>
+
+ From Jim Ingham <jingham@apple.com>:
+ * event-top.c (gdb_disable_readline): New function.
+ (_initialize_event_loop): Move comment.
+
+2002-11-05 Elena Zannoni <ezannoni@redhat.com>
+
+ * event-loop.c (start_event_loop): Add comment.
+ Update copyright.
+
+2002-11-05 Andrew Cagney <ac131313@redhat.com>
+
+ * infcmd.c (default_print_registers_info): Do not call
+ PRINT_REGISTER_HOOK.
+
+2002-11-05 Andrew Cagney <ac131313@redhat.com>
+
+ * sparc-tdep.c (sparc_print_register_hook): Make static.
+ (sparc_print_registers_info): New function.
+ (sparc_do_registers_info): New function.
+ (sparclet_print_registers_info): New function.
+ (sparclet_do_registers_info): New function.
+ (do_sparc_print_registers_info): New function.
+ (sparc_print_registers): New static function, clone of infcmd.c's
+ default_print_registers_info.
+ * config/sparc/tm-sparclet.h (PRINT_REGISTER_HOOK): Delete macro.
+ (sparclet_do_registers_info): Declare.
+ (DEPRECATED_DO_REGISTERS_INFO): Re-define.
+ * config/sparc/tm-sparc.h (DEPRECATED_DO_REGISTERS_INFO):
+ Re-define.
+ (sparc_do_registers_info): Declare.
+ (PRINT_REGISTER_HOOK): Delete macro.
+ (sparc_print_register_hook): Delete declaration.
+
+2002-11-05 David Carlton <carlton@math.stanford.edu>
+
+ * symtab.c (lookup_symbol_aux): Move chunks of code into separate
+ functions.
+ (lookup_symbol_aux_local): New function.
+ (lookup_symbol_aux_symtabs): New function.
+ (lookup_symbol_aux_psymtabs): New function.
+
+2002-11-05 David Carlton <carlton@math.stanford.edu>
+
+ * symtab.c (lookup_symbol_aux): In minsym sections, don't use the
+ previous values of 'objfile' and 'block'.
+
+2002-11-05 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * values.c (value_change_enclosing_type): Set
+ enclosing_type field correctly also for the case where
+ more memory needs to be allocated.
+
+2002-11-03 Mark Kettenis <kettenis@gnu.org>
+
+ * i387-tdep.c (i387_print_float_info): Call fputs_filtered instead
+ of puts_filtered.
+
+ * i387-tdep.c (i387_print_float_info): Replace calls to
+ register_read and deprecated_read_register_gen with calls to
+ frame_register_read, and make the necessary adjustments to the
+ surrounding code.
+
+2002-11-02 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (register_reggroup_p): Allow default value.
+ * gdbarch.h, gdbarch.c: Regenerate.
+
+2002-11-02 Andrew Cagney <ac131313@redhat.com>
+
+ * regcache.h: Add coment indicating replacements for deprecated
+ functions.
+
+2002-11-02 Andrew Cagney <cagney@redhat.com>
+
+ * reggroups.h, reggroups.c: New files.
+ * regcache.c: Include "reggroups.h".
+ (enum regcache_dump_what): Add `regcache_dump_groups'.
+ (regcache_dump): Contract size of the "Type" column. When
+ specified, dump the register's groups.
+ (maintenance_print_register_groups): New function.
+ (_initialize_regcache): Add command `maint print register-groups'.
+ * Makefile.in (COMMON_OBS): Add reggroups.o
+ (SFILES): Add reggroups.c.
+ (reggroups_h): Define.
+ (regcache.o, gdbarch.o): Update dependencies.
+ (reggroups.o): Specify dependencies.
+ * gdbarch.sh (register_reggroup_p): Add pure multi-arch method.
+ Add opaque declaration for `struct reggroup' in generated .h file.
+ Include "reggroups.h" in generated .c file.
+ gdbarch.h, gdbarch.c: Re-generate.
+
+2002-11-02 Andrew Cagney <cagney@redhat.com>
+
+ * regcache.h (deprecated_read_register_gen): Rename
+ read_register_gen.
+ (deprecated_write_register_gen): Rename write_register_gen.
+ * i387-tdep.c: Update.
+ * x86-64-linux-nat.c: Update
+ * wince.c: Update.
+ * thread-db.c: Update.
+ * win32-nat.c: Update.
+ * mips-tdep.c: Update.
+ * d10v-tdep.c: Update.
+ * cris-tdep.c: Update.
+ * remote-sim.c: Update.
+ * remote-rdi.c: Update.
+ * remote-rdp.c: Update.
+ * frame.c: Update.
+ * target.c: Update.
+ * blockframe.c: Update.
+ * x86-64-tdep.c: Update.
+ * xstormy16-tdep.c: Update.
+ * sh-tdep.c: Update.
+ * s390-tdep.c: Update.
+ * rs6000-tdep.c: Update.
+ * sparc-tdep.c: Update.
+ * i386-tdep.c: Update.
+ * dwarf2cfi.c: Update.
+ * regcache.c: Update.
+
+2002-11-01 Joel Brobecker <brobecker@gnat.com>
+
+ New interix-specific files:
+ * config/i386/nm-interix.h: New file.
+ * config/i386/interix.mh: New file.
+ * config/i386/interix.mt: New file.
+ * i386-interix-nat.c: New file.
+ * i386-interix-tdep.c: New file.
+
+2002-11-01 Andrew Cagney <cagney@redhat.com>
+
+ * frame.h (deprecated_generic_get_saved_register): Rename
+ generic_get_saved_register.
+ * blockframe.c (deprecated_generic_get_saved_register): Update.
+ * xstormy16-tdep.c (xstormy16_get_saved_register): Update.
+ (xstormy16_frame_saved_register): Update.
+ * sh-tdep.c (sh_gdbarch_init): Update.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
+ * ia64-tdep.c (ia64_get_saved_register): Update.
+ * cris-tdep.c (cris_gdbarch_init): Update.
+ * config/m32r/tm-m32r.h (GET_SAVED_REGISTER): Update.
+ * arm-tdep.c (arm_gdbarch_init): Update.
+
+2002-10-31 Daniel Jacobowitz <drow@mvista.com>
+
+ * lin-lwp.c (lin_lwp_resume): Remove resume_all test for !step.
+
+2002-10-31 Daniel Jacobowitz <drow@mvista.com>
+
+ * i386-linux-tdep.c (i386_linux_pc_in_sigtramp): Check for
+ trampolines in sigaction.
+
+2002-10-31 Andrew Cagney <cagney@redhat.com>
+
+ * h8300-tdep.c: Include "gdb_assert.h".
+ (h8300_print_register): Add gdbarch, file and frame parameters.
+ Use frame_read_unsigned_register to read the register's value.
+ Use fprintf_filtered to display output.
+ (h8300_print_registers_info): Replace h8300_do_registers_info.
+ (h8300_gdbarch_init): Set print_registers_info.
+
+2002-10-31 Andrew Cagney <cagney@redhat.com>
+
+ * frame.c (frame_read_unsigned_register): New function.
+ (frame_read_signed_register): New function.
+ * frame.h (frame_read_unsigned_register): Declare.
+ (frame_read_signed_register): Declare.
+
+2002-10-31 Andrew Cagney <cagney@redhat.com>
+
+ * h8500-tdep.c (h8500_print_registers_info): New static function,
+ clone of infcmd.c's default_print_registers_info.
+ (h8500_do_registers_info): New funtion.
+ (h8500_print_register_hook): Rename print_register_hook, make
+ static.
+
+ * config/h8500/tm-h8500.h: Update copyright.
+ (DEPRECATED_DO_REGISTERS_INFO): Define.
+ (h8500_do_registers_info: Declare.
+ (PRINT_REGISTER_HOOK): Delete macro.
+ (print_register_hook): Delete function.
+
+2002-10-31 Andrew Cagney <cagney@redhat.com>
+
+ * z8k-tdep.c (z8k_print_register_hook): Make static.
+ (z8k_print_registers_info): New static function, clone of
+ infcmd.c's default_print_registers_info.
+ (z8k_do_registers_info): New function. Wrap
+ z8k_print_registers_info.
+ * config/z8k/tm-z8k.h: Update copyright.
+ (PRINT_REGISTER_HOOK): Delete macro.
+ (z8k_print_register_hook): Delete declaration.
+ (DEPRECATED_DO_REGISTERS_INFO): Define.
+ (z8k_do_registers_info): Declare.
+
+2002-10-30 Joel Brobecker <brobecker@gnat.com>
+
+ * hppa-tdep.c (find_function_in_inferior): Remove this extern,
+ as this is already provided by value.h, and was actually causing
+ a compilation error because of a conflict in parameter type
+ declaration due to a missing const keyword.
+ (low_text_segment_addres): Fix a compilation warning.
+
+2002-10-29 Daniel Jacobowitz <drow@mvista.com>
+
+ * mips-linux-nat.c (mips_linux_cannot_fetch_register): Don't fetch
+ registers without a name.
+ (mips_linux_cannot_store_register): Don't store registers without
+ a name.
+
+2002-10-28 David Carlton <carlton@math.stanford.edu>
+
+ * symtab.c (find_addr_symbol): Delete. (It was already commented
+ out.)
+ * symtab.h: Delete prototype for find_addr_symbol.
+
+2002-10-26 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (DEPRECATED_DO_REGISTERS_INFO): Rename
+ DO_REGISTERS_INFO.
+ gdbarch.h, gdbarch.c: Re-generate.
+ * infcmd.c (default_print_registers_info): Update reference.
+ * mips-tdep.c (mips_gdbarch_init): Set deprecated_do_registers_info.
+ (mips_dump_tdep): Do not print DO_REGISTERS_INFO.
+ * sh-tdep.c (sh_gdbarch_init): Ditto.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
+ * h8300-tdep.c (h8300_gdbarch_init): Ditto.
+
+2002-10-26 Mark Kettenis <kettenis@gnu.org>
+
+ * x86-64-tdep.c (x86_64_init_abi): Set init_extra_frame_info to
+ cfi_init_extra_frame_info.
+ * x86-64-tdep.h (x86_64_init_extra_frame_info): Remove prototype.
+ * x86-64-linux-tdep.c (x86_64_init_extra_frame_info): Remove function.
+
+ * x86-64-tdep.c (x86_64_init_abi): Add calls to override the i386
+ target where necessary. Add more comments and remove the ones
+ that don't provide any useful information.
+
+ * i386-tdep.c (i386_frame_saved_pc): Replace call to
+ deprecated_read_register_dummy with
+ frame_unwind_unsigned_register.
+
+ * i386-tdep.c (i386_extract_struct_value_address): Use
+ regcache_raw_read_unsigned instead of
+ regcache_cooked_read_unsigned since we know that the register
+ we're reading isn't a pseudo register. Rename variable 'val' into
+ the more descriptive 'addr'.
+
+ * x86-64-tdep.c: Fix some formatting problems, mostly in comments.
+ (x86_64_push_return_address): Add comment.
+ (x86_64_pop_frame): Make static.
+ (examine_argument): Clarify comment.
+ (x86_64_skip_prologue): Make prolog_expact variable static.
+
+ * dwarf2cfi.c: Fix some formatting problems.
+ (context_cpy, read_encoded_pointer): Clarify comments.
+
+ * x86-64-tdep.c (x86_64_breakpoint_from_pc): Constify.
+ (x86_64_init_abi): Move set_gdbarch_* calls that overlap with the
+ i386 target back into x86_64_gdbarch_init. Add some comments and
+ remove meaningless ones.
+
+2002-10-25 Andrew Cagney <cagney@redhat.com>
+
+ * complaints.h (struct deprecated_complaint): Rename `struct
+ complaint'.
+ * complaints.c (complain): Update.
+ * remote-vx68.c, remote-vxmips.c, remote-vxsparc.c: Delete
+ incorrect comment indicating that "symfile.h" was being included
+ for the `struct complaint' definition.
+ * remote-vx.c: Update.
+ * objc-lang.c: Update.
+ * xcoffread.c: Update.
+ * hpread.c: Update.
+ * mdebugread.c: Update.
+ * stabsread.c: Update.
+ * dwarf2read.c: Update.
+ * dwarfread.c: Update.
+ * elfread.c: Update.
+ * coffread.c: Update.
+ * stabsread.h: Update.
+ * dbxread.c: Update.
+ * buildsym.c: Update.
+ * gdbtypes.c: Update.
+ * macrotab.c: Update.
+
2002-11-14 David Carlton <carlton@math.stanford.edu>
* Makefile.in (symtab.o): Depend on gdb_assert_h.
@@ -174,6 +1058,11 @@
2002-10-25 Mark Kettenis <kettenis@gnu.org>
+ * x86-64-tdep.c (x86_64_gdbarch_init): Make a bit more similar to
+ the version in i386-tdep.c. Move set_gdbarch_* calls out into...
+ (x86_64_init_abi): ...new function.
+
+ * Makefile.in (i386v-nat.o): Add $(i386_tdep_h).
* i386v-nat.c: Include "i386-tdep.h".
2002-10-25 Andrew Cagney <cagney@redhat.com>
@@ -501,7 +1390,7 @@
2002-10-11 Klee Dienes <kdienes@apple.com>
- * findvar.c (read_memory_typed_address): New function.
+ * corefile.c (read_memory_typed_address): New function.
* gdbcore.h (read_memory_typed_address): Add prototype.
* blockframe.c (sigtramp_saved_pc): Use read_memory_typed_address
to read a value destined for a CORE_ADDR, not read_memory_integer.
diff --git a/gdb/MAINTAINERS b/gdb/MAINTAINERS
index 07a6a02..2947317f 100644
--- a/gdb/MAINTAINERS
+++ b/gdb/MAINTAINERS
@@ -9,6 +9,7 @@ Kevin Buettner kevinb@redhat.com
Andrew Cagney ac131313@redhat.com
J.T. Conklin jtc@redback.com
Fred Fish fnf@ninemoons.com
+Daniel Jacobowitz dan@debian.org
Mark Kettenis kettenis@gnu.org
Peter Schauer Peter.Schauer@regent.e-technik.tu-muenchen.de
Stan Shebs shebs@apple.com
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 91316a9..5c027e5 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -55,6 +55,8 @@ INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
+DESTDIR =
+
AR = @AR@
AR_FLAGS = qv
RANLIB = @RANLIB@
@@ -536,7 +538,7 @@ SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \
charset.c cli-out.c coffread.c complaints.c completer.c corefile.c \
cp-abi.c cp-support.c cp-valprint.c \
dbxread.c demangle.c dictionary.c \
- disasm.c doublest.c dwarfread.c dwarf2read.c \
+ disasm.c doublest.c dummy-frame.c dwarfread.c dwarf2read.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 \
gdbarch.c arch-utils.c gdbtypes.c gnu-v2-abi.c gnu-v3-abi.c \
@@ -551,7 +553,7 @@ SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \
nlmread.c \
objfiles.c osabi.c \
p-exp.y p-lang.c p-typeprint.c p-valprint.c parse.c printcmd.c \
- regcache.c remote.c \
+ regcache.c reggroups.c remote.c \
scm-exp.c scm-lang.c scm-valprint.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 \
@@ -643,6 +645,7 @@ dictionary_h = dictionary.h
disasm_h = disasm.h
doublest_h = doublest.h $(floatformat_h)
dst_h = dst.h
+dummy_frame_h = dummy-frame.h
dwarf2cfi_h = dwarf2cfi.h
environ_h = environ.h
event_loop_h = event-loop.h
@@ -701,6 +704,7 @@ ppc_tdep_h = ppc-tdep.h $(osabi_h)
ppcnbsd_tdep_h = ppcnbsd-tdep.h
proc_utils_h = proc-utils.h
regcache_h = regcache.h
+reggroups_h = reggroups.h
remote_utils_h = remote-utils.h $(target_h)
remote_h = remote.h
scm_lang_h = scm-lang.h $(scm_tags_h)
@@ -831,8 +835,7 @@ TAGFILES_NO_SRCDIR = $(SFILES) $(HFILES_NO_SRCDIR) $(ALLDEPFILES) \
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 \
- charset.o disasm.o \
+ charset.o dictionary.o disasm.o dummy-frame.o \
source.o values.o eval.o valops.o valarith.o valprint.o printcmd.o \
symtab.o symfile.o symmisc.o linespec.o infcmd.o infrun.o \
expprint.o environ.o stack.o thread.o \
@@ -858,7 +861,8 @@ COMMON_OBS = version.o block.o blockframe.o breakpoint.o findvar.o regcache.o \
nlmread.o serial.o mdebugread.o top.o utils.o \
ui-file.o \
frame.o doublest.o \
- gnu-v2-abi.o gnu-v3-abi.o hpacc-abi.o cp-abi.o cp-support.o
+ gnu-v2-abi.o gnu-v3-abi.o hpacc-abi.o cp-abi.o cp-support.o \
+ reggroups.o
OBS = $(COMMON_OBS) $(ANNOTATE_OBS)
@@ -922,9 +926,12 @@ install-only: $(CONFIG_INSTALL)
true ; \
fi ; \
$(srcdir)/../mkinstalldirs $(bindir) ; \
- $(INSTALL_PROGRAM) gdb$(EXEEXT) $(bindir)/$$transformed_name$(EXEEXT) ; \
- $(srcdir)/../mkinstalldirs $(man1dir) ; \
- $(INSTALL_DATA) $(srcdir)/gdb.1 $(man1dir)/$$transformed_name.1
+ $(INSTALL_PROGRAM) gdb$(EXEEXT) \
+ $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
+ $(srcdir)/../mkinstalldirs \
+ $(DESTDIR)$(man1dir) ; \
+ $(INSTALL_DATA) $(srcdir)/gdb.1 \
+ $(DESTDIR)$(man1dir)/$$transformed_name.1
@$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
uninstall: force $(CONFIG_UNINSTALL)
@@ -1537,7 +1544,7 @@ block.o: block.c $(defs_h) $(block_h) $(gdb_obstack_h) $(cp_support_h)
blockframe.o: blockframe.c $(defs_h) $(symtab_h) $(bfd_h) $(symfile_h) \
$(objfiles_h) $(frame_h) $(gdbcore_h) $(value_h) $(target_h) \
$(inferior_h) $(annotate_h) $(regcache_h) $(gdb_assert_h) \
- $(block_h)
+ $(dummy_frame_h) $(block_h)
breakpoint.o: breakpoint.c $(defs_h) $(symtab_h) $(frame_h) $(breakpoint_h) \
$(gdbtypes_h) $(expression_h) $(gdbcore_h) $(gdbcmd_h) $(value_h) \
$(command_h) $(inferior_h) $(gdbthread_h) $(target_h) $(language_h) \
@@ -1637,6 +1644,8 @@ doublest.o: doublest.c $(defs_h) $(doublest_h) $(floatformat_h) \
dpx2-nat.o: dpx2-nat.c $(defs_h) $(gdbcore_h) $(gdb_string_h)
dsrec.o: dsrec.c $(defs_h) $(serial_h) $(srec_h)
# OBSOLETE dstread.o: dstread.c
+dummy-frame.o: dummy-frame.c $(defs_h) $(dummy_frame_h) $(regcache_h) \
+ $(frame_h) $(inferior_h) $(gdb_assert_h)
dve3900-rom.o: dve3900-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
$(serial_h) $(inferior_h) $(command_h) $(gdb_string_h) $(regcache_h)
dwarf2cfi.o: dwarf2cfi.c $(defs_h) $(gdbcore_h) $(symtab_h) $(symfile_h) \
@@ -1686,7 +1695,8 @@ fork-child.o: fork-child.c $(defs_h) $(gdb_string_h) $(frame_h) \
$(terminal_h) $(gdbthread_h) $(command_h)
# OBSOLETE fr30-tdep.o: fr30-tdep.c
frame.o: frame.c $(defs_h) $(frame_h) $(target_h) $(value_h) $(inferior_h) \
- $(regcache_h) $(gdb_assert_h)
+ $(regcache_h) $(gdb_assert_h) $(gdb_obstack_h) $(dummy_frame_h) \
+ $(gdbcore_h) $(annotate_h)
frv-tdep.o: frv-tdep.c $(defs_h) $(inferior_h) $(symfile_h) $(gdbcore_h) \
$(arch_utils_h) $(regcache_h)
gcore.o: gcore.c $(defs_h) $(cli_decode_h) $(inferior_h) $(gdbcore_h) \
@@ -1697,7 +1707,7 @@ gdbarch.o: gdbarch.c $(defs_h) $(arch_utils_h) $(gdbcmd_h) $(inferior_h) \
$(gdb_string_h) $(symtab_h) $(frame_h) $(inferior_h) $(breakpoint_h) \
$(gdb_wait_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) $(gdbthread_h) \
$(annotate_h) $(symfile_h) $(value_h) $(symcat_h) $(floatformat_h) \
- $(gdb_assert_h) $(gdb_string_h) $(gdb_events_h)
+ $(gdb_assert_h) $(gdb_string_h) $(gdb_events_h) $(reggroups_h)
gdbtypes.o: gdbtypes.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \
$(symfile_h) $(objfiles_h) $(gdbtypes_h) $(expression_h) \
$(language_h) $(target_h) $(value_h) $(demangle_h) $(complaints_h) \
@@ -1727,7 +1737,7 @@ hpacc-abi.o: hpacc-abi.c $(defs_h) $(value_h) $(gdb_regex_h) $(gdb_string_h) \
hppa-tdep.o: hppa-tdep.c $(defs_h) $(frame_h) $(bfd_h) $(inferior_h) \
$(value_h) $(regcache_h) $(completer_h) $(symtab_h) $(a_out_encap_h) \
$(gdb_stat_h) $(gdb_wait_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) \
- $(symfile_h) $(objfiles_h)
+ $(symfile_h) $(objfiles_h) $(language_h)
hppab-nat.o: hppab-nat.c $(defs_h) $(inferior_h) $(target_h) $(regcache_h)
hppah-nat.o: hppah-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \
$(gdb_wait_h) $(regcache_h)
@@ -1775,7 +1785,7 @@ i386obsd-nat.o: i386obsd-nat.c $(defs_h)
i386obsd-tdep.o: i386obsd-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \
$(regcache_h) $(i386_tdep_h) $(i387_tdep_h)
i386v-nat.o: i386v-nat.c $(defs_h) $(frame_h) $(inferior_h) $(language_h) \
- $(gdbcore_h) $(gdb_stat_h) $(floatformat_h) $(target_h)
+ $(gdbcore_h) $(gdb_stat_h) $(floatformat_h) $(target_h) $(i386_tdep_h)
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) \
@@ -1881,7 +1891,7 @@ macrocmd.o: macrocmd.c $(defs_h) $(macrotab_h) $(macroexp_h) $(macroscope_h) \
macroexp.o: macroexp.c $(defs_h) $(gdb_obstack_h) $(bcache_h) $(macrotab_h) \
$(macroexp_h) $(gdb_assert_h)
macroscope.o: macroscope.c $(defs_h) $(macroscope_h) $(symtab_h) $(target_h) \
- $(frame_h) $(inferior_h) $(source_h)
+ $(frame_h) $(inferior_h) $(source_h) $(complaints_h)
macrotab.o: macrotab.c $(defs_h) $(gdb_obstack_h) $(splay_tree_h) \
$(symtab_h) $(symfile_h) $(objfiles_h) $(macrotab_h) $(gdb_assert_h) \
$(bcache_h) $(complaints_h)
@@ -2017,8 +2027,10 @@ procfs.o: procfs.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \
ptx4-nat.o: ptx4-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(regcache_h) \
$(gregset_h)
regcache.o: regcache.c $(defs_h) $(inferior_h) $(target_h) $(gdbarch_h) \
- $(gdbcmd_h) $(regcache_h) $(gdb_assert_h) $(gdb_string_h) \
- $(gdbcmd_h)
+ $(gdbcmd_h) $(regcache_h) $(reggroups_h) $(gdb_assert_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)
@@ -2362,20 +2374,25 @@ install-gdbtk:
true ; \
fi ; \
$(SHELL) $(srcdir)/../mkinstalldirs $(bindir); \
- $(INSTALL_PROGRAM) insight$(EXEEXT) $(bindir)/$$transformed_name$(EXEEXT) ; \
- $(SHELL) $(srcdir)/../mkinstalldirs $(GDBTK_LIBRARY) ; \
- $(SHELL) $(srcdir)/../mkinstalldirs $(libdir)/insight$(GDBTK_VERSION) ; \
- $(INSTALL_DATA) $(srcdir)/gdbtk/plugins/plugins.tcl $(libdir)/insight$(GDBTK_VERSION)/plugins.tcl ; \
+ $(INSTALL_PROGRAM) insight$(EXEEXT) \
+ $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
+ $(SHELL) $(srcdir)/../mkinstalldirs \
+ $(DESTDIR)$(GDBTK_LIBRARY) ; \
+ $(SHELL) $(srcdir)/../mkinstalldirs \
+ $(DESTDIR)$(libdir)/insight$(GDBTK_VERSION) ; \
+ $(INSTALL_DATA) $(srcdir)/gdbtk/plugins/plugins.tcl \
+ $(DESTDIR)$(libdir)/insight$(GDBTK_VERSION)/plugins.tcl ; \
+ $(SHELL) $(srcdir)/../mkinstalldirs \
+ $(DESTDIR)$(GDBTK_LIBRARY)/images \
+ $(DESTDIR)$(GDBTK_LIBRARY)/images2 ; \
$(SHELL) $(srcdir)/../mkinstalldirs \
- $(GDBTK_LIBRARY)/images \
- $(GDBTK_LIBRARY)/images2 ; \
- $(SHELL) $(srcdir)/../mkinstalldirs $(GDBTK_LIBRARY)/help \
- $(GDBTK_LIBRARY)/help/images \
- $(GDBTK_LIBRARY)/help/trace ; \
+ $(DESTDIR)$(GDBTK_LIBRARY)/help \
+ $(DESTDIR)$(GDBTK_LIBRARY)/help/images \
+ $(DESTDIR)$(GDBTK_LIBRARY)/help/trace ; \
cd $(srcdir)/gdbtk/library ; \
for i in *.tcl *.itcl *.ith *.itb images/*.gif images2/*.gif images/icons.txt images2/icons.txt tclIndex help/*.html help/trace/*.html help/trace/index.toc help/images/*.gif; \
do \
- $(INSTALL_DATA) $$i $(GDBTK_LIBRARY)/$$i ; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(GDBTK_LIBRARY)/$$i ; \
done ;
uninstall-gdbtk:
@@ -2386,8 +2403,8 @@ uninstall-gdbtk:
else \
true ; \
fi ; \
- rm -f $(bindir)/$$transformed_name$(EXEEXT) ; \
- rm -rf $(GDBTK_LIBRARY)
+ rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
+ rm -rf $(DESTDIR)$(GDBTK_LIBRARY)
clean-gdbtk:
rm -f insight$(EXEEXT)
diff --git a/gdb/PROBLEMS b/gdb/PROBLEMS
index 4c460d6..b2f45d8 100644
--- a/gdb/PROBLEMS
+++ b/gdb/PROBLEMS
@@ -50,3 +50,18 @@ 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__'
+
diff --git a/gdb/a68v-nat.c b/gdb/a68v-nat.c
index 4cc25ce..0bfe8e2 100644
--- a/gdb/a68v-nat.c
+++ b/gdb/a68v-nat.c
@@ -41,7 +41,7 @@ fetch_inferior_registers (int ignored)
ptrace_$init_control (&inferior_control_registers);
inferior_fp_registers.size = sizeof (inferior_fp_registers);
- registers_fetched ();
+ deprecated_registers_fetched ();
ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) & inferior_registers,
@@ -61,11 +61,14 @@ fetch_inferior_registers (int ignored)
(PTRACE_ARG3_TYPE) & inferior_control_registers,
ptrace_$control_set_m68k);
- bcopy (&inferior_registers, registers, 16 * 4);
- bcopy (&inferior_fp_registers, &registers[REGISTER_BYTE (FP0_REGNUM)],
+ bcopy (&inferior_registers, &deprecated_registers[0], 16 * 4);
+ bcopy (&inferior_fp_registers,
+ &deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
sizeof inferior_fp_registers.regs);
- *(int *) &registers[REGISTER_BYTE (PS_REGNUM)] = inferior_control_registers.sr;
- *(int *) &registers[REGISTER_BYTE (PC_REGNUM)] = inferior_control_registers.pc;
+ *(int *) &deprecated_registers[REGISTER_BYTE (PS_REGNUM)]
+ = inferior_control_registers.sr;
+ *(int *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)]
+ = inferior_control_registers.pc;
}
/* Store our register values back into the inferior.
@@ -94,13 +97,16 @@ store_inferior_registers (int regno)
(PTRACE_ARG3_TYPE) & inferior_control_registers,
ptrace_$control_set_m68k);
- bcopy (registers, &inferior_registers, sizeof (inferior_registers));
+ bcopy (&deprecated_registers[0], &inferior_registers,
+ sizeof (inferior_registers));
- bcopy (&registers[REGISTER_BYTE (FP0_REGNUM)], inferior_fp_registers.regs,
- sizeof inferior_fp_registers.regs);
+ bcopy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
+ inferior_fp_registers.regs, sizeof inferior_fp_registers.regs);
- inferior_control_registers.sr = *(int *) &registers[REGISTER_BYTE (PS_REGNUM)];
- inferior_control_registers.pc = *(int *) &registers[REGISTER_BYTE (PC_REGNUM)];
+ inferior_control_registers.sr
+ = *(int *) &deprecated_registers[REGISTER_BYTE (PS_REGNUM)];
+ inferior_control_registers.pc
+ = *(int *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)];
ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) & inferior_registers,
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 2843aeb..2d46699a 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -4131,6 +4131,7 @@ fill_in_ada_prototype (struct symbol *func)
case LOC_REGPARM_ADDR:
TYPE_FIELD_BITPOS (ftype, nargs) = nargs;
TYPE_FIELD_BITSIZE (ftype, nargs) = 0;
+ TYPE_FIELD_STATIC_KIND (ftype, nargs) = 0;
TYPE_FIELD_TYPE (ftype, nargs) =
lookup_pointer_type (check_typedef (SYMBOL_TYPE (sym)));
TYPE_FIELD_NAME (ftype, nargs) = SYMBOL_NAME (sym);
@@ -4144,6 +4145,7 @@ fill_in_ada_prototype (struct symbol *func)
case LOC_BASEREG_ARG:
TYPE_FIELD_BITPOS (ftype, nargs) = nargs;
TYPE_FIELD_BITSIZE (ftype, nargs) = 0;
+ TYPE_FIELD_STATIC_KIND (ftype, nargs) = 0;
TYPE_FIELD_TYPE (ftype, nargs) = check_typedef (SYMBOL_TYPE (sym));
TYPE_FIELD_NAME (ftype, nargs) = SYMBOL_NAME (sym);
nargs += 1;
@@ -4981,7 +4983,7 @@ find_printable_frame (struct frame_info *fi, int level)
find_pc_line (fi->pc,
fi->next != NULL
&& !fi->next->signal_handler_caller
- && !frame_in_dummy (fi->next));
+ && !deprecated_frame_in_dummy (fi->next));
if (sal.symtab && !is_ada_runtime_file (sal.symtab->filename))
{
#if defined(__alpha__) && defined(__osf__) && !defined(VXWORKS_TARGET)
@@ -5987,6 +5989,7 @@ template_to_fixed_record_type (struct type *type, char *valaddr,
* rediscover why we needed field_offset and fix it properly. */
TYPE_FIELD_BITPOS (rtype, f) = off;
TYPE_FIELD_BITSIZE (rtype, f) = 0;
+ TYPE_FIELD_STATIC_KIND (rtype, f) = 0;
if (ada_is_variant_part (type, f))
{
@@ -6090,6 +6093,7 @@ template_to_static_fixed_type (struct type *templ_type)
{
TYPE_FIELD_BITPOS (type, f) = 0;
TYPE_FIELD_BITSIZE (type, f) = 0;
+ TYPE_FIELD_STATIC_KIND (type, f) = 0;
if (is_dynamic_field (templ_type, f))
{
@@ -6159,6 +6163,7 @@ to_record_with_fixed_variant_part (struct type *type, char *valaddr,
TYPE_FIELD_TYPE (rtype, nfields - 1) = branch_type;
TYPE_FIELD_NAME (rtype, nfields - 1) = "S";
TYPE_FIELD_BITSIZE (rtype, nfields - 1) = 0;
+ TYPE_FIELD_STATIC_KIND (rtype, nfields - 1) = 0;
TYPE_LENGTH (rtype) += TYPE_LENGTH (branch_type);
-TYPE_LENGTH (TYPE_FIELD_TYPE (type, nfields - 1));
}
diff --git a/gdb/alpha-nat.c b/gdb/alpha-nat.c
index 580dcc0..6d7a3d6 100644
--- a/gdb/alpha-nat.c
+++ b/gdb/alpha-nat.c
@@ -133,19 +133,21 @@ fetch_elf_core_registers (char *core_reg_sect, unsigned core_reg_size,
if (which == 2)
{
/* The FPU Registers. */
- memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], core_reg_sect, 31 * 8);
- memset (&registers[REGISTER_BYTE (FP0_REGNUM + 31)], 0, 8);
- memset (&register_valid[FP0_REGNUM], 1, 32);
+ 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 (&registers[REGISTER_BYTE (ALPHA_V0_REGNUM)], core_reg_sect,
- 31 * 8);
- memcpy (&registers[REGISTER_BYTE (PC_REGNUM)], core_reg_sect + 31 * 8, 8);
- memset (&registers[REGISTER_BYTE (ALPHA_ZERO_REGNUM)], 0, 8);
- memset (&register_valid[ALPHA_V0_REGNUM], 1, 32);
- register_valid[PC_REGNUM] = 1;
+ 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;
}
}
@@ -209,10 +211,10 @@ fill_gregset (gdb_gregset_t *gregsetp, int regno)
for (regi = 0; regi < 31; regi++)
if ((regno == -1) || (regno == regi))
- *(regp + regi) = *(long *) &registers[REGISTER_BYTE (regi)];
+ *(regp + regi) = *(long *) &deprecated_registers[REGISTER_BYTE (regi)];
if ((regno == -1) || (regno == PC_REGNUM))
- *(regp + 31) = *(long *) &registers[REGISTER_BYTE (PC_REGNUM)];
+ *(regp + 31) = *(long *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)];
}
/*
@@ -241,7 +243,7 @@ fill_fpregset (gdb_fpregset_t *fpregsetp, int regno)
if ((regno == -1) || (regno == regi))
{
*(regp + regi - FP0_REGNUM) =
- *(long *) &registers[REGISTER_BYTE (regi)];
+ *(long *) &deprecated_registers[REGISTER_BYTE (regi)];
}
}
}
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index 1003eed..277b5ca 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -1546,7 +1546,7 @@ alpha_store_return_value (struct type *valtype, char *valbuf)
else
memcpy (raw_buffer, valbuf, length);
- write_register_bytes (REGISTER_BYTE (regnum), raw_buffer, length);
+ deprecated_write_register_bytes (REGISTER_BYTE (regnum), raw_buffer, length);
}
/* Just like reinit_frame_cache, but with the right arguments to be
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index a056177..732c40b 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -99,7 +99,7 @@ legacy_extract_return_value (struct type *type, struct regcache *regcache,
{
char *registers = deprecated_grub_regcache_for_registers (regcache);
bfd_byte *buf = valbuf;
- DEPRECATED_EXTRACT_RETURN_VALUE (type, registers, buf);
+ DEPRECATED_EXTRACT_RETURN_VALUE (type, registers, buf); /* OK */
}
/* Implementation of store return value that grubs the register cache.
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 82444d1..2adce63 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -2401,13 +2401,14 @@ arm_store_return_value (struct type *type, char *valbuf)
case ARM_FLOAT_FPA:
convert_to_extended (valbuf, buf);
- write_register_bytes (REGISTER_BYTE (ARM_F0_REGNUM), buf,
- FP_REGISTER_RAW_SIZE);
+ deprecated_write_register_bytes (REGISTER_BYTE (ARM_F0_REGNUM), buf,
+ FP_REGISTER_RAW_SIZE);
break;
case ARM_FLOAT_SOFT:
case ARM_FLOAT_SOFT_VFP:
- write_register_bytes (ARM_A1_REGNUM, valbuf, TYPE_LENGTH (type));
+ deprecated_write_register_bytes (ARM_A1_REGNUM, valbuf,
+ TYPE_LENGTH (type));
break;
default:
@@ -2418,7 +2419,8 @@ arm_store_return_value (struct type *type, char *valbuf)
}
}
else
- write_register_bytes (ARM_A1_REGNUM, valbuf, TYPE_LENGTH (type));
+ deprecated_write_register_bytes (ARM_A1_REGNUM, valbuf,
+ TYPE_LENGTH (type));
}
/* Store the address of the place in which to copy the structure the
@@ -2858,7 +2860,7 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_push_return_address (gdbarch, arm_push_return_address);
#endif
- set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
+ set_gdbarch_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
set_gdbarch_push_arguments (gdbarch, arm_push_arguments);
set_gdbarch_coerce_float_to_double (gdbarch,
standard_coerce_float_to_double);
diff --git a/gdb/blockframe.c b/gdb/blockframe.c
index 901927b..4177409 100644
--- a/gdb/blockframe.c
+++ b/gdb/blockframe.c
@@ -36,27 +36,10 @@
#include "annotate.h"
#include "regcache.h"
#include "gdb_assert.h"
+#include "dummy-frame.h"
/* Prototypes for exported functions. */
-static void generic_call_dummy_register_unwind (struct frame_info *frame,
- void **cache,
- int regnum,
- int *optimized,
- enum lval_type *lval,
- CORE_ADDR *addrp,
- int *realnum,
- void *raw_buffer);
-static void frame_saved_regs_register_unwind (struct frame_info *frame,
- void **cache,
- int regnum,
- int *optimized,
- enum lval_type *lval,
- CORE_ADDR *addrp,
- int *realnum,
- void *buffer);
-
-
void _initialize_blockframe (void);
/* A default FRAME_CHAIN_VALID, in the form that is suitable for most
@@ -182,140 +165,6 @@ inside_entry_func (CORE_ADDR pc)
symfile_objfile->ei.entry_func_highpc > pc);
}
-/* Info about the innermost stack frame (contents of FP register) */
-
-static struct frame_info *current_frame;
-
-/* Cache for frame addresses already read by gdb. Valid only while
- inferior is stopped. Control variables for the frame cache should
- be local to this module. */
-
-static struct obstack frame_cache_obstack;
-
-void *
-frame_obstack_alloc (unsigned long size)
-{
- return obstack_alloc (&frame_cache_obstack, size);
-}
-
-void
-frame_saved_regs_zalloc (struct frame_info *fi)
-{
- fi->saved_regs = (CORE_ADDR *)
- frame_obstack_alloc (SIZEOF_FRAME_SAVED_REGS);
- memset (fi->saved_regs, 0, SIZEOF_FRAME_SAVED_REGS);
-}
-
-
-/* Return the innermost (currently executing) stack frame. */
-
-struct frame_info *
-get_current_frame (void)
-{
- if (current_frame == NULL)
- {
- if (target_has_stack)
- current_frame = create_new_frame (read_fp (), read_pc ());
- else
- error ("No stack.");
- }
- return current_frame;
-}
-
-void
-set_current_frame (struct frame_info *frame)
-{
- current_frame = frame;
-}
-
-
-/* Using the PC, select a mechanism for unwinding a frame returning
- the previous frame. The register unwind function should, on
- demand, initialize the ->context object. */
-
-static void
-set_unwind_by_pc (CORE_ADDR pc, CORE_ADDR fp,
- frame_register_unwind_ftype **unwind)
-{
- if (!USE_GENERIC_DUMMY_FRAMES)
- /* Still need to set this to something. The ``info frame'' code
- calls this function to find out where the saved registers are.
- Hopefully this is robust enough to stop any core dumps and
- return vaguely correct values.. */
- *unwind = frame_saved_regs_register_unwind;
- else if (PC_IN_CALL_DUMMY (pc, fp, fp))
- *unwind = generic_call_dummy_register_unwind;
- else
- *unwind = frame_saved_regs_register_unwind;
-}
-
-/* Create an arbitrary (i.e. address specified by user) or innermost frame.
- Always returns a non-NULL value. */
-
-struct frame_info *
-create_new_frame (CORE_ADDR addr, CORE_ADDR pc)
-{
- struct frame_info *fi;
- char *name;
-
- fi = (struct frame_info *)
- obstack_alloc (&frame_cache_obstack,
- sizeof (struct frame_info));
-
- /* Zero all fields by default. */
- memset (fi, 0, sizeof (struct frame_info));
-
- fi->frame = addr;
- fi->pc = pc;
- find_pc_partial_function (pc, &name, (CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
- fi->signal_handler_caller = PC_IN_SIGTRAMP (fi->pc, name);
-
- if (INIT_EXTRA_FRAME_INFO_P ())
- INIT_EXTRA_FRAME_INFO (0, fi);
-
- /* Select/initialize an unwind function. */
- set_unwind_by_pc (fi->pc, fi->frame, &fi->register_unwind);
-
- return fi;
-}
-
-/* Return the frame that FRAME calls (NULL if FRAME is the innermost
- frame). */
-
-struct frame_info *
-get_next_frame (struct frame_info *frame)
-{
- return frame->next;
-}
-
-/* Flush the entire frame cache. */
-
-void
-flush_cached_frames (void)
-{
- /* Since we can't really be sure what the first object allocated was */
- obstack_free (&frame_cache_obstack, 0);
- obstack_init (&frame_cache_obstack);
-
- current_frame = NULL; /* Invalidate cache */
- select_frame (NULL);
- annotate_frames_invalid ();
-}
-
-/* Flush the frame cache, and start a new one if necessary. */
-
-void
-reinit_frame_cache (void)
-{
- flush_cached_frames ();
-
- /* FIXME: The inferior_ptid test is wrong if there is a corefile. */
- if (PIDGET (inferior_ptid) != 0)
- {
- select_frame (get_current_frame ());
- }
-}
-
/* Return nonzero if the function for this frame lacks a prologue. Many
machines can define FRAMELESS_FUNCTION_INVOCATION to just call this
function. */
@@ -347,188 +196,6 @@ frameless_look_for_prologue (struct frame_info *frame)
return 0;
}
-/* Return a structure containing various interesting information
- about the frame that called NEXT_FRAME. Returns NULL
- if there is no such frame. */
-
-struct frame_info *
-get_prev_frame (struct frame_info *next_frame)
-{
- CORE_ADDR address = 0;
- struct frame_info *prev;
- int fromleaf = 0;
- char *name;
-
- /* If the requested entry is in the cache, return it.
- Otherwise, figure out what the address should be for the entry
- we're about to add to the cache. */
-
- if (!next_frame)
- {
-#if 0
- /* This screws value_of_variable, which just wants a nice clean
- NULL return from block_innermost_frame if there are no frames.
- I don't think I've ever seen this message happen otherwise.
- And returning NULL here is a perfectly legitimate thing to do. */
- if (!current_frame)
- {
- error ("You haven't set up a process's stack to examine.");
- }
-#endif
-
- return current_frame;
- }
-
- /* If we have the prev one, return it */
- if (next_frame->prev)
- return next_frame->prev;
-
- /* On some machines it is possible to call a function without
- setting up a stack frame for it. On these machines, we
- define this macro to take two args; a frameinfo pointer
- identifying a frame and a variable to set or clear if it is
- or isn't leafless. */
-
- /* Still don't want to worry about this except on the innermost
- frame. This macro will set FROMLEAF if NEXT_FRAME is a
- frameless function invocation. */
- if (!(next_frame->next))
- {
- fromleaf = FRAMELESS_FUNCTION_INVOCATION (next_frame);
- if (fromleaf)
- address = FRAME_FP (next_frame);
- }
-
- if (!fromleaf)
- {
- /* Two macros defined in tm.h specify the machine-dependent
- actions to be performed here.
- First, get the frame's chain-pointer.
- If that is zero, the frame is the outermost frame or a leaf
- called by the outermost frame. This means that if start
- calls main without a frame, we'll return 0 (which is fine
- anyway).
-
- Nope; there's a problem. This also returns when the current
- routine is a leaf of main. This is unacceptable. We move
- 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. */
- address = FRAME_CHAIN (next_frame);
-
- /* FIXME: cagney/2002-06-08: There should be two tests here.
- The first would check for a valid frame chain based on a user
- selectable policy. The default being ``stop at main'' (as
- implemented by generic_func_frame_chain_valid()). Other
- policies would be available - stop at NULL, .... The second
- test, if provided by the target architecture, would check for
- more exotic cases - most target architectures wouldn't bother
- with this second case. */
- if (!FRAME_CHAIN_VALID (address, next_frame))
- return 0;
- }
- if (address == 0)
- return 0;
-
- prev = (struct frame_info *)
- obstack_alloc (&frame_cache_obstack,
- sizeof (struct frame_info));
-
- /* Zero all fields by default. */
- memset (prev, 0, sizeof (struct frame_info));
-
- if (next_frame)
- next_frame->prev = prev;
- prev->next = next_frame;
- prev->frame = address;
- prev->level = next_frame->level + 1;
-
-/* This change should not be needed, FIXME! We should
- determine whether any targets *need* INIT_FRAME_PC to happen
- after INIT_EXTRA_FRAME_INFO and come up with a simple way to
- express what goes on here.
-
- INIT_EXTRA_FRAME_INFO is called from two places: create_new_frame
- (where the PC is already set up) and here (where it isn't).
- INIT_FRAME_PC is only called from here, always after
- INIT_EXTRA_FRAME_INFO.
-
- The catch is the MIPS, where INIT_EXTRA_FRAME_INFO requires the PC
- value (which hasn't been set yet). Some other machines appear to
- require INIT_EXTRA_FRAME_INFO before they can do INIT_FRAME_PC. Phoo.
-
- We shouldn't need INIT_FRAME_PC_FIRST to add more complication to
- an already overcomplicated part of GDB. gnu@cygnus.com, 15Sep92.
-
- Assuming that some machines need INIT_FRAME_PC after
- INIT_EXTRA_FRAME_INFO, one possible scheme:
-
- SETUP_INNERMOST_FRAME()
- Default version is just create_new_frame (read_fp ()),
- read_pc ()). Machines with extra frame info would do that (or the
- local equivalent) and then set the extra fields.
- SETUP_ARBITRARY_FRAME(argc, argv)
- Only change here is that create_new_frame would no longer init extra
- frame info; SETUP_ARBITRARY_FRAME would have to do that.
- INIT_PREV_FRAME(fromleaf, prev)
- Replace INIT_EXTRA_FRAME_INFO and INIT_FRAME_PC. This should
- also return a flag saying whether to keep the new frame, or
- whether to discard it, because on some machines (e.g. mips) it
- is really awkward to have FRAME_CHAIN_VALID called *before*
- INIT_EXTRA_FRAME_INFO (there is no good way to get information
- deduced in FRAME_CHAIN_VALID into the extra fields of the new frame).
- std_frame_pc(fromleaf, prev)
- This is the default setting for INIT_PREV_FRAME. It just does what
- the default INIT_FRAME_PC does. Some machines will call it from
- INIT_PREV_FRAME (either at the beginning, the end, or in the middle).
- Some machines won't use it.
- kingdon@cygnus.com, 13Apr93, 31Jan94, 14Dec94. */
-
- INIT_FRAME_PC_FIRST (fromleaf, prev);
-
- if (INIT_EXTRA_FRAME_INFO_P ())
- INIT_EXTRA_FRAME_INFO (fromleaf, prev);
-
- /* This entry is in the frame queue now, which is good since
- FRAME_SAVED_PC may use that queue to figure out its value
- (see tm-sparc.h). We want the pc saved in the inferior frame. */
- INIT_FRAME_PC (fromleaf, prev);
-
- /* If ->frame and ->pc are unchanged, we are in the process of getting
- ourselves into an infinite backtrace. Some architectures check this
- in FRAME_CHAIN or thereabouts, but it seems like there is no reason
- this can't be an architecture-independent check. */
- if (next_frame != NULL)
- {
- if (prev->frame == next_frame->frame
- && prev->pc == next_frame->pc)
- {
- next_frame->prev = NULL;
- obstack_free (&frame_cache_obstack, prev);
- return NULL;
- }
- }
-
- /* Initialize the code used to unwind the frame PREV based on the PC
- (and probably other architectural information). The PC lets you
- check things like the debug info at that point (dwarf2cfi?) and
- use that to decide how the frame should be unwound. */
- set_unwind_by_pc (prev->pc, prev->frame, &prev->register_unwind);
-
- find_pc_partial_function (prev->pc, &name,
- (CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
- if (PC_IN_SIGTRAMP (prev->pc, name))
- prev->signal_handler_caller = 1;
-
- return prev;
-}
-
-CORE_ADDR
-get_frame_pc (struct frame_info *frame)
-{
- return frame->pc;
-}
-
/* return the address of the PC for the given FRAME, ie the current PC value
if FRAME is the innermost frame, or the address adjusted to point to the
call instruction if not. */
@@ -550,34 +217,6 @@ frame_address_in_block (struct frame_info *frame)
return pc;
}
-#ifdef FRAME_FIND_SAVED_REGS
-/* XXX - deprecated. This is a compatibility function for targets
- that do not yet implement FRAME_INIT_SAVED_REGS. */
-/* Find the addresses in which registers are saved in FRAME. */
-
-void
-get_frame_saved_regs (struct frame_info *frame,
- struct frame_saved_regs *saved_regs_addr)
-{
- if (frame->saved_regs == NULL)
- {
- frame->saved_regs = (CORE_ADDR *)
- frame_obstack_alloc (SIZEOF_FRAME_SAVED_REGS);
- }
- if (saved_regs_addr == NULL)
- {
- struct frame_saved_regs saved_regs;
- FRAME_FIND_SAVED_REGS (frame, saved_regs);
- memcpy (frame->saved_regs, &saved_regs, SIZEOF_FRAME_SAVED_REGS);
- }
- else
- {
- FRAME_FIND_SAVED_REGS (frame, *saved_regs_addr);
- memcpy (frame->saved_regs, saved_regs_addr, SIZEOF_FRAME_SAVED_REGS);
- }
-}
-#endif
-
/* Return the innermost lexical block in execution
in a specified stack frame. The frame address is assumed valid.
@@ -1030,7 +669,7 @@ sigtramp_saved_pc (struct frame_info *frame)
{
CORE_ADDR sigcontext_addr;
char *buf;
- int ptrbytes = TARGET_PTR_BIT / TARGET_CHAR_BIT;
+ int ptrbytes = TYPE_LENGTH (builtin_type_void_func_ptr);
int sigcontext_offs = (2 * TARGET_INT_BIT) / TARGET_CHAR_BIT;
buf = alloca (ptrbytes);
@@ -1046,7 +685,7 @@ 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. */
target_read_memory (sigcontext_addr + SIGCONTEXT_PC_OFFSET, buf, ptrbytes);
- return extract_typed_address (buf, builtin_type_void_data_ptr);
+ return extract_typed_address (buf, builtin_type_void_func_ptr);
}
#endif /* SIGCONTEXT_PC_OFFSET */
@@ -1108,244 +747,6 @@ pc_in_call_dummy_at_entry_point (CORE_ADDR pc, CORE_ADDR sp,
}
-/*
- * GENERIC DUMMY FRAMES
- *
- * The following code serves to maintain the dummy stack frames for
- * inferior function calls (ie. when gdb calls into the inferior via
- * call_function_by_hand). This code saves the machine state before
- * the call in host memory, so we must maintain an independent stack
- * and keep it consistant etc. I am attempting to make this code
- * generic enough to be used by many targets.
- *
- * The cheapest and most generic way to do CALL_DUMMY on a new target
- * is probably to define CALL_DUMMY to be empty, CALL_DUMMY_LENGTH to
- * zero, and CALL_DUMMY_LOCATION to AT_ENTRY. Then you must remember
- * to define PUSH_RETURN_ADDRESS, because no call instruction will be
- * being executed by the target. Also FRAME_CHAIN_VALID as
- * generic_{file,func}_frame_chain_valid and FIX_CALL_DUMMY as
- * generic_fix_call_dummy. */
-
-/* Dummy frame. This saves the processor state just prior to setting
- up the inferior function call. Older targets save the registers
- on the target stack (but that really slows down function calls). */
-
-struct dummy_frame
-{
- struct dummy_frame *next;
-
- CORE_ADDR pc;
- CORE_ADDR fp;
- CORE_ADDR sp;
- CORE_ADDR top;
- struct regcache *regcache;
-
- /* Address range of the call dummy code. Look for PC in the range
- [LO..HI) (after allowing for DECR_PC_AFTER_BREAK). */
- CORE_ADDR call_lo;
- CORE_ADDR call_hi;
-};
-
-static struct dummy_frame *dummy_frame_stack = NULL;
-
-/* Function: find_dummy_frame(pc, fp, sp)
-
- Search the stack of dummy frames for one matching the given PC and
- FP/SP. Unlike PC_IN_CALL_DUMMY, this function doesn't need to
- adjust for DECR_PC_AFTER_BREAK. This is because it is only legal
- to call this function after the PC has been adjusted. */
-
-static struct regcache *
-generic_find_dummy_frame (CORE_ADDR pc, CORE_ADDR fp)
-{
- struct dummy_frame *dummyframe;
-
- for (dummyframe = dummy_frame_stack; dummyframe != NULL;
- dummyframe = dummyframe->next)
- {
- /* Does the PC fall within the dummy frame's breakpoint
- instruction. If not, discard this one. */
- if (!(pc >= dummyframe->call_lo && pc < dummyframe->call_hi))
- continue;
- /* Does the FP match? */
- if (dummyframe->top != 0)
- {
- /* If the target architecture explicitly saved the
- top-of-stack before the inferior function call, assume
- that that same architecture will always pass in an FP
- (frame base) value that eactly matches that saved TOS.
- Don't check the saved SP and SP as they can lead to false
- hits. */
- if (fp != dummyframe->top)
- continue;
- }
- else
- {
- /* An older target that hasn't explicitly or implicitly
- saved the dummy frame's top-of-stack. Try matching the
- 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(). */
- if (fp != dummyframe->fp && fp != dummyframe->sp)
- continue;
- }
- /* The FP matches this dummy frame. */
- return dummyframe->regcache;
- }
-
- return 0;
-}
-
-char *
-deprecated_generic_find_dummy_frame (CORE_ADDR pc, CORE_ADDR fp)
-{
- struct regcache *regcache = generic_find_dummy_frame (pc, fp);
- if (regcache == NULL)
- return NULL;
- return deprecated_grub_regcache_for_registers (regcache);
-}
-
-/* Function: pc_in_call_dummy (pc, sp, fp)
-
- Return true if the PC falls in a dummy frame created by gdb for an
- inferior call. The code below which allows DECR_PC_AFTER_BREAK is
- for infrun.c, which may give the function a PC without that
- subtracted out. */
-
-int
-generic_pc_in_call_dummy (CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR fp)
-{
- struct dummy_frame *dummyframe;
- for (dummyframe = dummy_frame_stack;
- dummyframe != NULL;
- dummyframe = dummyframe->next)
- {
- if ((pc >= dummyframe->call_lo)
- && (pc < dummyframe->call_hi + DECR_PC_AFTER_BREAK))
- return 1;
- }
- return 0;
-}
-
-/* Function: read_register_dummy
- Find a saved register from before GDB calls a function in the inferior */
-
-CORE_ADDR
-deprecated_read_register_dummy (CORE_ADDR pc, CORE_ADDR fp, int regno)
-{
- struct regcache *dummy_regs = generic_find_dummy_frame (pc, fp);
-
- if (dummy_regs)
- {
- /* NOTE: cagney/2002-08-12: Replaced a call to
- regcache_raw_read_as_address() with a call to
- regcache_cooked_read_unsigned(). The old, ...as_address
- function was eventually calling extract_unsigned_integer (via
- extract_address) to unpack the registers value. The below is
- doing an unsigned extract so that it is functionally
- equivalent. The read needs to be cooked as, otherwise, it
- will never correctly return the value of a register in the
- [NUM_REGS .. NUM_REGS+NUM_PSEUDO_REGS) range. */
- ULONGEST val;
- regcache_cooked_read_unsigned (dummy_regs, regno, &val);
- return val;
- }
- else
- return 0;
-}
-
-/* Save all the registers on the dummy frame stack. Most ports save the
- registers on the target stack. This results in lots of unnecessary memory
- references, which are slow when debugging via a serial line. Instead, we
- save all the registers internally, and never write them to the stack. The
- registers get restored when the called function returns to the entry point,
- where a breakpoint is laying in wait. */
-
-void
-generic_push_dummy_frame (void)
-{
- struct dummy_frame *dummy_frame;
- CORE_ADDR fp = (get_current_frame ())->frame;
-
- /* check to see if there are stale dummy frames,
- perhaps left over from when a longjump took us out of a
- function that was called by the debugger */
-
- dummy_frame = dummy_frame_stack;
- while (dummy_frame)
- if (INNER_THAN (dummy_frame->fp, fp)) /* stale -- destroy! */
- {
- dummy_frame_stack = dummy_frame->next;
- regcache_xfree (dummy_frame->regcache);
- xfree (dummy_frame);
- dummy_frame = dummy_frame_stack;
- }
- else
- dummy_frame = dummy_frame->next;
-
- dummy_frame = xmalloc (sizeof (struct dummy_frame));
- dummy_frame->regcache = regcache_xmalloc (current_gdbarch);
-
- dummy_frame->pc = read_pc ();
- dummy_frame->sp = read_sp ();
- dummy_frame->top = 0;
- dummy_frame->fp = fp;
- regcache_cpy (dummy_frame->regcache, current_regcache);
- dummy_frame->next = dummy_frame_stack;
- dummy_frame_stack = dummy_frame;
-}
-
-void
-generic_save_dummy_frame_tos (CORE_ADDR sp)
-{
- dummy_frame_stack->top = sp;
-}
-
-/* Record the upper/lower bounds on the address of the call dummy. */
-
-void
-generic_save_call_dummy_addr (CORE_ADDR lo, CORE_ADDR hi)
-{
- dummy_frame_stack->call_lo = lo;
- dummy_frame_stack->call_hi = hi;
-}
-
-/* Restore the machine state from either the saved dummy stack or a
- real stack frame. */
-
-void
-generic_pop_current_frame (void (*popper) (struct frame_info * frame))
-{
- struct frame_info *frame = get_current_frame ();
-
- if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
- generic_pop_dummy_frame ();
- else
- (*popper) (frame);
-}
-
-/* Function: pop_dummy_frame
- Restore the machine state from a saved dummy stack frame. */
-
-void
-generic_pop_dummy_frame (void)
-{
- struct dummy_frame *dummy_frame = dummy_frame_stack;
-
- /* FIXME: what if the first frame isn't the right one, eg..
- because one call-by-hand function has done a longjmp into another one? */
-
- if (!dummy_frame)
- error ("Can't pop dummy frame!");
- dummy_frame_stack = dummy_frame->next;
- regcache_cpy (current_regcache, dummy_frame->regcache);
- flush_cached_frames ();
-
- regcache_xfree (dummy_frame->regcache);
- xfree (dummy_frame);
-}
-
/* Function: frame_chain_valid
Returns true for a user frame or a call_function_by_hand dummy frame,
and false for the CRT0 start-up frame. Purpose is to terminate backtrace */
@@ -1374,256 +775,3 @@ generic_func_frame_chain_valid (CORE_ADDR fp, struct frame_info *fi)
&& !inside_entry_func ((fi)->pc));
}
-/* Function: fix_call_dummy
- Stub function. Generic dummy frames typically do not need to fix
- the frame being created */
-
-void
-generic_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
- struct value **args, struct type *type, int gcc_p)
-{
- return;
-}
-
-/* Given a call-dummy dummy-frame, return the registers. Here the
- register value is taken from the local copy of the register buffer. */
-
-static void
-generic_call_dummy_register_unwind (struct frame_info *frame, void **cache,
- int regnum, int *optimized,
- enum lval_type *lvalp, CORE_ADDR *addrp,
- int *realnum, void *bufferp)
-{
- gdb_assert (frame != NULL);
- gdb_assert (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame));
-
- /* Describe the register's location. Generic dummy frames always
- have the register value in an ``expression''. */
- *optimized = 0;
- *lvalp = not_lval;
- *addrp = 0;
- *realnum = -1;
-
- /* If needed, find and return the value of the register. */
- if (bufferp != NULL)
- {
- struct regcache *registers;
-#if 1
- /* Get the address of the register buffer that contains all the
- saved registers for this dummy frame. Cache that address. */
- registers = (*cache);
- if (registers == NULL)
- {
- registers = generic_find_dummy_frame (frame->pc, frame->frame);
- (*cache) = registers;
- }
-#else
- /* Get the address of the register buffer that contains the
- saved registers and then extract the value from that. */
- registers = generic_find_dummy_frame (frame->pc, frame->frame);
-#endif
- gdb_assert (registers != NULL);
- /* Return the actual value. */
- /* Use the regcache_cooked_read() method so that it, on the fly,
- constructs either a raw or pseudo register from the raw
- register cache. */
- regcache_cooked_read (registers, regnum, bufferp);
- }
-}
-
-/* Return the register saved in the simplistic ``saved_regs'' cache.
- If the value isn't here AND a value is needed, try the next inner
- most frame. */
-
-static void
-frame_saved_regs_register_unwind (struct frame_info *frame, void **cache,
- int regnum, int *optimizedp,
- enum lval_type *lvalp, CORE_ADDR *addrp,
- int *realnump, void *bufferp)
-{
- /* There is always a frame at this point. And THIS is the frame
- we're interested in. */
- gdb_assert (frame != NULL);
- /* If we're using generic dummy frames, we'd better not be in a call
- dummy. (generic_call_dummy_register_unwind ought to have been called
- instead.) */
- gdb_assert (!(USE_GENERIC_DUMMY_FRAMES
- && PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame)));
-
- /* Load the saved_regs register cache. */
- if (frame->saved_regs == NULL)
- FRAME_INIT_SAVED_REGS (frame);
-
- if (frame->saved_regs != NULL
- && frame->saved_regs[regnum] != 0)
- {
- if (regnum == SP_REGNUM)
- {
- /* SP register treated specially. */
- *optimizedp = 0;
- *lvalp = not_lval;
- *addrp = 0;
- *realnump = -1;
- if (bufferp != NULL)
- store_address (bufferp, REGISTER_RAW_SIZE (regnum),
- frame->saved_regs[regnum]);
- }
- else
- {
- /* Any other register is saved in memory, fetch it but cache
- a local copy of its value. */
- *optimizedp = 0;
- *lvalp = lval_memory;
- *addrp = frame->saved_regs[regnum];
- *realnump = -1;
- if (bufferp != NULL)
- {
-#if 1
- /* Save each register value, as it is read in, in a
- frame based cache. */
- void **regs = (*cache);
- if (regs == NULL)
- {
- int sizeof_cache = ((NUM_REGS + NUM_PSEUDO_REGS)
- * sizeof (void *));
- regs = frame_obstack_alloc (sizeof_cache);
- memset (regs, 0, sizeof_cache);
- (*cache) = regs;
- }
- if (regs[regnum] == NULL)
- {
- regs[regnum]
- = frame_obstack_alloc (REGISTER_RAW_SIZE (regnum));
- read_memory (frame->saved_regs[regnum], regs[regnum],
- REGISTER_RAW_SIZE (regnum));
- }
- memcpy (bufferp, regs[regnum], REGISTER_RAW_SIZE (regnum));
-#else
- /* Read the value in from memory. */
- read_memory (frame->saved_regs[regnum], bufferp,
- REGISTER_RAW_SIZE (regnum));
-#endif
- }
- }
- return;
- }
-
- /* No luck, assume this and the next frame have the same register
- value. If a value is needed, pass the request on down the chain;
- otherwise just return an indication that the value is in the same
- register as the next frame. */
- if (bufferp == NULL)
- {
- *optimizedp = 0;
- *lvalp = lval_register;
- *addrp = 0;
- *realnump = regnum;
- }
- else
- {
- frame_register_unwind (frame->next, regnum, optimizedp, lvalp, addrp,
- realnump, bufferp);
- }
-}
-
-/* Function: get_saved_register
- Find register number REGNUM relative to FRAME and put its (raw,
- target format) contents in *RAW_BUFFER.
-
- Set *OPTIMIZED if the variable was optimized out (and thus can't be
- fetched). Note that this is never set to anything other than zero
- in this implementation.
-
- Set *LVAL to lval_memory, lval_register, or not_lval, depending on
- whether the value was fetched from memory, from a register, or in a
- strange and non-modifiable way (e.g. a frame pointer which was
- calculated rather than fetched). We will use not_lval for values
- fetched from generic dummy frames.
-
- Set *ADDRP to the address, either in memory or as a REGISTER_BYTE
- offset into the registers array. If the value is stored in a dummy
- frame, set *ADDRP to zero.
-
- To use this implementation, define a function called
- "get_saved_register" in your target code, which simply passes all
- of its arguments to this function.
-
- The argument RAW_BUFFER must point to aligned memory. */
-
-void
-generic_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;
-
- /* Note: since the current frame's registers could only have been
- saved by frames INTERIOR TO the current frame, we skip examining
- the current frame itself: otherwise, we would be getting the
- previous frame's registers which were saved by the current frame. */
-
- while (frame && ((frame = frame->next) != NULL))
- {
- if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
- {
- if (lval) /* found it in a CALL_DUMMY frame */
- *lval = not_lval;
- if (raw_buffer)
- /* FIXME: cagney/2002-06-26: This should be via the
- gdbarch_register_read() method so that it, on the fly,
- constructs either a raw or pseudo register from the raw
- register cache. */
- regcache_raw_read (generic_find_dummy_frame (frame->pc,
- frame->frame),
- regnum, raw_buffer);
- return;
- }
-
- FRAME_INIT_SAVED_REGS (frame);
- if (frame->saved_regs != NULL
- && frame->saved_regs[regnum] != 0)
- {
- if (lval) /* found it saved on the stack */
- *lval = lval_memory;
- if (regnum == SP_REGNUM)
- {
- if (raw_buffer) /* SP register treated specially */
- store_address (raw_buffer, REGISTER_RAW_SIZE (regnum),
- frame->saved_regs[regnum]);
- }
- else
- {
- if (addrp) /* any other register */
- *addrp = frame->saved_regs[regnum];
- if (raw_buffer)
- read_memory (frame->saved_regs[regnum], raw_buffer,
- REGISTER_RAW_SIZE (regnum));
- }
- return;
- }
- }
-
- /* If we get thru the loop to this point, it means the register was
- not saved in any frame. Return the actual live-register value. */
-
- if (lval) /* found it in a live register */
- *lval = lval_register;
- if (addrp)
- *addrp = REGISTER_BYTE (regnum);
- if (raw_buffer)
- read_register_gen (regnum, raw_buffer);
-}
-
-void
-_initialize_blockframe (void)
-{
- obstack_init (&frame_cache_obstack);
-}
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index c5c91cc..fed39be 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -1690,7 +1690,7 @@ breakpoint_inserted_here_p (CORE_ADDR pc)
bp_call_dummy breakpoint. */
int
-frame_in_dummy (struct frame_info *frame)
+deprecated_frame_in_dummy (struct frame_info *frame)
{
struct breakpoint *b;
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index 226703b..3abdca7 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -528,7 +528,16 @@ extern enum breakpoint_here breakpoint_here_p (CORE_ADDR);
extern int breakpoint_inserted_here_p (CORE_ADDR);
-extern int frame_in_dummy (struct frame_info *);
+/* FIXME: cagney/2002-11-10: The current [generic] dummy-frame code
+ implements a functional superset of this function. The only reason
+ it hasn't been removed is because some architectures still don't
+ use the new framework. Once they have been fixed, this can go. */
+/* FIXME: cagney/2002-11-10: There should be a function (hmm,
+ something like, enum { NORMAL_FRAME, DUMMY_FRAME, SIGTRAMP_FRAME }
+ get_frame_type() ...) that the caller can use to determine the
+ frame's type. This could replace this function, PC_IN_CALL_DUMMY,
+ and fi->signal_handler_caller. */
+extern int deprecated_frame_in_dummy (struct frame_info *);
extern int breakpoint_thread_match (CORE_ADDR, ptid_t);
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index b786536..d9fb7dd 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -31,7 +31,7 @@
#include "gdb_obstack.h"
#include "symtab.h"
#include "block.h"
-#include "symfile.h" /* Needed for "struct complaint", obsavestring */
+#include "symfile.h"
#include "objfiles.h"
#include "gdbtypes.h"
#include "complaints.h"
@@ -91,19 +91,19 @@ static struct using_direct_node *copy_usings_to_obstack (struct
/* Complaints about the symbols we have encountered. */
-struct complaint block_end_complaint =
+struct deprecated_complaint block_end_complaint =
{"block end address less than block start address in %s (patched it)", 0, 0};
-struct complaint anon_block_end_complaint =
+struct deprecated_complaint anon_block_end_complaint =
{"block end address 0x%lx less than block start address 0x%lx (patched it)", 0, 0};
-struct complaint innerblock_complaint =
+struct deprecated_complaint innerblock_complaint =
{"inner block not inside outer block in %s", 0, 0};
-struct complaint innerblock_anon_complaint =
+struct deprecated_complaint innerblock_anon_complaint =
{"inner block (0x%lx-0x%lx) not inside outer block (0x%lx-0x%lx)", 0, 0};
-struct complaint blockvector_complaint =
+struct deprecated_complaint blockvector_complaint =
{"block at %s out of order", 0, 0};
/* maintain the lists of symbols and blocks */
@@ -981,7 +981,7 @@ end_symtab (CORE_ADDR end_addr, struct objfile *objfile, int section)
same. FIXME: Find out why it is happening. This is not
believed to happen in most cases (even for coffread.c);
it used to be an abort(). */
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"Context stack not empty in end_symtab", 0, 0};
complain (&msg);
context_stack_depth = 0;
diff --git a/gdb/buildsym.h b/gdb/buildsym.h
index 6229e06..7249ab8 100644
--- a/gdb/buildsym.h
+++ b/gdb/buildsym.h
@@ -192,6 +192,9 @@ EXTERN int context_stack_size;
#define pop_context() (&context_stack[--context_stack_depth]);
+/* Non-zero if the context stack is empty. */
+#define outermost_context_p() (context_stack_depth == 0)
+
/* Nonzero if within a function (so symbols should be local, if
nothing says specifically). */
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index 94d29ba..91414cb 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -248,9 +248,11 @@ exp1 : exp
/* Expressions, not including the comma operator. */
exp : '*' exp %prec UNARY
{ write_exp_elt_opcode (UNOP_IND); }
+ ;
exp : '&' exp %prec UNARY
{ write_exp_elt_opcode (UNOP_ADDR); }
+ ;
exp : '-' exp %prec UNARY
{ write_exp_elt_opcode (UNOP_NEG); }
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index c44975a..9d58291 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -27,10 +27,13 @@
#include "gdb_string.h"
#include "linespec.h"
#include "expression.h"
+#include "frame.h"
+#include "value.h"
#include "language.h"
#include "filenames.h" /* for DOSish file names */
#include "objfiles.h"
#include "source.h"
+#include "disasm.h"
#include "ui-out.h"
@@ -819,6 +822,92 @@ list_command (char *arg, int from_tty)
0);
}
+/* Dump a specified section of assembly code. With no command line
+ arguments, this command will dump the assembly code for the
+ function surrounding the pc value in the selected frame. With one
+ argument, it will dump the assembly code surrounding that pc value.
+ Two arguments are interpeted as bounds within which to dump
+ assembly. */
+
+/* ARGSUSED */
+static void
+disassemble_command (char *arg, int from_tty)
+{
+ CORE_ADDR low, high;
+ char *name;
+ CORE_ADDR pc, pc_masked;
+ char *space_index;
+#if 0
+ asection *section;
+#endif
+
+ name = NULL;
+ if (!arg)
+ {
+ if (!selected_frame)
+ error ("No frame selected.\n");
+
+ pc = get_frame_pc (selected_frame);
+ if (find_pc_partial_function (pc, &name, &low, &high) == 0)
+ error ("No function contains program counter for selected frame.\n");
+#if defined(TUI)
+ else if (tui_version)
+ low = tuiGetLowDisassemblyAddress (low, pc);
+#endif
+ low += FUNCTION_START_OFFSET;
+ }
+ else if (!(space_index = (char *) strchr (arg, ' ')))
+ {
+ /* One argument. */
+ pc = parse_and_eval_address (arg);
+ if (find_pc_partial_function (pc, &name, &low, &high) == 0)
+ error ("No function contains specified address.\n");
+#if defined(TUI)
+ else if (tui_version)
+ low = tuiGetLowDisassemblyAddress (low, pc);
+#endif
+ low += FUNCTION_START_OFFSET;
+ }
+ else
+ {
+ /* Two arguments. */
+ *space_index = '\0';
+ low = parse_and_eval_address (arg);
+ high = parse_and_eval_address (space_index + 1);
+ }
+
+#if defined(TUI)
+ if (!tui_is_window_visible (DISASSEM_WIN))
+#endif
+ {
+ printf_filtered ("Dump of assembler code ");
+ if (name != NULL)
+ {
+ printf_filtered ("for function %s:\n", name);
+ }
+ else
+ {
+ printf_filtered ("from ");
+ print_address_numeric (low, 1, gdb_stdout);
+ printf_filtered (" to ");
+ print_address_numeric (high, 1, gdb_stdout);
+ printf_filtered (":\n");
+ }
+
+ /* Dump the specified range. */
+ gdb_disassembly (uiout, 0, 0, 0, -1, low, high);
+
+ printf_filtered ("End of assembler dump.\n");
+ gdb_flush (gdb_stdout);
+ }
+#if defined(TUI)
+ else
+ {
+ tui_show_assembly (low);
+ }
+#endif
+}
+
static void
make_command (char *arg, int from_tty)
{
@@ -1157,6 +1246,14 @@ With two args if one is empty it stands for ten lines away from the other arg.",
if (dbx_commands)
add_com_alias ("file", "list", class_files, 1);
+ c = add_com ("disassemble", class_vars, disassemble_command,
+ "Disassemble a specified section of memory.\n\
+Default is the function surrounding the pc of the selected frame.\n\
+With a single argument, the function surrounding that address is dumped.\n\
+Two arguments are taken as a range of memory to dump.");
+ set_cmd_completer (c, location_completer);
+ if (xdb_commands)
+ add_com_alias ("va", "disassemble", class_xdb, 0);
/* NOTE: cagney/2000-03-20: Being able to enter ``(gdb) !ls'' would
be a really useful feature. Unfortunately, the below wont do
diff --git a/gdb/coffread.c b/gdb/coffread.c
index ff0f396..a6f615a 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -126,37 +126,37 @@ static struct symbol *opaque_type_chain[HASHSIZE];
/* Complaints about various problems in the file being read */
-struct complaint ef_complaint =
+struct deprecated_complaint ef_complaint =
{"Unmatched .ef symbol(s) ignored starting at symnum %d", 0, 0};
-struct complaint ef_stack_complaint =
+struct deprecated_complaint ef_stack_complaint =
{"`.ef' symbol without matching `.bf' symbol ignored starting at symnum %d", 0, 0};
-struct complaint eb_stack_complaint =
+struct deprecated_complaint eb_stack_complaint =
{"`.eb' symbol without matching `.bb' symbol ignored starting at symnum %d", 0, 0};
-struct complaint bf_no_aux_complaint =
+struct deprecated_complaint bf_no_aux_complaint =
{"`.bf' symbol %d has no aux entry", 0, 0};
-struct complaint ef_no_aux_complaint =
+struct deprecated_complaint ef_no_aux_complaint =
{"`.ef' symbol %d has no aux entry", 0, 0};
-struct complaint lineno_complaint =
+struct deprecated_complaint lineno_complaint =
{"Line number pointer %d lower than start of line numbers", 0, 0};
-struct complaint unexpected_type_complaint =
+struct deprecated_complaint unexpected_type_complaint =
{"Unexpected type for symbol %s", 0, 0};
-struct complaint bad_sclass_complaint =
+struct deprecated_complaint bad_sclass_complaint =
{"Bad n_sclass for symbol %s", 0, 0};
-struct complaint misordered_blocks_complaint =
+struct deprecated_complaint misordered_blocks_complaint =
{"Blocks out of order at address %x", 0, 0};
-struct complaint tagndx_bad_complaint =
+struct deprecated_complaint tagndx_bad_complaint =
{"Symbol table entry for %s has bad tagndx value", 0, 0};
-struct complaint eb_complaint =
+struct deprecated_complaint eb_complaint =
{"Mismatched .eb symbol ignored starting at symnum %d", 0, 0};
/* Simplified internal version of coff symbol table information */
@@ -1990,6 +1990,7 @@ coff_read_struct_type (int index, int length, int lastsym)
FIELD_TYPE (list->field) = decode_type (ms, ms->c_type, &sub_aux);
FIELD_BITPOS (list->field) = 8 * ms->c_value;
FIELD_BITSIZE (list->field) = 0;
+ FIELD_STATIC_KIND (list->field) = 0;
nfields++;
break;
@@ -2008,6 +2009,7 @@ coff_read_struct_type (int index, int length, int lastsym)
FIELD_TYPE (list->field) = decode_type (ms, ms->c_type, &sub_aux);
FIELD_BITPOS (list->field) = ms->c_value;
FIELD_BITSIZE (list->field) = sub_aux.x_sym.x_misc.x_lnsz.x_size;
+ FIELD_STATIC_KIND (list->field) = 0;
nfields++;
break;
@@ -2128,6 +2130,7 @@ coff_read_enum_type (int index, int length, int lastsym)
if (SYMBOL_VALUE (xsym) < 0)
unsigned_enum = 0;
TYPE_FIELD_BITSIZE (type, n) = 0;
+ TYPE_FIELD_STATIC_KIND (type, n) = 0;
}
if (syms == osyms)
break;
diff --git a/gdb/complaints.c b/gdb/complaints.c
index 84cf6a2..b4c55da 100644
--- a/gdb/complaints.c
+++ b/gdb/complaints.c
@@ -250,7 +250,7 @@ internal_complaint (struct complaints **complaints, const char *file,
}
void
-complain (struct complaint *complaint, ...)
+complain (struct deprecated_complaint *complaint, ...)
{
va_list args;
va_start (args, complaint);
diff --git a/gdb/complaints.h b/gdb/complaints.h
index c176b19..159dcd1 100644
--- a/gdb/complaints.h
+++ b/gdb/complaints.h
@@ -50,9 +50,15 @@ extern void clear_complaints (struct complaints **complaints,
int less_verbose, int noisy);
-/* Legacy interfaces to keep the old code working (until it is all
- converted to the above). While the structure below contains a
- number of fields, all but .message are ignored.
+/* Deprecated interfaces to keep the old code working (until it is all
+ converted to the above). Existing code such as:
+
+ struct deprecated_complaint msg = { "msg", 0, 0 };
+ complaint (&msg);
+
+ should be replaced by:
+
+ complaint (&symtab_complaints, __FILE__, __LINE__, "msg");
Support for complaining about things in the symbol file that aren't
catastrophic.
@@ -61,13 +67,13 @@ extern void clear_complaints (struct complaints **complaints,
during a symbol read, we report it. At the end of symbol reading,
if verbose, we report how many of each problem we had. */
-struct complaint
+struct deprecated_complaint
{
const char *message;
unsigned counter_ignored;
- struct complaint *next_ignored;
+ struct deprecated_complaint *next_ignored;
};
-extern void complain (struct complaint *, ...);
+extern void complain (struct deprecated_complaint *, ...);
#endif /* !defined (COMPLAINTS_H) */
diff --git a/gdb/config.in b/gdb/config.in
index 8c1c7bf..fa1ab9a 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -1,4 +1,4 @@
-/* config.in. Generated automatically from configure.in by autoheader 2.13. */
+/* config.in. Generated automatically from configure.in by autoheader. */
/* Define if on AIX 3.
System headers sometimes define this.
@@ -514,3 +514,6 @@
/* Define if <sys/procfs.h> has pr_siginfo64_t. */
#undef HAVE_PR_SIGINFO64_T
+/* Define if <thread_db.h> has the TD_NOTALLOC error code. */
+#undef THREAD_DB_HAS_TD_NOTALLOC
+
diff --git a/gdb/config/djgpp/fnchange.lst b/gdb/config/djgpp/fnchange.lst
index 4d9fa83..046b065 100644
--- a/gdb/config/djgpp/fnchange.lst
+++ b/gdb/config/djgpp/fnchange.lst
@@ -136,6 +136,8 @@
@V@/gdb/i386gnu-tdep.c @V@/gdb/i3gnu-tdep.c
@V@/gdb/i386nbsd-nat.c @V@/gdb/i3nbsd-nat.c
@V@/gdb/i386nbsd-tdep.c @V@/gdb/i3nbsd-tdep.c
+@V@/gdb/i386obsd-nat.c @V@/gdb/i3obsd-nat.c
+@V@/gdb/i386obsd-tdep.c @V@/gdb/i3obsd-tdep.c
@V@/gdb/ia64-aix-nat.c @V@/gdb/ia64aix-nat.c
@V@/gdb/ia64-linux-nat.c @V@/gdb/ia64linux-nat.c
@V@/gdb/jv-exp.tab.c @V@/gdb/jv-exp_tab.c
@@ -209,6 +211,11 @@
@V@/gdb/testsuite/gdb.c++/demangle.exp @V@/gdb/testsuite/gdb.cxx/demangle.exp
@V@/gdb/testsuite/gdb.c++/derivation.cc @V@/gdb/testsuite/gdb.cxx/derivation.cc
@V@/gdb/testsuite/gdb.c++/derivation.exp @V@/gdb/testsuite/gdb.cxx/derivation.exp
+@V@/gdb/testsuite/gdb.c++/hang.H @V@/gdb/testsuite/gdb.cxx/hang.h
+@V@/gdb/testsuite/gdb.c++/hang.exp @V@/gdb/testsuite/gdb.cxx/hang.exp
+@V@/gdb/testsuite/gdb.c++/hang1.C @V@/gdb/testsuite/gdb.cxx/hang1.c
+@V@/gdb/testsuite/gdb.c++/hang2.C @V@/gdb/testsuite/gdb.cxx/hang2.c
+@V@/gdb/testsuite/gdb.c++/hang3.C @V@/gdb/testsuite/gdb.cxx/hang3.c
@V@/gdb/testsuite/gdb.c++/inherit.exp @V@/gdb/testsuite/gdb.cxx/inherit.exp
@V@/gdb/testsuite/gdb.c++/local.cc @V@/gdb/testsuite/gdb.cxx/local.cc
@V@/gdb/testsuite/gdb.c++/local.exp @V@/gdb/testsuite/gdb.cxx/local.exp
@@ -220,6 +227,10 @@
@V@/gdb/testsuite/gdb.c++/member-ptr.exp @V@/gdb/testsuite/gdb.cxx/member-ptr.exp
@V@/gdb/testsuite/gdb.c++/method.cc @V@/gdb/testsuite/gdb.cxx/method.cc
@V@/gdb/testsuite/gdb.c++/method.exp @V@/gdb/testsuite/gdb.cxx/method.exp
+@V@/gdb/testsuite/gdb.c++/m-data.cc @V@/gdb/testsuite/gdb.cxx/m-data.cc
+@V@/gdb/testsuite/gdb.c++/m-data.exp @V@/gdb/testsuite/gdb.cxx/m-data.exp
+@V@/gdb/testsuite/gdb.c++/m-static.cc @V@/gdb/testsuite/gdb.cxx/m-static.cc
+@V@/gdb/testsuite/gdb.c++/m-static.exp @V@/gdb/testsuite/gdb.cxx/m-static.exp
@V@/gdb/testsuite/gdb.c++/misc.cc @V@/gdb/testsuite/gdb.cxx/misc.cc
@V@/gdb/testsuite/gdb.c++/misc.exp @V@/gdb/testsuite/gdb.cxx/misc.exp
@V@/gdb/testsuite/gdb.c++/namespace.cc @V@/gdb/testsuite/gdb.cxx/namespace.cc
@@ -232,6 +243,8 @@
@V@/gdb/testsuite/gdb.c++/ref-types.exp @V@/gdb/testsuite/gdb.cxx/ref-types.exp
@V@/gdb/testsuite/gdb.c++/templates.cc @V@/gdb/testsuite/gdb.cxx/templates.cc
@V@/gdb/testsuite/gdb.c++/templates.exp @V@/gdb/testsuite/gdb.cxx/templates.exp
+@V@/gdb/testsuite/gdb.c++/try_catch.cc @V@/gdb/testsuite/gdb.cxx/try_catch.cc
+@V@/gdb/testsuite/gdb.c++/try_catch.exp @V@/gdb/testsuite/gdb.cxx/try_catch.exp
@V@/gdb/testsuite/gdb.c++/userdef.cc @V@/gdb/testsuite/gdb.cxx/userdef.cc
@V@/gdb/testsuite/gdb.c++/userdef.exp @V@/gdb/testsuite/gdb.cxx/userdef.exp
@V@/gdb/testsuite/gdb.c++/virtfunc.cc @V@/gdb/testsuite/gdb.cxx/virtfunc.cc
diff --git a/gdb/config/h8500/tm-h8500.h b/gdb/config/h8500/tm-h8500.h
index 30acdbe..8c4ae45 100644
--- a/gdb/config/h8500/tm-h8500.h
+++ b/gdb/config/h8500/tm-h8500.h
@@ -1,6 +1,7 @@
/* Parameters for execution on a H8/500 series machine.
- Copyright 1993, 1994, 1995, 1998, 1999, 2000, 2001
- Free Software Foundation, Inc.
+
+ Copyright 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2002 Free
+ Software Foundation, Inc.
This file is part of GDB.
@@ -169,7 +170,7 @@ extern struct type *h8500_register_virtual_type (int regno);
of type TYPE, given in virtual format. */
#define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) \
- write_register_bytes (0, VALBUF, TYPE_LENGTH (TYPE))
+ deprecated_write_register_bytes (0, VALBUF, TYPE_LENGTH (TYPE))
/* Extract from an array REGBUF containing the (raw) register state
the address in which a function should return its structure value,
@@ -253,8 +254,9 @@ extern CORE_ADDR h8500_addr_bits_remove (CORE_ADDR);
#define read_memory_short(x) (read_memory_integer(x,2) & 0xffff)
-#define PRINT_REGISTER_HOOK(regno) print_register_hook(regno)
-extern void print_register_hook (int);
+extern void h8500_do_registers_info (int regnum, int all);
+#define DEPRECATED_DO_REGISTERS_INFO(REGNUM,ALL) \
+ h8500_do_registers_info (REGNUM, ALL)
extern int minimum_mode;
diff --git a/gdb/config/i386/i386v42mp.mt b/gdb/config/i386/i386v42mp.mt
index 0b2dea8..1a0ac88 100644
--- a/gdb/config/i386/i386v42mp.mt
+++ b/gdb/config/i386/i386v42mp.mt
@@ -1,3 +1,3 @@
# Target: Intel 386 running SVR4.2MP
TDEPFILES= i386-tdep.o i387-tdep.o
-TM_FILE= tm-i386v42mp.h
+TM_FILE= tm-i386.h
diff --git a/gdb/config/i386/nm-i386v42mp.h b/gdb/config/i386/nm-i386v42mp.h
index 7ded361..f6fced5 100644
--- a/gdb/config/i386/nm-i386v42mp.h
+++ b/gdb/config/i386/nm-i386v42mp.h
@@ -20,4 +20,73 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifndef NM_I386V42MP_H
+#define NM_I386V42MP_H
+
#include "config/nm-sysv4.h"
+
+/* define to select for other sysv4.2mp weirdness (see procfs.c) */
+
+#define UNIXWARE
+
+#if 0
+/* The following macros extract process and lwp/thread ids from a
+ composite id.
+
+ For consistency with UnixWare core files, allocate bits 0-15 for
+ process ids and bits 16 and up for lwp ids. Reserve bit 31 for
+ negative return values to indicate exceptions, and use bit 30 as a
+ flag to indicate a user-mode thread, leaving 14 bits for lwp
+ ids. */
+
+/* Number of bits in composite id allocated to process number. */
+#define PIDBITS 16
+
+/* Return the process id stored in composite PID. */
+#define PIDGET(PID) (((PID) & ((1 << PIDBITS) - 1)))
+
+/* Return the thread or lwp id stored in composite PID. */
+#define TIDGET(PID) (((PID) & 0x3fffffff) >> PIDBITS)
+#define LIDGET(PID) TIDGET(PID)
+
+/* Construct a composite id from lwp LID and the process portion of
+ composite PID. */
+#define MERGEPID(PID, LID) (PIDGET(PID) | ((LID) << PIDBITS))
+#define MKLID(PID, LID) MERGEPID(PID, LID)
+
+/* Construct a composite id from thread TID and the process portion of
+ composite PID. */
+#define MKTID(PID, TID) (MERGEPID(PID, TID) | 0x40000000)
+
+/* Return whether PID contains a user-space thread id. */
+#define ISTID(PID) ((PID) & 0x40000000)
+#endif
+
+/* New definitions of the ptid stuff. Due to the way the
+ code is structured in uw-thread.c, I'm overloading the thread id
+ and lwp id onto the lwp field. The tid field is used to indicate
+ whether the lwp is a tid or not.
+
+ FIXME: Check that core file support is not broken. (See original
+ #if 0'd comments above.)
+ FIXME: Restructure uw-thread.c so that the struct ptid fields
+ can be used as intended. */
+
+/* Return the process id stored in composite PID. */
+#define PIDGET(PID) (ptid_get_pid (PID))
+
+/* Return the thread or lwp id stored in composite PID. */
+#define TIDGET(PID) (ptid_get_lwp (PID))
+#define LIDGET(PID) TIDGET(PID)
+
+#define MERGEPID(PID, LID) (ptid_build ((PID), (LID), 0))
+#define MKLID(PID, LID) (ptid_build ((PID), (LID), 0))
+
+/* Construct a composite id from thread TID and the process portion of
+ composite PID. */
+#define MKTID(PID, TID) (ptid_build ((PID), (TID), 1))
+
+/* Return whether PID contains a user-space thread id. */
+#define ISTID(PID) (ptid_get_tid (PID))
+
+#endif /* NM_I386V42MP_H */
diff --git a/gdb/config/i386/nm-linux.h b/gdb/config/i386/nm-linux.h
index 073c3a3..ad57124 100644
--- a/gdb/config/i386/nm-linux.h
+++ b/gdb/config/i386/nm-linux.h
@@ -39,9 +39,6 @@ extern int kernel_u_size (void);
the core file of the register values. */
#define KERNEL_U_ADDR 0
-/* Offset of the registers within the user area. */
-#define U_REGS_OFFSET 0
-
extern CORE_ADDR register_u_addr (CORE_ADDR blockend, int regnum);
#define REGISTER_U_ADDR(addr, blockend, regnum) \
(addr) = register_u_addr (blockend, regnum)
diff --git a/gdb/config/i386/nm-ptx4.h b/gdb/config/i386/nm-ptx4.h
index 253b194..9c8f41c 100644
--- a/gdb/config/i386/nm-ptx4.h
+++ b/gdb/config/i386/nm-ptx4.h
@@ -38,7 +38,7 @@
/* We must fetch all the regs before storing, since we store all at once. */
-#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
+#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, REGISTER_BYTES)
#define CHILD_WAIT
struct target_waitstatus;
diff --git a/gdb/config/i386/nm-symmetry.h b/gdb/config/i386/nm-symmetry.h
index a589a3d..d3f57e6 100644
--- a/gdb/config/i386/nm-symmetry.h
+++ b/gdb/config/i386/nm-symmetry.h
@@ -28,7 +28,7 @@
/* We must fetch all the regs before storing, since we store all at once. */
-#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
+#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, REGISTER_BYTES)
#ifdef _SEQUENT_
#define CHILD_WAIT
diff --git a/gdb/config/i386/tm-i386v42mp.h b/gdb/config/i386/tm-i386v42mp.h
deleted file mode 100644
index 527fdbb..0000000
--- a/gdb/config/i386/tm-i386v42mp.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/* Macro definitions for GDB on an Intel i386 running SVR4.2MP
- Copyright 1991, 1994, 1997, 1999, 2000 Free Software Foundation, Inc.
- Written by Fred Fish at Cygnus Support (fnf@cygnus.com)
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef TM_I386V42MP_H
-#define TM_I386V42MP_H 1
-
-/* pick up more generic x86 sysv4 stuff */
-
-#include "i386/tm-i386.h"
-
-/* define to select for other sysv4.2mp weirdness (see procfs.c) */
-
-#define UNIXWARE
-
-#if 0
-/* The following macros extract process and lwp/thread ids from a
- composite id.
-
- For consistency with UnixWare core files, allocate bits 0-15 for
- process ids and bits 16 and up for lwp ids. Reserve bit 31 for
- negative return values to indicate exceptions, and use bit 30 as a
- flag to indicate a user-mode thread, leaving 14 bits for lwp
- ids. */
-
-/* Number of bits in composite id allocated to process number. */
-#define PIDBITS 16
-
-/* Return the process id stored in composite PID. */
-#define PIDGET(PID) (((PID) & ((1 << PIDBITS) - 1)))
-
-/* Return the thread or lwp id stored in composite PID. */
-#define TIDGET(PID) (((PID) & 0x3fffffff) >> PIDBITS)
-#define LIDGET(PID) TIDGET(PID)
-
-/* Construct a composite id from lwp LID and the process portion of
- composite PID. */
-#define MERGEPID(PID, LID) (PIDGET(PID) | ((LID) << PIDBITS))
-#define MKLID(PID, LID) MERGEPID(PID, LID)
-
-/* Construct a composite id from thread TID and the process portion of
- composite PID. */
-#define MKTID(PID, TID) (MERGEPID(PID, TID) | 0x40000000)
-
-/* Return whether PID contains a user-space thread id. */
-#define ISTID(PID) ((PID) & 0x40000000)
-#endif
-
-/* New definitions of the ptid stuff. Due to the way the
- code is structured in uw-thread.c, I'm overloading the thread id
- and lwp id onto the lwp field. The tid field is used to indicate
- whether the lwp is a tid or not.
-
- FIXME: Check that core file support is not broken. (See original
- #if 0'd comments above.)
- FIXME: Restructure uw-thread.c so that the struct ptid fields
- can be used as intended. */
-
-/* Return the process id stored in composite PID. */
-#define PIDGET(PID) (ptid_get_pid (PID))
-
-/* Return the thread or lwp id stored in composite PID. */
-#define TIDGET(PID) (ptid_get_lwp (PID))
-#define LIDGET(PID) TIDGET(PID)
-
-#define MERGEPID(PID, LID) (ptid_build ((PID), (LID), 0))
-#define MKLID(PID, LID) (ptid_build ((PID), (LID), 0))
-
-/* Construct a composite id from thread TID and the process portion of
- composite PID. */
-#define MKTID(PID, TID) (ptid_build ((PID), (TID), 1))
-
-/* Return whether PID contains a user-space thread id. */
-#define ISTID(PID) (ptid_get_tid (PID))
-
-#endif /* ifndef TM_I386V42MP_H */
diff --git a/gdb/config/m32r/tm-m32r.h b/gdb/config/m32r/tm-m32r.h
index 648ff01..f38a760 100644
--- a/gdb/config/m32r/tm-m32r.h
+++ b/gdb/config/m32r/tm-m32r.h
@@ -146,7 +146,7 @@ extern CORE_ADDR m32r_frame_saved_pc (struct frame_info *);
/* mvs_check DEPRECATED_STORE_RETURN_VALUE */
#define DEPRECATED_STORE_RETURN_VALUE(TYPE, VALBUF) \
- write_register_bytes(REGISTER_BYTE (V0_REGNUM) + \
+ deprecated_write_register_bytes(REGISTER_BYTE (V0_REGNUM) + \
((TYPE_LENGTH (TYPE) > 4 ? 8:4) - TYPE_LENGTH (TYPE)),\
(VALBUF), TYPE_LENGTH (TYPE));
@@ -221,7 +221,7 @@ extern CORE_ADDR m32r_push_arguments (int nargs,
/* override the standard get_saved_register function with
one that takes account of generic CALL_DUMMY frames */
#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
- generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
+ deprecated_generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
#define USE_GENERIC_DUMMY_FRAMES 1
diff --git a/gdb/config/m68k/nm-sun3.h b/gdb/config/m68k/nm-sun3.h
index ba40db7..b2fecb2 100644
--- a/gdb/config/m68k/nm-sun3.h
+++ b/gdb/config/m68k/nm-sun3.h
@@ -31,4 +31,4 @@
/* We have to grab the regs since we store all regs at once. */
-#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
+#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, REGISTER_BYTES)
diff --git a/gdb/config/m68k/tm-delta68.h b/gdb/config/m68k/tm-delta68.h
index 269d134..a1abc0e 100644
--- a/gdb/config/m68k/tm-delta68.h
+++ b/gdb/config/m68k/tm-delta68.h
@@ -68,11 +68,11 @@
{ \
char raw_buf[REGISTER_RAW_SIZE (FP0_REGNUM)]; \
REGISTER_CONVERT_TO_RAW (TYPE, FP0_REGNUM, VALBUF, raw_buf); \
- write_register_bytes (REGISTER_BYTE (FP0_REGNUM), \
+ deprecated_write_register_bytes (REGISTER_BYTE (FP0_REGNUM), \
raw_buf, REGISTER_RAW_SIZE (FP0_REGNUM)); \
} \
else \
- write_register_bytes ((TYPE_CODE(TYPE) == TYPE_CODE_PTR ? 8 * 4 : 0), \
+ deprecated_write_register_bytes ((TYPE_CODE(TYPE) == TYPE_CODE_PTR ? 8 * 4 : 0), \
VALBUF, TYPE_LENGTH (TYPE))
/* Return number of args passed to a frame.
diff --git a/gdb/config/m68k/tm-linux.h b/gdb/config/m68k/tm-linux.h
index e2889ec..0bae116 100644
--- a/gdb/config/m68k/tm-linux.h
+++ b/gdb/config/m68k/tm-linux.h
@@ -64,15 +64,15 @@
{ \
char raw_buffer[REGISTER_RAW_SIZE (FP0_REGNUM)]; \
REGISTER_CONVERT_TO_RAW (TYPE, FP0_REGNUM, VALBUF, raw_buffer); \
- write_register_bytes (REGISTER_BYTE (FP0_REGNUM), \
+ deprecated_write_register_bytes (REGISTER_BYTE (FP0_REGNUM), \
raw_buffer, TYPE_LENGTH (TYPE)); \
} \
else \
{ \
if (TYPE_CODE (TYPE) == TYPE_CODE_PTR) \
- write_register_bytes (REGISTER_BYTE (A0_REGNUM), VALBUF, \
+ deprecated_write_register_bytes (REGISTER_BYTE (A0_REGNUM), VALBUF, \
TYPE_LENGTH (TYPE)); \
- write_register_bytes (0, VALBUF, TYPE_LENGTH (TYPE)); \
+ deprecated_write_register_bytes (0, VALBUF, TYPE_LENGTH (TYPE)); \
} \
}
diff --git a/gdb/config/mn10200/tm-mn10200.h b/gdb/config/mn10200/tm-mn10200.h
index bd2e66c..47bd7a0 100644
--- a/gdb/config/mn10200/tm-mn10200.h
+++ b/gdb/config/mn10200/tm-mn10200.h
@@ -154,16 +154,16 @@ extern CORE_ADDR mn10200_frame_saved_pc (struct frame_info *);
internal_error (__FILE__, __LINE__, "failed internal consistency check"); \
else if (TYPE_LENGTH (TYPE) > 2 && TYPE_CODE (TYPE) != TYPE_CODE_PTR) \
{ \
- write_register_bytes (REGISTER_BYTE (0), VALBUF, 2); \
- write_register_bytes (REGISTER_BYTE (1), VALBUF + 2, 2); \
+ deprecated_write_register_bytes (REGISTER_BYTE (0), VALBUF, 2); \
+ deprecated_write_register_bytes (REGISTER_BYTE (1), VALBUF + 2, 2); \
} \
else if (TYPE_CODE (TYPE) == TYPE_CODE_PTR)\
{ \
- write_register_bytes (REGISTER_BYTE (4), VALBUF, TYPE_LENGTH (TYPE)); \
+ deprecated_write_register_bytes (REGISTER_BYTE (4), VALBUF, TYPE_LENGTH (TYPE)); \
} \
else \
{ \
- write_register_bytes (REGISTER_BYTE (0), VALBUF, TYPE_LENGTH (TYPE)); \
+ deprecated_write_register_bytes (REGISTER_BYTE (0), VALBUF, TYPE_LENGTH (TYPE)); \
} \
}
diff --git a/gdb/config/nm-gnu.h b/gdb/config/nm-gnu.h
index 8f17406..1dedb57 100644
--- a/gdb/config/nm-gnu.h
+++ b/gdb/config/nm-gnu.h
@@ -30,7 +30,7 @@
extern char *gnu_target_pid_to_str (int pid);
/* Before storing, we need to read all the registers. */
-#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
+#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, REGISTER_BYTES)
/* Don't do wait_for_inferior on attach. */
#define ATTACH_NO_WAIT
diff --git a/gdb/config/nm-m3.h b/gdb/config/nm-m3.h
index f89838e..07bc26a 100644
--- a/gdb/config/nm-m3.h
+++ b/gdb/config/nm-m3.h
@@ -77,7 +77,7 @@ extern int must_suspend_thread;
/* Before storing, we need to read all the registers. */
-#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
+#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, REGISTER_BYTES)
/* Check if the inferior exists */
#define MACH_ERROR_NO_INFERIOR \
diff --git a/gdb/config/pa/tm-hppa.h b/gdb/config/pa/tm-hppa.h
index 6fd8c03..319576d 100644
--- a/gdb/config/pa/tm-hppa.h
+++ b/gdb/config/pa/tm-hppa.h
@@ -24,6 +24,8 @@
#include "regcache.h"
+#define GDB_MULTI_ARCH 0
+
/* Forward declarations of some types we use in prototypes */
struct frame_info;
@@ -50,12 +52,8 @@ struct inferior_status;
((X) >> (31 - (TO)) & ((1 << ((TO) - (FROM) + 1)) - 1))
#endif
-/* On the PA, any pass-by-value structure > 8 bytes is actually
- passed via a pointer regardless of its type or the compiler
- used. */
-
-#define REG_STRUCT_HAS_ADDR(gcc_p,type) \
- (TYPE_LENGTH (type) > 8)
+extern int hppa_reg_struct_has_addr (int gcc_p, struct type *type);
+#define REG_STRUCT_HAS_ADDR(gcc_p,type) hppa_reg_struct_has_addr (gcc_p,type)
/* Offset from address of function to start of its code.
Zero on most machines. */
@@ -84,23 +82,16 @@ extern int in_solib_call_trampoline (CORE_ADDR, char *);
in_solib_return_trampoline (pc, name)
extern int in_solib_return_trampoline (CORE_ADDR, char *);
-/* Immediately after a function call, return the saved pc.
- Can't go through the frames for this because on some machines
- the new frame is not set up until the new function executes
- some instructions. */
-
#undef SAVED_PC_AFTER_CALL
#define SAVED_PC_AFTER_CALL(frame) saved_pc_after_call (frame)
extern CORE_ADDR saved_pc_after_call (struct frame_info *);
-/* Stack grows upward */
-#define INNER_THAN(lhs,rhs) ((lhs) > (rhs))
+extern int hppa_inner_than (CORE_ADDR lhs, CORE_ADDR rhs);
+#define INNER_THAN(lhs,rhs) hppa_inner_than(lhs,rhs)
-/* elz: adjust the quantity to the next highest value which is 64-bit aligned.
- This is used in valops.c, when the sp is adjusted.
- On hppa the sp must always be kept 64-bit aligned */
+extern CORE_ADDR hppa_stack_align (CORE_ADDR sp);
+#define STACK_ALIGN(sp) hppa_stack_align (sp)
-#define STACK_ALIGN(arg) ( ((arg)%8) ? (((arg)+7)&-8) : (arg))
#define EXTRA_STACK_ALIGNMENT_NEEDED 0
/* Sequence of bytes for breakpoint instruction. */
@@ -116,35 +107,8 @@ extern CORE_ADDR saved_pc_after_call (struct frame_info *);
#define DECR_PC_AFTER_BREAK 0
-/* Sometimes we may pluck out a minimal symbol that has a negative
- address.
-
- An example of this occurs when an a.out is linked against a foo.sl.
- The foo.sl defines a global bar(), and the a.out declares a signature
- for bar(). However, the a.out doesn't directly call bar(), but passes
- its address in another call.
-
- If you have this scenario and attempt to "break bar" before running,
- gdb will find a minimal symbol for bar() in the a.out. But that
- symbol's address will be negative. What this appears to denote is
- an index backwards from the base of the procedure linkage table (PLT)
- into the data linkage table (DLT), the end of which is contiguous
- with the start of the PLT. This is clearly not a valid address for
- us to set a breakpoint on.
-
- Note that one must be careful in how one checks for a negative address.
- 0xc0000000 is a legitimate address of something in a shared text
- segment, for example. Since I don't know what the possible range
- is of these "really, truly negative" addresses that come from the
- minimal symbols, I'm resorting to the gross hack of checking the
- top byte of the address for all 1's. Sigh.
- */
-#define PC_REQUIRES_RUN_BEFORE_USE(pc) \
- (! target_has_stack && (pc & 0xFF000000))
-
-/* return instruction is bv r0(rp) or bv,n r0(rp) */
-
-#define ABOUT_TO_RETURN(pc) ((read_memory_integer (pc, 4) | 0x2) == 0xE840C002)
+extern int hppa_pc_requires_run_before_use (CORE_ADDR pc);
+#define PC_REQUIRES_RUN_BEFORE_USE(pc) hppa_pc_requires_run_before_use (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
@@ -249,10 +213,10 @@ extern CORE_ADDR saved_pc_after_call (struct frame_info *);
(buf)[sizeof(CORE_ADDR) -1] &= ~0x3; \
} while (0)
-/* Define DO_REGISTERS_INFO() to do machine-specific formatting
+/* Define DEPRECATED_REGISTERS_INFO() to do machine-specific formatting
of register dumps. */
-#define DO_REGISTERS_INFO(_regnum, fp) pa_do_registers_info (_regnum, fp)
+#define DEPRECATED_REGISTERS_INFO(_regnum, fp) pa_do_registers_info (_regnum, fp)
extern void pa_do_registers_info (int, int);
#if 0
@@ -262,9 +226,8 @@ extern void pa_do_strcat_registers_info (int, int, struct ui_file *, enum precis
/* PA specific macro to see if the current instruction is nullified. */
#ifndef INSTRUCTION_NULLIFIED
-#define INSTRUCTION_NULLIFIED \
- (((int)read_register (IPSW_REGNUM) & 0x00200000) && \
- !((int)read_register (FLAGS_REGNUM) & 0x2))
+extern int hppa_instruction_nullified (void);
+#define INSTRUCTION_NULLIFIED hppa_instruction_nullified ()
#endif
/* Number of bytes of storage in the actual machine representation
@@ -277,10 +240,8 @@ extern void pa_do_strcat_registers_info (int, int, struct ui_file *, enum precis
register state, the array `registers'. */
#define REGISTER_BYTES (NUM_REGS * 4)
-/* Index within `registers' of the first byte of the space for
- register N. */
-
-#define REGISTER_BYTE(N) (N) * 4
+extern int hppa_register_byte (int reg_nr);
+#define REGISTER_BYTE(N) hppa_register_byte (N)
/* Number of bytes of storage in the program's representation
for register N. */
@@ -295,16 +256,11 @@ extern void pa_do_strcat_registers_info (int, int, struct ui_file *, enum precis
#define MAX_REGISTER_VIRTUAL_SIZE 8
-/* Return the GDB type object for the "standard" data type
- of data in register N. */
+extern struct type * hppa_register_virtual_type (int reg_nr);
+#define REGISTER_VIRTUAL_TYPE(N) hppa_register_virtual_type (N)
-#define REGISTER_VIRTUAL_TYPE(N) \
- ((N) < FP4_REGNUM ? builtin_type_int : builtin_type_float)
-
-/* Store the address of the place in which to copy the structure the
- subroutine will return. This is called from call_function. */
-
-#define STORE_STRUCT_RETURN(ADDR, SP) {write_register (28, (ADDR)); }
+extern void hppa_store_struct_return (CORE_ADDR addr, CORE_ADDR sp);
+#define STORE_STRUCT_RETURN(ADDR, SP) hppa_store_struct_return (ADDR, SP)
/* Extract from an array REGBUF containing the (raw) register state
a function return value of type TYPE, and copy that, in virtual format,
@@ -358,21 +314,8 @@ struct value *hppa_value_returned_from_stack (register struct type *valtype,
#define VALUE_RETURNED_FROM_STACK(valtype,addr) \
hppa_value_returned_from_stack (valtype, addr)
-/*
- * This macro defines the register numbers (from REGISTER_NAMES) that
- * are effectively unavailable to the user through ptrace(). It allows
- * us to include the whole register set in REGISTER_NAMES (inorder to
- * better support remote debugging). If it is used in
- * fetch/store_inferior_registers() gdb will not complain about I/O errors
- * on fetching these registers. If all registers in REGISTER_NAMES
- * are available, then return false (0).
- */
-
-#define CANNOT_STORE_REGISTER(regno) \
- ((regno) == 0) || \
- ((regno) == PCSQ_HEAD_REGNUM) || \
- ((regno) >= PCSQ_TAIL_REGNUM && (regno) < IPSW_REGNUM) || \
- ((regno) > IPSW_REGNUM && (regno) < FP4_REGNUM)
+extern int hppa_cannot_store_register (int regnum);
+#define CANNOT_STORE_REGISTER(regno) hppa_cannot_store_register (regno)
#define INIT_EXTRA_FRAME_INFO(fromleaf, frame) init_extra_frame_info (fromleaf, frame)
extern void init_extra_frame_info (int, struct frame_info *);
@@ -405,9 +348,12 @@ extern int frameless_function_invocation (struct frame_info *);
extern CORE_ADDR hppa_frame_saved_pc (struct frame_info *frame);
#define FRAME_SAVED_PC(FRAME) hppa_frame_saved_pc (FRAME)
-#define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
+extern CORE_ADDR hppa_frame_args_address (struct frame_info *fi);
+#define FRAME_ARGS_ADDRESS(fi) hppa_frame_args_address (fi)
+
+extern CORE_ADDR hppa_frame_locals_address (struct frame_info *fi);
+#define FRAME_LOCALS_ADDRESS(fi) hppa_frame_locals_address (fi)
-#define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
/* Set VAL to the number of args passed to frame described by FI.
Can set VAL to -1, meaning no way to tell. */
@@ -589,13 +535,8 @@ hppa_fix_call_dummy (char *, CORE_ADDR, CORE_ADDR, int,
extern CORE_ADDR
hppa_push_arguments (int, struct value **, CORE_ADDR, int, CORE_ADDR);
-/* The low two bits of the PC on the PA contain the privilege level. Some
- genius implementing a (non-GCC) compiler apparently decided this means
- that "addresses" in a text section therefore include a privilege level,
- and thus symbol tables should contain these bits. This seems like a
- bonehead thing to do--anyway, it seems to work for our purposes to just
- ignore those bits. */
-#define SMASH_TEXT_ADDRESS(addr) ((addr) &= ~0x3)
+extern CORE_ADDR hppa_smash_text_address (CORE_ADDR addr);
+#define SMASH_TEXT_ADDRESS(addr) hppa_smash_text_address (addr)
#define GDB_TARGET_IS_HPPA
@@ -744,16 +685,12 @@ extern int hpread_adjust_stack_address (CORE_ADDR);
/* If the current gcc for for this target does not produce correct debugging
information for float parameters, both prototyped and unprototyped, then
define this macro. This forces gdb to always assume that floats are
- passed as doubles and then converted in the callee.
-
- For the pa, it appears that the debug info marks the parameters as
- floats regardless of whether the function is prototyped, but the actual
- values are passed as doubles for the non-prototyped case and floats for
- the prototyped case. Thus we choose to make the non-prototyped case work
- for C and break the prototyped case, since the non-prototyped case is
- probably much more common. (FIXME). */
+ passed as doubles and then converted in the callee. */
-#define COERCE_FLOAT_TO_DOUBLE(formal, actual) (current_language -> la_language == language_c)
+extern int hppa_coerce_float_to_double (struct type *formal,
+ struct type *actual);
+#define COERCE_FLOAT_TO_DOUBLE(formal, actual) \
+ hppa_coerce_float_to_double (formal, actual)
/* Here's how to step off a permanent breakpoint. */
#define SKIP_PERMANENT_BREAKPOINT (hppa_skip_permanent_breakpoint)
diff --git a/gdb/config/pa/tm-hppa64.h b/gdb/config/pa/tm-hppa64.h
index 7e6e45a..9a1ceb0 100644
--- a/gdb/config/pa/tm-hppa64.h
+++ b/gdb/config/pa/tm-hppa64.h
@@ -264,29 +264,29 @@ call_dummy
#define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) \
{ \
if (TYPE_CODE (TYPE) == TYPE_CODE_FLT && !SOFT_FLOAT) \
- write_register_bytes \
+ deprecated_write_register_bytes \
(REGISTER_BYTE (FP4_REGNUM) + \
(REGISTER_SIZE - TYPE_LENGTH (TYPE)), \
(VALBUF), \
TYPE_LENGTH (TYPE)); \
else if (is_integral_type(TYPE) || SOFT_FLOAT) \
- write_register_bytes \
+ deprecated_write_register_bytes \
(REGISTER_BYTE (28) + \
(REGISTER_SIZE - TYPE_LENGTH (TYPE)), \
(VALBUF), \
TYPE_LENGTH (TYPE)); \
else if (TYPE_LENGTH (TYPE) <= 8) \
- write_register_bytes \
+ deprecated_write_register_bytes \
( REGISTER_BYTE (28), \
(VALBUF), \
TYPE_LENGTH (TYPE)); \
else if (TYPE_LENGTH (TYPE) <= 16) \
{ \
- write_register_bytes \
+ deprecated_write_register_bytes \
(REGISTER_BYTE (28), \
(VALBUF), \
8); \
- write_register_bytes \
+ deprecated_write_register_bytes \
(REGISTER_BYTE (29), \
((char *) VALBUF + 8), \
TYPE_LENGTH (TYPE) - 8); \
diff --git a/gdb/config/sparc/nm-nbsd.h b/gdb/config/sparc/nm-nbsd.h
index 957a34e..41341c6 100644
--- a/gdb/config/sparc/nm-nbsd.h
+++ b/gdb/config/sparc/nm-nbsd.h
@@ -30,6 +30,6 @@
/* Before storing, we need to read all the registers. */
-#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
+#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, REGISTER_BYTES)
#endif /* NM_NBSD_H */
diff --git a/gdb/config/sparc/nm-sun4os4.h b/gdb/config/sparc/nm-sun4os4.h
index d874d58..cee2a3d 100644
--- a/gdb/config/sparc/nm-sun4os4.h
+++ b/gdb/config/sparc/nm-sun4os4.h
@@ -30,7 +30,7 @@
/* Before storing, we need to read all the registers. */
-#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
+#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, REGISTER_BYTES)
/* Return sizeof user struct to callers in less machine dependent routines */
diff --git a/gdb/config/sparc/nm-sun4sol2.h b/gdb/config/sparc/nm-sun4sol2.h
index f8aeda0..3cad417 100644
--- a/gdb/config/sparc/nm-sun4sol2.h
+++ b/gdb/config/sparc/nm-sun4sol2.h
@@ -26,7 +26,7 @@
/* Before storing, we need to read all the registers. */
-#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
+#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, REGISTER_BYTES)
/* Solaris PSRVADDR support does not seem to include a place for nPC. */
diff --git a/gdb/config/sparc/tm-sparc.h b/gdb/config/sparc/tm-sparc.h
index 8cac258..6042ac6 100644
--- a/gdb/config/sparc/tm-sparc.h
+++ b/gdb/config/sparc/tm-sparc.h
@@ -736,14 +736,9 @@ extern void sparc_software_single_step (enum target_signal, int);
#define SETUP_ARBITRARY_FRAME(argc, argv) setup_arbitrary_frame (argc, argv)
extern struct frame_info *setup_arbitrary_frame (int, CORE_ADDR *);
-/* To print every pair of float registers as a double, we use this hook.
- We also print the condition code registers in a readable format
- (FIXME: can expand this to all control regs). */
-
-#undef PRINT_REGISTER_HOOK
-#define PRINT_REGISTER_HOOK(regno) \
- sparc_print_register_hook (regno)
-extern void sparc_print_register_hook (int regno);
+extern void sparc_do_registers_info (int regnum, int all);
+#undef DEPRECATED_DO_REGISTERS_INFO
+#define DEPRECATED_DO_REGISTERS_INFO(REGNUM,ALL) sparc_do_registers_info (REGNUM, ALL)
/* Optimization for storing registers to the inferior. The hook
DO_DEFERRED_STORES
diff --git a/gdb/config/sparc/tm-sparclet.h b/gdb/config/sparc/tm-sparclet.h
index fd25f5b..6aad71d 100644
--- a/gdb/config/sparc/tm-sparclet.h
+++ b/gdb/config/sparc/tm-sparclet.h
@@ -121,14 +121,16 @@ enum {
#define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) \
{ \
/* Other values are returned in register %o0. */ \
- write_register_bytes (REGISTER_BYTE (O0_REGNUM), (VALBUF), \
+ deprecated_write_register_bytes (REGISTER_BYTE (O0_REGNUM), (VALBUF), \
TYPE_LENGTH (TYPE)); \
}
#endif /* GDB_MULTI_ARCH */
-#undef PRINT_REGISTER_HOOK
-#define PRINT_REGISTER_HOOK(regno)
+extern void sparclet_do_registers_info (int regnum, int all);
+#undef DEPRECATED_DO_REGISTERS_INFO
+#define DEPRECATED_DO_REGISTERS_INFO(REGNUM,ALL) sparclet_do_registers_info (REGNUM, ALL)
+
/* Offsets into jmp_buf. Not defined by Sun, but at least documented in a
comment in <machine/setjmp.h>! */
diff --git a/gdb/config/z8k/tm-z8k.h b/gdb/config/z8k/tm-z8k.h
index eb96eda..edc5664 100644
--- a/gdb/config/z8k/tm-z8k.h
+++ b/gdb/config/z8k/tm-z8k.h
@@ -1,6 +1,7 @@
/* Parameters for execution on a z8000 series machine.
- Copyright 1992, 1993, 1994, 1998, 1999, 2000, 2001
- Free Software Foundation, Inc.
+
+ Copyright 1992, 1993, 1994, 1998, 1999, 2000, 2001, 2002 Free
+ Software Foundation, Inc.
This file is part of GDB.
@@ -276,9 +277,9 @@ int sim_z8001_mode;
#define NO_STD_REGS
-extern void z8k_print_register_hook (int regno);
-#define PRINT_REGISTER_HOOK(regno) z8k_print_register_hook(regno)
-
+extern void z8k_do_registers_info (int regnum, int all);
+#define DEPRECATED_DO_REGISTERS_INFO(REGNUM,ALL) \
+ z8k_do_registers_info (REGNUM, ALL)
extern void z8k_set_pointer_size (int newsize);
#define INIT_EXTRA_SYMTAB_INFO \
diff --git a/gdb/configure b/gdb/configure
index 64370a8..f96b8f9 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -6546,6 +6546,43 @@ EOF
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:6552: 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 6557 "configure"
+#include "confdefs.h"
+#include <thread_db.h>
+int main() {
+int i = TD_NOTALLOC;
+; return 0; }
+EOF
+if { (eval echo configure:6564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ gdb_cv_thread_db_h_has_td_notalloc=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gdb_cv_thread_db_h_has_td_notalloc=no
+
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6
+fi
+if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define THREAD_DB_HAS_TD_NOTALLOC 1
+EOF
+
+fi
+
# Check whether --enable-gdbcli or --disable-gdbcli was given.
if test "${enable_gdbcli+set}" = set; then
@@ -6737,7 +6774,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:6741: checking compiler warning flags" >&5
+echo "configure:6778: 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
@@ -6747,14 +6784,14 @@ echo "configure:6741: checking compiler warning flags" >&5
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $w"
cat > conftest.$ac_ext <<EOF
-#line 6751 "configure"
+#line 6788 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:6758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
WARN_CFLAGS="${WARN_CFLAGS} $w"
else
@@ -6814,12 +6851,12 @@ fi
if test $want_included_regex = false; then
echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
-echo "configure:6818: checking for GNU regex" >&5
+echo "configure:6855: 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 6823 "configure"
+#line 6860 "configure"
#include "confdefs.h"
#include <gnu-versions.h>
#include <sys/types.h>
@@ -6831,7 +6868,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:6835: \"$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
@@ -6860,12 +6897,12 @@ fi
# In the Cygwin environment, we need some additional flags.
echo $ac_n "checking for cygwin""... $ac_c" 1>&6
-echo "configure:6864: checking for cygwin" >&5
+echo "configure:6901: 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 6869 "configure"
+#line 6906 "configure"
#include "confdefs.h"
#if defined (__CYGWIN__) || defined (__CYGWIN32__)
@@ -6903,7 +6940,7 @@ if test x$gdb_cv_os_cygwin = xyes; then
else
TERM_LIB=
echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
-echo "configure:6907: checking for tgetent in -lncurses" >&5
+echo "configure:6944: checking for tgetent in -lncurses" >&5
ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -6911,7 +6948,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lncurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6915 "configure"
+#line 6952 "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
@@ -6922,7 +6959,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:6926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6963: \"$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
@@ -6941,7 +6978,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6
-echo "configure:6945: checking for tgetent in -lHcurses" >&5
+echo "configure:6982: checking for tgetent in -lHcurses" >&5
ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -6949,7 +6986,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lHcurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6953 "configure"
+#line 6990 "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
@@ -6960,7 +6997,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:6964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7001: \"$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
@@ -6979,7 +7016,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6
-echo "configure:6983: checking for tgetent in -ltermlib" >&5
+echo "configure:7020: checking for tgetent in -ltermlib" >&5
ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -6987,7 +7024,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ltermlib $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6991 "configure"
+#line 7028 "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
@@ -6998,7 +7035,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:7002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7039: \"$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
@@ -7017,7 +7054,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
-echo "configure:7021: checking for tgetent in -ltermcap" >&5
+echo "configure:7058: checking for tgetent in -ltermcap" >&5
ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7025,7 +7062,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ltermcap $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7029 "configure"
+#line 7066 "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
@@ -7036,7 +7073,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:7040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7077: \"$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
@@ -7055,7 +7092,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
-echo "configure:7059: checking for tgetent in -lcurses" >&5
+echo "configure:7096: checking for tgetent in -lcurses" >&5
ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7063,7 +7100,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7067 "configure"
+#line 7104 "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
@@ -7074,7 +7111,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:7078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7115: \"$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
@@ -7093,7 +7130,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6
-echo "configure:7097: checking for tgetent in -lterminfo" >&5
+echo "configure:7134: checking for tgetent in -lterminfo" >&5
ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7101,7 +7138,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lterminfo $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7105 "configure"
+#line 7142 "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
@@ -7112,7 +7149,7 @@ int main() {
tgetent()
; return 0; }
EOF
-if { (eval echo configure:7116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7153: \"$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
@@ -7277,7 +7314,7 @@ if test "${with_tclconfig+set}" = set; then
fi
echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:7281: checking for Tcl configuration" >&5
+echo "configure:7318: 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
@@ -7385,7 +7422,7 @@ if test "${with_tkconfig+set}" = set; then
fi
echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:7389: checking for Tk configuration" >&5
+echo "configure:7426: 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
@@ -7494,7 +7531,7 @@ fi
no_tcl=true
echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
-echo "configure:7498: checking for Tcl private headers. dir=${configdir}" >&5
+echo "configure:7535: 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"
@@ -7560,17 +7597,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:7564: checking for tclInt.h" >&5
+echo "configure:7601: 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 7569 "configure"
+#line 7606 "configure"
#include "confdefs.h"
#include <tclInt.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7611: \"$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*
@@ -7630,7 +7667,7 @@ fi
#
no_tk=true
echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
-echo "configure:7634: checking for Tk private headers" >&5
+echo "configure:7671: 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"
@@ -7696,17 +7733,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:7700: checking for tk.h" >&5
+echo "configure:7737: 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 7705 "configure"
+#line 7742 "configure"
#include "confdefs.h"
#include <tk.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7747: \"$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*
@@ -7752,7 +7789,7 @@ fi
echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:7756: checking for Itcl private headers. srcdir=${srcdir}" >&5
+echo "configure:7793: 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
@@ -7775,7 +7812,7 @@ fi
echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:7779: checking for Itk private headers. srcdir=${srcdir}" >&5
+echo "configure:7816: 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
@@ -7798,7 +7835,7 @@ fi
echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:7802: checking for Tix private headers. srcdir=${srcdir}" >&5
+echo "configure:7839: checking for Tix private headers. srcdir=${srcdir}" >&5
if test x"${ac_cv_c_tixh}" = x ; then
for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do
if test -f $i/generic/tix.h ; then
@@ -7850,7 +7887,7 @@ if test "${with_itclconfig+set}" = set; then
fi
echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
-echo "configure:7854: checking for Itcl configuration" >&5
+echo "configure:7891: 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
@@ -7953,7 +7990,7 @@ if test "${with_itkconfig+set}" = set; then
fi
echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
-echo "configure:7957: checking for Itk configuration" >&5
+echo "configure:7994: 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
@@ -8056,7 +8093,7 @@ if test "${with_tixconfig+set}" = set; then
fi
echo $ac_n "checking for Tix configuration""... $ac_c" 1>&6
-echo "configure:8060: checking for Tix configuration" >&5
+echo "configure:8097: checking for Tix configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_tixconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8202,7 +8239,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:8206: checking for X" >&5
+echo "configure:8243: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
@@ -8264,12 +8301,12 @@ if test "$ac_x_includes" = NO; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 8268 "configure"
+#line 8305 "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:8273: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8310: \"$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*
@@ -8338,14 +8375,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 8342 "configure"
+#line 8379 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:8349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8386: \"$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.
@@ -8637,7 +8674,7 @@ fi
# ``gdbserver'' can only be built in a native configuration.
if test x"${target}" = x"${host}"; then
echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
-echo "configure:8641: checking whether gdbserver is supported on this host" >&5
+echo "configure:8678: checking whether gdbserver is supported on this host" >&5
if test x"${build_gdbserver}" = xyes ; then
configdirs="${configdirs} gdbserver"
SUBDIRS="${SUBDIRS} gdbserver"
@@ -8699,7 +8736,7 @@ fi
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:8703: checking whether ln -s works" >&5
+echo "configure:8740: 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
@@ -8723,12 +8760,12 @@ fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:8727: checking for Cygwin environment" >&5
+echo "configure:8764: 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 8732 "configure"
+#line 8769 "configure"
#include "confdefs.h"
int main() {
@@ -8739,7 +8776,7 @@ int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:8743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
@@ -8756,19 +8793,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:8760: checking for mingw32 environment" >&5
+echo "configure:8797: 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 8765 "configure"
+#line 8802 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:8772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
@@ -8787,7 +8824,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:8791: checking for executable suffix" >&5
+echo "configure:8828: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8797,7 +8834,7 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:8801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:8838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj | *.ilk | *.pdb) ;;
@@ -8839,7 +8876,7 @@ fi
echo $ac_n "checking for iconv""... $ac_c" 1>&6
-echo "configure:8843: checking for iconv" >&5
+echo "configure:8880: checking for iconv" >&5
if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8847,7 +8884,7 @@ else
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
cat > conftest.$ac_ext <<EOF
-#line 8851 "configure"
+#line 8888 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
@@ -8857,7 +8894,7 @@ iconv_t cd = iconv_open("","");
iconv_close(cd);
; return 0; }
EOF
-if { (eval echo configure:8861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_func_iconv=yes
else
@@ -8869,7 +8906,7 @@ rm -f conftest*
am_save_LIBS="$LIBS"
LIBS="$LIBS -liconv"
cat > conftest.$ac_ext <<EOF
-#line 8873 "configure"
+#line 8910 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
@@ -8879,7 +8916,7 @@ iconv_t cd = iconv_open("","");
iconv_close(cd);
; return 0; }
EOF
-if { (eval echo configure:8883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8920: \"$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
@@ -8900,13 +8937,13 @@ echo "$ac_t""$am_cv_func_iconv" 1>&6
EOF
echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
-echo "configure:8904: checking for iconv declaration" >&5
+echo "configure:8941: 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 8910 "configure"
+#line 8947 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -8925,7 +8962,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:8929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_proto_iconv_arg1=""
else
diff --git a/gdb/configure.in b/gdb/configure.in
index 8628e80..4c2e063 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -600,6 +600,23 @@ if test ${build} = ${host} -a ${host} = ${target} ; then
AC_SUBST(CONFIG_LDFLAGS)
fi
+dnl See if we have a thread_db header file that has TD_NOTALLOC.
+if test "x$ac_cv_header_thread_db_h" = "xyes"; then
+ AC_CACHE_CHECK([whether <thread_db.h> has TD_NOTALLOC],
+ gdb_cv_thread_db_h_has_td_notalloc,
+ AC_TRY_COMPILE(
+ [#include <thread_db.h>],
+ [int i = TD_NOTALLOC;],
+ gdb_cv_thread_db_h_has_td_notalloc=yes,
+ gdb_cv_thread_db_h_has_td_notalloc=no
+ )
+ )
+fi
+if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
+ AC_DEFINE(THREAD_DB_HAS_TD_NOTALLOC, 1,
+ [Define if <thread_db.h> has the TD_NOTALLOC error code.])
+fi
+
dnl The CLI cannot be disabled yet, but may be in the future
dnl Handle CLI sub-directory configury.
diff --git a/gdb/core-sol2.c b/gdb/core-sol2.c
index 0123cf4..f978b68 100644
--- a/gdb/core-sol2.c
+++ b/gdb/core-sol2.c
@@ -94,15 +94,19 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
struct regs *gregs = (struct regs *) core_reg_sect;
/* G0 *always* holds 0. */
- *(int *) &registers[REGISTER_BYTE (0)] = 0;
+ *(int *) &deprecated_registers[REGISTER_BYTE (0)] = 0;
/* The globals and output registers. */
- memcpy (&registers[REGISTER_BYTE (G1_REGNUM)], &gregs->r_g1,
- 15 * REGISTER_RAW_SIZE (G1_REGNUM));
- *(int *) &registers[REGISTER_BYTE (PS_REGNUM)] = gregs->r_ps;
- *(int *) &registers[REGISTER_BYTE (PC_REGNUM)] = gregs->r_pc;
- *(int *) &registers[REGISTER_BYTE (NPC_REGNUM)] = gregs->r_npc;
- *(int *) &registers[REGISTER_BYTE (Y_REGNUM)] = gregs->r_y;
+ memcpy (&deprecated_registers[REGISTER_BYTE (G1_REGNUM)],
+ &gregs->r_g1, 15 * REGISTER_RAW_SIZE (G1_REGNUM));
+ *(int *) &deprecated_registers[REGISTER_BYTE (PS_REGNUM)]
+ = gregs->r_ps;
+ *(int *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)]
+ = gregs->r_pc;
+ *(int *) &deprecated_registers[REGISTER_BYTE (NPC_REGNUM)]
+ = gregs->r_npc;
+ *(int *) &deprecated_registers[REGISTER_BYTE (Y_REGNUM)]
+ = gregs->r_y;
/* My best guess at where to get the locals and input
registers is exactly where they usually are, right above
@@ -112,9 +116,9 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
{
int sp;
- sp = *(int *) &registers[REGISTER_BYTE (SP_REGNUM)];
+ sp = *(int *) &deprecated_registers[REGISTER_BYTE (SP_REGNUM)];
if (0 != target_read_memory (sp,
- &registers[REGISTER_BYTE (L0_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (L0_REGNUM)],
16 * REGISTER_RAW_SIZE (L0_REGNUM)))
{
warning ("couldn't read input and local registers from core file\n");
@@ -163,10 +167,10 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
{
struct fpu *fpuregs = (struct fpu *) core_reg_sect;
- memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], &fpuregs->fpu_fr,
- sizeof (fpuregs->fpu_fr));
- memcpy (&registers[REGISTER_BYTE (FPS_REGNUM)], &fpuregs->fpu_fsr,
- sizeof (FPU_FSR_TYPE));
+ memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
+ &fpuregs->fpu_fr, sizeof (fpuregs->fpu_fr));
+ memcpy (&deprecated_registers[REGISTER_BYTE (FPS_REGNUM)],
+ &fpuregs->fpu_fsr, sizeof (FPU_FSR_TYPE));
}
else
{
diff --git a/gdb/corelow.c b/gdb/corelow.c
index 785b8e1..f7e3cf0 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -466,7 +466,7 @@ get_core_registers (int regno)
get_core_register_section (".reg2", 2, "floating-point", 0);
get_core_register_section (".reg-xfp", 3, "extended floating-point", 0);
- registers_fetched ();
+ deprecated_registers_fetched ();
}
static void
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index 5d64d43..046c08b 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -972,7 +972,7 @@ cris_abi_original_store_return_value (struct type *type, char *valbuf)
int len = TYPE_LENGTH (type);
if (len <= REGISTER_SIZE)
- write_register_bytes (REGISTER_BYTE (RET_REGNUM), valbuf, len);
+ deprecated_write_register_bytes (REGISTER_BYTE (RET_REGNUM), valbuf, len);
else
internal_error (__FILE__, __LINE__, "cris_abi_original_store_return_value: type length too large.");
}
@@ -987,7 +987,8 @@ cris_abi_v2_store_return_value (struct type *type, char *valbuf)
if (len <= 2 * REGISTER_SIZE)
{
/* Note that this works since R10 and R11 are consecutive registers. */
- write_register_bytes (REGISTER_BYTE (RET_REGNUM), valbuf, len);
+ deprecated_write_register_bytes (REGISTER_BYTE (RET_REGNUM), valbuf,
+ len);
}
else
internal_error (__FILE__, __LINE__, "cris_abi_v2_store_return_value: type length too large.");
@@ -3706,8 +3707,8 @@ cris_fpless_backtrace (char *noargs, int from_tty)
function (since there's no push srp in that case). */
int innermost_frame = 1;
- read_register_gen (PC_REGNUM, (char *) &pc);
- read_register_gen (SP_REGNUM, (char *) &sp);
+ deprecated_read_register_gen (PC_REGNUM, (char *) &pc);
+ deprecated_read_register_gen (SP_REGNUM, (char *) &sp);
/* We make an explicit return when we can't find an outer frame. */
while (1)
@@ -3846,7 +3847,7 @@ cris_fpless_backtrace (char *noargs, int from_tty)
/* We couldn't find a push srp in the prologue, so this must be
a leaf function, and thus we use the srp register directly.
This should happen at most once, for the innermost function. */
- read_register_gen (SRP_REGNUM, (char *) &pc);
+ deprecated_read_register_gen (SRP_REGNUM, (char *) &pc);
}
else
{
@@ -4289,7 +4290,7 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
- set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
+ set_gdbarch_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);
diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c
index d338ff4..1b2987a 100644
--- a/gdb/d10v-tdep.c
+++ b/gdb/d10v-tdep.c
@@ -486,15 +486,15 @@ d10v_store_return_value (struct type *type, char *valbuf)
if (TYPE_LENGTH (type) == 1
&& TYPE_CODE (type) == TYPE_CODE_INT)
{
- write_register_bytes (REGISTER_BYTE (RET1_REGNUM),
- &tmp, 1); /* zero the high byte */
- write_register_bytes (REGISTER_BYTE (RET1_REGNUM) + 1,
- valbuf, 1); /* copy the low byte */
+ /* zero the high byte */
+ deprecated_write_register_bytes (REGISTER_BYTE (RET1_REGNUM), &tmp, 1);
+ /* copy the low byte */
+ deprecated_write_register_bytes (REGISTER_BYTE (RET1_REGNUM) + 1,
+ valbuf, 1);
}
else
- write_register_bytes (REGISTER_BYTE (RET1_REGNUM),
- valbuf,
- TYPE_LENGTH (type));
+ deprecated_write_register_bytes (REGISTER_BYTE (RET1_REGNUM),
+ valbuf, TYPE_LENGTH (type));
}
/* Extract from an array REGBUF containing the (raw) register state
@@ -558,7 +558,8 @@ do_d10v_pop_frame (struct frame_info *fi)
if (fi->saved_regs[regnum])
{
read_memory (fi->saved_regs[regnum], raw_buffer, REGISTER_RAW_SIZE (regnum));
- write_register_bytes (REGISTER_BYTE (regnum), raw_buffer, REGISTER_RAW_SIZE (regnum));
+ deprecated_write_register_bytes (REGISTER_BYTE (regnum), raw_buffer,
+ REGISTER_RAW_SIZE (regnum));
}
}
for (regnum = 0; regnum < SP_REGNUM; regnum++)
@@ -977,7 +978,7 @@ show_regs (char *args, int from_tty)
char num[MAX_REGISTER_RAW_SIZE];
int i;
printf_filtered (" ");
- read_register_gen (a, (char *) &num);
+ deprecated_read_register_gen (a, (char *) &num);
for (i = 0; i < MAX_REGISTER_RAW_SIZE; i++)
{
printf_filtered ("%02x", (num[i] & 0xff));
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 1991dc0..4c80ed8 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -167,34 +167,34 @@ static int has_line_numbers;
/* Complaints about the symbols we have encountered. */
-struct complaint lbrac_complaint =
+struct deprecated_complaint lbrac_complaint =
{"bad block start address patched", 0, 0};
-struct complaint string_table_offset_complaint =
+struct deprecated_complaint string_table_offset_complaint =
{"bad string table offset in symbol %d", 0, 0};
-struct complaint unknown_symtype_complaint =
+struct deprecated_complaint unknown_symtype_complaint =
{"unknown symbol type %s", 0, 0};
-struct complaint unknown_symchar_complaint =
+struct deprecated_complaint unknown_symchar_complaint =
{"unknown symbol descriptor `%c'", 0, 0};
-struct complaint lbrac_rbrac_complaint =
+struct deprecated_complaint lbrac_rbrac_complaint =
{"block start larger than block end", 0, 0};
-struct complaint lbrac_unmatched_complaint =
+struct deprecated_complaint lbrac_unmatched_complaint =
{"unmatched N_LBRAC before symtab pos %d", 0, 0};
-struct complaint lbrac_mismatch_complaint =
+struct deprecated_complaint lbrac_mismatch_complaint =
{"N_LBRAC/N_RBRAC symbol mismatch at symtab pos %d", 0, 0};
-struct complaint repeated_header_complaint =
+struct deprecated_complaint repeated_header_complaint =
{"\"repeated\" header file %s not previously seen, at symtab pos %d", 0, 0};
-struct complaint unclaimed_bincl_complaint =
+struct deprecated_complaint unclaimed_bincl_complaint =
{"N_BINCL %s not in entries for any file, at symtab pos %d", 0, 0};
-struct complaint discarding_local_symbols_complaint =
+struct deprecated_complaint discarding_local_symbols_complaint =
{"misplaced N_LBRAC entry; discarding local symbols which have no enclosing block", 0, 0};
/* find_text_range --- find start and end of loadable code sections
@@ -1360,7 +1360,7 @@ read_dbx_symtab (struct objfile *objfile)
switch (nlist.n_type)
{
- static struct complaint function_outside_compilation_unit = {
+ static struct deprecated_complaint function_outside_compilation_unit = {
"function `%s' appears to be defined outside of all compilation units", 0, 0
};
char *p;
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 1923c8b..7f05283 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,8 @@
+2002-10-26 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Delete
+ definition of DO_REGISTERS_INFO.
+
2002-10-18 Kevin Buettner <kevinb@redhat.com>
* gdbint.texinfo (Address Classes): Fix problems with insertion
diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo
index cdb06b2..0cdbc05 100644
--- a/gdb/doc/gdbint.texinfo
+++ b/gdb/doc/gdbint.texinfo
@@ -3218,12 +3218,6 @@ Similarly, for hardware breakpoints.
If defined, this should evaluate to 1 if @var{addr} is in a shared
library in which breakpoints cannot be set and so should be disabled.
-@item DO_REGISTERS_INFO
-@findex DO_REGISTERS_INFO
-If defined, use this to print the value of a register or all registers.
-
-This method is deprecated.
-
@item PRINT_FLOAT_INFO()
@findex PRINT_FLOAT_INFO
If defined, then the @samp{info float} command will print information about
diff --git a/gdb/dwarf2cfi.c b/gdb/dwarf2cfi.c
index ddb42ab..30c2db7 100644
--- a/gdb/dwarf2cfi.c
+++ b/gdb/dwarf2cfi.c
@@ -180,24 +180,24 @@ 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,
+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);
-static LONGEST read_initial_length (bfd * abfd, char *buf, int *bytes_read);
-static ULONGEST read_length (bfd * abfd, char *buf, int *bytes_read,
+static LONGEST read_initial_length (bfd *abfd, char *buf, int *bytes_read);
+static ULONGEST read_length (bfd *abfd, char *buf, int *bytes_read,
int dwarf64);
static int is_cie (ULONGEST cie_id, int dwarf64);
@@ -304,26 +304,17 @@ context_cpy (struct context *dst, struct context *src)
int regs_size = sizeof (struct context_reg) * NUM_REGS;
struct context_reg *dreg;
- /* Structure dst contains a pointer to an array of
- * registers of a given frame as well as src does. This
- * array was already allocated before dst was passed to
- * context_cpy but the pointer to it was overriden by
- * '*dst = *src' and the array was lost. This led to the
- * situation, that we've had a copy of src placed in dst,
- * but both of them pointed to the same regs array and
- * thus we've sometimes blindly rewritten it. Now we save
- * the pointer before copying src to dst, return it back
- * after that and copy the registers into their new place
- * finally. --- mludvig@suse.cz */
+ /* 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)
+read_1u (bfd *abfd, char **p)
{
unsigned ret;
@@ -333,7 +324,7 @@ read_1u (bfd * abfd, char **p)
}
static int
-read_1s (bfd * abfd, char **p)
+read_1s (bfd *abfd, char **p)
{
int ret;
@@ -343,7 +334,7 @@ read_1s (bfd * abfd, char **p)
}
static unsigned int
-read_2u (bfd * abfd, char **p)
+read_2u (bfd *abfd, char **p)
{
unsigned ret;
@@ -353,7 +344,7 @@ read_2u (bfd * abfd, char **p)
}
static int
-read_2s (bfd * abfd, char **p)
+read_2s (bfd *abfd, char **p)
{
int ret;
@@ -363,7 +354,7 @@ read_2s (bfd * abfd, char **p)
}
static unsigned int
-read_4u (bfd * abfd, char **p)
+read_4u (bfd *abfd, char **p)
{
unsigned int ret;
@@ -373,7 +364,7 @@ read_4u (bfd * abfd, char **p)
}
static int
-read_4s (bfd * abfd, char **p)
+read_4s (bfd *abfd, char **p)
{
int ret;
@@ -383,7 +374,7 @@ read_4s (bfd * abfd, char **p)
}
static ULONGEST
-read_8u (bfd * abfd, char **p)
+read_8u (bfd *abfd, char **p)
{
ULONGEST ret;
@@ -393,7 +384,7 @@ read_8u (bfd * abfd, char **p)
}
static LONGEST
-read_8s (bfd * abfd, char **p)
+read_8s (bfd *abfd, char **p)
{
LONGEST ret;
@@ -403,7 +394,7 @@ read_8s (bfd * abfd, char **p)
}
static ULONGEST
-read_uleb128 (bfd * abfd, char **p)
+read_uleb128 (bfd *abfd, char **p)
{
ULONGEST ret;
int i, shift;
@@ -427,7 +418,7 @@ read_uleb128 (bfd * abfd, char **p)
}
static LONGEST
-read_sleb128 (bfd * abfd, char **p)
+read_sleb128 (bfd *abfd, char **p)
{
LONGEST ret;
int i, shift, size, num_read;
@@ -457,7 +448,7 @@ read_sleb128 (bfd * abfd, char **p)
}
static CORE_ADDR
-read_pointer (bfd * abfd, char **p)
+read_pointer (bfd *abfd, char **p)
{
switch (TARGET_ADDR_BIT / TARGET_CHAR_BIT)
{
@@ -470,11 +461,11 @@ read_pointer (bfd * abfd, char **p)
}
}
-/* This functions only reads appropriate amount of data from *p
- * and returns the resulting value. Calling function must handle
- * different encoding possibilities itself! */
+/* 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)
+read_encoded_pointer (bfd *abfd, char **p, unsigned char encoding)
{
CORE_ADDR ret;
@@ -519,10 +510,10 @@ read_encoded_pointer (bfd * abfd, char **p, unsigned char encoding)
return ret;
}
-/* Variable 'encoding' carries 3 different flags:
- * - encoding & 0x0f : size of the address (handled in read_encoded_pointer())
- * - encoding & 0x70 : type (absolute, relative, ...)
- * - encoding & 0x80 : indirect flag (DW_EH_PE_indirect == 0x80). */
+/* 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)
{
@@ -547,7 +538,7 @@ pointer_encoding (unsigned char encoding)
}
static LONGEST
-read_initial_length (bfd * abfd, char *buf, int *bytes_read)
+read_initial_length (bfd *abfd, char *buf, int *bytes_read)
{
LONGEST ret = 0;
@@ -567,7 +558,7 @@ read_initial_length (bfd * abfd, char *buf, int *bytes_read)
}
static ULONGEST
-read_length (bfd * abfd, char *buf, int *bytes_read, int dwarf64)
+read_length (bfd *abfd, char *buf, int *bytes_read, int dwarf64)
{
if (dwarf64)
{
@@ -833,14 +824,14 @@ get_reg (char *reg, struct context *context, int regnum)
switch (context->reg[regnum].how)
{
case REG_CTX_UNSAVED:
- read_register_gen (regnum, reg);
+ 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:
- read_register_gen (context->reg[regnum].loc.reg, 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,
@@ -1697,7 +1688,7 @@ cfi_write_fp (CORE_ADDR val)
if (fs->cfa_how == CFA_REG_OFFSET)
{
val -= fs->cfa_offset;
- write_register_gen (fs->cfa_reg, (char *) &val);
+ deprecated_write_register_gen (fs->cfa_reg, (char *) &val);
}
else
warning ("Can't write fp.");
@@ -1716,8 +1707,8 @@ cfi_pop_frame (struct frame_info *fi)
for (regnum = 0; regnum < NUM_REGS; regnum++)
{
get_reg (regbuf, UNWIND_CONTEXT (fi), regnum);
- write_register_bytes (REGISTER_BYTE (regnum), regbuf,
- REGISTER_RAW_SIZE (regnum));
+ deprecated_write_register_bytes (REGISTER_BYTE (regnum), regbuf,
+ REGISTER_RAW_SIZE (regnum));
}
write_register (PC_REGNUM, UNWIND_CONTEXT (fi)->ra);
@@ -1828,7 +1819,7 @@ cfi_get_saved_register (char *raw_buffer,
if (!frame->next)
{
- read_register_gen (regnum, raw_buffer);
+ deprecated_read_register_gen (regnum, raw_buffer);
if (lval != NULL)
*lval = lval_register;
if (addrp != NULL)
@@ -1840,7 +1831,7 @@ cfi_get_saved_register (char *raw_buffer,
switch (UNWIND_CONTEXT (frame)->reg[regnum].how)
{
case REG_CTX_UNSAVED:
- read_register_gen (regnum, raw_buffer);
+ deprecated_read_register_gen (regnum, raw_buffer);
if (lval != NULL)
*lval = not_lval;
if (optimized != NULL)
@@ -1858,8 +1849,8 @@ cfi_get_saved_register (char *raw_buffer,
UNWIND_CONTEXT (frame)->reg[regnum].loc.offset;
break;
case REG_CTX_SAVED_REG:
- read_register_gen (UNWIND_CONTEXT (frame)->reg[regnum].loc.reg,
- raw_buffer);
+ deprecated_read_register_gen (UNWIND_CONTEXT (frame)->reg[regnum].loc.reg,
+ raw_buffer);
if (lval != NULL)
*lval = lval_register;
if (addrp != NULL)
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 2963e0b..35d5d2e 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -561,135 +561,135 @@ struct field_info
/* Various complaints about symbol reading that don't abort the process */
-static struct complaint dwarf2_const_ignored =
+static struct deprecated_complaint dwarf2_const_ignored =
{
"type qualifier 'const' ignored", 0, 0
};
-static struct complaint dwarf2_volatile_ignored =
+static struct deprecated_complaint dwarf2_volatile_ignored =
{
"type qualifier 'volatile' ignored", 0, 0
};
-static struct complaint dwarf2_non_const_array_bound_ignored =
+static struct deprecated_complaint dwarf2_non_const_array_bound_ignored =
{
"non-constant array bounds form '%s' ignored", 0, 0
};
-static struct complaint dwarf2_missing_line_number_section =
+static struct deprecated_complaint dwarf2_missing_line_number_section =
{
"missing .debug_line section", 0, 0
};
-static struct complaint dwarf2_statement_list_fits_in_line_number_section =
+static struct deprecated_complaint dwarf2_statement_list_fits_in_line_number_section =
{
"statement list doesn't fit in .debug_line section", 0, 0
};
-static struct complaint dwarf2_mangled_line_number_section =
+static struct deprecated_complaint dwarf2_mangled_line_number_section =
{
"mangled .debug_line section", 0, 0
};
-static struct complaint dwarf2_unsupported_die_ref_attr =
+static struct deprecated_complaint dwarf2_unsupported_die_ref_attr =
{
"unsupported die ref attribute form: '%s'", 0, 0
};
-static struct complaint dwarf2_unsupported_stack_op =
+static struct deprecated_complaint dwarf2_unsupported_stack_op =
{
"unsupported stack op: '%s'", 0, 0
};
-static struct complaint dwarf2_complex_location_expr =
+static struct deprecated_complaint dwarf2_complex_location_expr =
{
"location expression too complex", 0, 0
};
-static struct complaint dwarf2_unsupported_tag =
+static struct deprecated_complaint dwarf2_unsupported_tag =
{
"unsupported tag: '%s'", 0, 0
};
-static struct complaint dwarf2_unsupported_at_encoding =
+static struct deprecated_complaint dwarf2_unsupported_at_encoding =
{
"unsupported DW_AT_encoding: '%s'", 0, 0
};
-static struct complaint dwarf2_unsupported_at_frame_base =
+static struct deprecated_complaint dwarf2_unsupported_at_frame_base =
{
"unsupported DW_AT_frame_base for function '%s'", 0, 0
};
-static struct complaint dwarf2_unexpected_tag =
+static struct deprecated_complaint dwarf2_unexpected_tag =
{
"unexepected tag in read_type_die: '%s'", 0, 0
};
-static struct complaint dwarf2_missing_at_frame_base =
+static struct deprecated_complaint dwarf2_missing_at_frame_base =
{
"DW_AT_frame_base missing for DW_OP_fbreg", 0, 0
};
-static struct complaint dwarf2_bad_static_member_name =
+static struct deprecated_complaint dwarf2_bad_static_member_name =
{
"unrecognized static data member name '%s'", 0, 0
};
-static struct complaint dwarf2_unsupported_accessibility =
+static struct deprecated_complaint dwarf2_unsupported_accessibility =
{
"unsupported accessibility %d", 0, 0
};
-static struct complaint dwarf2_bad_member_name_complaint =
+static struct deprecated_complaint dwarf2_bad_member_name_complaint =
{
"cannot extract member name from '%s'", 0, 0
};
-static struct complaint dwarf2_missing_member_fn_type_complaint =
+static struct deprecated_complaint dwarf2_missing_member_fn_type_complaint =
{
"member function type missing for '%s'", 0, 0
};
-static struct complaint dwarf2_vtbl_not_found_complaint =
+static struct deprecated_complaint dwarf2_vtbl_not_found_complaint =
{
"virtual function table pointer not found when defining class '%s'", 0, 0
};
-static struct complaint dwarf2_absolute_sibling_complaint =
+static struct deprecated_complaint dwarf2_absolute_sibling_complaint =
{
"ignoring absolute DW_AT_sibling", 0, 0
};
-static struct complaint dwarf2_const_value_length_mismatch =
+static struct deprecated_complaint dwarf2_const_value_length_mismatch =
{
"const value length mismatch for '%s', got %d, expected %d", 0, 0
};
-static struct complaint dwarf2_unsupported_const_value_attr =
+static struct deprecated_complaint dwarf2_unsupported_const_value_attr =
{
"unsupported const value attribute form: '%s'", 0, 0
};
-static struct complaint dwarf2_misplaced_line_number =
+static struct deprecated_complaint dwarf2_misplaced_line_number =
{
"misplaced first line number at 0x%lx for '%s'", 0, 0
};
-static struct complaint dwarf2_line_header_too_long =
+static struct deprecated_complaint dwarf2_line_header_too_long =
{
"line number info header doesn't fit in `.debug_line' section", 0, 0
};
-static struct complaint dwarf2_missing_macinfo_section =
+static struct deprecated_complaint dwarf2_missing_macinfo_section =
{
"missing .debug_macinfo section", 0, 0
};
-static struct complaint dwarf2_macros_too_long =
+static struct deprecated_complaint dwarf2_macros_too_long =
{
"macro info runs off end of `.debug_macinfo' section", 0, 0
};
-static struct complaint dwarf2_macros_not_terminated =
+static struct deprecated_complaint dwarf2_macros_not_terminated =
{
"no terminating 0-type entry for macros in `.debug_macinfo' section", 0, 0
};
-static struct complaint dwarf2_macro_outside_file =
+static struct deprecated_complaint dwarf2_macro_outside_file =
{
"debug info gives macro %s outside of any file: %s", 0, 0
};
-static struct complaint dwarf2_macro_unmatched_end_file =
+static struct deprecated_complaint dwarf2_macro_unmatched_end_file =
{
"macro debug info has an unmatched `close_file' directive", 0, 0
};
-static struct complaint dwarf2_macro_malformed_definition =
+static struct deprecated_complaint dwarf2_macro_malformed_definition =
{
"macro debug info contains a malformed macro definition:\n`%s'", 0, 0
};
-static struct complaint dwarf2_macro_spaces_in_definition =
+static struct deprecated_complaint dwarf2_macro_spaces_in_definition =
{
"macro definition contains spaces in formal argument list:\n`%s'", 0, 0
};
-static struct complaint dwarf2_invalid_attrib_class =
+static struct deprecated_complaint dwarf2_invalid_attrib_class =
{
"invalid attribute class or form for '%s' in '%s'", 0, 0
};
-static struct complaint dwarf2_invalid_pointer_size =
+static struct deprecated_complaint dwarf2_invalid_pointer_size =
{
"invalid pointer size %d", 0, 0
};
@@ -2019,7 +2019,18 @@ read_func_scope (struct die_info *die, struct objfile *objfile,
/* Make a block for the local symbols within. */
finish_block (new->name, &local_symbols, new->old_blocks,
lowpc, highpc, objfile);
- list_in_scope = &file_symbols;
+
+ /* In C++, we can have functions nested inside functions (e.g., when
+ a function declares a class that has methods). This means that
+ when we finish processing a function scope, we may need to go
+ back to building a containing block's symbol lists. */
+ local_symbols = new->locals;
+ param_symbols = new->params;
+
+ /* If we've finished processing a top-level function, subsequent
+ symbols go in the file symbol list. */
+ if (outermost_context_p ())
+ list_in_scope = &file_symbols;
}
/* Process all the DIES contained within a lexical block scope. Start
@@ -2144,6 +2155,8 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die,
/* Get type of field. */
fp->type = die_type (die, objfile, cu_header);
+ FIELD_STATIC_KIND (*fp) = 0;
+
/* Get bit size of field (zero if none). */
attr = dwarf_attr (die, DW_AT_bit_size);
if (attr)
@@ -2250,6 +2263,7 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die,
FIELD_BITPOS (*fp) = (decode_locdesc (DW_BLOCK (attr), objfile, cu_header)
* bits_per_byte);
FIELD_BITSIZE (*fp) = 0;
+ FIELD_STATIC_KIND (*fp) = 0;
FIELD_TYPE (*fp) = die_type (die, objfile, cu_header);
FIELD_NAME (*fp) = type_name_no_tag (fp->type);
fip->nbaseclasses++;
@@ -2753,6 +2767,7 @@ read_enumeration (struct die_info *die, struct objfile *objfile,
FIELD_TYPE (fields[num_fields]) = NULL;
FIELD_BITPOS (fields[num_fields]) = SYMBOL_VALUE (sym);
FIELD_BITSIZE (fields[num_fields]) = 0;
+ FIELD_STATIC_KIND (fields[num_fields]) = 0;
num_fields++;
}
diff --git a/gdb/dwarfread.c b/gdb/dwarfread.c
index 975c9af..a54e684 100644
--- a/gdb/dwarfread.c
+++ b/gdb/dwarfread.c
@@ -62,112 +62,112 @@
/* Complaints that can be issued during DWARF debug info reading. */
-struct complaint no_bfd_get_N =
+struct deprecated_complaint no_bfd_get_N =
{
"DIE @ 0x%x \"%s\", no bfd support for %d byte data object", 0, 0
};
-struct complaint malformed_die =
+struct deprecated_complaint malformed_die =
{
"DIE @ 0x%x \"%s\", malformed DIE, bad length (%d bytes)", 0, 0
};
-struct complaint bad_die_ref =
+struct deprecated_complaint bad_die_ref =
{
"DIE @ 0x%x \"%s\", reference to DIE (0x%x) outside compilation unit", 0, 0
};
-struct complaint unknown_attribute_form =
+struct deprecated_complaint unknown_attribute_form =
{
"DIE @ 0x%x \"%s\", unknown attribute form (0x%x)", 0, 0
};
-struct complaint unknown_attribute_length =
+struct deprecated_complaint unknown_attribute_length =
{
"DIE @ 0x%x \"%s\", unknown attribute length, skipped remaining attributes", 0, 0
};
-struct complaint unexpected_fund_type =
+struct deprecated_complaint unexpected_fund_type =
{
"DIE @ 0x%x \"%s\", unexpected fundamental type 0x%x", 0, 0
};
-struct complaint unknown_type_modifier =
+struct deprecated_complaint unknown_type_modifier =
{
"DIE @ 0x%x \"%s\", unknown type modifier %u", 0, 0
};
-struct complaint volatile_ignored =
+struct deprecated_complaint volatile_ignored =
{
"DIE @ 0x%x \"%s\", type modifier 'volatile' ignored", 0, 0
};
-struct complaint const_ignored =
+struct deprecated_complaint const_ignored =
{
"DIE @ 0x%x \"%s\", type modifier 'const' ignored", 0, 0
};
-struct complaint botched_modified_type =
+struct deprecated_complaint botched_modified_type =
{
"DIE @ 0x%x \"%s\", botched modified type decoding (mtype 0x%x)", 0, 0
};
-struct complaint op_deref2 =
+struct deprecated_complaint op_deref2 =
{
"DIE @ 0x%x \"%s\", OP_DEREF2 address 0x%x not handled", 0, 0
};
-struct complaint op_deref4 =
+struct deprecated_complaint op_deref4 =
{
"DIE @ 0x%x \"%s\", OP_DEREF4 address 0x%x not handled", 0, 0
};
-struct complaint basereg_not_handled =
+struct deprecated_complaint basereg_not_handled =
{
"DIE @ 0x%x \"%s\", BASEREG %d not handled", 0, 0
};
-struct complaint dup_user_type_allocation =
+struct deprecated_complaint dup_user_type_allocation =
{
"DIE @ 0x%x \"%s\", internal error: duplicate user type allocation", 0, 0
};
-struct complaint dup_user_type_definition =
+struct deprecated_complaint dup_user_type_definition =
{
"DIE @ 0x%x \"%s\", internal error: duplicate user type definition", 0, 0
};
-struct complaint missing_tag =
+struct deprecated_complaint missing_tag =
{
"DIE @ 0x%x \"%s\", missing class, structure, or union tag", 0, 0
};
-struct complaint bad_array_element_type =
+struct deprecated_complaint bad_array_element_type =
{
"DIE @ 0x%x \"%s\", bad array element type attribute 0x%x", 0, 0
};
-struct complaint subscript_data_items =
+struct deprecated_complaint subscript_data_items =
{
"DIE @ 0x%x \"%s\", can't decode subscript data items", 0, 0
};
-struct complaint unhandled_array_subscript_format =
+struct deprecated_complaint unhandled_array_subscript_format =
{
"DIE @ 0x%x \"%s\", array subscript format 0x%x not handled yet", 0, 0
};
-struct complaint unknown_array_subscript_format =
+struct deprecated_complaint unknown_array_subscript_format =
{
"DIE @ 0x%x \"%s\", unknown array subscript format %x", 0, 0
};
-struct complaint not_row_major =
+struct deprecated_complaint not_row_major =
{
"DIE @ 0x%x \"%s\", array not row major; not handled correctly", 0, 0
};
-struct complaint missing_at_name =
+struct deprecated_complaint missing_at_name =
{
"DIE @ 0x%x, AT_name tag missing", 0, 0
};
@@ -1027,6 +1027,7 @@ struct_type (struct dieinfo *dip, char *thisdie, char *enddie,
&objfile->type_obstack);
FIELD_TYPE (list->field) = decode_die_type (&mbr);
FIELD_BITPOS (list->field) = 8 * locval (&mbr);
+ FIELD_STATIC_KIND (list->field) = 0;
/* Handle bit fields. */
FIELD_BITSIZE (list->field) = mbr.at_bit_size;
if (BITS_BIG_ENDIAN)
@@ -1694,6 +1695,7 @@ enum_type (struct dieinfo *dip, struct objfile *objfile)
list = new;
FIELD_TYPE (list->field) = NULL;
FIELD_BITSIZE (list->field) = 0;
+ FIELD_STATIC_KIND (list->field) = 0;
FIELD_BITPOS (list->field) =
target_to_host (scan, TARGET_FT_LONG_SIZE (objfile), GET_SIGNED,
objfile);
diff --git a/gdb/elfread.c b/gdb/elfread.c
index 7d37297..a29a71b 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -54,16 +54,16 @@ struct elfinfo
/* Various things we might complain about... */
-struct complaint section_info_complaint =
+struct deprecated_complaint section_info_complaint =
{"elf/stab section information %s without a preceding file symbol", 0, 0};
-struct complaint section_info_dup_complaint =
+struct deprecated_complaint section_info_dup_complaint =
{"duplicated elf/stab section information for %s", 0, 0};
-struct complaint stab_info_mismatch_complaint =
+struct deprecated_complaint stab_info_mismatch_complaint =
{"elf/stab section information missing for %s", 0, 0};
-struct complaint stab_info_questionable_complaint =
+struct deprecated_complaint stab_info_questionable_complaint =
{"elf/stab section information questionable for %s", 0, 0};
static void free_elfinfo (void *);
diff --git a/gdb/event-loop.c b/gdb/event-loop.c
index 0fa37c1..c8d12f9 100644
--- a/gdb/event-loop.c
+++ b/gdb/event-loop.c
@@ -1,5 +1,5 @@
/* Event loop machinery for GDB, the GNU debugger.
- Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Written by Elena Zannoni <ezannoni@cygnus.com> of Cygnus Solutions.
This file is part of GDB.
@@ -397,6 +397,11 @@ start_event_loop (void)
gdb_result = catch_errors (gdb_do_one_event, 0, "", RETURN_MASK_ALL);
if (gdb_result < 0)
break;
+
+ /* If we long-jumped out of do_one_event, we probably
+ didn't get around to resetting the prompt, which leaves
+ readline in a messed-up state. Reset it here. */
+
if (gdb_result == 0)
{
/* FIXME: this should really be a call to a hook that is
diff --git a/gdb/event-top.c b/gdb/event-top.c
index 9d871d6..8f39998 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -1168,14 +1168,39 @@ gdb_setup_readline (void)
}
}
+/* Disable command input through the standard CLI channels. Used in
+ the suspend proc for interpreters that use the standard gdb readline
+ interface, like the cli & the mi. */
+void
+gdb_disable_readline (void)
+{
+ if (event_loop_p)
+ {
+ /* FIXME - It is too heavyweight to delete and remake these
+ every time you run an interpreter that needs readline.
+ It is probably better to have the interpreters cache these,
+ which in turn means that this needs to be moved into interpreter
+ specific code. */
+
+#if 0
+ ui_file_delete (gdb_stdout);
+ ui_file_delete (gdb_stderr);
+ gdb_stdlog = NULL;
+ gdb_stdtarg = NULL;
+#endif
+
+ rl_callback_handler_remove ();
+ delete_file_handler (input_fd);
+ }
+}
+
void
_initialize_event_loop (void)
{
gdb_setup_readline ();
+ /* Tell gdb to use the cli_command_loop as the main loop. */
if (event_loop_p && command_loop_hook == NULL)
- {
- /* Tell gdb to use the cli_command_loop as the main loop. */
- command_loop_hook = cli_command_loop;
- }
+ command_loop_hook = cli_command_loop;
}
+
diff --git a/gdb/f-exp.y b/gdb/f-exp.y
index 57db6fa..17693f7 100644
--- a/gdb/f-exp.y
+++ b/gdb/f-exp.y
@@ -242,9 +242,11 @@ exp : '(' exp ')'
/* Expressions, not including the comma operator. */
exp : '*' exp %prec UNARY
{ write_exp_elt_opcode (UNOP_IND); }
+ ;
exp : '&' exp %prec UNARY
{ write_exp_elt_opcode (UNOP_ADDR); }
+ ;
exp : '-' exp %prec UNARY
{ write_exp_elt_opcode (UNOP_NEG); }
@@ -284,6 +286,7 @@ arglist : exp
arglist : substring
{ arglist_len = 2;}
+ ;
arglist : arglist ',' exp %prec ABOVE_COMMA
{ arglist_len++; }
diff --git a/gdb/findvar.c b/gdb/findvar.c
index 1a952f7..e375c2a 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -545,14 +545,6 @@ addresses have not been bound by the dynamic loader. Try again when executable i
case LOC_THREAD_LOCAL_STATIC:
{
-#if 0
- /* FIXME: ezannoni 2002-10-21: Temporarly disable the code
- below, until the rest of the TLS support code is checked
- in. */
-
- /* We want to let the target / ABI-specific code construct
- this value for us, so we need to dispose of the value
- allocated for us above. */
if (target_get_thread_local_address_p ())
addr = target_get_thread_local_address (inferior_ptid,
SYMBOL_OBJFILE (var),
@@ -561,7 +553,6 @@ addresses have not been bound by the dynamic loader. Try again when executable i
finding TLS is an ABI-specific thing. But we don't do that
yet. */
else
-#endif
error ("Cannot find thread-local variables on this target");
break;
}
diff --git a/gdb/frame.c b/gdb/frame.c
index 1ad3b09..bfefc77 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -29,6 +29,10 @@
#include "gdb_assert.h"
#include "gdb_string.h"
#include "builtin-regs.h"
+#include "gdb_obstack.h"
+#include "dummy-frame.h"
+#include "gdbcore.h"
+#include "annotate.h"
/* Return a frame uniq ID that can be used to, later re-find the
frame. */
@@ -115,7 +119,7 @@ frame_register_unwind (struct frame_info *frame, int regnum,
available? */
*realnump = regnum;
if (bufferp)
- read_register_gen (regnum, bufferp);
+ deprecated_read_register_gen (regnum, bufferp);
return;
}
@@ -125,6 +129,66 @@ frame_register_unwind (struct frame_info *frame, int regnum,
}
void
+frame_register (struct frame_info *frame, int regnum,
+ int *optimizedp, enum lval_type *lvalp,
+ CORE_ADDR *addrp, int *realnump, void *bufferp)
+{
+ /* Require all but BUFFERP to be valid. A NULL BUFFERP indicates
+ that the value proper does not need to be fetched. */
+ gdb_assert (optimizedp != NULL);
+ gdb_assert (lvalp != NULL);
+ gdb_assert (addrp != NULL);
+ gdb_assert (realnump != NULL);
+ /* gdb_assert (bufferp != NULL); */
+
+ /* Ulgh! Old code that, for lval_register, sets ADDRP to the offset
+ of the register in the register cache. It should instead return
+ the REGNUM corresponding to that register. Translate the . */
+ if (GET_SAVED_REGISTER_P ())
+ {
+ GET_SAVED_REGISTER (bufferp, optimizedp, addrp, frame, regnum, lvalp);
+ /* Compute the REALNUM if the caller wants it. */
+ if (*lvalp == lval_register)
+ {
+ int regnum;
+ for (regnum = 0; regnum < NUM_REGS + NUM_PSEUDO_REGS; regnum++)
+ {
+ if (*addrp == register_offset_hack (current_gdbarch, regnum))
+ {
+ *realnump = regnum;
+ return;
+ }
+ }
+ internal_error (__FILE__, __LINE__,
+ "Failed to compute the register number corresponding"
+ " to 0x%s", paddr_d (*addrp));
+ }
+ *realnump = -1;
+ return;
+ }
+
+ /* Reached the the bottom (youngest, inner most) of the frame chain
+ (youngest, inner most) frame, go direct to the hardware register
+ cache (do not pass go, do not try to cache the value, ...). The
+ unwound value would have been cached in frame->next but that
+ doesn't exist. This doesn't matter as the hardware register
+ cache is stopping any unnecessary accesses to the target. */
+
+ /* NOTE: cagney/2002-04-14: It would be nice if, instead of a
+ special case, there was always an inner frame dedicated to the
+ hardware registers. Unfortunatly, there is too much unwind code
+ around that looks up/down the frame chain while making the
+ assumption that each frame level is using the same unwind code. */
+
+ if (frame == NULL)
+ frame_register_unwind (NULL, regnum, optimizedp, lvalp, addrp, realnump,
+ bufferp);
+ else
+ frame_register_unwind (frame->next, regnum, optimizedp, lvalp, addrp,
+ realnump, bufferp);
+}
+
+void
frame_unwind_signed_register (struct frame_info *frame, int regnum,
LONGEST *val)
{
@@ -153,6 +217,40 @@ frame_unwind_unsigned_register (struct frame_info *frame, int regnum,
}
void
+frame_read_unsigned_register (struct frame_info *frame, int regnum,
+ ULONGEST *val)
+{
+ /* NOTE: cagney/2002-10-31: There is a bit of dogma here - there is
+ always a frame. Both this, and the equivalent
+ frame_read_signed_register() function, can only be called with a
+ valid frame. If, for some reason, this function is called
+ without a frame then the problem isn't here, but rather in the
+ caller. It should of first created a frame and then passed that
+ in. */
+ /* NOTE: cagney/2002-10-31: As a side bar, keep in mind that the
+ ``current_frame'' should not be treated as a special case. While
+ ``get_next_frame (current_frame) == NULL'' currently holds, it
+ should, as far as possible, not be relied upon. In the future,
+ ``get_next_frame (current_frame)'' may instead simply return a
+ normal frame object that simply always gets register values from
+ the register cache. Consequently, frame code should try to avoid
+ tests like ``if get_next_frame() == NULL'' and instead just rely
+ on recursive frame calls (like the below code) when manipulating
+ a frame chain. */
+ gdb_assert (frame != NULL);
+ frame_unwind_unsigned_register (get_next_frame (frame), regnum, val);
+}
+
+void
+frame_read_signed_register (struct frame_info *frame, int regnum,
+ LONGEST *val)
+{
+ /* See note in frame_read_unsigned_register(). */
+ gdb_assert (frame != NULL);
+ frame_unwind_signed_register (get_next_frame (frame), regnum, val);
+}
+
+void
generic_unwind_get_saved_register (char *raw_buffer,
int *optimizedp,
CORE_ADDR *addrp,
@@ -206,7 +304,13 @@ get_saved_register (char *raw_buffer,
int regnum,
enum lval_type *lval)
{
- GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval);
+ if (GET_SAVED_REGISTER_P ())
+ {
+ GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval);
+ return;
+ }
+ generic_unwind_get_saved_register (raw_buffer, optimized, addrp, frame,
+ regnum, lval);
}
/* frame_register_read ()
@@ -219,9 +323,11 @@ get_saved_register (char *raw_buffer,
int
frame_register_read (struct frame_info *frame, int regnum, void *myaddr)
{
- int optim;
- get_saved_register (myaddr, &optim, (CORE_ADDR *) NULL, frame,
- regnum, (enum lval_type *) NULL);
+ int optimized;
+ enum lval_type lval;
+ CORE_ADDR addr;
+ int realnum;
+ frame_register (frame, regnum, &optimized, &lval, &addr, &realnum, myaddr);
/* FIXME: cagney/2002-05-15: This test, is just bogus.
@@ -233,7 +339,7 @@ frame_register_read (struct frame_info *frame, int regnum, void *myaddr)
if (register_cached (regnum) < 0)
return 0; /* register value not available */
- return !optim;
+ return !optimized;
}
@@ -276,3 +382,583 @@ frame_map_regnum_to_name (int regnum)
return REGISTER_NAME (regnum);
return builtin_reg_map_regnum_to_name (regnum);
}
+
+/* Info about the innermost stack frame (contents of FP register) */
+
+static struct frame_info *current_frame;
+
+/* Cache for frame addresses already read by gdb. Valid only while
+ inferior is stopped. Control variables for the frame cache should
+ be local to this module. */
+
+static struct obstack frame_cache_obstack;
+
+void *
+frame_obstack_alloc (unsigned long size)
+{
+ return obstack_alloc (&frame_cache_obstack, size);
+}
+
+void
+frame_saved_regs_zalloc (struct frame_info *fi)
+{
+ fi->saved_regs = (CORE_ADDR *)
+ frame_obstack_alloc (SIZEOF_FRAME_SAVED_REGS);
+ memset (fi->saved_regs, 0, SIZEOF_FRAME_SAVED_REGS);
+}
+
+
+/* Return the innermost (currently executing) stack frame. */
+
+struct frame_info *
+get_current_frame (void)
+{
+ if (current_frame == NULL)
+ {
+ if (target_has_stack)
+ current_frame = create_new_frame (read_fp (), read_pc ());
+ else
+ error ("No stack.");
+ }
+ return current_frame;
+}
+
+void
+set_current_frame (struct frame_info *frame)
+{
+ current_frame = frame;
+}
+
+/* Return the register saved in the simplistic ``saved_regs'' cache.
+ If the value isn't here AND a value is needed, try the next inner
+ most frame. */
+
+static void
+frame_saved_regs_register_unwind (struct frame_info *frame, void **cache,
+ int regnum, int *optimizedp,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realnump, void *bufferp)
+{
+ /* There is always a frame at this point. And THIS is the frame
+ we're interested in. */
+ gdb_assert (frame != NULL);
+ /* If we're using generic dummy frames, we'd better not be in a call
+ dummy. (generic_call_dummy_register_unwind ought to have been called
+ instead.) */
+ gdb_assert (!(USE_GENERIC_DUMMY_FRAMES
+ && PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame)));
+
+ /* Load the saved_regs register cache. */
+ if (frame->saved_regs == NULL)
+ FRAME_INIT_SAVED_REGS (frame);
+
+ if (frame->saved_regs != NULL
+ && frame->saved_regs[regnum] != 0)
+ {
+ if (regnum == SP_REGNUM)
+ {
+ /* SP register treated specially. */
+ *optimizedp = 0;
+ *lvalp = not_lval;
+ *addrp = 0;
+ *realnump = -1;
+ if (bufferp != NULL)
+ store_address (bufferp, REGISTER_RAW_SIZE (regnum),
+ frame->saved_regs[regnum]);
+ }
+ else
+ {
+ /* Any other register is saved in memory, fetch it but cache
+ a local copy of its value. */
+ *optimizedp = 0;
+ *lvalp = lval_memory;
+ *addrp = frame->saved_regs[regnum];
+ *realnump = -1;
+ if (bufferp != NULL)
+ {
+#if 1
+ /* Save each register value, as it is read in, in a
+ frame based cache. */
+ void **regs = (*cache);
+ if (regs == NULL)
+ {
+ int sizeof_cache = ((NUM_REGS + NUM_PSEUDO_REGS)
+ * sizeof (void *));
+ regs = frame_obstack_alloc (sizeof_cache);
+ memset (regs, 0, sizeof_cache);
+ (*cache) = regs;
+ }
+ if (regs[regnum] == NULL)
+ {
+ regs[regnum]
+ = frame_obstack_alloc (REGISTER_RAW_SIZE (regnum));
+ read_memory (frame->saved_regs[regnum], regs[regnum],
+ REGISTER_RAW_SIZE (regnum));
+ }
+ memcpy (bufferp, regs[regnum], REGISTER_RAW_SIZE (regnum));
+#else
+ /* Read the value in from memory. */
+ read_memory (frame->saved_regs[regnum], bufferp,
+ REGISTER_RAW_SIZE (regnum));
+#endif
+ }
+ }
+ return;
+ }
+
+ /* No luck, assume this and the next frame have the same register
+ value. If a value is needed, pass the request on down the chain;
+ otherwise just return an indication that the value is in the same
+ register as the next frame. */
+ if (bufferp == NULL)
+ {
+ *optimizedp = 0;
+ *lvalp = lval_register;
+ *addrp = 0;
+ *realnump = regnum;
+ }
+ else
+ {
+ frame_register_unwind (frame->next, regnum, optimizedp, lvalp, addrp,
+ realnump, bufferp);
+ }
+}
+
+/* Function: get_saved_register
+ Find register number REGNUM relative to FRAME and put its (raw,
+ target format) contents in *RAW_BUFFER.
+
+ Set *OPTIMIZED if the variable was optimized out (and thus can't be
+ fetched). Note that this is never set to anything other than zero
+ in this implementation.
+
+ Set *LVAL to lval_memory, lval_register, or not_lval, depending on
+ whether the value was fetched from memory, from a register, or in a
+ strange and non-modifiable way (e.g. a frame pointer which was
+ calculated rather than fetched). We will use not_lval for values
+ fetched from generic dummy frames.
+
+ Set *ADDRP to the address, either in memory or as a REGISTER_BYTE
+ offset into the registers array. If the value is stored in a dummy
+ frame, set *ADDRP to zero.
+
+ To use this implementation, define a function called
+ "get_saved_register" in your target code, which simply passes all
+ of its arguments to this function.
+
+ The argument RAW_BUFFER must point to aligned memory. */
+
+void
+deprecated_generic_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;
+
+ /* Note: since the current frame's registers could only have been
+ saved by frames INTERIOR TO the current frame, we skip examining
+ the current frame itself: otherwise, we would be getting the
+ previous frame's registers which were saved by the current frame. */
+
+ while (frame && ((frame = frame->next) != NULL))
+ {
+ if (PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame))
+ {
+ if (lval) /* found it in a CALL_DUMMY frame */
+ *lval = not_lval;
+ if (raw_buffer)
+ /* FIXME: cagney/2002-06-26: This should be via the
+ gdbarch_register_read() method so that it, on the fly,
+ constructs either a raw or pseudo register from the raw
+ register cache. */
+ regcache_raw_read (generic_find_dummy_frame (frame->pc,
+ frame->frame),
+ regnum, raw_buffer);
+ return;
+ }
+
+ FRAME_INIT_SAVED_REGS (frame);
+ if (frame->saved_regs != NULL
+ && frame->saved_regs[regnum] != 0)
+ {
+ if (lval) /* found it saved on the stack */
+ *lval = lval_memory;
+ if (regnum == SP_REGNUM)
+ {
+ if (raw_buffer) /* SP register treated specially */
+ store_address (raw_buffer, REGISTER_RAW_SIZE (regnum),
+ frame->saved_regs[regnum]);
+ }
+ else
+ {
+ if (addrp) /* any other register */
+ *addrp = frame->saved_regs[regnum];
+ if (raw_buffer)
+ read_memory (frame->saved_regs[regnum], raw_buffer,
+ REGISTER_RAW_SIZE (regnum));
+ }
+ return;
+ }
+ }
+
+ /* If we get thru the loop to this point, it means the register was
+ not saved in any frame. Return the actual live-register value. */
+
+ if (lval) /* found it in a live register */
+ *lval = lval_register;
+ if (addrp)
+ *addrp = REGISTER_BYTE (regnum);
+ if (raw_buffer)
+ deprecated_read_register_gen (regnum, raw_buffer);
+}
+
+/* Using the PC, select a mechanism for unwinding a frame returning
+ the previous frame. The register unwind function should, on
+ demand, initialize the ->context object. */
+
+static void
+set_unwind_by_pc (CORE_ADDR pc, CORE_ADDR fp,
+ frame_register_unwind_ftype **unwind)
+{
+ if (!USE_GENERIC_DUMMY_FRAMES)
+ /* Still need to set this to something. The ``info frame'' code
+ calls this function to find out where the saved registers are.
+ Hopefully this is robust enough to stop any core dumps and
+ return vaguely correct values.. */
+ *unwind = frame_saved_regs_register_unwind;
+ else if (PC_IN_CALL_DUMMY (pc, fp, fp))
+ *unwind = dummy_frame_register_unwind;
+ else
+ *unwind = frame_saved_regs_register_unwind;
+}
+
+/* Create an arbitrary (i.e. address specified by user) or innermost frame.
+ Always returns a non-NULL value. */
+
+struct frame_info *
+create_new_frame (CORE_ADDR addr, CORE_ADDR pc)
+{
+ struct frame_info *fi;
+ char *name;
+
+ fi = (struct frame_info *)
+ obstack_alloc (&frame_cache_obstack,
+ sizeof (struct frame_info));
+
+ /* Zero all fields by default. */
+ memset (fi, 0, sizeof (struct frame_info));
+
+ fi->frame = addr;
+ fi->pc = pc;
+ find_pc_partial_function (pc, &name, (CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
+ fi->signal_handler_caller = PC_IN_SIGTRAMP (fi->pc, name);
+
+ if (INIT_EXTRA_FRAME_INFO_P ())
+ INIT_EXTRA_FRAME_INFO (0, fi);
+
+ /* Select/initialize an unwind function. */
+ set_unwind_by_pc (fi->pc, fi->frame, &fi->register_unwind);
+
+ return fi;
+}
+
+/* Return the frame that FRAME calls (NULL if FRAME is the innermost
+ frame). */
+
+struct frame_info *
+get_next_frame (struct frame_info *frame)
+{
+ return frame->next;
+}
+
+/* Flush the entire frame cache. */
+
+void
+flush_cached_frames (void)
+{
+ /* Since we can't really be sure what the first object allocated was */
+ obstack_free (&frame_cache_obstack, 0);
+ obstack_init (&frame_cache_obstack);
+
+ current_frame = NULL; /* Invalidate cache */
+ select_frame (NULL);
+ annotate_frames_invalid ();
+}
+
+/* Flush the frame cache, and start a new one if necessary. */
+
+void
+reinit_frame_cache (void)
+{
+ flush_cached_frames ();
+
+ /* FIXME: The inferior_ptid test is wrong if there is a corefile. */
+ if (PIDGET (inferior_ptid) != 0)
+ {
+ select_frame (get_current_frame ());
+ }
+}
+
+/* Return a structure containing various interesting information
+ about the frame that called NEXT_FRAME. Returns NULL
+ if there is no such frame. */
+
+struct frame_info *
+get_prev_frame (struct frame_info *next_frame)
+{
+ CORE_ADDR address = 0;
+ struct frame_info *prev;
+ int fromleaf;
+ char *name;
+
+ /* Return the inner-most frame, when the caller passes in NULL. */
+ /* NOTE: cagney/2002-11-09: Not sure how this would happen. The
+ caller should have previously obtained a valid frame using
+ get_selected_frame() and then called this code - only possibility
+ I can think of is code behaving badly. */
+ if (next_frame == NULL)
+ {
+ /* NOTE: cagney/2002-11-09: There was a code segment here that
+ would error out when CURRENT_FRAME was NULL. The comment
+ that went with it made the claim ...
+
+ ``This screws value_of_variable, which just wants a nice
+ clean NULL return from block_innermost_frame if there are no
+ frames. I don't think I've ever seen this message happen
+ otherwise. And returning NULL here is a perfectly legitimate
+ thing to do.''
+
+ Per the above, this code shouldn't even be called with a NULL
+ NEXT_FRAME. */
+ return current_frame;
+ }
+
+ /* Only try to do the unwind once. */
+ if (next_frame->prev_p)
+ return next_frame->prev;
+ next_frame->prev_p = 1;
+
+ /* On some machines it is possible to call a function without
+ setting up a stack frame for it. On these machines, we
+ define this macro to take two args; a frameinfo pointer
+ identifying a frame and a variable to set or clear if it is
+ or isn't leafless. */
+
+ /* Still don't want to worry about this except on the innermost
+ frame. This macro will set FROMLEAF if NEXT_FRAME is a frameless
+ function invocation. */
+ if (next_frame->next == NULL)
+ /* FIXME: 2002-11-09: Frameless functions can occure anywhere in
+ the frame chain, not just the inner most frame! The generic,
+ per-architecture, frame code should handle this and the below
+ should simply be removed. */
+ fromleaf = FRAMELESS_FUNCTION_INVOCATION (next_frame);
+ else
+ fromleaf = 0;
+
+ if (fromleaf)
+ /* A frameless inner-most frame. The `FP' (which isn't an
+ architecture frame-pointer register!) of the caller is the same
+ as the callee. */
+ /* FIXME: 2002-11-09: There isn't any reason to special case this
+ edge condition. Instead the per-architecture code should hande
+ it locally. */
+ address = FRAME_FP (next_frame);
+ else
+ {
+ /* Two macros defined in tm.h specify the machine-dependent
+ actions to be performed here.
+
+ First, get the frame's chain-pointer.
+
+ If that is zero, the frame is the outermost frame or a leaf
+ called by the outermost frame. This means that if start
+ calls main without a frame, we'll return 0 (which is fine
+ anyway).
+
+ Nope; there's a problem. This also returns when the current
+ routine is a leaf of main. This is unacceptable. We move
+ 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. */
+ address = FRAME_CHAIN (next_frame);
+
+ /* FIXME: cagney/2002-06-08: There should be two tests here.
+ The first would check for a valid frame chain based on a user
+ selectable policy. The default being ``stop at main'' (as
+ implemented by generic_func_frame_chain_valid()). Other
+ policies would be available - stop at NULL, .... The second
+ test, if provided by the target architecture, would check for
+ more exotic cases - most target architectures wouldn't bother
+ with this second case. */
+ if (!FRAME_CHAIN_VALID (address, next_frame))
+ return 0;
+ }
+ if (address == 0)
+ return 0;
+
+ /* Create an initially zero previous frame. */
+ prev = (struct frame_info *)
+ obstack_alloc (&frame_cache_obstack,
+ sizeof (struct frame_info));
+ memset (prev, 0, sizeof (struct frame_info));
+
+ /* Link it in. */
+ next_frame->prev = prev;
+ prev->next = next_frame;
+ prev->frame = address;
+ prev->level = next_frame->level + 1;
+
+ /* This change should not be needed, FIXME! We should determine
+ whether any targets *need* INIT_FRAME_PC to happen after
+ INIT_EXTRA_FRAME_INFO and come up with a simple way to express
+ what goes on here.
+
+ INIT_EXTRA_FRAME_INFO is called from two places: create_new_frame
+ (where the PC is already set up) and here (where it isn't).
+ INIT_FRAME_PC is only called from here, always after
+ INIT_EXTRA_FRAME_INFO.
+
+ The catch is the MIPS, where INIT_EXTRA_FRAME_INFO requires the
+ PC value (which hasn't been set yet). Some other machines appear
+ to require INIT_EXTRA_FRAME_INFO before they can do
+ INIT_FRAME_PC. Phoo.
+
+ We shouldn't need INIT_FRAME_PC_FIRST to add more complication to
+ an already overcomplicated part of GDB. gnu@cygnus.com, 15Sep92.
+
+ Assuming that some machines need INIT_FRAME_PC after
+ INIT_EXTRA_FRAME_INFO, one possible scheme:
+
+ SETUP_INNERMOST_FRAME(): Default version is just create_new_frame
+ (read_fp ()), read_pc ()). Machines with extra frame info would
+ do that (or the local equivalent) and then set the extra fields.
+
+ SETUP_ARBITRARY_FRAME(argc, argv): Only change here is that
+ create_new_frame would no longer init extra frame info;
+ SETUP_ARBITRARY_FRAME would have to do that.
+
+ INIT_PREV_FRAME(fromleaf, prev) Replace INIT_EXTRA_FRAME_INFO and
+ INIT_FRAME_PC. This should also return a flag saying whether to
+ keep the new frame, or whether to discard it, because on some
+ machines (e.g. mips) it is really awkward to have
+ FRAME_CHAIN_VALID called *before* INIT_EXTRA_FRAME_INFO (there is
+ no good way to get information deduced in FRAME_CHAIN_VALID into
+ the extra fields of the new frame). std_frame_pc(fromleaf, prev)
+
+ This is the default setting for INIT_PREV_FRAME. It just does
+ what the default INIT_FRAME_PC does. Some machines will call it
+ from INIT_PREV_FRAME (either at the beginning, the end, or in the
+ middle). Some machines won't use it.
+
+ kingdon@cygnus.com, 13Apr93, 31Jan94, 14Dec94. */
+
+ /* NOTE: cagney/2002-11-09: Just ignore the above! There is no
+ reason for things to be this complicated.
+
+ The trick is to assume that there is always a frame. Instead of
+ special casing the inner-most frame, create fake frame
+ (containing the hardware registers) that is inner to the
+ user-visible inner-most frame (...) and then unwind from that.
+ That way architecture code can use use the standard
+ frame_XX_unwind() functions and not differentiate between the
+ inner most and any other case.
+
+ Since there is always a frame to unwind from, there is always
+ somewhere (NEXT_FRAME) to store all the info needed to construct
+ a new (previous) frame without having to first create it. This
+ means that the convolution below - needing to carefully order a
+ frame's initialization - isn't needed.
+
+ The irony here though, is that FRAME_CHAIN(), at least for a more
+ up-to-date architecture, always calls FRAME_SAVED_PC(), and
+ FRAME_SAVED_PC() computes the PC but without first needing the
+ frame! Instead of the convolution below, we could have simply
+ called FRAME_SAVED_PC() and been done with it! Note that
+ FRAME_SAVED_PC() is being superseed by frame_pc_unwind() and that
+ function does have somewhere to cache that PC value. */
+
+ INIT_FRAME_PC_FIRST (fromleaf, prev);
+
+ if (INIT_EXTRA_FRAME_INFO_P ())
+ INIT_EXTRA_FRAME_INFO (fromleaf, prev);
+
+ /* This entry is in the frame queue now, which is good since
+ FRAME_SAVED_PC may use that queue to figure out its value (see
+ tm-sparc.h). We want the pc saved in the inferior frame. */
+ INIT_FRAME_PC (fromleaf, prev);
+
+ /* If ->frame and ->pc are unchanged, we are in the process of
+ getting ourselves into an infinite backtrace. Some architectures
+ check this in FRAME_CHAIN or thereabouts, but it seems like there
+ is no reason this can't be an architecture-independent check. */
+ if (prev->frame == next_frame->frame
+ && prev->pc == next_frame->pc)
+ {
+ next_frame->prev = NULL;
+ obstack_free (&frame_cache_obstack, prev);
+ return NULL;
+ }
+
+ /* Initialize the code used to unwind the frame PREV based on the PC
+ (and probably other architectural information). The PC lets you
+ check things like the debug info at that point (dwarf2cfi?) and
+ use that to decide how the frame should be unwound. */
+ set_unwind_by_pc (prev->pc, prev->frame, &prev->register_unwind);
+
+ find_pc_partial_function (prev->pc, &name,
+ (CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
+ if (PC_IN_SIGTRAMP (prev->pc, name))
+ prev->signal_handler_caller = 1;
+
+ return prev;
+}
+
+CORE_ADDR
+get_frame_pc (struct frame_info *frame)
+{
+ return frame->pc;
+}
+
+#ifdef FRAME_FIND_SAVED_REGS
+/* XXX - deprecated. This is a compatibility function for targets
+ that do not yet implement FRAME_INIT_SAVED_REGS. */
+/* Find the addresses in which registers are saved in FRAME. */
+
+void
+get_frame_saved_regs (struct frame_info *frame,
+ struct frame_saved_regs *saved_regs_addr)
+{
+ if (frame->saved_regs == NULL)
+ {
+ frame->saved_regs = (CORE_ADDR *)
+ frame_obstack_alloc (SIZEOF_FRAME_SAVED_REGS);
+ }
+ if (saved_regs_addr == NULL)
+ {
+ struct frame_saved_regs saved_regs;
+ FRAME_FIND_SAVED_REGS (frame, saved_regs);
+ memcpy (frame->saved_regs, &saved_regs, SIZEOF_FRAME_SAVED_REGS);
+ }
+ else
+ {
+ FRAME_FIND_SAVED_REGS (frame, *saved_regs_addr);
+ memcpy (frame->saved_regs, saved_regs_addr, SIZEOF_FRAME_SAVED_REGS);
+ }
+}
+#endif
+
+void
+_initialize_frame (void)
+{
+ obstack_init (&frame_cache_obstack);
+}
diff --git a/gdb/frame.h b/gdb/frame.h
index 849566b..70d85f1 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -23,6 +23,123 @@
#if !defined (FRAME_H)
#define FRAME_H 1
+/* The frame object. */
+
+struct frame_info;
+
+/* The frame object's ID. This provides a per-frame unique identifier
+ that can be used to relocate a `struct frame_info' after a target
+ resume or a frame cache destruct (assuming the target hasn't
+ unwound the stack past that frame - a problem handled elsewhere). */
+
+struct frame_id
+{
+ /* The frame's address. This should be constant through out the
+ lifetime of a frame. */
+ /* NOTE: cagney/2002-11-16: The ia64 has two stacks and hence two
+ frame bases. This will need to be expanded to accomodate that. */
+ CORE_ADDR base;
+ /* The frame's current PC. While the PC within the function may
+ change, the function that contains the PC does not. Should this
+ instead be the frame's function? */
+ CORE_ADDR pc;
+};
+
+/* For every stopped thread, GDB tracks two frames: current and
+ selected. Current frame is the inner most frame of the selected
+ thread. Selected frame is the frame currently being examined via
+ the GDB CLI (selected using `up', `down', ...). The frames are
+ created on-demand (via get_prev_frame()) and then held in a frame
+ cache. Provide mechanims for controlling these frames. */
+/* FIXME: cagney/2002-11-14: At any time, only one thread's selected
+ and current frame can be active. Switching threads causes gdb to
+ discard all that cached frame information. Ulgh! Instead, current
+ and selected frame should be bound to a thread. */
+
+extern struct frame_info *selected_frame;
+extern void select_frame (struct frame_info *);
+extern void set_current_frame (struct frame_info *);
+extern struct frame_info *get_current_frame (void);
+
+/* Invalidates the frame cache. */
+extern void flush_cached_frames (void);
+
+/* Flushes the frame cache and then selects the inner most (aka
+ current) frame - it changes selected frame. */
+/* FIXME: cagney/2002-11-14: Should this re-select the selected frame
+ from before the flush? */
+extern void reinit_frame_cache (void);
+
+/* Given a FRAME, return the next (more inner, younger) or previous
+ (more outer, older) frame. */
+extern struct frame_info *get_prev_frame (struct frame_info *);
+extern struct frame_info *get_next_frame (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);
+
+/* Base attributes of a frame: */
+
+/* The frame's `resume' address. Where the program will resume in
+ this frame. */
+extern CORE_ADDR get_frame_pc (struct frame_info *);
+
+/* Return the per-frame unique identifer. Can be used to relocate a
+ frame after a frame cache flush (and other similar operations). */
+extern void get_frame_id (struct frame_info *fi, struct frame_id *id);
+
+/* The frame's level: 0 for innermost, 1 for its caller, ...; or -1
+ for an invalid frame). */
+extern int frame_relative_level (struct frame_info *fi);
+
+/* Unwind the stack frame so that the value of REGNUM, in the previous
+ (up, older) frame is returned. If VALUEP is NULL, don't
+ fetch/compute the value. Instead just return the location of the
+ value. */
+extern void frame_register_unwind (struct frame_info *frame, int regnum,
+ int *optimizedp, enum lval_type *lvalp,
+ CORE_ADDR *addrp, int *realnump,
+ void *valuep);
+
+/* 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. */
+
+extern void frame_unwind_signed_register (struct frame_info *frame,
+ int regnum, LONGEST *val);
+
+extern void frame_unwind_unsigned_register (struct frame_info *frame,
+ int regnum, ULONGEST *val);
+
+/* Get the value of the register that belongs to this FRAME. This
+ function is a wrapper to the call sequence ``frame_unwind_register
+ (get_next_frame (FRAME))''. As per frame_register_unwind(), if
+ VALUEP is NULL, the registers value is not fetched/computed. */
+
+extern void frame_register (struct frame_info *frame, int regnum,
+ int *optimizedp, enum lval_type *lvalp,
+ CORE_ADDR *addrp, int *realnump,
+ void *valuep);
+
+/* More convenient interface to frame_register(). */
+/* NOTE: cagney/2002-09-13: Return void as one day these functions may
+ be changed to return an indication that the read succeeded. */
+
+extern void frame_read_signed_register (struct frame_info *frame,
+ int regnum, LONGEST *val);
+
+extern void frame_read_unsigned_register (struct frame_info *frame,
+ int regnum, ULONGEST *val);
+
+/* 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. */
+
+extern int frame_map_name_to_regnum (const char *name, int strlen);
+extern const char *frame_map_regnum_to_name (int regnum);
+
+
/* Return the location (and possibly value) of REGNUM for the previous
(older, up) frame. All parameters except VALUEP can be assumed to
be non NULL. When VALUEP is NULL, just the location of the
@@ -140,10 +257,11 @@ struct frame_info
frame_register_unwind_ftype *register_unwind;
void *register_unwind_cache;
- /* Pointers to the next (down, inner) and previous (up, outer)
- frame_info's in the frame cache. */
- struct frame_info *next; /* down, inner */
- struct frame_info *prev; /* up, outer */
+ /* Pointers to the next (down, inner, younger) and previous (up,
+ outer, older) frame_info's in the frame cache. */
+ struct frame_info *next; /* down, inner, younger */
+ int prev_p;
+ struct frame_info *prev; /* up, outer, older */
};
/* Values for the source flag to be used in print_frame_info_base(). */
@@ -188,11 +306,6 @@ extern void frame_saved_regs_zalloc (struct frame_info *);
#define FRAME_FP(fi) ((fi)->frame)
-/* Level of the frame: 0 for innermost, 1 for its caller, ...; or -1
- for an invalid frame. */
-
-extern int frame_relative_level (struct frame_info *fi);
-
/* Define a default FRAME_CHAIN_VALID, in the form that is suitable for most
targets. If FRAME_CHAIN_VALID returns zero it means that the given frame
is the outermost one and has no caller.
@@ -208,21 +321,8 @@ extern int generic_file_frame_chain_valid (CORE_ADDR, struct frame_info *);
extern int generic_func_frame_chain_valid (CORE_ADDR, struct frame_info *);
extern void generic_save_dummy_frame_tos (CORE_ADDR sp);
-/* The stack frame that the user has specified for commands to act on.
- Note that one cannot assume this is the address of valid data. */
-
-extern struct frame_info *selected_frame;
-
-/* Level of the selected frame:
- 0 for innermost, 1 for its caller, ...
- or -1 for frame specified by address with no defined level. */
-
extern struct frame_info *create_new_frame (CORE_ADDR, CORE_ADDR);
-extern void flush_cached_frames (void);
-
-extern void reinit_frame_cache (void);
-
#ifdef FRAME_FIND_SAVED_REGS
/* XXX - deprecated */
@@ -231,14 +331,6 @@ extern void get_frame_saved_regs (struct frame_info *,
struct frame_saved_regs *);
#endif
-extern void set_current_frame (struct frame_info *);
-
-extern struct frame_info *get_prev_frame (struct frame_info *);
-
-extern struct frame_info *get_current_frame (void);
-
-extern struct frame_info *get_next_frame (struct frame_info *);
-
extern struct block *get_frame_block (struct frame_info *,
CORE_ADDR *addr_in_block);
@@ -248,8 +340,6 @@ extern struct block *get_selected_block (CORE_ADDR *addr_in_block);
extern struct symbol *get_frame_function (struct frame_info *);
-extern CORE_ADDR get_frame_pc (struct frame_info *);
-
extern CORE_ADDR frame_address_in_block (struct frame_info *);
extern CORE_ADDR get_pc_function_start (CORE_ADDR);
@@ -274,24 +364,6 @@ extern void print_only_stack_frame (struct frame_info *, int, int);
extern void show_stack_frame (struct frame_info *);
-extern void select_frame (struct frame_info *);
-
-/* Return an ID that can be used to re-find a frame. */
-
-struct frame_id
-{
- /* The frame's address. This should be constant through out the
- lifetime of a frame. */
- CORE_ADDR base;
- /* The frame's current PC. While this changes, the function that
- the PC falls into, does not. */
- CORE_ADDR pc;
-};
-
-extern void get_frame_id (struct frame_info *fi, struct frame_id *id);
-
-extern struct frame_info *frame_find_by_id (struct frame_id id);
-
extern void print_frame_info (struct frame_info *, int, int, int);
extern void show_frame_info (struct frame_info *, int, int, int);
@@ -325,9 +397,14 @@ extern void generic_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun,
int nargs, struct value **args,
struct type *type, int gcc_p);
-extern void generic_get_saved_register (char *, int *, CORE_ADDR *,
- struct frame_info *, int,
- enum lval_type *);
+/* The function generic_get_saved_register() has been made obsolete.
+ GET_SAVED_REGISTER now defaults to the recursive equivalent -
+ generic_unwind_get_saved_register() - so there is no need to even
+ set GET_SAVED_REGISTER. Architectures that need to override the
+ register unwind mechanism should modify frame->unwind(). */
+extern void deprecated_generic_get_saved_register (char *, int *, CORE_ADDR *,
+ struct frame_info *, int,
+ enum lval_type *);
extern void generic_unwind_get_saved_register (char *raw_buffer,
int *optimized,
@@ -336,24 +413,6 @@ extern void generic_unwind_get_saved_register (char *raw_buffer,
int regnum,
enum lval_type *lval);
-/* Unwind the stack frame so that the value of REGNUM, in the previous
- frame is returned. If VALUEP is NULL, don't fetch/compute the
- value. Instead just return the location of the value. */
-
-extern void frame_register_unwind (struct frame_info *frame, int regnum,
- int *optimizedp, enum lval_type *lvalp,
- CORE_ADDR *addrp, int *realnump,
- void *valuep);
-
-/* Unwind FRAME so that the value of register REGNUM, in the previous
- frame is returned. Simplified versions of 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. */
-extern void frame_unwind_signed_register (struct frame_info *frame,
- int regnum, LONGEST *val);
-extern void frame_unwind_unsigned_register (struct frame_info *frame,
- int regnum, ULONGEST *val);
-
extern void generic_save_call_dummy_addr (CORE_ADDR lo, CORE_ADDR hi);
extern void get_saved_register (char *raw_buffer, int *optimized,
@@ -361,18 +420,9 @@ extern void get_saved_register (char *raw_buffer, int *optimized,
struct frame_info *frame,
int regnum, enum lval_type *lval);
-/* Return the register as found on the FRAME. Return zero if the
- register could not be found. */
extern int frame_register_read (struct frame_info *frame, int regnum,
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. */
-
-extern int frame_map_name_to_regnum (const char *name, int strlen);
-extern const char *frame_map_regnum_to_name (int regnum);
-
/* From stack.c. */
extern void args_info (char *, int);
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
index 933faa1..48576cb 100644
--- a/gdb/frv-tdep.c
+++ b/gdb/frv-tdep.c
@@ -904,9 +904,10 @@ frv_store_return_value (struct type *type, char *valbuf)
int reg8_offset = frv_register_byte (8);
if (length <= 4)
- write_register_bytes (reg8_offset + (4 - length), valbuf, length);
+ deprecated_write_register_bytes (reg8_offset + (4 - length), valbuf,
+ length);
else if (length == 8)
- write_register_bytes (reg8_offset, valbuf, length);
+ deprecated_write_register_bytes (reg8_offset, valbuf, length);
else
internal_error (__FILE__, __LINE__,
"Don't know how to return a %d-byte value.", length);
diff --git a/gdb/gdb_thread_db.h b/gdb/gdb_thread_db.h
index 8088da0..c47c424 100644
--- a/gdb/gdb_thread_db.h
+++ b/gdb/gdb_thread_db.h
@@ -63,7 +63,8 @@ typedef enum
TD_NOTSD, /* No thread-specific data available. */
TD_MALLOC, /* Out of memory. */
TD_PARTIALREG, /* Not entire register set was read or written. */
- TD_NOXREGS /* X register set not available for given thread. */
+ TD_NOXREGS, /* X register set not available for given thread. */
+ TD_NOTALLOC /* TLS memory not yet allocated. */
} td_err_e;
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 901c47e..468726d 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -64,6 +64,7 @@
#include "gdb_assert.h"
#include "gdb_string.h"
#include "gdb-events.h"
+#include "reggroups.h"
/* Static function declarations */
@@ -171,7 +172,7 @@ struct gdbarch
gdbarch_register_virtual_size_ftype *register_virtual_size;
int max_register_virtual_size;
gdbarch_register_virtual_type_ftype *register_virtual_type;
- gdbarch_do_registers_info_ftype *do_registers_info;
+ 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;
@@ -274,6 +275,7 @@ struct gdbarch
gdbarch_address_class_type_flags_ftype *address_class_type_flags;
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;
};
@@ -437,6 +439,7 @@ struct gdbarch startup_gdbarch =
0,
0,
0,
+ default_register_reggroup_p,
/* startup_gdbarch() */
};
@@ -531,7 +534,6 @@ gdbarch_alloc (const struct gdbarch_info *info,
current_gdbarch->init_frame_pc_first = init_frame_pc_noop;
current_gdbarch->init_frame_pc = init_frame_pc_default;
current_gdbarch->coerce_float_to_double = default_coerce_float_to_double;
- current_gdbarch->get_saved_register = generic_unwind_get_saved_register;
current_gdbarch->register_convertible = generic_register_convertible_not;
current_gdbarch->convert_register_p = legacy_convert_register_p;
current_gdbarch->register_to_value = legacy_register_to_value;
@@ -568,6 +570,7 @@ gdbarch_alloc (const struct gdbarch_info *info,
current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
current_gdbarch->name_of_malloc = "malloc";
+ current_gdbarch->register_reggroup_p = default_register_reggroup_p;
/* gdbarch_alloc() */
return current_gdbarch;
@@ -664,7 +667,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
&& (gdbarch->register_virtual_type == 0))
fprintf_unfiltered (log, "\n\tregister_virtual_type");
- /* Skip verify of do_registers_info, has predicate */
+ /* 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 */
/* Skip verify of print_vector_info, has predicate */
@@ -714,7 +717,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of init_frame_pc_first, invalid_p == 0 */
/* Skip verify of init_frame_pc, invalid_p == 0 */
/* Skip verify of coerce_float_to_double, invalid_p == 0 */
- /* Skip verify of get_saved_register, invalid_p == 0 */
+ /* Skip verify of 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 */
@@ -819,6 +822,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of address_class_type_flags, has predicate */
/* 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 */
buf = ui_file_xstrdup (log, &dummy);
make_cleanup (xfree, buf);
if (strlen (buf) > 0)
@@ -853,6 +857,10 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->in_function_epilogue_p);
if (GDB_MULTI_ARCH)
fprintf_unfiltered (file,
+ "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
+ (long) current_gdbarch->register_reggroup_p);
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
"gdbarch_dump: pseudo_register_read = 0x%08lx\n",
(long) current_gdbarch->pseudo_register_read);
if (GDB_MULTI_ARCH)
@@ -1105,6 +1113,20 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
"gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
(long) DECR_PC_AFTER_BREAK);
#endif
+#ifdef DEPRECATED_DO_REGISTERS_INFO
+#if GDB_MULTI_ARCH
+ /* Macro might contain `[{}]' when not multi-arch */
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
+ XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr, fpregs)));
+#endif
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = 0x%08lx\n",
+ (long) current_gdbarch->deprecated_do_registers_info
+ /*DEPRECATED_DO_REGISTERS_INFO ()*/);
+#endif
#ifdef DEPRECATED_EXTRACT_RETURN_VALUE
#if GDB_MULTI_ARCH
/* Macro might contain `[{}]' when not multi-arch */
@@ -1144,20 +1166,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->deprecated_store_return_value
/*DEPRECATED_STORE_RETURN_VALUE ()*/);
#endif
-#ifdef DO_REGISTERS_INFO
-#if GDB_MULTI_ARCH
- /* Macro might contain `[{}]' when not multi-arch */
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DO_REGISTERS_INFO(reg_nr, fpregs)",
- XSTRING (DO_REGISTERS_INFO (reg_nr, fpregs)));
-#endif
- if (GDB_MULTI_ARCH)
- fprintf_unfiltered (file,
- "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
- (long) current_gdbarch->do_registers_info
- /*DO_REGISTERS_INFO ()*/);
-#endif
#ifdef DWARF2_BUILD_FRAME_INFO
#if GDB_MULTI_ARCH
/* Macro might contain `[{}]' when not multi-arch */
@@ -3113,29 +3121,29 @@ set_gdbarch_register_virtual_type (struct gdbarch *gdbarch,
}
int
-gdbarch_do_registers_info_p (struct gdbarch *gdbarch)
+gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->do_registers_info != 0;
+ return gdbarch->deprecated_do_registers_info != 0;
}
void
-gdbarch_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
+gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->do_registers_info == 0)
+ if (gdbarch->deprecated_do_registers_info == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_do_registers_info invalid");
+ "gdbarch: gdbarch_deprecated_do_registers_info invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_do_registers_info called\n");
- gdbarch->do_registers_info (reg_nr, fpregs);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n");
+ gdbarch->deprecated_do_registers_info (reg_nr, fpregs);
}
void
-set_gdbarch_do_registers_info (struct gdbarch *gdbarch,
- gdbarch_do_registers_info_ftype do_registers_info)
+set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch,
+ gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info)
{
- gdbarch->do_registers_info = do_registers_info;
+ gdbarch->deprecated_do_registers_info = deprecated_do_registers_info;
}
void
@@ -3669,6 +3677,13 @@ set_gdbarch_coerce_float_to_double (struct gdbarch *gdbarch,
gdbarch->coerce_float_to_double = coerce_float_to_double;
}
+int
+gdbarch_get_saved_register_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->get_saved_register != 0;
+}
+
void
gdbarch_get_saved_register (struct gdbarch *gdbarch, char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval)
{
@@ -5186,6 +5201,25 @@ set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
}
+int
+gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch->register_reggroup_p == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_register_reggroup_p invalid");
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
+ return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
+}
+
+void
+set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
+ gdbarch_register_reggroup_p_ftype register_reggroup_p)
+{
+ gdbarch->register_reggroup_p = register_reggroup_p;
+}
+
/* Keep a registry of per-architecture data-pointers required by GDB
modules. */
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 994ae82..a2fa465 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -47,6 +47,7 @@ struct value;
struct objfile;
struct minimal_symbol;
struct regcache;
+struct reggroup;
extern struct gdbarch *current_gdbarch;
@@ -778,40 +779,40 @@ extern void set_gdbarch_register_virtual_type (struct gdbarch *gdbarch, gdbarch_
#endif
#endif
-#if defined (DO_REGISTERS_INFO)
-/* Legacy for systems yet to multi-arch DO_REGISTERS_INFO */
-#if !defined (DO_REGISTERS_INFO_P)
-#define DO_REGISTERS_INFO_P() (1)
+#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 (DO_REGISTERS_INFO_P)
-#define DO_REGISTERS_INFO_P() (0)
+#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_DO_REGISTERS_INFO_P)
+#define DEPRECATED_DO_REGISTERS_INFO_P() (0)
#endif
-extern int gdbarch_do_registers_info_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DO_REGISTERS_INFO_P)
-#error "Non multi-arch definition of DO_REGISTERS_INFO"
+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 (DO_REGISTERS_INFO_P)
-#define DO_REGISTERS_INFO_P() (gdbarch_do_registers_info_p (current_gdbarch))
+#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 (DO_REGISTERS_INFO)
-#define DO_REGISTERS_INFO(reg_nr, fpregs) (internal_error (__FILE__, __LINE__, "DO_REGISTERS_INFO"), 0)
+#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_do_registers_info_ftype) (int reg_nr, int fpregs);
-extern void gdbarch_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs);
-extern void set_gdbarch_do_registers_info (struct gdbarch *gdbarch, gdbarch_do_registers_info_ftype *do_registers_info);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DO_REGISTERS_INFO)
-#error "Non multi-arch definition of DO_REGISTERS_INFO"
+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 (DO_REGISTERS_INFO)
-#define DO_REGISTERS_INFO(reg_nr, fpregs) (gdbarch_do_registers_info (current_gdbarch, reg_nr, fpregs))
+#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))
#endif
#endif
@@ -1209,9 +1210,29 @@ extern void set_gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, gdbarch
#endif
#endif
+#if defined (GET_SAVED_REGISTER)
+/* Legacy for systems yet to multi-arch GET_SAVED_REGISTER */
+#if !defined (GET_SAVED_REGISTER_P)
+#define GET_SAVED_REGISTER_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (GET_SAVED_REGISTER_P)
+#define GET_SAVED_REGISTER_P() (0)
+#endif
+
+extern int gdbarch_get_saved_register_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_SAVED_REGISTER_P)
+#error "Non multi-arch definition of GET_SAVED_REGISTER"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (GET_SAVED_REGISTER_P)
+#define GET_SAVED_REGISTER_P() (gdbarch_get_saved_register_p (current_gdbarch))
+#endif
+
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (GET_SAVED_REGISTER)
-#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) (generic_unwind_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval))
+#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) (internal_error (__FILE__, __LINE__, "GET_SAVED_REGISTER"), 0)
#endif
typedef void (gdbarch_get_saved_register_ftype) (char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval);
@@ -2660,6 +2681,12 @@ typedef int (gdbarch_address_class_name_to_type_flags_ftype) (struct gdbarch *gd
extern int gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, char *name, int *type_flags_ptr);
extern void set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags);
+/* Is a register in a group */
+
+typedef int (gdbarch_register_reggroup_p_ftype) (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup);
+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);
+
extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch);
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 6c9ac04..f7f9a66 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -468,7 +468,7 @@ f:2:REGISTER_VIRTUAL_SIZE:int:register_virtual_size:int reg_nr:reg_nr::generic_r
v:2:MAX_REGISTER_VIRTUAL_SIZE:int:max_register_virtual_size::::0:-1
f:2:REGISTER_VIRTUAL_TYPE:struct type *:register_virtual_type:int reg_nr:reg_nr::0:0
#
-F:2:DO_REGISTERS_INFO:void:do_registers_info:int reg_nr, int fpregs:reg_nr, fpregs
+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
M:2:PRINT_VECTOR_INFO:void:print_vector_info:struct ui_file *file, struct frame_info *frame, const char *args:file, frame, args
@@ -508,7 +508,7 @@ f:2:INIT_FRAME_PC:void:init_frame_pc:int fromleaf, struct frame_info *prev:froml
v:2:BELIEVE_PCC_PROMOTION:int:believe_pcc_promotion:::::::
v:2:BELIEVE_PCC_PROMOTION_TYPE:int:believe_pcc_promotion_type:::::::
f:2:COERCE_FLOAT_TO_DOUBLE:int:coerce_float_to_double:struct type *formal, struct type *actual:formal, actual:::default_coerce_float_to_double::0
-f:2:GET_SAVED_REGISTER:void:get_saved_register:char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval:raw_buffer, optimized, addrp, frame, regnum, lval:::generic_unwind_get_saved_register::0
+F:2:GET_SAVED_REGISTER:void:get_saved_register:char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval:raw_buffer, optimized, addrp, frame, regnum, lval
#
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
@@ -667,6 +667,8 @@ v::HAVE_NONSTEPPABLE_WATCHPOINT:int:have_nonsteppable_watchpoint::::0:0::0
F:2:ADDRESS_CLASS_TYPE_FLAGS:int:address_class_type_flags:int byte_size, int dwarf2_addr_class:byte_size, dwarf2_addr_class
M:2:ADDRESS_CLASS_TYPE_FLAGS_TO_NAME:char *:address_class_type_flags_to_name:int type_flags:type_flags:
M:2:ADDRESS_CLASS_NAME_TO_TYPE_FLAGS:int:address_class_name_to_type_flags: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
EOF
}
@@ -778,6 +780,7 @@ struct value;
struct objfile;
struct minimal_symbol;
struct regcache;
+struct reggroup;
extern struct gdbarch *current_gdbarch;
@@ -1253,6 +1256,7 @@ cat <<EOF
#include "gdb_assert.h"
#include "gdb_string.h"
#include "gdb-events.h"
+#include "reggroups.h"
/* Static function declarations */
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index a43987d..c9cae4c 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -1341,7 +1341,7 @@ get_destructor_fn_field (struct type *t, int *method_indexp, int *field_indexp)
This used to be coded as a macro, but I don't think it is called
often enough to merit such treatment. */
-struct complaint stub_noname_complaint =
+struct deprecated_complaint stub_noname_complaint =
{"stub type has NULL name", 0, 0};
struct type *
@@ -1512,7 +1512,7 @@ add_mangled_type (struct extra *pextras, struct type *t)
default:
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"Bad int type code length x%x\n", 0, 0};
complain (&msg, tlen);
@@ -1534,7 +1534,7 @@ add_mangled_type (struct extra *pextras, struct type *t)
break;
default:
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"Bad float type code length x%x\n", 0, 0};
complain (&msg, tlen);
}
@@ -1550,7 +1550,7 @@ add_mangled_type (struct extra *pextras, struct type *t)
break;
case TYPE_CODE_TYPEDEF:
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"Typedefs in overloaded functions not yet supported\n", 0, 0};
complain (&msg);
}
@@ -1590,7 +1590,7 @@ add_mangled_type (struct extra *pextras, struct type *t)
case TYPE_CODE_ERROR:
default:
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"Unknown type code x%x\n", 0, 0};
complain (&msg, tcode);
}
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index d4d9afe..fe4b0f1 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -397,22 +397,25 @@ struct main_type
CORE_ADDR physaddr;
char *physname;
-
- /* For a function or member type, this is 1 if the argument is marked
- artificial. Artificial arguments should not be shown to the
- user. */
- int artificial;
}
loc;
+ /* For a function or member type, this is 1 if the argument is marked
+ artificial. Artificial arguments should not be shown to the
+ user. */
+ unsigned int artificial : 1;
+
+ /* This flag is zero for non-static fields, 1 for fields whose location
+ is specified by the label loc.physname, and 2 for fields whose location
+ is specified by loc.physaddr. */
+
+ unsigned int static_kind : 2;
+
/* Size of this field, in bits, or zero if not packed.
For an unpacked field, the field's type's length
- says how many bytes the field occupies.
- A value of -1 or -2 indicates a static field; -1 means the location
- is specified by the label loc.physname; -2 means that loc.physaddr
- specifies the actual address. */
+ says how many bytes the field occupies. */
- int bitsize;
+ unsigned int bitsize : 29;
/* In a struct or union type, type of this field.
In a function or member type, type of this argument.
@@ -809,14 +812,15 @@ extern void allocate_cplus_struct_type (struct type *);
#define FIELD_TYPE(thisfld) ((thisfld).type)
#define FIELD_NAME(thisfld) ((thisfld).name)
#define FIELD_BITPOS(thisfld) ((thisfld).loc.bitpos)
-#define FIELD_ARTIFICIAL(thisfld) ((thisfld).loc.artificial)
+#define FIELD_ARTIFICIAL(thisfld) ((thisfld).artificial)
#define FIELD_BITSIZE(thisfld) ((thisfld).bitsize)
+#define FIELD_STATIC_KIND(thisfld) ((thisfld).static_kind)
#define FIELD_PHYSNAME(thisfld) ((thisfld).loc.physname)
#define FIELD_PHYSADDR(thisfld) ((thisfld).loc.physaddr)
#define SET_FIELD_PHYSNAME(thisfld, name) \
- ((thisfld).bitsize = -1, FIELD_PHYSNAME(thisfld) = (name))
+ ((thisfld).static_kind = 1, FIELD_PHYSNAME(thisfld) = (name))
#define SET_FIELD_PHYSADDR(thisfld, name) \
- ((thisfld).bitsize = -2, FIELD_PHYSADDR(thisfld) = (name))
+ ((thisfld).static_kind = 2, FIELD_PHYSADDR(thisfld) = (name))
#define TYPE_FIELD(thistype, n) TYPE_MAIN_TYPE(thistype)->fields[n]
#define TYPE_FIELD_TYPE(thistype, n) FIELD_TYPE(TYPE_FIELD(thistype, n))
#define TYPE_FIELD_NAME(thistype, n) FIELD_NAME(TYPE_FIELD(thistype, n))
@@ -856,8 +860,9 @@ extern void allocate_cplus_struct_type (struct type *);
(TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits == NULL ? 0 \
: B_TST(TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits, (n)))
-#define TYPE_FIELD_STATIC(thistype, n) (TYPE_MAIN_TYPE (thistype)->fields[n].bitsize < 0)
-#define TYPE_FIELD_STATIC_HAS_ADDR(thistype, n) (TYPE_MAIN_TYPE (thistype)->fields[n].bitsize == -2)
+#define TYPE_FIELD_STATIC(thistype, n) (TYPE_MAIN_TYPE (thistype)->fields[n].static_kind != 0)
+#define TYPE_FIELD_STATIC_KIND(thistype, n) TYPE_MAIN_TYPE (thistype)->fields[n].static_kind
+#define TYPE_FIELD_STATIC_HAS_ADDR(thistype, n) (TYPE_MAIN_TYPE (thistype)->fields[n].static_kind == 2)
#define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) FIELD_PHYSNAME(TYPE_FIELD(thistype, n))
#define TYPE_FIELD_STATIC_PHYSADDR(thistype, n) FIELD_PHYSADDR(TYPE_FIELD(thistype, n))
diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
index e332dba..8be456f 100644
--- a/gdb/gnu-nat.c
+++ b/gdb/gnu-nat.c
@@ -2592,21 +2592,15 @@ init_gnu_ops (void)
gnu_ops.to_longname = "GNU Hurd process"; /* to_longname */
gnu_ops.to_doc = "GNU Hurd process"; /* to_doc */
gnu_ops.to_open = gnu_open; /* to_open */
- gnu_ops.to_close = 0; /* to_close */
gnu_ops.to_attach = gnu_attach; /* to_attach */
- gnu_ops.to_post_attach = NULL;
- gnu_ops.to_require_attach = NULL; /* to_require_attach */
gnu_ops.to_detach = gnu_detach; /* to_detach */
- gnu_ops.to_require_detach = NULL; /* to_require_detach */
gnu_ops.to_resume = gnu_resume; /* to_resume */
gnu_ops.to_wait = gnu_wait; /* to_wait */
- gnu_ops.to_post_wait = NULL; /* to_post_wait */
gnu_ops.to_fetch_registers = gnu_fetch_registers; /* to_fetch_registers */
gnu_ops.to_store_registers = gnu_store_registers; /* to_store_registers */
gnu_ops.to_prepare_to_store = gnu_prepare_to_store; /* to_prepare_to_store */
gnu_ops.to_xfer_memory = gnu_xfer_memory; /* to_xfer_memory */
gnu_ops.to_find_memory_regions = gnu_find_memory_regions;
- gnu_ops.to_files_info = 0; /* to_files_info */
gnu_ops.to_insert_breakpoint = memory_insert_breakpoint;
gnu_ops.to_remove_breakpoint = memory_remove_breakpoint;
gnu_ops.to_terminal_init = gnu_terminal_init_inferior;
@@ -2616,45 +2610,19 @@ init_gnu_ops (void)
gnu_ops.to_terminal_ours = terminal_ours;
gnu_ops.to_terminal_info = child_terminal_info;
gnu_ops.to_kill = gnu_kill_inferior; /* to_kill */
- gnu_ops.to_load = 0; /* to_load */
- gnu_ops.to_lookup_symbol = 0; /* to_lookup_symbol */
gnu_ops.to_create_inferior = gnu_create_inferior; /* to_create_inferior */
- gnu_ops.to_post_startup_inferior = NULL; /* to_post_startup_inferior */
- /* to_acknowledge_created_inferior */
- gnu_ops.to_acknowledge_created_inferior = NULL;
- /* to_clone_and_follow_inferior */
- gnu_ops.to_clone_and_follow_inferior = NULL;
- /* to_post_follow_inferior_by_clone */
- gnu_ops.to_post_follow_inferior_by_clone = NULL;
- gnu_ops.to_insert_fork_catchpoint = NULL;
- gnu_ops.to_remove_fork_catchpoint = NULL;
- gnu_ops.to_insert_vfork_catchpoint = NULL;
- gnu_ops.to_remove_vfork_catchpoint = NULL;
- gnu_ops.to_has_forked = NULL; /* to_has_forked */
- gnu_ops.to_has_vforked = NULL; /* to_has_vforked */
- gnu_ops.to_can_follow_vfork_prior_to_exec = NULL;
- gnu_ops.to_post_follow_vfork = NULL; /* to_post_follow_vfork */
- gnu_ops.to_insert_exec_catchpoint = NULL;
- gnu_ops.to_remove_exec_catchpoint = NULL;
- gnu_ops.to_has_execd = NULL;
- gnu_ops.to_reported_exec_events_per_exec_call = NULL;
- gnu_ops.to_has_exited = NULL;
gnu_ops.to_mourn_inferior = gnu_mourn_inferior; /* to_mourn_inferior */
gnu_ops.to_can_run = gnu_can_run; /* to_can_run */
- gnu_ops.to_notice_signals = 0; /* to_notice_signals */
gnu_ops.to_thread_alive = gnu_thread_alive; /* to_thread_alive */
gnu_ops.to_pid_to_str = gnu_pid_to_str; /* to_pid_to_str */
gnu_ops.to_stop = gnu_stop; /* to_stop */
gnu_ops.to_pid_to_exec_file = gnu_pid_to_exec_file; /* to_pid_to_exec_file */
gnu_ops.to_stratum = process_stratum; /* to_stratum */
- gnu_ops.DONT_USE = 0; /* to_next */
gnu_ops.to_has_all_memory = 1; /* to_has_all_memory */
gnu_ops.to_has_memory = 1; /* to_has_memory */
gnu_ops.to_has_stack = 1; /* to_has_stack */
gnu_ops.to_has_registers = 1; /* to_has_registers */
gnu_ops.to_has_execution = 1; /* to_has_execution */
- gnu_ops.to_sections = 0; /* sections */
- gnu_ops.to_sections_end = 0; /* sections_end */
gnu_ops.to_magic = OPS_MAGIC; /* to_magic */
} /* init_gnu_ops */
diff --git a/gdb/go32-nat.c b/gdb/go32-nat.c
index a16b1b3..6ff2710 100644
--- a/gdb/go32-nat.c
+++ b/gdb/go32-nat.c
@@ -467,7 +467,7 @@ fetch_register (int regno)
{
if (regno < FP0_REGNUM)
supply_register (regno, (char *) &a_tss + regno_mapping[regno].tss_ofs);
- else if (FP_REGNUM_P (regno) || FPC_REGNUM_P (regno))
+ else if (i386_fp_regnum_p (regno) || i386_fpc_regnum_p (regno))
i387_supply_register (regno, (char *) &npx);
else
internal_error (__FILE__, __LINE__,
@@ -492,7 +492,7 @@ store_register (int regno)
{
if (regno < FP0_REGNUM)
regcache_collect (regno, (char *) &a_tss + regno_mapping[regno].tss_ofs);
- else if (FP_REGNUM_P (regno) || FPC_REGNUM_P (regno))
+ else if (i386_fp_regnum_p (regno) || i386_fpc_regnum_p (regno))
i387_fill_fsave ((char *) &npx, regno);
else
internal_error (__FILE__, __LINE__,
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index affd8dd..0b0578c 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -34,6 +34,7 @@
#include "gdbcore.h"
#include "objfiles.h"
#include "gdbcmd.h"
+#include "gdb_assert.h"
/* Extra info which is saved in each frame_info. */
struct frame_extra_info
@@ -864,28 +865,38 @@ h8300_register_name (int regno)
}
static void
-h8300_print_register (int regno)
+h8300_print_register (struct gdbarch *gdbarch, struct ui_file *file,
+ struct frame_info *frame, int regno)
{
- long val = read_register (regno);
+ ULONGEST rval;
+ long val;
const char *name = h8300_register_name (regno);
if (!name || !*name)
return;
- printf_filtered ("%-14s ", name);
+ /* 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;
+
+ fprintf_filtered (file, "%-14s ", name);
if (h8300hmode)
{
if (val)
- printf_filtered ("0x%08lx %-8ld", val, val);
+ fprintf_filtered (file, "0x%08lx %-8ld", val, val);
else
- printf_filtered ("0x%-8lx %-8ld", val, val);
+ fprintf_filtered (file, "0x%-8lx %-8ld", val, val);
}
else
{
if (val)
- printf_filtered ("0x%04lx %-4ld", val, val);
+ fprintf_filtered (file, "0x%04lx %-4ld", val, val);
else
- printf_filtered ("0x%-4lx %-4ld", val, val);
+ fprintf_filtered (file, "0x%-4lx %-4ld", val, val);
}
if (regno == E_CCR_REGNUM)
{
@@ -895,39 +906,39 @@ h8300_print_register (int regno)
unsigned char l;
frame_register_read (selected_frame, regno, b);
l = b[REGISTER_VIRTUAL_SIZE (E_CCR_REGNUM) - 1];
- printf_unfiltered ("\t");
- printf_unfiltered ("I-%d ", (l & 0x80) != 0);
- printf_unfiltered ("UI-%d ", (l & 0x40) != 0);
- printf_unfiltered ("H-%d ", (l & 0x20) != 0);
- printf_unfiltered ("U-%d ", (l & 0x10) != 0);
+ fprintf_filtered (file, "\t");
+ fprintf_filtered (file, "I-%d ", (l & 0x80) != 0);
+ fprintf_filtered (file, "UI-%d ", (l & 0x40) != 0);
+ fprintf_filtered (file, "H-%d ", (l & 0x20) != 0);
+ fprintf_filtered (file, "U-%d ", (l & 0x10) != 0);
N = (l & 0x8) != 0;
Z = (l & 0x4) != 0;
V = (l & 0x2) != 0;
C = (l & 0x1) != 0;
- printf_unfiltered ("N-%d ", N);
- printf_unfiltered ("Z-%d ", Z);
- printf_unfiltered ("V-%d ", V);
- printf_unfiltered ("C-%d ", C);
+ fprintf_filtered (file, "N-%d ", N);
+ fprintf_filtered (file, "Z-%d ", Z);
+ fprintf_filtered (file, "V-%d ", V);
+ fprintf_filtered (file, "C-%d ", C);
if ((C | Z) == 0)
- printf_unfiltered ("u> ");
+ fprintf_filtered (file, "u> ");
if ((C | Z) == 1)
- printf_unfiltered ("u<= ");
+ fprintf_filtered (file, "u<= ");
if ((C == 0))
- printf_unfiltered ("u>= ");
+ fprintf_filtered (file, "u>= ");
if (C == 1)
- printf_unfiltered ("u< ");
+ fprintf_filtered (file, "u< ");
if (Z == 0)
- printf_unfiltered ("!= ");
+ fprintf_filtered (file, "!= ");
if (Z == 1)
- printf_unfiltered ("== ");
+ fprintf_filtered (file, "== ");
if ((N ^ V) == 0)
- printf_unfiltered (">= ");
+ fprintf_filtered (file, ">= ");
if ((N ^ V) == 1)
- printf_unfiltered ("< ");
+ fprintf_filtered (file, "< ");
if ((Z | (N ^ V)) == 0)
- printf_unfiltered ("> ");
+ fprintf_filtered (file, "> ");
if ((Z | (N ^ V)) == 1)
- printf_unfiltered ("<= ");
+ fprintf_filtered (file, "<= ");
}
else if (regno == E_EXR_REGNUM && h8300smode)
{
@@ -936,23 +947,24 @@ h8300_print_register (int regno)
unsigned char l;
frame_register_read (selected_frame, regno, b);
l = b[REGISTER_VIRTUAL_SIZE (E_EXR_REGNUM) - 1];
- printf_unfiltered ("\t");
- printf_unfiltered ("T-%d - - - ", (l & 0x80) != 0);
- printf_unfiltered ("I2-%d ", (l & 4) != 0);
- printf_unfiltered ("I1-%d ", (l & 2) != 0);
- printf_unfiltered ("I0-%d", (l & 1) != 0);
+ fprintf_filtered (file, "\t");
+ fprintf_filtered (file, "T-%d - - - ", (l & 0x80) != 0);
+ fprintf_filtered (file, "I2-%d ", (l & 4) != 0);
+ fprintf_filtered (file, "I1-%d ", (l & 2) != 0);
+ fprintf_filtered (file, "I0-%d", (l & 1) != 0);
}
- printf_filtered ("\n");
+ fprintf_filtered (file, "\n");
}
static void
-h8300_do_registers_info (int regno, int cpregs)
+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 (regno);
+ h8300_print_register (gdbarch, file, frame, regno);
else
- h8300_print_register (regno);
+ h8300_print_register (gdbarch, file, frame, regno);
}
static CORE_ADDR
@@ -1085,7 +1097,7 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_virtual_size (gdbarch, h8300_register_raw_size);
set_gdbarch_max_register_virtual_size (gdbarch, h8300h_reg_size);
set_gdbarch_register_virtual_type (gdbarch, h8300_register_virtual_type);
- set_gdbarch_do_registers_info (gdbarch, h8300_do_registers_info);
+ set_gdbarch_print_registers_info (gdbarch, h8300_print_registers_info);
set_gdbarch_print_float_info (gdbarch, h8300_print_float_info);
/*
diff --git a/gdb/h8500-tdep.c b/gdb/h8500-tdep.c
index 0696c4e..0bfae7a 100644
--- a/gdb/h8500-tdep.c
+++ b/gdb/h8500-tdep.c
@@ -175,8 +175,8 @@ h8500_pop_frame (void)
}
}
-void
-print_register_hook (int regno)
+static void
+h8500_print_register_hook (int regno)
{
if (regno == CCR_REGNUM)
{
@@ -221,6 +221,117 @@ print_register_hook (int regno)
}
}
+static void
+h8500_print_registers_info (struct gdbarch *gdbarch,
+ struct ui_file *file,
+ struct frame_info *frame,
+ int regnum, int print_all)
+{
+ int i;
+ const int numregs = NUM_REGS + NUM_PSEUDO_REGS;
+ char *raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
+ char *virtual_buffer = alloca (MAX_REGISTER_VIRTUAL_SIZE);
+
+ for (i = 0; i < numregs; i++)
+ {
+ /* Decide between printing all regs, non-float / vector regs, or
+ specific reg. */
+ if (regnum == -1)
+ {
+ if (!print_all)
+ {
+ if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
+ continue;
+ if (TYPE_VECTOR (REGISTER_VIRTUAL_TYPE (i)))
+ continue;
+ }
+ }
+ else
+ {
+ if (i != regnum)
+ continue;
+ }
+
+ /* If the register name is empty, it is undefined for this
+ processor, so don't display anything. */
+ if (REGISTER_NAME (i) == NULL || *(REGISTER_NAME (i)) == '\0')
+ continue;
+
+ fputs_filtered (REGISTER_NAME (i), file);
+ print_spaces_filtered (15 - strlen (REGISTER_NAME (i)), file);
+
+ /* Get the data in raw format. */
+ if (! frame_register_read (frame, i, raw_buffer))
+ {
+ fprintf_filtered (file, "*value not available*\n");
+ continue;
+ }
+
+ /* FIXME: cagney/2002-08-03: This code shouldn't be necessary.
+ The function frame_register_read() should have returned the
+ pre-cooked register so no conversion is necessary. */
+ /* Convert raw data to virtual format if necessary. */
+ if (REGISTER_CONVERTIBLE (i))
+ {
+ REGISTER_CONVERT_TO_VIRTUAL (i, REGISTER_VIRTUAL_TYPE (i),
+ raw_buffer, virtual_buffer);
+ }
+ else
+ {
+ memcpy (virtual_buffer, raw_buffer,
+ REGISTER_VIRTUAL_SIZE (i));
+ }
+
+ /* If virtual format is floating, print it that way, and in raw
+ hex. */
+ if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
+ {
+ int j;
+
+ val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
+ file, 0, 1, 0, Val_pretty_default);
+
+ fprintf_filtered (file, "\t(raw 0x");
+ for (j = 0; j < REGISTER_RAW_SIZE (i); j++)
+ {
+ int idx;
+ if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+ idx = j;
+ else
+ idx = REGISTER_RAW_SIZE (i) - 1 - j;
+ fprintf_filtered (file, "%02x", (unsigned char) raw_buffer[idx]);
+ }
+ fprintf_filtered (file, ")");
+ }
+ else
+ {
+ /* Print the register in hex. */
+ val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
+ file, 'x', 1, 0, Val_pretty_default);
+ /* If not a vector register, print it also according to its
+ natural format. */
+ if (TYPE_VECTOR (REGISTER_VIRTUAL_TYPE (i)) == 0)
+ {
+ fprintf_filtered (file, "\t");
+ val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
+ file, 0, 1, 0, Val_pretty_default);
+ }
+ }
+
+ /* Some h8500 specific info. */
+ h8500_print_register_hook (i);
+
+ fprintf_filtered (file, "\n");
+ }
+}
+
+void
+h8500_do_registers_info (int regnum, int all)
+{
+ h8500_print_registers_info (current_gdbarch, gdb_stdout, selected_frame,
+ regnum, all);
+}
+
int
h8500_register_size (int regno)
{
diff --git a/gdb/hp300ux-nat.c b/gdb/hp300ux-nat.c
index ecb8a35..7ef3e34 100644
--- a/gdb/hp300ux-nat.c
+++ b/gdb/hp300ux-nat.c
@@ -161,7 +161,7 @@ store_inferior_register (register int regno, register unsigned int regaddr)
{
store_inferior_register_1
(regno, regaddr,
- (*(int *) &registers[(REGISTER_BYTE (regno)) + i]));
+ (*(int *) &deprecated_registers[(REGISTER_BYTE (regno)) + i]));
regaddr += sizeof (int);
}
}
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 19e4402..a3f9561 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -30,6 +30,7 @@
#include "value.h"
#include "regcache.h"
#include "completer.h"
+#include "language.h"
/* For argument passing to the inferior */
#include "symtab.h"
@@ -130,6 +131,21 @@ static void pa_register_look_aside (char *, int, long *);
static void pa_print_fp_reg (int);
static void pa_strcat_fp_reg (int, struct ui_file *, enum precision_type);
static void record_text_segment_lowaddr (bfd *, asection *, void *);
+/* FIXME: brobecker 2002-11-07: We will likely be able to make the
+ following functions static, once we hppa is partially multiarched. */
+int hppa_reg_struct_has_addr (int gcc_p, struct type *type);
+int hppa_inner_than (CORE_ADDR lhs, CORE_ADDR rhs);
+CORE_ADDR hppa_stack_align (CORE_ADDR sp);
+int hppa_pc_requires_run_before_use (CORE_ADDR pc);
+int hppa_instruction_nullified (void);
+int hppa_register_byte (int reg_nr);
+struct type * hppa_register_virtual_type (int reg_nr);
+void hppa_store_struct_return (CORE_ADDR addr, CORE_ADDR sp);
+int hppa_cannot_store_register (int regnum);
+CORE_ADDR hppa_frame_args_address (struct frame_info *fi);
+CORE_ADDR hppa_frame_locals_address (struct frame_info *fi);
+CORE_ADDR hppa_smash_text_address (CORE_ADDR addr);
+int hppa_coerce_float_to_double (struct type *formal, struct type *actual);
typedef struct
{
@@ -149,10 +165,8 @@ extern int hp_som_som_object_present;
/* In breakpoint.c */
extern int exception_catchpoints_are_fragile;
-/* This is defined in valops.c. */
-extern struct value *find_function_in_inferior (char *);
-
/* Should call_function allocate stack space for a struct return? */
+
int
hppa_use_struct_convention (int gcc_p, struct type *type)
{
@@ -300,7 +314,7 @@ static CORE_ADDR low_text_segment_address;
static void
record_text_segment_lowaddr (bfd *abfd, asection *section, void *ignored)
{
- if ((section->flags & (SEC_ALLOC | SEC_LOAD | SEC_READONLY)
+ if (((section->flags & (SEC_ALLOC | SEC_LOAD | SEC_READONLY))
== (SEC_ALLOC | SEC_LOAD | SEC_READONLY))
&& section->vma < low_text_segment_address)
low_text_segment_address = section->vma;
@@ -813,6 +827,11 @@ frameless_function_invocation (struct frame_info *frame)
return (u->Total_frame_size == 0 && u->stub_unwind.stub_type == 0);
}
+/* Immediately after a function call, return the saved pc.
+ Can't go through the frames for this because on some machines
+ the new frame is not set up until the new function executes
+ some instructions. */
+
CORE_ADDR
saved_pc_after_call (struct frame_info *frame)
{
@@ -1450,7 +1469,8 @@ push_dummy_frame (struct inferior_status *inf_status)
for (regnum = FP0_REGNUM; regnum < NUM_REGS; regnum++)
{
- read_register_bytes (REGISTER_BYTE (regnum), (char *) &freg_buffer, 8);
+ deprecated_read_register_bytes (REGISTER_BYTE (regnum),
+ (char *) &freg_buffer, 8);
sp = push_bytes (sp, (char *) &freg_buffer, 8);
}
sp = push_word (sp, read_register (IPSW_REGNUM));
@@ -1529,7 +1549,8 @@ hppa_pop_frame (void)
if (fsr.regs[regnum])
{
read_memory (fsr.regs[regnum], (char *) &freg_buffer, 8);
- write_register_bytes (REGISTER_BYTE (regnum), (char *) &freg_buffer, 8);
+ deprecated_write_register_bytes (REGISTER_BYTE (regnum),
+ (char *) &freg_buffer, 8);
}
if (fsr.regs[IPSW_REGNUM])
@@ -4677,6 +4698,221 @@ hppa_skip_permanent_breakpoint (void)
/* We can leave the tail's space the same, since there's no jump. */
}
+/* Copy the function value from VALBUF into the proper location
+ for a function return.
+
+ Called only in the context of the "return" command. */
+
+void
+hppa_store_return_value (struct type *type, char *valbuf)
+{
+ /* For software floating point, the return value goes into the
+ integer registers. But we do not have any flag to key this on,
+ so we always store the value into the integer registers.
+
+ If its a float value, then we also store it into the floating
+ point registers. */
+ deprecated_write_register_bytes (REGISTER_BYTE (28)
+ + (TYPE_LENGTH (type) > 4
+ ? (8 - TYPE_LENGTH (type))
+ : (4 - TYPE_LENGTH (type))),
+ valbuf, TYPE_LENGTH (type));
+ if (! SOFT_FLOAT && TYPE_CODE (type) == TYPE_CODE_FLT)
+ deprecated_write_register_bytes (REGISTER_BYTE (FP4_REGNUM),
+ valbuf, TYPE_LENGTH (type));
+}
+
+/* Copy the function's return value into VALBUF.
+
+ This function is called only in the context of "target function calls",
+ ie. when the debugger forces a function to be called in the child, and
+ when the debugger forces a fucntion to return prematurely via the
+ "return" command. */
+
+void
+hppa_extract_return_value (struct type *type, char *regbuf, char *valbuf)
+{
+ if (! SOFT_FLOAT && TYPE_CODE (type) == TYPE_CODE_FLT)
+ memcpy (valbuf,
+ (char *)regbuf + REGISTER_BYTE (FP4_REGNUM),
+ TYPE_LENGTH (type));
+ else
+ memcpy (valbuf,
+ ((char *)regbuf
+ + REGISTER_BYTE (28)
+ + (TYPE_LENGTH (type) > 4
+ ? (8 - TYPE_LENGTH (type))
+ : (4 - TYPE_LENGTH (type)))),
+ TYPE_LENGTH (type));
+}
+
+int
+hppa_reg_struct_has_addr (int gcc_p, struct type *type)
+{
+ /* On the PA, any pass-by-value structure > 8 bytes is actually passed
+ via a pointer regardless of its type or the compiler used. */
+ return (TYPE_LENGTH (type) > 8);
+}
+
+int
+hppa_inner_than (CORE_ADDR lhs, CORE_ADDR rhs)
+{
+ /* Stack grows upward */
+ return (lhs > rhs);
+}
+
+CORE_ADDR
+hppa_stack_align (CORE_ADDR sp)
+{
+ /* elz: adjust the quantity to the next highest value which is
+ 64-bit aligned. This is used in valops.c, when the sp is adjusted.
+ On hppa the sp must always be kept 64-bit aligned */
+ return ((sp % 8) ? (sp + 7) & -8 : sp);
+}
+
+int
+hppa_pc_requires_run_before_use (CORE_ADDR pc)
+{
+ /* Sometimes we may pluck out a minimal symbol that has a negative address.
+
+ An example of this occurs when an a.out is linked against a foo.sl.
+ The foo.sl defines a global bar(), and the a.out declares a signature
+ for bar(). However, the a.out doesn't directly call bar(), but passes
+ its address in another call.
+
+ If you have this scenario and attempt to "break bar" before running,
+ gdb will find a minimal symbol for bar() in the a.out. But that
+ symbol's address will be negative. What this appears to denote is
+ an index backwards from the base of the procedure linkage table (PLT)
+ into the data linkage table (DLT), the end of which is contiguous
+ with the start of the PLT. This is clearly not a valid address for
+ us to set a breakpoint on.
+
+ Note that one must be careful in how one checks for a negative address.
+ 0xc0000000 is a legitimate address of something in a shared text
+ segment, for example. Since I don't know what the possible range
+ is of these "really, truly negative" addresses that come from the
+ minimal symbols, I'm resorting to the gross hack of checking the
+ top byte of the address for all 1's. Sigh. */
+
+ return (!target_has_stack && (pc & 0xFF000000));
+}
+
+int
+hppa_instruction_nullified (void)
+{
+ /* brobecker 2002/11/07: Couldn't we use a ULONGEST here? It would
+ avoid the type cast. I'm leaving it as is for now as I'm doing
+ semi-mechanical multiarching-related changes. */
+ const int ipsw = (int) read_register (IPSW_REGNUM);
+ const int flags = (int) read_register (FLAGS_REGNUM);
+
+ return ((ipsw & 0x00200000) && !(flags & 0x2));
+}
+
+/* Index within the register vector of the first byte of the space i
+ used for register REG_NR. */
+
+int
+hppa_register_byte (int reg_nr)
+{
+ return reg_nr * 4;
+}
+
+/* Return the GDB type object for the "standard" data type of data
+ in register N. */
+
+struct type *
+hppa_register_virtual_type (int reg_nr)
+{
+ if (reg_nr < FP4_REGNUM)
+ return builtin_type_int;
+ else
+ return builtin_type_float;
+}
+
+/* Store the address of the place in which to copy the structure the
+ subroutine will return. This is called from call_function. */
+
+void
+hppa_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
+{
+ write_register (28, addr);
+}
+
+/* Return True if REGNUM is not a register available to the user
+ through ptrace(). */
+
+int
+hppa_cannot_store_register (int regnum)
+{
+ return (regnum == 0
+ || regnum == PCSQ_HEAD_REGNUM
+ || (regnum >= PCSQ_TAIL_REGNUM && regnum < IPSW_REGNUM)
+ || (regnum > IPSW_REGNUM && regnum < FP4_REGNUM));
+
+}
+
+CORE_ADDR
+hppa_frame_args_address (struct frame_info *fi)
+{
+ return fi->frame;
+}
+
+CORE_ADDR
+hppa_frame_locals_address (struct frame_info *fi)
+{
+ return fi->frame;
+}
+
+CORE_ADDR
+hppa_smash_text_address (CORE_ADDR addr)
+{
+ /* The low two bits of the PC on the PA contain the privilege level.
+ Some genius implementing a (non-GCC) compiler apparently decided
+ this means that "addresses" in a text section therefore include a
+ privilege level, and thus symbol tables should contain these bits.
+ This seems like a bonehead thing to do--anyway, it seems to work
+ for our purposes to just ignore those bits. */
+
+ return (addr &= ~0x3);
+}
+
+int
+hppa_coerce_float_to_double (struct type *formal, struct type *actual)
+{
+ /* FIXME: For the pa, it appears that the debug info marks the
+ parameters as floats regardless of whether the function is
+ prototyped, but the actual values are passed as doubles for the
+ non-prototyped case and floats for the prototyped case. Thus we
+ choose to make the non-prototyped case work for C and break the
+ prototyped case, since the non-prototyped case is probably much
+ more common. */
+ return (current_language -> la_language == language_c);
+}
+
+static struct gdbarch *
+hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
+{
+ struct gdbarch *gdbarch;
+
+ /* find a candidate among the list of pre-declared architectures. */
+ arches = gdbarch_list_lookup_by_info (arches, &info);
+ if (arches != NULL)
+ return (arches->gdbarch);
+
+ /* If none found, then allocate and initialize one. */
+ gdbarch = gdbarch_alloc (&info, NULL);
+
+ return gdbarch;
+}
+
+static void
+hppa_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
+{
+ /* Nothing to print for the moment. */
+}
+
void
_initialize_hppa_tdep (void)
{
@@ -4685,6 +4921,7 @@ _initialize_hppa_tdep (void)
void tbreak_at_finish_command (char *arg, int from_tty);
void break_at_finish_at_depth_command (char *arg, int from_tty);
+ gdbarch_register (bfd_arch_hppa, hppa_gdbarch_init, hppa_dump_tdep);
tm_print_insn = print_insn_hppa;
add_cmd ("unwind", class_maintenance, unwind_command,
@@ -4722,52 +4959,3 @@ be no argument or the argument must be a depth.\n"), NULL);
be no argument or the argument must be a depth.\n"), NULL);
}
-/* Copy the function value from VALBUF into the proper location
- for a function return.
-
- Called only in the context of the "return" command. */
-
-void
-hppa_store_return_value (struct type *type, char *valbuf)
-{
- /* For software floating point, the return value goes into the
- integer registers. But we do not have any flag to key this on,
- so we always store the value into the integer registers.
-
- If its a float value, then we also store it into the floating
- point registers. */
- write_register_bytes (REGISTER_BYTE (28)
- + (TYPE_LENGTH (type) > 4
- ? (8 - TYPE_LENGTH (type))
- : (4 - TYPE_LENGTH (type))),
- valbuf,
- TYPE_LENGTH (type));
- if (! SOFT_FLOAT && TYPE_CODE (type) == TYPE_CODE_FLT)
- write_register_bytes (REGISTER_BYTE (FP4_REGNUM),
- valbuf,
- TYPE_LENGTH (type));
-}
-
-/* Copy the function's return value into VALBUF.
-
- This function is called only in the context of "target function calls",
- ie. when the debugger forces a function to be called in the child, and
- when the debugger forces a fucntion to return prematurely via the
- "return" command. */
-
-void
-hppa_extract_return_value (struct type *type, char *regbuf, char *valbuf)
-{
- if (! SOFT_FLOAT && TYPE_CODE (type) == TYPE_CODE_FLT)
- memcpy (valbuf,
- (char *)regbuf + REGISTER_BYTE (FP4_REGNUM),
- TYPE_LENGTH (type));
- else
- memcpy (valbuf,
- ((char *)regbuf
- + REGISTER_BYTE (28)
- + (TYPE_LENGTH (type) > 4
- ? (8 - TYPE_LENGTH (type))
- : (4 - TYPE_LENGTH (type)))),
- TYPE_LENGTH (type));
-}
diff --git a/gdb/hppab-nat.c b/gdb/hppab-nat.c
index 51dde60..d859587 100644
--- a/gdb/hppab-nat.c
+++ b/gdb/hppab-nat.c
@@ -118,7 +118,7 @@ store_inferior_registers (int regno)
errno = 0;
if (regno == PCOQ_HEAD_REGNUM || regno == PCOQ_TAIL_REGNUM)
{
- scratch = *(int *) &registers[REGISTER_BYTE (regno)] | 0x3;
+ scratch = *(int *) &deprecated_registers[REGISTER_BYTE (regno)] | 0x3;
ptrace (PT_WUREGS, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr,
scratch);
if (errno != 0)
@@ -135,7 +135,7 @@ store_inferior_registers (int regno)
errno = 0;
ptrace (PT_WUREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) regaddr,
- *(int *) &registers[REGISTER_BYTE (regno) + i]);
+ *(int *) &deprecated_registers[REGISTER_BYTE (regno) + i]);
if (errno != 0)
{
/* Warning, not error, in case we are attached; sometimes the
diff --git a/gdb/hppah-nat.c b/gdb/hppah-nat.c
index aab5e96..f10eb5a 100644
--- a/gdb/hppah-nat.c
+++ b/gdb/hppah-nat.c
@@ -121,7 +121,7 @@ store_inferior_registers (int regno)
{
CORE_ADDR temp;
- temp = *(CORE_ADDR *)&registers[REGISTER_BYTE (regno)];
+ temp = *(CORE_ADDR *)&deprecated_registers[REGISTER_BYTE (regno)];
/* Set the priv level (stored in the low two bits of the PC. */
temp |= 0x3;
@@ -146,7 +146,7 @@ store_inferior_registers (int regno)
the high part of IPSW. What will it take for HP to catch a
clue about building sensible interfaces? */
if (regno == IPSW_REGNUM && len == 8)
- *(int *)&registers[REGISTER_BYTE (regno)] = 0;
+ *(int *)&deprecated_registers[REGISTER_BYTE (regno)] = 0;
#endif
for (i = 0; i < len; i += sizeof (int))
@@ -154,7 +154,7 @@ store_inferior_registers (int regno)
errno = 0;
call_ptrace (PT_WUREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) addr + i,
- *(int *) &registers[REGISTER_BYTE (regno) + i]);
+ *(int *) &deprecated_registers[REGISTER_BYTE (regno) + i]);
if (errno != 0)
{
/* Warning, not error, in case we are attached; sometimes
diff --git a/gdb/hppam3-nat.c b/gdb/hppam3-nat.c
index ee67f1b..349df39 100644
--- a/gdb/hppam3-nat.c
+++ b/gdb/hppam3-nat.c
@@ -113,15 +113,15 @@ store_inferior_registers (int regno)
*/
if (regno > 0 && regno < NUM_REGS)
{
- memcpy (&state[regno], &registers[REGISTER_BYTE (regno)],
+ memcpy (&state[regno], &deprecated_registers[REGISTER_BYTE (regno)],
REGISTER_RAW_SIZE (regno));
}
else
{
for (index = 0; index < NUM_REGS; index++)
- memcpy (&state[index], &registers[REGISTER_BYTE (index)],
+ memcpy (&state[index], &deprecated_registers[REGISTER_BYTE (index)],
REGISTER_RAW_SIZE (index));
-/* state[index] = registers[REGISTER_BYTE (index)]; */
+/* state[index] = deprecated_registers[REGISTER_BYTE (index)]; */
}
diff --git a/gdb/hpread.c b/gdb/hpread.c
index e4154df..4c3bed9 100644
--- a/gdb/hpread.c
+++ b/gdb/hpread.c
@@ -129,52 +129,52 @@ struct symloc
/* FIXME: Shouldn't this stuff be in a .h file somewhere? */
/* Complaints about the symbols we have encountered. */
-extern struct complaint string_table_offset_complaint;
-extern struct complaint lbrac_unmatched_complaint;
-extern struct complaint lbrac_mismatch_complaint;
+extern struct deprecated_complaint string_table_offset_complaint;
+extern struct deprecated_complaint lbrac_unmatched_complaint;
+extern struct deprecated_complaint lbrac_mismatch_complaint;
-static struct complaint hpread_unhandled_end_common_complaint =
+static struct deprecated_complaint hpread_unhandled_end_common_complaint =
{
"unhandled symbol in hp-symtab-read.c: DNTT_TYPE_COMMON/DNTT_TYPE_END.\n", 0, 0
};
-static struct complaint hpread_unhandled_type_complaint =
+static struct deprecated_complaint hpread_unhandled_type_complaint =
{
"hpread_type_translate: unhandled type code.", 0, 0
};
-static struct complaint hpread_struct_complaint =
+static struct deprecated_complaint hpread_struct_complaint =
{
"hpread_read_struct_type: expected SVAR type...", 0, 0
};
-static struct complaint hpread_array_complaint =
+static struct deprecated_complaint hpread_array_complaint =
{
"error in hpread_array_type.", 0, 0
};
-static struct complaint hpread_type_lookup_complaint =
+static struct deprecated_complaint hpread_type_lookup_complaint =
{
"error in hpread_type_lookup().", 0, 0
};
-static struct complaint hpread_unexpected_end_complaint =
+static struct deprecated_complaint hpread_unexpected_end_complaint =
{
"internal error in hp-symtab-read.c: Unexpected DNTT_TYPE_END kind.", 0, 0
};
-static struct complaint hpread_tagdef_complaint =
+static struct deprecated_complaint hpread_tagdef_complaint =
{
"error processing class tagdef", 0, 0
};
-static struct complaint hpread_unhandled_common_complaint =
+static struct deprecated_complaint hpread_unhandled_common_complaint =
{
"unhandled symbol in hp-symtab-read.c: DNTT_TYPE_COMMON.", 0, 0
};
-static struct complaint hpread_unhandled_blockdata_complaint =
+static struct deprecated_complaint hpread_unhandled_blockdata_complaint =
{
"unhandled symbol in hp-symtab-read.c: DNTT_TYPE_BLOCKDATA.", 0, 0
};
@@ -3185,6 +3185,7 @@ hpread_read_enum_type (dnttpointer hp_type, union dnttentry *dn_bufp,
TYPE_FIELD_NAME (type, n) = SYMBOL_NAME (xsym);
TYPE_FIELD_BITPOS (type, n) = SYMBOL_VALUE (xsym);
TYPE_FIELD_BITSIZE (type, n) = 0;
+ TYPE_FIELD_STATIC_KIND (type, n) = 0;
}
if (syms == osyms)
break;
@@ -3346,6 +3347,7 @@ hpread_read_function_type (dnttpointer hp_type, union dnttentry *dn_bufp,
TYPE_FIELD_TYPE (type, n) = SYMBOL_TYPE (xsym);
TYPE_FIELD_ARTIFICIAL (type, n) = 0;
TYPE_FIELD_BITSIZE (type, n) = 0;
+ TYPE_FIELD_STATIC_KIND (type, n) = 0;
}
}
/* Mark it as having been processed */
@@ -3519,6 +3521,7 @@ hpread_read_doc_function_type (dnttpointer hp_type, union dnttentry *dn_bufp,
TYPE_FIELD_TYPE (type, n) = SYMBOL_TYPE (xsym);
TYPE_FIELD_ARTIFICIAL (type, n) = 0;
TYPE_FIELD_BITSIZE (type, n) = 0;
+ TYPE_FIELD_STATIC_KIND (type, n) = 0;
}
}
@@ -3703,6 +3706,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp,
list = new;
FIELD_BITSIZE (list->field) = 0;
+ FIELD_STATIC_KIND (list->field) = 0;
/* The "classname" field is actually a DNTT pointer to the base class */
baseclass = hpread_type_lookup (parentp->dinheritance.classname,
@@ -4100,6 +4104,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp,
list->field.name = VT (objfile) + fn_fieldp->dsvar.name;
FIELD_BITPOS (list->field) = 0; /* FIXME is this always true? */
FIELD_BITSIZE (list->field) = 0; /* use length from type */
+ FIELD_STATIC_KIND (list->field) = 0;
memtype = hpread_type_lookup (fn_fieldp->dsvar.type, objfile);
list->field.type = memtype;
list->attributes = 0;
@@ -4119,6 +4124,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp,
list->field.name = VT (objfile) + fn_fieldp->ddvar.name;
FIELD_BITPOS (list->field) = 0; /* FIXME is this always true? */
FIELD_BITSIZE (list->field) = 0; /* use length from type */
+ FIELD_STATIC_KIND (list->field) = 0;
memtype = hpread_type_lookup (fn_fieldp->ddvar.type, objfile);
list->field.type = memtype;
list->attributes = 0;
@@ -4167,6 +4173,7 @@ hpread_read_struct_type (dnttpointer hp_type, union dnttentry *dn_bufp,
/* A FIELD by itself (without a GENFIELD) can also be a static member */
+ FIELD_STATIC_KIND (list->field) = 0;
if (fieldp->dfield.staticmem)
{
FIELD_BITPOS (list->field) = -1;
diff --git a/gdb/hpux-thread.c b/gdb/hpux-thread.c
index 981bb9d..26d57ba 100644
--- a/gdb/hpux-thread.c
+++ b/gdb/hpux-thread.c
@@ -357,18 +357,19 @@ hpux_thread_store_registers (int regno)
else if (regno == SP_REGNUM)
{
write_memory ((CORE_ADDR) & tcb_ptr->static_ctx.sp,
- registers + REGISTER_BYTE (regno),
+ &deprecated_registers[REGISTER_BYTE (regno)],
REGISTER_RAW_SIZE (regno));
tcb_ptr->static_ctx.sp = (cma__t_hppa_regs *)
- (extract_address (registers + REGISTER_BYTE (regno), REGISTER_RAW_SIZE (regno)) + 160);
+ (extract_address (&deprecated_registers[REGISTER_BYTE (regno)],
+ REGISTER_RAW_SIZE (regno)) + 160);
}
else if (regno == PC_REGNUM)
write_memory (sp - 20,
- registers + REGISTER_BYTE (regno),
+ &deprecated_registers[REGISTER_BYTE (regno)],
REGISTER_RAW_SIZE (regno));
else
write_memory (sp + regmap[regno],
- registers + REGISTER_BYTE (regno),
+ &deprecated_registers[REGISTER_BYTE (regno)],
REGISTER_RAW_SIZE (regno));
}
}
diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c
index 8458879..5ea7802 100644
--- a/gdb/i386-linux-nat.c
+++ b/gdb/i386-linux-nat.c
@@ -34,6 +34,10 @@
#include <sys/reg.h>
#endif
+#ifndef ORIG_EAX
+#define ORIG_EAX -1
+#endif
+
#ifdef HAVE_SYS_DEBUGREG_H
#include <sys/debugreg.h>
#endif
@@ -90,7 +94,15 @@ static int regmap[] =
EAX, ECX, EDX, EBX,
UESP, EBP, ESI, EDI,
EIP, EFL, CS, SS,
- DS, ES, FS, GS
+ DS, ES, FS, GS,
+ -1, -1, -1, -1, /* st0, st1, st2, st3 */
+ -1, -1, -1, -1, /* st4, st5, st6, st7 */
+ -1, -1, -1, -1, /* fctrl, fstat, ftag, fiseg */
+ -1, -1, -1, -1, /* fioff, foseg, fooff, fop */
+ -1, -1, -1, -1, /* xmm0, xmm1, xmm2, xmm3 */
+ -1, -1, -1, -1, /* xmm4, xmm5, xmm6, xmm6 */
+ -1, /* mxcsr */
+ ORIG_EAX
};
/* Which ptrace request retrieves which registers?
@@ -148,155 +160,58 @@ kernel_u_size (void)
}
-/* Fetching registers directly from the U area, one at a time. */
-
-/* FIXME: kettenis/2000-03-05: This duplicates code from `inptrace.c'.
- The problem is that we define FETCH_INFERIOR_REGISTERS since we
- want to use our own versions of {fetch,store}_inferior_registers
- that use the GETREGS request. This means that the code in
- `infptrace.c' is #ifdef'd out. But we need to fall back on that
- code when GDB is running on top of a kernel that doesn't support
- the GETREGS request. I want to avoid changing `infptrace.c' right
- now. */
-
-#ifndef PT_READ_U
-#define PT_READ_U PTRACE_PEEKUSR
-#endif
-#ifndef PT_WRITE_U
-#define PT_WRITE_U PTRACE_POKEUSR
-#endif
-
-/* Default the type of the ptrace transfer to int. */
-#ifndef PTRACE_XFER_TYPE
-#define PTRACE_XFER_TYPE int
-#endif
-
-/* Registers we shouldn't try to fetch. */
-#define OLD_CANNOT_FETCH_REGISTER(regno) ((regno) >= I386_NUM_GREGS)
+/* Accessing registers through the U area, one at a time. */
/* Fetch one register. */
static void
fetch_register (int regno)
{
- /* This isn't really an address. But ptrace thinks of it as one. */
- CORE_ADDR regaddr;
- char mess[128]; /* For messages */
- register int i;
- unsigned int offset; /* Offset of registers within the u area. */
- char buf[MAX_REGISTER_RAW_SIZE];
int tid;
+ int val;
- if (OLD_CANNOT_FETCH_REGISTER (regno))
+ gdb_assert (!have_ptrace_getregs);
+ if (cannot_fetch_register (regno))
{
- memset (buf, '\0', REGISTER_RAW_SIZE (regno)); /* Supply zeroes */
- supply_register (regno, buf);
+ supply_register (regno, NULL);
return;
}
- /* Overload thread id onto process id */
+ /* GNU/Linux LWP ID's are process ID's. */
if ((tid = TIDGET (inferior_ptid)) == 0)
- tid = PIDGET (inferior_ptid); /* no thread id, just use process id */
-
- offset = U_REGS_OFFSET;
-
- regaddr = register_addr (regno, offset);
- for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (PTRACE_XFER_TYPE))
- {
- errno = 0;
- *(PTRACE_XFER_TYPE *) & buf[i] = ptrace (PT_READ_U, tid,
- (PTRACE_ARG3_TYPE) regaddr, 0);
- regaddr += sizeof (PTRACE_XFER_TYPE);
- if (errno != 0)
- {
- sprintf (mess, "reading register %s (#%d)",
- REGISTER_NAME (regno), regno);
- perror_with_name (mess);
- }
- }
- supply_register (regno, buf);
-}
+ tid = PIDGET (inferior_ptid); /* Not a threaded program. */
-/* Fetch register values from the inferior.
- If REGNO is negative, do this for all registers.
- Otherwise, REGNO specifies which register (so we can save time). */
+ errno = 0;
+ val = ptrace (PTRACE_PEEKUSER, tid, register_addr (regno, 0), 0);
+ if (errno != 0)
+ error ("Couldn't read register %s (#%d): %s.", REGISTER_NAME (regno),
+ regno, safe_strerror (errno));
-void
-old_fetch_inferior_registers (int regno)
-{
- if (regno >= 0)
- {
- fetch_register (regno);
- }
- else
- {
- for (regno = 0; regno < NUM_REGS; regno++)
- {
- fetch_register (regno);
- }
- }
+ supply_register (regno, &val);
}
-/* Registers we shouldn't try to store. */
-#define OLD_CANNOT_STORE_REGISTER(regno) ((regno) >= I386_NUM_GREGS)
-
/* Store one register. */
static void
store_register (int regno)
{
- /* This isn't really an address. But ptrace thinks of it as one. */
- CORE_ADDR regaddr;
- char mess[128]; /* For messages */
- register int i;
- unsigned int offset; /* Offset of registers within the u area. */
int tid;
+ int val;
- if (OLD_CANNOT_STORE_REGISTER (regno))
- {
- return;
- }
+ gdb_assert (!have_ptrace_getregs);
+ if (cannot_store_register (regno))
+ return;
- /* Overload thread id onto process id */
+ /* GNU/Linux LWP ID's are process ID's. */
if ((tid = TIDGET (inferior_ptid)) == 0)
- tid = PIDGET (inferior_ptid); /* no thread id, just use process id */
-
- offset = U_REGS_OFFSET;
-
- regaddr = register_addr (regno, offset);
- for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (PTRACE_XFER_TYPE))
- {
- errno = 0;
- ptrace (PT_WRITE_U, tid, (PTRACE_ARG3_TYPE) regaddr,
- *(PTRACE_XFER_TYPE *) & registers[REGISTER_BYTE (regno) + i]);
- regaddr += sizeof (PTRACE_XFER_TYPE);
- if (errno != 0)
- {
- sprintf (mess, "writing register %s (#%d)",
- REGISTER_NAME (regno), regno);
- perror_with_name (mess);
- }
- }
-}
-
-/* Store our register values back into the inferior.
- If REGNO is negative, do this for all registers.
- Otherwise, REGNO specifies which register (so we can save time). */
+ tid = PIDGET (inferior_ptid); /* Not a threaded program. */
-void
-old_store_inferior_registers (int regno)
-{
- if (regno >= 0)
- {
- store_register (regno);
- }
- else
- {
- for (regno = 0; regno < NUM_REGS; regno++)
- {
- store_register (regno);
- }
- }
+ errno = 0;
+ regcache_collect (regno, &val);
+ ptrace (PTRACE_POKEUSER, tid, register_addr (regno, 0), val);
+ if (errno != 0)
+ error ("Couldn't read register %s (#%d): %s.", REGISTER_NAME (regno),
+ regno, safe_strerror (errno));
}
@@ -573,16 +488,15 @@ static void dummy_sse_values (void) {}
int
cannot_fetch_register (int regno)
{
- if (! have_ptrace_getregs)
- return OLD_CANNOT_FETCH_REGISTER (regno);
- return 0;
+ gdb_assert (regno >= 0 && regno < NUM_REGS);
+ return (!have_ptrace_getregs && regmap[regno] == -1);
}
+
int
cannot_store_register (int regno)
{
- if (! have_ptrace_getregs)
- return OLD_CANNOT_STORE_REGISTER (regno);
- return 0;
+ gdb_assert (regno >= 0 && regno < NUM_REGS);
+ return (!have_ptrace_getregs && regmap[regno] == -1);
}
/* Fetch register REGNO from the child process. If REGNO is -1, do
@@ -596,9 +510,14 @@ fetch_inferior_registers (int regno)
/* Use the old method of peeking around in `struct user' if the
GETREGS request isn't available. */
- if (! have_ptrace_getregs)
+ if (!have_ptrace_getregs)
{
- old_fetch_inferior_registers (regno);
+ int i;
+
+ for (i = 0; i < NUM_REGS; i++)
+ if (regno == -1 || regno == i)
+ fetch_register (i);
+
return;
}
@@ -615,9 +534,9 @@ fetch_inferior_registers (int regno)
fetch_regs (tid);
/* The call above might reset `have_ptrace_getregs'. */
- if (! have_ptrace_getregs)
+ if (!have_ptrace_getregs)
{
- old_fetch_inferior_registers (-1);
+ fetch_inferior_registers (regno);
return;
}
@@ -662,9 +581,14 @@ store_inferior_registers (int regno)
/* Use the old method of poking around in `struct user' if the
SETREGS request isn't available. */
- if (! have_ptrace_getregs)
+ if (!have_ptrace_getregs)
{
- old_store_inferior_registers (regno);
+ int i;
+
+ for (i = 0; i < NUM_REGS; i++)
+ if (regno == -1 || regno == i)
+ store_register (i);
+
return;
}
@@ -724,7 +648,7 @@ i386_linux_dr_get (int regnum)
stuff to the target vectore. For now, just return zero if the
ptrace call fails. */
errno = 0;
- value = ptrace (PT_READ_U, tid,
+ value = ptrace (PTRACE_PEEKUSER, tid,
offsetof (struct user, u_debugreg[regnum]), 0);
if (errno != 0)
#if 0
@@ -747,7 +671,7 @@ i386_linux_dr_set (int regnum, unsigned long value)
tid = PIDGET (inferior_ptid);
errno = 0;
- ptrace (PT_WRITE_U, tid,
+ ptrace (PTRACE_POKEUSER, tid,
offsetof (struct user, u_debugreg[regnum]), value);
if (errno != 0)
perror_with_name ("Couldn't write debug register");
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
index a833fb5..f35c4ff 100644
--- a/gdb/i386-linux-tdep.c
+++ b/gdb/i386-linux-tdep.c
@@ -25,6 +25,7 @@
#include "value.h"
#include "regcache.h"
#include "inferior.h"
+#include "reggroups.h"
/* For i386_linux_skip_solib_resolver. */
#include "symtab.h"
@@ -47,6 +48,20 @@ i386_linux_register_name (int reg)
return i386_register_name (reg);
}
+
+/* Return non-zero, when the register is in the corresponding register
+ group. Put the LINUX_ORIG_EAX register in the system group. */
+static int
+i386_linux_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
+ struct reggroup *group)
+{
+ if (regnum == I386_LINUX_ORIG_EAX_REGNUM)
+ return (group == system_reggroup
+ || group == save_reggroup
+ || group == restore_reggroup);
+ return i386_register_reggroup_p (gdbarch, regnum, group);
+}
+
/* Recognizing signal handler frames. */
@@ -209,11 +224,17 @@ i386_linux_rt_sigtramp_start (CORE_ADDR pc)
static int
i386_linux_pc_in_sigtramp (CORE_ADDR pc, char *name)
{
- if (name)
- return STREQ ("__restore", name) || STREQ ("__restore_rt", name);
-
- return (i386_linux_sigtramp_start (pc) != 0
- || i386_linux_rt_sigtramp_start (pc) != 0);
+ /* If we have NAME, we can optimize the search. The trampolines are
+ named __restore and __restore_rt. However, they aren'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 (i386_linux_sigtramp_start (pc) != 0
+ || i386_linux_rt_sigtramp_start (pc) != 0);
+
+ return (strcmp ("__restore", name) == 0
+ || strcmp ("__restore_rt", name) == 0);
}
/* Assuming FRAME is for a GNU/Linux sigtramp routine, return the
@@ -436,6 +457,7 @@ i386_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_write_pc (gdbarch, i386_linux_write_pc);
set_gdbarch_num_regs (gdbarch, I386_SSE_NUM_REGS + 1);
set_gdbarch_register_name (gdbarch, i386_linux_register_name);
+ set_gdbarch_register_reggroup_p (gdbarch, i386_linux_register_reggroup_p);
set_gdbarch_register_bytes (gdbarch, I386_SSE_SIZEOF_REGS + 4);
tdep->jb_pc_offset = 20; /* From <bits/setjmp.h>. */
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index 5a19308..d658e3a 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -37,6 +37,7 @@
#include "doublest.h"
#include "value.h"
#include "gdb_assert.h"
+#include "reggroups.h"
#include "i386-tdep.h"
#include "i387-tdep.h"
@@ -70,11 +71,43 @@ static const int mmx_num_regs = (sizeof (i386_mmx_names)
#define MM0_REGNUM (NUM_REGS)
static int
-mmx_regnum_p (int reg)
+i386_mmx_regnum_p (int reg)
{
return (reg >= MM0_REGNUM && reg < MM0_REGNUM + mmx_num_regs);
}
+/* FP register? */
+
+int
+i386_fp_regnum_p (int regnum)
+{
+ return (regnum < NUM_REGS
+ && (FP0_REGNUM && FP0_REGNUM <= (regnum) && (regnum) < FPC_REGNUM));
+}
+
+int
+i386_fpc_regnum_p (int regnum)
+{
+ return (regnum < NUM_REGS
+ && (FPC_REGNUM <= (regnum) && (regnum) < XMM0_REGNUM));
+}
+
+/* SSE register? */
+
+int
+i386_sse_regnum_p (int regnum)
+{
+ return (regnum < NUM_REGS
+ && (XMM0_REGNUM <= (regnum) && (regnum) < MXCSR_REGNUM));
+}
+
+int
+i386_mxcsr_regnum_p (int regnum)
+{
+ return (regnum < NUM_REGS
+ && (regnum == MXCSR_REGNUM));
+}
+
/* Return the name of register REG. */
const char *
@@ -82,7 +115,7 @@ i386_register_name (int reg)
{
if (reg < 0)
return NULL;
- if (mmx_regnum_p (reg))
+ if (i386_mmx_regnum_p (reg))
return i386_mmx_names[reg - MM0_REGNUM];
if (reg >= sizeof (i386_register_names) / sizeof (*i386_register_names))
return NULL;
@@ -462,7 +495,7 @@ i386_get_frame_setup (CORE_ADDR pc)
/* Return non-zero if we're dealing with a frameless signal, that is,
a signal trampoline invoked from a frameless function. */
-static int
+int
i386_frameless_signal_p (struct frame_info *frame)
{
return (frame->next && frame->next->signal_handler_caller
@@ -535,8 +568,12 @@ static CORE_ADDR
i386_frame_saved_pc (struct frame_info *frame)
{
if (PC_IN_CALL_DUMMY (frame->pc, 0, 0))
- return deprecated_read_register_dummy (frame->pc, frame->frame,
- PC_REGNUM);
+ {
+ ULONGEST pc;
+
+ frame_unwind_unsigned_register (frame, PC_REGNUM, &pc);
+ return pc;
+ }
if (frame->signal_handler_caller)
return i386_sigtramp_saved_pc (frame);
@@ -834,7 +871,7 @@ i386_do_pop_frame (struct frame_info *frame)
if (addr)
{
read_memory (addr, regbuf, REGISTER_RAW_SIZE (regnum));
- write_register_gen (regnum, regbuf);
+ deprecated_write_register_gen (regnum, regbuf);
}
}
write_register (FP_REGNUM, read_memory_integer (fp, 4));
@@ -1039,25 +1076,17 @@ i386_store_return_value (struct type *type, struct regcache *regcache,
}
}
-/* 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. */
+/* Extract from REGCACHE, which contains the (raw) register state, the
+ address in which a function should return its structure value, as a
+ CORE_ADDR. */
static CORE_ADDR
i386_extract_struct_value_address (struct regcache *regcache)
{
- /* NOTE: cagney/2002-08-12: Replaced a call to
- regcache_raw_read_as_address() with a call to
- regcache_cooked_read_unsigned(). The old, ...as_address function
- was eventually calling extract_unsigned_integer (via
- extract_address) to unpack the registers value. The below is
- doing an unsigned extract so that it is functionally equivalent.
- The read needs to be cooked as, otherwise, it will never
- correctly return the value of a register in the [NUM_REGS
- .. NUM_REGS+NUM_PSEUDO_REGS) range. */
- ULONGEST val;
- regcache_cooked_read_unsigned (regcache, LOW_RETURN_REGNUM, &val);
- return val;
+ ULONGEST addr;
+
+ regcache_raw_read_unsigned (regcache, LOW_RETURN_REGNUM, &addr);
+ return addr;
}
@@ -1102,13 +1131,13 @@ i386_register_virtual_type (int regnum)
if (regnum == PC_REGNUM || regnum == FP_REGNUM || regnum == SP_REGNUM)
return lookup_pointer_type (builtin_type_void);
- if (FP_REGNUM_P (regnum))
+ if (i386_fp_regnum_p (regnum))
return builtin_type_i387_ext;
- if (SSE_REGNUM_P (regnum))
+ if (i386_sse_regnum_p (regnum))
return builtin_type_vec128i;
- if (mmx_regnum_p (regnum))
+ if (i386_mmx_regnum_p (regnum))
return builtin_type_vec64i;
return builtin_type_int;
@@ -1135,7 +1164,7 @@ static void
i386_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
int regnum, void *buf)
{
- if (mmx_regnum_p (regnum))
+ if (i386_mmx_regnum_p (regnum))
{
char *mmx_buf = alloca (MAX_REGISTER_RAW_SIZE);
int fpnum = mmx_regnum_to_fp_regnum (regcache, regnum);
@@ -1151,7 +1180,7 @@ static void
i386_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
int regnum, const void *buf)
{
- if (mmx_regnum_p (regnum))
+ if (i386_mmx_regnum_p (regnum))
{
char *mmx_buf = alloca (MAX_REGISTER_RAW_SIZE);
int fpnum = mmx_regnum_to_fp_regnum (regcache, regnum);
@@ -1175,7 +1204,7 @@ i386_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
static int
i386_register_convertible (int regnum)
{
- return FP_REGNUM_P (regnum);
+ return i386_fp_regnum_p (regnum);
}
/* Convert data from raw format for register REGNUM in buffer FROM to
@@ -1185,7 +1214,7 @@ static void
i386_register_convert_to_virtual (int regnum, struct type *type,
char *from, char *to)
{
- gdb_assert (FP_REGNUM_P (regnum));
+ gdb_assert (i386_fp_regnum_p (regnum));
/* We only support floating-point values. */
if (TYPE_CODE (type) != TYPE_CODE_FLT)
@@ -1208,7 +1237,7 @@ static void
i386_register_convert_to_raw (struct type *type, int regnum,
char *from, char *to)
{
- gdb_assert (FP_REGNUM_P (regnum));
+ gdb_assert (i386_fp_regnum_p (regnum));
/* We only support floating-point values. */
if (TYPE_CODE (type) != TYPE_CODE_FLT)
@@ -1415,6 +1444,56 @@ i386_nw_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
}
+/* i386 register groups. In addition to the normal groups, add "mmx"
+ and "sse". */
+
+static struct reggroup *i386_sse_reggroup;
+static struct reggroup *i386_mmx_reggroup;
+
+static void
+i386_init_reggroups (void)
+{
+ i386_sse_reggroup = reggroup_new ("sse", USER_REGGROUP);
+ i386_mmx_reggroup = reggroup_new ("mmx", USER_REGGROUP);
+}
+
+static void
+i386_add_reggroups (struct gdbarch *gdbarch)
+{
+ reggroup_add (gdbarch, i386_sse_reggroup);
+ reggroup_add (gdbarch, i386_mmx_reggroup);
+ reggroup_add (gdbarch, general_reggroup);
+ reggroup_add (gdbarch, float_reggroup);
+ reggroup_add (gdbarch, all_reggroup);
+ reggroup_add (gdbarch, save_reggroup);
+ reggroup_add (gdbarch, restore_reggroup);
+ reggroup_add (gdbarch, vector_reggroup);
+ reggroup_add (gdbarch, system_reggroup);
+}
+
+int
+i386_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
+ struct reggroup *group)
+{
+ int sse_regnum_p = (i386_sse_regnum_p (regnum)
+ || i386_mxcsr_regnum_p (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)
+ return sse_regnum_p;
+ if (group == vector_reggroup)
+ return (mmx_regnum_p || sse_regnum_p);
+ if (group == float_reggroup)
+ 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);
+}
+
+
static struct gdbarch *
i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
@@ -1573,6 +1652,10 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_print_insn (gdbarch, i386_print_insn);
+ /* Add the i386 register groups. */
+ i386_add_reggroups (gdbarch);
+ set_gdbarch_register_reggroup_p (gdbarch, i386_register_reggroup_p);
+
/* Hook in ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch, osabi);
@@ -1643,4 +1726,7 @@ are \"default\", \"pcc\" and \"reg\", and the default value is \"default\".",
i386_go32_init_abi);
gdbarch_register_osabi (bfd_arch_i386, GDB_OSABI_NETWARE,
i386_nw_init_abi);
+
+ /* Initialize the i386 specific register groups. */
+ i386_init_reggroups ();
}
diff --git a/gdb/i386-tdep.h b/gdb/i386-tdep.h
index 646001b..627cb0a 100644
--- a/gdb/i386-tdep.h
+++ b/gdb/i386-tdep.h
@@ -113,11 +113,10 @@ struct gdbarch_tdep
/* FPU opcode, bottom eleven bits. */
#define FOP_REGNUM (FPC_REGNUM + 7)
-/* Return non-zero if N corresponds to a FPU data registers. */
-#define FP_REGNUM_P(n) (FP0_REGNUM && FP0_REGNUM <= (n) && (n) < FPC_REGNUM)
-
-/* Return non-zero if N corresponds to a FPU control register. */
-#define FPC_REGNUM_P(n) (FPC_REGNUM <= (n) && (n) < XMM0_REGNUM)
+/* Return non-zero if REGNUM matches the FP register and the FP
+ register set is active. */
+extern int i386_fp_regnum_p (int regnum);
+extern int i386_fpc_regnum_p (int regnum);
/* SSE registers. */
@@ -128,17 +127,18 @@ struct gdbarch_tdep
#define MXCSR_REGNUM \
(XMM0_REGNUM + gdbarch_tdep (current_gdbarch)->num_xmm_regs)
-/* Return non-zero if N corresponds to a SSE data register. */
-#define SSE_REGNUM_P(n) (XMM0_REGNUM <= (n) && (n) < MXCSR_REGNUM)
+/* Return non-zero if REGNUM matches the SSE register and the SSE
+ register set is active. */
+extern int i386_sse_regnum_p (int regnum);
+extern int i386_mxcsr_regnum_p (int regnum);
/* FIXME: kettenis/2001-11-24: Obsolete macro's. */
#define FCS_REGNUM FISEG_REGNUM
#define FCOFF_REGNUM FIOFF_REGNUM
#define FDS_REGNUM FOSEG_REGNUM
#define FDOFF_REGNUM FOOFF_REGNUM
-#define IS_FP_REGNUM(n) FP_REGNUM_P (n)
-#define IS_FPU_CTRL_REGNUM(n) FPC_REGNUM_P (n)
-#define IS_SSE_REGNUM(n) SSE_REGNUM_P (n)
+#define IS_FP_REGNUM(n) i386_fp_regnum_p (n)
+#define IS_SSE_REGNUM(n) i386_sse_regnum_p (n)
#define I386_NUM_GREGS 16
#define I386_NUM_FREGS 16
@@ -162,10 +162,15 @@ struct gdbarch_tdep
/* Functions exported from i386-tdep.c. */
extern CORE_ADDR i386_pe_skip_trampoline_code (CORE_ADDR pc, char *name);
+extern int i386_frameless_signal_p (struct frame_info *frame);
/* Return the name of register REG. */
extern char const *i386_register_name (int reg);
+/* Return non-zero if REGNUM is a member of the specified group. */
+extern int i386_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
+ struct reggroup *group);
+
/* Initialize a basic ELF architecture variant. */
extern void i386_elf_init_abi (struct gdbarch_info, struct gdbarch *);
diff --git a/gdb/i386gnu-nat.c b/gdb/i386gnu-nat.c
index 3fa99a3..4623e11 100644
--- a/gdb/i386gnu-nat.c
+++ b/gdb/i386gnu-nat.c
@@ -184,7 +184,7 @@ store_fpregs (struct proc *thread, int regno)
}
/* FIXME: kettenis/2001-07-15: Is this right? Should we somehow
- take into account REGISTER_VALID like the old code did? */
+ take into account DEPRECATED_REGISTER_VALID like the old code did? */
i387_fill_fsave (state.hw_state, regno);
err = thread_set_state (thread->port, i386_FLOAT_STATE,
@@ -256,7 +256,7 @@ gnu_store_registers (int regno)
}
#define fill(state, regno) \
- memcpy (REG_ADDR(state, regno), &registers[REGISTER_BYTE (regno)], \
+ memcpy (REG_ADDR(state, regno), &deprecated_registers[REGISTER_BYTE (regno)], \
REGISTER_RAW_SIZE (regno))
if (regno == -1)
@@ -266,14 +266,14 @@ gnu_store_registers (int regno)
proc_debug (thread, "storing all registers");
for (i = 0; i < I386_NUM_GREGS; i++)
- if (register_valid[i])
+ if (deprecated_register_valid[i])
fill (state, i);
}
else
{
proc_debug (thread, "storing register %s", REGISTER_NAME (regno));
- gdb_assert (register_valid[regno]);
+ gdb_assert (deprecated_register_valid[regno]);
fill (state, regno);
}
diff --git a/gdb/i386v-nat.c b/gdb/i386v-nat.c
index 78152e4..a6dc505 100644
--- a/gdb/i386v-nat.c
+++ b/gdb/i386v-nat.c
@@ -85,7 +85,7 @@ register_u_addr (CORE_ADDR blockend, int regnum)
struct user u;
CORE_ADDR fpstate;
- if (FP_REGNUM_P (regnum))
+ if (i386_fp_regnum_p (regnum))
{
#ifdef KSTKSZ /* SCO, and others? */
blockend += 4 * (SS + 1) - KSTKSZ;
diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c
index 3d4b397..9b47e58 100644
--- a/gdb/i387-tdep.c
+++ b/gdb/i387-tdep.c
@@ -321,26 +321,35 @@ void
i387_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
struct frame_info *frame, const char *args)
{
- unsigned int fctrl;
- unsigned int fstat;
- unsigned int ftag;
- unsigned int fiseg;
- unsigned int fioff;
- unsigned int foseg;
- unsigned int fooff;
- unsigned int fop;
+ char buf[4];
+ ULONGEST fctrl;
+ ULONGEST fstat;
+ ULONGEST ftag;
+ ULONGEST fiseg;
+ ULONGEST fioff;
+ ULONGEST foseg;
+ ULONGEST fooff;
+ ULONGEST fop;
int fpreg;
int top;
- fctrl = read_register (FCTRL_REGNUM);
- fstat = read_register (FSTAT_REGNUM);
- ftag = read_register (FTAG_REGNUM);
- fiseg = read_register (FCS_REGNUM);
- fioff = read_register (FCOFF_REGNUM);
- foseg = read_register (FDS_REGNUM);
- fooff = read_register (FDOFF_REGNUM);
- fop = read_register (FOP_REGNUM);
-
+ frame_register_read (frame, FCTRL_REGNUM, buf);
+ fctrl = extract_unsigned_integer (buf, 4);
+ frame_register_read (frame, FSTAT_REGNUM, buf);
+ fstat = extract_unsigned_integer (buf, 4);
+ frame_register_read (frame, FTAG_REGNUM, buf);
+ ftag = extract_unsigned_integer (buf, 4);
+ frame_register_read (frame, FISEG_REGNUM, buf);
+ fiseg = extract_unsigned_integer (buf, 4);
+ frame_register_read (frame, FIOFF_REGNUM, buf);
+ fioff = extract_unsigned_integer (buf, 4);
+ frame_register_read (frame, FOSEG_REGNUM, buf);
+ foseg = extract_unsigned_integer (buf, 4);
+ frame_register_read (frame, FOOFF_REGNUM, buf);
+ fooff = extract_unsigned_integer (buf, 4);
+ frame_register_read (frame, FOP_REGNUM, buf);
+ fop = extract_unsigned_integer (buf, 4);
+
top = ((fstat >> 11) & 7);
for (fpreg = 7; fpreg >= 0; fpreg--)
@@ -367,7 +376,7 @@ i387_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
break;
}
- read_register_gen ((fpreg + 8 - top) % 8 + FP0_REGNUM, raw);
+ frame_register_read (frame, (fpreg + 8 - top) % 8 + FP0_REGNUM, raw);
fputs_filtered ("0x", file);
for (i = 9; i >= 0; i--)
@@ -379,7 +388,7 @@ i387_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
fputs_filtered ("\n", file);
}
- puts_filtered ("\n");
+ fputs_filtered ("\n", file);
print_i387_status_word (fstat, file);
print_i387_control_word (fctrl, file);
@@ -435,6 +444,12 @@ static int fsave_offset[] =
void
i387_supply_register (int regnum, char *fsave)
{
+ if (fsave == NULL)
+ {
+ supply_register (regnum, NULL);
+ return;
+ }
+
/* Most of the FPU control registers occupy only 16 bits in
the fsave area. Give those a special treatment. */
if (regnum >= FPC_REGNUM
@@ -555,6 +570,12 @@ i387_supply_fxsave (char *fxsave)
for (i = FP0_REGNUM; i <= last_regnum; i++)
{
+ if (fxsave == NULL)
+ {
+ supply_register (i, NULL);
+ continue;
+ }
+
/* Most of the FPU control registers occupy only 16 bits in
the fxsave area. Give those a special treatment. */
if (i >= FPC_REGNUM && i < XMM0_REGNUM
@@ -621,7 +642,7 @@ i387_fill_fxsave (char *fxsave, int regnum)
/* Most of the FPU control registers occupy only 16 bits in
the fxsave area. Give those a special treatment. */
if (i >= FPC_REGNUM && i < XMM0_REGNUM
- && i != FIOFF_REGNUM && i != FDOFF_REGNUM)
+ && i != FIOFF_REGNUM && i != FOOFF_REGNUM)
{
unsigned char buf[4];
diff --git a/gdb/ia64-aix-nat.c b/gdb/ia64-aix-nat.c
index c41cc7c..c94144c 100644
--- a/gdb/ia64-aix-nat.c
+++ b/gdb/ia64-aix-nat.c
@@ -71,11 +71,11 @@ supply_gregset (prgregset_t *gregsetp)
by other means. Those that aren't are already handled by the
code above. */
for (regi = IA64_GR32_REGNUM; regi <= IA64_GR127_REGNUM; regi++)
- register_valid[regi] = 1;
+ deprecated_register_valid[regi] = 1;
for (regi = IA64_PR0_REGNUM; regi <= IA64_PR63_REGNUM; regi++)
- register_valid[regi] = 1;
+ deprecated_register_valid[regi] = 1;
for (regi = IA64_VFP_REGNUM; regi <= NUM_REGS; regi++)
- register_valid[regi] = 1;
+ deprecated_register_valid[regi] = 1;
}
void
@@ -85,7 +85,7 @@ fill_gregset (prgregset_t *gregsetp, int regno)
#define COPY_REG(_fld_,_regi_) \
if ((regno == -1) || regno == _regi_) \
- memcpy (&(gregsetp->_fld_), &registers[REGISTER_BYTE (_regi_)], \
+ memcpy (&(gregsetp->_fld_), &deprecated_registers[REGISTER_BYTE (_regi_)], \
REGISTER_RAW_SIZE (_regi_))
for (regi = IA64_GR0_REGNUM; regi <= IA64_GR31_REGNUM; regi++)
@@ -108,10 +108,10 @@ fill_gregset (prgregset_t *gregsetp, int regno)
if (regno == IA64_BSP_REGNUM || regno == -1)
{
memcpy (&(gregsetp->__bspstore),
- &registers[REGISTER_BYTE (IA64_BSP_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (IA64_BSP_REGNUM)],
REGISTER_RAW_SIZE (IA64_BSP_REGNUM));
- memcpy (&registers[REGISTER_BYTE (IA64_BSPSTORE_REGNUM)],
- &registers[REGISTER_BYTE (IA64_BSP_REGNUM)],
+ memcpy (&deprecated_registers[REGISTER_BYTE (IA64_BSPSTORE_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (IA64_BSP_REGNUM)],
REGISTER_RAW_SIZE (IA64_BSP_REGNUM));
}
@@ -153,7 +153,7 @@ fill_fpregset (prfpregset_t *fpregsetp, int regno)
{
if ((regno == -1) || (regno == regi))
{
- from = (char *) &registers[REGISTER_BYTE (regi)];
+ from = (char *) &deprecated_registers[REGISTER_BYTE (regi)];
to = (char *) &(fpregsetp->__fpr[regi - IA64_FR0_REGNUM]);
memcpy (to, from, REGISTER_RAW_SIZE (regi));
}
diff --git a/gdb/ia64-linux-nat.c b/gdb/ia64-linux-nat.c
index 82695ef..76b8235 100644
--- a/gdb/ia64-linux-nat.c
+++ b/gdb/ia64-linux-nat.c
@@ -400,7 +400,7 @@ fill_gregset (gregset_t *gregsetp, int regno)
#define COPY_REG(_idx_,_regi_) \
if ((regno == -1) || regno == _regi_) \
- memcpy (regp + _idx_, &registers[REGISTER_BYTE (_regi_)], \
+ memcpy (regp + _idx_, &deprecated_registers[REGISTER_BYTE (_regi_)], \
REGISTER_RAW_SIZE (_regi_))
for (regi = IA64_GR0_REGNUM; regi <= IA64_GR31_REGNUM; regi++)
@@ -465,7 +465,7 @@ fill_fpregset (fpregset_t *fpregsetp, int regno)
{
if ((regno == -1) || (regno == regi))
{
- from = (char *) &registers[REGISTER_BYTE (regi)];
+ from = (char *) &deprecated_registers[REGISTER_BYTE (regi)];
to = (char *) &((*fpregsetp)[regi - IA64_FR0_REGNUM]);
memcpy (to, from, REGISTER_RAW_SIZE (regi));
}
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index 53f21a4..59c7c73 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -1375,8 +1375,8 @@ ia64_get_saved_register (char *raw_buffer,
+ ((regnum - IA64_FR32_REGNUM) + rrb_fr) % 96;
}
- generic_get_saved_register (raw_buffer, optimized, addrp, frame,
- regnum, lval);
+ deprecated_generic_get_saved_register (raw_buffer, optimized, addrp,
+ frame, regnum, lval);
}
}
@@ -1902,7 +1902,7 @@ ia64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
float_elt_type,
floatreg,
VALUE_CONTENTS (arg) + argoffset,
- &registers[REGISTER_BYTE (floatreg)]);
+ &deprecated_registers[REGISTER_BYTE (floatreg)]);
floatreg++;
argoffset += TYPE_LENGTH (float_elt_type);
len -= TYPE_LENGTH (float_elt_type);
@@ -1913,7 +1913,7 @@ ia64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
/* Store the struct return value in r8 if necessary. */
if (struct_return)
{
- store_address (&registers[REGISTER_BYTE (IA64_GR8_REGNUM)],
+ store_address (&deprecated_registers[REGISTER_BYTE (IA64_GR8_REGNUM)],
REGISTER_RAW_SIZE (IA64_GR8_REGNUM),
struct_addr);
}
@@ -1954,12 +1954,12 @@ ia64_store_return_value (struct type *type, char *valbuf)
if (TYPE_CODE (type) == TYPE_CODE_FLT)
{
ia64_register_convert_to_raw (type, IA64_FR8_REGNUM, valbuf,
- &registers[REGISTER_BYTE (IA64_FR8_REGNUM)]);
+ &deprecated_registers[REGISTER_BYTE (IA64_FR8_REGNUM)]);
target_store_registers (IA64_FR8_REGNUM);
}
else
- write_register_bytes (REGISTER_BYTE (IA64_GR8_REGNUM),
- valbuf, TYPE_LENGTH (type));
+ deprecated_write_register_bytes (REGISTER_BYTE (IA64_GR8_REGNUM),
+ valbuf, TYPE_LENGTH (type));
}
void
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 3339845..01d45b3 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -42,6 +42,8 @@
#include "event-top.h"
#include "parser-defs.h"
#include "regcache.h"
+#include "reggroups.h"
+#include <ctype.h>
/* Functions exported for general use, in inferior.h: */
@@ -1572,10 +1574,9 @@ default_print_registers_info (struct gdbarch *gdbarch,
char *raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
char *virtual_buffer = alloca (MAX_REGISTER_VIRTUAL_SIZE);
- /* FIXME: cagney/2002-03-08: This should be deprecated. */
- if (DO_REGISTERS_INFO_P ())
+ if (DEPRECATED_DO_REGISTERS_INFO_P ())
{
- DO_REGISTERS_INFO (regnum, print_all);
+ DEPRECATED_DO_REGISTERS_INFO (regnum, print_all);
return;
}
@@ -1585,11 +1586,14 @@ default_print_registers_info (struct gdbarch *gdbarch,
specific reg. */
if (regnum == -1)
{
- if (!print_all)
+ if (print_all)
{
- if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
+ if (!gdbarch_register_reggroup_p (gdbarch, i, all_reggroup))
continue;
- if (TYPE_VECTOR (REGISTER_VIRTUAL_TYPE (i)))
+ }
+ else
+ {
+ if (!gdbarch_register_reggroup_p (gdbarch, i, general_reggroup))
continue;
}
}
@@ -1665,12 +1669,6 @@ default_print_registers_info (struct gdbarch *gdbarch,
}
}
- /* The SPARC wants to print even-numbered float regs as doubles
- in addition to printing them as floats. */
-#ifdef PRINT_REGISTER_HOOK
- PRINT_REGISTER_HOOK (i);
-#endif
-
fprintf_filtered (file, "\n");
}
}
@@ -1693,35 +1691,89 @@ registers_info (char *addr_exp, int fpregs)
return;
}
- do
+ while (*addr_exp != '\0')
{
- if (addr_exp[0] == '$')
- addr_exp++;
- end = addr_exp;
- while (*end != '\0' && *end != ' ' && *end != '\t')
- ++end;
- numregs = NUM_REGS + NUM_PSEUDO_REGS;
+ char *start;
+ const char *end;
- regnum = frame_map_name_to_regnum (addr_exp, end - addr_exp);
- if (regnum >= 0)
- goto found;
-
- regnum = numregs;
+ /* Keep skipping leading white space. */
+ if (isspace ((*addr_exp)))
+ {
+ addr_exp++;
+ continue;
+ }
- if (*addr_exp >= '0' && *addr_exp <= '9')
- regnum = atoi (addr_exp); /* Take a number */
- if (regnum >= numregs) /* Bad name, or bad number */
- error ("%.*s: invalid register", (int) (end - addr_exp), addr_exp);
+ /* Discard any leading ``$''. Check that there is something
+ resembling a register following it. */
+ if (addr_exp[0] == '$')
+ addr_exp++;
+ if (isspace ((*addr_exp)) || (*addr_exp) == '\0')
+ error ("Missing register name");
- found:
- gdbarch_print_registers_info (current_gdbarch, gdb_stdout,
- selected_frame, regnum, fpregs);
+ /* Find the start/end of this register name/num/group. */
+ start = addr_exp;
+ while ((*addr_exp) != '\0' && !isspace ((*addr_exp)))
+ addr_exp++;
+ end = addr_exp;
+
+ /* Figure out what we've found and display it. */
+
+ /* A register name? */
+ {
+ int regnum = frame_map_name_to_regnum (start, end - start);
+ if (regnum >= 0)
+ {
+ gdbarch_print_registers_info (current_gdbarch, gdb_stdout,
+ selected_frame, regnum, fpregs);
+ continue;
+ }
+ }
+
+ /* A register number? (how portable is this one?). */
+ {
+ char *endptr;
+ int regnum = strtol (start, &endptr, 0);
+ if (endptr == end
+ && regnum >= 0
+ && regnum < NUM_REGS + NUM_PSEUDO_REGS)
+ {
+ gdbarch_print_registers_info (current_gdbarch, gdb_stdout,
+ selected_frame, regnum, fpregs);
+ continue;
+ }
+ }
+
+ /* A register group? */
+ {
+ struct reggroup *const *group;
+ for (group = reggroups (current_gdbarch);
+ (*group) != NULL;
+ group++)
+ {
+ /* Don't bother with a length check. Should the user
+ enter a short register group name, go with the first
+ group that matches. */
+ if (strncmp (start, reggroup_name ((*group)), end - start) == 0)
+ break;
+ }
+ if ((*group) != NULL)
+ {
+ int regnum;
+ for (regnum = 0; regnum < NUM_REGS + NUM_PSEUDO_REGS; regnum++)
+ {
+ if (gdbarch_register_reggroup_p (current_gdbarch, regnum,
+ (*group)))
+ gdbarch_print_registers_info (current_gdbarch,
+ gdb_stdout, selected_frame,
+ regnum, fpregs);
+ }
+ continue;
+ }
+ }
- addr_exp = end;
- while (*addr_exp == ' ' || *addr_exp == '\t')
- ++addr_exp;
+ /* Nothing matched. */
+ error ("Invalid register `%.*s'", (int) (end - start), start);
}
- while (*addr_exp != '\0');
}
void
@@ -1740,6 +1792,11 @@ static void
print_vector_info (struct gdbarch *gdbarch, struct ui_file *file,
struct frame_info *frame, const char *args)
{
+ if (!target_has_registers)
+ error ("The program has no registers now.");
+ if (selected_frame == NULL)
+ error ("No selected frame.");
+
if (gdbarch_print_vector_info_p (gdbarch))
gdbarch_print_vector_info (gdbarch, file, frame, args);
else
@@ -1747,14 +1804,9 @@ print_vector_info (struct gdbarch *gdbarch, struct ui_file *file,
int regnum;
int printed_something = 0;
- if (!target_has_registers)
- error ("The program has no registers now.");
- if (selected_frame == NULL)
- error ("No selected frame.");
-
for (regnum = 0; regnum < NUM_REGS + NUM_PSEUDO_REGS; regnum++)
{
- if (TYPE_VECTOR (REGISTER_VIRTUAL_TYPE (regnum)))
+ if (gdbarch_register_reggroup_p (gdbarch, regnum, vector_reggroup))
{
printed_something = 1;
gdbarch_print_registers_info (gdbarch, file, frame, regnum, 1);
@@ -1907,6 +1959,11 @@ static void
print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
struct frame_info *frame, const char *args)
{
+ if (!target_has_registers)
+ error ("The program has no registers now.");
+ if (selected_frame == NULL)
+ error ("No selected frame.");
+
if (gdbarch_print_float_info_p (gdbarch))
gdbarch_print_float_info (gdbarch, file, frame, args);
else
@@ -1920,14 +1977,9 @@ print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
int regnum;
int printed_something = 0;
- if (!target_has_registers)
- error ("The program has no registers now.");
- if (selected_frame == NULL)
- error ("No selected frame.");
-
for (regnum = 0; regnum < NUM_REGS + NUM_PSEUDO_REGS; regnum++)
{
- if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (regnum)) == TYPE_CODE_FLT)
+ if (gdbarch_register_reggroup_p (gdbarch, regnum, float_reggroup))
{
printed_something = 1;
gdbarch_print_registers_info (gdbarch, file, frame, regnum, 1);
diff --git a/gdb/infptrace.c b/gdb/infptrace.c
index 777a5b4..601e157 100644
--- a/gdb/infptrace.c
+++ b/gdb/infptrace.c
@@ -514,6 +514,37 @@ child_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
PTRACE_XFER_TYPE *buffer;
struct cleanup *old_chain = NULL;
+#ifdef PT_IO
+ /* OpenBSD 3.1, NetBSD 1.6 and FreeBSD 5.0 have a new PT_IO request
+ that promises to be much more efficient in reading and writing
+ data in the traced process's address space. */
+
+ {
+ struct ptrace_io_desc piod;
+
+ /* NOTE: We assume that there are no distinct address spaces for
+ instruction and data. */
+ piod.piod_op = write ? PIOD_WRITE_D : PIOD_READ_D;
+ piod.piod_offs = (void *) memaddr;
+ piod.piod_addr = myaddr;
+ piod.piod_len = len;
+
+ if (ptrace (PT_IO, PIDGET (inferior_ptid), (caddr_t) &piod, 0) == -1)
+ {
+ /* If the PT_IO request is somehow not supported, fallback on
+ using PT_WRITE_D/PT_READ_D. Otherwise we will return zero
+ to indicate failure. */
+ if (errno != EINVAL)
+ return 0;
+ }
+ else
+ {
+ /* Return the actual number of bytes read or written. */
+ return piod.piod_len;
+ }
+ }
+#endif
+
/* Allocate buffer of that many longwords. */
if (len < GDB_MAX_ALLOCA)
{
diff --git a/gdb/irix4-nat.c b/gdb/irix4-nat.c
index 0f44776..2283887 100644
--- a/gdb/irix4-nat.c
+++ b/gdb/irix4-nat.c
@@ -77,19 +77,19 @@ fill_gregset (gregset_t *gregsetp, int regno)
/* same FIXME as above wrt 32 */
for (regi = 0; regi < 32; regi++)
if ((regno == -1) || (regno == regi))
- *(regp + regi) = *(greg_t *) & registers[REGISTER_BYTE (regi)];
+ *(regp + regi) = *(greg_t *) & deprecated_registers[REGISTER_BYTE (regi)];
if ((regno == -1) || (regno == PC_REGNUM))
- gregsetp->gp_pc = *(greg_t *) & registers[REGISTER_BYTE (PC_REGNUM)];
+ gregsetp->gp_pc = *(greg_t *) & deprecated_registers[REGISTER_BYTE (PC_REGNUM)];
if ((regno == -1) || (regno == CAUSE_REGNUM))
- gregsetp->gp_cause = *(greg_t *) & registers[REGISTER_BYTE (CAUSE_REGNUM)];
+ gregsetp->gp_cause = *(greg_t *) & deprecated_registers[REGISTER_BYTE (CAUSE_REGNUM)];
if ((regno == -1) || (regno == HI_REGNUM))
- gregsetp->gp_mdhi = *(greg_t *) & registers[REGISTER_BYTE (HI_REGNUM)];
+ gregsetp->gp_mdhi = *(greg_t *) & deprecated_registers[REGISTER_BYTE (HI_REGNUM)];
if ((regno == -1) || (regno == LO_REGNUM))
- gregsetp->gp_mdlo = *(greg_t *) & registers[REGISTER_BYTE (LO_REGNUM)];
+ gregsetp->gp_mdlo = *(greg_t *) & deprecated_registers[REGISTER_BYTE (LO_REGNUM)];
}
/*
@@ -127,14 +127,14 @@ fill_fpregset (fpregset_t *fpregsetp, int regno)
{
if ((regno == -1) || (regno == regi))
{
- from = (char *) &registers[REGISTER_BYTE (regi)];
+ from = (char *) &deprecated_registers[REGISTER_BYTE (regi)];
to = (char *) &(fpregsetp->fp_r.fp_regs[regi - FP0_REGNUM]);
memcpy (to, from, REGISTER_RAW_SIZE (regi));
}
}
if ((regno == -1) || (regno == FCRCS_REGNUM))
- fpregsetp->fp_csr = *(unsigned *) &registers[REGISTER_BYTE (FCRCS_REGNUM)];
+ fpregsetp->fp_csr = *(unsigned *) &deprecated_registers[REGISTER_BYTE (FCRCS_REGNUM)];
}
@@ -184,7 +184,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
return;
}
- memcpy ((char *) registers, core_reg_sect, core_reg_size);
+ memcpy ((char *) deprecated_registers, core_reg_sect, core_reg_size);
}
diff --git a/gdb/irix5-nat.c b/gdb/irix5-nat.c
index d5b5c0c..9e4f210 100644
--- a/gdb/irix5-nat.c
+++ b/gdb/irix5-nat.c
@@ -83,27 +83,27 @@ fill_gregset (gregset_t *gregsetp, int regno)
for (regi = 0; regi <= CTX_RA; regi++)
if ((regno == -1) || (regno == regi))
*(regp + regi) =
- extract_signed_integer (&registers[REGISTER_BYTE (regi)],
+ extract_signed_integer (&deprecated_registers[REGISTER_BYTE (regi)],
REGISTER_RAW_SIZE (regi));
if ((regno == -1) || (regno == PC_REGNUM))
*(regp + CTX_EPC) =
- extract_signed_integer (&registers[REGISTER_BYTE (PC_REGNUM)],
+ extract_signed_integer (&deprecated_registers[REGISTER_BYTE (PC_REGNUM)],
REGISTER_RAW_SIZE (PC_REGNUM));
if ((regno == -1) || (regno == CAUSE_REGNUM))
*(regp + CTX_CAUSE) =
- extract_signed_integer (&registers[REGISTER_BYTE (CAUSE_REGNUM)],
+ extract_signed_integer (&deprecated_registers[REGISTER_BYTE (CAUSE_REGNUM)],
REGISTER_RAW_SIZE (CAUSE_REGNUM));
if ((regno == -1) || (regno == HI_REGNUM))
*(regp + CTX_MDHI) =
- extract_signed_integer (&registers[REGISTER_BYTE (HI_REGNUM)],
+ extract_signed_integer (&deprecated_registers[REGISTER_BYTE (HI_REGNUM)],
REGISTER_RAW_SIZE (HI_REGNUM));
if ((regno == -1) || (regno == LO_REGNUM))
*(regp + CTX_MDLO) =
- extract_signed_integer (&registers[REGISTER_BYTE (LO_REGNUM)],
+ extract_signed_integer (&deprecated_registers[REGISTER_BYTE (LO_REGNUM)],
REGISTER_RAW_SIZE (LO_REGNUM));
}
@@ -145,14 +145,14 @@ fill_fpregset (fpregset_t *fpregsetp, int regno)
{
if ((regno == -1) || (regno == regi))
{
- from = (char *) &registers[REGISTER_BYTE (regi)];
+ from = (char *) &deprecated_registers[REGISTER_BYTE (regi)];
to = (char *) &(fpregsetp->fp_r.fp_regs[regi - FP0_REGNUM]);
memcpy (to, from, REGISTER_RAW_SIZE (regi));
}
}
if ((regno == -1) || (regno == FCRCS_REGNUM))
- fpregsetp->fp_csr = *(unsigned *) &registers[REGISTER_BYTE (FCRCS_REGNUM)];
+ fpregsetp->fp_csr = *(unsigned *) &deprecated_registers[REGISTER_BYTE (FCRCS_REGNUM)];
}
@@ -198,7 +198,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
{
if (core_reg_size == REGISTER_BYTES)
{
- memcpy ((char *) registers, core_reg_sect, core_reg_size);
+ memcpy ((char *) deprecated_registers, core_reg_sect, core_reg_size);
}
else if (MIPS_REGSIZE == 4 &&
core_reg_size == (2 * MIPS_REGSIZE) * NUM_REGS)
@@ -206,7 +206,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
/* This is a core file from a N32 executable, 64 bits are saved
for all registers. */
char *srcp = core_reg_sect;
- char *dstp = registers;
+ char *dstp = deprecated_registers;
int regno;
for (regno = 0; regno < NUM_REGS; regno++)
@@ -250,7 +250,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
return;
}
- registers_fetched ();
+ deprecated_registers_fetched ();
}
/* Register that we are able to handle irix5 core file formats.
diff --git a/gdb/lin-lwp.c b/gdb/lin-lwp.c
index cd577fb..4b9d57d 100644
--- a/gdb/lin-lwp.c
+++ b/gdb/lin-lwp.c
@@ -579,11 +579,8 @@ lin_lwp_resume (ptid_t ptid, int step, enum target_signal signo)
struct lwp_info *lp;
int resume_all;
- /* Apparently the interpretation of PID is dependent on STEP: If
- STEP is non-zero, a specific PID means `step only this process
- id'. But if STEP is zero, then PID means `continue *all*
- processes, but give the signal only to this one'. */
- resume_all = (PIDGET (ptid) == -1) || !step;
+ /* A specific PTID means `step only this process id'. */
+ resume_all = (PIDGET (ptid) == -1);
if (resume_all)
iterate_over_lwps (resume_set_callback, NULL);
diff --git a/gdb/lynx-nat.c b/gdb/lynx-nat.c
index 9cd1672..37edc2b 100644
--- a/gdb/lynx-nat.c
+++ b/gdb/lynx-nat.c
@@ -296,10 +296,10 @@ fetch_inferior_registers (int regno)
supply_register (G0_REGNUM, buf);
supply_register (TBR_REGNUM, (char *) &ec.tbr);
- memcpy (&registers[REGISTER_BYTE (G1_REGNUM)], &ec.g1,
+ memcpy (&deprecated_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;
+ deprecated_register_valid[i] = 1;
supply_register (PS_REGNUM, (char *) &ec.psr);
supply_register (Y_REGNUM, (char *) &ec.y);
@@ -307,10 +307,10 @@ fetch_inferior_registers (int regno)
supply_register (NPC_REGNUM, (char *) &ec.npc);
supply_register (WIM_REGNUM, (char *) &ec.wim);
- memcpy (&registers[REGISTER_BYTE (O0_REGNUM)], ec.o,
+ memcpy (&deprecated_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;
+ deprecated_register_valid[i] = 1;
}
if (whatregs & WHATREGS_STACK)
@@ -321,16 +321,16 @@ fetch_inferior_registers (int regno)
sp = read_register (SP_REGNUM);
target_read_memory (sp + FRAME_SAVED_I0,
- &registers[REGISTER_BYTE (I0_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (I0_REGNUM)],
8 * REGISTER_RAW_SIZE (I0_REGNUM));
for (i = I0_REGNUM; i <= I7_REGNUM; i++)
- register_valid[i] = 1;
+ deprecated_register_valid[i] = 1;
target_read_memory (sp + FRAME_SAVED_L0,
- &registers[REGISTER_BYTE (L0_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (L0_REGNUM)],
8 * REGISTER_RAW_SIZE (L0_REGNUM));
for (i = L0_REGNUM; i <= L0_REGNUM + 7; i++)
- register_valid[i] = 1;
+ deprecated_register_valid[i] = 1;
}
if (whatregs & WHATREGS_FLOAT)
@@ -345,10 +345,10 @@ fetch_inferior_registers (int regno)
if (errno)
perror_with_name ("ptrace(PTRACE_GETFPREGS)");
- memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], fc.f.fregs,
+ memcpy (&deprecated_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;
+ deprecated_register_valid[i] = 1;
supply_register (FPS_REGNUM, (char *) &fc.fsr);
}
@@ -383,7 +383,7 @@ store_inferior_registers (int regno)
int retval;
ec.tbr = read_register (TBR_REGNUM);
- memcpy (&ec.g1, &registers[REGISTER_BYTE (G1_REGNUM)],
+ memcpy (&ec.g1, &deprecated_registers[REGISTER_BYTE (G1_REGNUM)],
4 * REGISTER_RAW_SIZE (G1_REGNUM));
ec.psr = read_register (PS_REGNUM);
@@ -392,7 +392,7 @@ store_inferior_registers (int regno)
ec.npc = read_register (NPC_REGNUM);
ec.wim = read_register (WIM_REGNUM);
- memcpy (ec.o, &registers[REGISTER_BYTE (O0_REGNUM)],
+ memcpy (ec.o, &deprecated_registers[REGISTER_BYTE (O0_REGNUM)],
8 * REGISTER_RAW_SIZE (O0_REGNUM));
errno = 0;
@@ -411,19 +411,19 @@ store_inferior_registers (int regno)
if (regno == -1 || regno == SP_REGNUM)
{
- if (!register_valid[L0_REGNUM + 5])
+ if (!deprecated_register_valid[L0_REGNUM + 5])
internal_error (__FILE__, __LINE__, "failed internal consistency check");
target_write_memory (sp + FRAME_SAVED_I0,
- &registers[REGISTER_BYTE (I0_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (I0_REGNUM)],
8 * REGISTER_RAW_SIZE (I0_REGNUM));
target_write_memory (sp + FRAME_SAVED_L0,
- &registers[REGISTER_BYTE (L0_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (L0_REGNUM)],
8 * REGISTER_RAW_SIZE (L0_REGNUM));
}
else if (regno >= L0_REGNUM && regno <= I7_REGNUM)
{
- if (!register_valid[regno])
+ if (!deprecated_register_valid[regno])
internal_error (__FILE__, __LINE__, "failed internal consistency check");
if (regno >= L0_REGNUM && regno <= L0_REGNUM + 7)
regoffset = REGISTER_BYTE (regno) - REGISTER_BYTE (L0_REGNUM)
@@ -432,7 +432,7 @@ store_inferior_registers (int regno)
regoffset = REGISTER_BYTE (regno) - REGISTER_BYTE (I0_REGNUM)
+ FRAME_SAVED_I0;
target_write_memory (sp + regoffset,
- &registers[REGISTER_BYTE (regno)],
+ &deprecated_registers[REGISTER_BYTE (regno)],
REGISTER_RAW_SIZE (regno));
}
}
@@ -449,7 +449,7 @@ store_inferior_registers (int regno)
if (errno)
perror_with_name ("ptrace(PTRACE_GETFPREGS)");
- memcpy (fc.f.fregs, &registers[REGISTER_BYTE (FP0_REGNUM)],
+ memcpy (fc.f.fregs, &deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
32 * REGISTER_RAW_SIZE (FP0_REGNUM));
fc.fsr = read_register (FPS_REGNUM);
@@ -571,7 +571,7 @@ store_inferior_registers (int regno)
{
unsigned int reg;
- reg = *(unsigned int *) &registers[REGISTER_BYTE (regno) + i];
+ reg = *(unsigned int *) &deprecated_registers[REGISTER_BYTE (regno) + i];
errno = 0;
ptrace (ptrace_fun, PIDGET (inferior_ptid),
diff --git a/gdb/m2-exp.y b/gdb/m2-exp.y
index 0957c87..39fdeba 100644
--- a/gdb/m2-exp.y
+++ b/gdb/m2-exp.y
@@ -217,6 +217,7 @@ type_exp: type
exp : exp '^' %prec UNARY
{ write_exp_elt_opcode (UNOP_IND); }
+ ;
exp : '-'
{ number_sign = -1; }
@@ -331,6 +332,7 @@ exp : INCL '(' exp ',' exp ')'
exp : EXCL '(' exp ',' exp ')'
{ error("Sets are not implemented.");}
+ ;
set : '{' arglist '}'
{ error("Sets are not implemented.");}
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index aa1a226..3045a58 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -1345,7 +1345,7 @@ m68hc11_gdbarch_init (struct gdbarch_info info,
sizeof (m68hc11_call_dummy_words));
set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
- set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
+ set_gdbarch_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
set_gdbarch_deprecated_extract_return_value (gdbarch, m68hc11_extract_return_value);
set_gdbarch_push_arguments (gdbarch, m68hc11_push_arguments);
@@ -1368,7 +1368,7 @@ m68hc11_gdbarch_init (struct gdbarch_info info,
set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
- set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
+ set_gdbarch_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
set_gdbarch_store_struct_return (gdbarch, m68hc11_store_struct_return);
set_gdbarch_deprecated_store_return_value (gdbarch, m68hc11_store_return_value);
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index 31e8e66..d27d177 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -252,7 +252,7 @@ m68k_deprecated_extract_struct_value_address (char *regbuf)
static void
m68k_store_return_value (struct type *type, char *valbuf)
{
- write_register_bytes (0, valbuf, TYPE_LENGTH (type));
+ deprecated_write_register_bytes (0, valbuf, TYPE_LENGTH (type));
}
/* Describe the pointer in each stack frame to the previous stack frame
@@ -463,7 +463,7 @@ m68k_push_dummy_frame (void)
this target or not. */
for (regnum = FP0_REGNUM + 7; regnum >= FP0_REGNUM; regnum--)
{
- read_register_bytes (REGISTER_BYTE (regnum), raw_buffer, 12);
+ deprecated_read_register_bytes (REGISTER_BYTE (regnum), raw_buffer, 12);
sp = push_bytes (sp, raw_buffer, 12);
}
@@ -493,7 +493,8 @@ m68k_pop_frame (void)
if (frame->saved_regs[regnum])
{
read_memory (frame->saved_regs[regnum], raw_buffer, 12);
- write_register_bytes (REGISTER_BYTE (regnum), raw_buffer, 12);
+ deprecated_write_register_bytes (REGISTER_BYTE (regnum), raw_buffer,
+ 12);
}
}
for (regnum = FP_REGNUM - 1; regnum >= 0; regnum--)
@@ -836,16 +837,16 @@ fill_gregset (gregset_t *gregsetp, int regno)
{
if ((regno == -1) || (regno == regi))
{
- *(regp + regi) = *(int *) &registers[REGISTER_BYTE (regi)];
+ *(regp + regi) = *(int *) &deprecated_registers[REGISTER_BYTE (regi)];
}
}
if ((regno == -1) || (regno == PS_REGNUM))
{
- *(regp + R_PS) = *(int *) &registers[REGISTER_BYTE (PS_REGNUM)];
+ *(regp + R_PS) = *(int *) &deprecated_registers[REGISTER_BYTE (PS_REGNUM)];
}
if ((regno == -1) || (regno == PC_REGNUM))
{
- *(regp + R_PC) = *(int *) &registers[REGISTER_BYTE (PC_REGNUM)];
+ *(regp + R_PC) = *(int *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)];
}
}
@@ -887,22 +888,22 @@ fill_fpregset (fpregset_t *fpregsetp, int regno)
{
if ((regno == -1) || (regno == regi))
{
- from = (char *) &registers[REGISTER_BYTE (regi)];
+ from = (char *) &deprecated_registers[REGISTER_BYTE (regi)];
to = (char *) &(fpregsetp->f_fpregs[regi - FP0_REGNUM][0]);
memcpy (to, from, REGISTER_RAW_SIZE (regi));
}
}
if ((regno == -1) || (regno == E_FPC_REGNUM))
{
- fpregsetp->f_pcr = *(int *) &registers[REGISTER_BYTE (E_FPC_REGNUM)];
+ fpregsetp->f_pcr = *(int *) &deprecated_registers[REGISTER_BYTE (E_FPC_REGNUM)];
}
if ((regno == -1) || (regno == E_FPS_REGNUM))
{
- fpregsetp->f_psr = *(int *) &registers[REGISTER_BYTE (E_FPS_REGNUM)];
+ fpregsetp->f_psr = *(int *) &deprecated_registers[REGISTER_BYTE (E_FPS_REGNUM)];
}
if ((regno == -1) || (regno == E_FPI_REGNUM))
{
- fpregsetp->f_fpiaddr = *(int *) &registers[REGISTER_BYTE (E_FPI_REGNUM)];
+ fpregsetp->f_fpiaddr = *(int *) &deprecated_registers[REGISTER_BYTE (E_FPI_REGNUM)];
}
}
diff --git a/gdb/m68knbsd-nat.c b/gdb/m68knbsd-nat.c
index ec986ee..191327a 100644
--- a/gdb/m68knbsd-nat.c
+++ b/gdb/m68knbsd-nat.c
@@ -36,15 +36,15 @@ fetch_inferior_registers (int regno)
ptrace (PT_GETREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) & inferior_registers, 0);
- memcpy (&registers[REGISTER_BYTE (0)], &inferior_registers,
+ memcpy (&deprecated_registers[REGISTER_BYTE (0)], &inferior_registers,
sizeof (inferior_registers));
ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) & inferior_fp_registers, 0);
- memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], &inferior_fp_registers,
+ memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)], &inferior_fp_registers,
sizeof (inferior_fp_registers));
- registers_fetched ();
+ deprecated_registers_fetched ();
}
void
@@ -53,12 +53,12 @@ store_inferior_registers (int regno)
struct reg inferior_registers;
struct fpreg inferior_fp_registers;
- memcpy (&inferior_registers, &registers[REGISTER_BYTE (0)],
+ memcpy (&inferior_registers, &deprecated_registers[REGISTER_BYTE (0)],
sizeof (inferior_registers));
ptrace (PT_SETREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) & inferior_registers, 0);
- memcpy (&inferior_fp_registers, &registers[REGISTER_BYTE (FP0_REGNUM)],
+ memcpy (&inferior_fp_registers, &deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
sizeof (inferior_fp_registers));
ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) & inferior_fp_registers, 0);
@@ -77,10 +77,10 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
struct md_core *core_reg = (struct md_core *) core_reg_sect;
/* Integer registers */
- memcpy (&registers[REGISTER_BYTE (0)],
+ memcpy (&deprecated_registers[REGISTER_BYTE (0)],
&core_reg->intreg, sizeof (struct reg));
/* Floating point registers */
- memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)],
+ memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
&core_reg->freg, sizeof (struct fpreg));
}
diff --git a/gdb/macroscope.c b/gdb/macroscope.c
index 083dc1f..b482068 100644
--- a/gdb/macroscope.c
+++ b/gdb/macroscope.c
@@ -27,12 +27,13 @@
#include "target.h"
#include "frame.h"
#include "inferior.h"
+#include "complaints.h"
struct macro_scope *
sal_macro_scope (struct symtab_and_line sal)
{
- struct macro_source_file *main;
+ struct macro_source_file *main, *inclusion;
struct macro_scope *ms;
if (! sal.symtab
@@ -42,17 +43,37 @@ sal_macro_scope (struct symtab_and_line sal)
ms = (struct macro_scope *) xmalloc (sizeof (*ms));
main = macro_main (sal.symtab->macro_table);
- ms->file = macro_lookup_inclusion (main, sal.symtab->filename);
-
- if (! ms->file)
- internal_error
- (__FILE__, __LINE__,
- "\n"
- "the symtab `%s' refers to a preprocessor macro table which doesn't\n"
- "have any record of processing a file by that name.\n",
- sal.symtab->filename);
+ inclusion = macro_lookup_inclusion (main, sal.symtab->filename);
- ms->line = sal.line;
+ if (inclusion)
+ {
+ ms->file = inclusion;
+ ms->line = sal.line;
+ }
+ else
+ {
+ /* There are, unfortunately, cases where a compilation unit can
+ have a symtab for a source file that doesn't appear in the
+ macro table. For example, at the moment, Dwarf doesn't have
+ any way in the .debug_macinfo section to describe the effect
+ of #line directives, so if you debug a YACC parser you'll get
+ a macro table which only mentions the .c files generated by
+ YACC, but symtabs that mention the .y files consumed by YACC.
+
+ In the long run, we should extend the Dwarf macro info
+ representation to handle #line directives, and get GCC to
+ emit it.
+
+ For the time being, though, we'll just treat these as
+ occurring at the end of the main source file. */
+ ms->file = main;
+ ms->line = -1;
+
+ complaint (&symfile_complaints,
+ "symtab found for `%s', but that file\n"
+ "is not covered in the compilation unit's macro information",
+ sal.symtab->filename);
+ }
return ms;
}
diff --git a/gdb/macrotab.c b/gdb/macrotab.c
index accaa7d..5bc5b73 100644
--- a/gdb/macrotab.c
+++ b/gdb/macrotab.c
@@ -445,7 +445,7 @@ macro_include (struct macro_source_file *source,
should tolerate bad debug info. So:
First, squawk. */
- static struct complaint bogus_inclusion_line = {
+ static struct deprecated_complaint bogus_inclusion_line = {
"both `%s' and `%s' allegedly #included at %s:%d", 0, 0
};
@@ -707,7 +707,7 @@ check_for_redefinition (struct macro_source_file *source, int line,
if (! same)
{
- static struct complaint macro_redefined = {
+ static struct deprecated_complaint macro_redefined = {
"macro `%s' redefined at %s:%d; original definition at %s:%d",
0, 0
};
@@ -801,7 +801,7 @@ macro_undef (struct macro_source_file *source, int line,
if (key->end_file)
{
- static struct complaint double_undef = {
+ static struct deprecated_complaint double_undef = {
"macro '%s' is #undefined twice, at %s:%d and %s:%d",
0, 0
};
@@ -820,7 +820,7 @@ macro_undef (struct macro_source_file *source, int line,
has no macro definition in scope is ignored. So we should
ignore it too. */
#if 0
- static struct complaint no_macro_to_undefine = {
+ static struct deprecated_complaint no_macro_to_undefine = {
"no definition for macro `%s' in scope to #undef at %s:%d",
0, 0
};
diff --git a/gdb/macrotab.h b/gdb/macrotab.h
index df32977..bd44e2c 100644
--- a/gdb/macrotab.h
+++ b/gdb/macrotab.h
@@ -83,6 +83,15 @@ struct macro_table;
tree mapping the #inclusions that contributed to the compilation
unit, with the main source file as its root.
+ Beware --- not every source file mentioned in a compilation unit's
+ symtab structures will appear in the #inclusion tree! As of Oct
+ 2002, GCC does record the effect of #line directives in the source
+ line info, but not in macro info. This means that GDB's symtabs
+ (built from the former, among other things) may mention filenames
+ that the #inclusion tree (built from the latter) doesn't have any
+ record of. See macroscope.c:sal_macro_scope for how to accomodate
+ this.
+
It's worth noting that libcpp has a simpler way of representing all
this, which we should consider switching to. It might even be
suitable for ordinary non-macro line number info.
diff --git a/gdb/mcore-tdep.c b/gdb/mcore-tdep.c
index 41114b4..23ee96f 100644
--- a/gdb/mcore-tdep.c
+++ b/gdb/mcore-tdep.c
@@ -1024,8 +1024,9 @@ mcore_store_return_value (struct type *type, char *valbuf)
zeros = alloca (return_size);
memset (zeros, 0, return_size);
- write_register_bytes (REGISTER_BYTE (RETVAL_REGNUM), zeros, return_size);
- write_register_bytes (offset, valbuf, value_size);
+ deprecated_write_register_bytes (REGISTER_BYTE (RETVAL_REGNUM), zeros,
+ return_size);
+ deprecated_write_register_bytes (offset, valbuf, value_size);
}
/* Initialize our target-dependent "stuff" for this newly created frame.
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index e9c3b81..e4aa86b 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -145,94 +145,94 @@ struct symloc
/* Various complaints about symbol reading that don't abort the process */
-static struct complaint bad_file_number_complaint =
+static struct deprecated_complaint bad_file_number_complaint =
{"bad file number %d", 0, 0};
-static struct complaint index_complaint =
+static struct deprecated_complaint index_complaint =
{"bad aux index at symbol %s", 0, 0};
-static struct complaint aux_index_complaint =
+static struct deprecated_complaint aux_index_complaint =
{"bad proc end in aux found from symbol %s", 0, 0};
-static struct complaint block_index_complaint =
+static struct deprecated_complaint block_index_complaint =
{"bad aux index at block symbol %s", 0, 0};
-static struct complaint unknown_ext_complaint =
+static struct deprecated_complaint unknown_ext_complaint =
{"unknown external symbol %s", 0, 0};
-static struct complaint unknown_sym_complaint =
+static struct deprecated_complaint unknown_sym_complaint =
{"unknown local symbol %s", 0, 0};
-static struct complaint unknown_st_complaint =
+static struct deprecated_complaint unknown_st_complaint =
{"with type %d", 0, 0};
-static struct complaint block_overflow_complaint =
+static struct deprecated_complaint block_overflow_complaint =
{"block containing %s overfilled", 0, 0};
-static struct complaint basic_type_complaint =
+static struct deprecated_complaint basic_type_complaint =
{"cannot map ECOFF basic type 0x%x for %s", 0, 0};
-static struct complaint unknown_type_qual_complaint =
+static struct deprecated_complaint unknown_type_qual_complaint =
{"unknown type qualifier 0x%x", 0, 0};
-static struct complaint array_index_type_complaint =
+static struct deprecated_complaint array_index_type_complaint =
{"illegal array index type for %s, assuming int", 0, 0};
-static struct complaint bad_tag_guess_complaint =
+static struct deprecated_complaint bad_tag_guess_complaint =
{"guessed tag type of %s incorrectly", 0, 0};
-static struct complaint block_member_complaint =
+static struct deprecated_complaint block_member_complaint =
{"declaration block contains unhandled symbol type %d", 0, 0};
-static struct complaint stEnd_complaint =
+static struct deprecated_complaint stEnd_complaint =
{"stEnd with storage class %d not handled", 0, 0};
-static struct complaint unknown_mdebug_symtype_complaint =
+static struct deprecated_complaint unknown_mdebug_symtype_complaint =
{"unknown symbol type 0x%x", 0, 0};
-static struct complaint stab_unknown_complaint =
+static struct deprecated_complaint stab_unknown_complaint =
{"unknown stabs symbol %s", 0, 0};
-static struct complaint pdr_for_nonsymbol_complaint =
+static struct deprecated_complaint pdr_for_nonsymbol_complaint =
{"PDR for %s, but no symbol", 0, 0};
-static struct complaint pdr_static_symbol_complaint =
+static struct deprecated_complaint pdr_static_symbol_complaint =
{"can't handle PDR for static proc at 0x%lx", 0, 0};
-static struct complaint bad_setjmp_pdr_complaint =
+static struct deprecated_complaint bad_setjmp_pdr_complaint =
{"fixing bad setjmp PDR from libc", 0, 0};
-static struct complaint bad_fbitfield_complaint =
+static struct deprecated_complaint bad_fbitfield_complaint =
{"can't handle TIR fBitfield for %s", 0, 0};
-static struct complaint bad_continued_complaint =
+static struct deprecated_complaint bad_continued_complaint =
{"illegal TIR continued for %s", 0, 0};
-static struct complaint bad_rfd_entry_complaint =
+static struct deprecated_complaint bad_rfd_entry_complaint =
{"bad rfd entry for %s: file %d, index %d", 0, 0};
-static struct complaint unexpected_type_code_complaint =
+static struct deprecated_complaint unexpected_type_code_complaint =
{"unexpected type code for %s", 0, 0};
-static struct complaint unable_to_cross_ref_complaint =
+static struct deprecated_complaint unable_to_cross_ref_complaint =
{"unable to cross ref btTypedef for %s", 0, 0};
-static struct complaint bad_indirect_xref_complaint =
+static struct deprecated_complaint bad_indirect_xref_complaint =
{"unable to cross ref btIndirect for %s", 0, 0};
-static struct complaint illegal_forward_tq0_complaint =
+static struct deprecated_complaint illegal_forward_tq0_complaint =
{"illegal tq0 in forward typedef for %s", 0, 0};
-static struct complaint illegal_forward_bt_complaint =
+static struct deprecated_complaint illegal_forward_bt_complaint =
{"illegal bt %d in forward typedef for %s", 0, 0};
-static struct complaint bad_linetable_guess_complaint =
+static struct deprecated_complaint bad_linetable_guess_complaint =
{"guessed size of linetable for %s incorrectly", 0, 0};
-static struct complaint bad_ext_ifd_complaint =
+static struct deprecated_complaint bad_ext_ifd_complaint =
{"bad ifd for external symbol: %d (max %d)", 0, 0};
-static struct complaint bad_ext_iss_complaint =
+static struct deprecated_complaint bad_ext_iss_complaint =
{"bad iss for external symbol: %ld (max %ld)", 0, 0};
/* Macros and extra defs */
@@ -1091,6 +1091,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
FIELD_TYPE (*f) = t;
FIELD_NAME (*f) = debug_info->ss + cur_fdr->issBase + tsym.iss;
FIELD_BITSIZE (*f) = 0;
+ FIELD_STATIC_KIND (*f) = 0;
enum_sym = ((struct symbol *)
obstack_alloc (&current_objfile->symbol_obstack,
@@ -1283,6 +1284,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
bitsize = 0;
FIELD_TYPE (*f) = parse_type (cur_fd, ax, sh->index, &bitsize, bigend, name);
FIELD_BITSIZE (*f) = bitsize;
+ FIELD_STATIC_KIND (*f) = 0;
break;
case stIndirect: /* forward declaration on Irix5 */
@@ -2719,7 +2721,7 @@ parse_partial_symbols (struct objfile *objfile)
switch (type_code)
{
- static struct complaint function_outside_compilation_unit = {
+ static struct deprecated_complaint function_outside_compilation_unit = {
"function `%s' appears to be defined outside of all compilation units", 0, 0
};
char *p;
diff --git a/gdb/mi/ChangeLog b/gdb/mi/ChangeLog
index ce1b6b5..a493a2d 100644
--- a/gdb/mi/ChangeLog
+++ b/gdb/mi/ChangeLog
@@ -1,3 +1,27 @@
+2002-11-13 Andrew Cagney <ac131313@redhat.com>
+
+ * mi-main.c (mi_cmd_data_write_register_values): Use
+ deprecated_write_register_bytes instead of write_register_bytes.
+
+2002-11-11 Jeff Johnston <jjohnstn@redhat.com>
+
+ * gdbmi.texinfo (-var-assign): Add comments about interaction
+ with -var-update and add an example. Part of fix for gdb/702.
+
+2002-11-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * mi-main.c (mi_command_loop): Initialize raw_stdout and gdb_stdout
+ only if mi version is <= 1.
+ (mi_init_ui): Initialize raw_stdout and gdb_stdout if mi version
+ is > 1 so startup message is treated as console output. This is
+ part of fix for PR gdb/604.
+
+2002-11-06 Jeff Johnston <jjohnstn@redhat.com>
+
+ * mi-cmd-var.c (mi_cmd_var_create): Change the function used to
+ parse the frame addr from parse_and_eval_address() to
+ string_to_core_addr(). This is a fix for PR gdb/494.
+
2002-10-23 Jeff Johnston <jjohnstn@redhat.com>
* mi-cmd-var.c: Change all remaining occurrences of ui_out_tuple_begin
diff --git a/gdb/mi/gdbmi.texinfo b/gdb/mi/gdbmi.texinfo
index 164b1e8..d64328c 100644
--- a/gdb/mi/gdbmi.texinfo
+++ b/gdb/mi/gdbmi.texinfo
@@ -3799,7 +3799,21 @@ before the value of a child variable can be evaluated.
@end example
Assigns the value of @var{expression} to the variable object specified
-by @var{name}. The object must be @samp{editable}.
+by @var{name}. The object must be @samp{editable}. If the variable's
+value is altered by the assign, the variable will show up in any
+subsequent @code{-var-update} list.
+
+@subsubheading Example
+
+@example
+(@value{GDBP})
+-var-assign var1 3
+^done,value="3"
+(@value{GDBP})
+-var-update *
+^done,changelist=[@{name="var1",in_scope="true",type_changed="false"@}]
+(@value{GDBP})
+@end example
@subheading The @code{-var-update} Command
@findex -var-update
diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c
index ee65deb..990b278 100644
--- a/gdb/mi/mi-cmd-var.c
+++ b/gdb/mi/mi-cmd-var.c
@@ -81,7 +81,7 @@ mi_cmd_var_create (char *command, char **argv, int argc)
else
{
var_type = USE_SPECIFIED_FRAME;
- frameaddr = parse_and_eval_address (frame);
+ frameaddr = string_to_core_addr (frame);
}
if (varobjdebug)
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 5e8b13b..8af91cc 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -36,7 +36,7 @@
#include "event-loop.h"
#include "event-top.h"
#include "gdbcore.h" /* for write_memory() */
-#include "value.h" /* for write_register_bytes() */
+#include "value.h" /* for deprecated_write_register_bytes() */
#include "regcache.h"
#include "gdb.h"
#include "frame.h"
@@ -632,7 +632,7 @@ mi_cmd_data_write_register_values (char *command, char **argv, int argc)
old_chain = make_cleanup (xfree, buffer);
store_signed_integer (buffer, REGISTER_SIZE, value);
/* Write it down */
- write_register_bytes (REGISTER_BYTE (regnum), buffer, REGISTER_RAW_SIZE (regnum));
+ deprecated_write_register_bytes (REGISTER_BYTE (regnum), buffer, REGISTER_RAW_SIZE (regnum));
/* Free the buffer. */
do_cleanups (old_chain);
}
@@ -1464,12 +1464,16 @@ mi_load_progress (const char *section_name,
static void
mi_command_loop (int mi_version)
{
- /* HACK: Force stdout/stderr to point at the console. This avoids
- any potential side effects caused by legacy code that is still
- using the TUI / fputs_unfiltered_hook */
- raw_stdout = stdio_fileopen (stdout);
- /* Route normal output through the MIx */
- gdb_stdout = mi_console_file_new (raw_stdout, "~");
+ if (mi_version <= 1)
+ {
+ /* HACK: Force stdout/stderr to point at the console. This avoids
+ any potential side effects caused by legacy code that is still
+ using the TUI / fputs_unfiltered_hook */
+ raw_stdout = stdio_fileopen (stdout);
+ /* Route normal output through the MIx */
+ gdb_stdout = mi_console_file_new (raw_stdout, "~");
+ }
+
/* Route error and log output through the MI */
gdb_stderr = mi_console_file_new (raw_stdout, "&");
gdb_stdlog = gdb_stderr;
@@ -1541,8 +1545,16 @@ setup_architecture_data (void)
static void
mi_init_ui (char *arg0)
{
- /* Eventually this will contain code that takes control of the
- console. */
+ if (strlen (interpreter_p) <= 2 ||
+ interpreter_p[2] > '1')
+ {
+ /* HACK: Force stdout/stderr to point at the console. This avoids
+ any potential side effects caused by legacy code that is still
+ using the TUI / fputs_unfiltered_hook */
+ raw_stdout = stdio_fileopen (stdout);
+ /* Route normal output through the MIx */
+ gdb_stdout = mi_console_file_new (raw_stdout, "~");
+ }
}
void
diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
index 454520d..a0469f6 100644
--- a/gdb/mips-linux-nat.c
+++ b/gdb/mips-linux-nat.c
@@ -29,6 +29,8 @@
int
mips_linux_cannot_fetch_register (int regno)
{
+ if (REGISTER_NAME (regno)[0] == 0)
+ return 1;
if (regno == PS_REGNUM)
return 1;
else if (regno == ZERO_REGNUM)
@@ -40,6 +42,8 @@ mips_linux_cannot_fetch_register (int regno)
int
mips_linux_cannot_store_register (int regno)
{
+ if (REGISTER_NAME (regno)[0] == 0)
+ return 1;
if (regno == PS_REGNUM)
return 1;
else if (regno == ZERO_REGNUM)
diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c
index 03279d8..9ad457b 100644
--- a/gdb/mips-linux-tdep.c
+++ b/gdb/mips-linux-tdep.c
@@ -132,7 +132,7 @@ fill_gregset (elf_gregset_t *gregsetp, int regno)
if (regno < 32)
{
- src = &registers[REGISTER_BYTE (regno)];
+ src = &deprecated_registers[REGISTER_BYTE (regno)];
dst = regp + regno + EF_REG0;
memcpy (dst, src, sizeof (elf_greg_t));
return;
@@ -163,7 +163,7 @@ fill_gregset (elf_gregset_t *gregsetp, int regno)
if (regaddr != -1)
{
- src = &registers[REGISTER_BYTE (regno)];
+ src = &deprecated_registers[REGISTER_BYTE (regno)];
dst = regp + regaddr;
memcpy (dst, src, sizeof (elf_greg_t));
}
@@ -199,13 +199,13 @@ fill_fpregset (elf_fpregset_t *fpregsetp, int regno)
if ((regno >= FP0_REGNUM) && (regno < FP0_REGNUM + 32))
{
- from = (char *) &registers[REGISTER_BYTE (regno)];
+ from = (char *) &deprecated_registers[REGISTER_BYTE (regno)];
to = (char *) (*fpregsetp + regno - FP0_REGNUM);
memcpy (to, from, REGISTER_RAW_SIZE (regno - FP0_REGNUM));
}
else if (regno == FCRCS_REGNUM)
{
- from = (char *) &registers[REGISTER_BYTE (regno)];
+ from = (char *) &deprecated_registers[REGISTER_BYTE (regno)];
to = (char *) (*fpregsetp + 32);
memcpy (to, from, REGISTER_RAW_SIZE (regno));
}
diff --git a/gdb/mips-nat.c b/gdb/mips-nat.c
index 545c741..16009c2 100644
--- a/gdb/mips-nat.c
+++ b/gdb/mips-nat.c
@@ -76,7 +76,7 @@ fetch_inferior_registers (int regno)
char buf[MAX_REGISTER_RAW_SIZE];
register int i;
- registers_fetched ();
+ deprecated_registers_fetched ();
for (regno = 1; regno < NUM_REGS; regno++)
{
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 8aa61c7..16c206e 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -3719,7 +3719,7 @@ mips_push_register (CORE_ADDR * sp, int regno)
offset = 0;
}
*sp -= regsize;
- read_register_gen (regno, buffer);
+ deprecated_read_register_gen (regno, buffer);
write_memory (*sp, buffer + offset, regsize);
}
@@ -4667,17 +4667,15 @@ mips_eabi_store_return_value (struct type *valtype, char *valbuf)
memset (raw_buffer, 0, sizeof (raw_buffer));
memcpy (raw_buffer + lo.reg_offset, valbuf + lo.buf_offset, lo.len);
- write_register_bytes (REGISTER_BYTE (lo.reg),
- raw_buffer,
- REGISTER_RAW_SIZE (lo.reg));
+ deprecated_write_register_bytes (REGISTER_BYTE (lo.reg), raw_buffer,
+ REGISTER_RAW_SIZE (lo.reg));
if (hi.len > 0)
{
memset (raw_buffer, 0, sizeof (raw_buffer));
memcpy (raw_buffer + hi.reg_offset, valbuf + hi.buf_offset, hi.len);
- write_register_bytes (REGISTER_BYTE (hi.reg),
- raw_buffer,
- REGISTER_RAW_SIZE (hi.reg));
+ deprecated_write_register_bytes (REGISTER_BYTE (hi.reg), raw_buffer,
+ REGISTER_RAW_SIZE (hi.reg));
}
}
@@ -4691,17 +4689,15 @@ mips_o64_store_return_value (struct type *valtype, char *valbuf)
memset (raw_buffer, 0, sizeof (raw_buffer));
memcpy (raw_buffer + lo.reg_offset, valbuf + lo.buf_offset, lo.len);
- write_register_bytes (REGISTER_BYTE (lo.reg),
- raw_buffer,
- REGISTER_RAW_SIZE (lo.reg));
+ deprecated_write_register_bytes (REGISTER_BYTE (lo.reg), raw_buffer,
+ REGISTER_RAW_SIZE (lo.reg));
if (hi.len > 0)
{
memset (raw_buffer, 0, sizeof (raw_buffer));
memcpy (raw_buffer + hi.reg_offset, valbuf + hi.buf_offset, hi.len);
- write_register_bytes (REGISTER_BYTE (hi.reg),
- raw_buffer,
- REGISTER_RAW_SIZE (hi.reg));
+ deprecated_write_register_bytes (REGISTER_BYTE (hi.reg), raw_buffer,
+ REGISTER_RAW_SIZE (hi.reg));
}
}
@@ -6061,7 +6057,7 @@ mips_gdbarch_init (struct gdbarch_info info,
set_gdbarch_register_virtual_type (gdbarch, mips_register_virtual_type);
set_gdbarch_register_virtual_size (gdbarch, generic_register_size);
- set_gdbarch_do_registers_info (gdbarch, mips_do_registers_info);
+ set_gdbarch_deprecated_do_registers_info (gdbarch, mips_do_registers_info);
set_gdbarch_pc_in_sigtramp (gdbarch, mips_pc_in_sigtramp);
/* Hook in OS ABI-specific overrides, if they have been registered. */
@@ -6195,9 +6191,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
"mips_dump_tdep: CAUSE_REGNUM = %d\n",
CAUSE_REGNUM);
fprintf_unfiltered (file,
- "mips_dump_tdep: DO_REGISTERS_INFO # %s\n",
- XSTRING (DO_REGISTERS_INFO));
- fprintf_unfiltered (file,
"mips_dump_tdep: DWARF_REG_TO_REGNUM # %s\n",
XSTRING (DWARF_REG_TO_REGNUM (REGNUM)));
fprintf_unfiltered (file,
diff --git a/gdb/mipsm3-nat.c b/gdb/mipsm3-nat.c
index 62d6860..22f947f 100644
--- a/gdb/mipsm3-nat.c
+++ b/gdb/mipsm3-nat.c
@@ -122,14 +122,14 @@ static int reg_offset[] =
* Caller knows that the regs handled in one transaction are of same size.
*/
#define FETCH_REGS(state, regnum, count) \
- memcpy (&registers[REGISTER_BYTE (regnum)], \
+ memcpy (&deprecated_registers[REGISTER_BYTE (regnum)], \
(char *)state+reg_offset[ regnum ], \
count*REGISTER_SIZE)
/* Store COUNT contiguous registers to thread STATE starting from REGNUM */
#define STORE_REGS(state, regnum, count) \
memcpy ((char *)state+reg_offset[ regnum ], \
- &registers[REGISTER_BYTE (regnum)], \
+ &deprecated_registers[REGISTER_BYTE (regnum)], \
count*REGISTER_SIZE)
#define REGS_ALL -1
@@ -204,7 +204,7 @@ fetch_inferior_registers (int regno)
}
/* ZERO_REGNUM is always zero */
- *(int *) registers = 0;
+ *(int *) deprecated_registers = 0;
/* Copy thread saved regs 1..31 to gdb's reg value array
* Luckily, they are contiquous
@@ -259,7 +259,7 @@ fetch_inferior_registers (int regno)
/* If the thread does not have saved COPROC1, set regs to zero */
if (!(exc_state.coproc_state & MIPS_STATUS_USE_COP1))
- bzero (&registers[REGISTER_BYTE (FP0_REGNUM)],
+ bzero (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
sizeof (struct mips_float_state));
else
{
@@ -282,7 +282,7 @@ fetch_inferior_registers (int regno)
}
/* All registers are valid, if not returned yet */
- registers_fetched ();
+ deprecated_registers_fetched ();
}
/* Store gdb's view of registers to the thread.
@@ -324,7 +324,7 @@ store_inferior_registers (register int regno)
/* Don't allow these to change */
/* ZERO_REGNUM */
- *(int *) registers = 0;
+ *(int *) deprecated_registers = 0;
fetch_inferior_registers (PS_REGNUM);
fetch_inferior_registers (BADVADDR_REGNUM);
@@ -342,8 +342,8 @@ store_inferior_registers (register int regno)
* should go to threads frame pointer. If not true, this
* fails badly!!!!!
*/
- memcpy (&registers[REGISTER_BYTE (MACH_FP_REGNUM)],
- &registers[REGISTER_BYTE (FP_REGNUM)],
+ memcpy (&deprecated_registers[REGISTER_BYTE (MACH_FP_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (FP_REGNUM)],
REGISTER_RAW_SIZE (FP_REGNUM));
#endif
diff --git a/gdb/mipsv4-nat.c b/gdb/mipsv4-nat.c
index 901f9b0..ec46df6 100644
--- a/gdb/mipsv4-nat.c
+++ b/gdb/mipsv4-nat.c
@@ -75,19 +75,19 @@ fill_gregset (gregset_t *gregsetp, int regno)
for (regi = 0; regi <= 32; regi++)
if ((regno == -1) || (regno == regi))
- *(regp + regi) = *(greg_t *) & registers[REGISTER_BYTE (regi)];
+ *(regp + regi) = *(greg_t *) & deprecated_registers[REGISTER_BYTE (regi)];
if ((regno == -1) || (regno == PC_REGNUM))
- *(regp + CXT_EPC) = *(greg_t *) & registers[REGISTER_BYTE (PC_REGNUM)];
+ *(regp + CXT_EPC) = *(greg_t *) & deprecated_registers[REGISTER_BYTE (PC_REGNUM)];
if ((regno == -1) || (regno == CAUSE_REGNUM))
- *(regp + CXT_CAUSE) = *(greg_t *) & registers[REGISTER_BYTE (CAUSE_REGNUM)];
+ *(regp + CXT_CAUSE) = *(greg_t *) & deprecated_registers[REGISTER_BYTE (CAUSE_REGNUM)];
if ((regno == -1) || (regno == HI_REGNUM))
- *(regp + CXT_MDHI) = *(greg_t *) & registers[REGISTER_BYTE (HI_REGNUM)];
+ *(regp + CXT_MDHI) = *(greg_t *) & deprecated_registers[REGISTER_BYTE (HI_REGNUM)];
if ((regno == -1) || (regno == LO_REGNUM))
- *(regp + CXT_MDLO) = *(greg_t *) & registers[REGISTER_BYTE (LO_REGNUM)];
+ *(regp + CXT_MDLO) = *(greg_t *) & deprecated_registers[REGISTER_BYTE (LO_REGNUM)];
}
/*
@@ -125,14 +125,14 @@ fill_fpregset (fpregset_t *fpregsetp, int regno)
{
if ((regno == -1) || (regno == regi))
{
- from = (char *) &registers[REGISTER_BYTE (regi)];
+ from = (char *) &deprecated_registers[REGISTER_BYTE (regi)];
to = (char *) &(fpregsetp->fp_r.fp_regs[regi - FP0_REGNUM]);
memcpy (to, from, REGISTER_RAW_SIZE (regi));
}
}
if ((regno == -1) || (regno == FCRCS_REGNUM))
- fpregsetp->fp_csr = *(unsigned *) &registers[REGISTER_BYTE (FCRCS_REGNUM)];
+ fpregsetp->fp_csr = *(unsigned *) &deprecated_registers[REGISTER_BYTE (FCRCS_REGNUM)];
}
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
index 6e7bada..ed55da9 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -139,9 +139,11 @@ static void
mn10300_store_return_value (struct type *type, char *valbuf)
{
if (TYPE_CODE (type) == TYPE_CODE_PTR)
- write_register_bytes (REGISTER_BYTE (4), valbuf, TYPE_LENGTH (type));
+ deprecated_write_register_bytes (REGISTER_BYTE (4), valbuf,
+ TYPE_LENGTH (type));
else
- write_register_bytes (REGISTER_BYTE (0), valbuf, TYPE_LENGTH (type));
+ deprecated_write_register_bytes (REGISTER_BYTE (0), valbuf,
+ TYPE_LENGTH (type));
}
static struct frame_info *analyze_dummy_frame (CORE_ADDR, CORE_ADDR);
@@ -1148,7 +1150,7 @@ mn10300_gdbarch_init (struct gdbarch_info info,
set_gdbarch_register_virtual_size (gdbarch, mn10300_register_virtual_size);
set_gdbarch_register_virtual_type (gdbarch, mn10300_register_virtual_type);
set_gdbarch_dwarf2_reg_to_regnum (gdbarch, mn10300_dwarf2_reg_to_regnum);
- set_gdbarch_do_registers_info (gdbarch, mn10300_do_registers_info);
+ set_gdbarch_deprecated_do_registers_info (gdbarch, mn10300_do_registers_info);
set_gdbarch_sp_regnum (gdbarch, 8);
set_gdbarch_pc_regnum (gdbarch, 9);
set_gdbarch_fp_regnum (gdbarch, 31);
diff --git a/gdb/monitor.c b/gdb/monitor.c
index 559c0a2..5a9bb60 100644
--- a/gdb/monitor.c
+++ b/gdb/monitor.c
@@ -2294,19 +2294,10 @@ static struct target_ops monitor_ops;
static void
init_base_monitor_ops (void)
{
- monitor_ops.to_shortname = NULL;
- monitor_ops.to_longname = NULL;
- monitor_ops.to_doc = NULL;
- monitor_ops.to_open = NULL;
monitor_ops.to_close = monitor_close;
- monitor_ops.to_attach = NULL;
- monitor_ops.to_post_attach = NULL;
- monitor_ops.to_require_attach = NULL;
monitor_ops.to_detach = monitor_detach;
- monitor_ops.to_require_detach = NULL;
monitor_ops.to_resume = monitor_resume;
monitor_ops.to_wait = monitor_wait;
- monitor_ops.to_post_wait = NULL;
monitor_ops.to_fetch_registers = monitor_fetch_registers;
monitor_ops.to_store_registers = monitor_store_registers;
monitor_ops.to_prepare_to_store = monitor_prepare_to_store;
@@ -2314,48 +2305,18 @@ init_base_monitor_ops (void)
monitor_ops.to_files_info = monitor_files_info;
monitor_ops.to_insert_breakpoint = monitor_insert_breakpoint;
monitor_ops.to_remove_breakpoint = monitor_remove_breakpoint;
- monitor_ops.to_terminal_init = 0;
- monitor_ops.to_terminal_inferior = 0;
- monitor_ops.to_terminal_ours_for_output = 0;
- monitor_ops.to_terminal_ours = 0;
- monitor_ops.to_terminal_info = 0;
monitor_ops.to_kill = monitor_kill;
monitor_ops.to_load = monitor_load;
- monitor_ops.to_lookup_symbol = 0;
monitor_ops.to_create_inferior = monitor_create_inferior;
- monitor_ops.to_post_startup_inferior = NULL;
- monitor_ops.to_acknowledge_created_inferior = NULL;
- monitor_ops.to_clone_and_follow_inferior = NULL;
- monitor_ops.to_post_follow_inferior_by_clone = NULL;
- monitor_ops.to_insert_fork_catchpoint = NULL;
- monitor_ops.to_remove_fork_catchpoint = NULL;
- monitor_ops.to_insert_vfork_catchpoint = NULL;
- monitor_ops.to_remove_vfork_catchpoint = NULL;
- monitor_ops.to_has_forked = NULL;
- monitor_ops.to_has_vforked = NULL;
- monitor_ops.to_can_follow_vfork_prior_to_exec = NULL;
- monitor_ops.to_post_follow_vfork = NULL;
- monitor_ops.to_insert_exec_catchpoint = NULL;
- monitor_ops.to_remove_exec_catchpoint = NULL;
- monitor_ops.to_has_execd = NULL;
- monitor_ops.to_reported_exec_events_per_exec_call = NULL;
- monitor_ops.to_has_exited = NULL;
monitor_ops.to_mourn_inferior = monitor_mourn_inferior;
- monitor_ops.to_can_run = 0;
- monitor_ops.to_notice_signals = 0;
- monitor_ops.to_thread_alive = 0;
monitor_ops.to_stop = monitor_stop;
monitor_ops.to_rcmd = monitor_rcmd;
- monitor_ops.to_pid_to_exec_file = NULL;
monitor_ops.to_stratum = process_stratum;
- monitor_ops.DONT_USE = 0;
monitor_ops.to_has_all_memory = 1;
monitor_ops.to_has_memory = 1;
monitor_ops.to_has_stack = 1;
monitor_ops.to_has_registers = 1;
monitor_ops.to_has_execution = 1;
- monitor_ops.to_sections = 0;
- monitor_ops.to_sections_end = 0;
monitor_ops.to_magic = OPS_MAGIC;
} /* init_base_monitor_ops */
diff --git a/gdb/ns32k-tdep.c b/gdb/ns32k-tdep.c
index e60b1c0..5563cf9 100644
--- a/gdb/ns32k-tdep.c
+++ b/gdb/ns32k-tdep.c
@@ -470,8 +470,9 @@ ns32k_extract_return_value (struct type *valtype, char *regbuf, char *valbuf)
static void
ns32k_store_return_value (struct type *valtype, char *valbuf)
{
- write_register_bytes (TYPE_CODE (valtype) == TYPE_CODE_FLT ?
- FP0_REGNUM : 0, valbuf, TYPE_LENGTH (valtype));
+ deprecated_write_register_bytes (TYPE_CODE (valtype) == TYPE_CODE_FLT
+ ? FP0_REGNUM : 0, valbuf,
+ TYPE_LENGTH (valtype));
}
static CORE_ADDR
diff --git a/gdb/ns32knbsd-nat.c b/gdb/ns32knbsd-nat.c
index fd6e619..bf5250f 100644
--- a/gdb/ns32knbsd-nat.c
+++ b/gdb/ns32knbsd-nat.c
@@ -32,10 +32,10 @@
#include "regcache.h"
#define RF(dst, src) \
- memcpy(&registers[REGISTER_BYTE(dst)], &src, sizeof(src))
+ memcpy(&deprecated_registers[REGISTER_BYTE(dst)], &src, sizeof(src))
#define RS(src, dst) \
- memcpy(&dst, &registers[REGISTER_BYTE(src)], sizeof(dst))
+ memcpy(&dst, &deprecated_registers[REGISTER_BYTE(src)], sizeof(dst))
void
fetch_inferior_registers (int regno)
@@ -71,7 +71,7 @@ fetch_inferior_registers (int regno)
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]);
- registers_fetched ();
+ deprecated_registers_fetched ();
}
void
@@ -164,7 +164,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
RF (LP0_REGNUM + 3, core_reg->freg.r_freg[3]);
RF (LP0_REGNUM + 5, core_reg->freg.r_freg[5]);
RF (LP0_REGNUM + 7, core_reg->freg.r_freg[7]);
- registers_fetched ();
+ deprecated_registers_fetched ();
}
/* Register that we are able to handle ns32knbsd core file formats.
@@ -237,7 +237,7 @@ fetch_kcore_registers (struct pcb *pcb)
RF (LP0_REGNUM + 3, pcb->pcb_freg[3]);
RF (LP0_REGNUM + 5, pcb->pcb_freg[5]);
RF (LP0_REGNUM + 7, pcb->pcb_freg[7]);
- registers_fetched ();
+ deprecated_registers_fetched ();
}
#endif /* FETCH_KCORE_REGISTERS */
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
index 3234d10..21453d0 100644
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -75,11 +75,11 @@ struct objc_method {
/* Complaints about ObjC classes, selectors, etc. */
-static struct complaint noclass_lookup_complaint = {
+static struct deprecated_complaint noclass_lookup_complaint = {
"no way to lookup Objective-C classes", 0, 0
};
-static struct complaint nosel_lookup_complaint = {
+static struct deprecated_complaint nosel_lookup_complaint = {
"no way to lookup Objective-C selectors", 0, 0
};
diff --git a/gdb/p-exp.y b/gdb/p-exp.y
index dfdab74..16d4991 100644
--- a/gdb/p-exp.y
+++ b/gdb/p-exp.y
@@ -234,7 +234,8 @@ static int search_field;
start : { current_type = NULL;
search_field = 0;
}
- normal_start;
+ normal_start {}
+ ;
normal_start :
exp1
@@ -258,11 +259,13 @@ exp : exp '^' %prec UNARY
{ write_exp_elt_opcode (UNOP_IND);
if (current_type)
current_type = TYPE_TARGET_TYPE (current_type); }
+ ;
exp : '@' exp %prec UNARY
{ write_exp_elt_opcode (UNOP_ADDR);
if (current_type)
current_type = TYPE_POINTER_TYPE (current_type); }
+ ;
exp : '-' exp %prec UNARY
{ write_exp_elt_opcode (UNOP_NEG); }
@@ -318,6 +321,7 @@ exp : exp '['
write_exp_elt_opcode (BINOP_SUBSCRIPT);
if (current_type)
current_type = TYPE_TARGET_TYPE (current_type); }
+ ;
exp : exp '('
/* This is to save the value of arglist_len
@@ -646,7 +650,7 @@ variable: name_not_typename
if (this_type)
current_type = lookup_struct_elt_type (
this_type,
- $1.stoken.ptr, false);
+ copy_name($1.stoken), false);
else
current_type = NULL;
}
diff --git a/gdb/ppc-bdm.c b/gdb/ppc-bdm.c
index 0797e0d..9e7133e 100644
--- a/gdb/ppc-bdm.c
+++ b/gdb/ppc-bdm.c
@@ -295,7 +295,7 @@ bdm_ppc_store_registers (int regno)
&& ((i < FP0_REGNUM) || (i > FPLAST_REGNUM)))
{
/* printf("write valid reg %d\n", bdm_regno); */
- ocd_write_bdm_registers (bdm_regno, registers + REGISTER_BYTE (i), 4);
+ ocd_write_bdm_registers (bdm_regno, deprecated_registers + REGISTER_BYTE (i), 4);
}
/*
else if (i == gdbarch_tdep (current_gdbarch)->ppc_mq_regnum)
@@ -321,14 +321,9 @@ a wiggler, specify wiggler and then the port it is connected to\n\
(e.g. wiggler lpt1)."; /* to_doc */
bdm_ppc_ops.to_open = bdm_ppc_open;
bdm_ppc_ops.to_close = ocd_close;
- bdm_ppc_ops.to_attach = NULL;
- bdm_ppc_ops.to_post_attach = NULL;
- bdm_ppc_ops.to_require_attach = NULL;
bdm_ppc_ops.to_detach = ocd_detach;
- bdm_ppc_ops.to_require_detach = NULL;
bdm_ppc_ops.to_resume = ocd_resume;
bdm_ppc_ops.to_wait = bdm_ppc_wait;
- bdm_ppc_ops.to_post_wait = NULL;
bdm_ppc_ops.to_fetch_registers = bdm_ppc_fetch_registers;
bdm_ppc_ops.to_store_registers = bdm_ppc_store_registers;
bdm_ppc_ops.to_prepare_to_store = ocd_prepare_to_store;
@@ -336,47 +331,18 @@ a wiggler, specify wiggler and then the port it is connected to\n\
bdm_ppc_ops.to_files_info = ocd_files_info;
bdm_ppc_ops.to_insert_breakpoint = ocd_insert_breakpoint;
bdm_ppc_ops.to_remove_breakpoint = ocd_remove_breakpoint;
- bdm_ppc_ops.to_terminal_init = NULL;
- bdm_ppc_ops.to_terminal_inferior = NULL;
- bdm_ppc_ops.to_terminal_ours_for_output = NULL;
- bdm_ppc_ops.to_terminal_ours = NULL;
- bdm_ppc_ops.to_terminal_info = NULL;
bdm_ppc_ops.to_kill = ocd_kill;
bdm_ppc_ops.to_load = ocd_load;
- bdm_ppc_ops.to_lookup_symbol = NULL;
bdm_ppc_ops.to_create_inferior = ocd_create_inferior;
- bdm_ppc_ops.to_post_startup_inferior = NULL;
- bdm_ppc_ops.to_acknowledge_created_inferior = NULL;
- bdm_ppc_ops.to_clone_and_follow_inferior = NULL;
- bdm_ppc_ops.to_post_follow_inferior_by_clone = NULL;
- bdm_ppc_ops.to_insert_fork_catchpoint = NULL;
- bdm_ppc_ops.to_remove_fork_catchpoint = NULL;
- bdm_ppc_ops.to_insert_vfork_catchpoint = NULL;
- bdm_ppc_ops.to_remove_vfork_catchpoint = NULL;
- bdm_ppc_ops.to_has_forked = NULL;
- bdm_ppc_ops.to_has_vforked = NULL;
- bdm_ppc_ops.to_can_follow_vfork_prior_to_exec = NULL;
- bdm_ppc_ops.to_post_follow_vfork = NULL;
- bdm_ppc_ops.to_insert_exec_catchpoint = NULL;
- bdm_ppc_ops.to_remove_exec_catchpoint = NULL;
- bdm_ppc_ops.to_has_execd = NULL;
- bdm_ppc_ops.to_reported_exec_events_per_exec_call = NULL;
- bdm_ppc_ops.to_has_exited = NULL;
bdm_ppc_ops.to_mourn_inferior = ocd_mourn;
- bdm_ppc_ops.to_can_run = 0;
- bdm_ppc_ops.to_notice_signals = 0;
bdm_ppc_ops.to_thread_alive = ocd_thread_alive;
bdm_ppc_ops.to_stop = ocd_stop;
- bdm_ppc_ops.to_pid_to_exec_file = NULL;
bdm_ppc_ops.to_stratum = process_stratum;
- bdm_ppc_ops.DONT_USE = NULL;
bdm_ppc_ops.to_has_all_memory = 1;
bdm_ppc_ops.to_has_memory = 1;
bdm_ppc_ops.to_has_stack = 1;
bdm_ppc_ops.to_has_registers = 1;
bdm_ppc_ops.to_has_execution = 1;
- bdm_ppc_ops.to_sections = NULL;
- bdm_ppc_ops.to_sections_end = NULL;
bdm_ppc_ops.to_magic = OPS_MAGIC;
} /* init_bdm_ppc_ops */
diff --git a/gdb/ppc-sysv-tdep.c b/gdb/ppc-sysv-tdep.c
index ecaed85..1f01706 100644
--- a/gdb/ppc-sysv-tdep.c
+++ b/gdb/ppc-sysv-tdep.c
@@ -175,7 +175,7 @@ ppc_sysv_abi_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
{
char val_buf[4];
store_address (val_buf, 4, struct_addr);
- memcpy (&registers[REGISTER_BYTE (greg)], val_buf, 4);
+ memcpy (&deprecated_registers[REGISTER_BYTE (greg)], val_buf, 4);
greg++;
}
/* Now fill in the registers and stack... */
@@ -192,7 +192,7 @@ ppc_sysv_abi_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
if (len > 8)
printf_unfiltered (
"Fatal Error: a floating point parameter #%d with a size > 8 is found!\n", argno);
- memcpy (&registers[REGISTER_BYTE (FP0_REGNUM + freg)],
+ memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM + freg)],
VALUE_CONTENTS (arg), len);
freg++;
}
@@ -222,9 +222,9 @@ ppc_sysv_abi_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
if ((greg & 1) == 0)
greg++;
- memcpy (&registers[REGISTER_BYTE (greg)],
+ memcpy (&deprecated_registers[REGISTER_BYTE (greg)],
VALUE_CONTENTS (arg), 4);
- memcpy (&registers[REGISTER_BYTE (greg + 1)],
+ memcpy (&deprecated_registers[REGISTER_BYTE (greg + 1)],
VALUE_CONTENTS (arg) + 4, 4);
greg += 2;
}
@@ -247,7 +247,7 @@ ppc_sysv_abi_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
}
if (greg <= 10)
{
- memcpy (&registers[REGISTER_BYTE (greg)], val_buf, 4);
+ memcpy (&deprecated_registers[REGISTER_BYTE (greg)], val_buf, 4);
greg++;
}
else
@@ -268,7 +268,7 @@ ppc_sysv_abi_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
memcpy (v_val_buf, VALUE_CONTENTS (arg), len);
if (vreg <= 13)
{
- memcpy (&registers[REGISTER_BYTE (tdep->ppc_vr0_regnum
+ memcpy (&deprecated_registers[REGISTER_BYTE (tdep->ppc_vr0_regnum
+ vreg)],
v_val_buf, 16);
vreg++;
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index e26a919..71ad8a1 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -43,6 +43,7 @@
#include "ui-out.h"
#include "gdb_assert.h"
#include "dictionary.h"
+#include "disasm.h"
extern int asm_demangle; /* Whether to demangle syms in asm printouts */
extern int addressprint; /* Whether to print hex addresses in HLL " */
@@ -138,8 +139,6 @@ static void enable_display (char *, int);
static void disable_display_command (char *, int);
-static void disassemble_command (char *, int);
-
static void printf_command (char *, int);
static void print_frame_nameless_args (struct frame_info *, long,
@@ -2269,114 +2268,6 @@ printf_command (char *arg, int from_tty)
}
do_cleanups (old_cleanups);
}
-
-/* Dump a specified section of assembly code. With no command line
- arguments, this command will dump the assembly code for the
- function surrounding the pc value in the selected frame. With one
- argument, it will dump the assembly code surrounding that pc value.
- Two arguments are interpeted as bounds within which to dump
- assembly. */
-
-/* ARGSUSED */
-static void
-disassemble_command (char *arg, int from_tty)
-{
- CORE_ADDR low, high;
- char *name;
- CORE_ADDR pc, pc_masked;
- char *space_index;
-#if 0
- asection *section;
-#endif
-
- name = NULL;
- if (!arg)
- {
- if (!selected_frame)
- error ("No frame selected.\n");
-
- pc = get_frame_pc (selected_frame);
- if (find_pc_partial_function (pc, &name, &low, &high) == 0)
- error ("No function contains program counter for selected frame.\n");
-#if defined(TUI)
- else if (tui_version)
- low = tuiGetLowDisassemblyAddress (low, pc);
-#endif
- low += FUNCTION_START_OFFSET;
- }
- else if (!(space_index = (char *) strchr (arg, ' ')))
- {
- /* One argument. */
- pc = parse_and_eval_address (arg);
- if (find_pc_partial_function (pc, &name, &low, &high) == 0)
- error ("No function contains specified address.\n");
-#if defined(TUI)
- else if (tui_version)
- low = tuiGetLowDisassemblyAddress (low, pc);
-#endif
- low += FUNCTION_START_OFFSET;
- }
- else
- {
- /* Two arguments. */
- *space_index = '\0';
- low = parse_and_eval_address (arg);
- high = parse_and_eval_address (space_index + 1);
- }
-
-#if defined(TUI)
- if (!tui_is_window_visible (DISASSEM_WIN))
-#endif
- {
- printf_filtered ("Dump of assembler code ");
- if (name != NULL)
- {
- printf_filtered ("for function %s:\n", name);
- }
- else
- {
- printf_filtered ("from ");
- print_address_numeric (low, 1, gdb_stdout);
- printf_filtered (" to ");
- print_address_numeric (high, 1, gdb_stdout);
- printf_filtered (":\n");
- }
-
- /* Dump the specified range. */
- pc = low;
-
-#ifdef GDB_TARGET_MASK_DISAS_PC
- pc_masked = GDB_TARGET_MASK_DISAS_PC (pc);
-#else
- pc_masked = pc;
-#endif
-
- while (pc_masked < high)
- {
- QUIT;
- print_address (pc_masked, gdb_stdout);
- printf_filtered (":\t");
- /* We often wrap here if there are long symbolic names. */
- wrap_here (" ");
- pc += print_insn (pc, gdb_stdout);
- printf_filtered ("\n");
-
-#ifdef GDB_TARGET_MASK_DISAS_PC
- pc_masked = GDB_TARGET_MASK_DISAS_PC (pc);
-#else
- pc_masked = pc;
-#endif
- }
- printf_filtered ("End of assembler dump.\n");
- gdb_flush (gdb_stdout);
- }
-#if defined(TUI)
- else
- {
- tui_show_assembly (low);
- }
-#endif
-}
/* Print the instruction at address MEMADDR in debugged memory,
on STREAM. Returns length of the instruction, in bytes. */
@@ -2426,15 +2317,6 @@ Defaults for format and size letters are those previously used.\n\
Default count is 1. Default address is following last thing printed\n\
with this command or \"print\".", NULL));
- c = add_com ("disassemble", class_vars, disassemble_command,
- "Disassemble a specified section of memory.\n\
-Default is the function surrounding the pc of the selected frame.\n\
-With a single argument, the function surrounding that address is dumped.\n\
-Two arguments are taken as a range of memory to dump.");
- set_cmd_completer (c, location_completer);
- if (xdb_commands)
- add_com_alias ("va", "disassemble", class_xdb, 0);
-
#if 0
add_com ("whereis", class_vars, whereis_command,
"Print line number and file of definition of variable.");
diff --git a/gdb/ptx4-nat.c b/gdb/ptx4-nat.c
index 65eef9d..1798b50 100644
--- a/gdb/ptx4-nat.c
+++ b/gdb/ptx4-nat.c
@@ -59,7 +59,7 @@ fill_gregset (gregset_t *gregsetp, int regno)
{
if ((regno == -1) || (regno == regi))
{
- (*gregsetp)[regi] = *(greg_t *) & registers[REGISTER_BYTE (regi)];
+ (*gregsetp)[regi] = *(greg_t *) & deprecated_registers[REGISTER_BYTE (regi)];
}
}
}
diff --git a/gdb/regcache.c b/gdb/regcache.c
index ab65c67..1bbdb61 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -26,6 +26,7 @@
#include "gdbarch.h"
#include "gdbcmd.h"
#include "regcache.h"
+#include "reggroups.h"
#include "gdb_assert.h"
#include "gdb_string.h"
#include "gdbcmd.h" /* For maintenanceprintlist. */
@@ -65,6 +66,8 @@ struct regcache_descr
both raw registers and memory by the architecture methods
gdbarch_register_read and gdbarch_register_write. */
int nr_cooked_registers;
+ long sizeof_cooked_registers;
+ long sizeof_cooked_register_valid_p;
/* Offset and size (in 8 bit bytes), of reach register in the
register cache. All registers (including those in the range
@@ -92,20 +95,28 @@ init_legacy_regcache_descr (struct gdbarch *gdbarch,
gdb_assert (gdbarch != NULL);
/* FIXME: cagney/2002-05-11: Shouldn't be including pseudo-registers
- in the register buffer. Unfortunatly some architectures do. */
+ in the register cache. Unfortunatly some architectures still
+ rely on this and the pseudo_register_write() method. */
descr->nr_raw_registers = descr->nr_cooked_registers;
- descr->sizeof_raw_register_valid_p = descr->nr_cooked_registers;
-
- /* FIXME: cagney/2002-05-11: Instead of using REGISTER_BYTE() this
- code should compute the offets et.al. at runtime. This currently
- isn't possible because some targets overlap register locations -
- see the mess in read_register_bytes() and write_register_bytes()
- registers. */
+ descr->sizeof_raw_register_valid_p = descr->sizeof_cooked_register_valid_p;
+
+ /* Compute the offset of each register. Legacy architectures define
+ REGISTER_BYTE() so use that. */
+ /* FIXME: cagney/2002-11-07: Instead of using REGISTER_BYTE() this
+ code should, as is done in init_regcache_descr(), compute the
+ offets at runtime. This currently isn't possible as some ISAs
+ define overlapping register regions - see the mess in
+ read_register_bytes() and write_register_bytes() registers. */
descr->sizeof_register = XCALLOC (descr->nr_cooked_registers, long);
descr->register_offset = XCALLOC (descr->nr_cooked_registers, long);
descr->max_register_size = 0;
for (i = 0; i < descr->nr_cooked_registers; i++)
{
+ /* FIXME: cagney/2001-12-04: This code shouldn't need to use
+ REGISTER_BYTE(). Unfortunatly, legacy code likes to lay the
+ buffer out so that certain registers just happen to overlap.
+ Ulgh! New targets use gdbarch's register read/write and
+ entirely avoid this uglyness. */
descr->register_offset[i] = REGISTER_BYTE (i);
descr->sizeof_register[i] = REGISTER_RAW_SIZE (i);
if (descr->max_register_size < REGISTER_RAW_SIZE (i))
@@ -114,8 +125,13 @@ init_legacy_regcache_descr (struct gdbarch *gdbarch,
descr->max_register_size = REGISTER_VIRTUAL_SIZE (i);
}
- /* Come up with the real size of the registers buffer. */
- descr->sizeof_raw_registers = REGISTER_BYTES; /* OK use. */
+ /* Compute the real size of the register buffer. Start out by
+ trusting REGISTER_BYTES, but then adjust it upwards should that
+ be found to not be sufficient. */
+ /* FIXME: cagney/2002-11-05: Instead of using REGISTER_BYTES, this
+ code should, as is done in init_regcache_descr(), compute the
+ total number of register bytes using the accumulated offsets. */
+ descr->sizeof_cooked_registers = REGISTER_BYTES; /* OK use. */
for (i = 0; i < descr->nr_cooked_registers; i++)
{
long regend;
@@ -124,15 +140,14 @@ init_legacy_regcache_descr (struct gdbarch *gdbarch,
legacy code is free to put registers in random places in the
buffer separated by holes. Once REGISTER_BYTE() is killed
this can be greatly simplified. */
- /* FIXME: cagney/2001-12-04: This code shouldn't need to use
- REGISTER_BYTE(). Unfortunatly, legacy code likes to lay the
- buffer out so that certain registers just happen to overlap.
- Ulgh! New targets use gdbarch's register read/write and
- entirely avoid this uglyness. */
regend = descr->register_offset[i] + descr->sizeof_register[i];
- if (descr->sizeof_raw_registers < regend)
- descr->sizeof_raw_registers = regend;
+ if (descr->sizeof_cooked_registers < regend)
+ descr->sizeof_cooked_registers = regend;
}
+ /* FIXME: cagney/2002-05-11: Shouldn't be including pseudo-registers
+ in the register cache. Unfortunatly some architectures still
+ rely on this and the pseudo_register_write() method. */
+ descr->sizeof_raw_registers = descr->sizeof_cooked_registers;
}
static void *
@@ -150,6 +165,7 @@ init_regcache_descr (struct gdbarch *gdbarch)
directly onto the raw register cache while the pseudo's are
either mapped onto raw-registers or memory. */
descr->nr_cooked_registers = NUM_REGS + NUM_PSEUDO_REGS;
+ descr->sizeof_cooked_register_valid_p = NUM_REGS + NUM_PSEUDO_REGS;
/* Fill in a table of register types. */
descr->register_type = XCALLOC (descr->nr_cooked_registers,
@@ -177,12 +193,9 @@ init_regcache_descr (struct gdbarch *gdbarch)
array. This pretects GDB from erant code that accesses elements
of the global register_valid_p[] array in the range [NUM_REGS
.. NUM_REGS + NUM_PSEUDO_REGS). */
- descr->sizeof_raw_register_valid_p = NUM_REGS + NUM_PSEUDO_REGS;
+ descr->sizeof_raw_register_valid_p = descr->sizeof_cooked_register_valid_p;
- /* Lay out the register cache. The pseud-registers are included in
- the layout even though their value isn't stored in the register
- cache. Some code, via read_register_bytes() access a register
- using an offset/length rather than a register number.
+ /* Lay out the register cache.
NOTE: cagney/2002-05-22: Only register_type() is used when
constructing the register cache. It is assumed that the
@@ -203,15 +216,16 @@ init_regcache_descr (struct gdbarch *gdbarch)
descr->max_register_size = descr->sizeof_register[i];
}
/* Set the real size of the register cache buffer. */
- /* FIXME: cagney/2002-05-22: Should only need to allocate space
- for the raw registers. Unfortunatly some code still accesses
- the register array directly using the global registers[].
- Until that code has been purged, play safe and over allocating
- the register buffer. Ulgh! */
- descr->sizeof_raw_registers = offset;
- /* = descr->register_offset[descr->nr_raw_registers]; */
+ descr->sizeof_cooked_registers = offset;
}
+ /* FIXME: cagney/2002-05-22: Should only need to allocate space for
+ the raw registers. Unfortunatly some code still accesses the
+ register array directly using the global registers[]. Until that
+ code has been purged, play safe and over allocating the register
+ buffer. Ulgh! */
+ descr->sizeof_raw_registers = descr->sizeof_cooked_registers;
+
#if 0
/* Sanity check. Confirm that the assumptions about gdbarch are
true. The REGCACHE_DESCR_HANDLE is set before doing the checks
@@ -276,11 +290,18 @@ max_register_size (struct gdbarch *gdbarch)
struct regcache
{
struct regcache_descr *descr;
- char *raw_registers;
- char *raw_register_valid_p;
- /* If a value isn't in the cache should the corresponding target be
- queried for a value. */
- int passthrough_p;
+ /* The register buffers. A read-only register cache can hold the
+ full [0 .. NUM_REGS + NUM_PSEUDO_REGS) while a read/write
+ register cache can only hold [0 .. NUM_REGS). */
+ char *registers;
+ char *register_valid_p;
+ /* Is this a read-only cache? A read-only cache is used for saving
+ the target's register state (e.g, across an inferior function
+ call or just before forcing a function return). A read-only
+ cache can only be updated via the methods regcache_dup() and
+ regcache_cpy(). The actual contents are determined by the
+ reggroup_save and reggroup_restore methods. */
+ int readonly_p;
};
struct regcache *
@@ -292,11 +313,11 @@ regcache_xmalloc (struct gdbarch *gdbarch)
descr = regcache_descr (gdbarch);
regcache = XMALLOC (struct regcache);
regcache->descr = descr;
- regcache->raw_registers
+ regcache->registers
= XCALLOC (descr->sizeof_raw_registers, char);
- regcache->raw_register_valid_p
+ regcache->register_valid_p
= XCALLOC (descr->sizeof_raw_register_valid_p, char);
- regcache->passthrough_p = 0;
+ regcache->readonly_p = 1;
return regcache;
}
@@ -305,8 +326,8 @@ regcache_xfree (struct regcache *regcache)
{
if (regcache == NULL)
return;
- xfree (regcache->raw_registers);
- xfree (regcache->raw_register_valid_p);
+ xfree (regcache->registers);
+ xfree (regcache->register_valid_p);
xfree (regcache);
}
@@ -322,6 +343,68 @@ make_cleanup_regcache_xfree (struct regcache *regcache)
return make_cleanup (do_regcache_xfree, regcache);
}
+/* Return a pointer to register REGNUM's buffer cache. */
+
+static char *
+register_buffer (struct regcache *regcache, int regnum)
+{
+ return regcache->registers + regcache->descr->register_offset[regnum];
+}
+
+void
+regcache_save (struct regcache *dst, struct regcache *src)
+{
+ struct gdbarch *gdbarch = dst->descr->gdbarch;
+ int regnum;
+ /* The SRC and DST register caches had better belong to the same
+ architecture. */
+ gdb_assert (src->descr->gdbarch == dst->descr->gdbarch);
+ /* The DST should be `read-only', if it wasn't then the save would
+ end up trying to write the register values out through to the
+ target. */
+ gdb_assert (!src->readonly_p);
+ gdb_assert (dst->readonly_p);
+ /* Clear the dest. */
+ memset (dst->registers, 0, dst->descr->sizeof_cooked_registers);
+ memset (dst->register_valid_p, 0, dst->descr->sizeof_cooked_register_valid_p);
+ /* Copy over any registers (identified by their membership in the
+ save_reggroup) and mark them as valid. The full [0
+ .. NUM_REGS+NUM_PSEUDO_REGS) range is checked since some
+ architectures need to save/restore `cooked' registers that live
+ in memory. */
+ for (regnum = 0; regnum < dst->descr->nr_cooked_registers; regnum++)
+ {
+ if (gdbarch_register_reggroup_p (gdbarch, regnum, save_reggroup))
+ {
+ regcache_cooked_read (src, regnum, register_buffer (dst, regnum));
+ dst->register_valid_p[regnum] = 1;
+ }
+ }
+}
+
+void
+regcache_restore (struct regcache *dst, struct regcache *src)
+{
+ struct gdbarch *gdbarch = dst->descr->gdbarch;
+ int regnum;
+ gdb_assert (src->descr->gdbarch == dst->descr->gdbarch);
+ gdb_assert (!dst->readonly_p);
+ gdb_assert (src->readonly_p);
+ /* Copy over any registers, being careful to only restore those that
+ were both saved and need to be restored. The full [0
+ .. NUM_REGS+NUM_PSEUDO_REGS) range is checked since some
+ architectures need to save/restore `cooked' registers that live
+ in memory. */
+ for (regnum = 0; regnum < src->descr->nr_cooked_registers; regnum++)
+ {
+ if (gdbarch_register_reggroup_p (gdbarch, regnum, restore_reggroup)
+ && src->register_valid_p[regnum])
+ {
+ regcache_cooked_write (dst, regnum, register_buffer (src, regnum));
+ }
+ }
+}
+
void
regcache_cpy (struct regcache *dst, struct regcache *src)
{
@@ -330,33 +413,13 @@ regcache_cpy (struct regcache *dst, struct regcache *src)
gdb_assert (src != NULL && dst != NULL);
gdb_assert (src->descr->gdbarch == dst->descr->gdbarch);
gdb_assert (src != dst);
- /* FIXME: cagney/2002-05-17: To say this bit is bad is being polite.
- It keeps the existing code working where things rely on going
- through to the register cache. */
- if (src == current_regcache && src->descr->legacy_p)
- {
- /* ULGH!!!! Old way. Use REGISTER bytes and let code below
- untangle fetch. */
- read_register_bytes (0, dst->raw_registers, REGISTER_BYTES);
- return;
- }
- /* FIXME: cagney/2002-05-17: To say this bit is bad is being polite.
- It keeps the existing code working where things rely on going
- through to the register cache. */
- if (dst == current_regcache && dst->descr->legacy_p)
- {
- /* ULGH!!!! Old way. Use REGISTER bytes and let code below
- untangle fetch. */
- write_register_bytes (0, src->raw_registers, REGISTER_BYTES);
- return;
- }
- buf = alloca (src->descr->max_register_size);
- for (i = 0; i < src->descr->nr_raw_registers; i++)
- {
- /* Should we worry about the valid bit here? */
- regcache_raw_read (src, i, buf);
- regcache_raw_write (dst, i, buf);
- }
+ gdb_assert (src->readonly_p || dst->readonly_p);
+ if (!src->readonly_p)
+ regcache_save (dst, src);
+ else if (!dst->readonly_p)
+ regcache_restore (dst, src);
+ else
+ regcache_cpy_no_passthrough (dst, src);
}
void
@@ -369,9 +432,8 @@ regcache_cpy_no_passthrough (struct regcache *dst, struct regcache *src)
move of data into the current_regcache(). Doing this would be
silly - it would mean that valid_p would be completly invalid. */
gdb_assert (dst != current_regcache);
- memcpy (dst->raw_registers, src->raw_registers,
- dst->descr->sizeof_raw_registers);
- memcpy (dst->raw_register_valid_p, src->raw_register_valid_p,
+ memcpy (dst->registers, src->registers, dst->descr->sizeof_raw_registers);
+ memcpy (dst->register_valid_p, src->register_valid_p,
dst->descr->sizeof_raw_register_valid_p);
}
@@ -400,24 +462,24 @@ regcache_valid_p (struct regcache *regcache, int regnum)
{
gdb_assert (regcache != NULL);
gdb_assert (regnum >= 0 && regnum < regcache->descr->nr_raw_registers);
- return regcache->raw_register_valid_p[regnum];
+ return regcache->register_valid_p[regnum];
}
char *
deprecated_grub_regcache_for_registers (struct regcache *regcache)
{
- return regcache->raw_registers;
+ return regcache->registers;
}
char *
deprecated_grub_regcache_for_register_valid (struct regcache *regcache)
{
- return regcache->raw_register_valid_p;
+ return regcache->register_valid_p;
}
/* Global structure containing the current regcache. */
/* FIXME: cagney/2002-05-11: The two global arrays registers[] and
- register_valid[] currently point into this structure. */
+ deprecated_register_valid[] currently point into this structure. */
struct regcache *current_regcache;
/* NOTE: this is a write-through cache. There is no "dirty" bit for
@@ -427,9 +489,9 @@ struct regcache *current_regcache;
/* REGISTERS contains the cached register values (in target byte order). */
-char *registers;
+char *deprecated_registers;
-/* REGISTER_VALID is 0 if the register needs to be fetched,
+/* DEPRECATED_REGISTER_VALID is 0 if the register needs to be fetched,
1 if it has been fetched, and
-1 if the register value was not available.
@@ -440,7 +502,7 @@ char *registers;
system being debugged - some of the registers in such a system may
not have been saved. */
-signed char *register_valid;
+signed char *deprecated_register_valid;
/* The thread/process associated with the current set of registers. */
@@ -459,7 +521,7 @@ static ptid_t registers_ptid;
int
register_cached (int regnum)
{
- return register_valid[regnum];
+ return deprecated_register_valid[regnum];
}
/* Record that REGNUM's value is cached if STATE is >0, uncached but
@@ -470,25 +532,7 @@ set_register_cached (int regnum, int state)
{
gdb_assert (regnum >= 0);
gdb_assert (regnum < current_regcache->descr->nr_raw_registers);
- current_regcache->raw_register_valid_p[regnum] = state;
-}
-
-/* REGISTER_CHANGED
-
- invalidate a single register REGNUM in the cache */
-void
-register_changed (int regnum)
-{
- set_register_cached (regnum, 0);
-}
-
-/* If REGNUM >= 0, return a pointer to register REGNUM's cache buffer area,
- else return a pointer to the start of the cache buffer. */
-
-static char *
-register_buffer (struct regcache *regcache, int regnum)
-{
- return regcache->raw_registers + regcache->descr->register_offset[regnum];
+ current_regcache->register_valid_p[regnum] = state;
}
/* Return whether register REGNUM is a real register. */
@@ -531,7 +575,7 @@ registers_changed (void)
registers_changed_hook ();
}
-/* REGISTERS_FETCHED ()
+/* DEPRECATED_REGISTERS_FETCHED ()
Indicate that all registers have been fetched, so mark them all valid. */
@@ -544,7 +588,7 @@ registers_changed (void)
this function/hack is eliminated. */
void
-registers_fetched (void)
+deprecated_registers_fetched (void)
{
int i;
@@ -554,29 +598,29 @@ registers_fetched (void)
Fetching all real regs NEVER accounts for pseudo-regs. */
}
-/* read_register_bytes and write_register_bytes are generally a *BAD*
- idea. They are inefficient because they need to check for partial
- updates, which can only be done by scanning through all of the
- registers and seeing if the bytes that are being read/written fall
- inside of an invalid register. [The main reason this is necessary
- is that register sizes can vary, so a simple index won't suffice.]
- It is far better to call read_register_gen and write_register_gen
- if you want to get at the raw register contents, as it only takes a
- regnum as an argument, and therefore can't do a partial register
- update.
+/* deprecated_read_register_bytes and deprecated_write_register_bytes
+ are generally a *BAD* idea. They are inefficient because they need
+ to check for partial updates, which can only be done by scanning
+ through all of the registers and seeing if the bytes that are being
+ read/written fall inside of an invalid register. [The main reason
+ this is necessary is that register sizes can vary, so a simple
+ index won't suffice.] It is far better to call read_register_gen
+ and write_register_gen if you want to get at the raw register
+ contents, as it only takes a regnum as an argument, and therefore
+ can't do a partial register update.
Prior to the recent fixes to check for partial updates, both read
- and write_register_bytes always checked to see if any registers
- were stale, and then called target_fetch_registers (-1) to update
- the whole set. This caused really slowed things down for remote
- targets. */
+ and deprecated_write_register_bytes always checked to see if any
+ registers were stale, and then called target_fetch_registers (-1)
+ to update the whole set. This caused really slowed things down for
+ remote targets. */
/* Copy INLEN bytes of consecutive data from registers
starting with the INREGBYTE'th byte of register data
into memory at MYADDR. */
void
-read_register_bytes (int in_start, char *in_buf, int in_len)
+deprecated_read_register_bytes (int in_start, char *in_buf, int in_len)
{
int in_end = in_start + in_len;
int regnum;
@@ -604,7 +648,7 @@ read_register_bytes (int in_start, char *in_buf, int in_len)
if (REGISTER_NAME (regnum) != NULL && *REGISTER_NAME (regnum) != '\0')
/* Force the cache to fetch the entire register. */
- read_register_gen (regnum, reg_buf);
+ deprecated_read_register_gen (regnum, reg_buf);
else
/* Legacy note: even though this register is ``invalid'' we
still need to return something. It would appear that some
@@ -613,7 +657,7 @@ read_register_bytes (int in_start, char *in_buf, int in_len)
/* FIXME: cagney/2001-08-18: This is just silly. It defeats
the entire register read/write flow of control. Must
resist temptation to return 0xdeadbeef. */
- memcpy (reg_buf, registers + reg_start, reg_len);
+ memcpy (reg_buf, &deprecated_registers[reg_start], reg_len);
/* Legacy note: This function, for some reason, allows a NULL
input buffer. If the buffer is NULL, the registers are still
@@ -669,12 +713,12 @@ regcache_raw_read (struct regcache *regcache, int regnum, void *buf)
gdb_assert (regcache != NULL && buf != NULL);
gdb_assert (regnum >= 0 && regnum < regcache->descr->nr_raw_registers);
if (regcache->descr->legacy_p
- && regcache->passthrough_p)
+ && !regcache->readonly_p)
{
gdb_assert (regcache == current_regcache);
/* For moment, just use underlying legacy code. Ulgh!!! This
silently and very indirectly updates the regcache's regcache
- via the global register_valid[]. */
+ via the global deprecated_register_valid[]. */
legacy_read_register_gen (regnum, buf);
return;
}
@@ -682,7 +726,7 @@ regcache_raw_read (struct regcache *regcache, int regnum, void *buf)
to the current thread. This switching shouldn't be necessary
only there is still only one target side register cache. Sigh!
On the bright side, at least there is a regcache object. */
- if (regcache->passthrough_p)
+ if (!regcache->readonly_p)
{
gdb_assert (regcache == current_regcache);
if (! ptid_equal (registers_ptid, inferior_ptid))
@@ -694,8 +738,7 @@ regcache_raw_read (struct regcache *regcache, int regnum, void *buf)
target_fetch_registers (regnum);
}
/* Copy the value directly into the register cache. */
- memcpy (buf, (regcache->raw_registers
- + regcache->descr->register_offset[regnum]),
+ memcpy (buf, register_buffer (regcache, regnum),
regcache->descr->sizeof_register[regnum]);
}
@@ -748,7 +791,7 @@ regcache_raw_write_unsigned (struct regcache *regcache, int regnum,
}
void
-read_register_gen (int regnum, char *buf)
+deprecated_read_register_gen (int regnum, char *buf)
{
gdb_assert (current_regcache != NULL);
gdb_assert (current_regcache->descr->gdbarch == current_gdbarch);
@@ -767,6 +810,12 @@ regcache_cooked_read (struct regcache *regcache, int regnum, void *buf)
gdb_assert (regnum < regcache->descr->nr_cooked_registers);
if (regnum < regcache->descr->nr_raw_registers)
regcache_raw_read (regcache, regnum, buf);
+ else if (regcache->readonly_p
+ && regnum < regcache->descr->nr_cooked_registers
+ && regcache->register_valid_p[regnum])
+ /* Read-only register cache, perhaphs the cooked value was cached? */
+ memcpy (buf, register_buffer (regcache, regnum),
+ regcache->descr->sizeof_register[regnum]);
else
gdbarch_pseudo_register_read (regcache->descr->gdbarch, regcache,
regnum, buf);
@@ -843,13 +892,13 @@ regcache_raw_write (struct regcache *regcache, int regnum, const void *buf)
{
gdb_assert (regcache != NULL && buf != NULL);
gdb_assert (regnum >= 0 && regnum < regcache->descr->nr_raw_registers);
+ gdb_assert (!regcache->readonly_p);
- if (regcache->passthrough_p
- && regcache->descr->legacy_p)
+ if (regcache->descr->legacy_p)
{
/* For moment, just use underlying legacy code. Ulgh!!! This
silently and very indirectly updates the regcache's buffers
- via the globals register_valid[] and registers[]. */
+ via the globals deprecated_register_valid[] and registers[]. */
gdb_assert (regcache == current_regcache);
legacy_write_register_gen (regnum, buf);
return;
@@ -860,17 +909,6 @@ regcache_raw_write (struct regcache *regcache, int regnum, const void *buf)
if (CANNOT_STORE_REGISTER (regnum))
return;
- /* Handle the simple case first -> not write through so just store
- value in cache. */
- if (!regcache->passthrough_p)
- {
- memcpy ((regcache->raw_registers
- + regcache->descr->register_offset[regnum]), buf,
- regcache->descr->sizeof_register[regnum]);
- regcache->raw_register_valid_p[regnum] = 1;
- return;
- }
-
/* Make certain that the correct cache is selected. */
gdb_assert (regcache == current_regcache);
if (! ptid_equal (registers_ptid, inferior_ptid))
@@ -889,12 +927,12 @@ regcache_raw_write (struct regcache *regcache, int regnum, const void *buf)
target_prepare_to_store ();
memcpy (register_buffer (regcache, regnum), buf,
regcache->descr->sizeof_register[regnum]);
- regcache->raw_register_valid_p[regnum] = 1;
+ regcache->register_valid_p[regnum] = 1;
target_store_registers (regnum);
}
void
-write_register_gen (int regnum, char *buf)
+deprecated_write_register_gen (int regnum, char *buf)
{
gdb_assert (current_regcache != NULL);
gdb_assert (current_regcache->descr->gdbarch == current_gdbarch);
@@ -922,7 +960,7 @@ regcache_cooked_write (struct regcache *regcache, int regnum, const void *buf)
into registers starting with the MYREGSTART'th byte of register data. */
void
-write_register_bytes (int myregstart, char *myaddr, int inlen)
+deprecated_write_register_bytes (int myregstart, char *myaddr, int inlen)
{
int myregend = myregstart + inlen;
int regnum;
@@ -947,7 +985,7 @@ write_register_bytes (int myregstart, char *myaddr, int inlen)
/* Is this register completely within the range the user is writing? */
else if (myregstart <= regstart && regend <= myregend)
- write_register_gen (regnum, myaddr + (regstart - myregstart));
+ deprecated_write_register_gen (regnum, myaddr + (regstart - myregstart));
/* The register partially overlaps the range being written. */
else
@@ -960,9 +998,9 @@ write_register_bytes (int myregstart, char *myaddr, int inlen)
/* We may be doing a partial update of an invalid register.
Update it from the target before scribbling on it. */
- read_register_gen (regnum, regbuf);
+ deprecated_read_register_gen (regnum, regbuf);
- memcpy (registers + overlapstart,
+ memcpy (&deprecated_registers[overlapstart],
myaddr + (overlapstart - myregstart),
overlapend - overlapstart);
@@ -1063,91 +1101,13 @@ register_offset_hack (struct gdbarch *gdbarch, int regnum)
return descr->register_offset[regnum];
}
-static void
-cooked_xfer_using_offset_hack (struct regcache *regcache,
- int buf_start, int buf_len, void *in_b,
- const void *out_b)
-{
- struct regcache_descr *descr = regcache->descr;
- struct gdbarch *gdbarch = descr->gdbarch;
- bfd_byte *in_buf = in_b;
- const bfd_byte *out_buf = out_b;
- int buf_end = buf_start + buf_len;
- int regnum;
- char *reg_buf = alloca (descr->max_register_size);
-
- /* NOTE: cagney/2002-08-17: This code assumes that the register
- offsets are strictly increasing and do not overlap. If this
- isn't the case then the bug is in the target architecture and NOT
- this code. */
-
- /* NOTE: cagney/2002-08-17: This code assumes that only the
- registers covered by BUF_START:BUF_LEN should be transfered. If,
- for some reason, there is a gap between two registers, then that
- gap isn't transfered. (The gap shouldn't be there but that is
- another story.) */
-
- /* Iterate through all registers looking for those that lie within
- BUF_START:BUF_LEN. */
-
- for (regnum = 0; regnum < descr->nr_cooked_registers; regnum++)
- {
- /* The register's location. */
- int reg_start = descr->register_offset[regnum];
- int reg_len = descr->sizeof_register[regnum];
- int reg_end = reg_start + reg_len;
-
- /* The START, END and LEN that falls within the current
- register. */
- int xfer_start;
- int xfer_end;
- int xfer_len;
-
- /* start = max (reg_start, buf_start) */
- if (reg_start > buf_start)
- xfer_start = reg_start;
- else
- xfer_start = buf_start;
-
- /* end = min (reg_end, buf_end) */
- if (reg_end < buf_end)
- xfer_end = reg_end;
- else
- xfer_end = buf_end;
-
- /* The number of bytes to transfer. If there isn't anything to
- transfer (the end is before the start) this will be -ve. */
- xfer_len = xfer_end - xfer_start;
-
- if (xfer_len > 0)
- regcache_xfer_part (regcache, regnum, xfer_start - reg_start,
- xfer_len, in_b, out_b, regcache_cooked_read,
- regcache_cooked_write);
- }
-}
-
-void
-regcache_cooked_read_using_offset_hack (struct regcache *regcache,
- int buf_start, int buf_len, void *b)
-{
- cooked_xfer_using_offset_hack (regcache, buf_start, buf_len, b, NULL);
-}
-
-void
-regcache_cooked_write_using_offset_hack (struct regcache *regcache,
- int buf_start, int buf_len,
- const void *b)
-{
- cooked_xfer_using_offset_hack (regcache, buf_start, buf_len, NULL, b);
-}
-
/* Return the contents of register REGNUM as an unsigned integer. */
ULONGEST
read_register (int regnum)
{
char *buf = alloca (REGISTER_RAW_SIZE (regnum));
- read_register_gen (regnum, buf);
+ deprecated_read_register_gen (regnum, buf);
return (extract_unsigned_integer (buf, REGISTER_RAW_SIZE (regnum)));
}
@@ -1178,7 +1138,7 @@ LONGEST
read_signed_register (int regnum)
{
void *buf = alloca (REGISTER_RAW_SIZE (regnum));
- read_register_gen (regnum, buf);
+ deprecated_read_register_gen (regnum, buf);
return (extract_signed_integer (buf, REGISTER_RAW_SIZE (regnum)));
}
@@ -1212,7 +1172,7 @@ write_register (int regnum, LONGEST val)
size = REGISTER_RAW_SIZE (regnum);
buf = alloca (size);
store_signed_integer (buf, size, (LONGEST) val);
- write_register_gen (regnum, buf);
+ deprecated_write_register_gen (regnum, buf);
}
void
@@ -1452,9 +1412,9 @@ static void
build_regcache (void)
{
current_regcache = regcache_xmalloc (current_gdbarch);
- current_regcache->passthrough_p = 1;
- registers = deprecated_grub_regcache_for_registers (current_regcache);
- register_valid = deprecated_grub_regcache_for_register_valid (current_regcache);
+ current_regcache->readonly_p = 0;
+ deprecated_registers = deprecated_grub_regcache_for_registers (current_regcache);
+ deprecated_register_valid = deprecated_grub_regcache_for_register_valid (current_regcache);
}
static void
@@ -1479,7 +1439,7 @@ dump_endian_bytes (struct ui_file *file, enum bfd_endian endian,
enum regcache_dump_what
{
- regcache_dump_none, regcache_dump_raw, regcache_dump_cooked
+ regcache_dump_none, regcache_dump_raw, regcache_dump_cooked, regcache_dump_groups
};
static void
@@ -1487,6 +1447,8 @@ regcache_dump (struct regcache *regcache, struct ui_file *file,
enum regcache_dump_what what_to_dump)
{
struct cleanup *cleanups = make_cleanup (null_cleanup, NULL);
+ struct gdbarch *gdbarch = regcache->descr->gdbarch;
+ struct reggroup *const *groups = reggroups (gdbarch);
int regnum;
int footnote_nr = 0;
int footnote_register_size = 0;
@@ -1593,27 +1555,32 @@ regcache_dump (struct regcache *regcache, struct ui_file *file,
}
/* Type. */
- if (regnum < 0)
- fprintf_unfiltered (file, " %-20s", "Type");
- else
- {
- static const char blt[] = "builtin_type";
- const char *t = TYPE_NAME (register_type (regcache->descr->gdbarch,
- regnum));
- if (t == NULL)
- {
- char *n;
- if (!footnote_register_type_name_null)
- footnote_register_type_name_null = ++footnote_nr;
- xasprintf (&n, "*%d", footnote_register_type_name_null);
- make_cleanup (xfree, n);
- t = n;
- }
- /* Chop a leading builtin_type. */
- if (strncmp (t, blt, strlen (blt)) == 0)
- t += strlen (blt);
- fprintf_unfiltered (file, " %-20s", t);
- }
+ {
+ const char *t;
+ if (regnum < 0)
+ t = "Type";
+ else
+ {
+ static const char blt[] = "builtin_type";
+ t = TYPE_NAME (register_type (regcache->descr->gdbarch, regnum));
+ if (t == NULL)
+ {
+ char *n;
+ if (!footnote_register_type_name_null)
+ footnote_register_type_name_null = ++footnote_nr;
+ xasprintf (&n, "*%d", footnote_register_type_name_null);
+ make_cleanup (xfree, n);
+ t = n;
+ }
+ /* Chop a leading builtin_type. */
+ if (strncmp (t, blt, strlen (blt)) == 0)
+ t += strlen (blt);
+ }
+ fprintf_unfiltered (file, " %-15s", t);
+ }
+
+ /* Leading space always present. */
+ fprintf_unfiltered (file, " ");
/* Value, raw. */
if (what_to_dump == regcache_dump_raw)
@@ -1647,6 +1614,26 @@ regcache_dump (struct regcache *regcache, struct ui_file *file,
}
}
+ /* Group members. */
+ if (what_to_dump == regcache_dump_groups)
+ {
+ if (regnum < 0)
+ fprintf_unfiltered (file, "Groups");
+ else
+ {
+ int i;
+ const char *sep = "";
+ for (i = 0; groups[i] != NULL; i++)
+ {
+ if (gdbarch_register_reggroup_p (gdbarch, regnum, groups[i]))
+ {
+ fprintf_unfiltered (file, "%s%s", sep, reggroup_name (groups[i]));
+ sep = ",";
+ }
+ }
+ }
+ }
+
fprintf_unfiltered (file, "\n");
}
@@ -1696,14 +1683,20 @@ maintenance_print_cooked_registers (char *args, int from_tty)
regcache_print (args, regcache_dump_cooked);
}
+static void
+maintenance_print_register_groups (char *args, int from_tty)
+{
+ regcache_print (args, regcache_dump_groups);
+}
+
void
_initialize_regcache (void)
{
regcache_descr_handle = register_gdbarch_data (init_regcache_descr,
xfree_regcache_descr);
REGISTER_GDBARCH_SWAP (current_regcache);
- register_gdbarch_swap (&registers, sizeof (registers), NULL);
- register_gdbarch_swap (&register_valid, sizeof (register_valid), NULL);
+ register_gdbarch_swap (&deprecated_registers, sizeof (deprecated_registers), NULL);
+ register_gdbarch_swap (&deprecated_register_valid, sizeof (deprecated_register_valid), NULL);
register_gdbarch_swap (NULL, 0, build_regcache);
add_com ("flushregs", class_maintenance, reg_flush_command,
@@ -1728,5 +1721,10 @@ Takes an optional file parameter.",
"Print the internal register configuration including cooked values.\
Takes an optional file parameter.",
&maintenanceprintlist);
+ add_cmd ("register-groups", class_maintenance,
+ maintenance_print_register_groups,
+ "Print the internal register configuration including each register's group.\
+Takes an optional file parameter.",
+ &maintenanceprintlist);
}
diff --git a/gdb/regcache.h b/gdb/regcache.h
index 4ddcda3..de6a321 100644
--- a/gdb/regcache.h
+++ b/gdb/regcache.h
@@ -94,29 +94,14 @@ extern void regcache_collect (int regnum, void *buf);
/* The register's ``offset''.
- NOTE: cagney/2002-08-17: The ``struct value'' and expression
- evaluator treat the register cache as a large liner buffer.
- Instead of reading/writing a register using its register number,
- the code read/writes registers by specifying their offset into the
- buffer and a number of bytes. The code also assumes that these
- byte read/writes can cross register boundaries, adjacent registers
- treated as a contiguous set of bytes.
-
- The below map that model onto the real register cache. New code
- should go out of their way to avoid using these interfaces.
-
- FIXME: cagney/2002-08-17: The ``struct value'' and expression
- evaluator should be fixed. Instead of using the { offset, length }
- pair to describe a value within one or more registers, the code
- should use a chain of { regnum, offset, len } tripples. */
+ FIXME: cagney/2002-11-07: The get_saved_register() function, when
+ specifying the real location of a register, does so using that
+ registers offset in the register cache. That offset is then used
+ by valops.c to determine the location of the register. The code
+ should instead use the register's number and a location expression
+ to describe a value spread across multiple registers or memory. */
extern int register_offset_hack (struct gdbarch *gdbarch, int regnum);
-extern void regcache_cooked_read_using_offset_hack (struct regcache *regcache,
- int offset, int len,
- void *buf);
-extern void regcache_cooked_write_using_offset_hack (struct regcache *regcache,
- int offset, int len,
- const void *buf);
/* The type of a register. This function is slightly more efficient
@@ -144,16 +129,15 @@ extern struct type *register_type (struct gdbarch *gdbarch, int regnum);
extern int max_register_size (struct gdbarch *gdbarch);
-/* DEPRECATED: Character array containing an image of the inferior
- programs' registers for the most recently referenced thread. */
+/* Save/restore a register cache. The registers saved/restored is
+ determined by the save_reggroup and restore_reggroup (although you
+ can't restore a register that wasn't saved as well :-). You can
+ only save to a read-only cache (default from regcache_xmalloc())
+ from a live cache and you can only restore from a read-only cache
+ to a live cache. */
-extern char *registers;
-
-/* DEPRECATED: Character array containing the current state of each
- register (unavailable<0, invalid=0, valid>0) for the most recently
- referenced thread. */
-
-extern signed char *register_valid;
+extern void regcache_save (struct regcache *dst, struct regcache *src);
+extern void regcache_restore (struct regcache *dst, struct regcache *src);
/* Copy/duplicate the contents of a register cache. By default, the
operation is pass-through. Writes to DST and reads from SRC will
@@ -169,26 +153,59 @@ extern struct regcache *regcache_dup_no_passthrough (struct regcache *regcache);
extern void regcache_cpy (struct regcache *dest, struct regcache *src);
extern void regcache_cpy_no_passthrough (struct regcache *dest, struct regcache *src);
+/* NOTE: cagney/2002-11-02: The below have been superseded by the
+ regcache_cooked_*() functions found above, and the frame_*()
+ functions found in "frame.h". Take care though, often more than a
+ simple substitution is required when updating the code. The
+ change, as far as practical, should avoid adding references to
+ global variables (e.g., current_regcache, current_frame,
+ current_gdbarch or selected_frame) and instead refer to the FRAME
+ or REGCACHE that has been passed into the containing function as
+ parameters. Consequently, the change typically involves modifying
+ the containing function so that it takes a FRAME or REGCACHE
+ parameter. In the case of an architecture vector method, there
+ should already be a non-deprecated variant that is parameterized
+ with FRAME or REGCACHE. */
+
extern char *deprecated_grub_regcache_for_registers (struct regcache *);
extern char *deprecated_grub_regcache_for_register_valid (struct regcache *);
+extern void deprecated_read_register_gen (int regnum, char *myaddr);
+extern void deprecated_write_register_gen (int regnum, char *myaddr);
+extern void deprecated_read_register_bytes (int regbyte, char *myaddr,
+ int len);
+extern void deprecated_write_register_bytes (int regbyte, char *myaddr,
+ int len);
+
+/* Character array containing the current state of each register
+ (unavailable<0, invalid=0, valid>0) for the most recently
+ referenced thread. This global is often found in close proximity
+ to code that is directly manipulating the deprecated_registers[]
+ array. In such cases, it should be possible to replace the lot
+ with a call to supply_register(). If you find yourself in dire
+ straits, still needing access to the cache status bit, the
+ regcache_valid_p() and set_register_cached() functions are
+ available. */
+extern signed char *deprecated_register_valid;
+
+/* Character array containing an image of the inferior programs'
+ registers for the most recently referenced thread.
+
+ NOTE: cagney/2002-11-14: Target side code should be using
+ supply_register() and/or regcache_collect() while architecture side
+ code should use the more generic regcache methods. */
+
+extern char *deprecated_registers;
+
+/* NOTE: cagney/2002-11-05: This function, and its co-conspirator
+ deprecated_registers[], have been superseeded by supply_register(). */
+extern void deprecated_registers_fetched (void);
extern int register_cached (int regnum);
extern void set_register_cached (int regnum, int state);
-extern void register_changed (int regnum);
-
extern void registers_changed (void);
-extern void registers_fetched (void);
-
-extern void read_register_bytes (int regbyte, char *myaddr, int len);
-
-extern void read_register_gen (int regnum, char *myaddr);
-
-extern void write_register_gen (int regnum, char *myaddr);
-
-extern void write_register_bytes (int regbyte, char *myaddr, int len);
/* Rename to read_unsigned_register()? */
extern ULONGEST read_register (int regnum);
diff --git a/gdb/remote-array.c b/gdb/remote-array.c
index ed0c40e..da9bfc7 100644
--- a/gdb/remote-array.c
+++ b/gdb/remote-array.c
@@ -115,14 +115,9 @@ init_array_ops (void)
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_attach = NULL;
- array_ops.to_post_attach = NULL;
- array_ops.to_require_attach = NULL;
array_ops.to_detach = array_detach;
- array_ops.to_require_detach = NULL;
array_ops.to_resume = array_resume;
array_ops.to_wait = array_wait;
- array_ops.to_post_wait = NULL;
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;
@@ -130,47 +125,15 @@ Specify the serial device it is connected to (e.g. /dev/ttya).";
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_terminal_init = 0;
- array_ops.to_terminal_inferior = 0;
- array_ops.to_terminal_ours_for_output = 0;
- array_ops.to_terminal_ours = 0;
- array_ops.to_terminal_info = 0;
array_ops.to_kill = array_kill;
- array_ops.to_load = 0;
- array_ops.to_lookup_symbol = 0;
array_ops.to_create_inferior = array_create_inferior;
- array_ops.to_post_startup_inferior = NULL;
- array_ops.to_acknowledge_created_inferior = NULL;
- array_ops.to_clone_and_follow_inferior = NULL;
- array_ops.to_post_follow_inferior_by_clone = NULL;
- array_ops.to_insert_fork_catchpoint = NULL;
- array_ops.to_remove_fork_catchpoint = NULL;
- array_ops.to_insert_vfork_catchpoint = NULL;
- array_ops.to_remove_vfork_catchpoint = NULL;
- array_ops.to_has_forked = NULL;
- array_ops.to_has_vforked = NULL;
- array_ops.to_can_follow_vfork_prior_to_exec = NULL;
- array_ops.to_post_follow_vfork = NULL;
- array_ops.to_insert_exec_catchpoint = NULL;
- array_ops.to_remove_exec_catchpoint = NULL;
- array_ops.to_has_execd = NULL;
- array_ops.to_reported_exec_events_per_exec_call = NULL;
- array_ops.to_has_exited = NULL;
array_ops.to_mourn_inferior = array_mourn_inferior;
- array_ops.to_can_run = 0;
- array_ops.to_notice_signals = 0;
- array_ops.to_thread_alive = 0;
- array_ops.to_stop = 0;
- array_ops.to_pid_to_exec_file = NULL;
array_ops.to_stratum = process_stratum;
- array_ops.DONT_USE = 0;
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_sections = 0;
- array_ops.to_sections_end = 0;
array_ops.to_magic = OPS_MAGIC;
};
diff --git a/gdb/remote-e7000.c b/gdb/remote-e7000.c
index d9cf5e8..33e5c00 100644
--- a/gdb/remote-e7000.c
+++ b/gdb/remote-e7000.c
@@ -2143,14 +2143,9 @@ target e7000 /dev/ttya 9600\n\
target e7000 foobar";
e7000_ops.to_open = e7000_open;
e7000_ops.to_close = e7000_close;
- e7000_ops.to_attach = 0;
- e7000_ops.to_post_attach = NULL;
- e7000_ops.to_require_attach = NULL;
e7000_ops.to_detach = e7000_detach;
- e7000_ops.to_require_detach = NULL;
e7000_ops.to_resume = e7000_resume;
e7000_ops.to_wait = e7000_wait;
- e7000_ops.to_post_wait = NULL;
e7000_ops.to_fetch_registers = e7000_fetch_register;
e7000_ops.to_store_registers = e7000_store_register;
e7000_ops.to_prepare_to_store = e7000_prepare_to_store;
@@ -2158,47 +2153,17 @@ target e7000 foobar";
e7000_ops.to_files_info = e7000_files_info;
e7000_ops.to_insert_breakpoint = e7000_insert_breakpoint;
e7000_ops.to_remove_breakpoint = e7000_remove_breakpoint;
- e7000_ops.to_terminal_init = 0;
- e7000_ops.to_terminal_inferior = 0;
- e7000_ops.to_terminal_ours_for_output = 0;
- e7000_ops.to_terminal_ours = 0;
- e7000_ops.to_terminal_info = 0;
e7000_ops.to_kill = e7000_kill;
e7000_ops.to_load = e7000_load;
- e7000_ops.to_lookup_symbol = 0;
e7000_ops.to_create_inferior = e7000_create_inferior;
- e7000_ops.to_post_startup_inferior = NULL;
- e7000_ops.to_acknowledge_created_inferior = NULL;
- e7000_ops.to_clone_and_follow_inferior = NULL;
- e7000_ops.to_post_follow_inferior_by_clone = NULL;
- e7000_ops.to_insert_fork_catchpoint = NULL;
- e7000_ops.to_remove_fork_catchpoint = NULL;
- e7000_ops.to_insert_vfork_catchpoint = NULL;
- e7000_ops.to_remove_vfork_catchpoint = NULL;
- e7000_ops.to_has_forked = NULL;
- e7000_ops.to_has_vforked = NULL;
- e7000_ops.to_can_follow_vfork_prior_to_exec = NULL;
- e7000_ops.to_post_follow_vfork = NULL;
- e7000_ops.to_insert_exec_catchpoint = NULL;
- e7000_ops.to_remove_exec_catchpoint = NULL;
- e7000_ops.to_has_execd = NULL;
- e7000_ops.to_reported_exec_events_per_exec_call = NULL;
- e7000_ops.to_has_exited = NULL;
e7000_ops.to_mourn_inferior = e7000_mourn_inferior;
- e7000_ops.to_can_run = 0;
- e7000_ops.to_notice_signals = 0;
- e7000_ops.to_thread_alive = 0;
e7000_ops.to_stop = e7000_stop;
- e7000_ops.to_pid_to_exec_file = NULL;
e7000_ops.to_stratum = process_stratum;
- e7000_ops.DONT_USE = 0;
e7000_ops.to_has_all_memory = 1;
e7000_ops.to_has_memory = 1;
e7000_ops.to_has_stack = 1;
e7000_ops.to_has_registers = 1;
e7000_ops.to_has_execution = 1;
- e7000_ops.to_sections = 0;
- e7000_ops.to_sections_end = 0;
e7000_ops.to_magic = OPS_MAGIC;
};
diff --git a/gdb/remote-es.c b/gdb/remote-es.c
index 24183cc..72e6171 100644
--- a/gdb/remote-es.c
+++ b/gdb/remote-es.c
@@ -623,7 +623,7 @@ es1800_fetch_register (int regno)
{
error ("Emulator reply is too short: %s", buf);
}
- registers[r++] = (fromhex (p[k * 2 + 1]) * 16) + fromhex (p[k * 2 + 2]);
+ deprecated_registers[r++] = (fromhex (p[k * 2 + 1]) * 16) + fromhex (p[k * 2 + 2]);
}
}
else
@@ -666,7 +666,7 @@ es1800_fetch_registers (void)
{
error ("Emulator reply is too short: %s", buf);
}
- registers[r++] = (fromhex (p[i + 0]) * 16) + fromhex (p[i + 1]);
+ deprecated_registers[r++] = (fromhex (p[i + 0]) * 16) + fromhex (p[i + 1]);
i += 2;
}
}
@@ -685,7 +685,7 @@ es1800_fetch_registers (void)
{
error ("Emulator reply is too short: %s", buf);
}
- registers[r++] = (fromhex (p[i + 0])) * 16 + fromhex (p[i + 1]);
+ deprecated_registers[r++] = (fromhex (p[i + 0])) * 16 + fromhex (p[i + 1]);
i += 2;
}
}
@@ -725,7 +725,7 @@ es1800_fetch_registers (void)
{
error ("Emulator reply is too short: %s", buf);
}
- registers[r++] = fromhex (buf[k * 2 + 1]) * 16 + fromhex (buf[k * 2 + 2]);
+ deprecated_registers[r++] = fromhex (buf[k * 2 + 1]) * 16 + fromhex (buf[k * 2 + 2]);
}
p = SR_buf;
@@ -735,7 +735,7 @@ es1800_fetch_registers (void)
{
error ("Emulator reply is too short: %s", buf);
}
- registers[r++] =
+ deprecated_registers[r++] =
fromhex (SR_buf[k * 2 + 1]) * 16 + fromhex (SR_buf[k * 2 + 2]);
}
send_with_reply ("PC", buf, sizeof (buf));
@@ -746,7 +746,7 @@ es1800_fetch_registers (void)
{
error ("Emulator reply is too short: %s", buf);
}
- registers[r++] = fromhex (buf[k * 2 + 1]) * 16 + fromhex (buf[k * 2 + 2]);
+ deprecated_registers[r++] = fromhex (buf[k * 2 + 1]) * 16 + fromhex (buf[k * 2 + 2]);
}
}
else
@@ -771,7 +771,7 @@ es1800_fetch_registers (void)
{
error ("Emulator reply is too short: %s", buf);
}
- registers[r++] = fromhex (buf[k * 2 + 1]) * 16 + fromhex (buf[k * 2 + 2]);
+ deprecated_registers[r++] = fromhex (buf[k * 2 + 1]) * 16 + fromhex (buf[k * 2 + 2]);
}
/* fetch STATUS */
@@ -783,7 +783,7 @@ es1800_fetch_registers (void)
{
error ("Emulator reply is too short: %s", buf);
}
- registers[r++] =
+ deprecated_registers[r++] =
fromhex (SR_buf[k * 2 + 1]) * 16 + fromhex (SR_buf[k * 2 + 2]);
}
@@ -797,7 +797,7 @@ es1800_fetch_registers (void)
{
error ("Emulator reply is too short: %s", buf);
}
- registers[r++] = fromhex (buf[k * 2 + 1]) * 16 + fromhex (buf[k * 2 + 2]);
+ deprecated_registers[r++] = fromhex (buf[k * 2 + 1]) * 16 + fromhex (buf[k * 2 + 2]);
}
}
}
@@ -827,7 +827,7 @@ es1800_store_register (int regno)
int k;
unsigned char *r;
- r = (unsigned char *) registers;
+ r = (unsigned char *) deprecated_registers;
if (regno == -1) /* write all registers */
{
@@ -1981,61 +1981,17 @@ Specify the serial device it is connected to (e.g. /dev/ttya).";
es1800_ops.to_open = es1800_open;
es1800_ops.to_close = es1800_close;
es1800_ops.to_attach = es1800_attach;
- es1800_ops.to_post_attach = NULL;
- es1800_ops.to_require_attach = NULL;
es1800_ops.to_detach = es1800_detach;
- es1800_ops.to_require_detach = NULL;
es1800_ops.to_resume = es1800_resume;
- es1800_ops.to_wait = NULL;
- es1800_ops.to_post_wait = NULL;
- es1800_ops.to_fetch_registers = NULL;
- es1800_ops.to_store_registers = NULL;
es1800_ops.to_prepare_to_store = es1800_prepare_to_store;
es1800_ops.to_xfer_memory = es1800_xfer_inferior_memory;
es1800_ops.to_files_info = es1800_files_info;
es1800_ops.to_insert_breakpoint = es1800_insert_breakpoint;
es1800_ops.to_remove_breakpoint = es1800_remove_breakpoint;
- es1800_ops.to_terminal_init = NULL;
- es1800_ops.to_terminal_inferior = NULL;
- es1800_ops.to_terminal_ours_for_output = NULL;
- es1800_ops.to_terminal_ours = NULL;
- es1800_ops.to_terminal_info = NULL;
- es1800_ops.to_kill = NULL;
es1800_ops.to_load = es1800_load;
- es1800_ops.to_lookup_symbol = NULL;
es1800_ops.to_create_inferior = es1800_create_inferior;
- es1800_ops.to_post_startup_inferior = NULL;
- es1800_ops.to_acknowledge_created_inferior = NULL;
- es1800_ops.to_clone_and_follow_inferior = NULL;
- es1800_ops.to_post_follow_inferior_by_clone = NULL;
- es1800_ops.to_insert_fork_catchpoint = NULL;
- es1800_ops.to_remove_fork_catchpoint = NULL;
- es1800_ops.to_insert_vfork_catchpoint = NULL;
- es1800_ops.to_remove_vfork_catchpoint = NULL;
- es1800_ops.to_has_forked = NULL;
- es1800_ops.to_has_vforked = NULL;
- es1800_ops.to_can_follow_vfork_prior_to_exec = NULL;
- es1800_ops.to_post_follow_vfork = NULL;
- es1800_ops.to_insert_exec_catchpoint = NULL;
- es1800_ops.to_remove_exec_catchpoint = NULL;
- es1800_ops.to_has_execd = NULL;
- es1800_ops.to_reported_exec_events_per_exec_call = NULL;
- es1800_ops.to_has_exited = NULL;
- es1800_ops.to_mourn_inferior = NULL;
- es1800_ops.to_can_run = 0;
- es1800_ops.to_notice_signals = 0;
- es1800_ops.to_thread_alive = 0;
- es1800_ops.to_stop = 0;
- es1800_ops.to_pid_to_exec_file = NULL;
es1800_ops.to_stratum = core_stratum;
- es1800_ops.DONT_USE = 0;
- es1800_ops.to_has_all_memory = 0;
es1800_ops.to_has_memory = 1;
- es1800_ops.to_has_stack = 0;
- es1800_ops.to_has_registers = 0;
- es1800_ops.to_has_execution = 0;
- es1800_ops.to_sections = NULL;
- es1800_ops.to_sections_end = NULL;
es1800_ops.to_magic = OPS_MAGIC;
}
@@ -2051,15 +2007,10 @@ init_es1800_child_ops (void)
es1800_child_ops.to_doc = "Remote debugging on the es1800 emulator via a serial line.\n\
Specify the serial device it is connected to (e.g. /dev/ttya).";
es1800_child_ops.to_open = es1800_child_open;
- es1800_child_ops.to_close = NULL;
es1800_child_ops.to_attach = es1800_attach;
- es1800_child_ops.to_post_attach = NULL;
- es1800_child_ops.to_require_attach = NULL;
es1800_child_ops.to_detach = es1800_child_detach;
- es1800_child_ops.to_require_detach = NULL;
es1800_child_ops.to_resume = es1800_resume;
es1800_child_ops.to_wait = es1800_wait;
- es1800_child_ops.to_post_wait = NULL;
es1800_child_ops.to_fetch_registers = es1800_fetch_register;
es1800_child_ops.to_store_registers = es1800_store_register;
es1800_child_ops.to_prepare_to_store = es1800_prepare_to_store;
@@ -2067,47 +2018,16 @@ Specify the serial device it is connected to (e.g. /dev/ttya).";
es1800_child_ops.to_files_info = es1800_files_info;
es1800_child_ops.to_insert_breakpoint = es1800_insert_breakpoint;
es1800_child_ops.to_remove_breakpoint = es1800_remove_breakpoint;
- es1800_child_ops.to_terminal_init = NULL;
- es1800_child_ops.to_terminal_inferior = NULL;
- es1800_child_ops.to_terminal_ours_for_output = NULL;
- es1800_child_ops.to_terminal_ours = NULL;
- es1800_child_ops.to_terminal_info = NULL;
es1800_child_ops.to_kill = es1800_kill;
es1800_child_ops.to_load = es1800_load;
- es1800_child_ops.to_lookup_symbol = NULL;
es1800_child_ops.to_create_inferior = es1800_create_inferior;
- es1800_child_ops.to_post_startup_inferior = NULL;
- es1800_child_ops.to_acknowledge_created_inferior = NULL;
- es1800_child_ops.to_clone_and_follow_inferior = NULL;
- es1800_child_ops.to_post_follow_inferior_by_clone = NULL;
- es1800_child_ops.to_insert_fork_catchpoint = NULL;
- es1800_child_ops.to_remove_fork_catchpoint = NULL;
- es1800_child_ops.to_insert_vfork_catchpoint = NULL;
- es1800_child_ops.to_remove_vfork_catchpoint = NULL;
- es1800_child_ops.to_has_forked = NULL;
- es1800_child_ops.to_has_vforked = NULL;
- es1800_child_ops.to_can_follow_vfork_prior_to_exec = NULL;
- es1800_child_ops.to_post_follow_vfork = NULL;
- es1800_child_ops.to_insert_exec_catchpoint = NULL;
- es1800_child_ops.to_remove_exec_catchpoint = NULL;
- es1800_child_ops.to_has_execd = NULL;
- es1800_child_ops.to_reported_exec_events_per_exec_call = NULL;
- es1800_child_ops.to_has_exited = NULL;
es1800_child_ops.to_mourn_inferior = es1800_mourn_inferior;
- es1800_child_ops.to_can_run = 0;
- es1800_child_ops.to_notice_signals = 0;
- es1800_child_ops.to_thread_alive = 0;
- es1800_child_ops.to_stop = 0;
- es1800_child_ops.to_pid_to_exec_file = NULL;
es1800_child_ops.to_stratum = process_stratum;
- es1800_child_ops.DONT_USE = 0;
es1800_child_ops.to_has_all_memory = 1;
es1800_child_ops.to_has_memory = 1;
es1800_child_ops.to_has_stack = 1;
es1800_child_ops.to_has_registers = 1;
es1800_child_ops.to_has_execution = 1;
- es1800_child_ops.to_sections = NULL;
- es1800_child_ops.to_sections_end = NULL;
es1800_child_ops.to_magic = OPS_MAGIC;
}
diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c
index a1df0eb..abd590b 100644
--- a/gdb/remote-mips.c
+++ b/gdb/remote-mips.c
@@ -3443,7 +3443,7 @@ mips_load (char *file, int from_tty)
/* Work around problem where PMON monitor updates the PC after a load
to a different value than GDB thinks it has. The following ensures
that the write_pc() WILL update the PC value: */
- register_valid[PC_REGNUM] = 0;
+ deprecated_register_valid[PC_REGNUM] = 0;
}
if (exec_bfd)
write_pc (bfd_get_start_address (exec_bfd));
diff --git a/gdb/remote-rdi.c b/gdb/remote-rdi.c
index 228e3d9..a85fbb1 100644
--- a/gdb/remote-rdi.c
+++ b/gdb/remote-rdi.c
@@ -598,7 +598,7 @@ arm_rdi_store_registers (int regno)
}
else
{
- read_register_gen (regno, (char *) rawreg);
+ deprecated_read_register_gen (regno, (char *) rawreg);
/* RDI manipulates data in host byte order, so convert now. */
store_unsigned_integer (rawerreg, 4, rawreg[0]);
diff --git a/gdb/remote-rdp.c b/gdb/remote-rdp.c
index 34a42ab..20ed516 100644
--- a/gdb/remote-rdp.c
+++ b/gdb/remote-rdp.c
@@ -643,7 +643,7 @@ remote_rdp_store_register (int regno)
else
{
char tmp[ARM_MAX_REGISTER_RAW_SIZE];
- read_register_gen (regno, tmp);
+ deprecated_read_register_gen (regno, tmp);
if (regno < 15)
rdp_store_one_register (1 << regno, tmp);
else if (regno == ARM_PC_REGNUM)
@@ -1383,13 +1383,8 @@ init_remote_rdp_ops (void)
remote_rdp_ops.to_open = remote_rdp_open;
remote_rdp_ops.to_close = remote_rdp_close;
remote_rdp_ops.to_attach = remote_rdp_attach;
- remote_rdp_ops.to_post_attach = NULL;
- remote_rdp_ops.to_require_attach = NULL;
- remote_rdp_ops.to_detach = NULL;
- remote_rdp_ops.to_require_detach = NULL;
remote_rdp_ops.to_resume = remote_rdp_resume;
remote_rdp_ops.to_wait = remote_rdp_wait;
- remote_rdp_ops.to_post_wait = NULL;
remote_rdp_ops.to_fetch_registers = remote_rdp_fetch_register;
remote_rdp_ops.to_store_registers = remote_rdp_store_register;
remote_rdp_ops.to_prepare_to_store = remote_rdp_prepare_to_store;
@@ -1397,47 +1392,16 @@ init_remote_rdp_ops (void)
remote_rdp_ops.to_files_info = remote_rdp_files_info;
remote_rdp_ops.to_insert_breakpoint = remote_rdp_insert_breakpoint;
remote_rdp_ops.to_remove_breakpoint = remote_rdp_remove_breakpoint;
- remote_rdp_ops.to_terminal_init = NULL;
- remote_rdp_ops.to_terminal_inferior = NULL;
- remote_rdp_ops.to_terminal_ours_for_output = NULL;
- remote_rdp_ops.to_terminal_ours = NULL;
- remote_rdp_ops.to_terminal_info = NULL;
remote_rdp_ops.to_kill = remote_rdp_kill;
remote_rdp_ops.to_load = generic_load;
- remote_rdp_ops.to_lookup_symbol = NULL;
remote_rdp_ops.to_create_inferior = remote_rdp_create_inferior;
- remote_rdp_ops.to_post_startup_inferior = NULL;
- remote_rdp_ops.to_acknowledge_created_inferior = NULL;
- remote_rdp_ops.to_clone_and_follow_inferior = NULL;
- remote_rdp_ops.to_post_follow_inferior_by_clone = NULL;
- remote_rdp_ops.to_insert_fork_catchpoint = NULL;
- remote_rdp_ops.to_remove_fork_catchpoint = NULL;
- remote_rdp_ops.to_insert_vfork_catchpoint = NULL;
- remote_rdp_ops.to_remove_vfork_catchpoint = NULL;
- remote_rdp_ops.to_has_forked = NULL;
- remote_rdp_ops.to_has_vforked = NULL;
- remote_rdp_ops.to_can_follow_vfork_prior_to_exec = NULL;
- remote_rdp_ops.to_post_follow_vfork = NULL;
- remote_rdp_ops.to_insert_exec_catchpoint = NULL;
- remote_rdp_ops.to_remove_exec_catchpoint = NULL;
- remote_rdp_ops.to_has_execd = NULL;
- remote_rdp_ops.to_reported_exec_events_per_exec_call = NULL;
- remote_rdp_ops.to_has_exited = NULL;
remote_rdp_ops.to_mourn_inferior = generic_mourn_inferior;
- remote_rdp_ops.to_can_run = NULL;
- remote_rdp_ops.to_notice_signals = 0;
- remote_rdp_ops.to_thread_alive = 0;
- remote_rdp_ops.to_stop = 0;
- remote_rdp_ops.to_pid_to_exec_file = NULL;
remote_rdp_ops.to_stratum = process_stratum;
- remote_rdp_ops.DONT_USE = NULL;
remote_rdp_ops.to_has_all_memory = 1;
remote_rdp_ops.to_has_memory = 1;
remote_rdp_ops.to_has_stack = 1;
remote_rdp_ops.to_has_registers = 1;
remote_rdp_ops.to_has_execution = 1;
- remote_rdp_ops.to_sections = NULL;
- remote_rdp_ops.to_sections_end = NULL;
remote_rdp_ops.to_magic = OPS_MAGIC;
}
diff --git a/gdb/remote-sds.c b/gdb/remote-sds.c
index 053b97a..6797d05 100644
--- a/gdb/remote-sds.c
+++ b/gdb/remote-sds.c
@@ -509,7 +509,7 @@ static void
sds_prepare_to_store (void)
{
/* Make sure the entire registers array is valid. */
- read_register_bytes (0, (char *) NULL, REGISTER_BYTES);
+ deprecated_read_register_bytes (0, (char *) NULL, REGISTER_BYTES);
}
/* Store register REGNO, or all registers if REGNO == -1, from the contents
@@ -528,7 +528,7 @@ sds_store_registers (int regno)
*p++ = 0;
*p++ = 0;
for (i = 0; i < 4 * 6; i++)
- *p++ = registers[i + 4 * 32 + 8 * 32];
+ *p++ = deprecated_registers[i + 4 * 32 + 8 * 32];
for (i = 0; i < 4 * 1; i++)
*p++ = 0;
for (i = 0; i < 4 * 4; i++)
@@ -543,7 +543,7 @@ sds_store_registers (int regno)
*p++ = 0;
*p++ = 0;
for (i = 0; i < 4 * 32; i++)
- *p++ = registers[i];
+ *p++ = deprecated_registers[i];
sds_send (buf, p - buf);
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index 221efe4..3e2a7cd 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -361,7 +361,7 @@ gdbsim_store_register (int regno)
{
char tmp[MAX_REGISTER_RAW_SIZE];
int nr_bytes;
- read_register_gen (regno, tmp);
+ deprecated_read_register_gen (regno, tmp);
nr_bytes = sim_store_register (gdbsim_desc,
REGISTER_SIM_REGNO (regno),
tmp, REGISTER_RAW_SIZE (regno));
@@ -897,14 +897,9 @@ init_gdbsim_ops (void)
gdbsim_ops.to_doc = "Use the compiled-in simulator.";
gdbsim_ops.to_open = gdbsim_open;
gdbsim_ops.to_close = gdbsim_close;
- gdbsim_ops.to_attach = NULL;
- gdbsim_ops.to_post_attach = NULL;
- gdbsim_ops.to_require_attach = NULL;
gdbsim_ops.to_detach = gdbsim_detach;
- gdbsim_ops.to_require_detach = NULL;
gdbsim_ops.to_resume = gdbsim_resume;
gdbsim_ops.to_wait = gdbsim_wait;
- gdbsim_ops.to_post_wait = NULL;
gdbsim_ops.to_fetch_registers = gdbsim_fetch_register;
gdbsim_ops.to_store_registers = gdbsim_store_register;
gdbsim_ops.to_prepare_to_store = gdbsim_prepare_to_store;
@@ -912,47 +907,17 @@ init_gdbsim_ops (void)
gdbsim_ops.to_files_info = gdbsim_files_info;
gdbsim_ops.to_insert_breakpoint = gdbsim_insert_breakpoint;
gdbsim_ops.to_remove_breakpoint = gdbsim_remove_breakpoint;
- gdbsim_ops.to_terminal_init = NULL;
- gdbsim_ops.to_terminal_inferior = NULL;
- gdbsim_ops.to_terminal_ours_for_output = NULL;
- gdbsim_ops.to_terminal_ours = NULL;
- gdbsim_ops.to_terminal_info = NULL;
gdbsim_ops.to_kill = gdbsim_kill;
gdbsim_ops.to_load = gdbsim_load;
- gdbsim_ops.to_lookup_symbol = NULL;
gdbsim_ops.to_create_inferior = gdbsim_create_inferior;
- gdbsim_ops.to_post_startup_inferior = NULL;
- gdbsim_ops.to_acknowledge_created_inferior = NULL;
- gdbsim_ops.to_clone_and_follow_inferior = NULL;
- gdbsim_ops.to_post_follow_inferior_by_clone = NULL;
- gdbsim_ops.to_insert_fork_catchpoint = NULL;
- gdbsim_ops.to_remove_fork_catchpoint = NULL;
- gdbsim_ops.to_insert_vfork_catchpoint = NULL;
- gdbsim_ops.to_remove_vfork_catchpoint = NULL;
- gdbsim_ops.to_has_forked = NULL;
- gdbsim_ops.to_has_vforked = NULL;
- gdbsim_ops.to_can_follow_vfork_prior_to_exec = NULL;
- gdbsim_ops.to_post_follow_vfork = NULL;
- gdbsim_ops.to_insert_exec_catchpoint = NULL;
- gdbsim_ops.to_remove_exec_catchpoint = NULL;
- gdbsim_ops.to_has_execd = NULL;
- gdbsim_ops.to_reported_exec_events_per_exec_call = NULL;
- gdbsim_ops.to_has_exited = NULL;
gdbsim_ops.to_mourn_inferior = gdbsim_mourn_inferior;
- gdbsim_ops.to_can_run = 0;
- gdbsim_ops.to_notice_signals = 0;
- gdbsim_ops.to_thread_alive = 0;
gdbsim_ops.to_stop = gdbsim_stop;
- gdbsim_ops.to_pid_to_exec_file = NULL;
gdbsim_ops.to_stratum = process_stratum;
- gdbsim_ops.DONT_USE = NULL;
gdbsim_ops.to_has_all_memory = 1;
gdbsim_ops.to_has_memory = 1;
gdbsim_ops.to_has_stack = 1;
gdbsim_ops.to_has_registers = 1;
gdbsim_ops.to_has_execution = 1;
- gdbsim_ops.to_sections = NULL;
- gdbsim_ops.to_sections_end = NULL;
gdbsim_ops.to_magic = OPS_MAGIC;
#ifdef TARGET_REDEFINE_DEFAULT_OPS
diff --git a/gdb/remote-st.c b/gdb/remote-st.c
index c27ddeb..7c452a2 100644
--- a/gdb/remote-st.c
+++ b/gdb/remote-st.c
@@ -767,14 +767,9 @@ Arguments are the name of the device for the serial line,\n\
the speed to connect at in bits per second.";
st2000_ops.to_open = st2000_open;
st2000_ops.to_close = st2000_close;
- st2000_ops.to_attach = 0;
- st2000_run_ops.to_post_attach = NULL;
- st2000_ops.to_require_attach = NULL;
st2000_ops.to_detach = st2000_detach;
- st2000_ops.to_require_detach = NULL;
st2000_ops.to_resume = st2000_resume;
st2000_ops.to_wait = st2000_wait;
- st2000_ops.to_post_wait = NULL;
st2000_ops.to_fetch_registers = st2000_fetch_register;
st2000_ops.to_store_registers = st2000_store_register;
st2000_ops.to_prepare_to_store = st2000_prepare_to_store;
@@ -782,47 +777,15 @@ the speed to connect at in bits per second.";
st2000_ops.to_files_info = st2000_files_info;
st2000_ops.to_insert_breakpoint = st2000_insert_breakpoint;
st2000_ops.to_remove_breakpoint = st2000_remove_breakpoint; /* Breakpoints */
- st2000_ops.to_terminal_init = 0;
- st2000_ops.to_terminal_inferior = 0;
- st2000_ops.to_terminal_ours_for_output = 0;
- st2000_ops.to_terminal_ours = 0;
- st2000_ops.to_terminal_info = 0; /* Terminal handling */
st2000_ops.to_kill = st2000_kill;
- st2000_ops.to_load = 0; /* load */
- st2000_ops.to_lookup_symbol = 0; /* lookup_symbol */
st2000_ops.to_create_inferior = st2000_create_inferior;
- st2000_ops.to_post_startup_inferior = NULL;
- st2000_ops.to_acknowledge_created_inferior = NULL;
- st2000_ops.to_clone_and_follow_inferior = NULL;
- st2000_ops.to_post_follow_inferior_by_clone = NULL;
- st2000_run_ops.to_insert_fork_catchpoint = NULL;
- st2000_run_ops.to_remove_fork_catchpoint = NULL;
- st2000_run_ops.to_insert_vfork_catchpoint = NULL;
- st2000_run_ops.to_remove_vfork_catchpoint = NULL;
- st2000_ops.to_has_forked = NULL;
- st2000_ops.to_has_vforked = NULL;
- st2000_run_ops.to_can_follow_vfork_prior_to_exec = NULL;
- st2000_ops.to_post_follow_vfork = NULL;
- st2000_run_ops.to_insert_exec_catchpoint = NULL;
- st2000_run_ops.to_remove_exec_catchpoint = NULL;
- st2000_run_ops.to_has_execd = NULL;
- st2000_run_ops.to_reported_exec_events_per_exec_call = NULL;
- st2000_run_ops.to_has_exited = NULL;
st2000_ops.to_mourn_inferior = st2000_mourn_inferior;
- st2000_ops.to_can_run = 0; /* can_run */
- st2000_ops.to_notice_signals = 0; /* notice_signals */
- st2000_ops.to_thread_alive = 0; /* thread alive */
- st2000_ops.to_stop = 0; /* to_stop */
- st2000_ops.to_pid_to_exec_file = NULL;
st2000_ops.to_stratum = process_stratum;
- st2000_ops.DONT_USE = 0; /* next */
st2000_ops.to_has_all_memory = 1;
st2000_ops.to_has_memory = 1;
st2000_ops.to_has_stack = 1;
st2000_ops.to_has_registers = 1;
st2000_ops.to_has_execution = 1; /* all mem, mem, stack, regs, exec */
- st2000_ops.to_sections = 0;
- st2000_ops.to_sections_end = 0; /* Section pointers */
st2000_ops.to_magic = OPS_MAGIC; /* Always the last thing */
};
diff --git a/gdb/remote-vx.c b/gdb/remote-vx.c
index 5ec4df4..0bd8c52 100644
--- a/gdb/remote-vx.c
+++ b/gdb/remote-vx.c
@@ -466,7 +466,7 @@ static void
vx_prepare_to_store (void)
{
/* Fetch all registers, if any of them are not yet fetched. */
- read_register_bytes (0, NULL, REGISTER_BYTES);
+ deprecated_read_register_bytes (0, NULL, REGISTER_BYTES);
}
/* Copy LEN bytes to or from remote inferior's memory starting at MEMADDR
@@ -820,7 +820,7 @@ net_get_symbols (ldtabl *pLoadTable)
Returns status of symbol read on target side (0=success, -1=fail)
Returns -1 and complain()s if rpc fails. */
-struct complaint cant_contact_target =
+struct deprecated_complaint cant_contact_target =
{"Lost contact with VxWorks target", 0, 0};
static int
diff --git a/gdb/remote-vx68.c b/gdb/remote-vx68.c
index 2ebaa63..e7f138d 100644
--- a/gdb/remote-vx68.c
+++ b/gdb/remote-vx68.c
@@ -30,7 +30,7 @@
#include "gdbcore.h"
#include "command.h"
#include "symtab.h"
-#include "symfile.h" /* for struct complaint */
+#include "symfile.h"
#include "regcache.h"
#include "gdb_string.h"
@@ -85,10 +85,13 @@ vx_read_register (int regno)
net_read_registers (mc68k_greg_packet, MC68K_GREG_PLEN, PTRACE_GETREGS);
- bcopy (&mc68k_greg_packet[MC68K_R_D0], registers, 16 * MC68K_GREG_SIZE);
- bcopy (&mc68k_greg_packet[MC68K_R_SR], &registers[REGISTER_BYTE (PS_REGNUM)],
+ bcopy (&mc68k_greg_packet[MC68K_R_D0], deprecated_registers,
+ 16 * MC68K_GREG_SIZE);
+ bcopy (&mc68k_greg_packet[MC68K_R_SR],
+ &deprecated_registers[REGISTER_BYTE (PS_REGNUM)],
MC68K_GREG_SIZE);
- bcopy (&mc68k_greg_packet[MC68K_R_PC], &registers[REGISTER_BYTE (PC_REGNUM)],
+ bcopy (&mc68k_greg_packet[MC68K_R_PC],
+ &deprecated_registers[REGISTER_BYTE (PC_REGNUM)],
MC68K_GREG_SIZE);
/* Get floating-point registers, if the target system has them.
@@ -100,23 +103,23 @@ vx_read_register (int regno)
PTRACE_GETFPREGS);
bcopy (&mc68k_fpreg_packet[MC68K_R_FP0],
- &registers[REGISTER_BYTE (FP0_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
MC68K_FPREG_SIZE * 8);
bcopy (&mc68k_fpreg_packet[MC68K_R_FPCR],
- &registers[REGISTER_BYTE (FPC_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (FPC_REGNUM)],
MC68K_FPREG_PLEN - (MC68K_FPREG_SIZE * 8));
}
else
{
- bzero (&registers[REGISTER_BYTE (FP0_REGNUM)],
+ bzero (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
MC68K_FPREG_SIZE * 8);
- bzero (&registers[REGISTER_BYTE (FPC_REGNUM)],
+ bzero (&deprecated_registers[REGISTER_BYTE (FPC_REGNUM)],
MC68K_FPREG_PLEN - (MC68K_FPREG_SIZE * 8));
}
/* Mark the register cache valid. */
- registers_fetched ();
+ deprecated_registers_fetched ();
}
/* Store a register or registers into the VxWorks target.
@@ -131,10 +134,11 @@ vx_write_register (int regno)
/* Store general-purpose registers. */
- bcopy (registers, &mc68k_greg_packet[MC68K_R_D0], 16 * MC68K_GREG_SIZE);
- bcopy (&registers[REGISTER_BYTE (PS_REGNUM)],
+ bcopy (deprecated_registers, &mc68k_greg_packet[MC68K_R_D0],
+ 16 * MC68K_GREG_SIZE);
+ bcopy (&deprecated_registers[REGISTER_BYTE (PS_REGNUM)],
&mc68k_greg_packet[MC68K_R_SR], MC68K_GREG_SIZE);
- bcopy (&registers[REGISTER_BYTE (PC_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (PC_REGNUM)],
&mc68k_greg_packet[MC68K_R_PC], MC68K_GREG_SIZE);
net_write_registers (mc68k_greg_packet, MC68K_GREG_PLEN, PTRACE_SETREGS);
@@ -143,10 +147,10 @@ vx_write_register (int regno)
if (target_has_fp)
{
- bcopy (&registers[REGISTER_BYTE (FP0_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
&mc68k_fpreg_packet[MC68K_R_FP0],
MC68K_FPREG_SIZE * 8);
- bcopy (&registers[REGISTER_BYTE (FPC_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (FPC_REGNUM)],
&mc68k_fpreg_packet[MC68K_R_FPCR],
MC68K_FPREG_PLEN - (MC68K_FPREG_SIZE * 8));
diff --git a/gdb/remote-vxmips.c b/gdb/remote-vxmips.c
index 8be4a2f..441bd9b 100644
--- a/gdb/remote-vxmips.c
+++ b/gdb/remote-vxmips.c
@@ -30,7 +30,7 @@
#include "gdbcore.h"
#include "command.h"
#include "symtab.h"
-#include "symfile.h" /* for struct complaint */
+#include "symfile.h"
#include "regcache.h"
#include "gdb_string.h"
@@ -103,18 +103,19 @@ vx_read_register (int regno)
/* Copy the general registers. */
- bcopy (&mips_greg_packet[MIPS_R_GP0], &registers[0], 32 * MIPS_GREG_SIZE);
+ bcopy (&mips_greg_packet[MIPS_R_GP0], &deprecated_registers[0],
+ 32 * MIPS_GREG_SIZE);
/* Copy SR, LO, HI, and PC. */
bcopy (&mips_greg_packet[MIPS_R_SR],
- &registers[REGISTER_BYTE (PS_REGNUM)], MIPS_GREG_SIZE);
+ &deprecated_registers[REGISTER_BYTE (PS_REGNUM)], MIPS_GREG_SIZE);
bcopy (&mips_greg_packet[MIPS_R_LO],
- &registers[REGISTER_BYTE (LO_REGNUM)], MIPS_GREG_SIZE);
+ &deprecated_registers[REGISTER_BYTE (LO_REGNUM)], MIPS_GREG_SIZE);
bcopy (&mips_greg_packet[MIPS_R_HI],
- &registers[REGISTER_BYTE (HI_REGNUM)], MIPS_GREG_SIZE);
+ &deprecated_registers[REGISTER_BYTE (HI_REGNUM)], MIPS_GREG_SIZE);
bcopy (&mips_greg_packet[MIPS_R_PC],
- &registers[REGISTER_BYTE (PC_REGNUM)], MIPS_GREG_SIZE);
+ &deprecated_registers[REGISTER_BYTE (PC_REGNUM)], MIPS_GREG_SIZE);
/* If the target has floating point registers, fetch them.
Otherwise, zero the floating point register values in
@@ -129,26 +130,26 @@ vx_read_register (int regno)
/* Copy the floating point registers. */
bcopy (&mips_fpreg_packet[MIPS_R_FP0],
- &registers[REGISTER_BYTE (FP0_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
REGISTER_RAW_SIZE (FP0_REGNUM) * 32);
/* Copy the floating point control/status register (fpcsr). */
bcopy (&mips_fpreg_packet[MIPS_R_FPCSR],
- &registers[REGISTER_BYTE (FCRCS_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (FCRCS_REGNUM)],
REGISTER_RAW_SIZE (FCRCS_REGNUM));
}
else
{
- bzero ((char *) &registers[REGISTER_BYTE (FP0_REGNUM)],
+ bzero ((char *) &deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
REGISTER_RAW_SIZE (FP0_REGNUM) * 32);
- bzero ((char *) &registers[REGISTER_BYTE (FCRCS_REGNUM)],
+ bzero ((char *) &deprecated_registers[REGISTER_BYTE (FCRCS_REGNUM)],
REGISTER_RAW_SIZE (FCRCS_REGNUM));
}
/* Mark the register cache valid. */
- registers_fetched ();
+ deprecated_registers_fetched ();
}
/* Store a register or registers into the VxWorks target.
@@ -162,17 +163,18 @@ vx_write_register (int regno)
/* Store general registers. */
- bcopy (&registers[0], &mips_greg_packet[MIPS_R_GP0], 32 * MIPS_GREG_SIZE);
+ bcopy (&deprecated_registers[0], &mips_greg_packet[MIPS_R_GP0],
+ 32 * MIPS_GREG_SIZE);
/* Copy SR, LO, HI, and PC. */
- bcopy (&registers[REGISTER_BYTE (PS_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (PS_REGNUM)],
&mips_greg_packet[MIPS_R_SR], MIPS_GREG_SIZE);
- bcopy (&registers[REGISTER_BYTE (LO_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (LO_REGNUM)],
&mips_greg_packet[MIPS_R_LO], MIPS_GREG_SIZE);
- bcopy (&registers[REGISTER_BYTE (HI_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (HI_REGNUM)],
&mips_greg_packet[MIPS_R_HI], MIPS_GREG_SIZE);
- bcopy (&registers[REGISTER_BYTE (PC_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (PC_REGNUM)],
&mips_greg_packet[MIPS_R_PC], MIPS_GREG_SIZE);
net_write_registers (mips_greg_packet, MIPS_GREG_PLEN, PTRACE_SETREGS);
@@ -183,13 +185,13 @@ vx_write_register (int regno)
{
/* Copy the floating point data registers. */
- bcopy (&registers[REGISTER_BYTE (FP0_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
&mips_fpreg_packet[MIPS_R_FP0],
REGISTER_RAW_SIZE (FP0_REGNUM) * 32);
/* Copy the floating point control/status register (fpcsr). */
- bcopy (&registers[REGISTER_BYTE (FCRCS_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (FCRCS_REGNUM)],
&mips_fpreg_packet[MIPS_R_FPCSR],
REGISTER_RAW_SIZE (FCRCS_REGNUM));
diff --git a/gdb/remote-vxsparc.c b/gdb/remote-vxsparc.c
index 294e940..eb59b9f 100644
--- a/gdb/remote-vxsparc.c
+++ b/gdb/remote-vxsparc.c
@@ -30,7 +30,7 @@
#include "gdbcore.h"
#include "command.h"
#include "symtab.h"
-#include "symfile.h" /* for struct complaint */
+#include "symfile.h"
#include "regcache.h"
#include "gdb_string.h"
@@ -92,18 +92,19 @@ vx_read_register (int regno)
as defined in "tm-sparc.h". */
bcopy (&sparc_greg_packet[SPARC_R_G0],
- &registers[REGISTER_BYTE (G0_REGNUM)], 32 * SPARC_GREG_SIZE);
+ &deprecated_registers[REGISTER_BYTE (G0_REGNUM)],
+ 32 * SPARC_GREG_SIZE);
bcopy (&sparc_greg_packet[SPARC_R_Y],
- &registers[REGISTER_BYTE (Y_REGNUM)], 6 * SPARC_GREG_SIZE);
+ &deprecated_registers[REGISTER_BYTE (Y_REGNUM)], 6 * SPARC_GREG_SIZE);
/* Now write the local and in registers to the register window
spill area in the frame. VxWorks does not do this for the
active frame automatically; it greatly simplifies debugging
(FRAME_FIND_SAVED_REGS, in particular, depends on this). */
- sp = extract_address (&registers[REGISTER_BYTE (SP_REGNUM)],
+ sp = extract_address (&deprecated_registers[REGISTER_BYTE (SP_REGNUM)],
REGISTER_RAW_SIZE (SP_REGNUM));
- write_memory (sp, &registers[REGISTER_BYTE (L0_REGNUM)],
+ write_memory (sp, &deprecated_registers[REGISTER_BYTE (L0_REGNUM)],
16 * REGISTER_RAW_SIZE (L0_REGNUM));
/* If the target has floating point registers, fetch them.
@@ -116,19 +117,23 @@ vx_read_register (int regno)
net_read_registers (sparc_fpreg_packet, SPARC_FPREG_PLEN,
PTRACE_GETFPREGS);
bcopy (&sparc_fpreg_packet[SPARC_R_FP0],
- &registers[REGISTER_BYTE (FP0_REGNUM)], 32 * SPARC_FPREG_SIZE);
+ &deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
+ 32 * SPARC_FPREG_SIZE);
bcopy (&sparc_fpreg_packet[SPARC_R_FSR],
- &registers[REGISTER_BYTE (FPS_REGNUM)], 1 * SPARC_FPREG_SIZE);
+ &deprecated_registers[REGISTER_BYTE (FPS_REGNUM)],
+ 1 * SPARC_FPREG_SIZE);
}
else
{
- bzero (&registers[REGISTER_BYTE (FP0_REGNUM)], 32 * SPARC_FPREG_SIZE);
- bzero (&registers[REGISTER_BYTE (FPS_REGNUM)], 1 * SPARC_FPREG_SIZE);
+ bzero (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
+ 32 * SPARC_FPREG_SIZE);
+ bzero (&deprecated_registers[REGISTER_BYTE (FPS_REGNUM)],
+ 1 * SPARC_FPREG_SIZE);
}
/* Mark the register cache valid. */
- registers_fetched ();
+ deprecated_registers_fetched ();
}
/* Store a register or registers into the VxWorks target.
@@ -160,9 +165,9 @@ vx_write_register (int regno)
}
if (in_gp_regs)
{
- bcopy (&registers[REGISTER_BYTE (G0_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (G0_REGNUM)],
&sparc_greg_packet[SPARC_R_G0], 32 * SPARC_GREG_SIZE);
- bcopy (&registers[REGISTER_BYTE (Y_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (Y_REGNUM)],
&sparc_greg_packet[SPARC_R_Y], 6 * SPARC_GREG_SIZE);
net_write_registers (sparc_greg_packet, SPARC_GREG_PLEN, PTRACE_SETREGS);
@@ -172,9 +177,9 @@ vx_write_register (int regno)
if (regno < 0 || (L0_REGNUM <= regno && regno <= I7_REGNUM))
{
- sp = extract_address (&registers[REGISTER_BYTE (SP_REGNUM)],
+ sp = extract_address (&deprecated_registers[REGISTER_BYTE (SP_REGNUM)],
REGISTER_RAW_SIZE (SP_REGNUM));
- write_memory (sp, &registers[REGISTER_BYTE (L0_REGNUM)],
+ write_memory (sp, &deprecated_registers[REGISTER_BYTE (L0_REGNUM)],
16 * REGISTER_RAW_SIZE (L0_REGNUM));
}
}
@@ -183,9 +188,9 @@ vx_write_register (int regno)
if (in_fp_regs && target_has_fp)
{
- bcopy (&registers[REGISTER_BYTE (FP0_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
&sparc_fpreg_packet[SPARC_R_FP0], 32 * SPARC_FPREG_SIZE);
- bcopy (&registers[REGISTER_BYTE (FPS_REGNUM)],
+ bcopy (&deprecated_registers[REGISTER_BYTE (FPS_REGNUM)],
&sparc_fpreg_packet[SPARC_R_FSR], 1 * SPARC_FPREG_SIZE);
net_write_registers (sparc_fpreg_packet, SPARC_FPREG_PLEN,
diff --git a/gdb/remote.c b/gdb/remote.c
index 1584d6b..d47dad7 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -3528,7 +3528,8 @@ remote_prepare_to_store (void)
/* NOTE: This isn't rs->sizeof_g_packet because here, we are
forcing the register cache to read its and not the target
registers. */
- read_register_bytes (0, (char *) NULL, REGISTER_BYTES); /* OK use. */
+ deprecated_read_register_bytes (0, (char *) NULL,
+ REGISTER_BYTES); /* OK use. */
break;
case PACKET_ENABLE:
break;
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 53b9dd3..26f5e4c 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -966,7 +966,7 @@ rs6000_pop_frame (void)
}
/* Make sure that all registers are valid. */
- read_register_bytes (0, NULL, REGISTER_BYTES);
+ deprecated_read_register_bytes (0, NULL, REGISTER_BYTES);
/* Figure out previous %pc value. If the function is frameless, it is
still in the link register, otherwise walk the frames and retrieve the
@@ -995,7 +995,8 @@ rs6000_pop_frame (void)
addr = prev_sp + fdata.gpr_offset;
for (ii = fdata.saved_gpr; ii <= 31; ++ii)
{
- read_memory (addr, &registers[REGISTER_BYTE (ii)], wordsize);
+ read_memory (addr, &deprecated_registers[REGISTER_BYTE (ii)],
+ wordsize);
addr += wordsize;
}
}
@@ -1005,7 +1006,7 @@ rs6000_pop_frame (void)
addr = prev_sp + fdata.fpr_offset;
for (ii = fdata.saved_fpr; ii <= 31; ++ii)
{
- read_memory (addr, &registers[REGISTER_BYTE (ii + FP0_REGNUM)], 8);
+ read_memory (addr, &deprecated_registers[REGISTER_BYTE (ii + FP0_REGNUM)], 8);
addr += 8;
}
}
@@ -1122,7 +1123,7 @@ rs6000_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
printf_unfiltered (
"Fatal Error: a floating point parameter #%d with a size > 8 is found!\n", argno);
- memcpy (&registers[REGISTER_BYTE (FP0_REGNUM + 1 + f_argno)],
+ memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM + 1 + f_argno)],
VALUE_CONTENTS (arg),
len);
++f_argno;
@@ -1134,8 +1135,9 @@ rs6000_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
/* Argument takes more than one register. */
while (argbytes < len)
{
- memset (&registers[REGISTER_BYTE (ii + 3)], 0, reg_size);
- memcpy (&registers[REGISTER_BYTE (ii + 3)],
+ memset (&deprecated_registers[REGISTER_BYTE (ii + 3)], 0,
+ reg_size);
+ memcpy (&deprecated_registers[REGISTER_BYTE (ii + 3)],
((char *) VALUE_CONTENTS (arg)) + argbytes,
(len - argbytes) > reg_size
? reg_size : len - argbytes);
@@ -1151,8 +1153,8 @@ rs6000_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
{
/* Argument can fit in one register. No problem. */
int adj = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? reg_size - len : 0;
- memset (&registers[REGISTER_BYTE (ii + 3)], 0, reg_size);
- memcpy ((char *)&registers[REGISTER_BYTE (ii + 3)] + adj,
+ memset (&deprecated_registers[REGISTER_BYTE (ii + 3)], 0, reg_size);
+ memcpy ((char *)&deprecated_registers[REGISTER_BYTE (ii + 3)] + adj,
VALUE_CONTENTS (arg), len);
}
++argno;
@@ -1234,7 +1236,7 @@ ran_out_of_registers_for_arguments:
printf_unfiltered (
"Fatal Error: a floating point parameter #%d with a size > 8 is found!\n", argno);
- memcpy (&registers[REGISTER_BYTE (FP0_REGNUM + 1 + f_argno)],
+ memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM + 1 + f_argno)],
VALUE_CONTENTS (arg),
len);
++f_argno;
@@ -2014,7 +2016,7 @@ e500_store_return_value (struct type *type, char *valbuf)
memcpy (reg_val_buf, valbuf + copied, reg_size);
copied += reg_size;
- write_register_gen (regnum, reg_val_buf);
+ deprecated_write_register_gen (regnum, reg_val_buf);
i++;
}
}
@@ -2030,19 +2032,19 @@ rs6000_store_return_value (struct type *type, char *valbuf)
Say a double_double_double type could be returned in
FPR1/FPR2/FPR3 triple. */
- write_register_bytes (REGISTER_BYTE (FP0_REGNUM + 1), valbuf,
- TYPE_LENGTH (type));
+ deprecated_write_register_bytes (REGISTER_BYTE (FP0_REGNUM + 1), valbuf,
+ TYPE_LENGTH (type));
else if (TYPE_CODE (type) == TYPE_CODE_ARRAY)
{
if (TYPE_LENGTH (type) == 16
&& TYPE_VECTOR (type))
- write_register_bytes (REGISTER_BYTE (tdep->ppc_vr0_regnum + 2),
- valbuf, TYPE_LENGTH (type));
+ deprecated_write_register_bytes (REGISTER_BYTE (tdep->ppc_vr0_regnum + 2),
+ valbuf, TYPE_LENGTH (type));
}
else
/* Everything else is returned in GPR3 and up. */
- write_register_bytes (REGISTER_BYTE (gdbarch_tdep (current_gdbarch)->ppc_gp0_regnum + 3),
- valbuf, TYPE_LENGTH (type));
+ deprecated_write_register_bytes (REGISTER_BYTE (gdbarch_tdep (current_gdbarch)->ppc_gp0_regnum + 3),
+ valbuf, TYPE_LENGTH (type));
}
/* Extract from an array REGBUF containing the (raw) register state
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index f19e4dd..94defe5 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -1150,8 +1150,8 @@ s390_store_return_value (struct type *valtype, char *valbuf)
{
if (TYPE_LENGTH (valtype) == 4
|| TYPE_LENGTH (valtype) == 8)
- write_register_bytes (REGISTER_BYTE (S390_FP0_REGNUM), valbuf,
- TYPE_LENGTH (valtype));
+ deprecated_write_register_bytes (REGISTER_BYTE (S390_FP0_REGNUM),
+ valbuf, TYPE_LENGTH (valtype));
else
error ("GDB is unable to return `long double' values "
"on this architecture.");
@@ -1161,8 +1161,8 @@ s390_store_return_value (struct type *valtype, char *valbuf)
value =
s390_promote_integer_argument (valtype, valbuf, reg_buff, &arglen);
/* Everything else is returned in GPR2 and up. */
- write_register_bytes (REGISTER_BYTE (S390_GP0_REGNUM + 2), value,
- arglen);
+ deprecated_write_register_bytes (REGISTER_BYTE (S390_GP0_REGNUM + 2),
+ value, arglen);
}
}
static int
@@ -1575,9 +1575,9 @@ s390_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
{
/* When we store a single-precision value in an FP register,
it occupies the leftmost bits. */
- write_register_bytes (REGISTER_BYTE (S390_FP0_REGNUM + fr),
- VALUE_CONTENTS (arg),
- TYPE_LENGTH (type));
+ deprecated_write_register_bytes (REGISTER_BYTE (S390_FP0_REGNUM + fr),
+ VALUE_CONTENTS (arg),
+ TYPE_LENGTH (type));
fr += 2;
}
else if (is_simple_arg (type)
@@ -1595,10 +1595,10 @@ s390_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
else if (is_double_arg (type)
&& gr <= 5)
{
- write_register_gen (S390_GP0_REGNUM + gr,
- VALUE_CONTENTS (arg));
- write_register_gen (S390_GP0_REGNUM + gr + 1,
- VALUE_CONTENTS (arg) + 4);
+ deprecated_write_register_gen (S390_GP0_REGNUM + gr,
+ VALUE_CONTENTS (arg));
+ deprecated_write_register_gen (S390_GP0_REGNUM + gr + 1,
+ VALUE_CONTENTS (arg) + 4);
gr += 2;
}
else
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index c5e5bf4..3d6c488 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -1874,7 +1874,7 @@ sh64_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
if (addrp)
*addrp = REGISTER_BYTE (live_regnum);
if (raw_buffer)
- read_register_gen (live_regnum, raw_buffer);
+ deprecated_read_register_gen (live_regnum, raw_buffer);
}
/* Extract from an array REGBUF containing the (raw) register state
@@ -2223,7 +2223,8 @@ sh64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
if (float_arg_index <= tdep->FLOAT_ARGLAST_REGNUM)
{
/* Goes in FR0...FR11 */
- write_register_gen (FP0_REGNUM + float_arg_index, val);
+ deprecated_write_register_gen (FP0_REGNUM + float_arg_index,
+ val);
fp_args[float_arg_index] = 1;
/* Skip the corresponding general argument register. */
int_argreg ++;
@@ -2266,7 +2267,7 @@ sh64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
call the gdbarch function to do register
writes, and that will properly know how to deal
with pseudoregs. */
- write_register_gen (regnum, val);
+ deprecated_write_register_gen (regnum, val);
fp_args[double_arg_index] = 1;
fp_args[double_arg_index + 1] = 1;
/* Skip the corresponding general argument register. */
@@ -2472,20 +2473,20 @@ sh_default_store_return_value (struct type *type, char *valbuf)
valbuf, TYPE_LENGTH (type));
else
memcpy (buf, valbuf, TYPE_LENGTH (type));
- write_register_bytes (REGISTER_BYTE (R0_REGNUM), buf,
- REGISTER_RAW_SIZE (R0_REGNUM));
+ deprecated_write_register_bytes (REGISTER_BYTE (R0_REGNUM), buf,
+ REGISTER_RAW_SIZE (R0_REGNUM));
}
else
- write_register_bytes (REGISTER_BYTE (R0_REGNUM), valbuf,
- TYPE_LENGTH (type));
+ deprecated_write_register_bytes (REGISTER_BYTE (R0_REGNUM), valbuf,
+ TYPE_LENGTH (type));
}
static void
sh3e_sh4_store_return_value (struct type *type, char *valbuf)
{
if (TYPE_CODE (type) == TYPE_CODE_FLT)
- write_register_bytes (REGISTER_BYTE (FP0_REGNUM),
- valbuf, TYPE_LENGTH (type));
+ deprecated_write_register_bytes (REGISTER_BYTE (FP0_REGNUM),
+ valbuf, TYPE_LENGTH (type));
else
sh_default_store_return_value (type, valbuf);
}
@@ -2501,7 +2502,7 @@ sh64_store_return_value (struct type *type, char *valbuf)
if (len == 4)
{
/* Return value stored in FP0_REGNUM */
- write_register_gen (FP0_REGNUM, valbuf);
+ deprecated_write_register_gen (FP0_REGNUM, valbuf);
}
if (len == 8)
{
@@ -2524,10 +2525,10 @@ sh64_store_return_value (struct type *type, char *valbuf)
offset = REGISTER_RAW_SIZE (return_register) - len;
memcpy (buf + offset, valbuf, len);
- write_register_gen (return_register, buf);
+ deprecated_write_register_gen (return_register, buf);
}
else
- write_register_gen (return_register, valbuf);
+ deprecated_write_register_gen (return_register, valbuf);
}
}
@@ -4289,10 +4290,10 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_pc_regnum (gdbarch, 16);
set_gdbarch_register_size (gdbarch, 4);
set_gdbarch_register_bytes (gdbarch, SH_DEFAULT_NUM_REGS * 4);
- set_gdbarch_do_registers_info (gdbarch, sh_do_registers_info);
+ set_gdbarch_deprecated_do_registers_info (gdbarch, sh_do_registers_info);
set_gdbarch_breakpoint_from_pc (gdbarch, sh_breakpoint_from_pc);
set_gdbarch_frame_chain (gdbarch, sh_frame_chain);
- set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
+ set_gdbarch_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
set_gdbarch_init_extra_frame_info (gdbarch, sh_init_extra_frame_info);
set_gdbarch_deprecated_extract_return_value (gdbarch, sh_extract_return_value);
set_gdbarch_push_arguments (gdbarch, sh_push_arguments);
@@ -4516,7 +4517,7 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_pseudo_register_read (gdbarch, sh64_pseudo_register_read);
set_gdbarch_pseudo_register_write (gdbarch, sh64_pseudo_register_write);
- set_gdbarch_do_registers_info (gdbarch, sh64_do_registers_info);
+ set_gdbarch_deprecated_do_registers_info (gdbarch, sh64_do_registers_info);
set_gdbarch_frame_init_saved_regs (gdbarch, sh64_nofp_frame_init_saved_regs);
set_gdbarch_breakpoint_from_pc (gdbarch, sh_sh64_breakpoint_from_pc);
set_gdbarch_init_extra_frame_info (gdbarch, sh64_init_extra_frame_info);
diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c
index 35cb578..13b9580 100644
--- a/gdb/sol-thread.c
+++ b/gdb/sol-thread.c
@@ -648,7 +648,8 @@ sol_thread_store_registers (int regno)
{ /* Not writing all the regs */
/* save new register value */
char* old_value = (char*) alloca (REGISTER_SIZE);
- memcpy (old_value, &registers[REGISTER_BYTE (regno)], REGISTER_SIZE);
+ memcpy (old_value, &deprecated_registers[REGISTER_BYTE (regno)],
+ REGISTER_SIZE);
val = p_td_thr_getgregs (&thandle, gregset);
if (val != TD_OK)
@@ -660,7 +661,8 @@ sol_thread_store_registers (int regno)
td_err_string (val));
/* restore new register value */
- memcpy (&registers[REGISTER_BYTE (regno)], old_value, REGISTER_SIZE);
+ memcpy (&deprecated_registers[REGISTER_BYTE (regno)], old_value,
+ REGISTER_SIZE);
#if 0
/* thread_db doesn't seem to handle this right */
@@ -1540,7 +1542,6 @@ init_sol_thread_ops (void)
sol_thread_ops.to_longname = "Solaris threads and pthread.";
sol_thread_ops.to_doc = "Solaris threads and pthread support.";
sol_thread_ops.to_open = sol_thread_open;
- sol_thread_ops.to_close = 0;
sol_thread_ops.to_attach = sol_thread_attach;
sol_thread_ops.to_detach = sol_thread_detach;
sol_thread_ops.to_resume = sol_thread_resume;
@@ -1559,8 +1560,6 @@ init_sol_thread_ops (void)
sol_thread_ops.to_terminal_save_ours = terminal_save_ours;
sol_thread_ops.to_terminal_info = child_terminal_info;
sol_thread_ops.to_kill = sol_thread_kill_inferior;
- sol_thread_ops.to_load = 0;
- sol_thread_ops.to_lookup_symbol = 0;
sol_thread_ops.to_create_inferior = sol_thread_create_inferior;
sol_thread_ops.to_mourn_inferior = sol_thread_mourn_inferior;
sol_thread_ops.to_can_run = sol_thread_can_run;
@@ -1576,8 +1575,6 @@ init_sol_thread_ops (void)
sol_thread_ops.to_has_registers = 1;
sol_thread_ops.to_has_execution = 1;
sol_thread_ops.to_has_thread_control = tc_none;
- sol_thread_ops.to_sections = 0;
- sol_thread_ops.to_sections_end = 0;
sol_thread_ops.to_find_memory_regions = sol_find_memory_regions;
sol_thread_ops.to_make_corefile_notes = sol_make_note_section;
sol_thread_ops.to_magic = OPS_MAGIC;
@@ -1594,30 +1591,16 @@ init_sol_core_ops (void)
sol_core_ops.to_close = sol_core_close;
sol_core_ops.to_attach = sol_thread_attach;
sol_core_ops.to_detach = sol_core_detach;
- /* sol_core_ops.to_resume = 0; */
- /* sol_core_ops.to_wait = 0; */
sol_core_ops.to_fetch_registers = sol_thread_fetch_registers;
- /* sol_core_ops.to_store_registers = 0; */
- /* sol_core_ops.to_prepare_to_store = 0; */
sol_core_ops.to_xfer_memory = sol_thread_xfer_memory;
sol_core_ops.to_files_info = sol_core_files_info;
sol_core_ops.to_insert_breakpoint = ignore;
sol_core_ops.to_remove_breakpoint = ignore;
- /* sol_core_ops.to_terminal_init = 0; */
- /* sol_core_ops.to_terminal_inferior = 0; */
- /* sol_core_ops.to_terminal_ours_for_output = 0; */
- /* sol_core_ops.to_terminal_ours = 0; */
- /* sol_core_ops.to_terminal_info = 0; */
- /* sol_core_ops.to_kill = 0; */
- /* sol_core_ops.to_load = 0; */
- /* sol_core_ops.to_lookup_symbol = 0; */
sol_core_ops.to_create_inferior = sol_thread_create_inferior;
sol_core_ops.to_stratum = core_stratum;
- sol_core_ops.to_has_all_memory = 0;
sol_core_ops.to_has_memory = 1;
sol_core_ops.to_has_stack = 1;
sol_core_ops.to_has_registers = 1;
- sol_core_ops.to_has_execution = 0;
sol_core_ops.to_has_thread_control = tc_none;
sol_core_ops.to_thread_alive = sol_thread_alive;
sol_core_ops.to_pid_to_str = solaris_pid_to_str;
@@ -1626,8 +1609,6 @@ init_sol_core_ops (void)
<n> in procinfo list" where <n> is the pid of the process that produced
the core file. Disable it for now. */
/* sol_core_ops.to_find_new_threads = sol_find_new_threads; */
- sol_core_ops.to_sections = 0;
- sol_core_ops.to_sections_end = 0;
sol_core_ops.to_magic = OPS_MAGIC;
}
diff --git a/gdb/sparc-nat.c b/gdb/sparc-nat.c
index e892fe8..b2c6d41 100644
--- a/gdb/sparc-nat.c
+++ b/gdb/sparc-nat.c
@@ -73,31 +73,34 @@ fetch_inferior_registers (int regno)
to the stack pointer. */
if (regno < O7_REGNUM /* including -1 */
|| regno >= Y_REGNUM
- || (!register_valid[SP_REGNUM] && regno < I7_REGNUM))
+ || (!deprecated_register_valid[SP_REGNUM] && regno < I7_REGNUM))
{
if (0 != ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid),
(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;
+ deprecated_registers[REGISTER_BYTE (0)] = 0;
+ memcpy (&deprecated_registers[REGISTER_BYTE (1)],
+ &inferior_registers.r_g1, 15 * REGISTER_RAW_SIZE (G0_REGNUM));
+ *(int *) &deprecated_registers[REGISTER_BYTE (PS_REGNUM)]
+ = inferior_registers.r_ps;
+ *(int *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)]
+ = 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;
for (i = G0_REGNUM; i <= O7_REGNUM; i++)
- register_valid[i] = 1;
- register_valid[Y_REGNUM] = 1;
- register_valid[PS_REGNUM] = 1;
- register_valid[PC_REGNUM] = 1;
- register_valid[NPC_REGNUM] = 1;
+ deprecated_register_valid[i] = 1;
+ deprecated_register_valid[Y_REGNUM] = 1;
+ deprecated_register_valid[PS_REGNUM] = 1;
+ deprecated_register_valid[PC_REGNUM] = 1;
+ deprecated_register_valid[NPC_REGNUM] = 1;
/* If we don't set these valid, read_register_bytes() rereads
all the regs every time it is called! FIXME. */
- register_valid[WIM_REGNUM] = 1; /* Not true yet, FIXME */
- register_valid[TBR_REGNUM] = 1; /* Not true yet, FIXME */
- register_valid[CPS_REGNUM] = 1; /* Not true yet, FIXME */
+ deprecated_register_valid[WIM_REGNUM] = 1; /* Not true yet, FIXME */
+ deprecated_register_valid[TBR_REGNUM] = 1; /* Not true yet, FIXME */
+ deprecated_register_valid[CPS_REGNUM] = 1; /* Not true yet, FIXME */
}
/* Floating point registers */
@@ -109,35 +112,34 @@ fetch_inferior_registers (int regno)
(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);
- memcpy (&registers[REGISTER_BYTE (FPS_REGNUM)],
- &inferior_fp_registers.Fpu_fsr,
- sizeof (FPU_FSR_TYPE));
+ memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
+ &inferior_fp_registers, sizeof inferior_fp_registers.fpu_fr);
+ memcpy (&deprecated_registers[REGISTER_BYTE (FPS_REGNUM)],
+ &inferior_fp_registers.Fpu_fsr, sizeof (FPU_FSR_TYPE));
for (i = FP0_REGNUM; i <= FP0_REGNUM + 31; i++)
- register_valid[i] = 1;
- register_valid[FPS_REGNUM] = 1;
+ deprecated_register_valid[i] = 1;
+ deprecated_register_valid[FPS_REGNUM] = 1;
}
/* These regs are saved on the stack by the kernel. Only read them
all (16 ptrace calls!) if we really need them. */
if (regno == -1)
{
- CORE_ADDR sp = *(unsigned int *) & registers[REGISTER_BYTE (SP_REGNUM)];
- target_read_memory (sp, &registers[REGISTER_BYTE (L0_REGNUM)],
+ CORE_ADDR sp = *(unsigned int *) & deprecated_registers[REGISTER_BYTE (SP_REGNUM)];
+ target_read_memory (sp, &deprecated_registers[REGISTER_BYTE (L0_REGNUM)],
16 * REGISTER_RAW_SIZE (L0_REGNUM));
for (i = L0_REGNUM; i <= I7_REGNUM; i++)
- register_valid[i] = 1;
+ deprecated_register_valid[i] = 1;
}
else if (regno >= L0_REGNUM && regno <= I7_REGNUM)
{
- CORE_ADDR sp = *(unsigned int *) & registers[REGISTER_BYTE (SP_REGNUM)];
+ CORE_ADDR sp = *(unsigned int *) & deprecated_registers[REGISTER_BYTE (SP_REGNUM)];
i = REGISTER_BYTE (regno);
- if (register_valid[regno])
+ if (deprecated_register_valid[regno])
printf_unfiltered ("register %d valid and read\n", regno);
target_read_memory (sp + i - REGISTER_BYTE (L0_REGNUM),
- &registers[i], REGISTER_RAW_SIZE (regno));
- register_valid[regno] = 1;
+ &deprecated_registers[i], REGISTER_RAW_SIZE (regno));
+ deprecated_register_valid[regno] = 1;
}
}
@@ -195,22 +197,22 @@ store_inferior_registers (int regno)
if (wanna_store & STACK_REGS)
{
- CORE_ADDR sp = *(unsigned int *) & registers[REGISTER_BYTE (SP_REGNUM)];
+ CORE_ADDR sp = *(unsigned int *) & deprecated_registers[REGISTER_BYTE (SP_REGNUM)];
if (regno < 0 || regno == SP_REGNUM)
{
- if (!register_valid[L0_REGNUM + 5])
+ if (!deprecated_register_valid[L0_REGNUM + 5])
internal_error (__FILE__, __LINE__, "failed internal consistency check");
target_write_memory (sp,
- &registers[REGISTER_BYTE (L0_REGNUM)],
+ &deprecated_registers[REGISTER_BYTE (L0_REGNUM)],
16 * REGISTER_RAW_SIZE (L0_REGNUM));
}
else
{
- if (!register_valid[regno])
+ if (!deprecated_register_valid[regno])
internal_error (__FILE__, __LINE__, "failed internal consistency check");
target_write_memory (sp + REGISTER_BYTE (regno) - REGISTER_BYTE (L0_REGNUM),
- &registers[REGISTER_BYTE (regno)],
+ &deprecated_registers[REGISTER_BYTE (regno)],
REGISTER_RAW_SIZE (regno));
}
@@ -218,20 +220,21 @@ store_inferior_registers (int regno)
if (wanna_store & INT_REGS)
{
- if (!register_valid[G1_REGNUM])
+ if (!deprecated_register_valid[G1_REGNUM])
internal_error (__FILE__, __LINE__, "failed internal consistency check");
- memcpy (&inferior_registers.r_g1, &registers[REGISTER_BYTE (G1_REGNUM)],
+ memcpy (&inferior_registers.r_g1,
+ &deprecated_registers[REGISTER_BYTE (G1_REGNUM)],
15 * REGISTER_RAW_SIZE (G1_REGNUM));
inferior_registers.r_ps =
- *(int *) &registers[REGISTER_BYTE (PS_REGNUM)];
+ *(int *) &deprecated_registers[REGISTER_BYTE (PS_REGNUM)];
inferior_registers.r_pc =
- *(int *) &registers[REGISTER_BYTE (PC_REGNUM)];
+ *(int *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)];
inferior_registers.r_npc =
- *(int *) &registers[REGISTER_BYTE (NPC_REGNUM)];
+ *(int *) &deprecated_registers[REGISTER_BYTE (NPC_REGNUM)];
inferior_registers.r_y =
- *(int *) &registers[REGISTER_BYTE (Y_REGNUM)];
+ *(int *) &deprecated_registers[REGISTER_BYTE (Y_REGNUM)];
if (0 != ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) & inferior_registers, 0))
@@ -240,12 +243,14 @@ store_inferior_registers (int regno)
if (wanna_store & FP_REGS)
{
- if (!register_valid[FP0_REGNUM + 9])
+ if (!deprecated_register_valid[FP0_REGNUM + 9])
internal_error (__FILE__, __LINE__, "failed internal consistency check");
- memcpy (&inferior_fp_registers, &registers[REGISTER_BYTE (FP0_REGNUM)],
+ memcpy (&inferior_fp_registers,
+ &deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
sizeof inferior_fp_registers.fpu_fr);
memcpy (&inferior_fp_registers.Fpu_fsr,
- &registers[REGISTER_BYTE (FPS_REGNUM)], sizeof (FPU_FSR_TYPE));
+ &deprecated_registers[REGISTER_BYTE (FPS_REGNUM)],
+ sizeof (FPU_FSR_TYPE));
if (0 !=
ptrace (PTRACE_SETFPREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) & inferior_fp_registers, 0))
@@ -277,15 +282,15 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
#define gregs ((struct regs *)core_reg_sect)
/* G0 *always* holds 0. */
- *(int *) &registers[REGISTER_BYTE (0)] = 0;
+ *(int *) &deprecated_registers[REGISTER_BYTE (0)] = 0;
/* The globals and output registers. */
- memcpy (&registers[REGISTER_BYTE (G1_REGNUM)], &gregs->r_g1,
+ memcpy (&deprecated_registers[REGISTER_BYTE (G1_REGNUM)], &gregs->r_g1,
15 * REGISTER_RAW_SIZE (G1_REGNUM));
- *(int *) &registers[REGISTER_BYTE (PS_REGNUM)] = gregs->r_ps;
- *(int *) &registers[REGISTER_BYTE (PC_REGNUM)] = gregs->r_pc;
- *(int *) &registers[REGISTER_BYTE (NPC_REGNUM)] = gregs->r_npc;
- *(int *) &registers[REGISTER_BYTE (Y_REGNUM)] = gregs->r_y;
+ *(int *) &deprecated_registers[REGISTER_BYTE (PS_REGNUM)] = gregs->r_ps;
+ *(int *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)] = gregs->r_pc;
+ *(int *) &deprecated_registers[REGISTER_BYTE (NPC_REGNUM)] = gregs->r_npc;
+ *(int *) &deprecated_registers[REGISTER_BYTE (Y_REGNUM)] = gregs->r_y;
/* My best guess at where to get the locals and input
registers is exactly where they usually are, right above
@@ -295,8 +300,9 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
{
int sp;
- sp = *(int *) &registers[REGISTER_BYTE (SP_REGNUM)];
- if (0 != target_read_memory (sp, &registers[REGISTER_BYTE (L0_REGNUM)],
+ sp = *(int *) &deprecated_registers[REGISTER_BYTE (SP_REGNUM)];
+ if (0 != target_read_memory (sp,
+ &deprecated_registers[REGISTER_BYTE (L0_REGNUM)],
16 * REGISTER_RAW_SIZE (L0_REGNUM)))
{
/* fprintf_unfiltered so user can still use gdb */
@@ -313,10 +319,10 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
#define fpuregs ((struct fpu *) core_reg_sect)
if (core_reg_size >= sizeof (struct fpu))
{
- memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], fpuregs->fpu_regs,
- sizeof (fpuregs->fpu_regs));
- memcpy (&registers[REGISTER_BYTE (FPS_REGNUM)], &fpuregs->fpu_fsr,
- sizeof (FPU_FSR_TYPE));
+ memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
+ fpuregs->fpu_regs, sizeof (fpuregs->fpu_regs));
+ memcpy (&deprecated_registers[REGISTER_BYTE (FPS_REGNUM)],
+ &fpuregs->fpu_fsr, sizeof (FPU_FSR_TYPE));
}
else
fprintf_unfiltered (gdb_stderr, "Couldn't read float regs from core file\n");
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index 033cc81..af43c9f 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -315,7 +315,7 @@ sparc_init_extra_frame_info (int fromleaf, struct frame_info *fi)
it later. */
if (fi->next->next != NULL
&& (fi->next->next->signal_handler_caller
- || frame_in_dummy (fi->next->next))
+ || deprecated_frame_in_dummy (fi->next->next))
&& frameless_look_for_prologue (fi->next))
{
/* A frameless function interrupted by a signal did not change
@@ -488,7 +488,7 @@ sparc_frame_saved_pc (struct frame_info *frame)
else if (frame->extra_info->in_prologue ||
(frame->next != NULL &&
(frame->next->signal_handler_caller ||
- frame_in_dummy (frame->next)) &&
+ deprecated_frame_in_dummy (frame->next)) &&
frameless_look_for_prologue (frame)))
{
/* A frameless function interrupted by a signal did not save
@@ -956,7 +956,7 @@ sparc_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
*lval = lval_register;
addr = REGISTER_BYTE (regnum);
if (raw_buffer != NULL)
- read_register_gen (regnum, raw_buffer);
+ deprecated_read_register_gen (regnum, raw_buffer);
}
if (addrp != NULL)
*addrp = addr;
@@ -990,32 +990,34 @@ sparc_push_dummy_frame (void)
if (GDB_TARGET_IS_SPARC64)
{
/* PC, NPC, CCR, FSR, FPRS, Y, ASI */
- read_register_bytes (REGISTER_BYTE (PC_REGNUM), &register_temp[0],
- REGISTER_RAW_SIZE (PC_REGNUM) * 7);
- read_register_bytes (REGISTER_BYTE (PSTATE_REGNUM),
- &register_temp[7 * SPARC_INTREG_SIZE],
- REGISTER_RAW_SIZE (PSTATE_REGNUM));
+ deprecated_read_register_bytes (REGISTER_BYTE (PC_REGNUM),
+ &register_temp[0],
+ REGISTER_RAW_SIZE (PC_REGNUM) * 7);
+ deprecated_read_register_bytes (REGISTER_BYTE (PSTATE_REGNUM),
+ &register_temp[7 * SPARC_INTREG_SIZE],
+ REGISTER_RAW_SIZE (PSTATE_REGNUM));
/* FIXME: not sure what needs to be saved here. */
}
else
{
/* Y, PS, WIM, TBR, PC, NPC, FPS, CPS regs */
- read_register_bytes (REGISTER_BYTE (Y_REGNUM), &register_temp[0],
- REGISTER_RAW_SIZE (Y_REGNUM) * 8);
+ deprecated_read_register_bytes (REGISTER_BYTE (Y_REGNUM),
+ &register_temp[0],
+ REGISTER_RAW_SIZE (Y_REGNUM) * 8);
}
- read_register_bytes (REGISTER_BYTE (O0_REGNUM),
- &register_temp[8 * SPARC_INTREG_SIZE],
- SPARC_INTREG_SIZE * 8);
+ deprecated_read_register_bytes (REGISTER_BYTE (O0_REGNUM),
+ &register_temp[8 * SPARC_INTREG_SIZE],
+ SPARC_INTREG_SIZE * 8);
- read_register_bytes (REGISTER_BYTE (G0_REGNUM),
- &register_temp[16 * SPARC_INTREG_SIZE],
- SPARC_INTREG_SIZE * 8);
+ deprecated_read_register_bytes (REGISTER_BYTE (G0_REGNUM),
+ &register_temp[16 * SPARC_INTREG_SIZE],
+ SPARC_INTREG_SIZE * 8);
if (SPARC_HAS_FPU)
- read_register_bytes (REGISTER_BYTE (FP0_REGNUM),
- &register_temp[24 * SPARC_INTREG_SIZE],
- FP_REGISTER_BYTES);
+ deprecated_read_register_bytes (REGISTER_BYTE (FP0_REGNUM),
+ &register_temp[24 * SPARC_INTREG_SIZE],
+ FP_REGISTER_BYTES);
sp -= DUMMY_STACK_SIZE;
@@ -1237,28 +1239,28 @@ sparc_pop_frame (void)
if (fsr[FP0_REGNUM])
{
read_memory (fsr[FP0_REGNUM], raw_buffer, FP_REGISTER_BYTES);
- write_register_bytes (REGISTER_BYTE (FP0_REGNUM),
- raw_buffer, FP_REGISTER_BYTES);
+ deprecated_write_register_bytes (REGISTER_BYTE (FP0_REGNUM),
+ raw_buffer, FP_REGISTER_BYTES);
}
if (!(GDB_TARGET_IS_SPARC64))
{
if (fsr[FPS_REGNUM])
{
read_memory (fsr[FPS_REGNUM], raw_buffer, SPARC_INTREG_SIZE);
- write_register_gen (FPS_REGNUM, raw_buffer);
+ deprecated_write_register_gen (FPS_REGNUM, raw_buffer);
}
if (fsr[CPS_REGNUM])
{
read_memory (fsr[CPS_REGNUM], raw_buffer, SPARC_INTREG_SIZE);
- write_register_gen (CPS_REGNUM, raw_buffer);
+ deprecated_write_register_gen (CPS_REGNUM, raw_buffer);
}
}
}
if (fsr[G1_REGNUM])
{
read_memory (fsr[G1_REGNUM], raw_buffer, 7 * SPARC_INTREG_SIZE);
- write_register_bytes (REGISTER_BYTE (G1_REGNUM), raw_buffer,
- 7 * SPARC_INTREG_SIZE);
+ deprecated_write_register_bytes (REGISTER_BYTE (G1_REGNUM), raw_buffer,
+ 7 * SPARC_INTREG_SIZE);
}
if (frame->extra_info->flat)
@@ -1310,11 +1312,11 @@ sparc_pop_frame (void)
/* Restore the out registers.
Among other things this writes the new stack pointer. */
- write_register_bytes (REGISTER_BYTE (O0_REGNUM), raw_buffer,
- SPARC_INTREG_SIZE * 8);
+ deprecated_write_register_bytes (REGISTER_BYTE (O0_REGNUM), raw_buffer,
+ SPARC_INTREG_SIZE * 8);
- write_register_bytes (REGISTER_BYTE (L0_REGNUM), reg_temp,
- SPARC_INTREG_SIZE * 16);
+ deprecated_write_register_bytes (REGISTER_BYTE (L0_REGNUM), reg_temp,
+ SPARC_INTREG_SIZE * 16);
}
if (!(GDB_TARGET_IS_SPARC64))
@@ -1609,37 +1611,37 @@ fill_gregset (gdb_gregset_t *gregsetp, int regno)
for (regi = 0; regi <= R_I7; regi++)
if ((regno == -1) || (regno == regi))
- read_register_gen (regi, (char *) (regp + regi) + offset);
+ deprecated_read_register_gen (regi, (char *) (regp + regi) + offset);
if ((regno == -1) || (regno == PC_REGNUM))
- read_register_gen (PC_REGNUM, (char *) (regp + R_PC) + offset);
+ deprecated_read_register_gen (PC_REGNUM, (char *) (regp + R_PC) + offset);
if ((regno == -1) || (regno == NPC_REGNUM))
- read_register_gen (NPC_REGNUM, (char *) (regp + R_nPC) + offset);
+ deprecated_read_register_gen (NPC_REGNUM, (char *) (regp + R_nPC) + offset);
if ((regno == -1) || (regno == Y_REGNUM))
- read_register_gen (Y_REGNUM, (char *) (regp + R_Y) + offset);
+ deprecated_read_register_gen (Y_REGNUM, (char *) (regp + R_Y) + offset);
if (GDB_TARGET_IS_SPARC64)
{
#ifdef R_CCR
if (regno == -1 || regno == CCR_REGNUM)
- read_register_gen (CCR_REGNUM, ((char *) (regp + R_CCR)) + offset);
+ deprecated_read_register_gen (CCR_REGNUM, ((char *) (regp + R_CCR)) + offset);
#endif
#ifdef R_FPRS
if (regno == -1 || regno == FPRS_REGNUM)
- read_register_gen (FPRS_REGNUM, ((char *) (regp + R_FPRS)) + offset);
+ deprecated_read_register_gen (FPRS_REGNUM, ((char *) (regp + R_FPRS)) + offset);
#endif
#ifdef R_ASI
if (regno == -1 || regno == ASI_REGNUM)
- read_register_gen (ASI_REGNUM, ((char *) (regp + R_ASI)) + offset);
+ deprecated_read_register_gen (ASI_REGNUM, ((char *) (regp + R_ASI)) + offset);
#endif
}
else /* sparc32 */
{
#ifdef R_PS
if (regno == -1 || regno == PS_REGNUM)
- read_register_gen (PS_REGNUM, ((char *) (regp + R_PS)) + offset);
+ deprecated_read_register_gen (PS_REGNUM, ((char *) (regp + R_PS)) + offset);
#endif
/* For 64-bit hosts, R_WIM and R_TBR may not be defined.
@@ -1655,18 +1657,18 @@ fill_gregset (gdb_gregset_t *gregsetp, int regno)
#if defined (R_WIM)
if (regno == -1 || regno == WIM_REGNUM)
- read_register_gen (WIM_REGNUM, ((char *) (regp + R_WIM)) + offset);
+ deprecated_read_register_gen (WIM_REGNUM, ((char *) (regp + R_WIM)) + offset);
#else
if (regno == -1 || regno == WIM_REGNUM)
- read_register_gen (WIM_REGNUM, NULL);
+ deprecated_read_register_gen (WIM_REGNUM, NULL);
#endif
#if defined (R_TBR)
if (regno == -1 || regno == TBR_REGNUM)
- read_register_gen (TBR_REGNUM, ((char *) (regp + R_TBR)) + offset);
+ deprecated_read_register_gen (TBR_REGNUM, ((char *) (regp + R_TBR)) + offset);
#else
if (regno == -1 || regno == TBR_REGNUM)
- read_register_gen (TBR_REGNUM, NULL);
+ deprecated_read_register_gen (TBR_REGNUM, NULL);
#endif
}
}
@@ -1727,7 +1729,7 @@ fill_fpregset (gdb_fpregset_t *fpregsetp, int regno)
{
if ((regno == -1) || (regno == regi))
{
- from = (char *) &registers[REGISTER_BYTE (regi)];
+ from = (char *) &deprecated_registers[REGISTER_BYTE (regi)];
to = (char *) &fpregsetp->pr_fr.pr_regs[regi - FP0_REGNUM];
memcpy (to, from, REGISTER_RAW_SIZE (regi));
}
@@ -1736,7 +1738,7 @@ fill_fpregset (gdb_fpregset_t *fpregsetp, int regno)
if (!(GDB_TARGET_IS_SPARC64)) /* FIXME: does Sparc64 have this register? */
if ((regno == -1) || (regno == FPS_REGNUM))
{
- from = (char *)&registers[REGISTER_BYTE (FPS_REGNUM)];
+ from = (char *)&deprecated_registers[REGISTER_BYTE (FPS_REGNUM)];
to = (char *) &fpregsetp->pr_fsr;
memcpy (to, from, REGISTER_RAW_SIZE (FPS_REGNUM));
}
@@ -1858,7 +1860,7 @@ decode_asi (int val)
Pretty print various registers. */
/* FIXME: Would be nice if this did some fancy things for 32 bit sparc. */
-void
+static void
sparc_print_register_hook (int regno)
{
ULONGEST val;
@@ -2028,6 +2030,146 @@ sparc_print_register_hook (int regno)
#undef BITS
}
+
+static void
+sparc_print_registers (struct gdbarch *gdbarch,
+ struct ui_file *file,
+ struct frame_info *frame,
+ int regnum, int print_all,
+ void (*print_register_hook) (int))
+{
+ int i;
+ const int numregs = NUM_REGS + NUM_PSEUDO_REGS;
+ char *raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
+ char *virtual_buffer = alloca (MAX_REGISTER_VIRTUAL_SIZE);
+
+ for (i = 0; i < numregs; i++)
+ {
+ /* Decide between printing all regs, non-float / vector regs, or
+ specific reg. */
+ if (regnum == -1)
+ {
+ if (!print_all)
+ {
+ if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
+ continue;
+ if (TYPE_VECTOR (REGISTER_VIRTUAL_TYPE (i)))
+ continue;
+ }
+ }
+ else
+ {
+ if (i != regnum)
+ continue;
+ }
+
+ /* If the register name is empty, it is undefined for this
+ processor, so don't display anything. */
+ if (REGISTER_NAME (i) == NULL || *(REGISTER_NAME (i)) == '\0')
+ continue;
+
+ fputs_filtered (REGISTER_NAME (i), file);
+ print_spaces_filtered (15 - strlen (REGISTER_NAME (i)), file);
+
+ /* Get the data in raw format. */
+ if (! frame_register_read (frame, i, raw_buffer))
+ {
+ fprintf_filtered (file, "*value not available*\n");
+ continue;
+ }
+
+ /* FIXME: cagney/2002-08-03: This code shouldn't be necessary.
+ The function frame_register_read() should have returned the
+ pre-cooked register so no conversion is necessary. */
+ /* Convert raw data to virtual format if necessary. */
+ if (REGISTER_CONVERTIBLE (i))
+ {
+ REGISTER_CONVERT_TO_VIRTUAL (i, REGISTER_VIRTUAL_TYPE (i),
+ raw_buffer, virtual_buffer);
+ }
+ else
+ {
+ memcpy (virtual_buffer, raw_buffer,
+ REGISTER_VIRTUAL_SIZE (i));
+ }
+
+ /* If virtual format is floating, print it that way, and in raw
+ hex. */
+ if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
+ {
+ int j;
+
+ val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
+ file, 0, 1, 0, Val_pretty_default);
+
+ fprintf_filtered (file, "\t(raw 0x");
+ for (j = 0; j < REGISTER_RAW_SIZE (i); j++)
+ {
+ int idx;
+ if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+ idx = j;
+ else
+ idx = REGISTER_RAW_SIZE (i) - 1 - j;
+ fprintf_filtered (file, "%02x", (unsigned char) raw_buffer[idx]);
+ }
+ fprintf_filtered (file, ")");
+ }
+ else
+ {
+ /* Print the register in hex. */
+ val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
+ file, 'x', 1, 0, Val_pretty_default);
+ /* If not a vector register, print it also according to its
+ natural format. */
+ if (TYPE_VECTOR (REGISTER_VIRTUAL_TYPE (i)) == 0)
+ {
+ fprintf_filtered (file, "\t");
+ val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
+ file, 0, 1, 0, Val_pretty_default);
+ }
+ }
+
+ /* Some sparc specific info. */
+ if (print_register_hook != NULL)
+ print_register_hook (i);
+
+ fprintf_filtered (file, "\n");
+ }
+}
+
+static void
+sparc_print_registers_info (struct gdbarch *gdbarch,
+ struct ui_file *file,
+ struct frame_info *frame,
+ int regnum, int print_all)
+{
+ sparc_print_registers (gdbarch, file, frame, regnum, print_all,
+ sparc_print_register_hook);
+}
+
+void
+sparc_do_registers_info (int regnum, int all)
+{
+ sparc_print_registers_info (current_gdbarch, gdb_stdout, selected_frame,
+ regnum, all);
+}
+
+static void
+sparclet_print_registers_info (struct gdbarch *gdbarch,
+ struct ui_file *file,
+ struct frame_info *frame,
+ int regnum, int print_all)
+{
+ sparc_print_registers (gdbarch, file, frame, regnum, print_all, NULL);
+}
+
+void
+sparclet_do_registers_info (int regnum, int all)
+{
+ sparclet_print_registers_info (current_gdbarch, gdb_stdout, selected_frame,
+ regnum, all);
+}
+
int
gdb_print_insn_sparc (bfd_vma memaddr, disassemble_info *info)
@@ -2099,7 +2241,7 @@ sparc32_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
for (j = 0;
j < m_arg->len && oregnum < 6;
j += SPARC_INTREG_SIZE, oregnum++)
- write_register_gen (O0_REGNUM + oregnum, m_arg->contents + j);
+ deprecated_write_register_gen (O0_REGNUM + oregnum, m_arg->contents + j);
}
return sp;
@@ -2155,18 +2297,19 @@ sparc_store_return_value (struct type *type, char *valbuf)
memset (buffer, 0, REGISTER_RAW_SIZE (regno));
memcpy (buffer + REGISTER_RAW_SIZE (regno) - TYPE_LENGTH (type), valbuf,
TYPE_LENGTH (type));
- write_register_gen (regno, buffer);
+ deprecated_write_register_gen (regno, buffer);
}
else
- write_register_bytes (REGISTER_BYTE (regno), valbuf, TYPE_LENGTH (type));
+ deprecated_write_register_bytes (REGISTER_BYTE (regno), valbuf,
+ TYPE_LENGTH (type));
}
extern void
sparclet_store_return_value (struct type *type, char *valbuf)
{
/* Other values are returned in register %o0. */
- write_register_bytes (REGISTER_BYTE (O0_REGNUM), valbuf,
- TYPE_LENGTH (type));
+ deprecated_write_register_bytes (REGISTER_BYTE (O0_REGNUM), valbuf,
+ TYPE_LENGTH (type));
}
@@ -2427,9 +2570,9 @@ sparc64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
default:
internal_error (__FILE__, __LINE__, "bad switch");
}
- write_register_bytes (REGISTER_BYTE (fpreg),
- VALUE_CONTENTS (args[i]),
- len);
+ deprecated_write_register_bytes (REGISTER_BYTE (fpreg),
+ VALUE_CONTENTS (args[i]),
+ len);
}
}
else /* all other args go into the first six 'o' registers */
@@ -2440,7 +2583,7 @@ sparc64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
{
int oreg = O0_REGNUM + register_counter;
- write_register_gen (oreg, VALUE_CONTENTS (copyarg) + j);
+ deprecated_write_register_gen (oreg, VALUE_CONTENTS (copyarg) + j);
register_counter += 1;
}
}
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index f96eef7..fcd6046 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -202,46 +202,46 @@ static const char vb_name[] = "_vb$";
#define BELIEVE_PCC_PROMOTION_TYPE 0
#endif
-static struct complaint invalid_cpp_abbrev_complaint =
+static struct deprecated_complaint invalid_cpp_abbrev_complaint =
{"invalid C++ abbreviation `%s'", 0, 0};
-static struct complaint invalid_cpp_type_complaint =
+static struct deprecated_complaint invalid_cpp_type_complaint =
{"C++ abbreviated type name unknown at symtab pos %d", 0, 0};
-static struct complaint member_fn_complaint =
+static struct deprecated_complaint member_fn_complaint =
{"member function type missing, got '%c'", 0, 0};
-static struct complaint const_vol_complaint =
+static struct deprecated_complaint const_vol_complaint =
{"const/volatile indicator missing, got '%c'", 0, 0};
-static struct complaint error_type_complaint =
+static struct deprecated_complaint error_type_complaint =
{"couldn't parse type; debugger out of date?", 0, 0};
-static struct complaint invalid_member_complaint =
+static struct deprecated_complaint invalid_member_complaint =
{"invalid (minimal) member type data format at symtab pos %d.", 0, 0};
-static struct complaint range_type_base_complaint =
+static struct deprecated_complaint range_type_base_complaint =
{"base type %d of range type is not defined", 0, 0};
-static struct complaint reg_value_complaint =
+static struct deprecated_complaint reg_value_complaint =
{"register number %d too large (max %d) in symbol %s", 0, 0};
-static struct complaint vtbl_notfound_complaint =
+static struct deprecated_complaint vtbl_notfound_complaint =
{"virtual function table pointer not found when defining class `%s'", 0, 0};
-static struct complaint unrecognized_cplus_name_complaint =
+static struct deprecated_complaint unrecognized_cplus_name_complaint =
{"Unknown C++ symbol name `%s'", 0, 0};
-static struct complaint rs6000_builtin_complaint =
+static struct deprecated_complaint rs6000_builtin_complaint =
{"Unknown builtin type %d", 0, 0};
-static struct complaint unresolved_sym_chain_complaint =
+static struct deprecated_complaint unresolved_sym_chain_complaint =
{"%s: common block `%s' from global_sym_chain unresolved", 0, 0};
-static struct complaint stabs_general_complaint =
+static struct deprecated_complaint stabs_general_complaint =
{"%s", 0, 0};
-static struct complaint lrs_general_complaint =
+static struct deprecated_complaint lrs_general_complaint =
{"%s", 0, 0};
/* Make a list of forward references which haven't been defined. */
@@ -311,7 +311,7 @@ dbx_lookup_type (int typenums[2])
if (filenum < 0 || filenum >= n_this_object_header_files)
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"\
Invalid symbol data: type number (%d,%d) out of range at symtab pos %d.",
0, 0};
@@ -618,11 +618,11 @@ static int
read_cfront_baseclasses (struct field_info *fip, char **pp, struct type *type,
struct objfile *objfile)
{
- static struct complaint msg_unknown =
+ static struct deprecated_complaint msg_unknown =
{"\
Unsupported token in stabs string %s.\n",
0, 0};
- static struct complaint msg_notfound =
+ static struct deprecated_complaint msg_notfound =
{"\
Unable to find base type for %s.\n",
0, 0};
@@ -692,7 +692,7 @@ read_cfront_baseclasses (struct field_info *fip, char **pp, struct type *type,
/* Bad visibility format. Complain and treat it as
public. */
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{
"Unknown visibility `%c' for baseclass", 0, 0};
complain (&msg, new->visibility);
@@ -810,7 +810,7 @@ read_cfront_member_functions (struct field_info *fip, char **pp,
ref_func = lookup_symbol (fname, 0, VAR_NAMESPACE, 0, 0); /* demangled name */
if (!ref_func)
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"\
Unable to find function symbol for %s\n",
0, 0};
@@ -2435,7 +2435,7 @@ again:
{
/* Complain and keep going, so compilers can invent new
cross-reference types. */
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"Unrecognized cross-reference type `%c'", 0, 0};
complain (&msg, (*pp)[0]);
code = TYPE_CODE_STRUCT;
@@ -2660,7 +2660,7 @@ again:
++*pp;
else
{
- static struct complaint msg = {
+ static struct deprecated_complaint msg = {
"Prototyped function type didn't end arguments with `#':\n%s",
0, 0
};
@@ -4018,7 +4018,7 @@ read_baseclasses (struct field_info *fip, char **pp, struct type *type,
default:
/* Unknown character. Complain and treat it as non-virtual. */
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{
"Unknown virtual character `%c' for baseclass", 0, 0};
complain (&msg, **pp);
@@ -4037,7 +4037,7 @@ read_baseclasses (struct field_info *fip, char **pp, struct type *type,
/* Bad visibility format. Complain and treat it as
public. */
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{
"Unknown visibility `%c' for baseclass", 0, 0
};
@@ -4210,7 +4210,7 @@ read_cfront_static_fields (struct field_info *fip, char **pp, struct type *type,
ref_static = lookup_symbol (sname, 0, VAR_NAMESPACE, 0, 0); /*demangled_name */
if (!ref_static)
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"\
Unable to find symbol for static data field %s\n",
0, 0};
@@ -4389,7 +4389,7 @@ attach_fields_to_type (struct field_info *fip, register struct type *type,
default:
/* Unknown visibility. Complain and treat it as public. */
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{
"Unknown visibility `%c' for field", 0, 0};
complain (&msg, fip->list->visibility);
@@ -4402,7 +4402,7 @@ attach_fields_to_type (struct field_info *fip, register struct type *type,
}
-static struct complaint multiply_defined_struct =
+static struct deprecated_complaint multiply_defined_struct =
{"struct/union type gets multiply defined: %s%s", 0, 0};
@@ -5214,7 +5214,7 @@ common_block_start (char *name, struct objfile *objfile)
{
if (common_block_name != NULL)
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{
"Invalid symbol data: common block within common block",
0, 0};
@@ -5244,7 +5244,7 @@ common_block_end (struct objfile *objfile)
if (common_block_name == NULL)
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"ECOMM symbol unmatched by BCOMM", 0, 0};
complain (&msg);
return;
@@ -5359,7 +5359,7 @@ cleanup_undefined_types (void)
if (typename == NULL)
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"need a type name", 0, 0};
complain (&msg);
break;
@@ -5384,7 +5384,7 @@ cleanup_undefined_types (void)
default:
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"\
GDB internal error. cleanup_undefined_types with bad type %d.", 0, 0};
complain (&msg, TYPE_CODE (*type));
diff --git a/gdb/stabsread.h b/gdb/stabsread.h
index d470d47..1371f6c 100644
--- a/gdb/stabsread.h
+++ b/gdb/stabsread.h
@@ -128,8 +128,8 @@ EXTERN int n_this_object_header_files;
EXTERN int n_allocated_this_object_header_files;
-extern struct complaint unknown_symtype_complaint;
-extern struct complaint unknown_symchar_complaint;
+extern struct deprecated_complaint unknown_symtype_complaint;
+extern struct deprecated_complaint unknown_symchar_complaint;
extern struct type *read_type (char **, struct objfile *);
diff --git a/gdb/stack.c b/gdb/stack.c
index 3ed82e6..74e1711 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -352,7 +352,7 @@ print_frame_info_base (struct frame_info *fi, int level, int source, int args)
to check for a bp_call_dummy breakpoint. */
if (PC_IN_CALL_DUMMY (fi->pc, sp, fi->frame))
#else
- if (frame_in_dummy (fi))
+ if (deprecated_frame_in_dummy (fi))
#endif
{
annotate_frame_begin (level == -1 ? 0 : level, fi->pc);
@@ -396,7 +396,7 @@ print_frame_info_base (struct frame_info *fi, int level, int source, int args)
find_pc_line (fi->pc,
fi->next != NULL
&& !fi->next->signal_handler_caller
- && !frame_in_dummy (fi->next));
+ && !deprecated_frame_in_dummy (fi->next));
location_print = (source == LOCATION
|| source == LOC_AND_ADDRESS
@@ -796,7 +796,7 @@ frame_info (char *addr_exp, int from_tty)
sal = find_pc_line (fi->pc,
fi->next != NULL
&& !fi->next->signal_handler_caller
- && !frame_in_dummy (fi->next));
+ && !deprecated_frame_in_dummy (fi->next));
func = get_frame_function (fi);
s = find_pc_symtab (fi->pc);
if (func)
diff --git a/gdb/sun3-nat.c b/gdb/sun3-nat.c
index 988ed37..1df7858 100644
--- a/gdb/sun3-nat.c
+++ b/gdb/sun3-nat.c
@@ -36,7 +36,7 @@ fetch_inferior_registers (int regno)
struct regs inferior_registers;
struct fp_status inferior_fp_registers;
- registers_fetched ();
+ deprecated_registers_fetched ();
ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) & inferior_registers);
@@ -45,15 +45,15 @@ fetch_inferior_registers (int regno)
ptrace (PTRACE_GETFPREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) & inferior_fp_registers);
- memcpy (registers, &inferior_registers, 16 * 4);
+ memcpy (deprecated_registers, &inferior_registers, 16 * 4);
if (FP0_REGNUM >= 0)
- memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)], &inferior_fp_registers,
- sizeof inferior_fp_registers.fps_regs);
+ memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
+ &inferior_fp_registers, sizeof inferior_fp_registers.fps_regs);
- *(int *) &registers[REGISTER_BYTE (PS_REGNUM)] = inferior_registers.r_ps;
- *(int *) &registers[REGISTER_BYTE (PC_REGNUM)] = inferior_registers.r_pc;
+ *(int *) &deprecated_registers[REGISTER_BYTE (PS_REGNUM)] = inferior_registers.r_ps;
+ *(int *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)] = inferior_registers.r_pc;
if (FP0_REGNUM >= 0)
- memcpy (&registers[REGISTER_BYTE (FPC_REGNUM)],
+ memcpy (&deprecated_registers[REGISTER_BYTE (FPC_REGNUM)],
&inferior_fp_registers.fps_control,
sizeof inferior_fp_registers -
sizeof inferior_fp_registers.fps_regs);
@@ -69,17 +69,18 @@ store_inferior_registers (int regno)
struct regs inferior_registers;
struct fp_status inferior_fp_registers;
- memcpy (&inferior_registers, registers, 16 * 4);
+ memcpy (&inferior_registers, deprecated_registers, 16 * 4);
if (FP0_REGNUM >= 0)
- memcpy (&inferior_fp_registers, &registers[REGISTER_BYTE (FP0_REGNUM)],
+ memcpy (&inferior_fp_registers,
+ &deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
sizeof inferior_fp_registers.fps_regs);
- inferior_registers.r_ps = *(int *) &registers[REGISTER_BYTE (PS_REGNUM)];
- inferior_registers.r_pc = *(int *) &registers[REGISTER_BYTE (PC_REGNUM)];
+ inferior_registers.r_ps = *(int *) &&deprecated_registers[REGISTER_BYTE (PS_REGNUM)];
+ inferior_registers.r_pc = *(int *) &&deprecated_registers[REGISTER_BYTE (PC_REGNUM)];
if (FP0_REGNUM >= 0)
memcpy (&inferior_fp_registers.fps_control,
- &registers[REGISTER_BYTE (FPC_REGNUM)],
+ &&deprecated_registers[REGISTER_BYTE (FPC_REGNUM)],
sizeof inferior_fp_registers -
sizeof inferior_fp_registers.fps_regs);
@@ -116,7 +117,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
if (core_reg_size < sizeof (struct regs))
error ("Can't find registers in core file");
- memcpy (registers, (char *) regs, 16 * 4);
+ memcpy (&deprecated_registers, (char *) regs, 16 * 4);
supply_register (PS_REGNUM, (char *) &regs->r_ps);
supply_register (PC_REGNUM, (char *) &regs->r_pc);
@@ -130,10 +131,10 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
{
if (FP0_REGNUM >= 0)
{
- memcpy (&registers[REGISTER_BYTE (FP0_REGNUM)],
+ memcpy (&&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
fpustruct->f_fpstatus.fps_regs,
sizeof fpustruct->f_fpstatus.fps_regs);
- memcpy (&registers[REGISTER_BYTE (FPC_REGNUM)],
+ memcpy (&&deprecated_registers[REGISTER_BYTE (FPC_REGNUM)],
&fpustruct->f_fpstatus.fps_control,
sizeof fpustruct->f_fpstatus -
sizeof fpustruct->f_fpstatus.fps_regs);
diff --git a/gdb/symm-nat.c b/gdb/symm-nat.c
index d686777..fb52754 100644
--- a/gdb/symm-nat.c
+++ b/gdb/symm-nat.c
@@ -68,29 +68,29 @@ store_inferior_registers (int regno)
to the registers array to solve this properly. */
mptrace (XPT_RREGS, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) & regs, 0);
- regs.pr_eax = *(int *) &registers[REGISTER_BYTE (0)];
- regs.pr_ebx = *(int *) &registers[REGISTER_BYTE (5)];
- regs.pr_ecx = *(int *) &registers[REGISTER_BYTE (2)];
- regs.pr_edx = *(int *) &registers[REGISTER_BYTE (1)];
- regs.pr_esi = *(int *) &registers[REGISTER_BYTE (6)];
- regs.pr_edi = *(int *) &registers[REGISTER_BYTE (7)];
- regs.pr_esp = *(int *) &registers[REGISTER_BYTE (14)];
- regs.pr_ebp = *(int *) &registers[REGISTER_BYTE (15)];
- regs.pr_eip = *(int *) &registers[REGISTER_BYTE (16)];
- regs.pr_flags = *(int *) &registers[REGISTER_BYTE (17)];
+ regs.pr_eax = *(int *) &deprecated_registers[REGISTER_BYTE (0)];
+ regs.pr_ebx = *(int *) &deprecated_registers[REGISTER_BYTE (5)];
+ regs.pr_ecx = *(int *) &deprecated_registers[REGISTER_BYTE (2)];
+ regs.pr_edx = *(int *) &deprecated_registers[REGISTER_BYTE (1)];
+ regs.pr_esi = *(int *) &deprecated_registers[REGISTER_BYTE (6)];
+ regs.pr_edi = *(int *) &deprecated_registers[REGISTER_BYTE (7)];
+ regs.pr_esp = *(int *) &deprecated_registers[REGISTER_BYTE (14)];
+ regs.pr_ebp = *(int *) &deprecated_registers[REGISTER_BYTE (15)];
+ regs.pr_eip = *(int *) &deprecated_registers[REGISTER_BYTE (16)];
+ regs.pr_flags = *(int *) &deprecated_registers[REGISTER_BYTE (17)];
for (i = 0; i < 31; i++)
{
regs.pr_fpa.fpa_regs[i] =
- *(int *) &registers[REGISTER_BYTE (FP1_REGNUM + i)];
+ *(int *) &deprecated_registers[REGISTER_BYTE (FP1_REGNUM + i)];
}
- memcpy (regs.pr_fpu.fpu_stack[0], &registers[REGISTER_BYTE (ST0_REGNUM)], 10);
- memcpy (regs.pr_fpu.fpu_stack[1], &registers[REGISTER_BYTE (ST1_REGNUM)], 10);
- memcpy (regs.pr_fpu.fpu_stack[2], &registers[REGISTER_BYTE (ST2_REGNUM)], 10);
- memcpy (regs.pr_fpu.fpu_stack[3], &registers[REGISTER_BYTE (ST3_REGNUM)], 10);
- memcpy (regs.pr_fpu.fpu_stack[4], &registers[REGISTER_BYTE (ST4_REGNUM)], 10);
- memcpy (regs.pr_fpu.fpu_stack[5], &registers[REGISTER_BYTE (ST5_REGNUM)], 10);
- memcpy (regs.pr_fpu.fpu_stack[6], &registers[REGISTER_BYTE (ST6_REGNUM)], 10);
- memcpy (regs.pr_fpu.fpu_stack[7], &registers[REGISTER_BYTE (ST7_REGNUM)], 10);
+ memcpy (regs.pr_fpu.fpu_stack[0], &deprecated_registers[REGISTER_BYTE (ST0_REGNUM)], 10);
+ memcpy (regs.pr_fpu.fpu_stack[1], &deprecated_registers[REGISTER_BYTE (ST1_REGNUM)], 10);
+ memcpy (regs.pr_fpu.fpu_stack[2], &deprecated_registers[REGISTER_BYTE (ST2_REGNUM)], 10);
+ memcpy (regs.pr_fpu.fpu_stack[3], &deprecated_registers[REGISTER_BYTE (ST3_REGNUM)], 10);
+ memcpy (regs.pr_fpu.fpu_stack[4], &deprecated_registers[REGISTER_BYTE (ST4_REGNUM)], 10);
+ memcpy (regs.pr_fpu.fpu_stack[5], &deprecated_registers[REGISTER_BYTE (ST5_REGNUM)], 10);
+ memcpy (regs.pr_fpu.fpu_stack[6], &deprecated_registers[REGISTER_BYTE (ST6_REGNUM)], 10);
+ memcpy (regs.pr_fpu.fpu_stack[7], &deprecated_registers[REGISTER_BYTE (ST7_REGNUM)], 10);
mptrace (XPT_WREGS, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) & regs, 0);
}
@@ -100,32 +100,32 @@ fetch_inferior_registers (int regno)
int i;
struct pt_regset regs;
- registers_fetched ();
+ deprecated_registers_fetched ();
mptrace (XPT_RREGS, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) & regs, 0);
- *(int *) &registers[REGISTER_BYTE (EAX_REGNUM)] = regs.pr_eax;
- *(int *) &registers[REGISTER_BYTE (EBX_REGNUM)] = regs.pr_ebx;
- *(int *) &registers[REGISTER_BYTE (ECX_REGNUM)] = regs.pr_ecx;
- *(int *) &registers[REGISTER_BYTE (EDX_REGNUM)] = regs.pr_edx;
- *(int *) &registers[REGISTER_BYTE (ESI_REGNUM)] = regs.pr_esi;
- *(int *) &registers[REGISTER_BYTE (EDI_REGNUM)] = regs.pr_edi;
- *(int *) &registers[REGISTER_BYTE (EBP_REGNUM)] = regs.pr_ebp;
- *(int *) &registers[REGISTER_BYTE (ESP_REGNUM)] = regs.pr_esp;
- *(int *) &registers[REGISTER_BYTE (EIP_REGNUM)] = regs.pr_eip;
- *(int *) &registers[REGISTER_BYTE (EFLAGS_REGNUM)] = regs.pr_flags;
+ *(int *) &deprecated_registers[REGISTER_BYTE (EAX_REGNUM)] = regs.pr_eax;
+ *(int *) &rdeprecated_egisters[REGISTER_BYTE (EBX_REGNUM)] = regs.pr_ebx;
+ *(int *) &deprecated_registers[REGISTER_BYTE (ECX_REGNUM)] = regs.pr_ecx;
+ *(int *) &deprecated_registers[REGISTER_BYTE (EDX_REGNUM)] = regs.pr_edx;
+ *(int *) &deprecated_registers[REGISTER_BYTE (ESI_REGNUM)] = regs.pr_esi;
+ *(int *) &deprecated_registers[REGISTER_BYTE (EDI_REGNUM)] = regs.pr_edi;
+ *(int *) &deprecated_registers[REGISTER_BYTE (EBP_REGNUM)] = regs.pr_ebp;
+ *(int *) &deprecated_registers[REGISTER_BYTE (ESP_REGNUM)] = regs.pr_esp;
+ *(int *) &deprecated_registers[REGISTER_BYTE (EIP_REGNUM)] = regs.pr_eip;
+ *(int *) &deprecated_registers[REGISTER_BYTE (EFLAGS_REGNUM)] = regs.pr_flags;
for (i = 0; i < FPA_NREGS; i++)
{
- *(int *) &registers[REGISTER_BYTE (FP1_REGNUM + i)] =
+ *(int *) &deprecated_registers[REGISTER_BYTE (FP1_REGNUM + i)] =
regs.pr_fpa.fpa_regs[i];
}
- memcpy (&registers[REGISTER_BYTE (ST0_REGNUM)], regs.pr_fpu.fpu_stack[0], 10);
- memcpy (&registers[REGISTER_BYTE (ST1_REGNUM)], regs.pr_fpu.fpu_stack[1], 10);
- memcpy (&registers[REGISTER_BYTE (ST2_REGNUM)], regs.pr_fpu.fpu_stack[2], 10);
- memcpy (&registers[REGISTER_BYTE (ST3_REGNUM)], regs.pr_fpu.fpu_stack[3], 10);
- memcpy (&registers[REGISTER_BYTE (ST4_REGNUM)], regs.pr_fpu.fpu_stack[4], 10);
- memcpy (&registers[REGISTER_BYTE (ST5_REGNUM)], regs.pr_fpu.fpu_stack[5], 10);
- memcpy (&registers[REGISTER_BYTE (ST6_REGNUM)], regs.pr_fpu.fpu_stack[6], 10);
- memcpy (&registers[REGISTER_BYTE (ST7_REGNUM)], regs.pr_fpu.fpu_stack[7], 10);
+ memcpy (&deprecated_registers[REGISTER_BYTE (ST0_REGNUM)], regs.pr_fpu.fpu_stack[0], 10);
+ memcpy (&deprecated_registers[REGISTER_BYTE (ST1_REGNUM)], regs.pr_fpu.fpu_stack[1], 10);
+ memcpy (&deprecated_registers[REGISTER_BYTE (ST2_REGNUM)], regs.pr_fpu.fpu_stack[2], 10);
+ memcpy (&deprecated_registers[REGISTER_BYTE (ST3_REGNUM)], regs.pr_fpu.fpu_stack[3], 10);
+ memcpy (&deprecated_registers[REGISTER_BYTE (ST4_REGNUM)], regs.pr_fpu.fpu_stack[4], 10);
+ memcpy (&deprecated_registers[REGISTER_BYTE (ST5_REGNUM)], regs.pr_fpu.fpu_stack[5], 10);
+ memcpy (&deprecated_registers[REGISTER_BYTE (ST6_REGNUM)], regs.pr_fpu.fpu_stack[6], 10);
+ memcpy (&deprecated_registers[REGISTER_BYTE (ST7_REGNUM)], regs.pr_fpu.fpu_stack[7], 10);
}
/* FIXME: This should be merged with i387-tdep.c as well. */
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 3f2c1ff..e267190 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -154,7 +154,6 @@ struct symbol *lookup_symbol_aux_minsyms (int block_index,
const namespace_enum namespace,
struct symtab **symtab);
-
static struct symbol *find_active_alias (struct symbol *sym, CORE_ADDR addr);
/* This flag is used in hppa-tdep.c, and set in hp-symtab-read.c */
@@ -845,6 +844,52 @@ lookup_symbol_aux (const char *name, const char *mangled_name,
if (sym != NULL)
return sym;
+#if 0
+ /* NOTE: carlton/2002-11-05: At the time that this code was
+ #ifdeffed out, the value of 'block' was always NULL at this
+ point, hence the bemused comments below. */
+
+ /* FIXME: this code is never executed--block is always NULL at this
+ point. What is it trying to do, anyway? We already should have
+ checked the STATIC_BLOCK above (it is the superblock of top-level
+ blocks). Why is VAR_NAMESPACE special-cased? */
+ /* Don't need to mess with the psymtabs; if we have a block,
+ that file is read in. If we don't, then we deal later with
+ all the psymtab stuff that needs checking. */
+ /* Note (RT): The following never-executed code looks unnecessary to me also.
+ * If we change the code to use the original (passed-in)
+ * value of 'block', we could cause it to execute, but then what
+ * would it do? The STATIC_BLOCK of the symtab containing the passed-in
+ * 'block' was already searched by the above code. And the STATIC_BLOCK's
+ * of *other* symtabs (those files not containing 'block' lexically)
+ * should not contain 'block' address-wise. So we wouldn't expect this
+ * code to find any 'sym''s that were not found above. I vote for
+ * deleting the following paragraph of code.
+ */
+ if (namespace == VAR_NAMESPACE && block != NULL)
+ {
+ struct block *b;
+ /* Find the right symtab. */
+ ALL_SYMTABS (objfile, s)
+ {
+ bv = BLOCKVECTOR (s);
+ b = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
+ if (BLOCK_START (b) <= BLOCK_START (block)
+ && BLOCK_END (b) > BLOCK_START (block))
+ {
+ sym = lookup_block_symbol (b, name, mangled_name, VAR_NAMESPACE);
+ if (sym)
+ {
+ block_found = b;
+ if (symtab != NULL)
+ *symtab = s;
+ return fixup_symbol_section (sym, objfile);
+ }
+ }
+ }
+ }
+#endif /* 0 */
+
/* C++: If requested to do so by the caller,
check to see if NAME is a field of `this'. */
if (is_a_field_of_this)
@@ -1930,95 +1975,6 @@ find_pc_symtab (CORE_ADDR pc)
}
-#if 0
-
-/* Find the closest symbol value (of any sort -- function or variable)
- for a given address value. Slow but complete. (currently unused,
- mainly because it is too slow. We could fix it if each symtab and
- psymtab had contained in it the addresses ranges of each of its
- sections, which also would be required to make things like "info
- line *0x2345" cause psymtabs to be converted to symtabs). */
-
-struct symbol *
-find_addr_symbol (CORE_ADDR addr, struct symtab **symtabp,
- CORE_ADDR *symaddrp)
-{
- struct symtab *symtab, *best_symtab;
- struct objfile *objfile;
- struct dict_iterator iter;
- register struct symbol *sym;
- register CORE_ADDR sym_addr;
- struct block *block;
- int blocknum;
-
- /* Info on best symbol seen so far */
-
- register CORE_ADDR best_sym_addr = 0;
- struct symbol *best_sym = 0;
-
- /* FIXME -- we should pull in all the psymtabs, too! */
- ALL_SYMTABS (objfile, symtab)
- {
- /* Search the global and static blocks in this symtab for
- the closest symbol-address to the desired address. */
-
- for (blocknum = GLOBAL_BLOCK; blocknum <= STATIC_BLOCK; blocknum++)
- {
- QUIT;
- block = BLOCKVECTOR_BLOCK (BLOCKVECTOR (symtab), blocknum);
- ALL_BLOCK_SYMBOLS (block, iter, sym)
- {
- switch (SYMBOL_CLASS (sym))
- {
- case LOC_STATIC:
- case LOC_LABEL:
- sym_addr = SYMBOL_VALUE_ADDRESS (sym);
- break;
-
- case LOC_INDIRECT:
- sym_addr = SYMBOL_VALUE_ADDRESS (sym);
- /* An indirect symbol really lives at *sym_addr,
- * so an indirection needs to be done.
- * However, I am leaving this commented out because it's
- * expensive, and it's possible that symbolization
- * could be done without an active process (in
- * case this read_memory will fail). RT
- sym_addr = read_memory_unsigned_integer
- (sym_addr, TARGET_PTR_BIT / TARGET_CHAR_BIT);
- */
- break;
-
- case LOC_BLOCK:
- sym_addr = BLOCK_START (SYMBOL_BLOCK_VALUE (sym));
- break;
-
- default:
- continue;
- }
-
- if (sym_addr <= addr)
- if (sym_addr > best_sym_addr)
- {
- /* Quit if we found an exact match. */
- best_sym = sym;
- best_sym_addr = sym_addr;
- best_symtab = symtab;
- if (sym_addr == addr)
- goto done;
- }
- }
- }
- }
-
-done:
- if (symtabp)
- *symtabp = best_symtab;
- if (symaddrp)
- *symaddrp = best_sym_addr;
- return best_sym;
-}
-#endif /* 0 */
-
/* Find the source file and line number for a given PC value and SECTION.
Return a structure containing a symtab pointer, a line number,
and a pc range for the entire source line.
@@ -3246,29 +3202,6 @@ print_symbol_info (namespace_enum kind, struct symtab *s, struct symbol *sym,
printf_filtered (";\n");
}
- else
- {
-#if 0
- /* Tiemann says: "info methods was never implemented." */
- char *demangled_name;
- c_type_print_base (TYPE_FN_FIELD_TYPE (t, block), gdb_stdout, 0, 0);
- c_type_print_varspec_prefix (TYPE_FN_FIELD_TYPE (t, block),
- gdb_stdout, 0);
- if (TYPE_FN_FIELD_STUB (t, block))
- check_stub_method (TYPE_DOMAIN_TYPE (type), j, block);
- demangled_name =
- cplus_demangle (TYPE_FN_FIELD_PHYSNAME (t, block),
- DMGL_ANSI | DMGL_PARAMS);
- if (demangled_name == NULL)
- fprintf_filtered (stream, "<badly mangled name %s>",
- TYPE_FN_FIELD_PHYSNAME (t, block));
- else
- {
- fputs_filtered (demangled_name, stream);
- xfree (demangled_name);
- }
-#endif
- }
}
/* This help function for symtab_symbol_info() prints information
@@ -3354,15 +3287,6 @@ types_info (char *regexp, int from_tty)
symtab_symbol_info (regexp, TYPES_NAMESPACE, from_tty);
}
-#if 0
-/* Tiemann says: "info methods was never implemented." */
-static void
-methods_info (char *regexp)
-{
- symtab_symbol_info (regexp, METHODS_NAMESPACE, 0, from_tty);
-}
-#endif /* 0 */
-
/* Breakpoint all functions matching regular expression. */
void
@@ -4306,14 +4230,8 @@ _initialize_symtab (void)
there is much disagreement "info types" can be fixed). */
add_info ("types", types_info, "All type names, or those matching REGEXP.");
-#if 0
- add_info ("methods", methods_info,
- "All method names, or those matching REGEXP::REGEXP.\n\
-If the class qualifier is omitted, it is assumed to be the current scope.\n\
-If the first REGEXP is omitted, then all methods matching the second REGEXP\n\
-are listed.");
-#endif
- add_info ("sources", sources_info, "Source files in the program.");
+ add_info ("sources", sources_info,
+ "Source files in the program.");
add_com ("rbreak", class_breakpoint, rbreak_command,
"Set a breakpoint for all functions matching REGEXP.");
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 4ceb0cc..2b1b7ea 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -1141,13 +1141,6 @@ extern struct symtab_and_line find_pc_line (CORE_ADDR, int);
extern struct symtab_and_line find_pc_sect_line (CORE_ADDR, asection *, int);
-/* Given an address, return the nearest symbol at or below it in memory.
- Optionally return the symtab it's from through 2nd arg, and the
- address in inferior memory of the symbol through 3rd arg. */
-
-extern struct symbol *find_addr_symbol (CORE_ADDR, struct symtab **,
- CORE_ADDR *);
-
/* Given a symtab and line number, return the pc there. */
extern int find_line_pc (struct symtab *, int, CORE_ADDR *);
diff --git a/gdb/target.c b/gdb/target.c
index 75d022f..51ace74 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -666,6 +666,7 @@ update_current_target (void)
INHERIT (to_async_mask_value, t);
INHERIT (to_find_memory_regions, t);
INHERIT (to_make_corefile_notes, t);
+ INHERIT (to_get_thread_local_address, t);
INHERIT (to_magic, t);
#undef INHERIT
@@ -1733,7 +1734,7 @@ debug_print_register (const char * func, int regno)
{
int i;
unsigned char *buf = alloca (MAX_REGISTER_RAW_SIZE);
- read_register_gen (regno, buf);
+ deprecated_read_register_gen (regno, buf);
fprintf_unfiltered (gdb_stdlog, " = ");
for (i = 0; i < REGISTER_RAW_SIZE (regno); i++)
{
diff --git a/gdb/target.h b/gdb/target.h
index 18b95b0..5cdb76f 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -328,6 +328,16 @@ struct target_ops
void *),
void *);
char * (*to_make_corefile_notes) (bfd *, int *);
+
+ /* Return the thread-local address at OFFSET in the
+ thread-local storage for the thread PTID and the shared library
+ or executable file given by OBJFILE. If that block of
+ thread-local storage hasn't been allocated yet, this function
+ may return an error. */
+ CORE_ADDR (*to_get_thread_local_address) (ptid_t ptid,
+ struct objfile *objfile,
+ CORE_ADDR offset);
+
int to_magic;
/* Need sub-structure for target machine related rather than comm related?
*/
@@ -1039,6 +1049,12 @@ extern void (*target_new_objfile_hook) (struct objfile *);
#define target_make_corefile_notes(BFD, SIZE_P) \
(current_target.to_make_corefile_notes) (BFD, SIZE_P)
+/* Thread-local values. */
+#define target_get_thread_local_address \
+ (current_target.to_get_thread_local_address)
+#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
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index a54cbdd..9704d5c 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,14 @@
+2002-11-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * lib/mi-support.exp (mi_gdb_start): Verify the startup message
+ for mi1 and current mi is in correct format. New mi startup message
+ should be in mi console format. This is part of fix for PR gdb/604.
+
+2002-09-18 Fernando Nasser <fnasser@redhat.com>
+
+ * gdb.asm/asm-source.exp: Adjust patter to new disassembler routine
+ which explicitly prints the zero offset as "+0".
+
2002-11-14 David Carlton <carlton@math.stanford.edu>
* carlton_runnamespace: New file.
diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp
index deb4b5f..641a7c1 100644
--- a/gdb/testsuite/gdb.asm/asm-source.exp
+++ b/gdb/testsuite/gdb.asm/asm-source.exp
@@ -289,7 +289,7 @@ gdb_test "print globalvar" ".* = 11" "look at global variable"
gdb_test "print staticvar" ".* = 5" "look at static variable"
# See if we can look at a static function
-gdb_test "disassem foostatic" ".*<foostatic>:.*End of assembler dump." \
+gdb_test "disassem foostatic" ".*<foostatic\\+0>:.*End of assembler dump." \
"look at static function"
remote_exec build "rm -f ${subdir}/arch.inc"
diff --git a/gdb/testsuite/gdb.chill/ChangeLog b/gdb/testsuite/gdb.chill/ChangeLog
index f4f49b1..ea0068f 100644
--- a/gdb/testsuite/gdb.chill/ChangeLog
+++ b/gdb/testsuite/gdb.chill/ChangeLog
@@ -1,3 +1,8 @@
+2002-11-09 Klee Dienes <kdienes@apple.com>
+
+ * chexp.exp: Mark as obsolete.
+ * pr-5016.exp: Remove stray trailing newline.
+
2002-08-01 Andrew Cagney <cagney@redhat.com>
* builtins.exp, callch.exp, chillvars.exp: Make files obsolete.
diff --git a/gdb/testsuite/gdb.chill/chexp.exp b/gdb/testsuite/gdb.chill/chexp.exp
index 820ef83..aca5632 100644
--- a/gdb/testsuite/gdb.chill/chexp.exp
+++ b/gdb/testsuite/gdb.chill/chexp.exp
@@ -1,450 +1,450 @@
-# Copyright 1992, 1994, 1995, 1998 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Fred Fish. (fnf@cygnus.com)
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-set prms_id 0
-set bug_id 0
-
-# Set the current language to chill. This counts as a test. If it
-# fails, then we skip the other tests.
-
-proc set_lang_chill {} {
- global gdb_prompt
-
- send_gdb "set language chill\n"
- gdb_expect {
- -re ".*$gdb_prompt $" {}
- timeout { fail "set language chill (timeout)" ; return 0 }
- }
-
- send_gdb "show language\n"
- gdb_expect {
- -re ".* source language is \"chill\".*$gdb_prompt $" {
- pass "set language to \"chill\""
- return 1
- }
- -re ".*$gdb_prompt $" {
- fail "setting language to \"chill\""
- return 0
- }
- timeout {
- fail "can't show language (timeout)"
- return 0
- }
- }
-}
-
-proc test_integer_literals_accepted {} {
- global gdb_prompt
-
- # Test various decimal values.
-
- gdb_test "p 123" " = 123"
- gdb_test "p -123" " = -123"
- gdb_test "p D'123" " = 123"
- gdb_test "p d'123" " = 123"
- gdb_test "p -D'123" " = -123"
- gdb_test "p -d'123" " = -123"
- gdb_test "p 12_345" " = 12345"
- gdb_test "p __1_2_3__" " = 123"
- gdb_test "p/d 123" " = D'123"
-
- # Test various binary values.
-
- gdb_test "p B'111" " = 7"
- gdb_test "p b'111" " = 7"
- gdb_test "p -B'111" " = -7"
- gdb_test "p B'0111" " = 7"
- gdb_test "p b'0111" " = 7"
- gdb_test "p -b'0111" " = -7"
- gdb_test "p B'_0_1_1_1_" " = 7"
- gdb_test "p b'_0_1_1_1_" " = 7"
- gdb_test "p -b'_0_1_1_1_" " = -7"
- gdb_test "p/t B'111" " = B'111"
-
- # Test various octal values.
-
- gdb_test "p O'123" " = 83"
- gdb_test "p o'123" " = 83"
- gdb_test "p -o'0123" " = -83"
- gdb_test "p O'0123" " = 83"
- gdb_test "p o'0123" " = 83"
- gdb_test "p -o'123" " = -83"
- gdb_test "p O'_1_2_3_" " = 83"
- gdb_test "p o'_1_2_3_" " = 83"
- gdb_test "p -o'_1_2_3_" " = -83"
- gdb_test "p/o O'123" " = O'123"
-
- # Test various hexadecimal values.
-
- gdb_test "p H'123" " = 291"
- gdb_test "p h'123" " = 291"
- gdb_test "p -h'123" " = -291"
- gdb_test "p H'0123" " = 291"
- gdb_test "p h'0123" " = 291"
- gdb_test "p -h'0123" " = -291"
- gdb_test "p H'_1_2_3_" " = 291"
- gdb_test "p h'_1_2_3_" " = 291"
- gdb_test "p -h'_1_2_3_" " = -291"
- gdb_test "p H'ABC" " = 2748"
- gdb_test "p H'abc" " = 2748"
- gdb_test "p H'AbC" " = 2748"
- gdb_test "p H'_A_b_C_" " = 2748"
- gdb_test "p H'_D_e_F_" " = 3567"
- gdb_test "p H'_d_E_f_" " = 3567"
- gdb_test "p/x H'123" " = H'123"
-}
-
-proc test_character_literals_accepted {} {
- global gdb_prompt
-
- # Test various decimal values.
-
- gdb_test "p 'a'" " = 'a'"
- gdb_test "p/x 'a'" " = H'61"
- gdb_test "p/d 'a'" " = D'97"
- gdb_test "p/t 'a'" " = B'1100001"
- # gdb_test "p '^(97)'" " = 'a'" (not in GNU Chill)
- gdb_test "p C'61'" " = 'a'"
- gdb_test "p c'61'" " = 'a'"
- gdb_test "p/x C'FF'" " = H'ff"
- # gdb_test "p/x '^(H'FF)'" " = H'ff" (not in GNU Chill)
- # gdb_test "p/x '^(D'255)'" " = H'ff" (not in GNU Chill)
-}
-
-proc test_integer_literals_rejected {} {
- global gdb_prompt
-
- # These are valid integer literals in Z.200, but not GNU-Chill.
-
- test_print_reject "p _"
- test_print_reject "p __"
-
- test_print_reject "p D'"
- test_print_reject "p D'_"
- test_print_reject "p D'__"
-
- test_print_reject "p B'"
- test_print_reject "p B'_"
- test_print_reject "p B'__"
-
- test_print_reject "p O'"
- test_print_reject "p O'_"
- test_print_reject "p O'__"
-
- test_print_reject "p H'"
- test_print_reject "p H'_"
- test_print_reject "p H'__"
-
- # Test various decimal values.
-
- test_print_reject "p D'DEADBEEF"
- test_print_reject "p D'123DEADBEEF"
-
- # Test various binary values.
-
- test_print_reject "p B'2" "Too-large digit in bitstring or integer."
- test_print_reject "p B'12" "Too-large digit in bitstring or integer."
-
- # Test various octal values.
-
- test_print_reject "p O'9" "Too-large digit in bitstring or integer."
- test_print_reject "p O'79" "Too-large digit in bitstring or integer."
-
- # Test various hexadecimal values.
-
- test_print_reject "p H'G" "Invalid character in bitstring or integer."
- test_print_reject "p H'AG" "Invalid character in bitstring or integer."
-}
-
-proc test_boolean_literals_accepted {} {
- global gdb_prompt
-
- # Test the only possible values for a boolean, TRUE and FALSE.
-
- gdb_test "p TRUE" " = TRUE"
- gdb_test "p FALSE" " = FALSE"
-}
-
-proc test_float_literals_accepted {} {
- global gdb_prompt
-
- # Test various floating point formats
-
- gdb_test "p .44 < .45" " = TRUE"
- gdb_test "p .44 > .45" " = FALSE"
- gdb_test "p 0.44 < 0.45" " = TRUE"
- gdb_test "p 0.44 > 0.45" " = FALSE"
- gdb_test "p 44. < 45." " = TRUE"
- gdb_test "p 44. > 45." " = FALSE"
- gdb_test "p 44.0 < 45.0" " = TRUE"
- gdb_test "p 44.0 > 45.0" " = FALSE"
- gdb_test "p 10D20 < 10D21" " = TRUE"
- gdb_test "p 10D20 > 10D21" " = FALSE"
- gdb_test "p 10d20 < 10d21" " = TRUE"
- gdb_test "p 10d20 > 10d21" " = FALSE"
- gdb_test "p 10E20 < 10E21" " = TRUE"
- gdb_test "p 10E20 > 10E21" " = FALSE"
- gdb_test "p 10e20 < 10e21" " = TRUE"
- gdb_test "p 10e20 > 10e21" " = FALSE"
- gdb_test "p 10.D20 < 10.D21" " = TRUE"
- gdb_test "p 10.D20 > 10.D21" " = FALSE"
- gdb_test "p 10.d20 < 10.d21" " = TRUE"
- gdb_test "p 10.d20 > 10.d21" " = FALSE"
- gdb_test "p 10.E20 < 10.E21" " = TRUE"
- gdb_test "p 10.E20 > 10.E21" " = FALSE"
- gdb_test "p 10.e20 < 10.e21" " = TRUE"
- gdb_test "p 10.e20 > 10.e21" " = FALSE"
- gdb_test "p 10.0D20 < 10.0D21" " = TRUE"
- gdb_test "p 10.0D20 > 10.0D21" " = FALSE"
- gdb_test "p 10.0d20 < 10.0d21" " = TRUE"
- gdb_test "p 10.0d20 > 10.0d21" " = FALSE"
- gdb_test "p 10.0E20 < 10.0E21" " = TRUE"
- gdb_test "p 10.0E20 > 10.0E21" " = FALSE"
- gdb_test "p 10.0e20 < 10.0e21" " = TRUE"
- gdb_test "p 10.0e20 > 10.0e21" " = FALSE"
- gdb_test "p 10.0D+20 < 10.0D+21" " = TRUE"
- gdb_test "p 10.0D+20 > 10.0D+21" " = FALSE"
- gdb_test "p 10.0d+20 < 10.0d+21" " = TRUE"
- gdb_test "p 10.0d+20 > 10.0d+21" " = FALSE"
- gdb_test "p 10.0E+20 < 10.0E+21" " = TRUE"
- gdb_test "p 10.0E+20 > 10.0E+21" " = FALSE"
- gdb_test "p 10.0e+20 < 10.0e+21" " = TRUE"
- gdb_test "p 10.0e+20 > 10.0e+21" " = FALSE"
- gdb_test "p 10.0D-11 < 10.0D-10" " = TRUE"
- gdb_test "p 10.0D-11 > 10.0D-10" " = FALSE"
- gdb_test "p 10.0d-11 < 10.0d-10" " = TRUE"
- gdb_test "p 10.0d-11 > 10.0d-10" " = FALSE"
- gdb_test "p 10.0E-11 < 10.0E-10" " = TRUE"
- gdb_test "p 10.0E-11 > 10.0E-10" " = FALSE"
- gdb_test "p 10.0e-11 < 10.0e-10" " = TRUE"
- gdb_test "p 10.0e-11 > 10.0e-10" " = FALSE"
- # looks funny, but apparently legal
- gdb_test "p _.1e+10 < _.1e+11" " = TRUE"
- gdb_test "p _.1e+10 > _.1e+11" " = FALSE"
- gdb_test "p __.1e-12 < __.1e-11" " = TRUE"
- gdb_test "p __.1e-12 > __.1e-11" " = FALSE"
-}
-
-proc test_convenience_variables {} {
- global gdb_prompt
-
- gdb_test "set \$foo := 101" " := 101\[\r\]*" \
- "Set a new convenience variable"
-
- gdb_test "print \$foo" " = 101" \
- "Print contents of new convenience variable"
-
- gdb_test "set \$foo := 301" " := 301\[\r\]*" \
- "Set convenience variable to a new value"
-
- gdb_test "print \$foo" " = 301" \
- "Print new contents of convenience variable"
-
- gdb_test "set \$_ := 11" " := 11\[\r\]*" \
- "Set convenience variable \$_"
-
- gdb_test "print \$_" " = 11" \
- "Print contents of convenience variable \$_"
-
- gdb_test "print \$foo + 10" " = 311" \
- "Use convenience variable in arithmetic expression"
-
- gdb_test "print (\$foo := 32) + 4" " = 36" \
- "Use convenience variable assignment in arithmetic expression"
-
- gdb_test "print \$bar" " = void" \
- "Print contents of uninitialized convenience variable"
-}
-
-proc test_value_history {} {
- global gdb_prompt
-
- gdb_test "print 101" "\\\$1 = 101" \
- "Set value-history\[1\] using \$1"
-
- gdb_test "print 102" "\\\$2 = 102" \
- "Set value-history\[2\] using \$2"
-
- gdb_test "print 103" "\\\$3 = 103" \
- "Set value-history\[3\] using \$3"
-
- gdb_test "print \$\$" "\\\$4 = 102" \
- "Print value-history\[MAX-1\] using inplicit index \$\$"
-
- gdb_test "print \$\$" "\\\$5 = 103" \
- "Print value-history\[MAX-1\] again using implicit index \$\$"
-
- gdb_test "print \$" "\\\$6 = 103" \
- "Print value-history\[MAX\] using implicit index \$"
-
- gdb_test "print \$\$2" "\\\$7 = 102" \
- "Print value-history\[MAX-2\] using explicit index \$\$2"
-
- gdb_test "print \$0" "\\\$8 = 102" \
- "Print value-history\[MAX\] using explicit index \$0"
-
- gdb_test "print 108" "\\\$9 = 108" ""
-
- gdb_test "print \$\$0" "\\\$10 = 108" \
- "Print value-history\[MAX\] using explicit index \$\$0"
-
- gdb_test "print \$1" "\\\$11 = 101" \
- "Print value-history\[1\] using explicit index \$1"
-
- gdb_test "print \$2" "\\\$12 = 102" \
- "Print value-history\[2\] using explicit index \$2"
-
- gdb_test "print \$3" "\\\$13 = 103" \
- "Print value-history\[3\] using explicit index \$3"
-
- gdb_test "print \$-3" "\\\$14 = 100" \
- "Print (value-history\[MAX\] - 3) using implicit index \$"
-
- gdb_test "print \$1 + 3" "\\\$15 = 104" \
- "Use value-history element in arithmetic expression"
-}
-
-proc test_arithmetic_expressions {} {
- global gdb_prompt
-
- # Test unary minus with various operands
-
-# gdb_test "p -(TRUE)" " = -1" "unary minus applied to bool"
-# gdb_test "p -('a')" " = xxx" "unary minus applied to char"
- gdb_test "p -(1)" " = -1" "unary minus applied to int"
- gdb_test "p -(1.0)" " = -1" "unary minus applied to real"
-
- # Test addition with various operands
-
- gdb_test "p TRUE + 1" " = 2" "bool plus int"
- gdb_test "p 'a' + 1" " = 98" "char plus int"
- gdb_test "p 1 + 1" " = 2" "int plus int"
- gdb_test "p 1.0 + 1" " = 2" "real plus int"
- gdb_test "p 1.0 + 2.0" " = 3" "real plus real"
-
- # Test subtraction with various operands
-
- gdb_test "p TRUE - 1" " = 0" "bool minus int"
- gdb_test "p 'b' - 1" " = 97" "char minus int"
- gdb_test "p 3 - 1" " = 2" "int minus int"
- gdb_test "p 3.0 - 1" " = 2" "real minus int"
- gdb_test "p 5.0 - 2.0" " = 3" "real minus real"
-
- # Test multiplication with various operands
-
- gdb_test "p TRUE * 1" " = 1" "bool times int"
- gdb_test "p 'a' * 2" " = 194" "char times int"
- gdb_test "p 2 * 3" " = 6" "int times int"
- gdb_test "p 2.0 * 3" " = 6" "real times int"
- gdb_test "p 2.0 * 3.0" " = 6" "real times real"
-
- # Test division with various operands
-
- gdb_test "p TRUE / 1" " = 1" "bool divided by int"
- gdb_test "p 'a' / 2" " = 48" "char divided by int"
- gdb_test "p 6 / 3" " = 2" "int divided by int"
- gdb_test "p 6.0 / 3" " = 2" "real divided by int"
- gdb_test "p 6.0 / 3.0" " = 2" "real divided by real"
-
- # Test modulo with various operands
-
- gdb_test "p TRUE MOD 1" " = 0" "bool modulo int"
- gdb_test "p 'a' MOD 2" " = 1" "char modulo int"
- gdb_test "p -5 MOD 3" " = 1" "negative int modulo int"
- gdb_test "p 5 MOD 1" " = 0" "int modulo int"
- gdb_test "p 5 MOD 2" " = 1" "int modulo int"
- gdb_test "p 5 MOD 3" " = 2" "int modulo int"
- gdb_test "p 5 MOD 4" " = 1" "int modulo int"
- gdb_test "p 5 MOD 5" " = 0" "int modulo int"
- gdb_test "p 0 MOD 1" " = 0" "int modulo int"
- gdb_test "p 0 MOD 2" " = 0" "int modulo int"
- gdb_test "p 0 MOD 3" " = 0" "int modulo int"
- gdb_test "p 0 MOD 4" " = 0" "int modulo int"
- gdb_test "p -5 MOD 1" " = 0" "int modulo int"
- gdb_test "p -5 MOD 2" " = 1" "int modulo int"
- gdb_test "p -5 MOD 3" " = 1" "int modulo int"
- gdb_test "p -5 MOD 4" " = 3" "int modulo int"
- gdb_test "p -5 MOD 5" " = 0" "int modulo int"
- gdb_test "p -5 MOD 5" " = 0" "int modulo int"
- test_print_reject "p 6.0 MOD 3" \
- "Integer-only operation on floating point number.*"
- test_print_reject "p 6.0 MOD 3.0" \
- "Integer-only operation on floating point number.*"
- test_print_reject "p -5 MOD -1" \
- "Second operand of MOD must be greater than zero.*"
- test_print_reject "p -5 MOD 0" \
- "Second operand of MOD must be greater than zero.*"
-
- # Test remainder with various operands
-
- gdb_test "p TRUE REM 1" " = 0" "bool remainder int"
- gdb_test "p 'a' REM 2" " = 1" "char remainder int"
- gdb_test "p 5 REM 5" " = 0" "int remainder int"
- gdb_test "p 5 REM 4" " = 1" "int remainder int"
- gdb_test "p 5 REM 3" " = 2" "int remainder int"
- gdb_test "p 5 REM 2" " = 1" "int remainder int"
- gdb_test "p 5 REM 1" " = 0" "int remainder int"
- gdb_test "p 5 REM -1" " = 0" "int remainder int"
- gdb_test "p 5 REM -2" " = 1" "int remainder int"
- gdb_test "p 5 REM -3" " = 2" "int remainder int"
- gdb_test "p 5 REM -4" " = 1" "int remainder int"
- gdb_test "p 5 REM -5" " = 0" "int remainder int"
- gdb_test "p -5 REM 5" " = 0" "int remainder int"
- gdb_test "p -5 REM 4" " = -1" "int remainder int"
- gdb_test "p -5 REM 3" " = -2" "int remainder int"
- gdb_test "p -5 REM 2" " = -1" "int remainder int"
- gdb_test "p -5 REM 1" " = 0" "int remainder int"
- gdb_test "p -5 REM -1" " = 0" "int remainder int"
- gdb_test "p -5 REM -2" " = -1" "int remainder int"
- gdb_test "p -5 REM -3" " = -2" "int remainder int"
- gdb_test "p -5 REM -4" " = -1" "int remainder int"
- gdb_test "p -5 REM -5" " = 0" "int remainder int"
- gdb_test "p 6 REM 3" " = 0" "int remainder int"
- test_print_reject "p 6.0 REM 3" \
- "Integer-only operation on floating point number.*"
- test_print_reject "p 6.0 REM 3.0" \
- "Integer-only operation on floating point number.*"
-}
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-gdb_test "set print sevenbit-strings" ""
-
-if [set_lang_chill] then {
- test_value_history
- test_convenience_variables
- test_integer_literals_accepted
- test_integer_literals_rejected
- test_boolean_literals_accepted
- test_character_literals_accepted
- test_float_literals_accepted
- test_arithmetic_expressions
-} else {
- warning "$test_name tests suppressed." 0
-}
+# OBSOLETE # Copyright 1992, 1994, 1995, 1998 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE # This file was written by Fred Fish. (fnf@cygnus.com)
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE
+# OBSOLETE # Set the current language to chill. This counts as a test. If it
+# OBSOLETE # fails, then we skip the other tests.
+# OBSOLETE
+# OBSOLETE proc set_lang_chill {} {
+# OBSOLETE global gdb_prompt
+# OBSOLETE
+# OBSOLETE send_gdb "set language chill\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re ".*$gdb_prompt $" {}
+# OBSOLETE timeout { fail "set language chill (timeout)" ; return 0 }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE send_gdb "show language\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re ".* source language is \"chill\".*$gdb_prompt $" {
+# OBSOLETE pass "set language to \"chill\""
+# OBSOLETE return 1
+# OBSOLETE }
+# OBSOLETE -re ".*$gdb_prompt $" {
+# OBSOLETE fail "setting language to \"chill\""
+# OBSOLETE return 0
+# OBSOLETE }
+# OBSOLETE timeout {
+# OBSOLETE fail "can't show language (timeout)"
+# OBSOLETE return 0
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_integer_literals_accepted {} {
+# OBSOLETE global gdb_prompt
+# OBSOLETE
+# OBSOLETE # Test various decimal values.
+# OBSOLETE
+# OBSOLETE gdb_test "p 123" " = 123"
+# OBSOLETE gdb_test "p -123" " = -123"
+# OBSOLETE gdb_test "p D'123" " = 123"
+# OBSOLETE gdb_test "p d'123" " = 123"
+# OBSOLETE gdb_test "p -D'123" " = -123"
+# OBSOLETE gdb_test "p -d'123" " = -123"
+# OBSOLETE gdb_test "p 12_345" " = 12345"
+# OBSOLETE gdb_test "p __1_2_3__" " = 123"
+# OBSOLETE gdb_test "p/d 123" " = D'123"
+# OBSOLETE
+# OBSOLETE # Test various binary values.
+# OBSOLETE
+# OBSOLETE gdb_test "p B'111" " = 7"
+# OBSOLETE gdb_test "p b'111" " = 7"
+# OBSOLETE gdb_test "p -B'111" " = -7"
+# OBSOLETE gdb_test "p B'0111" " = 7"
+# OBSOLETE gdb_test "p b'0111" " = 7"
+# OBSOLETE gdb_test "p -b'0111" " = -7"
+# OBSOLETE gdb_test "p B'_0_1_1_1_" " = 7"
+# OBSOLETE gdb_test "p b'_0_1_1_1_" " = 7"
+# OBSOLETE gdb_test "p -b'_0_1_1_1_" " = -7"
+# OBSOLETE gdb_test "p/t B'111" " = B'111"
+# OBSOLETE
+# OBSOLETE # Test various octal values.
+# OBSOLETE
+# OBSOLETE gdb_test "p O'123" " = 83"
+# OBSOLETE gdb_test "p o'123" " = 83"
+# OBSOLETE gdb_test "p -o'0123" " = -83"
+# OBSOLETE gdb_test "p O'0123" " = 83"
+# OBSOLETE gdb_test "p o'0123" " = 83"
+# OBSOLETE gdb_test "p -o'123" " = -83"
+# OBSOLETE gdb_test "p O'_1_2_3_" " = 83"
+# OBSOLETE gdb_test "p o'_1_2_3_" " = 83"
+# OBSOLETE gdb_test "p -o'_1_2_3_" " = -83"
+# OBSOLETE gdb_test "p/o O'123" " = O'123"
+# OBSOLETE
+# OBSOLETE # Test various hexadecimal values.
+# OBSOLETE
+# OBSOLETE gdb_test "p H'123" " = 291"
+# OBSOLETE gdb_test "p h'123" " = 291"
+# OBSOLETE gdb_test "p -h'123" " = -291"
+# OBSOLETE gdb_test "p H'0123" " = 291"
+# OBSOLETE gdb_test "p h'0123" " = 291"
+# OBSOLETE gdb_test "p -h'0123" " = -291"
+# OBSOLETE gdb_test "p H'_1_2_3_" " = 291"
+# OBSOLETE gdb_test "p h'_1_2_3_" " = 291"
+# OBSOLETE gdb_test "p -h'_1_2_3_" " = -291"
+# OBSOLETE gdb_test "p H'ABC" " = 2748"
+# OBSOLETE gdb_test "p H'abc" " = 2748"
+# OBSOLETE gdb_test "p H'AbC" " = 2748"
+# OBSOLETE gdb_test "p H'_A_b_C_" " = 2748"
+# OBSOLETE gdb_test "p H'_D_e_F_" " = 3567"
+# OBSOLETE gdb_test "p H'_d_E_f_" " = 3567"
+# OBSOLETE gdb_test "p/x H'123" " = H'123"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_character_literals_accepted {} {
+# OBSOLETE global gdb_prompt
+# OBSOLETE
+# OBSOLETE # Test various decimal values.
+# OBSOLETE
+# OBSOLETE gdb_test "p 'a'" " = 'a'"
+# OBSOLETE gdb_test "p/x 'a'" " = H'61"
+# OBSOLETE gdb_test "p/d 'a'" " = D'97"
+# OBSOLETE gdb_test "p/t 'a'" " = B'1100001"
+# OBSOLETE # gdb_test "p '^(97)'" " = 'a'" (not in GNU Chill)
+# OBSOLETE gdb_test "p C'61'" " = 'a'"
+# OBSOLETE gdb_test "p c'61'" " = 'a'"
+# OBSOLETE gdb_test "p/x C'FF'" " = H'ff"
+# OBSOLETE # gdb_test "p/x '^(H'FF)'" " = H'ff" (not in GNU Chill)
+# OBSOLETE # gdb_test "p/x '^(D'255)'" " = H'ff" (not in GNU Chill)
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_integer_literals_rejected {} {
+# OBSOLETE global gdb_prompt
+# OBSOLETE
+# OBSOLETE # These are valid integer literals in Z.200, but not GNU-Chill.
+# OBSOLETE
+# OBSOLETE test_print_reject "p _"
+# OBSOLETE test_print_reject "p __"
+# OBSOLETE
+# OBSOLETE test_print_reject "p D'"
+# OBSOLETE test_print_reject "p D'_"
+# OBSOLETE test_print_reject "p D'__"
+# OBSOLETE
+# OBSOLETE test_print_reject "p B'"
+# OBSOLETE test_print_reject "p B'_"
+# OBSOLETE test_print_reject "p B'__"
+# OBSOLETE
+# OBSOLETE test_print_reject "p O'"
+# OBSOLETE test_print_reject "p O'_"
+# OBSOLETE test_print_reject "p O'__"
+# OBSOLETE
+# OBSOLETE test_print_reject "p H'"
+# OBSOLETE test_print_reject "p H'_"
+# OBSOLETE test_print_reject "p H'__"
+# OBSOLETE
+# OBSOLETE # Test various decimal values.
+# OBSOLETE
+# OBSOLETE test_print_reject "p D'DEADBEEF"
+# OBSOLETE test_print_reject "p D'123DEADBEEF"
+# OBSOLETE
+# OBSOLETE # Test various binary values.
+# OBSOLETE
+# OBSOLETE test_print_reject "p B'2" "Too-large digit in bitstring or integer."
+# OBSOLETE test_print_reject "p B'12" "Too-large digit in bitstring or integer."
+# OBSOLETE
+# OBSOLETE # Test various octal values.
+# OBSOLETE
+# OBSOLETE test_print_reject "p O'9" "Too-large digit in bitstring or integer."
+# OBSOLETE test_print_reject "p O'79" "Too-large digit in bitstring or integer."
+# OBSOLETE
+# OBSOLETE # Test various hexadecimal values.
+# OBSOLETE
+# OBSOLETE test_print_reject "p H'G" "Invalid character in bitstring or integer."
+# OBSOLETE test_print_reject "p H'AG" "Invalid character in bitstring or integer."
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_boolean_literals_accepted {} {
+# OBSOLETE global gdb_prompt
+# OBSOLETE
+# OBSOLETE # Test the only possible values for a boolean, TRUE and FALSE.
+# OBSOLETE
+# OBSOLETE gdb_test "p TRUE" " = TRUE"
+# OBSOLETE gdb_test "p FALSE" " = FALSE"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_float_literals_accepted {} {
+# OBSOLETE global gdb_prompt
+# OBSOLETE
+# OBSOLETE # Test various floating point formats
+# OBSOLETE
+# OBSOLETE gdb_test "p .44 < .45" " = TRUE"
+# OBSOLETE gdb_test "p .44 > .45" " = FALSE"
+# OBSOLETE gdb_test "p 0.44 < 0.45" " = TRUE"
+# OBSOLETE gdb_test "p 0.44 > 0.45" " = FALSE"
+# OBSOLETE gdb_test "p 44. < 45." " = TRUE"
+# OBSOLETE gdb_test "p 44. > 45." " = FALSE"
+# OBSOLETE gdb_test "p 44.0 < 45.0" " = TRUE"
+# OBSOLETE gdb_test "p 44.0 > 45.0" " = FALSE"
+# OBSOLETE gdb_test "p 10D20 < 10D21" " = TRUE"
+# OBSOLETE gdb_test "p 10D20 > 10D21" " = FALSE"
+# OBSOLETE gdb_test "p 10d20 < 10d21" " = TRUE"
+# OBSOLETE gdb_test "p 10d20 > 10d21" " = FALSE"
+# OBSOLETE gdb_test "p 10E20 < 10E21" " = TRUE"
+# OBSOLETE gdb_test "p 10E20 > 10E21" " = FALSE"
+# OBSOLETE gdb_test "p 10e20 < 10e21" " = TRUE"
+# OBSOLETE gdb_test "p 10e20 > 10e21" " = FALSE"
+# OBSOLETE gdb_test "p 10.D20 < 10.D21" " = TRUE"
+# OBSOLETE gdb_test "p 10.D20 > 10.D21" " = FALSE"
+# OBSOLETE gdb_test "p 10.d20 < 10.d21" " = TRUE"
+# OBSOLETE gdb_test "p 10.d20 > 10.d21" " = FALSE"
+# OBSOLETE gdb_test "p 10.E20 < 10.E21" " = TRUE"
+# OBSOLETE gdb_test "p 10.E20 > 10.E21" " = FALSE"
+# OBSOLETE gdb_test "p 10.e20 < 10.e21" " = TRUE"
+# OBSOLETE gdb_test "p 10.e20 > 10.e21" " = FALSE"
+# OBSOLETE gdb_test "p 10.0D20 < 10.0D21" " = TRUE"
+# OBSOLETE gdb_test "p 10.0D20 > 10.0D21" " = FALSE"
+# OBSOLETE gdb_test "p 10.0d20 < 10.0d21" " = TRUE"
+# OBSOLETE gdb_test "p 10.0d20 > 10.0d21" " = FALSE"
+# OBSOLETE gdb_test "p 10.0E20 < 10.0E21" " = TRUE"
+# OBSOLETE gdb_test "p 10.0E20 > 10.0E21" " = FALSE"
+# OBSOLETE gdb_test "p 10.0e20 < 10.0e21" " = TRUE"
+# OBSOLETE gdb_test "p 10.0e20 > 10.0e21" " = FALSE"
+# OBSOLETE gdb_test "p 10.0D+20 < 10.0D+21" " = TRUE"
+# OBSOLETE gdb_test "p 10.0D+20 > 10.0D+21" " = FALSE"
+# OBSOLETE gdb_test "p 10.0d+20 < 10.0d+21" " = TRUE"
+# OBSOLETE gdb_test "p 10.0d+20 > 10.0d+21" " = FALSE"
+# OBSOLETE gdb_test "p 10.0E+20 < 10.0E+21" " = TRUE"
+# OBSOLETE gdb_test "p 10.0E+20 > 10.0E+21" " = FALSE"
+# OBSOLETE gdb_test "p 10.0e+20 < 10.0e+21" " = TRUE"
+# OBSOLETE gdb_test "p 10.0e+20 > 10.0e+21" " = FALSE"
+# OBSOLETE gdb_test "p 10.0D-11 < 10.0D-10" " = TRUE"
+# OBSOLETE gdb_test "p 10.0D-11 > 10.0D-10" " = FALSE"
+# OBSOLETE gdb_test "p 10.0d-11 < 10.0d-10" " = TRUE"
+# OBSOLETE gdb_test "p 10.0d-11 > 10.0d-10" " = FALSE"
+# OBSOLETE gdb_test "p 10.0E-11 < 10.0E-10" " = TRUE"
+# OBSOLETE gdb_test "p 10.0E-11 > 10.0E-10" " = FALSE"
+# OBSOLETE gdb_test "p 10.0e-11 < 10.0e-10" " = TRUE"
+# OBSOLETE gdb_test "p 10.0e-11 > 10.0e-10" " = FALSE"
+# OBSOLETE # looks funny, but apparently legal
+# OBSOLETE gdb_test "p _.1e+10 < _.1e+11" " = TRUE"
+# OBSOLETE gdb_test "p _.1e+10 > _.1e+11" " = FALSE"
+# OBSOLETE gdb_test "p __.1e-12 < __.1e-11" " = TRUE"
+# OBSOLETE gdb_test "p __.1e-12 > __.1e-11" " = FALSE"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_convenience_variables {} {
+# OBSOLETE global gdb_prompt
+# OBSOLETE
+# OBSOLETE gdb_test "set \$foo := 101" " := 101\[\r\]*" \
+\# OBSOLETE "Set a new convenience variable"
+# OBSOLETE
+# OBSOLETE gdb_test "print \$foo" " = 101" \
+\# OBSOLETE "Print contents of new convenience variable"
+# OBSOLETE
+# OBSOLETE gdb_test "set \$foo := 301" " := 301\[\r\]*" \
+\# OBSOLETE "Set convenience variable to a new value"
+# OBSOLETE
+# OBSOLETE gdb_test "print \$foo" " = 301" \
+\# OBSOLETE "Print new contents of convenience variable"
+# OBSOLETE
+# OBSOLETE gdb_test "set \$_ := 11" " := 11\[\r\]*" \
+\# OBSOLETE "Set convenience variable \$_"
+# OBSOLETE
+# OBSOLETE gdb_test "print \$_" " = 11" \
+\# OBSOLETE "Print contents of convenience variable \$_"
+# OBSOLETE
+# OBSOLETE gdb_test "print \$foo + 10" " = 311" \
+\# OBSOLETE "Use convenience variable in arithmetic expression"
+# OBSOLETE
+# OBSOLETE gdb_test "print (\$foo := 32) + 4" " = 36" \
+\# OBSOLETE "Use convenience variable assignment in arithmetic expression"
+# OBSOLETE
+# OBSOLETE gdb_test "print \$bar" " = void" \
+\# OBSOLETE "Print contents of uninitialized convenience variable"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_value_history {} {
+# OBSOLETE global gdb_prompt
+# OBSOLETE
+# OBSOLETE gdb_test "print 101" "\\\$1 = 101" \
+\# OBSOLETE "Set value-history\[1\] using \$1"
+# OBSOLETE
+# OBSOLETE gdb_test "print 102" "\\\$2 = 102" \
+\# OBSOLETE "Set value-history\[2\] using \$2"
+# OBSOLETE
+# OBSOLETE gdb_test "print 103" "\\\$3 = 103" \
+\# OBSOLETE "Set value-history\[3\] using \$3"
+# OBSOLETE
+# OBSOLETE gdb_test "print \$\$" "\\\$4 = 102" \
+\# OBSOLETE "Print value-history\[MAX-1\] using inplicit index \$\$"
+# OBSOLETE
+# OBSOLETE gdb_test "print \$\$" "\\\$5 = 103" \
+\# OBSOLETE "Print value-history\[MAX-1\] again using implicit index \$\$"
+# OBSOLETE
+# OBSOLETE gdb_test "print \$" "\\\$6 = 103" \
+\# OBSOLETE "Print value-history\[MAX\] using implicit index \$"
+# OBSOLETE
+# OBSOLETE gdb_test "print \$\$2" "\\\$7 = 102" \
+\# OBSOLETE "Print value-history\[MAX-2\] using explicit index \$\$2"
+# OBSOLETE
+# OBSOLETE gdb_test "print \$0" "\\\$8 = 102" \
+\# OBSOLETE "Print value-history\[MAX\] using explicit index \$0"
+# OBSOLETE
+# OBSOLETE gdb_test "print 108" "\\\$9 = 108" ""
+# OBSOLETE
+# OBSOLETE gdb_test "print \$\$0" "\\\$10 = 108" \
+\# OBSOLETE "Print value-history\[MAX\] using explicit index \$\$0"
+# OBSOLETE
+# OBSOLETE gdb_test "print \$1" "\\\$11 = 101" \
+\# OBSOLETE "Print value-history\[1\] using explicit index \$1"
+# OBSOLETE
+# OBSOLETE gdb_test "print \$2" "\\\$12 = 102" \
+\# OBSOLETE "Print value-history\[2\] using explicit index \$2"
+# OBSOLETE
+# OBSOLETE gdb_test "print \$3" "\\\$13 = 103" \
+\# OBSOLETE "Print value-history\[3\] using explicit index \$3"
+# OBSOLETE
+# OBSOLETE gdb_test "print \$-3" "\\\$14 = 100" \
+\# OBSOLETE "Print (value-history\[MAX\] - 3) using implicit index \$"
+# OBSOLETE
+# OBSOLETE gdb_test "print \$1 + 3" "\\\$15 = 104" \
+\# OBSOLETE "Use value-history element in arithmetic expression"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_arithmetic_expressions {} {
+# OBSOLETE global gdb_prompt
+# OBSOLETE
+# OBSOLETE # Test unary minus with various operands
+# OBSOLETE
+# OBSOLETE # gdb_test "p -(TRUE)" " = -1" "unary minus applied to bool"
+# OBSOLETE # gdb_test "p -('a')" " = xxx" "unary minus applied to char"
+# OBSOLETE gdb_test "p -(1)" " = -1" "unary minus applied to int"
+# OBSOLETE gdb_test "p -(1.0)" " = -1" "unary minus applied to real"
+# OBSOLETE
+# OBSOLETE # Test addition with various operands
+# OBSOLETE
+# OBSOLETE gdb_test "p TRUE + 1" " = 2" "bool plus int"
+# OBSOLETE gdb_test "p 'a' + 1" " = 98" "char plus int"
+# OBSOLETE gdb_test "p 1 + 1" " = 2" "int plus int"
+# OBSOLETE gdb_test "p 1.0 + 1" " = 2" "real plus int"
+# OBSOLETE gdb_test "p 1.0 + 2.0" " = 3" "real plus real"
+# OBSOLETE
+# OBSOLETE # Test subtraction with various operands
+# OBSOLETE
+# OBSOLETE gdb_test "p TRUE - 1" " = 0" "bool minus int"
+# OBSOLETE gdb_test "p 'b' - 1" " = 97" "char minus int"
+# OBSOLETE gdb_test "p 3 - 1" " = 2" "int minus int"
+# OBSOLETE gdb_test "p 3.0 - 1" " = 2" "real minus int"
+# OBSOLETE gdb_test "p 5.0 - 2.0" " = 3" "real minus real"
+# OBSOLETE
+# OBSOLETE # Test multiplication with various operands
+# OBSOLETE
+# OBSOLETE gdb_test "p TRUE * 1" " = 1" "bool times int"
+# OBSOLETE gdb_test "p 'a' * 2" " = 194" "char times int"
+# OBSOLETE gdb_test "p 2 * 3" " = 6" "int times int"
+# OBSOLETE gdb_test "p 2.0 * 3" " = 6" "real times int"
+# OBSOLETE gdb_test "p 2.0 * 3.0" " = 6" "real times real"
+# OBSOLETE
+# OBSOLETE # Test division with various operands
+# OBSOLETE
+# OBSOLETE gdb_test "p TRUE / 1" " = 1" "bool divided by int"
+# OBSOLETE gdb_test "p 'a' / 2" " = 48" "char divided by int"
+# OBSOLETE gdb_test "p 6 / 3" " = 2" "int divided by int"
+# OBSOLETE gdb_test "p 6.0 / 3" " = 2" "real divided by int"
+# OBSOLETE gdb_test "p 6.0 / 3.0" " = 2" "real divided by real"
+# OBSOLETE
+# OBSOLETE # Test modulo with various operands
+# OBSOLETE
+# OBSOLETE gdb_test "p TRUE MOD 1" " = 0" "bool modulo int"
+# OBSOLETE gdb_test "p 'a' MOD 2" " = 1" "char modulo int"
+# OBSOLETE gdb_test "p -5 MOD 3" " = 1" "negative int modulo int"
+# OBSOLETE gdb_test "p 5 MOD 1" " = 0" "int modulo int"
+# OBSOLETE gdb_test "p 5 MOD 2" " = 1" "int modulo int"
+# OBSOLETE gdb_test "p 5 MOD 3" " = 2" "int modulo int"
+# OBSOLETE gdb_test "p 5 MOD 4" " = 1" "int modulo int"
+# OBSOLETE gdb_test "p 5 MOD 5" " = 0" "int modulo int"
+# OBSOLETE gdb_test "p 0 MOD 1" " = 0" "int modulo int"
+# OBSOLETE gdb_test "p 0 MOD 2" " = 0" "int modulo int"
+# OBSOLETE gdb_test "p 0 MOD 3" " = 0" "int modulo int"
+# OBSOLETE gdb_test "p 0 MOD 4" " = 0" "int modulo int"
+# OBSOLETE gdb_test "p -5 MOD 1" " = 0" "int modulo int"
+# OBSOLETE gdb_test "p -5 MOD 2" " = 1" "int modulo int"
+# OBSOLETE gdb_test "p -5 MOD 3" " = 1" "int modulo int"
+# OBSOLETE gdb_test "p -5 MOD 4" " = 3" "int modulo int"
+# OBSOLETE gdb_test "p -5 MOD 5" " = 0" "int modulo int"
+# OBSOLETE gdb_test "p -5 MOD 5" " = 0" "int modulo int"
+# OBSOLETE test_print_reject "p 6.0 MOD 3" \
+\# OBSOLETE "Integer-only operation on floating point number.*"
+# OBSOLETE test_print_reject "p 6.0 MOD 3.0" \
+\# OBSOLETE "Integer-only operation on floating point number.*"
+# OBSOLETE test_print_reject "p -5 MOD -1" \
+\# OBSOLETE "Second operand of MOD must be greater than zero.*"
+# OBSOLETE test_print_reject "p -5 MOD 0" \
+\# OBSOLETE "Second operand of MOD must be greater than zero.*"
+# OBSOLETE
+# OBSOLETE # Test remainder with various operands
+# OBSOLETE
+# OBSOLETE gdb_test "p TRUE REM 1" " = 0" "bool remainder int"
+# OBSOLETE gdb_test "p 'a' REM 2" " = 1" "char remainder int"
+# OBSOLETE gdb_test "p 5 REM 5" " = 0" "int remainder int"
+# OBSOLETE gdb_test "p 5 REM 4" " = 1" "int remainder int"
+# OBSOLETE gdb_test "p 5 REM 3" " = 2" "int remainder int"
+# OBSOLETE gdb_test "p 5 REM 2" " = 1" "int remainder int"
+# OBSOLETE gdb_test "p 5 REM 1" " = 0" "int remainder int"
+# OBSOLETE gdb_test "p 5 REM -1" " = 0" "int remainder int"
+# OBSOLETE gdb_test "p 5 REM -2" " = 1" "int remainder int"
+# OBSOLETE gdb_test "p 5 REM -3" " = 2" "int remainder int"
+# OBSOLETE gdb_test "p 5 REM -4" " = 1" "int remainder int"
+# OBSOLETE gdb_test "p 5 REM -5" " = 0" "int remainder int"
+# OBSOLETE gdb_test "p -5 REM 5" " = 0" "int remainder int"
+# OBSOLETE gdb_test "p -5 REM 4" " = -1" "int remainder int"
+# OBSOLETE gdb_test "p -5 REM 3" " = -2" "int remainder int"
+# OBSOLETE gdb_test "p -5 REM 2" " = -1" "int remainder int"
+# OBSOLETE gdb_test "p -5 REM 1" " = 0" "int remainder int"
+# OBSOLETE gdb_test "p -5 REM -1" " = 0" "int remainder int"
+# OBSOLETE gdb_test "p -5 REM -2" " = -1" "int remainder int"
+# OBSOLETE gdb_test "p -5 REM -3" " = -2" "int remainder int"
+# OBSOLETE gdb_test "p -5 REM -4" " = -1" "int remainder int"
+# OBSOLETE gdb_test "p -5 REM -5" " = 0" "int remainder int"
+# OBSOLETE gdb_test "p 6 REM 3" " = 0" "int remainder int"
+# OBSOLETE test_print_reject "p 6.0 REM 3" \
+\# OBSOLETE "Integer-only operation on floating point number.*"
+# OBSOLETE test_print_reject "p 6.0 REM 3.0" \
+\# OBSOLETE "Integer-only operation on floating point number.*"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE
+# OBSOLETE gdb_test "set print sevenbit-strings" ""
+# OBSOLETE
+# OBSOLETE if [set_lang_chill] then {
+# OBSOLETE test_value_history
+# OBSOLETE test_convenience_variables
+# OBSOLETE test_integer_literals_accepted
+# OBSOLETE test_integer_literals_rejected
+# OBSOLETE test_boolean_literals_accepted
+# OBSOLETE test_character_literals_accepted
+# OBSOLETE test_float_literals_accepted
+# OBSOLETE test_arithmetic_expressions
+# OBSOLETE } else {
+# OBSOLETE warning "$test_name tests suppressed." 0
+# OBSOLETE }
diff --git a/gdb/testsuite/gdb.chill/pr-5016.exp b/gdb/testsuite/gdb.chill/pr-5016.exp
index f01c1bf..1d3a5d4 100644
--- a/gdb/testsuite/gdb.chill/pr-5016.exp
+++ b/gdb/testsuite/gdb.chill/pr-5016.exp
@@ -60,4 +60,3 @@
# OBSOLETE }
# OBSOLETE
# OBSOLETE do_tests
-
diff --git a/gdb/testsuite/gdb.mi/ChangeLog b/gdb/testsuite/gdb.mi/ChangeLog
index 0a89d16..8b4426b 100644
--- a/gdb/testsuite/gdb.mi/ChangeLog
+++ b/gdb/testsuite/gdb.mi/ChangeLog
@@ -1,3 +1,34 @@
+2002-11-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * gdb792.cc: New file to test patch for PR gdb/792.
+ * gdb792.exp: Ditto.
+
+2002-11-04 Elena Zannoni <ezannoni@redhat.com>
+
+ * mi-console.exp: Use mi_runto, mi_run_to_main, mi_next_to,
+ mi_step_to wherever possible. Update copyright notices.
+ * mi-disassemble.exp: Ditto.
+ * mi-eval.exp: Ditto.
+ * mi-read-memory.exp: Ditto.
+ * mi-regs.exp: Ditto.
+ * mi-return.exp: Ditto.
+ * mi-stack.exp: Ditto.
+ * mi-stepi.exp: Ditto.
+ * mi-var-block.exp: Ditto.
+ * mi-var-cmd.exp: Ditto.
+ * mi-watch.exp: Ditto.
+ * mi1-console.exp: Ditto.
+ * mi1-disassemble.exp: Ditto.
+ * mi1-eval.exp: Ditto.
+ * mi1-read-memory.exp: Ditto.
+ * mi1-regs.exp: Ditto.
+ * mi1-return.exp: Ditto.
+ * mi1-stack.exp: Ditto.
+ * mi1-stepi.exp: Ditto.
+ * mi1-var-block.exp: Ditto.
+ * mi1-var-cmd.exp: Ditto.
+ * mi1-watch.exp: Ditto.
+
2002-10-23 Jeff Johnston <jjohnstn@redhat.com>
* mi-var-cmd.exp: Add tests to verify that a -var-assign that changes
diff --git a/gdb/testsuite/gdb.mi/mi-console.exp b/gdb/testsuite/gdb.mi/mi-console.exp
index f8bb36e..f611aa7 100644
--- a/gdb/testsuite/gdb.mi/mi-console.exp
+++ b/gdb/testsuite/gdb.mi/mi-console.exp
@@ -51,22 +51,7 @@ mi_delete_breakpoints
mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_load ${binfile}
-# Halt in main
-mi_gdb_test "200-break-insert main" \
- "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*mi-console.c\",line=\"13\",times=\"0\"\}" \
- "break-insert operation"
-mi_run_cmd
-gdb_expect {
- -re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*mi-console.c\",line=\"13\"\}\r\n$mi_gdb_prompt$" {
- pass "run to main"
- }
- -re ".*$mi_gdb_prompt$" {
- fail "run to main (2)"
- }
- timeout {
- fail "run to main (timeout)"
- }
-}
+mi_run_to_main
# Next over the hello() call which will produce lots of output
send_gdb "47-exec-next\n"
diff --git a/gdb/testsuite/gdb.mi/mi-disassemble.exp b/gdb/testsuite/gdb.mi/mi-disassemble.exp
index 6f33d67..46f00dd 100644
--- a/gdb/testsuite/gdb.mi/mi-disassemble.exp
+++ b/gdb/testsuite/gdb.mi/mi-disassemble.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -43,51 +43,6 @@ mi_delete_breakpoints
mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_load ${binfile}
-proc test_breakpoints_creation_and_listing {} {
- global mi_gdb_prompt
- global srcfile
- global hex
-
- # Insert some breakpoints and list them
- # Also, disable some so they do not interfere with other tests
- # Tests:
- # -break-insert
- # -break-list
- # -break-disable
- # -break-info
-
- mi_gdb_test "200-break-insert main" \
- "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}" \
- "break-insert operation"
-
- mi_gdb_test "204-break-list" \
- "204\\^done,BreakpointTable=\{.*,body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}\\\]\}" \
- "list of breakpoints"
-}
-
-proc test_running_the_program {} {
- global mi_gdb_prompt
- global hex
-
- # Run the program without args
- # Tests:
- # -exec-run
-
- # mi_gdb_test cannot be used for asynchronous commands because there are
- # two prompts involved and this can lead to a race condition.
- # FIXME: We are accepting a duplicate file and line info temporarely.
- # The following is equivalent to a send_gdb "000-exec-run\n"
- mi_run_cmd
- # The running part has been checked already by mi_run_cmd
- gdb_expect {
- -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"32\"\}\r\n$mi_gdb_prompt$" {
- pass "run to main"
- }
- -re ".*$mi_gdb_prompt$" {fail "run to main (2)"}
- timeout {fail "run to main (timeout 2)"}
- }
-}
-
proc test_disassembly_only {} {
global mi_gdb_prompt
global hex
@@ -212,8 +167,7 @@ proc test_disassembly_bogus_args {} {
}
-test_breakpoints_creation_and_listing
-test_running_the_program
+mi_run_to_main
test_disassembly_only
test_disassembly_mixed
test_disassembly_bogus_args
diff --git a/gdb/testsuite/gdb.mi/mi-eval.exp b/gdb/testsuite/gdb.mi/mi-eval.exp
index 2c01410..536dd79 100644
--- a/gdb/testsuite/gdb.mi/mi-eval.exp
+++ b/gdb/testsuite/gdb.mi/mi-eval.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -46,47 +46,8 @@ mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_load ${binfile}
-proc test_running_the_program {} {
- global mi_gdb_prompt
- global hex
-
- # Run the program without args, then specify srgs and rerun the program
- # Tests:
- # -exec-run
-
- mi_gdb_test "300-break-insert callee4" \
- "300\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\",times=\"0\"\}" \
- "insert breakpoint at callee4"
-
- # mi_gdb_test cannot be used for asynchronous commands because there are
- # two prompts involved and this can lead to a race condition.
- # The following is equivalent to a send_gdb "000-exec-run\n"
- mi_run_cmd
- # The running part has been checked already by mi_run_cmd
- gdb_expect {
- -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"8\"\}\r\n$mi_gdb_prompt$" \
- { pass "run to callee4" }
- -re ".*$mi_gdb_prompt$" {fail "run to callee4 (2)"}
- timeout {fail "run to callee4 (timeout 2)"}
- }
-
- send_gdb "101-exec-next\n"
- gdb_expect {
- -re "101\\^running\r\n$mi_gdb_prompt" {
- gdb_expect {
- -re "\[\r\n\]*101\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"9\"\}\r\n$mi_gdb_prompt$" \
- { pass "next in callee4" }
- -re ".*$mi_gdb_prompt$" {fail "next in callee4 (2)"}
- timeout {fail "next in callee4 (timeout 2)"}
- }
- }
- -re ".*$mi_gdb_prompt$" {fail "next in callee4 (1)"}
- timeout {fail "next in callee4 (timeout 1)"}
- }
-
-}
-
-test_running_the_program
+mi_runto callee4
+mi_next_to "callee4" "" "basics.c" "9" "next at callee4"
mi_gdb_test "211-data-evaluate-expression A" "211\\^done,value=\"1\"" "eval A"
diff --git a/gdb/testsuite/gdb.mi/mi-read-memory.exp b/gdb/testsuite/gdb.mi/mi-read-memory.exp
index b4f0c35..573c896 100644
--- a/gdb/testsuite/gdb.mi/mi-read-memory.exp
+++ b/gdb/testsuite/gdb.mi/mi-read-memory.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -46,21 +46,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
mi_run_to_main
-
-#mi_next "do initialization"
-send_gdb "101-exec-next\n"
-gdb_expect {
- -re "101\\^running\r\n$mi_gdb_prompt" {
- gdb_expect {
- -re "\[\r\n\]*101\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*mi-read-memory.c\",line=\"20\"\}.*$mi_gdb_prompt$" \
- { pass "do initialization" }
- -re ".*$mi_gdb_prompt$" {fail "do initialization (2)"}
- timeout {fail "do initialization (timeout 2)"}
- }
- }
- -re ".*$mi_gdb_prompt$" {fail "do initialization (1)"}
- timeout {fail "do initialization (timeout 1)"}
-}
+mi_next_to "main" "" "mi-read-memory.c" "20" "next at main"
mi_gdb_test "1-data-read-memory" \
"1\\^error,msg=\".*\"" \
diff --git a/gdb/testsuite/gdb.mi/mi-regs.exp b/gdb/testsuite/gdb.mi/mi-regs.exp
index c427677..a6a6406 100644
--- a/gdb/testsuite/gdb.mi/mi-regs.exp
+++ b/gdb/testsuite/gdb.mi/mi-regs.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -45,51 +45,6 @@ mi_delete_breakpoints
mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_load ${binfile}
-proc test_breakpoints_creation_and_listing {} {
- global mi_gdb_prompt
- global srcfile
- global hex
-
- # Insert some breakpoints and list them
- # Also, disable some so they do not interfere with other tests
- # Tests:
- # -break-insert
- # -break-list
- # -break-disable
- # -break-info
-
- mi_gdb_test "200-break-insert main" \
- "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}" \
- "break-insert operation"
-
- mi_gdb_test "204-break-list" \
- "204\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}\\\]\}" \
- "list of breakpoints"
-}
-
-proc test_running_the_program {} {
- global mi_gdb_prompt
- global hex
-
- # Run the program without args
- # Tests:
- # -exec-run
-
- # mi_gdb_test cannot be used for asynchronous commands because there are
- # two prompts involved and this can lead to a race condition.
- # FIXME: We are accepting a duplicate file and line info temporarely.
- # The following is equivalent to a send_gdb "000-exec-run\n"
- mi_run_cmd
- # The running part has been checked already by mi_run_cmd
- gdb_expect {
- -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"32\"\}\r\n$mi_gdb_prompt$" {
- pass "run to main"
- }
- -re ".*$mi_gdb_prompt$" {fail "run to main (2)"}
- timeout {fail "run to main (timeout 2)"}
- }
-}
-
proc sparc_register_tests_no_exec { } {
# Test the generic IDT chip.
mi_gdb_test "111-data-list-register-values" \
@@ -164,8 +119,7 @@ proc sparc_register_tests { } {
if [istarget "sparc-*-*"] then {
sparc_register_tests_no_exec
- test_breakpoints_creation_and_listing
- test_running_the_program
+ mi_run_to_main
sparc_register_tests
} else {
verbose "mi-regs.exp tests ignored for this target"
diff --git a/gdb/testsuite/gdb.mi/mi-return.exp b/gdb/testsuite/gdb.mi/mi-return.exp
index 1e7c863..ca37e9f 100644
--- a/gdb/testsuite/gdb.mi/mi-return.exp
+++ b/gdb/testsuite/gdb.mi/mi-return.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -46,33 +46,6 @@ mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_load ${binfile}
-proc test_running_to_callee4 {} {
- global mi_gdb_prompt
- global hex
-
- mi_gdb_test "200-break-insert callee4" \
- "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\",times=\"0\"\}" \
- "break-insert operation"
-
- mi_run_cmd
-
- gdb_expect {
- -re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"8\"\}\r\n$mi_gdb_prompt$" {
- pass "run to callee4"
- }
- -re ".*$mi_gdb_prompt$" {
- fail "run to callee4 (2)"
- }
- timeout {
- fail "run to callee4 (timeout)"
- }
- }
-
- mi_gdb_test "205-break-delete" \
- "205\\^done.*" \
- "delete all breakpoints"
-
-}
proc test_return_simple {} {
global mi_gdb_prompt
@@ -87,7 +60,12 @@ proc test_return_simple {} {
}
}
-test_running_to_callee4
+mi_runto callee4
+
+mi_gdb_test "205-break-delete" \
+ "205\\^done.*" \
+ "delete all breakpoints"
+
test_return_simple
mi_gdb_exit
diff --git a/gdb/testsuite/gdb.mi/mi-stack.exp b/gdb/testsuite/gdb.mi/mi-stack.exp
index 4c682e2..92c651d 100644
--- a/gdb/testsuite/gdb.mi/mi-stack.exp
+++ b/gdb/testsuite/gdb.mi/mi-stack.exp
@@ -1,4 +1,4 @@
-# Copyright 2000 Free Software Foundation, Inc.
+# Copyright 2000, 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -46,22 +46,6 @@ mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_load ${binfile}
-
-mi_gdb_test "200-break-insert callee4" \
- "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\",times=\"0\"\}" \
- "break-insert operation"
-
-mi_run_cmd
-# The running part has been checked already by mi_run_cmd
-gdb_expect {
- -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"8\"\}\r\n$mi_gdb_prompt$" {
- pass "run to callee4"
- }
- -re ".*$mi_gdb_prompt$" {fail "run to callee4 (2)"}
- timeout {fail "run to callee4 (timeout 2)"}
-}
-
-
proc test_stack_frame_listing {} {
global mi_gdb_prompt
global hex
@@ -208,6 +192,7 @@ gdb_expect {
}
+mi_runto callee4
test_stack_frame_listing
test_stack_args_listing
test_stack_locals_listing
diff --git a/gdb/testsuite/gdb.mi/mi-stepi.exp b/gdb/testsuite/gdb.mi/mi-stepi.exp
index e0de2f2..44e6442 100644
--- a/gdb/testsuite/gdb.mi/mi-stepi.exp
+++ b/gdb/testsuite/gdb.mi/mi-stepi.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -46,29 +46,6 @@ mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_load ${binfile}
-proc test_running_to_main {} {
- global mi_gdb_prompt
- global hex
-
- mi_gdb_test "200-break-insert main" \
- "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}" \
- "break-insert operation"
-
- mi_run_cmd
-
- gdb_expect {
- -re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"32\"\}\r\n$mi_gdb_prompt$" {
- pass "run to main"
- }
- -re ".*$mi_gdb_prompt$" {
- fail "run to main (2)"
- }
- timeout {
- fail "run to main (timeout)"
- }
- }
-}
-
proc test_stepi_nexti {} {
global mi_gdb_prompt
global hex
@@ -102,7 +79,7 @@ proc test_stepi_nexti {} {
}
}
-test_running_to_main
+mi_run_to_main
test_stepi_nexti
mi_gdb_exit
diff --git a/gdb/testsuite/gdb.mi/mi-var-block.exp b/gdb/testsuite/gdb.mi/mi-var-block.exp
index 506275c..a0b456a 100644
--- a/gdb/testsuite/gdb.mi/mi-var-block.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-block.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
#
# This Program Is Free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -42,19 +42,7 @@ mi_delete_breakpoints
mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_load ${binfile}
-mi_gdb_test "200-break-insert do_block_tests" \
- "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_block_tests\",file=\".*var-cmd.c\",line=\"154\",times=\"0\"\}" \
- "break-insert operation"
-
-mi_run_cmd
-# The running part has been checked already by mi_run_cmd
-gdb_expect {
- -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"154\"\}\r\n$mi_gdb_prompt$" {
- pass "run to do_block_tests"
- }
- -re ".*$mi_gdb_prompt$" {fail "run to do_block_tests (2)"}
- timeout {fail "run to do_block_tests (timeout 2)"}
-}
+mi_runto do_block_tests
# Test: c_variable-3.2
# Desc: create cb and foo
@@ -67,15 +55,7 @@ mi_gdb_test "-var-create foo * foo" \
"create local variable foo"
# step to "foo = 123;"
-send_gdb "-exec-step\n"
-gdb_expect {
- -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"158\"\}\r\n$mi_gdb_prompt$" {
- pass "step at do_block_tests"
- }
- timeout {
- fail "step at do_block_tests (timeout)"
- }
-}
+mi_step_to "do_block_tests" "" "var-cmd.c" "158" "step at do_block_test"
# Be paranoid and assume 3.2 created foo
@@ -91,15 +71,7 @@ mi_gdb_test "-var-create foo * foo" \
"create local variable foo"
# step to "foo2 = 123;"
-send_gdb "-exec-step\n"
-gdb_expect {
- -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"161\"\}\r\n$mi_gdb_prompt$" {
- pass "step at do_block_tests"
- }
- timeout {
- fail "step at do_block_tests (timeout)"
- }
-}
+mi_step_to "do_block_tests" "" "var-cmd.c" "161" "step at do_block_test"
# Test: c_variable-3.4
# Desc: check foo, cb changed
@@ -108,15 +80,7 @@ mi_gdb_test "-var-update *" \
"update all vars: cb foo changed"
# step to "foo = 321;"
-send_gdb "-exec-step\n"
-gdb_expect {
- -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"164\"\}\r\n$mi_gdb_prompt$" {
- pass "step at do_block_tests"
- }
- timeout {
- fail "step at do_block_tests (timeout)"
- }
-}
+mi_step_to "do_block_tests" "" "var-cmd.c" "164" "step at do_block_test"
# Test: c_variable-3.5
# Desc: create inner block foo
@@ -125,13 +89,7 @@ mi_gdb_test "-var-create inner_foo * foo" \
"create local variable inner_foo"
# step to "foo2 = 0;"
-send_gdb "-exec-step\n"
-gdb_expect {
- -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"166\"\}\r\n$mi_gdb_prompt$" {
- pass "step at do_block_tests"
- }
- timeout { fail "step at do_block_tests (timeout)" }
-}
+mi_step_to "do_block_tests" "" "var-cmd.c" "166" "step at do_block_test"
# Test: c_variable-3.6
# Desc: create foo2
@@ -163,13 +121,7 @@ mi_gdb_test "-var-delete inner_foo" \
"delete var inner_foo"
# step to "foo = 0;"
-send_gdb "-exec-step\n"
-gdb_expect {
- -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"168\"\}\r\n$mi_gdb_prompt$" {
- pass "step at do_block_tests"
- }
- timeout { fail "step at do_block_tests (timeout)" }
-}
+mi_step_to "do_block_tests" "" "var-cmd.c" "168" "step at do_block_test"
# Test: c_variable-3.8
# Desc: check that foo2 out of scope (known gdb problem)
@@ -180,14 +132,7 @@ mi_gdb_test "-var-update foo2" \
clear_xfail *-*-*
# step to "cb = 21;"
-send_gdb "-exec-step\n"
-gdb_expect {
- -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"171\"\}\r\n$mi_gdb_prompt$" {
- pass "step at do_block_tests"
- }
- timeout { fail "step at do_block_tests (timeout)" }
-}
-
+mi_step_to "do_block_tests" "" "var-cmd.c" "171" "step at do_block_test"
# Test: c_variable-3.9
# Desc: check that only cb is in scope (known gdb problem)
diff --git a/gdb/testsuite/gdb.mi/mi-var-cmd.exp b/gdb/testsuite/gdb.mi/mi-var-cmd.exp
index 1902793..7d02b36 100644
--- a/gdb/testsuite/gdb.mi/mi-var-cmd.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-cmd.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
#
# This Program Is Free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -70,19 +70,7 @@ mi_gdb_test "113-var-create argc * argc" \
"&\"mi_cmd_var_create: unable to create variable object\\\\n\".*113\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
"create out of scope variable"
-mi_gdb_test "200-break-insert do_locals_tests" \
- "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_locals_tests\",file=\".*var-cmd.c\",line=\"106\",times=\"0\"\}" \
- "break-insert operation"
-
-mi_run_cmd
-# The running part has been checked already by mi_run_cmd
-gdb_expect {
- -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_locals_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"106\"\}\r\n$mi_gdb_prompt$" {
- pass "run to do_locals_tests"
- }
- -re ".*$mi_gdb_prompt$" {fail "run to do_locals_tests (2)"}
- timeout {fail "run to do_locals_tests (timeout 2)"}
-}
+mi_runto do_locals_tests
# Test: c_variable-1.4
# Desc: create local variables
diff --git a/gdb/testsuite/gdb.mi/mi-watch.exp b/gdb/testsuite/gdb.mi/mi-watch.exp
index 25db598..ba24399 100644
--- a/gdb/testsuite/gdb.mi/mi-watch.exp
+++ b/gdb/testsuite/gdb.mi/mi-watch.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -115,31 +115,6 @@ proc test_rwatch_creation_and_listing {} {
"delete read watchpoint"
}
-proc test_running_the_program {} {
- global mi_gdb_prompt
- global hex
-
- # Run the program without args, then specify srgs and rerun the program
- # Tests:
- # -exec-run
-
- mi_gdb_test "300-break-insert callee4" \
- "300\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\",times=\"0\"\}" \
- "insert breakpoint at callee4"
-
- # mi_gdb_test cannot be used for asynchronous commands because there are
- # two prompts involved and this can lead to a race condition.
- # The following is equivalent to a send_gdb "000-exec-run\n"
- mi_run_cmd
- # The running part has been checked already by mi_run_cmd
- gdb_expect {
- -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"8\"\}\r\n$mi_gdb_prompt$" \
- { pass "run to callee4" }
- -re ".*$mi_gdb_prompt$" {fail "run to callee4 (2)"}
- timeout {fail "run to callee4 (timeout 2)"}
- }
-}
-
proc test_watchpoint_triggering {} {
global mi_gdb_prompt
global hex
@@ -181,7 +156,7 @@ proc test_watchpoint_triggering {} {
}
}
-test_running_the_program
+mi_runto callee4
test_watchpoint_creation_and_listing
#test_rwatch_creation_and_listing
#test_awatch_creation_and_listing
diff --git a/gdb/testsuite/gdb.mi/mi1-console.exp b/gdb/testsuite/gdb.mi/mi1-console.exp
index 5a6d6f2..25af50a 100644
--- a/gdb/testsuite/gdb.mi/mi1-console.exp
+++ b/gdb/testsuite/gdb.mi/mi1-console.exp
@@ -51,22 +51,7 @@ mi_delete_breakpoints
mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_load ${binfile}
-# Halt in main
-mi_gdb_test "200-break-insert main" \
- "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*mi-console.c\",line=\"13\",times=\"0\"\}" \
- "break-insert operation"
-mi_run_cmd
-gdb_expect {
- -re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*mi-console.c\",line=\"13\"\}\r\n$mi_gdb_prompt$" {
- pass "run to main"
- }
- -re ".*$mi_gdb_prompt$" {
- fail "run to main (2)"
- }
- timeout {
- fail "run to main (timeout)"
- }
-}
+mi_run_to_main
# Next over the hello() call which will produce lots of output
send_gdb "47-exec-next\n"
diff --git a/gdb/testsuite/gdb.mi/mi1-disassemble.exp b/gdb/testsuite/gdb.mi/mi1-disassemble.exp
index 65af76d..7292a35 100644
--- a/gdb/testsuite/gdb.mi/mi1-disassemble.exp
+++ b/gdb/testsuite/gdb.mi/mi1-disassemble.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -43,51 +43,6 @@ mi_delete_breakpoints
mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_load ${binfile}
-proc test_breakpoints_creation_and_listing {} {
- global mi_gdb_prompt
- global srcfile
- global hex
-
- # Insert some breakpoints and list them
- # Also, disable some so they do not interfere with other tests
- # Tests:
- # -break-insert
- # -break-list
- # -break-disable
- # -break-info
-
- mi_gdb_test "200-break-insert main" \
- "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}" \
- "break-insert operation"
-
- mi_gdb_test "204-break-list" \
- "204\\^done,BreakpointTable=\{.*,body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}\\\]\}" \
- "list of breakpoints"
-}
-
-proc test_running_the_program {} {
- global mi_gdb_prompt
- global hex
-
- # Run the program without args
- # Tests:
- # -exec-run
-
- # mi_gdb_test cannot be used for asynchronous commands because there are
- # two prompts involved and this can lead to a race condition.
- # FIXME: We are accepting a duplicate file and line info temporarely.
- # The following is equivalent to a send_gdb "000-exec-run\n"
- mi_run_cmd
- # The running part has been checked already by mi_run_cmd
- gdb_expect {
- -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"32\"\}\r\n$mi_gdb_prompt$" {
- pass "run to main"
- }
- -re ".*$mi_gdb_prompt$" {fail "run to main (2)"}
- timeout {fail "run to main (timeout 2)"}
- }
-}
-
proc test_disassembly_only {} {
global mi_gdb_prompt
global hex
@@ -212,8 +167,7 @@ proc test_disassembly_bogus_args {} {
}
-test_breakpoints_creation_and_listing
-test_running_the_program
+mi_run_to_main
test_disassembly_only
test_disassembly_mixed
test_disassembly_bogus_args
diff --git a/gdb/testsuite/gdb.mi/mi1-eval.exp b/gdb/testsuite/gdb.mi/mi1-eval.exp
index 898c7b7..330e00d 100644
--- a/gdb/testsuite/gdb.mi/mi1-eval.exp
+++ b/gdb/testsuite/gdb.mi/mi1-eval.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -46,47 +46,8 @@ mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_load ${binfile}
-proc test_running_the_program {} {
- global mi_gdb_prompt
- global hex
-
- # Run the program without args, then specify srgs and rerun the program
- # Tests:
- # -exec-run
-
- mi_gdb_test "300-break-insert callee4" \
- "300\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\",times=\"0\"\}" \
- "insert breakpoint at callee4"
-
- # mi_gdb_test cannot be used for asynchronous commands because there are
- # two prompts involved and this can lead to a race condition.
- # The following is equivalent to a send_gdb "000-exec-run\n"
- mi_run_cmd
- # The running part has been checked already by mi_run_cmd
- gdb_expect {
- -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"8\"\}\r\n$mi_gdb_prompt$" \
- { pass "run to callee4" }
- -re ".*$mi_gdb_prompt$" {fail "run to callee4 (2)"}
- timeout {fail "run to callee4 (timeout 2)"}
- }
-
- send_gdb "101-exec-next\n"
- gdb_expect {
- -re "101\\^running\r\n$mi_gdb_prompt" {
- gdb_expect {
- -re "\[\r\n\]*101\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"9\"\}\r\n$mi_gdb_prompt$" \
- { pass "next in callee4" }
- -re ".*$mi_gdb_prompt$" {fail "next in callee4 (2)"}
- timeout {fail "next in callee4 (timeout 2)"}
- }
- }
- -re ".*$mi_gdb_prompt$" {fail "next in callee4 (1)"}
- timeout {fail "next in callee4 (timeout 1)"}
- }
-
-}
-
-test_running_the_program
+mi_runto callee4
+mi_next_to "callee4" "" "basics.c" "9" "next at callee4"
mi_gdb_test "211-data-evaluate-expression A" "211\\^done,value=\"1\"" "eval A"
diff --git a/gdb/testsuite/gdb.mi/mi1-read-memory.exp b/gdb/testsuite/gdb.mi/mi1-read-memory.exp
index 2796078..9a0acf4 100644
--- a/gdb/testsuite/gdb.mi/mi1-read-memory.exp
+++ b/gdb/testsuite/gdb.mi/mi1-read-memory.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -48,19 +48,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
mi_run_to_main
#mi_next "do initialization"
-send_gdb "101-exec-next\n"
-gdb_expect {
- -re "101\\^running\r\n$mi_gdb_prompt" {
- gdb_expect {
- -re "\[\r\n\]*101\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*mi-read-memory.c\",line=\"20\"\}.*$mi_gdb_prompt$" \
- { pass "do initialization" }
- -re ".*$mi_gdb_prompt$" {fail "do initialization (2)"}
- timeout {fail "do initialization (timeout 2)"}
- }
- }
- -re ".*$mi_gdb_prompt$" {fail "do initialization (1)"}
- timeout {fail "do initialization (timeout 1)"}
-}
+
+mi_next_to "main" "" "mi-read-memory.c" "20" "next at main"
mi_gdb_test "1-data-read-memory" \
"1\\^error,msg=\".*\"" \
diff --git a/gdb/testsuite/gdb.mi/mi1-regs.exp b/gdb/testsuite/gdb.mi/mi1-regs.exp
index b4baa18..bf59907 100644
--- a/gdb/testsuite/gdb.mi/mi1-regs.exp
+++ b/gdb/testsuite/gdb.mi/mi1-regs.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -45,51 +45,6 @@ mi_delete_breakpoints
mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_load ${binfile}
-proc test_breakpoints_creation_and_listing {} {
- global mi_gdb_prompt
- global srcfile
- global hex
-
- # Insert some breakpoints and list them
- # Also, disable some so they do not interfere with other tests
- # Tests:
- # -break-insert
- # -break-list
- # -break-disable
- # -break-info
-
- mi_gdb_test "200-break-insert main" \
- "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}" \
- "break-insert operation"
-
- mi_gdb_test "204-break-list" \
- "204\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}\\\]\}" \
- "list of breakpoints"
-}
-
-proc test_running_the_program {} {
- global mi_gdb_prompt
- global hex
-
- # Run the program without args
- # Tests:
- # -exec-run
-
- # mi_gdb_test cannot be used for asynchronous commands because there are
- # two prompts involved and this can lead to a race condition.
- # FIXME: We are accepting a duplicate file and line info temporarely.
- # The following is equivalent to a send_gdb "000-exec-run\n"
- mi_run_cmd
- # The running part has been checked already by mi_run_cmd
- gdb_expect {
- -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"32\"\}\r\n$mi_gdb_prompt$" {
- pass "run to main"
- }
- -re ".*$mi_gdb_prompt$" {fail "run to main (2)"}
- timeout {fail "run to main (timeout 2)"}
- }
-}
-
proc sparc_register_tests_no_exec { } {
# Test the generic IDT chip.
mi_gdb_test "111-data-list-register-values" \
@@ -164,8 +119,7 @@ proc sparc_register_tests { } {
if [istarget "sparc-*-*"] then {
sparc_register_tests_no_exec
- test_breakpoints_creation_and_listing
- test_running_the_program
+ mi_run_to_main
sparc_register_tests
} else {
verbose "mi-regs.exp tests ignored for this target"
diff --git a/gdb/testsuite/gdb.mi/mi1-return.exp b/gdb/testsuite/gdb.mi/mi1-return.exp
index 0fcbbfe..539a61c 100644
--- a/gdb/testsuite/gdb.mi/mi1-return.exp
+++ b/gdb/testsuite/gdb.mi/mi1-return.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -46,33 +46,6 @@ mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_load ${binfile}
-proc test_running_to_callee4 {} {
- global mi_gdb_prompt
- global hex
-
- mi_gdb_test "200-break-insert callee4" \
- "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\",times=\"0\"\}" \
- "break-insert operation"
-
- mi_run_cmd
-
- gdb_expect {
- -re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"8\"\}\r\n$mi_gdb_prompt$" {
- pass "run to callee4"
- }
- -re ".*$mi_gdb_prompt$" {
- fail "run to callee4 (2)"
- }
- timeout {
- fail "run to callee4 (timeout)"
- }
- }
-
- mi_gdb_test "205-break-delete" \
- "205\\^done.*" \
- "delete all breakpoints"
-
-}
proc test_return_simple {} {
global mi_gdb_prompt
@@ -87,7 +60,12 @@ proc test_return_simple {} {
}
}
-test_running_to_callee4
+mi_runto callee4
+
+mi_gdb_test "205-break-delete" \
+ "205\\^done.*" \
+ "delete all breakpoints"
+
test_return_simple
mi_gdb_exit
diff --git a/gdb/testsuite/gdb.mi/mi1-stack.exp b/gdb/testsuite/gdb.mi/mi1-stack.exp
index 45b8b83..b8c7cab 100644
--- a/gdb/testsuite/gdb.mi/mi1-stack.exp
+++ b/gdb/testsuite/gdb.mi/mi1-stack.exp
@@ -1,4 +1,4 @@
-# Copyright 2000 Free Software Foundation, Inc.
+# Copyright 2000, 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -46,22 +46,6 @@ mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_load ${binfile}
-
-mi_gdb_test "200-break-insert callee4" \
- "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\",times=\"0\"\}" \
- "break-insert operation"
-
-mi_run_cmd
-# The running part has been checked already by mi_run_cmd
-gdb_expect {
- -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"8\"\}\r\n$mi_gdb_prompt$" {
- pass "run to callee4"
- }
- -re ".*$mi_gdb_prompt$" {fail "run to callee4 (2)"}
- timeout {fail "run to callee4 (timeout 2)"}
-}
-
-
proc test_stack_frame_listing {} {
global mi_gdb_prompt
global hex
@@ -208,6 +192,7 @@ gdb_expect {
}
+mi_runto callee4
test_stack_frame_listing
test_stack_args_listing
test_stack_locals_listing
diff --git a/gdb/testsuite/gdb.mi/mi1-stepi.exp b/gdb/testsuite/gdb.mi/mi1-stepi.exp
index 5634479..a706637 100644
--- a/gdb/testsuite/gdb.mi/mi1-stepi.exp
+++ b/gdb/testsuite/gdb.mi/mi1-stepi.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -46,29 +46,6 @@ mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_load ${binfile}
-proc test_running_to_main {} {
- global mi_gdb_prompt
- global hex
-
- mi_gdb_test "200-break-insert main" \
- "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}" \
- "break-insert operation"
-
- mi_run_cmd
-
- gdb_expect {
- -re "000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*basics.c\",line=\"32\"\}\r\n$mi_gdb_prompt$" {
- pass "run to main"
- }
- -re ".*$mi_gdb_prompt$" {
- fail "run to main (2)"
- }
- timeout {
- fail "run to main (timeout)"
- }
- }
-}
-
proc test_stepi_nexti {} {
global mi_gdb_prompt
global hex
@@ -102,7 +79,7 @@ proc test_stepi_nexti {} {
}
}
-test_running_to_main
+mi_run_to_main
test_stepi_nexti
mi_gdb_exit
diff --git a/gdb/testsuite/gdb.mi/mi1-var-block.exp b/gdb/testsuite/gdb.mi/mi1-var-block.exp
index 1478280..0ff9356 100644
--- a/gdb/testsuite/gdb.mi/mi1-var-block.exp
+++ b/gdb/testsuite/gdb.mi/mi1-var-block.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
#
# This Program Is Free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -42,19 +42,7 @@ mi_delete_breakpoints
mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_load ${binfile}
-mi_gdb_test "200-break-insert do_block_tests" \
- "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_block_tests\",file=\".*var-cmd.c\",line=\"154\",times=\"0\"\}" \
- "break-insert operation"
-
-mi_run_cmd
-# The running part has been checked already by mi_run_cmd
-gdb_expect {
- -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"154\"\}\r\n$mi_gdb_prompt$" {
- pass "run to do_block_tests"
- }
- -re ".*$mi_gdb_prompt$" {fail "run to do_block_tests (2)"}
- timeout {fail "run to do_block_tests (timeout 2)"}
-}
+mi_runto do_block_tests
# Test: c_variable-3.2
# Desc: create cb and foo
@@ -67,15 +55,7 @@ mi_gdb_test "-var-create foo * foo" \
"create local variable foo"
# step to "foo = 123;"
-send_gdb "-exec-step\n"
-gdb_expect {
- -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"158\"\}\r\n$mi_gdb_prompt$" {
- pass "step at do_block_tests"
- }
- timeout {
- fail "step at do_block_tests (timeout)"
- }
-}
+mi_step_to "do_block_tests" "" "var-cmd.c" "158" "step at do_block_test"
# Be paranoid and assume 3.2 created foo
@@ -91,15 +71,7 @@ mi_gdb_test "-var-create foo * foo" \
"create local variable foo"
# step to "foo2 = 123;"
-send_gdb "-exec-step\n"
-gdb_expect {
- -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"161\"\}\r\n$mi_gdb_prompt$" {
- pass "step at do_block_tests"
- }
- timeout {
- fail "step at do_block_tests (timeout)"
- }
-}
+mi_step_to "do_block_tests" "" "var-cmd.c" "161" "step at do_block_test"
# Test: c_variable-3.4
# Desc: check foo, cb changed
@@ -108,15 +80,7 @@ mi_gdb_test "-var-update *" \
"update all vars: cb foo changed"
# step to "foo = 321;"
-send_gdb "-exec-step\n"
-gdb_expect {
- -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"164\"\}\r\n$mi_gdb_prompt$" {
- pass "step at do_block_tests"
- }
- timeout {
- fail "step at do_block_tests (timeout)"
- }
-}
+mi_step_to "do_block_tests" "" "var-cmd.c" "164" "step at do_block_test"
# Test: c_variable-3.5
# Desc: create inner block foo
@@ -125,13 +89,7 @@ mi_gdb_test "-var-create inner_foo * foo" \
"create local variable inner_foo"
# step to "foo2 = 0;"
-send_gdb "-exec-step\n"
-gdb_expect {
- -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"166\"\}\r\n$mi_gdb_prompt$" {
- pass "step at do_block_tests"
- }
- timeout { fail "step at do_block_tests (timeout)" }
-}
+mi_step_to "do_block_tests" "" "var-cmd.c" "166" "step at do_block_test"
# Test: c_variable-3.6
# Desc: create foo2
@@ -163,13 +121,7 @@ mi_gdb_test "-var-delete inner_foo" \
"delete var inner_foo"
# step to "foo = 0;"
-send_gdb "-exec-step\n"
-gdb_expect {
- -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"168\"\}\r\n$mi_gdb_prompt$" {
- pass "step at do_block_tests"
- }
- timeout { fail "step at do_block_tests (timeout)" }
-}
+mi_step_to "do_block_tests" "" "var-cmd.c" "168" "step at do_block_test"
# Test: c_variable-3.8
# Desc: check that foo2 out of scope (known gdb problem)
@@ -180,14 +132,7 @@ mi_gdb_test "-var-update foo2" \
clear_xfail *-*-*
# step to "cb = 21;"
-send_gdb "-exec-step\n"
-gdb_expect {
- -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"171\"\}\r\n$mi_gdb_prompt$" {
- pass "step at do_block_tests"
- }
- timeout { fail "step at do_block_tests (timeout)" }
-}
-
+mi_step_to "do_block_tests" "" "var-cmd.c" "171" "step at do_block_test"
# Test: c_variable-3.9
# Desc: check that only cb is in scope (known gdb problem)
diff --git a/gdb/testsuite/gdb.mi/mi1-var-cmd.exp b/gdb/testsuite/gdb.mi/mi1-var-cmd.exp
index 0f0d522..c6a88b6 100644
--- a/gdb/testsuite/gdb.mi/mi1-var-cmd.exp
+++ b/gdb/testsuite/gdb.mi/mi1-var-cmd.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
#
# This Program Is Free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -70,19 +70,7 @@ mi_gdb_test "113-var-create argc * argc" \
"&\"mi_cmd_var_create: unable to create variable object\\\\n\".*113\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
"create out of scope variable"
-mi_gdb_test "200-break-insert do_locals_tests" \
- "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_locals_tests\",file=\".*var-cmd.c\",line=\"106\",times=\"0\"\}" \
- "break-insert operation"
-
-mi_run_cmd
-# The running part has been checked already by mi_run_cmd
-gdb_expect {
- -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_locals_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"106\"\}\r\n$mi_gdb_prompt$" {
- pass "run to do_locals_tests"
- }
- -re ".*$mi_gdb_prompt$" {fail "run to do_locals_tests (2)"}
- timeout {fail "run to do_locals_tests (timeout 2)"}
-}
+mi_runto do_locals_tests
# Test: c_variable-1.4
# Desc: create local variables
diff --git a/gdb/testsuite/gdb.mi/mi1-watch.exp b/gdb/testsuite/gdb.mi/mi1-watch.exp
index 937eb2c..dfb97ae 100644
--- a/gdb/testsuite/gdb.mi/mi1-watch.exp
+++ b/gdb/testsuite/gdb.mi/mi1-watch.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -115,31 +115,6 @@ proc test_rwatch_creation_and_listing {} {
"delete read watchpoint"
}
-proc test_running_the_program {} {
- global mi_gdb_prompt
- global hex
-
- # Run the program without args, then specify srgs and rerun the program
- # Tests:
- # -exec-run
-
- mi_gdb_test "300-break-insert callee4" \
- "300\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\",times=\"0\"\}" \
- "insert breakpoint at callee4"
-
- # mi_gdb_test cannot be used for asynchronous commands because there are
- # two prompts involved and this can lead to a race condition.
- # The following is equivalent to a send_gdb "000-exec-run\n"
- mi_run_cmd
- # The running part has been checked already by mi_run_cmd
- gdb_expect {
- -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"callee4\",args=\\\[\\\],file=\".*basics.c\",line=\"8\"\}\r\n$mi_gdb_prompt$" \
- { pass "run to callee4" }
- -re ".*$mi_gdb_prompt$" {fail "run to callee4 (2)"}
- timeout {fail "run to callee4 (timeout 2)"}
- }
-}
-
proc test_watchpoint_triggering {} {
global mi_gdb_prompt
global hex
@@ -181,7 +156,7 @@ proc test_watchpoint_triggering {} {
}
}
-test_running_the_program
+mi_runto callee4
test_watchpoint_creation_and_listing
#test_rwatch_creation_and_listing
#test_awatch_creation_and_listing
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index 0395afa..de775b6 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -123,7 +123,26 @@ proc mi_gdb_start { } {
return 1;
}
gdb_expect {
- -re ".*$mi_gdb_prompt$" {
+ -re "~\"GNU.*\r\n~\".*$mi_gdb_prompt$" {
+ # We have a new format mi startup prompt. If we are
+ # running mi1, then this is an error as we should be
+ # using the old-style prompt.
+ if { $MIFLAGS == "-i=mi1" } {
+ perror "(mi startup) Got unexpected new mi prompt."
+ remote_close host;
+ return -1;
+ }
+ verbose "GDB initialized."
+ }
+ -re "\[^~\].*$mi_gdb_prompt$" {
+ # We have an old format mi startup prompt. If we are
+ # not running mi1, then this is an error as we should be
+ # using the new-style prompt.
+ if { $MIFLAGS != "-i=mi1" } {
+ perror "(mi startup) Got unexpected old mi prompt."
+ remote_close host;
+ return -1;
+ }
verbose "GDB initialized."
}
-re ".*$gdb_prompt $" {
diff --git a/gdb/thread-db.c b/gdb/thread-db.c
index d38db74..9338c57 100644
--- a/gdb/thread-db.c
+++ b/gdb/thread-db.c
@@ -32,6 +32,7 @@
#include "objfiles.h"
#include "target.h"
#include "regcache.h"
+#include "solib-svr4.h"
#ifndef LIBTHREAD_DB_SO
#define LIBTHREAD_DB_SO "libthread_db.so.1"
@@ -108,6 +109,11 @@ static td_err_e (*td_thr_setgregs_p) (const td_thrhandle_t *th,
prgregset_t gregs);
static td_err_e (*td_thr_event_enable_p) (const td_thrhandle_t *th, int event);
+static td_err_e (*td_thr_tls_get_addr_p) (const td_thrhandle_t *th,
+ void *map_address,
+ size_t offset,
+ void **address);
+
/* Location of the thread creation event breakpoint. The code at this
location in the child process will be called by the pthread library
whenever a new thread is created. By setting a special breakpoint
@@ -348,6 +354,7 @@ thread_db_load (void)
td_ta_set_event_p = dlsym (handle, "td_ta_set_event");
td_ta_event_getmsg_p = dlsym (handle, "td_ta_event_getmsg");
td_thr_event_enable_p = dlsym (handle, "td_thr_event_enable");
+ td_thr_tls_get_addr_p = dlsym (handle, "td_thr_tls_get_addr");
return 1;
}
@@ -829,7 +836,7 @@ thread_db_store_registers (int regno)
{
char raw[MAX_REGISTER_RAW_SIZE];
- read_register_gen (regno, raw);
+ deprecated_read_register_gen (regno, raw);
thread_db_fetch_registers (-1);
supply_register (regno, raw);
}
@@ -1003,6 +1010,97 @@ thread_db_pid_to_str (ptid_t ptid)
return normal_pid_to_str (ptid);
}
+/* Get the address of the thread local variable in OBJFILE which is
+ stored at OFFSET within the thread local storage for thread PTID. */
+
+static CORE_ADDR
+thread_db_get_thread_local_address (ptid_t ptid, struct objfile *objfile,
+ CORE_ADDR offset)
+{
+ if (is_thread (ptid))
+ {
+ int objfile_is_library = (objfile->flags & OBJF_SHARED);
+ td_err_e err;
+ td_thrhandle_t th;
+ void *address;
+ CORE_ADDR lm;
+
+ /* glibc doesn't provide the needed interface. */
+ if (! td_thr_tls_get_addr_p)
+ error ("Cannot find thread-local variables in this thread library.");
+
+ /* Get the address of the link map for this objfile. */
+ lm = svr4_fetch_objfile_link_map (objfile);
+
+ /* Whoops, we couldn't find one. Bail out. */
+ if (!lm)
+ {
+ if (objfile_is_library)
+ error ("Cannot find shared library `%s' link_map in dynamic"
+ " linker's module list", objfile->name);
+ else
+ error ("Cannot find executable file `%s' link_map in dynamic"
+ " linker's module list", objfile->name);
+ }
+
+ /* Get info about the thread. */
+ err = td_ta_map_id2thr_p (thread_agent, GET_THREAD (ptid), &th);
+ if (err != TD_OK)
+ error ("Cannot find thread %ld: %s",
+ (long) GET_THREAD (ptid), thread_db_err_str (err));
+
+ /* Finally, get the address of the variable. */
+ err = td_thr_tls_get_addr_p (&th, (void *) lm, offset, &address);
+
+#ifdef THREAD_DB_HAS_TD_NOTALLOC
+ /* The memory hasn't been allocated, yet. */
+ if (err == TD_NOTALLOC)
+ {
+ /* Now, if libthread_db provided the initialization image's
+ address, we *could* try to build a non-lvalue value from
+ the initialization image. */
+ if (objfile_is_library)
+ error ("The inferior has not yet allocated storage for"
+ " thread-local variables in\n"
+ "the shared library `%s'\n"
+ "for the thread %ld",
+ objfile->name, (long) GET_THREAD (ptid));
+ else
+ error ("The inferior has not yet allocated storage for"
+ " thread-local variables in\n"
+ "the executable `%s'\n"
+ "for the thread %ld",
+ objfile->name, (long) GET_THREAD (ptid));
+ }
+#endif
+
+ /* Something else went wrong. */
+ if (err != TD_OK)
+ {
+ if (objfile_is_library)
+ error ("Cannot find thread-local storage for thread %ld, "
+ "shared library %s:\n%s",
+ (long) GET_THREAD (ptid),
+ objfile->name,
+ thread_db_err_str (err));
+ else
+ error ("Cannot find thread-local storage for thread %ld, "
+ "executable file %s:\n%s",
+ (long) GET_THREAD (ptid),
+ objfile->name,
+ thread_db_err_str (err));
+ }
+
+ /* Cast assuming host == target. Joy. */
+ return (CORE_ADDR) address;
+ }
+
+ if (target_beneath->to_get_thread_local_address)
+ return target_beneath->to_get_thread_local_address (ptid, objfile, offset);
+
+ error ("Cannot find thread-local values on this target.");
+}
+
static void
init_thread_db_ops (void)
{
@@ -1025,6 +1123,8 @@ init_thread_db_ops (void)
thread_db_ops.to_pid_to_str = thread_db_pid_to_str;
thread_db_ops.to_stratum = thread_stratum;
thread_db_ops.to_has_thread_control = tc_schedlock;
+ thread_db_ops.to_get_thread_local_address
+ = thread_db_get_thread_local_address;
thread_db_ops.to_magic = OPS_MAGIC;
}
diff --git a/gdb/tui/ChangeLog b/gdb/tui/ChangeLog
index 8fdc4bc..df138d0 100644
--- a/gdb/tui/ChangeLog
+++ b/gdb/tui/ChangeLog
@@ -1,3 +1,25 @@
+2002-11-10 Andrew Cagney <ac131313@redhat.com>
+
+ * tuiStack.c (tuiShowFrameInfo): Replace frame_in_dummy with
+ deprecated_frame_in_dummy.
+
+2002-10-26 Stephane Carrez <stcarrez@nerim.fr>
+
+ * tuiIO.c (tui_prep_terminal): Save the prompt registered in readline.
+ (tui_redisplay_readline): Use the last saved prompt.
+ (tui_rl_saved_prompt): New.
+
+2002-10-25 Stephane Carrez <stcarrez@nerim.fr>
+
+ Fix PR gdb/787
+ * tuiWin.c (ACS_LRCORNER, ACS_LLCORNER, ACS_ULCORNER, ACS_URCORNER,
+ ACS_HLINE, ACS_VLINE): Define if they don't exist.
+
+2002-10-25 Stephane Carrez <stcarrez@nerim.fr>
+
+ Fix PR gdb/478
+ * tuiIO.c (tui_initialize_io): Use setvbuf since this is portable.
+
2002-10-02 Elena Zannoni <ezannoni@redhat.com>
* tui-hooks.c (selected_frame_level_changed_hook): Use the one
diff --git a/gdb/tui/tuiIO.c b/gdb/tui/tuiIO.c
index f70df8f..b9b373c 100644
--- a/gdb/tui/tuiIO.c
+++ b/gdb/tui/tuiIO.c
@@ -124,6 +124,10 @@ static FILE *tui_old_rl_outstream;
static int tui_readline_pipe[2];
#endif
+/* The last gdb prompt that was registered in readline.
+ This may be the main gdb prompt or a secondary prompt. */
+static char *tui_rl_saved_prompt;
+
static unsigned int _tuiHandleResizeDuringIO (unsigned int);
static void
@@ -194,7 +198,7 @@ tui_redisplay_readline (void)
if (tui_current_key_mode == tui_single_key_mode)
prompt = "";
else
- prompt = get_prompt ();
+ prompt = tui_rl_saved_prompt;
c_pos = -1;
c_line = -1;
@@ -256,10 +260,15 @@ tui_redisplay_readline (void)
}
/* Readline callback to prepare the terminal. It is called once
- each time we enter readline. There is nothing to do in curses mode. */
+ each time we enter readline. Terminal is already setup in curses mode. */
static void
tui_prep_terminal (void)
{
+ /* Save the prompt registered in readline to correctly display it.
+ (we can't use gdb_prompt() due to secondary prompts and can't use
+ rl_prompt because it points to an alloca buffer). */
+ xfree (tui_rl_saved_prompt);
+ tui_rl_saved_prompt = xstrdup (rl_prompt);
}
/* Readline callback to restore the terminal. It is called once
@@ -600,7 +609,7 @@ tui_initialize_io ()
fprintf_unfiltered (gdb_stderr, "Cannot redirect readline output");
exit (1);
}
- setlinebuf (tui_rl_outstream);
+ setvbuf (tui_rl_outstream, (char*) NULL, _IOLBF, 0);
#ifdef O_NONBLOCK
(void) fcntl (tui_readline_pipe[0], F_SETFL, O_NONBLOCK);
diff --git a/gdb/tui/tuiStack.c b/gdb/tui/tuiStack.c
index 1d3856d..506cdab 100644
--- a/gdb/tui/tuiStack.c
+++ b/gdb/tui/tuiStack.c
@@ -352,7 +352,7 @@ tuiShowFrameInfo (struct frame_info *fi)
sal = find_pc_line (fi->pc,
(fi->next != (struct frame_info *) NULL &&
!fi->next->signal_handler_caller &&
- !frame_in_dummy (fi->next)));
+ !deprecated_frame_in_dummy (fi->next)));
sourceAlreadyDisplayed = sal.symtab != 0
&& tuiSourceIsDisplayed (sal.symtab->filename);
diff --git a/gdb/tui/tuiWin.c b/gdb/tui/tuiWin.c
index 38283b5..484c60a 100644
--- a/gdb/tui/tuiWin.c
+++ b/gdb/tui/tuiWin.c
@@ -96,6 +96,25 @@ static void _parseScrollingArgs (char *, TuiWinInfoPtr *, int *);
** PUBLIC FUNCTIONS
***************************************/
+#ifndef ACS_LRCORNER
+# define ACS_LRCORNER '+'
+#endif
+#ifndef ACS_LLCORNER
+# define ACS_LLCORNER '+'
+#endif
+#ifndef ACS_ULCORNER
+# define ACS_ULCORNER '+'
+#endif
+#ifndef ACS_URCORNER
+# define ACS_URCORNER '+'
+#endif
+#ifndef ACS_HLINE
+# define ACS_HLINE '-'
+#endif
+#ifndef ACS_VLINE
+# define ACS_VLINE '|'
+#endif
+
/* Possible values for tui-border-kind variable. */
static const char *tui_border_kind_enums[] = {
"space",
diff --git a/gdb/utils.c b/gdb/utils.c
index 24a2819..06fb593 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -2704,31 +2704,73 @@ string_to_core_addr (const char *my_string)
char *
gdb_realpath (const char *filename)
{
+ /* Method 1: The system has a compile time upper bound on a filename
+ path. Use that and realpath() to canonicalize the name. This is
+ the most common case. Note that, if there isn't a compile time
+ upper bound, you want to avoid realpath() at all costs. */
#if defined(HAVE_REALPATH)
+ {
# if defined (PATH_MAX)
- char buf[PATH_MAX];
+ char buf[PATH_MAX];
# define USE_REALPATH
# elif defined (MAXPATHLEN)
- char buf[MAXPATHLEN];
-# define USE_REALPATH
-# elif defined (HAVE_UNISTD_H) && defined(HAVE_ALLOCA)
- char *buf = alloca ((size_t)pathconf ("/", _PC_PATH_MAX));
+ char buf[MAXPATHLEN];
# define USE_REALPATH
# endif
+# if defined (USE_REALPATH)
+ const char *rp = realpath (filename, buf);
+ if (rp == NULL)
+ rp = filename;
+ return xstrdup (rp);
+ }
+# endif
#endif /* HAVE_REALPATH */
-#if defined(USE_REALPATH)
- char *rp = realpath (filename, buf);
- return xstrdup (rp ? rp : filename);
-#elif defined(HAVE_CANONICALIZE_FILE_NAME)
- char *rp = canonicalize_file_name (filename);
- if (rp == NULL)
- return xstrdup (filename);
- else
- return rp;
-#else
- return xstrdup (filename);
+ /* Method 2: The host system (i.e., GNU) has the function
+ canonicalize_file_name() which malloc's a chunk of memory and
+ returns that, use that. */
+#if defined(HAVE_CANONICALIZE_FILE_NAME)
+ {
+ char *rp = canonicalize_file_name (filename);
+ if (rp == NULL)
+ return xstrdup (filename);
+ else
+ return rp;
+ }
#endif
+
+ /* FIXME: cagney/2002-11-13:
+
+ Method 2a: Use realpath() with a NULL buffer. Some systems, due
+ to the problems described in in method 3, have modified their
+ realpath() implementation so that it will allocate a buffer when
+ NULL is passed in. Before this can be used, though, some sort of
+ configure time test would need to be added. Otherwize the code
+ will likely core dump. */
+
+ /* Method 3: Now we're getting desperate! The system doesn't have a
+ compile time buffer size and no alternative function. Query the
+ OS, using pathconf(), for the buffer limit. Care is needed
+ though, some systems do not limit PATH_MAX (return -1 for
+ pathconf()) making it impossible to pass a correctly sized buffer
+ to realpath() (it could always overflow). On those systems, we
+ skip this. */
+#if defined (HAVE_REALPATH) && defined (HAVE_UNISTD_H) && defined(HAVE_ALLOCA)
+ {
+ /* Find out the max path size. */
+ long path_max = pathconf ("/", _PC_PATH_MAX);
+ if (path_max > 0)
+ {
+ /* PATH_MAX is bounded. */
+ char *buf = alloca (path_max);
+ char *rp = realpath (filename, buf);
+ return xstrdup (rp ? rp : filename);
+ }
+ }
+#endif
+
+ /* This system is a lost cause, just dup the buffer. */
+ return xstrdup (filename);
}
/* Return a copy of FILENAME, with its directory prefix canonicalized
diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c
index 6aea886..eae7db6 100644
--- a/gdb/v850-tdep.c
+++ b/gdb/v850-tdep.c
@@ -1089,8 +1089,8 @@ v850_store_return_value (struct type *type, char *valbuf)
CORE_ADDR return_buffer;
if (!v850_use_struct_convention (0, type))
- write_register_bytes (REGISTER_BYTE (E_V0_REGNUM), valbuf,
- TYPE_LENGTH (type));
+ deprecated_write_register_bytes (REGISTER_BYTE (E_V0_REGNUM), valbuf,
+ TYPE_LENGTH (type));
else
{
return_buffer = read_register (E_V0_REGNUM);
diff --git a/gdb/v850ice.c b/gdb/v850ice.c
index 958eac3..2e68cff 100644
--- a/gdb/v850ice.c
+++ b/gdb/v850ice.c
@@ -560,7 +560,7 @@ v850ice_store_registers (int regno)
return;
}
- regval = extract_unsigned_integer (&registers[REGISTER_BYTE (regno)],
+ regval = extract_unsigned_integer (&deprecated_registers[REGISTER_BYTE (regno)],
REGISTER_RAW_SIZE (regno));
strcpy (cmd, "reg ");
if (!convert_register (regno, &cmd[4]))
@@ -897,14 +897,9 @@ init_850ice_ops (void)
v850ice_ops.to_doc = "Debug a system controlled by a NEC 850 ICE.";
v850ice_ops.to_open = v850ice_open;
v850ice_ops.to_close = v850ice_close;
- v850ice_ops.to_attach = NULL;
- v850ice_ops.to_post_attach = NULL;
- v850ice_ops.to_require_attach = NULL;
v850ice_ops.to_detach = v850ice_detach;
- v850ice_ops.to_require_detach = NULL;
v850ice_ops.to_resume = v850ice_resume;
v850ice_ops.to_wait = v850ice_wait;
- v850ice_ops.to_post_wait = NULL;
v850ice_ops.to_fetch_registers = v850ice_fetch_registers;
v850ice_ops.to_store_registers = v850ice_store_registers;
v850ice_ops.to_prepare_to_store = v850ice_prepare_to_store;
@@ -912,30 +907,16 @@ init_850ice_ops (void)
v850ice_ops.to_files_info = v850ice_files_info;
v850ice_ops.to_insert_breakpoint = v850ice_insert_breakpoint;
v850ice_ops.to_remove_breakpoint = v850ice_remove_breakpoint;
- v850ice_ops.to_terminal_init = NULL;
- v850ice_ops.to_terminal_inferior = NULL;
- v850ice_ops.to_terminal_ours_for_output = NULL;
- v850ice_ops.to_terminal_ours = NULL;
- v850ice_ops.to_terminal_info = NULL;
v850ice_ops.to_kill = v850ice_kill;
v850ice_ops.to_load = v850ice_load;
- v850ice_ops.to_lookup_symbol = NULL;
- v850ice_ops.to_create_inferior = NULL;
v850ice_ops.to_mourn_inferior = v850ice_mourn;
- v850ice_ops.to_can_run = 0;
- v850ice_ops.to_notice_signals = 0;
- v850ice_ops.to_thread_alive = NULL;
v850ice_ops.to_stop = v850ice_stop;
- v850ice_ops.to_pid_to_exec_file = NULL;
v850ice_ops.to_stratum = process_stratum;
- v850ice_ops.DONT_USE = NULL;
v850ice_ops.to_has_all_memory = 1;
v850ice_ops.to_has_memory = 1;
v850ice_ops.to_has_stack = 1;
v850ice_ops.to_has_registers = 1;
v850ice_ops.to_has_execution = 1;
- v850ice_ops.to_sections = NULL;
- v850ice_ops.to_sections_end = NULL;
v850ice_ops.to_magic = OPS_MAGIC;
}
diff --git a/gdb/valops.c b/gdb/valops.c
index 91b97b4..61688c4 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -632,132 +632,120 @@ value_assign (struct value *toval, struct value *fromval)
}
break;
- case lval_register:
- if (VALUE_BITSIZE (toval))
- {
- char buffer[sizeof (LONGEST)];
- int len =
- REGISTER_RAW_SIZE (VALUE_REGNO (toval)) - VALUE_OFFSET (toval);
-
- if (len > (int) sizeof (LONGEST))
- error ("Can't handle bitfields in registers larger than %d bits.",
- (int) sizeof (LONGEST) * HOST_CHAR_BIT);
-
- if (VALUE_BITPOS (toval) + VALUE_BITSIZE (toval)
- > len * HOST_CHAR_BIT)
- /* Getting this right would involve being very careful about
- byte order. */
- error ("Can't assign to bitfields that cross register "
- "boundaries.");
-
- read_register_bytes (VALUE_ADDRESS (toval) + VALUE_OFFSET (toval),
- buffer, len);
- modify_field (buffer, value_as_long (fromval),
- VALUE_BITPOS (toval), VALUE_BITSIZE (toval));
- write_register_bytes (VALUE_ADDRESS (toval) + VALUE_OFFSET (toval),
- buffer, len);
- }
- else if (use_buffer)
- write_register_bytes (VALUE_ADDRESS (toval) + VALUE_OFFSET (toval),
- raw_buffer, use_buffer);
- else
- {
- /* Do any conversion necessary when storing this type to more
- than one register. */
-#ifdef REGISTER_CONVERT_FROM_TYPE
- memcpy (raw_buffer, VALUE_CONTENTS (fromval), TYPE_LENGTH (type));
- REGISTER_CONVERT_FROM_TYPE (VALUE_REGNO (toval), type, raw_buffer);
- write_register_bytes (VALUE_ADDRESS (toval) + VALUE_OFFSET (toval),
- raw_buffer, TYPE_LENGTH (type));
-#else
- write_register_bytes (VALUE_ADDRESS (toval) + VALUE_OFFSET (toval),
- VALUE_CONTENTS (fromval), TYPE_LENGTH (type));
-#endif
- }
-
- target_changed_event ();
-
- /* Assigning to the stack pointer, frame pointer, and other
- (architecture and calling convention specific) registers may
- cause the frame cache to be out of date. We just do this
- on all assignments to registers for simplicity; I doubt the slowdown
- matters. */
- reinit_frame_cache ();
- break;
-
case lval_reg_frame_relative:
+ case lval_register:
{
+ struct frame_id old_frame;
/* 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_to_copy = (VALUE_BITSIZE (toval) ? 1 : TYPE_LENGTH (type));
- int reg_size = REGISTER_RAW_SIZE (VALUE_FRAME_REGNUM (toval));
- int byte_offset = VALUE_OFFSET (toval) % reg_size;
- int reg_offset = VALUE_OFFSET (toval) / reg_size;
int amount_copied;
-
- /* Make the buffer large enough in all cases. */
- /* FIXME (alloca): Not safe for very large data types. */
- char *buffer = (char *) alloca (amount_to_copy
- + sizeof (LONGEST)
- + MAX_REGISTER_RAW_SIZE);
-
+ int amount_to_copy;
+ char *buffer;
+ int value_reg;
+ int reg_offset;
+ int byte_offset;
int regno;
struct frame_info *frame;
+ /* Since modifying a register can trash the frame chain, we
+ save the old frame and then restore the new frame
+ afterwards. */
+ get_frame_id (selected_frame, &old_frame);
+
/* Figure out which frame this is in currently. */
- for (frame = get_current_frame ();
- frame && FRAME_FP (frame) != VALUE_FRAME (toval);
- frame = get_prev_frame (frame))
- ;
+ if (VALUE_LVAL (toval) == lval_register)
+ {
+ frame = get_current_frame ();
+ value_reg = VALUE_REGNO (toval);
+ }
+ else
+ {
+ for (frame = get_current_frame ();
+ frame && FRAME_FP (frame) != VALUE_FRAME (toval);
+ frame = get_prev_frame (frame))
+ ;
+ value_reg = VALUE_FRAME_REGNUM (toval);
+ }
if (!frame)
error ("Value being assigned to is no longer active.");
- amount_to_copy += (reg_size - amount_to_copy % reg_size);
+ /* 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 = VALUE_FRAME_REGNUM (toval) + reg_offset,
- amount_copied = 0);
+ /* 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_RAW_SIZE);
+
+ /* Copy it in. */
+ for (regno = reg_offset, amount_copied = 0;
amount_copied < amount_to_copy;
- amount_copied += reg_size, regno++)
+ amount_copied += REGISTER_RAW_SIZE (regno), regno++)
{
- get_saved_register (buffer + amount_copied,
- (int *) NULL, (CORE_ADDR *) NULL,
- frame, regno, (enum lval_type *) NULL);
+ 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));
+ {
+ modify_field (buffer + byte_offset,
+ value_as_long (fromval),
+ VALUE_BITPOS (toval), VALUE_BITSIZE (toval));
+ }
else if (use_buffer)
- memcpy (buffer + byte_offset, raw_buffer, use_buffer);
+ {
+ memcpy (buffer + VALUE_OFFSET (toval), raw_buffer, use_buffer);
+ }
else
- memcpy (buffer + byte_offset, VALUE_CONTENTS (fromval),
- TYPE_LENGTH (type));
+ {
+ 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
+ }
- /* Copy it back. */
- for ((regno = VALUE_FRAME_REGNUM (toval) + reg_offset,
- amount_copied = 0);
+ /* Copy it out. */
+ for (regno = reg_offset, amount_copied = 0;
amount_copied < amount_to_copy;
- amount_copied += reg_size, regno++)
+ amount_copied += REGISTER_RAW_SIZE (regno), regno++)
{
enum lval_type lval;
CORE_ADDR addr;
int optim;
-
+ int realnum;
+
/* Just find out where to put it. */
- get_saved_register ((char *) NULL,
- &optim, &addr, frame, regno, &lval);
-
+ frame_register (frame, regno, &optim, &lval, &addr, &realnum,
+ NULL);
+
if (optim)
error ("Attempt to assign to a value that was optimized out.");
if (lval == lval_memory)
- write_memory (addr, buffer + amount_copied, reg_size);
+ write_memory (addr, buffer + amount_copied,
+ REGISTER_RAW_SIZE (regno));
else if (lval == lval_register)
- write_register_bytes (addr, buffer + amount_copied, reg_size);
+ regcache_cooked_write (current_regcache, realnum,
+ (buffer + amount_copied));
else
error ("Attempt to assign to an unmodifiable value.");
}
@@ -765,10 +753,31 @@ value_assign (struct value *toval, struct value *fromval)
if (register_changed_hook)
register_changed_hook (-1);
target_changed_event ();
+
+ /* Assigning to the stack pointer, frame pointer, and other
+ (architecture and calling convention specific) registers
+ may cause the frame cache to be out of date. We just do
+ this on all assignments to registers for simplicity; I
+ doubt the slowdown matters. */
+ reinit_frame_cache ();
+
+ /* Having destoroyed the frame cache, restore the selected
+ frame. */
+ /* FIXME: cagney/2002-11-02: There has to be a better way of
+ doing this. Instead of constantly saving/restoring the
+ frame. Why not create a get_selected_frame() function
+ that, having saved the selected frame's ID can
+ automatically re-find the previously selected frame
+ automatically. */
+ {
+ struct frame_info *fi = frame_find_by_id (old_frame);
+ if (fi != NULL)
+ select_frame (fi);
+ }
}
break;
-
-
+
+
default:
error ("Left operand of assignment is not an lvalue.");
}
diff --git a/gdb/values.c b/gdb/values.c
index 7286bec..5226aea 100644
--- a/gdb/values.c
+++ b/gdb/values.c
@@ -863,7 +863,9 @@ value_change_enclosing_type (struct value *val, struct type *new_encl_type)
struct value *prev;
new_val = (struct value *) xrealloc (val, sizeof (struct value) + TYPE_LENGTH (new_encl_type));
-
+
+ VALUE_ENCLOSING_TYPE (new_val) = new_encl_type;
+
/* We have to make sure this ends up in the same place in the value
chain as the original copy, so it's clean-up behavior is the same.
If the value has been released, this is a waste of time, but there
diff --git a/gdb/varobj.c b/gdb/varobj.c
index a0e1d53..cd15f7c 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -1203,7 +1203,7 @@ child_exists (struct varobj *var, char *name)
for (vc = var->children; vc != NULL; vc = vc->next)
{
- if (STREQ (vc->child->name, name))
+ if (strcmp (vc->child->name, name) == 0)
return vc->child;
}
@@ -2123,9 +2123,9 @@ cplus_number_of_children (struct varobj *var)
type = get_type_deref (var->parent);
cplus_class_num_children (type, kids);
- if (STREQ (var->name, "public"))
+ if (strcmp (var->name, "public") == 0)
children = kids[v_public];
- else if (STREQ (var->name, "private"))
+ else if (strcmp (var->name, "private") == 0)
children = kids[v_private];
else
children = kids[v_protected];
@@ -2176,7 +2176,6 @@ cplus_name_of_child (struct varobj *parent, int index)
{
char *name;
struct type *type;
- int children[3];
if (CPLUS_FAKE_CHILD (parent))
{
@@ -2191,55 +2190,97 @@ cplus_name_of_child (struct varobj *parent, int index)
{
case TYPE_CODE_STRUCT:
case TYPE_CODE_UNION:
- cplus_class_num_children (type, children);
-
if (CPLUS_FAKE_CHILD (parent))
{
- int i;
-
- /* Skip over vptr, if it exists. */
- if (TYPE_VPTR_BASETYPE (type) == type
- && index >= TYPE_VPTR_FIELDNO (type))
- index++;
-
- /* FIXME: This assumes that type orders
- inherited, public, private, protected */
- i = index + TYPE_N_BASECLASSES (type);
- if (STREQ (parent->name, "private")
- || STREQ (parent->name, "protected"))
- i += children[v_public];
- if (STREQ (parent->name, "protected"))
- i += children[v_private];
-
- name = TYPE_FIELD_NAME (type, i);
+ /* The fields of the class type are ordered as they
+ appear in the class. We are given an index for a
+ particular access control type ("public","protected",
+ or "private"). We must skip over fields that don't
+ have the access control we are looking for to properly
+ find the indexed field. */
+ int type_index = TYPE_N_BASECLASSES (type);
+ if (strcmp (parent->name, "private") == 0)
+ {
+ while (index >= 0)
+ {
+ if (TYPE_VPTR_BASETYPE (type) == type
+ && type_index == TYPE_VPTR_FIELDNO (type))
+ ; /* ignore vptr */
+ else if (TYPE_FIELD_PRIVATE (type, type_index))
+ --index;
+ ++type_index;
+ }
+ --type_index;
+ }
+ else if (strcmp (parent->name, "protected") == 0)
+ {
+ while (index >= 0)
+ {
+ if (TYPE_VPTR_BASETYPE (type) == type
+ && type_index == TYPE_VPTR_FIELDNO (type))
+ ; /* ignore vptr */
+ else if (TYPE_FIELD_PROTECTED (type, type_index))
+ --index;
+ ++type_index;
+ }
+ --type_index;
+ }
+ else
+ {
+ while (index >= 0)
+ {
+ if (TYPE_VPTR_BASETYPE (type) == type
+ && type_index == TYPE_VPTR_FIELDNO (type))
+ ; /* ignore vptr */
+ else if (!TYPE_FIELD_PRIVATE (type, type_index) &&
+ !TYPE_FIELD_PROTECTED (type, type_index))
+ --index;
+ ++type_index;
+ }
+ --type_index;
+ }
+
+ name = TYPE_FIELD_NAME (type, type_index);
}
else if (index < TYPE_N_BASECLASSES (type))
+ /* We are looking up the name of a base class */
name = TYPE_FIELD_NAME (type, index);
else
{
+ int children[3];
+ cplus_class_num_children(type, children);
+
/* Everything beyond the baseclasses can
- only be "public", "private", or "protected" */
+ only be "public", "private", or "protected"
+
+ The special "fake" children are always output by varobj in
+ this order. So if INDEX == 2, it MUST be "protected". */
index -= TYPE_N_BASECLASSES (type);
switch (index)
{
case 0:
- if (children[v_public] != 0)
- {
- name = "public";
- break;
- }
+ if (children[v_public] > 0)
+ name = "public";
+ else if (children[v_private] > 0)
+ name = "private";
+ else
+ name = "protected";
+ break;
case 1:
- if (children[v_private] != 0)
+ if (children[v_public] > 0)
{
- name = "private";
- break;
+ if (children[v_private] > 0)
+ name = "private";
+ else
+ name = "protected";
}
+ else if (children[v_private] > 0)
+ name = "protected";
+ break;
case 2:
- if (children[v_protected] != 0)
- {
- name = "protected";
- break;
- }
+ /* Must be protected */
+ name = "protected";
+ break;
default:
/* error! */
break;
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index 2f517ed..e82227f 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -298,7 +298,7 @@ vax_extract_return_value (struct type *valtype, char *regbuf, char *valbuf)
static void
vax_store_return_value (struct type *valtype, char *valbuf)
{
- write_register_bytes (0, valbuf, TYPE_LENGTH (valtype));
+ deprecated_write_register_bytes (0, valbuf, TYPE_LENGTH (valtype));
}
static CORE_ADDR
diff --git a/gdb/version.in b/gdb/version.in
index 4b2a497..5d8bf3d1 100644
--- a/gdb/version.in
+++ b/gdb/version.in
@@ -1 +1 @@
-2002-10-25-cvs
+2002-11-15-cvs
diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c
index e2a85e1..93bd108 100644
--- a/gdb/win32-nat.c
+++ b/gdb/win32-nat.c
@@ -383,7 +383,7 @@ static void
do_child_store_inferior_registers (int r)
{
if (r >= 0)
- read_register_gen (r, ((char *) &current_thread->context) + mappings[r]);
+ deprecated_read_register_gen (r, ((char *) &current_thread->context) + mappings[r]);
else
{
for (r = 0; r < NUM_REGS; r++)
@@ -1828,24 +1828,18 @@ init_child_ops (void)
child_ops.to_terminal_save_ours = terminal_save_ours;
child_ops.to_terminal_info = child_terminal_info;
child_ops.to_kill = child_kill_inferior;
- child_ops.to_load = 0;
- child_ops.to_lookup_symbol = 0;
child_ops.to_create_inferior = child_create_inferior;
child_ops.to_mourn_inferior = child_mourn_inferior;
child_ops.to_can_run = child_can_run;
- child_ops.to_notice_signals = 0;
child_ops.to_thread_alive = win32_child_thread_alive;
child_ops.to_pid_to_str = cygwin_pid_to_str;
child_ops.to_stop = child_stop;
child_ops.to_stratum = process_stratum;
- child_ops.DONT_USE = 0;
child_ops.to_has_all_memory = 1;
child_ops.to_has_memory = 1;
child_ops.to_has_stack = 1;
child_ops.to_has_registers = 1;
child_ops.to_has_execution = 1;
- child_ops.to_sections = 0;
- child_ops.to_sections_end = 0;
child_ops.to_magic = OPS_MAGIC;
}
diff --git a/gdb/wince.c b/gdb/wince.c
index 92c1158..322564e 100644
--- a/gdb/wince.c
+++ b/gdb/wince.c
@@ -1139,7 +1139,7 @@ static void
do_child_store_inferior_registers (int r)
{
if (r >= 0)
- read_register_gen (r, ((char *) &current_thread->context) + mappings[r]);
+ deprecated_read_register_gen (r, ((char *) &current_thread->context) + mappings[r]);
else
{
for (r = 0; r < NUM_REGS; r++)
@@ -1924,8 +1924,6 @@ init_child_ops (void)
child_ops.to_has_stack = 1;
child_ops.to_has_registers = 1;
child_ops.to_has_execution = 1;
- child_ops.to_sections = 0;
- child_ops.to_sections_end = 0;
child_ops.to_magic = OPS_MAGIC;
}
diff --git a/gdb/x86-64-linux-nat.c b/gdb/x86-64-linux-nat.c
index 7e6417b..78e9c49 100644
--- a/gdb/x86-64-linux-nat.c
+++ b/gdb/x86-64-linux-nat.c
@@ -158,7 +158,7 @@ fill_gregset (elf_gregset_t * gregsetp, int regno)
for (i = 0; i < x86_64_num_gregs; i++)
if ((regno == -1 || regno == i))
- read_register_gen (i, (char *) (regp + x86_64_regmap[i]));
+ deprecated_read_register_gen (i, (char *) (regp + x86_64_regmap[i]));
}
/* Fetch all general-purpose registers from process/thread TID and
diff --git a/gdb/x86-64-linux-tdep.c b/gdb/x86-64-linux-tdep.c
index 146a7a0..b8385a6 100644
--- a/gdb/x86-64-linux-tdep.c
+++ b/gdb/x86-64-linux-tdep.c
@@ -189,9 +189,3 @@ x86_64_init_frame_pc (int fromleaf, struct frame_info *fi)
else
cfi_init_frame_pc (fromleaf, fi);
}
-
-void
-x86_64_init_extra_frame_info (int fromleaf, struct frame_info *fi)
-{
- cfi_init_extra_frame_info (fromleaf, fi);
-}
diff --git a/gdb/x86-64-tdep.c b/gdb/x86-64-tdep.c
index 979c2bd..d9356ec 100644
--- a/gdb/x86-64-tdep.c
+++ b/gdb/x86-64-tdep.c
@@ -1,7 +1,6 @@
/* Target-dependent code for the x86-64 for GDB, the GNU debugger.
Copyright 2001, 2002 Free Software Foundation, Inc.
-
Contributed by Jiri Smid, SuSE Labs.
This file is part of GDB.
@@ -177,6 +176,15 @@ x86_64_register_virtual_type (int regno)
return *x86_64_register_info_table[regno].type;
}
+/* FIXME: cagney/2002-11-11: Once the i386 and x86-64 targets are
+ merged, this function can go away. */
+int
+i386_fp_regnum_p (int regnum)
+{
+ return (regnum < NUM_REGS
+ && (FP0_REGNUM && FP0_REGNUM <= (regnum) && (regnum) < FPC_REGNUM));
+}
+
/* x86_64_register_convertible is true if register N's virtual format is
different from its raw format. Note that this definition assumes
that the host supports IEEE 32-bit floats, since it doesn't say
@@ -252,18 +260,20 @@ static const char *valid_flavours[] = {
};
static const char *disassembly_flavour = att_flavour;
+/* Push the return address (pointing to the call dummy) onto the stack
+ and return the new value for the stack pointer. */
+
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;
}
-void
+static void
x86_64_pop_frame (void)
{
generic_pop_current_frame (cfi_pop_frame);
@@ -301,8 +311,8 @@ merge_classes (enum x86_64_reg_class class1, enum x86_64_reg_class class2)
if (class1 == class2)
return class1;
- /* Rule #2: If one of the classes is NO_CLASS, the resulting class is
- the other class. */
+ /* Rule #2: 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)
@@ -329,15 +339,13 @@ merge_classes (enum x86_64_reg_class class1, enum x86_64_reg_class class2)
return X86_64_SSE_CLASS;
}
+/* Classify the argument type. CLASSES will be filled by the register
+ class used to pass each word of the operand. The number of words
+ is returned. In case the parameter should be passed in memory, 0
+ is returned. As a special case for zero sized containers,
+ classes[0] will be NO_CLASS and 1 is returned.
-/* Classify the argument type.
- CLASSES will be filled by the register class used to pass each word
- of the operand. The number of words is returned. In case the parameter
- should be passed in memory, 0 is returned. As a special case for zero
- sized containers, classes[0] will be NO_CLASS and 1 is returned.
-
- See the x86-64 PS ABI for details.
-*/
+ See the x86-64 psABI for details. */
static int
classify_argument (struct type *type,
@@ -362,8 +370,8 @@ classify_argument (struct type *type,
for (i = 0; i < words; i++)
classes[i] = X86_64_NO_CLASS;
- /* Zero sized arrays or structures are NO_CLASS. We return 0 to
- signalize memory class, so handle it as special case. */
+ /* Zero sized arrays or structures are NO_CLASS. We return 0
+ to signalize memory class, so handle it as special case. */
if (!words)
{
classes[0] = X86_64_NO_CLASS;
@@ -446,7 +454,7 @@ classify_argument (struct type *type,
&& (i == 0 || classes[i - 1] != X86_64_SSE_CLASS))
classes[i] = X86_64_SSE_CLASS;
- /* X86_64_X87UP_CLASS should be preceeded by X86_64_X87_CLASS. */
+ /* X86_64_X87UP_CLASS should be preceeded by X86_64_X87_CLASS. */
if (classes[i] == X86_64_X87UP_CLASS
&& (i == 0 || classes[i - 1] != X86_64_X87_CLASS))
classes[i] = X86_64_SSE_CLASS;
@@ -500,8 +508,9 @@ classify_argument (struct type *type,
"classify_argument: unknown argument type");
}
-/* Examine the argument and return set number of register required in each
- class. Return 0 ifif parameter should be passed in memory. */
+/* Examine the argument and set *INT_NREGS and *SSE_NREGS to the
+ number of registers required based on the information passed in
+ CLASSES. Return 0 if parameter should be passed in memory. */
static int
examine_argument (enum x86_64_reg_class classes[MAX_CLASSES],
@@ -539,9 +548,9 @@ examine_argument (enum x86_64_reg_class classes[MAX_CLASSES],
#define RET_SSE_REGS 2
/* Check if the structure in value_type is returned in registers or in
- 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. */
+ 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
x86_64_use_struct_convention (int gcc_p, struct type *value_type)
{
@@ -555,7 +564,6 @@ x86_64_use_struct_convention (int gcc_p, struct type *value_type)
needed_intregs > RET_INT_REGS || needed_sseregs > RET_SSE_REGS);
}
-
/* Extract from an array REGBUF containing the (raw) register state, a
function return value of TYPE, and copy that, in virtual format,
into VALBUF. */
@@ -638,10 +646,10 @@ x86_64_extract_return_value (struct type *type, char *regbuf, char *valbuf)
}
}
-/* Handled by unwind informations. */
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
@@ -694,30 +702,30 @@ x86_64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
case X86_64_NO_CLASS:
break;
case X86_64_INTEGER_CLASS:
- write_register_gen (int_parameter_registers
- [(intreg + 1) / 2],
- VALUE_CONTENTS_ALL (args[i]) + offset);
+ deprecated_write_register_gen (int_parameter_registers
+ [(intreg + 1) / 2],
+ VALUE_CONTENTS_ALL (args[i]) + offset);
offset += 8;
intreg += 2;
break;
case X86_64_INTEGERSI_CLASS:
- write_register_gen (int_parameter_registers[intreg / 2],
- VALUE_CONTENTS_ALL (args[i]) + offset);
+ deprecated_write_register_gen (int_parameter_registers[intreg / 2],
+ VALUE_CONTENTS_ALL (args[i]) + offset);
offset += 8;
intreg++;
break;
case X86_64_SSEDF_CLASS:
case X86_64_SSESF_CLASS:
case X86_64_SSE_CLASS:
- write_register_gen (sse_parameter_registers
- [(ssereg + 1) / 2],
- VALUE_CONTENTS_ALL (args[i]) + offset);
+ deprecated_write_register_gen (sse_parameter_registers
+ [(ssereg + 1) / 2],
+ VALUE_CONTENTS_ALL (args[i]) + offset);
offset += 8;
ssereg += 2;
break;
case X86_64_SSEUP_CLASS:
- write_register_gen (sse_parameter_registers[ssereg / 2],
- VALUE_CONTENTS_ALL (args[i]) + offset);
+ deprecated_write_register_gen (sse_parameter_registers[ssereg / 2],
+ VALUE_CONTENTS_ALL (args[i]) + offset);
offset += 8;
ssereg++;
break;
@@ -762,8 +770,8 @@ x86_64_store_return_value (struct type *type, char *valbuf)
&& TARGET_LONG_DOUBLE_FORMAT == &floatformat_i387_ext)
{
/* Copy straight over. */
- write_register_bytes (REGISTER_BYTE (FP0_REGNUM), valbuf,
- FPU_REG_RAW_SIZE);
+ deprecated_write_register_bytes (REGISTER_BYTE (FP0_REGNUM), valbuf,
+ FPU_REG_RAW_SIZE);
}
else
{
@@ -776,8 +784,8 @@ x86_64_store_return_value (struct type *type, char *valbuf)
it is the best we can do. */
val = extract_floating (valbuf, TYPE_LENGTH (type));
floatformat_from_doublest (&floatformat_i387_ext, &val, buf);
- write_register_bytes (REGISTER_BYTE (FP0_REGNUM), buf,
- FPU_REG_RAW_SIZE);
+ deprecated_write_register_bytes (REGISTER_BYTE (FP0_REGNUM), buf,
+ FPU_REG_RAW_SIZE);
}
}
else
@@ -786,12 +794,13 @@ x86_64_store_return_value (struct type *type, char *valbuf)
int high_size = REGISTER_RAW_SIZE (1);
if (len <= low_size)
- write_register_bytes (REGISTER_BYTE (0), valbuf, len);
+ deprecated_write_register_bytes (REGISTER_BYTE (0), valbuf, len);
else if (len <= (low_size + high_size))
{
- write_register_bytes (REGISTER_BYTE (0), valbuf, low_size);
- write_register_bytes (REGISTER_BYTE (1),
- valbuf + low_size, len - low_size);
+ deprecated_write_register_bytes (REGISTER_BYTE (0), valbuf,
+ low_size);
+ deprecated_write_register_bytes (REGISTER_BYTE (1),
+ valbuf + low_size, len - low_size);
}
else
internal_error (__FILE__, __LINE__,
@@ -863,30 +872,31 @@ x86_64_skip_prologue (CORE_ADDR pc)
struct symtab_and_line v_sal;
struct symbol *v_function;
CORE_ADDR endaddr;
+ unsigned char prolog_buf[PROLOG_BUFSIZE];
- /* We will handle only functions beginning with:
- 55 pushq %rbp
- 48 89 e5 movq %rsp,%rbp
- */
- unsigned char prolog_expect[PROLOG_BUFSIZE] = { 0x55, 0x48, 0x89, 0xe5 },
- prolog_buf[PROLOG_BUFSIZE];
+ /* We will handle only functions starting with: */
+ static unsigned char prolog_expect[PROLOG_BUFSIZE] =
+ {
+ 0x55, /* pushq %rbp */
+ 0x48, 0x89, 0xe5 /* movq %rsp, %rbp */
+ };
read_memory (pc, (char *) prolog_buf, PROLOG_BUFSIZE);
- /* First check, whether pc points to pushq %rbp, movq %rsp,%rbp. */
+ /* First check, whether pc points to pushq %rbp, movq %rsp, %rbp. */
for (i = 0; i < PROLOG_BUFSIZE; i++)
if (prolog_expect[i] != prolog_buf[i])
- return pc; /* ... no, it doesn't. Nothing to skip. */
+ return pc; /* ... no, it doesn't. Nothing to skip. */
- /* OK, we have found the prologue and want PC of the first
+ /* OK, we have found the prologue and want PC of the first
non-prologue instruction. */
pc += PROLOG_BUFSIZE;
v_function = find_pc_function (pc);
v_sal = find_pc_line (pc, 0);
- /* If pc doesn't point to a function with debuginfo,
- some of the following may be NULL. */
+ /* 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;
@@ -904,7 +914,7 @@ x86_64_skip_prologue (CORE_ADDR pc)
}
/* Sequence of bytes for breakpoint instruction. */
-static unsigned char *
+static const unsigned char *
x86_64_breakpoint_from_pc (CORE_ADDR *pc, int *lenptr)
{
static unsigned char breakpoint[] = { 0xcc };
@@ -912,219 +922,199 @@ x86_64_breakpoint_from_pc (CORE_ADDR *pc, int *lenptr)
return breakpoint;
}
-static struct gdbarch *
-x86_64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
+static void
+x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- struct gdbarch *gdbarch;
- struct gdbarch_tdep *tdep;
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
int i, sum;
- /* Find a candidate among the list of pre-declared architectures. */
- for (arches = gdbarch_list_lookup_by_info (arches, &info);
- arches != NULL;
- arches = gdbarch_list_lookup_by_info (arches->next, &info))
- {
- switch (info.bfd_arch_info->mach)
- {
- case bfd_mach_x86_64:
- case bfd_mach_x86_64_intel_syntax:
- switch (gdbarch_bfd_arch_info (arches->gdbarch)->mach)
- {
- case bfd_mach_x86_64:
- case bfd_mach_x86_64_intel_syntax:
- return arches->gdbarch;
- case bfd_mach_i386_i386:
- case bfd_mach_i386_i8086:
- case bfd_mach_i386_i386_intel_syntax:
- break;
- default:
- internal_error (__FILE__, __LINE__,
- "x86_64_gdbarch_init: unknown machine type");
- }
- break;
- case bfd_mach_i386_i386:
- case bfd_mach_i386_i8086:
- case bfd_mach_i386_i386_intel_syntax:
- switch (gdbarch_bfd_arch_info (arches->gdbarch)->mach)
- {
- case bfd_mach_x86_64:
- case bfd_mach_x86_64_intel_syntax:
- break;
- case bfd_mach_i386_i386:
- case bfd_mach_i386_i8086:
- case bfd_mach_i386_i386_intel_syntax:
- return arches->gdbarch;
- default:
- internal_error (__FILE__, __LINE__,
- "x86_64_gdbarch_init: unknown machine type");
- }
- break;
- default:
- internal_error (__FILE__, __LINE__,
- "x86_64_gdbarch_init: unknown machine type");
- }
- }
-
- tdep = (struct gdbarch_tdep *) xmalloc (sizeof (struct gdbarch_tdep));
- gdbarch = gdbarch_alloc (&info, tdep);
-
- switch (info.bfd_arch_info->mach)
- {
- case bfd_mach_x86_64:
- case bfd_mach_x86_64_intel_syntax:
- tdep->num_xmm_regs = 16;
- break;
- case bfd_mach_i386_i386:
- case bfd_mach_i386_i8086:
- case bfd_mach_i386_i386_intel_syntax:
- /* This is place for definition of i386 target vector. */
- break;
- default:
- internal_error (__FILE__, __LINE__,
- "x86_64_gdbarch_init: unknown machine type");
- }
+ /* The x86-64 has 16 SSE registers. */
+ tdep->num_xmm_regs = 16;
+ /* This is what all the fuss is about. */
set_gdbarch_long_bit (gdbarch, 64);
set_gdbarch_long_long_bit (gdbarch, 64);
set_gdbarch_ptr_bit (gdbarch, 64);
- set_gdbarch_long_double_format (gdbarch, &floatformat_i387_ext);
+ /* In contrast to the i386, on the x86-64 a `long double' actually
+ takes up 128 bits, even though it's still based on the i387
+ extended floating-point format which has only 80 significant bits. */
+ set_gdbarch_long_double_bit (gdbarch, 128);
set_gdbarch_num_regs (gdbarch, X86_64_NUM_REGS);
+
+ /* Register numbers of various important registers. */
+ set_gdbarch_sp_regnum (gdbarch, 7); /* %rsp */
+ set_gdbarch_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) */
+
+ /* 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_register_size (gdbarch, 8);
- set_gdbarch_register_raw_size (gdbarch, x86_64_register_raw_size);
- set_gdbarch_max_register_raw_size (gdbarch, 16);
- set_gdbarch_register_byte (gdbarch, x86_64_register_byte);
- /* 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) */
+ /* 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_register_bytes (gdbarch, sum);
- set_gdbarch_register_virtual_size (gdbarch, generic_register_size);
- set_gdbarch_max_register_virtual_size (gdbarch, 16);
+ 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);
+ /* FIXME: kettenis/20021026: As long as we don't support longjmp,
+ that is, as long as we have `tdep->jb_pc_offset == -1', using
+ i386_get_longjmp_target is fine. */
+
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);
-/* Register numbers of various important registers. */
- set_gdbarch_sp_regnum (gdbarch, 7); /* (rsp) Contains address of top of stack. */
- set_gdbarch_fp_regnum (gdbarch, 6); /* (rbp) */
- set_gdbarch_pc_regnum (gdbarch, 16); /* (rip) Contains program counter. */
-
- set_gdbarch_fp0_regnum (gdbarch, X86_64_NUM_GREGS); /* First FPU floating-point register. */
+ /* Getting saved registers is handled by unwind information. */
+ set_gdbarch_get_saved_register (gdbarch, cfi_get_saved_register);
+ /* FIXME: kettenis/20021026: Should we set parm_boundary to 64 here? */
set_gdbarch_read_fp (gdbarch, cfi_read_fp);
-/* Discard from the stack the innermost frame, restoring all registers. */
+ /* FIXME: kettenis/20021026: Should be undeprecated. */
+ set_gdbarch_extract_return_value (gdbarch, NULL);
+ set_gdbarch_deprecated_extract_return_value (gdbarch,
+ x86_64_extract_return_value);
+ set_gdbarch_push_arguments (gdbarch, x86_64_push_arguments);
+ set_gdbarch_push_return_address (gdbarch, x86_64_push_return_address);
set_gdbarch_pop_frame (gdbarch, x86_64_pop_frame);
+ set_gdbarch_store_struct_return (gdbarch, x86_64_store_struct_return);
+ /* FIXME: kettenis/20021026: Should be undeprecated. */
+ set_gdbarch_store_return_value (gdbarch, NULL);
+ set_gdbarch_deprecated_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);
- /* FRAME_CHAIN takes a frame's nominal address and produces the frame's
- chain-pointer. */
- set_gdbarch_frame_chain (gdbarch, x86_64_linux_frame_chain);
+ set_gdbarch_frame_init_saved_regs (gdbarch, x86_64_frame_init_saved_regs);
+ set_gdbarch_skip_prologue (gdbarch, x86_64_skip_prologue);
+ set_gdbarch_frame_chain (gdbarch, x86_64_linux_frame_chain);
set_gdbarch_frameless_function_invocation (gdbarch,
- x86_64_frameless_function_invocation);
+ x86_64_frameless_function_invocation);
+ /* FIXME: kettenis/20021025: Shouldn't this be set to
+ generic_file_frame_chain_valid? */
+ set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
+ /* FIXME: kettenis/20021026: These two are GNU/Linux-specific and
+ should be moved elsewhere. */
set_gdbarch_frame_saved_pc (gdbarch, x86_64_linux_frame_saved_pc);
+ set_gdbarch_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);
- set_gdbarch_frame_args_address (gdbarch, default_frame_address);
- set_gdbarch_frame_locals_address (gdbarch, default_frame_address);
-
-/* Return number of bytes at start of arglist that are not really args. */
- set_gdbarch_frame_args_skip (gdbarch, 8);
+ /* Build call frame information (CFI) from DWARF2 frame debug info. */
+ set_gdbarch_dwarf2_build_frame_info (gdbarch, dwarf2_build_frame_info);
- set_gdbarch_frame_init_saved_regs (gdbarch, x86_64_frame_init_saved_regs);
+ /* Initialization of per-frame CFI. */
+ set_gdbarch_init_extra_frame_info (gdbarch, cfi_init_extra_frame_info);
-/* Frame pc initialization is handled by unwind informations. */
+ /* Frame PC initialization is handled by using CFI. */
set_gdbarch_init_frame_pc (gdbarch, x86_64_init_frame_pc);
-/* Initialization of unwind informations. */
- set_gdbarch_init_extra_frame_info (gdbarch, x86_64_init_extra_frame_info);
+ /* Cons up virtual frame pointer for trace. */
+ set_gdbarch_virtual_frame_pointer (gdbarch, cfi_virtual_frame_pointer);
-/* Getting saved registers is handled by unwind informations. */
- set_gdbarch_get_saved_register (gdbarch, cfi_get_saved_register);
+ /* 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);
+}
- set_gdbarch_frame_init_saved_regs (gdbarch, x86_64_frame_init_saved_regs);
+static struct gdbarch *
+x86_64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
+{
+ struct gdbarch_tdep *tdep;
+ struct gdbarch *gdbarch;
+ enum gdb_osabi osabi = GDB_OSABI_UNKNOWN;
-/* Cons up virtual frame pointer for trace */
- set_gdbarch_virtual_frame_pointer (gdbarch, cfi_virtual_frame_pointer);
+ /* Try to determine the OS ABI of the object we're loading. */
+ if (info.abfd != NULL)
+ osabi = gdbarch_lookup_osabi (info.abfd);
- set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
+ /* Find a candidate among extant architectures. */
+ for (arches = gdbarch_list_lookup_by_info (arches, &info);
+ arches != NULL;
+ arches = gdbarch_list_lookup_by_info (arches->next, &info))
+ {
+ /* Make sure the OS ABI selection matches. */
+ tdep = gdbarch_tdep (arches->gdbarch);
+ if (tdep && tdep->osabi == osabi)
+ return arches->gdbarch;
+ }
- set_gdbarch_use_generic_dummy_frames (gdbarch, 1);
- set_gdbarch_call_dummy_location (gdbarch, AT_ENTRY_POINT);
- set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
- set_gdbarch_call_dummy_length (gdbarch, 0);
- set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
- set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
- set_gdbarch_pc_in_call_dummy (gdbarch, pc_in_call_dummy_at_entry_point);
- set_gdbarch_call_dummy_words (gdbarch, 0);
- set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
- set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
- set_gdbarch_call_dummy_p (gdbarch, 1);
- set_gdbarch_call_dummy_start_offset (gdbarch, 0);
- set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
- set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
- set_gdbarch_push_return_address (gdbarch, x86_64_push_return_address);
- set_gdbarch_push_arguments (gdbarch, x86_64_push_arguments);
+ /* Allocate space for the new architecture. */
+ tdep = XMALLOC (struct gdbarch_tdep);
+ gdbarch = gdbarch_alloc (&info, tdep);
-/* Return number of args passed to a frame, no way to tell. */
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
-/* Don't use default structure extract routine */
- set_gdbarch_deprecated_extract_struct_value_address (gdbarch, 0);
+ tdep->osabi = osabi;
-/* If USE_STRUCT_CONVENTION retruns 0, then gdb uses STORE_RETURN_VALUE
- and EXTRACT_RETURN_VALUE to store/fetch the functions return value. It is
- the case when structure is returned in registers. */
- set_gdbarch_use_struct_convention (gdbarch, x86_64_use_struct_convention);
+ /* FIXME: kettenis/20021025: The following calls are going to
+ disappear when we integrate the x86_64 target into the i386
+ target. */
-/* Store the address of the place in which to copy the structure the
- subroutine will return. This is called from call_function. */
- set_gdbarch_store_struct_return (gdbarch, x86_64_store_struct_return);
-
-/* Extract from an array REGBUF containing the (raw) register state
- a function return value of type TYPE, and copy that, in virtual format,
- into VALBUF. */
- set_gdbarch_deprecated_extract_return_value (gdbarch,
- x86_64_extract_return_value);
+ set_gdbarch_long_double_format (gdbarch, &floatformat_i387_ext);
+ set_gdbarch_max_register_raw_size (gdbarch, 16);
+ set_gdbarch_max_register_virtual_size (gdbarch, 16);
-/* Write into the appropriate registers a function return value stored
- in VALBUF of type TYPE, given in virtual format. */
- set_gdbarch_deprecated_store_return_value (gdbarch,
- x86_64_store_return_value);
-
+ set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
-/* Offset from address of function to start of its code. */
+ set_gdbarch_breakpoint_from_pc (gdbarch, x86_64_breakpoint_from_pc);
+ set_gdbarch_decr_pc_after_break (gdbarch, 1);
set_gdbarch_function_start_offset (gdbarch, 0);
- set_gdbarch_skip_prologue (gdbarch, x86_64_skip_prologue);
+ set_gdbarch_frame_args_skip (gdbarch, 8);
+ set_gdbarch_frame_args_address (gdbarch, default_frame_address);
+ set_gdbarch_frame_locals_address (gdbarch, default_frame_address);
- set_gdbarch_saved_pc_after_call (gdbarch, x86_64_linux_saved_pc_after_call);
+ set_gdbarch_use_generic_dummy_frames (gdbarch, 1);
- set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
+ set_gdbarch_call_dummy_location (gdbarch, AT_ENTRY_POINT);
+ set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
+ set_gdbarch_call_dummy_start_offset (gdbarch, 0);
+ set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
+ set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
+ set_gdbarch_call_dummy_length (gdbarch, 0);
+ set_gdbarch_call_dummy_p (gdbarch, 1);
+ set_gdbarch_call_dummy_words (gdbarch, NULL);
+ set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
+ set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
+ set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
- set_gdbarch_breakpoint_from_pc (gdbarch,
- (gdbarch_breakpoint_from_pc_ftype *)
- x86_64_breakpoint_from_pc);
+ set_gdbarch_pc_in_call_dummy (gdbarch, pc_in_call_dummy_at_entry_point);
- set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section);
+ set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
-/* Amount PC must be decremented by after a breakpoint. This is often the
- number of bytes in BREAKPOINT but not always. */
- set_gdbarch_decr_pc_after_break (gdbarch, 1);
+ /* FIXME: kettenis/20021025: These already are the default. */
-/* Use dwarf2 debug frame informations. */
- set_gdbarch_dwarf2_build_frame_info (gdbarch, dwarf2_build_frame_info);
- set_gdbarch_dwarf2_reg_to_regnum (gdbarch, x86_64_dwarf2_reg_to_regnum);
+ set_gdbarch_register_virtual_size (gdbarch, generic_register_size);
+ set_gdbarch_deprecated_extract_struct_value_address (gdbarch, 0);
- set_gdbarch_pc_in_sigtramp (gdbarch, x86_64_linux_in_sigtramp);
+ x86_64_init_abi (info, gdbarch);
return gdbarch;
}
diff --git a/gdb/x86-64-tdep.h b/gdb/x86-64-tdep.h
index 9fb2fd0..4e73206 100644
--- a/gdb/x86-64-tdep.h
+++ b/gdb/x86-64-tdep.h
@@ -36,7 +36,6 @@ gdbarch_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);
void x86_64_init_frame_pc (int fromleaf, struct frame_info *fi);
-void x86_64_init_extra_frame_info (int fromleaf, struct frame_info *fi);
#endif
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 9618bdc..e2fe8d2 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -150,16 +150,16 @@ struct coff_symfile_info
CORE_ADDR toc_offset;
};
-static struct complaint storclass_complaint =
+static struct deprecated_complaint storclass_complaint =
{"Unexpected storage class: %d", 0, 0};
-static struct complaint bf_notfound_complaint =
+static struct deprecated_complaint bf_notfound_complaint =
{"line numbers off, `.bf' symbol not found", 0, 0};
-static struct complaint ef_complaint =
+static struct deprecated_complaint ef_complaint =
{"Mismatched .ef symbol ignored starting at symnum %d", 0, 0};
-static struct complaint eb_complaint =
+static struct deprecated_complaint eb_complaint =
{"Mismatched .eb symbol ignored starting at symnum %d", 0, 0};
static void xcoff_initial_scan (struct objfile *, int);
@@ -483,7 +483,7 @@ record_include_begin (struct coff_symbol *cs)
/* This can happen with old versions of GCC.
GCC 2.3.3-930426 does not exhibit this on a test case which
a user said produced the message for him. */
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"Nested C_BINCL symbols", 0, 0};
complain (&msg);
}
@@ -502,7 +502,7 @@ record_include_end (struct coff_symbol *cs)
if (inclDepth == 0)
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"Mismatched C_BINCL/C_EINCL pair", 0, 0};
complain (&msg);
}
@@ -766,7 +766,7 @@ enter_line_range (struct subfile *subfile, unsigned beginoffset, unsigned endoff
{
if (endoffset >= limit_offset)
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"Bad line table offset in C_EINCL directive", 0, 0};
complain (&msg);
return;
@@ -864,7 +864,7 @@ static char *
xcoff_next_symbol_text (struct objfile *objfile)
{
struct internal_syment symbol;
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"Unexpected symbol continuation", 0, 0};
char *retval;
/* FIXME: is this the same as the passed arg? */
@@ -1332,7 +1332,7 @@ read_xcoff_symtab (struct partial_symtab *pst)
case C_UNTAG:
case C_ENTAG:
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"Unrecognized storage class %d.", 0, 0};
complain (&msg, cs->c_sclass);
}
@@ -1603,7 +1603,7 @@ read_symbol (struct internal_syment *symbol, int symno)
->symtbl;
if (symno < 0 || symno >= nsyms)
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"Invalid symbol offset", 0, 0};
complain (&msg);
symbol->n_value = 0;
@@ -2441,7 +2441,7 @@ scan_xcoff_symtab (struct objfile *objfile)
default:
{
- static struct complaint msg =
+ static struct deprecated_complaint msg =
{"Storage class %d not recognized during scan", 0, 0};
complain (&msg, sclass);
}
@@ -2564,7 +2564,7 @@ scan_xcoff_symtab (struct objfile *objfile)
case C_STSYM:
{
- static struct complaint function_outside_compilation_unit = {
+ static struct deprecated_complaint function_outside_compilation_unit = {
"function `%s' appears to be defined outside of all compilation units", 0, 0
};
diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
index b088085..f111516 100644
--- a/gdb/xstormy16-tdep.c
+++ b/gdb/xstormy16-tdep.c
@@ -186,7 +186,7 @@ xstormy16_get_saved_register (char *raw_buffer,
struct frame_info *fi,
int regnum, enum lval_type *lval)
{
- generic_get_saved_register (raw_buffer, optimized, addrp, fi, regnum, lval);
+ deprecated_generic_get_saved_register (raw_buffer, optimized, addrp, fi, regnum, lval);
}
/* Function: xstormy16_type_is_scalar
@@ -387,12 +387,12 @@ xstormy16_store_return_value (struct type *type, char *valbuf)
/* Add leading zeros to the value. */
memset (buf, 0, xstormy16_reg_size);
memcpy (buf, valbuf, 1);
- write_register_gen (E_1ST_ARG_REGNUM, buf);
+ deprecated_write_register_gen (E_1ST_ARG_REGNUM, buf);
}
else if (xstormy16_type_is_scalar (type) &&
TYPE_LENGTH (type) <= E_MAX_RETTYPE_SIZE_IN_REGS)
- write_register_bytes (REGISTER_BYTE (E_1ST_ARG_REGNUM),
- valbuf, TYPE_LENGTH (type));
+ deprecated_write_register_bytes (REGISTER_BYTE (E_1ST_ARG_REGNUM),
+ valbuf, TYPE_LENGTH (type));
else
{
return_buffer = read_register (E_PTR_RET_REGNUM);
@@ -439,7 +439,7 @@ xstormy16_frame_saved_register (struct frame_info *fi, int regnum)
int size = xstormy16_register_raw_size (regnum);
char *buf = (char *) alloca (size);
- generic_get_saved_register (buf, NULL, NULL, fi, regnum, NULL);
+ deprecated_generic_get_saved_register (buf, NULL, NULL, fi, regnum, NULL);
return (CORE_ADDR) extract_unsigned_integer (buf, size);
}
diff --git a/gdb/z8k-tdep.c b/gdb/z8k-tdep.c
index c7396e2..e06f343 100644
--- a/gdb/z8k-tdep.c
+++ b/gdb/z8k-tdep.c
@@ -309,7 +309,8 @@ write_return_value (struct type *type, char *valbuf)
int len;
for (len = 0; len < TYPE_LENGTH (type); len += 2)
- write_register_bytes (REGISTER_BYTE (len / 2 + 2), valbuf + len, 2);
+ deprecated_write_register_bytes (REGISTER_BYTE (len / 2 + 2),
+ valbuf + len, 2);
}
void
@@ -319,7 +320,7 @@ store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
}
-void
+static void
z8k_print_register_hook (int regno)
{
if ((regno & 1) == 0 && regno < 16)
@@ -359,7 +360,117 @@ z8k_print_register_hook (int regno)
(unsigned int)read_memory_short (rval + i));
}
}
+}
+
+static void
+z8k_print_registers_info (struct gdbarch *gdbarch,
+ struct ui_file *file,
+ struct frame_info *frame,
+ int regnum, int print_all)
+{
+ int i;
+ const int numregs = NUM_REGS + NUM_PSEUDO_REGS;
+ char *raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
+ char *virtual_buffer = alloca (MAX_REGISTER_VIRTUAL_SIZE);
+
+ for (i = 0; i < numregs; i++)
+ {
+ /* Decide between printing all regs, non-float / vector regs, or
+ specific reg. */
+ if (regnum == -1)
+ {
+ if (!print_all)
+ {
+ if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
+ continue;
+ if (TYPE_VECTOR (REGISTER_VIRTUAL_TYPE (i)))
+ continue;
+ }
+ }
+ else
+ {
+ if (i != regnum)
+ continue;
+ }
+
+ /* If the register name is empty, it is undefined for this
+ processor, so don't display anything. */
+ if (REGISTER_NAME (i) == NULL || *(REGISTER_NAME (i)) == '\0')
+ continue;
+
+ fputs_filtered (REGISTER_NAME (i), file);
+ print_spaces_filtered (15 - strlen (REGISTER_NAME (i)), file);
+
+ /* Get the data in raw format. */
+ if (! frame_register_read (frame, i, raw_buffer))
+ {
+ fprintf_filtered (file, "*value not available*\n");
+ continue;
+ }
+ /* FIXME: cagney/2002-08-03: This code shouldn't be necessary.
+ The function frame_register_read() should have returned the
+ pre-cooked register so no conversion is necessary. */
+ /* Convert raw data to virtual format if necessary. */
+ if (REGISTER_CONVERTIBLE (i))
+ {
+ REGISTER_CONVERT_TO_VIRTUAL (i, REGISTER_VIRTUAL_TYPE (i),
+ raw_buffer, virtual_buffer);
+ }
+ else
+ {
+ memcpy (virtual_buffer, raw_buffer,
+ REGISTER_VIRTUAL_SIZE (i));
+ }
+
+ /* If virtual format is floating, print it that way, and in raw
+ hex. */
+ if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
+ {
+ int j;
+
+ val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
+ file, 0, 1, 0, Val_pretty_default);
+
+ fprintf_filtered (file, "\t(raw 0x");
+ for (j = 0; j < REGISTER_RAW_SIZE (i); j++)
+ {
+ int idx;
+ if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+ idx = j;
+ else
+ idx = REGISTER_RAW_SIZE (i) - 1 - j;
+ fprintf_filtered (file, "%02x", (unsigned char) raw_buffer[idx]);
+ }
+ fprintf_filtered (file, ")");
+ }
+ else
+ {
+ /* Print the register in hex. */
+ val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
+ file, 'x', 1, 0, Val_pretty_default);
+ /* If not a vector register, print it also according to its
+ natural format. */
+ if (TYPE_VECTOR (REGISTER_VIRTUAL_TYPE (i)) == 0)
+ {
+ fprintf_filtered (file, "\t");
+ val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
+ file, 0, 1, 0, Val_pretty_default);
+ }
+ }
+
+ /* Some z8k specific info. */
+ z8k_print_register_hook (i);
+
+ fprintf_filtered (file, "\n");
+ }
+}
+
+void
+z8k_do_registers_info (int regnum, int all)
+{
+ z8k_print_registers_info (current_gdbarch, gdb_stdout, selected_frame,
+ regnum, all);
}
void
diff --git a/include/ChangeLog b/include/ChangeLog
index dbbf4a4..2dfed5a 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,23 @@
+2002-11-14 Egor Duda <deo@logos-m.ru>
+
+ * bfdlink.h (struct bfd_link_info): Add new boolean
+ field pei386_runtime_pseudo_reloc.
+
+2002-11-11 Svein E. Seldal <Svein.Seldal@solidas.com>
+
+ * opcode/tic4x.h: Added new opcodes and corrected some bugs. Add
+ support for new DSP types.
+
+2002-10-26 Roger Sayle <roger@eyesopen.com>
+
+ * partition.h: Close the extern "C" scope when compiling with C++.
+
+2002-10-26 Roger Sayle <roger@eyesopen.com>
+ DJ Delorie <dj@redhat.com>
+
+ PR bootstrap/8351
+ * getopt.h: Avoid prototyping getopt with no arguments in C++.
+
2002-10-24 Nathan Tallent <eraxxon@alumni.rice.edu>
* ansidecl.h (__STDC__): Add (__alpha && __cplusplus) to the
diff --git a/include/bfdlink.h b/include/bfdlink.h
index 4998fe3..9263bcc 100644
--- a/include/bfdlink.h
+++ b/include/bfdlink.h
@@ -340,6 +340,11 @@ struct bfd_link_info
is explicitly requested by the user, -1 if enabled by default. */
int pei386_auto_import;
+ /* Non-zero if runtime relocs for DATA items with non-zero addends
+ in pei386 DLLs should be generated. Set to 1 if this feature
+ is explicitly requested by the user, -1 if enabled by default. */
+ int pei386_runtime_pseudo_reloc;
+
/* True if non-PLT relocs should be merged into one reloc section
and sorted so that relocs against the same symbol come together. */
boolean combreloc;
diff --git a/include/getopt.h b/include/getopt.h
index da09cee..a99a229 100644
--- a/include/getopt.h
+++ b/include/getopt.h
@@ -1,6 +1,6 @@
/* Declarations for getopt.
- Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998, 2000
- Free Software Foundation, Inc.
+ Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998, 2000,
+ 2002 Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@gnu.org.
@@ -112,7 +112,9 @@ struct option
errors, only prototype getopt for the GNU C library. */
extern int getopt (int argc, char *const *argv, const char *shortopts);
#else
+#ifndef __cplusplus
extern int getopt ();
+#endif /* __cplusplus */
#endif
#endif /* !HAVE_DECL_GETOPT */
diff --git a/include/opcode/tic4x.h b/include/opcode/tic4x.h
index 68d186d..18df7f1 100644
--- a/include/opcode/tic4x.h
+++ b/include/opcode/tic4x.h
@@ -304,8 +304,10 @@ static const c4x_inst_t c3x_insts[] =
{ "addi_mpyi", 0x89000000, 0xff000000, Q_rSr_rSr },
{ "addi_mpyi", 0x8a000000, 0xff000000, Q_SSr_rrr },
{ "addi_mpyi", 0x8b000000, 0xff000000, Q_Srr_Srr },
+ { "addi_mpyi", 0x8b000000, 0xff000000, Q_Srr_rSr },
{ "addi3_mpyi3", 0x88000000, 0xff000000, Q_rrr_SSr },
{ "addi3_mpyi3", 0x89000000, 0xff000000, Q_rSr_Srr },
+ { "addi3_mpyi3", 0x89000000, 0xff000000, Q_rSr_rSr },
{ "addi3_mpyi3", 0x8a000000, 0xff000000, Q_SSr_rrr },
{ "addi3_mpyi3", 0x8b000000, 0xff000000, Q_Srr_Srr },
{ "addi3_mpyi3", 0x8b000000, 0xff000000, Q_Srr_rSr },
@@ -390,6 +392,8 @@ static const c4x_inst_t c3x_insts[] =
{ "negf_stf", 0xe2000000, 0xfe000000, P_Sr_rS },
{ "negi_sti", 0xe4000000, 0xfe000000, P_Sr_rS },
{ "not_sti", 0xe6000000, 0xfe000000, P_Sr_rS },
+ { "or_sti", 0xe8000000, 0xfe000000, P_Srr_rS },
+ { "or_sti", 0xe8000000, 0xfe000000, P_rSr_rS },
{ "or3_sti", 0xe8000000, 0xfe000000, P_Srr_rS },
{ "or3_sti", 0xe8000000, 0xfe000000, P_rSr_rS },
{ "stf_absf", 0xc8000000, 0xfe000000, Q_rS_Sr },
@@ -402,6 +406,7 @@ static const c4x_inst_t c3x_insts[] =
{ "stf_mpyf", 0xde000000, 0xfe000000, Q_rS_rSr },
{ "stf_mpyf3", 0xde000000, 0xfe000000, Q_rS_Srr },
{ "stf_mpyf3", 0xde000000, 0xfe000000, Q_rS_rSr },
+ { "stf_ldf", 0xd8000000, 0xfe000000, Q_rS_Sr },
{ "stf_negf", 0xe2000000, 0xfe000000, Q_rS_Sr },
{ "stf_stf", 0xc0000000, 0xfe000000, P_rS_rS },
{ "stf1_stf2", 0xc0000000, 0xfe000000, Q_rS_rS }, /* synonym */
@@ -417,6 +422,7 @@ static const c4x_inst_t c3x_insts[] =
{ "sti_and", 0xd0000000, 0xfe000000, Q_rS_rSr },
{ "sti_and3", 0xd0000000, 0xfe000000, Q_rS_Srr },
{ "sti_and3", 0xd0000000, 0xfe000000, Q_rS_rSr },
+ { "sti_ash", 0xd2000000, 0xfe000000, Q_rS_rSr },
{ "sti_ash3", 0xd2000000, 0xfe000000, Q_rS_rSr },
{ "sti_fix", 0xd4000000, 0xfe000000, Q_rS_Sr },
{ "sti_ldi", 0xda000000, 0xfe000000, Q_rS_Sr },
@@ -1007,9 +1013,9 @@ static const c4x_inst_t c3x_insts[] =
{ "xor3", 0x38000000, 0xffe00000, T_rJr }, /* C4x */
{ "xor3", 0x38200000, 0xffe00000, T_rRr }, /* C4x */
{ "xor3", 0x38200000, 0xffe00000, T_Rrr }, /* C4x */
- { "xor3", 0x3c400000, 0xffe00000, T_JRr }, /* C4x */
- { "xor3", 0x3c400000, 0xffe00000, T_RJr }, /* C4x */
- { "xor3", 0x3c600000, 0xffe00000, T_RRr }, /* C4x */
+ { "xor3", 0x38400000, 0xffe00000, T_JRr }, /* C4x */
+ { "xor3", 0x38400000, 0xffe00000, T_RJr }, /* C4x */
+ { "xor3", 0x38600000, 0xffe00000, T_RRr }, /* C4x */
/* Dummy entry, not included in c3x_num_insts. This
lets code examine entry i + 1 without checking
@@ -1025,6 +1031,8 @@ static const c4x_inst_t c4x_insts[] =
/* Parallel instructions. */
{ "frieee_stf", 0xf2000000, 0xfe000000, P_Sr_rS },
{ "toieee_stf", 0xf0000000, 0xfe000000, P_Sr_rS },
+ { "stf_frieee", 0xf2000000, 0xfe000000, Q_rS_Sr },
+ { "stf_toieee", 0xf0000000, 0xfe000000, Q_rS_Sr },
{ "bBaf", 0x68a00000, 0xffe00000, "Q" },
{ "bBaf", 0x6aa00000, 0xffe00000, "P" },
@@ -1038,12 +1046,10 @@ static const c4x_inst_t c4x_insts[] =
{ "lajB", 0x70200000, 0xffe00000, "Q" },
{ "lajB", 0x72200000, 0xffe00000, "P" },
{ "latB", 0x74800000, 0xffe00000, "V" },
-
{ "frieee", 0x1c000000, 0xffe00000, G_r_r },
{ "frieee", 0x1c200000, 0xffe00000, G_T_r },
{ "frieee", 0x1c400000, 0xffe00000, G_Q_r },
{ "frieee", 0x1c600000, 0xffe00000, G_F_r },
-
{ "lb0", 0xb0000000, 0xffe00000, G_r_r },
{ "lb0", 0xb0200000, 0xffe00000, G_T_r },
{ "lb0", 0xb0400000, 0xffe00000, G_Q_r },
diff --git a/include/partition.h b/include/partition.h
index 885a79b..5d3623f 100644
--- a/include/partition.h
+++ b/include/partition.h
@@ -78,4 +78,8 @@ extern void partition_print PARAMS((partition,
#define partition_find(partition__, element__) \
((partition__)->elements[(element__)].class_element)
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#endif /* _PARTITION_H */
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 558b900..7366e94 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,42 @@
+2002-11-12 Segher Boessenkool <segher@koffie.nl>
+
+ * ppc-dis.c (print_insn_powerpc): Correct condition register display.
+
+2002-11-07 Aldy Hernandez <aldyh@redhat.com>
+
+ * ppc-opc.c (EVUIMM_4): Change bit size to 32.
+ (EVUIMM_2): Same.
+ (EVUIMM_8): Same.
+
+2002-11-07 Klee Dienes <kdienes@apple.com>
+
+ * 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-asmtab.c: Regenerate.
+
+2002-11-07 Nick Clifton <nickc@redhat.com>
+
+ * ia64-gen.c: Fix comment formatting and compile time warnings.
+ * ia64-opc-a.c: Fix compile time warnings.
+ * ia64-opc-b.c: Likewise.
+ * ia64-opc-d.c: Likewise.
+ * ia64-opc-f.c: Likewise.
+ * ia64-opc-i.c: Likewise.
+ * ia64-opc-m.c: Likewise.
+ * ia64-opc-x.c: Likewise.
+
+2002-11-06 Aldy Hernandez <aldyh@redhat.com>
+
+ * opcodes/ppc-opc.c: Change RD to RS for evmerge*.
+
2002-10-07 Nathan Tallent <eraxxon@alumni.rice.edu>
* sparc-opc.c (sparc_opcodes) <fb, fba, fbe, fbz, fbg, fbge,
diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
index ed6e813..6bdfa36 100644
--- a/opcodes/Makefile.am
+++ b/opcodes/Makefile.am
@@ -403,7 +403,7 @@ ia64-gen.o: ia64-gen.c ia64-opc.c ia64-opc-a.c ia64-opc-b.c ia64-opc-f.c \
ia64-opc-i.c ia64-opc-m.c ia64-opc-d.c ia64-opc.h
ia64-asmtab.c: @MAINT@ ia64-gen ia64-ic.tbl ia64-raw.tbl ia64-waw.tbl ia64-war.tbl
- here=`pwd`; cd $(srcdir); $$here/ia64-gen > ia64-asmtab.c
+ ./ia64-gen --srcdir $(srcdir) > $(srcdir)/ia64-asmtab.c
s390-mkopc: s390-mkopc.c
$(CC_FOR_BUILD) -o s390-mkopc $(srcdir)/s390-mkopc.c
@@ -587,8 +587,8 @@ ia64-opc.lo: ia64-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
sysdep.h config.h ia64-asmtab.h $(INCDIR)/opcode/ia64.h \
$(BFD_H) $(INCDIR)/symcat.h ia64-asmtab.c
ia64-gen.lo: ia64-gen.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
- $(INCDIR)/safe-ctype.h sysdep.h config.h ia64-opc.h \
- $(INCDIR)/opcode/ia64.h $(BFD_H) $(INCDIR)/symcat.h \
+ $(INCDIR)/safe-ctype.h sysdep.h config.h $(INCDIR)/getopt.h \
+ ia64-opc.h $(INCDIR)/opcode/ia64.h $(BFD_H) $(INCDIR)/symcat.h \
ia64-opc-a.c ia64-opc-i.c ia64-opc-m.c ia64-opc-b.c \
ia64-opc-f.c ia64-opc-x.c ia64-opc-d.c
ia64-asmtab.lo: ia64-asmtab.c
diff --git a/opcodes/Makefile.in b/opcodes/Makefile.in
index c474230..6d11802 100644
--- a/opcodes/Makefile.in
+++ b/opcodes/Makefile.in
@@ -449,7 +449,7 @@ acinclude.m4 aclocal.m4 config.in configure configure.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-TAR = tar
+TAR = gtar
GZIP_ENV = --best
SOURCES = libopcodes.a.c $(libopcodes_la_SOURCES)
OBJECTS = libopcodes.a.$(OBJEXT) $(libopcodes_la_OBJECTS)
@@ -899,7 +899,7 @@ ia64-gen.o: ia64-gen.c ia64-opc.c ia64-opc-a.c ia64-opc-b.c ia64-opc-f.c \
ia64-opc-i.c ia64-opc-m.c ia64-opc-d.c ia64-opc.h
ia64-asmtab.c: @MAINT@ ia64-gen ia64-ic.tbl ia64-raw.tbl ia64-waw.tbl ia64-war.tbl
- here=`pwd`; cd $(srcdir); $$here/ia64-gen > ia64-asmtab.c
+ ./ia64-gen --srcdir $(srcdir) > $(srcdir)/ia64-asmtab.c
s390-mkopc: s390-mkopc.c
$(CC_FOR_BUILD) -o s390-mkopc $(srcdir)/s390-mkopc.c
@@ -1083,8 +1083,8 @@ ia64-opc.lo: ia64-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
sysdep.h config.h ia64-asmtab.h $(INCDIR)/opcode/ia64.h \
$(BFD_H) $(INCDIR)/symcat.h ia64-asmtab.c
ia64-gen.lo: ia64-gen.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
- $(INCDIR)/safe-ctype.h sysdep.h config.h ia64-opc.h \
- $(INCDIR)/opcode/ia64.h $(BFD_H) $(INCDIR)/symcat.h \
+ $(INCDIR)/safe-ctype.h sysdep.h config.h $(INCDIR)/getopt.h \
+ ia64-opc.h $(INCDIR)/opcode/ia64.h $(BFD_H) $(INCDIR)/symcat.h \
ia64-opc-a.c ia64-opc-i.c ia64-opc-m.c ia64-opc-b.c \
ia64-opc-f.c ia64-opc-x.c ia64-opc-d.c
ia64-asmtab.lo: ia64-asmtab.c
diff --git a/opcodes/ia64-asmtab.c b/opcodes/ia64-asmtab.c
index f007f71..399e2bc 100644
--- a/opcodes/ia64-asmtab.c
+++ b/opcodes/ia64-asmtab.c
@@ -1,5 +1,5 @@
-/* This file is automatically generated by ia64-gen. Do not edit! */
-static const char *ia64_strings[] = {
+/* This file is automatically generated by ia64-gen. Do not edit! */
+static const char * const ia64_strings[] = {
"", "0", "1", "a", "acq", "add", "addl", "addp4", "adds", "alloc", "and",
"andcm", "b", "bias", "br", "break", "brl", "brp", "bsw", "c", "call",
"cexit", "chk", "cloop", "clr", "clrrrb", "cmp", "cmp4", "cmpxchg1",
diff --git a/opcodes/ia64-gen.c b/opcodes/ia64-gen.c
index 6443c7c..f6bfda0 100644
--- a/opcodes/ia64-gen.c
+++ b/opcodes/ia64-gen.c
@@ -1,5 +1,5 @@
/* ia64-gen.c -- Generate a shrunk set of opcode tables
- Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Written by Bob Manson, Cygnus Solutions, <manson@cygnus.com>
This file is part of GDB, GAS, and the GNU binutils.
@@ -30,16 +30,17 @@
required.
The resource table is constructed based on some text dependency tables,
- which are also easier to maintain than the final representation.
-
-*/
+ which are also easier to maintain than the final representation. */
#include <stdio.h>
+#include <stdarg.h>
+#include <errno.h>
#include "ansidecl.h"
#include "libiberty.h"
#include "safe-ctype.h"
#include "sysdep.h"
+#include "getopt.h"
#include "ia64-opc.h"
#include "ia64-opc-a.c"
#include "ia64-opc-i.c"
@@ -49,49 +50,54 @@
#include "ia64-opc-x.c"
#include "ia64-opc-d.c"
+#include <libintl.h>
+#define _(String) gettext (String)
+
+const char * program_name = NULL;
int debug = 0;
#define tmalloc(X) (X *) xmalloc (sizeof (X))
/* The main opcode table entry. Each entry is a unique combination of
name and flags (no two entries in the table compare as being equal
- via opcodes_eq). */
+ via opcodes_eq). */
struct main_entry
{
/* The base name of this opcode. The names of its completers are
- appended to it to generate the full instruction name. */
+ appended to it to generate the full instruction name. */
struct string_entry *name;
/* The base opcode entry. Which one to use is a fairly arbitrary choice;
- it uses the first one passed to add_opcode_entry. */
+ it uses the first one passed to add_opcode_entry. */
struct ia64_opcode *opcode;
- /* The list of completers that can be applied to this opcode. */
+ /* The list of completers that can be applied to this opcode. */
struct completer_entry *completers;
- /* Next entry in the chain. */
+ /* Next entry in the chain. */
struct main_entry *next;
- /* Index in the main table. */
+ /* Index in the main table. */
int main_index;
} *maintable, **ordered_table;
+
int otlen = 0;
int ottotlen = 0;
int opcode_count = 0;
-/* The set of possible completers for an opcode. */
+/* The set of possible completers for an opcode. */
struct completer_entry
{
- /* This entry's index in the ia64_completer_table[] array. */
+ /* This entry's index in the ia64_completer_table[] array. */
int num;
- /* The name of the completer. */
+ /* The name of the completer. */
struct string_entry *name;
- /* This entry's parent. */
+ /* This entry's parent. */
struct completer_entry *parent;
/* Set if this is a terminal completer (occurs at the end of an
- opcode). */
+ opcode). */
int is_terminal;
- /* An alternative completer. */
+ /* An alternative completer. */
struct completer_entry *alternative;
/* Additional completers that can be appended to this one. */
@@ -100,53 +106,53 @@ struct completer_entry
/* Before compute_completer_bits () is invoked, this contains the actual
instruction opcode for this combination of opcode and completers.
Afterwards, it contains those bits that are different from its
- parent opcode. */
+ parent opcode. */
ia64_insn bits;
/* Bits set to 1 correspond to those bits in this completer's opcode
that are different from its parent completer's opcode (or from
the base opcode if the entry is the root of the opcode's completer
- list). This field is filled in by compute_completer_bits (). */
+ list). This field is filled in by compute_completer_bits (). */
ia64_insn mask;
- /* Index into the opcode dependency list, or -1 if none. */
+ /* Index into the opcode dependency list, or -1 if none. */
int dependencies;
/* Remember the order encountered in the opcode tables. */
int order;
};
-/* One entry in the disassembler name table. */
+/* One entry in the disassembler name table. */
struct disent
{
- /* The index into the ia64_name_dis array for this entry. */
+ /* The index into the ia64_name_dis array for this entry. */
int ournum;
- /* The index into the main_table[] array. */
+ /* The index into the main_table[] array. */
int insn;
- /* The disassmbly priority of this entry. */
+ /* The disassmbly priority of this entry. */
int priority;
- /* The completer_index value for this entry. */
+ /* The completer_index value for this entry. */
int completer_index;
- /* How many other entries share this decode. */
+ /* How many other entries share this decode. */
int nextcnt;
- /* The next entry sharing the same decode. */
+ /* The next entry sharing the same decode. */
struct disent *nexte;
- /* The next entry in the name list. */
+ /* The next entry in the name list. */
struct disent *next_ent;
} *disinsntable = NULL;
/* A state machine that will eventually be used to generate the
- disassembler table. */
+ disassembler table. */
struct bittree
{
struct disent *disent;
- struct bittree *bits[3]; /* 0, 1, and X (don't care) */
+ struct bittree *bits[3]; /* 0, 1, and X (don't care). */
int bits_to_skip;
int skip_flag;
} *bittree;
@@ -154,62 +160,63 @@ struct bittree
/* The string table contains all opcodes and completers sorted in
alphabetical order. */
-/* One entry in the string table. */
+/* One entry in the string table. */
struct string_entry
{
- /* The index in the ia64_strings[] array for this entry. */
+ /* The index in the ia64_strings[] array for this entry. */
int num;
- /* And the string. */
+ /* And the string. */
char *s;
} **string_table = NULL;
+
int strtablen = 0;
int strtabtotlen = 0;
-/* resource dependency entries */
+/* Resource dependency entries. */
struct rdep
{
- char *name; /* resource name */
+ char *name; /* Resource name. */
unsigned
- mode:2, /* RAW, WAW, or WAR */
- semantics:3; /* dependency semantics */
- char *extra; /* additional semantics info */
+ mode:2, /* RAW, WAW, or WAR. */
+ semantics:3; /* Dependency semantics. */
+ char *extra; /* Additional semantics info. */
int nchks;
- int total_chks; /* total #of terminal insns */
- int *chks; /* insn classes which read (RAW), write
- (WAW), or write (WAR) this rsrc */
- int *chknotes; /* dependency notes for each class */
+ int total_chks; /* Total #of terminal insns. */
+ int *chks; /* Insn classes which read (RAW), write
+ (WAW), or write (WAR) this rsrc. */
+ int *chknotes; /* Dependency notes for each class. */
int nregs;
- int total_regs; /* total #of terminal insns */
- int *regs; /* insn class which write (RAW), write2
- (WAW), or read (WAR) this rsrc */
- int *regnotes; /* dependency notes for each class */
+ int total_regs; /* Total #of terminal insns. */
+ int *regs; /* Insn class which write (RAW), write2
+ (WAW), or read (WAR) this rsrc. */
+ int *regnotes; /* Dependency notes for each class. */
- int waw_special; /* special WAW dependency note */
+ int waw_special; /* Special WAW dependency note. */
} **rdeps = NULL;
static int rdepslen = 0;
static int rdepstotlen = 0;
-/* array of all instruction classes */
+/* Array of all instruction classes. */
struct iclass
{
- char *name; /* instruction class name */
- int is_class; /* is a class, not a terminal */
+ char *name; /* Instruction class name. */
+ int is_class; /* Is a class, not a terminal. */
int nsubs;
- int *subs; /* other classes within this class */
+ int *subs; /* Other classes within this class. */
int nxsubs;
- int xsubs[4]; /* exclusions */
- char *comment; /* optional comment */
- int note; /* optional note */
- int terminal_resolved; /* did we match this with anything? */
- int orphan; /* detect class orphans */
+ int xsubs[4]; /* Exclusions. */
+ char *comment; /* Optional comment. */
+ int note; /* Optional note. */
+ int terminal_resolved; /* Did we match this with anything? */
+ int orphan; /* Detect class orphans. */
} **ics = NULL;
static int iclen = 0;
static int ictotlen = 0;
-/* an opcode dependency (chk/reg pair of dependency lists) */
+/* An opcode dependency (chk/reg pair of dependency lists). */
struct opdep
{
int chk; /* index into dlists */
@@ -219,7 +226,7 @@ struct opdep
static int opdeplen = 0;
static int opdeptotlen = 0;
-/* a generic list of dependencies w/notes encoded. these may be shared. */
+/* A generic list of dependencies w/notes encoded. These may be shared. */
struct deplist
{
int len;
@@ -229,7 +236,81 @@ struct deplist
static int dlistlen = 0;
static int dlisttotlen = 0;
-/* add NAME to the resource table, where TYPE is RAW or WAW */
+
+static void fail (const char *, ...);
+static void warn (const char *, ...);
+static struct rdep * insert_resource (const char *, enum ia64_dependency_mode);
+static int deplist_equals (struct deplist *, struct deplist *);
+static short insert_deplist (int, unsigned short *);
+static short insert_dependencies (int, unsigned short *, int, unsigned short *);
+static void mark_used (struct iclass *, int);
+static int fetch_insn_class (const char *, int);
+static int sub_compare (const void *, const void *);
+static void load_insn_classes (void);
+static void parse_resource_users (const char *, int **, int *, int **);
+static int parse_semantics (char *);
+static void add_dep (const char *, const char *, const char *, int, int, char *, int);
+static void load_depfile (const char *, enum ia64_dependency_mode);
+static void load_dependencies (void);
+static int irf_operand (int, const char *);
+static int in_iclass_mov_x (struct ia64_opcode *, struct iclass *, const char *, const char *);
+static int in_iclass (struct ia64_opcode *, struct iclass *, const char *, const char *, int *);
+static int lookup_regindex (const char *, int);
+static int lookup_specifier (const char *);
+static void print_dependency_table (void);
+static struct string_entry * insert_string (char *);
+static void gen_dis_table (struct bittree *);
+static void print_dis_table (void);
+static void generate_disassembler (void);
+static void print_string_table (void);
+static int completer_entries_eq (struct completer_entry *, struct completer_entry *);
+static struct completer_entry * insert_gclist (struct completer_entry *);
+static int get_prefix_len (const char *);
+static void compute_completer_bits (struct main_entry *, struct completer_entry *);
+static void collapse_redundant_completers (void);
+static int insert_opcode_dependencies (struct ia64_opcode *, struct completer_entry *);
+static void insert_completer_entry (struct ia64_opcode *, struct main_entry *, int);
+static void print_completer_entry (struct completer_entry *);
+static void print_completer_table (void);
+static int opcodes_eq (struct ia64_opcode *, struct ia64_opcode *);
+static void add_opcode_entry (struct ia64_opcode *);
+static void print_main_table (void);
+static void shrink (struct ia64_opcode *);
+static void print_version (void);
+static void usage (FILE *, int);
+static void finish_distable (void);
+static void insert_bit_table_ent (struct bittree *, int, ia64_insn, ia64_insn, int, int, int);
+static void add_dis_entry (struct bittree *, ia64_insn, ia64_insn, int, struct completer_entry *, int);
+static void compact_distree (struct bittree *);
+static struct bittree * make_bittree_entry (void);
+static struct disent * add_dis_table_ent (struct disent *, int, int, int);
+
+
+static void
+fail (const char *message, ...)
+{
+ va_list args;
+
+ va_start (args, message);
+ fprintf (stderr, _("%s: Error: "), program_name);
+ vfprintf (stderr, message, args);
+ va_end (args);
+ xexit (1);
+}
+
+static void
+warn (const char *message, ...)
+{
+ va_list args;
+
+ va_start (args, message);
+
+ fprintf (stderr, _("%s: Warning: "), program_name);
+ vfprintf (stderr, message, args);
+ va_end (args);
+}
+
+/* Add NAME to the resource table, where TYPE is RAW or WAW. */
static struct rdep *
insert_resource (const char *name, enum ia64_dependency_mode type)
{
@@ -248,7 +329,7 @@ insert_resource (const char *name, enum ia64_dependency_mode type)
return rdeps[rdepslen++];
}
-/* are the lists of dependency indexes equivalent? */
+/* Are the lists of dependency indexes equivalent? */
static int
deplist_equals (struct deplist *d1, struct deplist *d2)
{
@@ -257,55 +338,48 @@ deplist_equals (struct deplist *d1, struct deplist *d2)
if (d1->len != d2->len)
return 0;
- for (i=0;i < d1->len;i++)
- {
- if (d1->deps[i] != d2->deps[i])
- return 0;
- }
+ for (i = 0; i < d1->len; i++)
+ if (d1->deps[i] != d2->deps[i])
+ return 0;
return 1;
}
-/* add the list of dependencies to the list of dependency lists */
+/* Add the list of dependencies to the list of dependency lists. */
static short
-insert_deplist(int count, unsigned short *deps)
+insert_deplist (int count, unsigned short *deps)
{
- /* sort the list, then see if an equivalent list exists already.
- this results in a much smaller set of dependency lists
- */
+ /* Sort the list, then see if an equivalent list exists already.
+ this results in a much smaller set of dependency lists. */
struct deplist *list;
char set[0x10000];
int i;
- memset ((void *)set, 0, sizeof(set));
- for (i=0;i < count;i++)
+ memset ((void *)set, 0, sizeof (set));
+ for (i = 0; i < count; i++)
set[deps[i]] = 1;
+
count = 0;
- for (i=0;i < (int)sizeof(set);i++)
+ for (i = 0; i < (int) sizeof (set); i++)
if (set[i])
++count;
- list = tmalloc(struct deplist);
+ list = tmalloc (struct deplist);
list->len = count;
- list->deps = (unsigned short *)malloc (sizeof(unsigned short) * count);
- for (i=0, count=0;i < (int)sizeof(set);i++)
- {
- if (set[i])
- {
- list->deps[count++] = i;
- }
- }
+ list->deps = (unsigned short *) malloc (sizeof (unsigned short) * count);
- /* does this list exist already? */
- for (i=0;i < dlistlen;i++)
- {
- if (deplist_equals (list, dlists[i]))
- {
- free (list->deps);
- free (list);
- return i;
- }
- }
+ for (i = 0, count = 0; i < (int) sizeof (set); i++)
+ if (set[i])
+ list->deps[count++] = i;
+
+ /* Does this list exist already? */
+ for (i = 0; i < dlistlen; i++)
+ if (deplist_equals (list, dlists[i]))
+ {
+ free (list->deps);
+ free (list);
+ return i;
+ }
if (dlistlen == dlisttotlen)
{
@@ -318,7 +392,7 @@ insert_deplist(int count, unsigned short *deps)
return dlistlen++;
}
-/* add the given pair of dependency lists to the opcode dependency list */
+/* Add the given pair of dependency lists to the opcode dependency list. */
static short
insert_dependencies (int nchks, unsigned short *chks,
int nregs, unsigned short *regs)
@@ -333,13 +407,12 @@ insert_dependencies (int nchks, unsigned short *chks,
if (nchks > 0)
chkind = insert_deplist (nchks, chks);
- for (i=0;i < opdeplen;i++)
- {
- if (opdeps[i]->chk == chkind
- && opdeps[i]->reg == regind)
- return i;
- }
- pair = tmalloc(struct opdep);
+ for (i = 0; i < opdeplen; i++)
+ if (opdeps[i]->chk == chkind
+ && opdeps[i]->reg == regind)
+ return i;
+
+ pair = tmalloc (struct opdep);
pair->chk = chkind;
pair->reg = regind;
@@ -363,20 +436,17 @@ mark_used (struct iclass *ic, int clear_terminals)
if (clear_terminals)
ic->terminal_resolved = 1;
- for (i=0;i < ic->nsubs;i++)
- {
- mark_used (ics[ic->subs[i]], clear_terminals);
- }
- for (i=0;i < ic->nxsubs;i++)
- {
- mark_used (ics[ic->xsubs[i]], clear_terminals);
- }
+ for (i = 0; i < ic->nsubs; i++)
+ mark_used (ics[ic->subs[i]], clear_terminals);
+
+ for (i = 0; i < ic->nxsubs; i++)
+ mark_used (ics[ic->xsubs[i]], clear_terminals);
}
-/* look up an instruction class; if CREATE make a new one if none found;
- returns the index into the insn class array */
+/* Look up an instruction class; if CREATE make a new one if none found;
+ returns the index into the insn class array. */
static int
-fetch_insn_class(const char *full_name, int create)
+fetch_insn_class (const char *full_name, int create)
{
char *name;
char *notestr;
@@ -414,14 +484,14 @@ fetch_insn_class(const char *full_name, int create)
if (notestr)
{
char *nextnotestr;
+
note = atoi (notestr + 1);
if ((nextnotestr = strchr (notestr + 1, '+')) != NULL)
{
if (strcmp (notestr, "+1+13") == 0)
note = 13;
else if (!xsect || nextnotestr < xsect)
- fprintf (stderr, "Warning: multiple note %s not handled\n",
- notestr);
+ warn (_("multiple note %s not handled\n"), notestr);
}
}
@@ -436,8 +506,8 @@ fetch_insn_class(const char *full_name, int create)
*comment = 0;
}
- for (i=0;i < iclen;i++)
- if (strcmp(name, ics[i]->name) == 0
+ for (i = 0; i < iclen; i++)
+ if (strcmp (name, ics[i]->name) == 0
&& ((comment == NULL && ics[i]->comment == NULL)
|| (comment != NULL && ics[i]->comment != NULL
&& strncmp (ics[i]->comment, comment,
@@ -448,40 +518,44 @@ fetch_insn_class(const char *full_name, int create)
if (!create)
return -1;
- /* doesn't exist, so make a new one */
+ /* Doesn't exist, so make a new one. */
if (iclen == ictotlen)
{
ictotlen += 20;
ics = (struct iclass **)
- xrealloc(ics, (ictotlen)*sizeof(struct iclass *));
+ xrealloc (ics, (ictotlen) * sizeof (struct iclass *));
}
+
ind = iclen++;
- ics[ind] = tmalloc(struct iclass);
- memset((void *)ics[ind], 0, sizeof(struct iclass));
- ics[ind]->name = xstrdup(name);
+ ics[ind] = tmalloc (struct iclass);
+ memset ((void *)ics[ind], 0, sizeof (struct iclass));
+ ics[ind]->name = xstrdup (name);
ics[ind]->is_class = is_class;
ics[ind]->orphan = 1;
if (comment)
{
ics[ind]->comment = xstrdup (comment + 1);
- ics[ind]->comment[strlen(ics[ind]->comment)-1] = 0;
+ ics[ind]->comment[strlen (ics[ind]->comment)-1] = 0;
}
+
if (notestr)
ics[ind]->note = note;
- /* if it's a composite class, there's a comment or note, look for an
- existing class or terminal with the same name. */
+ /* If it's a composite class, there's a comment or note, look for an
+ existing class or terminal with the same name. */
if ((xsect || comment || notestr) && is_class)
{
/* First, populate with the class we're based on. */
char *subname = name;
+
if (xsect)
*xsect = 0;
else if (comment)
*comment = 0;
else if (notestr)
*notestr = 0;
+
ics[ind]->nsubs = 1;
ics[ind]->subs = tmalloc(int);
ics[ind]->subs[0] = fetch_insn_class (subname, 1);;
@@ -490,6 +564,7 @@ fetch_insn_class(const char *full_name, int create)
while (xsect)
{
char *subname = xsect + 1;
+
xsect = strchr (subname, '\\');
if (xsect)
*xsect = 0;
@@ -501,8 +576,8 @@ fetch_insn_class(const char *full_name, int create)
return ind;
}
-/* for sorting a class's sub-class list only; make sure classes appear before
- terminals */
+/* For sorting a class's sub-class list only; make sure classes appear before
+ terminals. */
static int
sub_compare (const void *e1, const void *e2)
{
@@ -521,41 +596,39 @@ sub_compare (const void *e1, const void *e2)
}
static void
-load_insn_classes()
+load_insn_classes (void)
{
- FILE *fp = fopen("ia64-ic.tbl", "r");
+ FILE *fp = fopen ("ia64-ic.tbl", "r");
char buf[2048];
- if (fp == NULL){
- fprintf (stderr, "Can't find ia64-ic.tbl for reading\n");
- exit(1);
- }
+ if (fp == NULL)
+ fail (_("can't find ia64-ic.tbl for reading\n"));
- /* discard first line */
+ /* Discard first line. */
fgets (buf, sizeof(buf), fp);
- while (!feof(fp))
+ while (!feof (fp))
{
int iclass;
char *name;
char *tmp;
- if (fgets (buf, sizeof(buf), fp) == NULL)
+ if (fgets (buf, sizeof (buf), fp) == NULL)
break;
- while (ISSPACE (buf[strlen(buf)-1]))
- buf[strlen(buf)-1] = '\0';
+ while (ISSPACE (buf[strlen (buf) - 1]))
+ buf[strlen (buf) - 1] = '\0';
name = tmp = buf;
while (*tmp != ';')
{
++tmp;
- if (tmp == buf + sizeof(buf))
+ if (tmp == buf + sizeof (buf))
abort ();
}
*tmp++ = '\0';
- iclass = fetch_insn_class(name, 1);
+ iclass = fetch_insn_class (name, 1);
ics[iclass]->is_class = 1;
if (strcmp (name, "none") == 0)
@@ -565,7 +638,7 @@ load_insn_classes()
continue;
}
- /* for this class, record all sub-classes */
+ /* For this class, record all sub-classes. */
while (*tmp)
{
char *subname;
@@ -574,44 +647,43 @@ load_insn_classes()
while (*tmp && ISSPACE (*tmp))
{
++tmp;
- if (tmp == buf + sizeof(buf))
- abort();
+ if (tmp == buf + sizeof (buf))
+ abort ();
}
subname = tmp;
while (*tmp && *tmp != ',')
{
++tmp;
- if (tmp == buf + sizeof(buf))
- abort();
+ if (tmp == buf + sizeof (buf))
+ abort ();
}
if (*tmp == ',')
*tmp++ = '\0';
ics[iclass]->subs = (int *)
- xrealloc((void *)ics[iclass]->subs,
- (ics[iclass]->nsubs+1)*sizeof(int));
+ xrealloc ((void *)ics[iclass]->subs,
+ (ics[iclass]->nsubs + 1) * sizeof (int));
- sub = fetch_insn_class(subname, 1);
+ sub = fetch_insn_class (subname, 1);
ics[iclass]->subs = (int *)
- xrealloc(ics[iclass]->subs, (ics[iclass]->nsubs+1)*sizeof(int));
+ xrealloc (ics[iclass]->subs, (ics[iclass]->nsubs + 1) * sizeof (int));
ics[iclass]->subs[ics[iclass]->nsubs++] = sub;
}
- /* make sure classes come before terminals */
+
+ /* Make sure classes come before terminals. */
qsort ((void *)ics[iclass]->subs,
ics[iclass]->nsubs, sizeof(int), sub_compare);
}
- fclose(fp);
+ fclose (fp);
if (debug)
- {
- printf ("%d classes\n", iclen);
- }
+ printf ("%d classes\n", iclen);
}
-/* extract the insn classes from the given line */
+/* Extract the insn classes from the given line. */
static void
-parse_resource_users(ref, usersp, nusersp, notesp)
- char *ref;
+parse_resource_users (ref, usersp, nusersp, notesp)
+ const char *ref;
int **usersp;
int *nusersp;
int **notesp;
@@ -641,53 +713,49 @@ parse_resource_users(ref, usersp, nusersp, notesp)
c = *tmp;
*tmp++ = '\0';
- xsect = strchr(name, '\\');
- if ((notestr = strstr(name, "+")) != NULL)
+ xsect = strchr (name, '\\');
+ if ((notestr = strstr (name, "+")) != NULL)
{
char *nextnotestr;
+
note = atoi (notestr + 1);
if ((nextnotestr = strchr (notestr + 1, '+')) != NULL)
{
- /* note 13 always implies note 1 */
+ /* Note 13 always implies note 1. */
if (strcmp (notestr, "+1+13") == 0)
note = 13;
else if (!xsect || nextnotestr < xsect)
- fprintf (stderr, "Warning: multiple note %s not handled\n",
- notestr);
+ warn (_("multiple note %s not handled\n"), notestr);
}
if (!xsect)
*notestr = '\0';
}
else
note = 0;
-
+
/* All classes are created when the insn class table is parsed;
Individual instructions might not appear until the dependency tables
are read. Only create new classes if it's *not* an insn class,
or if it's a composite class (which wouldn't necessarily be in the IC
- table).
- */
- if (strncmp(name, "IC:", 3) != 0 || xsect != NULL)
+ table). */
+ if (strncmp (name, "IC:", 3) != 0 || xsect != NULL)
create = 1;
- iclass = fetch_insn_class(name, create);
+ iclass = fetch_insn_class (name, create);
if (iclass != -1)
{
users = (int *)
- xrealloc ((void *)users,(count+1)*sizeof(int));
+ xrealloc ((void *) users,(count + 1) * sizeof (int));
notes = (int *)
- xrealloc ((void *)notes,(count+1)*sizeof(int));
+ xrealloc ((void *) notes,(count + 1) * sizeof (int));
notes[count] = note;
users[count++] = iclass;
mark_used (ics[iclass], 0);
}
- else
- {
- if (debug)
- printf("Class %s not found\n", name);
- }
+ else if (debug)
+ printf("Class %s not found\n", name);
}
- /* update the return values */
+ /* Update the return values. */
*usersp = users;
*nusersp = count;
*notesp = notes;
@@ -723,10 +791,10 @@ add_dep (const char *name, const char *chk, const char *reg,
struct rdep *rs;
rs = insert_resource (name, mode);
- parse_resource_users (chk, &rs->chks, &rs->nchks,
- &rs->chknotes);
- parse_resource_users (reg, &rs->regs, &rs->nregs,
- &rs->regnotes);
+
+ parse_resource_users (chk, &rs->chks, &rs->nchks, &rs->chknotes);
+ parse_resource_users (reg, &rs->regs, &rs->nregs, &rs->regnotes);
+
rs->semantics = semantics;
rs->extra = extra;
rs->waw_special = flag;
@@ -735,16 +803,14 @@ add_dep (const char *name, const char *chk, const char *reg,
static void
load_depfile (const char *filename, enum ia64_dependency_mode mode)
{
- FILE *fp = fopen(filename, "r");
+ FILE *fp = fopen (filename, "r");
char buf[1024];
- if (fp == NULL){
- fprintf (stderr, "Can't find %s for reading\n", filename);
- exit(1);
- }
+ if (fp == NULL)
+ fail (_("can't find %s for reading\n"), filename);
- fgets(buf, sizeof(buf), fp);
- while (!feof(fp))
+ fgets (buf, sizeof(buf), fp);
+ while (!feof (fp))
{
char *name, *tmp;
int semantics;
@@ -754,8 +820,8 @@ load_depfile (const char *filename, enum ia64_dependency_mode mode)
if (fgets (buf, sizeof(buf), fp) == NULL)
break;
- while (ISSPACE (buf[strlen(buf)-1]))
- buf[strlen(buf)-1] = '\0';
+ while (ISSPACE (buf[strlen (buf) - 1]))
+ buf[strlen (buf) - 1] = '\0';
name = tmp = buf;
while (*tmp != ';')
@@ -783,7 +849,7 @@ load_depfile (const char *filename, enum ia64_dependency_mode mode)
/* For WAW entries, if the chks and regs differ, we need to enter the
entries in both positions so that the tables will be parsed properly,
- without a lot of extra work */
+ without a lot of extra work. */
if (mode == IA64_DV_WAW && strcmp (regp, chkp) != 0)
{
add_dep (name, chkp, regp, semantics, mode, extra, 0);
@@ -794,21 +860,21 @@ load_depfile (const char *filename, enum ia64_dependency_mode mode)
add_dep (name, chkp, regp, semantics, mode, extra, 0);
}
}
- fclose(fp);
+ fclose (fp);
}
static void
-load_dependencies()
+load_dependencies (void)
{
load_depfile ("ia64-raw.tbl", IA64_DV_RAW);
load_depfile ("ia64-waw.tbl", IA64_DV_WAW);
load_depfile ("ia64-war.tbl", IA64_DV_WAR);
if (debug)
- printf ("%d RAW/WAW/WAR dependencies\n", rdepslen);
+ printf ("%d RAW/WAW/WAR dependencies\n", rdepslen);
}
-/* is the given operand an indirect register file operand? */
+/* Is the given operand an indirect register file operand? */
static int
irf_operand (int op, const char *field)
{
@@ -832,8 +898,8 @@ irf_operand (int op, const char *field)
}
}
-/* handle mov_ar, mov_br, mov_cr, mov_indirect, mov_ip, mov_pr, mov_psr, and
- mov_um insn classes */
+/* Handle mov_ar, mov_br, mov_cr, mov_indirect, mov_ip, mov_pr, mov_psr, and
+ mov_um insn classes. */
static int
in_iclass_mov_x (struct ia64_opcode *idesc, struct iclass *ic,
const char *format, const char *field)
@@ -947,11 +1013,10 @@ in_iclass_mov_x (struct ia64_opcode *idesc, struct iclass *ic,
return 0;
}
-
-/* is the given opcode in the given insn class? */
+/* Is the given opcode in the given insn class? */
static int
-in_iclass(struct ia64_opcode *idesc, struct iclass *ic,
- const char *format, const char *field, int *notep)
+in_iclass (struct ia64_opcode *idesc, struct iclass *ic,
+ const char *format, const char *field, int *notep)
{
int i;
int resolved = 0;
@@ -960,15 +1025,14 @@ in_iclass(struct ia64_opcode *idesc, struct iclass *ic,
{
if (!strncmp (ic->comment, "Format", 6))
{
- /* assume that the first format seen is the most restrictive, and
- only keep a later one if it looks like it's more restrictive. */
+ /* Assume that the first format seen is the most restrictive, and
+ only keep a later one if it looks like it's more restrictive. */
if (format)
{
if (strlen (ic->comment) < strlen (format))
{
- fprintf (stderr, "Warning: most recent format '%s'\n"
- "appears more restrictive than '%s'\n",
- ic->comment, format);
+ warn (_("most recent format '%s'\nappears more restrictive than '%s'\n"),
+ ic->comment, format);
format = ic->comment;
}
}
@@ -978,15 +1042,15 @@ in_iclass(struct ia64_opcode *idesc, struct iclass *ic,
else if (!strncmp (ic->comment, "Field", 5))
{
if (field)
- fprintf (stderr, "Overlapping field %s->%s\n",
- ic->comment, field);
+ warn (_("overlapping field %s->%s\n"),
+ ic->comment, field);
field = ic->comment;
}
}
- /* an insn class matches anything that is the same followed by completers,
+ /* An insn class matches anything that is the same followed by completers,
except when the absence and presence of completers constitutes different
- instructions */
+ instructions. */
if (ic->nsubs == 0 && ic->nxsubs == 0)
{
int is_mov = strncmp (idesc->name, "mov", 3) == 0;
@@ -997,26 +1061,25 @@ in_iclass(struct ia64_opcode *idesc, struct iclass *ic,
&& (idesc->name[len] == '\0'
|| idesc->name[len] == '.'));
- /* all break and nop variations must match exactly */
+ /* All break and nop variations must match exactly. */
if (resolved &&
(strcmp (ic->name, "break") == 0
|| strcmp (ic->name, "nop") == 0))
resolved = strcmp (ic->name, idesc->name) == 0;
- /* assume restrictions in the FORMAT/FIELD negate resolution,
- unless specifically allowed by clauses in this block */
+ /* Assume restrictions in the FORMAT/FIELD negate resolution,
+ unless specifically allowed by clauses in this block. */
if (resolved && field)
{
- /* check Field(sf)==sN against opcode sN */
+ /* Check Field(sf)==sN against opcode sN. */
if (strstr(field, "(sf)==") != NULL)
{
char *sf;
+
if ((sf = strstr (idesc->name, ".s")) != 0)
- {
- resolved = strcmp (sf + 1, strstr (field, "==") + 2) == 0;
- }
+ resolved = strcmp (sf + 1, strstr (field, "==") + 2) == 0;
}
- /* check Field(lftype)==XXX */
+ /* Check Field(lftype)==XXX. */
else if (strstr (field, "(lftype)") != NULL)
{
if (strstr (idesc->name, "fault") != NULL)
@@ -1024,7 +1087,7 @@ in_iclass(struct ia64_opcode *idesc, struct iclass *ic,
else
resolved = strstr (field, "fault") == NULL;
}
- /* handle Field(ctype)==XXX */
+ /* Handle Field(ctype)==XXX. */
else if (strstr (field, "(ctype)") != NULL)
{
if (strstr (idesc->name, "or.andcm"))
@@ -1045,6 +1108,7 @@ in_iclass(struct ia64_opcode *idesc, struct iclass *ic,
resolved = strcmp (field, "Field(ctype)==") == 0;
}
}
+
if (resolved && format)
{
if (strncmp (idesc->name, "dep", 3) == 0
@@ -1075,8 +1139,8 @@ in_iclass(struct ia64_opcode *idesc, struct iclass *ic,
resolved = 0;
}
- /* misc brl variations ('.cond' is optional);
- plain brl matches brl.cond */
+ /* Misc brl variations ('.cond' is optional);
+ plain brl matches brl.cond. */
if (!resolved
&& (strcmp (idesc->name, "brl") == 0
|| strncmp (idesc->name, "brl.", 4) == 0)
@@ -1085,7 +1149,7 @@ in_iclass(struct ia64_opcode *idesc, struct iclass *ic,
resolved = 1;
}
- /* misc br variations ('.cond' is optional) */
+ /* Misc br variations ('.cond' is optional). */
if (!resolved
&& (strcmp (idesc->name, "br") == 0
|| strncmp (idesc->name, "br.", 3) == 0)
@@ -1100,81 +1164,77 @@ in_iclass(struct ia64_opcode *idesc, struct iclass *ic,
resolved = 1;
}
- /* probe variations */
+ /* probe variations. */
if (!resolved && strncmp (idesc->name, "probe", 5) == 0)
{
resolved = strcmp (ic->name, "probe") == 0
&& !((strstr (idesc->name, "fault") != NULL)
^ (format && strstr (format, "M40") != NULL));
}
- /* mov variations */
+
+ /* mov variations. */
if (!resolved && is_mov)
{
if (plain_mov)
{
- /* mov alias for fmerge */
+ /* mov alias for fmerge. */
if (strcmp (ic->name, "fmerge") == 0)
{
resolved = idesc->operands[0] == IA64_OPND_F1
&& idesc->operands[1] == IA64_OPND_F3;
}
- /* mov alias for adds (r3 or imm14) */
+ /* mov alias for adds (r3 or imm14). */
else if (strcmp (ic->name, "adds") == 0)
{
resolved = (idesc->operands[0] == IA64_OPND_R1
&& (idesc->operands[1] == IA64_OPND_R3
|| (idesc->operands[1] == IA64_OPND_IMM14)));
}
- /* mov alias for addl */
+ /* mov alias for addl. */
else if (strcmp (ic->name, "addl") == 0)
{
resolved = idesc->operands[0] == IA64_OPND_R1
&& idesc->operands[1] == IA64_OPND_IMM22;
}
}
- /* some variants of mov and mov.[im] */
+
+ /* Some variants of mov and mov.[im]. */
if (!resolved && strncmp (ic->name, "mov_", 4) == 0)
- {
- resolved = in_iclass_mov_x (idesc, ic, format, field);
- }
+ resolved = in_iclass_mov_x (idesc, ic, format, field);
}
- /* keep track of this so we can flag any insn classes which aren't
- mapped onto at least one real insn */
+ /* Keep track of this so we can flag any insn classes which aren't
+ mapped onto at least one real insn. */
if (resolved)
- {
- ic->terminal_resolved = 1;
- }
+ ic->terminal_resolved = 1;
}
- else for (i=0;i < ic->nsubs;i++)
+ else for (i = 0; i < ic->nsubs; i++)
{
- if (in_iclass(idesc, ics[ic->subs[i]], format, field, notep))
+ if (in_iclass (idesc, ics[ic->subs[i]], format, field, notep))
{
int j;
- for (j=0;j < ic->nxsubs;j++)
- {
- if (in_iclass(idesc, ics[ic->xsubs[j]], NULL, NULL, NULL))
- return 0;
- }
+
+ for (j = 0; j < ic->nxsubs; j++)
+ if (in_iclass (idesc, ics[ic->xsubs[j]], NULL, NULL, NULL))
+ return 0;
+
if (debug > 1)
- printf ("%s is in IC %s\n",
- idesc->name, ic->name);
+ printf ("%s is in IC %s\n", idesc->name, ic->name);
+
resolved = 1;
break;
}
}
- /* If it's in this IC, add the IC note (if any) to the insn */
+ /* If it's in this IC, add the IC note (if any) to the insn. */
if (resolved)
{
if (ic->note && notep)
{
if (*notep && *notep != ic->note)
- {
- fprintf (stderr, "Warning: overwriting note %d with note %d"
- "(IC:%s)\n",
- *notep, ic->note, ic->name);
- }
+ warn (_("overwriting note %d with note %d (IC:%s)\n"),
+ *notep, ic->note, ic->name);
+
*notep = ic->note;
}
}
@@ -1355,8 +1415,8 @@ lookup_specifier (const char *name)
if (strstr (name, "PR%, % in 16 ") != NULL)
return IA64_RS_PRr;
- fprintf (stderr, "Warning! Don't know how to specify %% dependency %s\n",
- name);
+ warn (_("don't know how to specify %% dependency %s\n"),
+ name);
}
else if (strchr (name, '#'))
{
@@ -1377,8 +1437,8 @@ lookup_specifier (const char *name)
if (strstr (name, "RR#") != NULL)
return IA64_RS_RR;
- fprintf (stderr, "Warning! Don't know how to specify # dependency %s\n",
- name);
+ warn (_("Don't know how to specify # dependency %s\n"),
+ name);
}
else if (strncmp (name, "AR[FPSR]", 8) == 0)
return IA64_RS_AR_FPSR;
@@ -1402,7 +1462,7 @@ lookup_specifier (const char *name)
return IA64_RS_ANY;
}
-void
+static void
print_dependency_table ()
{
int i, j;
@@ -1415,58 +1475,59 @@ print_dependency_table ()
{
if (!ics[i]->nsubs)
{
- fprintf (stderr, "Warning: IC:%s", ics[i]->name);
if (ics[i]->comment)
- fprintf (stderr, "[%s]", ics[i]->comment);
- fprintf (stderr, " has no terminals or sub-classes\n");
+ warn (_("IC:%s [%s] has no terminals or sub-classes\n"),
+ ics[i]->name, ics[i]->comment);
+ else
+ warn (_("IC:%s has no terminals or sub-classes\n"),
+ ics[i]->name);
}
}
else
{
if (!ics[i]->terminal_resolved && !ics[i]->orphan)
{
- fprintf(stderr, "Warning: no insns mapped directly to "
- "terminal IC %s", ics[i]->name);
if (ics[i]->comment)
- fprintf(stderr, "[%s] ", ics[i]->comment);
- fprintf(stderr, "\n");
+ warn (_("no insns mapped directly to terminal IC %s [%s]"),
+ ics[i]->name, ics[i]->comment);
+ else
+ warn (_("no insns mapped directly to terminal IC %s\n"),
+ ics[i]->name);
}
}
}
- for (i=0;i < iclen;i++)
+ for (i = 0; i < iclen; i++)
{
if (ics[i]->orphan)
{
mark_used (ics[i], 1);
- fprintf (stderr, "Warning: class %s is defined but not used\n",
- ics[i]->name);
+ warn (_("class %s is defined but not used\n"),
+ ics[i]->name);
}
}
- if (debug > 1) for (i=0;i < rdepslen;i++)
- {
- static const char *mode_str[] = { "RAW", "WAW", "WAR" };
- if (rdeps[i]->total_chks == 0)
- {
- fprintf (stderr, "Warning: rsrc %s (%s) has no chks%s\n",
- rdeps[i]->name, mode_str[rdeps[i]->mode],
- rdeps[i]->total_regs ? "" : " or regs");
- }
- else if (rdeps[i]->total_regs == 0)
- {
- fprintf (stderr, "Warning: rsrc %s (%s) has no regs\n",
- rdeps[i]->name, mode_str[rdeps[i]->mode]);
- }
- }
+ if (debug > 1)
+ for (i = 0; i < rdepslen; i++)
+ {
+ static const char *mode_str[] = { "RAW", "WAW", "WAR" };
+
+ if (rdeps[i]->total_chks == 0)
+ warn (_("Warning: rsrc %s (%s) has no chks%s\n"),
+ rdeps[i]->name, mode_str[rdeps[i]->mode],
+ rdeps[i]->total_regs ? "" : " or regs");
+ else if (rdeps[i]->total_regs == 0)
+ warn (_("rsrc %s (%s) has no regs\n"),
+ rdeps[i]->name, mode_str[rdeps[i]->mode]);
+ }
}
- /* the dependencies themselves */
+ /* The dependencies themselves. */
printf ("static const struct ia64_dependency\ndependencies[] = {\n");
- for (i=0;i < rdepslen;i++)
+ for (i = 0; i < rdepslen; i++)
{
/* '%', '#', AR[], CR[], or PSR. indicates we need to specify the actual
- resource used */
+ resource used. */
int specifier = lookup_specifier (rdeps[i]->name);
int regindex = lookup_regindex (rdeps[i]->name, specifier);
@@ -1481,7 +1542,7 @@ print_dependency_table ()
}
printf ("};\n\n");
- /* and dependency lists */
+ /* And dependency lists. */
for (i=0;i < dlistlen;i++)
{
int len = 2;
@@ -1498,11 +1559,11 @@ print_dependency_table ()
printf ("\n};\n\n");
}
- /* and opcode dependency list */
+ /* And opcode dependency list. */
printf ("#define NELS(X) (sizeof(X)/sizeof(X[0]))\n");
printf ("static const struct ia64_opcode_dependency\n");
printf ("op_dependencies[] = {\n");
- for (i=0;i < opdeplen;i++)
+ for (i = 0; i < opdeplen; i++)
{
printf (" { ");
if (opdeps[i]->chk == -1)
@@ -1519,11 +1580,9 @@ print_dependency_table ()
}
-/* Add STR to the string table. */
-
+/* Add STR to the string table. */
static struct string_entry *
-insert_string (str)
- char *str;
+insert_string (char *str)
{
int start = 0, end = strtablen;
int i, x;
@@ -1546,13 +1605,9 @@ insert_string (str)
}
if (strcmp (str, string_table[strtablen - 1]->s) > 0)
- {
- i = end;
- }
+ i = end;
else if (strcmp (str, string_table[0]->s) < 0)
- {
- i = 0;
- }
+ i = 0;
else
{
while (1)
@@ -1561,52 +1616,43 @@ insert_string (str)
i = (start + end) / 2;
c = strcmp (str, string_table[i]->s);
+
if (c < 0)
- {
- end = i - 1;
- }
+ end = i - 1;
else if (c == 0)
- {
- return string_table[i];
- }
+ return string_table[i];
else
- {
- start = i + 1;
- }
+ start = i + 1;
+
if (start > end)
- {
- break;
- }
+ break;
}
}
+
for (; i > 0 && i < strtablen; i--)
- {
- if (strcmp (str, string_table[i - 1]->s) > 0)
- {
- break;
- }
- }
+ if (strcmp (str, string_table[i - 1]->s) > 0)
+ break;
+
for (; i < strtablen; i++)
- {
- if (strcmp (str, string_table[i]->s) < 0)
- {
- break;
- }
- }
+ if (strcmp (str, string_table[i]->s) < 0)
+ break;
+
for (x = strtablen - 1; x >= i; x--)
{
string_table[x + 1] = string_table[x];
string_table[x + 1]->num = x + 1;
}
+
string_table[i] = tmalloc (struct string_entry);
string_table[i]->s = xstrdup (str);
string_table[i]->num = i;
strtablen++;
+
return string_table[i];
}
-struct bittree *
-make_bittree_entry ()
+static struct bittree *
+make_bittree_entry (void)
{
struct bittree *res = tmalloc (struct bittree);
@@ -1618,8 +1664,9 @@ make_bittree_entry ()
res->bits_to_skip = 0;
return res;
}
+
-struct disent *
+static struct disent *
add_dis_table_ent (which, insn, order, completer_index)
struct disent *which;
int insn;
@@ -1635,9 +1682,8 @@ add_dis_table_ent (which, insn, order, completer_index)
ent->nextcnt++;
while (ent->nexte != NULL)
- {
- ent = ent->nexte;
- }
+ ent = ent->nexte;
+
ent = (ent->nexte = tmalloc (struct disent));
}
else
@@ -1661,7 +1707,7 @@ add_dis_table_ent (which, insn, order, completer_index)
return which;
}
-void
+static void
finish_distable ()
{
struct disent *ent = disinsntable;
@@ -1675,7 +1721,7 @@ finish_distable ()
}
}
-void
+static void
insert_bit_table_ent (curr_ent, bit, opcode, mask,
opcodenum, order, completer_index)
struct bittree *curr_ent;
@@ -1702,13 +1748,10 @@ insert_bit_table_ent (curr_ent, bit, opcode, mask,
m = ((ia64_insn) 1) << bit;
if (mask & m)
- {
- b = (opcode & m) ? 1 : 0;
- }
+ b = (opcode & m) ? 1 : 0;
else
- {
- b = 2;
- }
+ b = 2;
+
next = curr_ent->bits[b];
if (next == NULL)
{
@@ -1719,7 +1762,7 @@ insert_bit_table_ent (curr_ent, bit, opcode, mask,
completer_index);
}
-void
+static void
add_dis_entry (first, opcode, mask, opcodenum, ent, completer_index)
struct bittree *first;
ia64_insn opcode;
@@ -1729,15 +1772,14 @@ add_dis_entry (first, opcode, mask, opcodenum, ent, completer_index)
int completer_index;
{
if (completer_index & (1 << 20))
- {
- abort ();
- }
+ abort ();
while (ent != NULL)
{
ia64_insn newopcode = (opcode & (~ ent->mask)) | ent->bits;
add_dis_entry (first, newopcode, mask, opcodenum, ent->addl_entries,
(completer_index << 1) | 1);
+
if (ent->is_terminal)
{
insert_bit_table_ent (bittree, 40, newopcode, mask,
@@ -1749,8 +1791,8 @@ add_dis_entry (first, opcode, mask, opcodenum, ent, completer_index)
}
}
-/* This optimization pass combines multiple "don't care" nodes. */
-void
+/* This optimization pass combines multiple "don't care" nodes. */
+static void
compact_distree (ent)
struct bittree *ent;
{
@@ -1790,10 +1832,9 @@ compact_distree (ent)
for (x = 0; x < 3; x++)
{
struct bittree *i = ent->bits[x];
+
if (i != NULL)
- {
- compact_distree (i);
- }
+ compact_distree (i);
}
}
@@ -1803,7 +1844,7 @@ static int tot_insn_list_len = 0;
/* Generate the disassembler state machine corresponding to the tree
in ENT. */
-void
+static void
gen_dis_table (ent)
struct bittree *ent;
{
@@ -1813,47 +1854,37 @@ gen_dis_table (ent)
int totbits = bitsused;
int needed_bytes;
int zero_count = 0;
- int zero_dest = 0; /* initialize this with 0 to keep gcc quiet... */
+ int zero_dest = 0; /* Initialize this with 0 to keep gcc quiet... */
/* If this is a terminal entry, there's no point in skipping any
- bits. */
+ bits. */
if (ent->skip_flag && ent->bits[0] == NULL && ent->bits[1] == NULL &&
ent->bits[2] == NULL)
{
if (ent->disent == NULL)
- {
- abort ();
- }
+ abort ();
else
- {
- ent->skip_flag = 0;
- }
+ ent->skip_flag = 0;
}
/* Calculate the amount of space needed for this entry, or at least
- a conservatively large approximation. */
+ a conservatively large approximation. */
if (ent->skip_flag)
- {
- totbits += 5;
- }
+ totbits += 5;
+
for (x = 1; x < 3; x++)
- {
- if (ent->bits[x] != NULL)
- {
- totbits += 16;
- }
- }
+ if (ent->bits[x] != NULL)
+ totbits += 16;
if (ent->disent != NULL)
{
if (ent->bits[2] != NULL)
- {
- abort ();
- }
+ abort ();
+
totbits += 16;
}
- /* Now allocate the space. */
+ /* Now allocate the space. */
needed_bytes = (totbits + 7) / 8;
if ((needed_bytes + insn_list_len) > tot_insn_list_len)
{
@@ -1865,7 +1896,7 @@ gen_dis_table (ent)
memset (insn_list + our_offset, 0, needed_bytes);
/* Encode the skip entry by setting bit 6 set in the state op field,
- and store the # of bits to skip immediately after. */
+ and store the # of bits to skip immediately after. */
if (ent->skip_flag)
{
bitsused += 5;
@@ -1878,8 +1909,7 @@ gen_dis_table (ent)
&& (ENT)->disent == NULL && (ENT)->skip_flag == 0)
/* Store an "if (bit is zero)" instruction by setting bit 7 in the
- state op field. */
-
+ state op field. */
if (ent->bits[0] != NULL)
{
struct bittree *nent = ent->bits[0];
@@ -1929,14 +1959,10 @@ gen_dis_table (ent)
i = NULL;
}
else
- {
- idest = insn_list_len - our_offset;
- }
+ idest = insn_list_len - our_offset;
}
else
- {
- idest = ent->disent->ournum;
- }
+ idest = ent->disent->ournum;
/* If the destination offset for the if (bit is 1) test is less
than 256 bytes away, we can store it as 8-bits instead of 16;
@@ -1946,8 +1972,7 @@ gen_dis_table (ent)
Note that branchings within the table are relative, and
there are no branches that branch past our instruction yet
- so we do not need to adjust any other offsets. */
-
+ so we do not need to adjust any other offsets. */
if (x == 1)
{
if (idest <= 256)
@@ -1965,9 +1990,7 @@ gen_dis_table (ent)
idest--;
}
else
- {
- insn_list[our_offset] |= 0x20;
- }
+ insn_list[our_offset] |= 0x20;
}
else
{
@@ -1996,74 +2019,58 @@ gen_dis_table (ent)
idest &= ~32768;
}
else
- {
- insn_list[our_offset] |= 0x08;
- }
+ insn_list[our_offset] |= 0x08;
}
+
if (debug)
{
int id = idest;
if (i == NULL)
- {
- id |= 32768;
- }
+ id |= 32768;
else if (! (id & 32768))
- {
- id += our_offset;
- }
+ id += our_offset;
+
if (x == 1)
- {
- printf ("%d: if (1) goto %d\n", our_offset, id);
- }
+ printf ("%d: if (1) goto %d\n", our_offset, id);
else
- {
- printf ("%d: try %d\n", our_offset, id);
- }
+ printf ("%d: try %d\n", our_offset, id);
}
- /* Store the address of the entry being branched to. */
+ /* Store the address of the entry being branched to. */
while (currbits >= 0)
{
char *byte = insn_list + our_offset + bitsused / 8;
if (idest & (1 << currbits))
- {
- *byte |= (1 << (7 - (bitsused % 8)));
- }
+ *byte |= (1 << (7 - (bitsused % 8)));
+
bitsused++;
currbits--;
}
- /* Now generate the states for the entry being branched to. */
+ /* Now generate the states for the entry being branched to. */
if (i != NULL)
- {
- gen_dis_table (i);
- }
-
+ gen_dis_table (i);
}
}
+
if (debug)
{
if (ent->skip_flag)
- {
- printf ("%d: skipping %d\n", our_offset, ent->bits_to_skip);
- }
+ printf ("%d: skipping %d\n", our_offset, ent->bits_to_skip);
if (ent->bits[0] != NULL)
- {
- printf ("%d: if (0:%d) goto %d\n", our_offset, zero_count + 1,
- zero_dest);
- }
+ printf ("%d: if (0:%d) goto %d\n", our_offset, zero_count + 1,
+ zero_dest);
}
+
if (bitsused != totbits)
- {
- abort ();
- }
+ abort ();
}
-void
-print_dis_table ()
+static void
+print_dis_table (void)
{
int x;
struct disent *cent = disinsntable;
@@ -2072,9 +2079,8 @@ print_dis_table ()
for (x = 0; x < insn_list_len; x++)
{
if ((x > 0) && ((x % 12) == 0))
- {
- printf ("\n");
- }
+ printf ("\n");
+
printf ("0x%02x, ", insn_list[x]);
}
printf ("\n};\n\n");
@@ -2096,24 +2102,22 @@ print_dis_table ()
printf ("};\n\n");
}
-void
-generate_disassembler ()
+static void
+generate_disassembler (void)
{
int i;
bittree = make_bittree_entry ();
- for (i=0; i < otlen;i++)
+ for (i = 0; i < otlen; i++)
{
struct main_entry *ptr = ordered_table[i];
if (ptr->opcode->type != IA64_TYPE_DYN)
- {
- add_dis_entry (bittree,
- ptr->opcode->opcode, ptr->opcode->mask,
- ptr->main_index,
- ptr->completers, 1);
- }
+ add_dis_entry (bittree,
+ ptr->opcode->opcode, ptr->opcode->mask,
+ ptr->main_index,
+ ptr->completers, 1);
}
compact_distree (bittree);
@@ -2123,25 +2127,26 @@ generate_disassembler ()
print_dis_table ();
}
-void
-print_string_table ()
+static void
+print_string_table (void)
{
int x;
char lbuf[80], buf[80];
int blen = 0;
- printf ("static const char *ia64_strings[] = {\n");
+ printf ("static const char * const ia64_strings[] = {\n");
lbuf[0] = '\0';
+
for (x = 0; x < strtablen; x++)
{
int len;
if (strlen (string_table[x]->s) > 75)
- {
- abort ();
- }
+ abort ();
+
sprintf (buf, " \"%s\",", string_table[x]->s);
len = strlen (buf);
+
if ((blen + len) > 75)
{
printf (" %s\n", lbuf);
@@ -2151,10 +2156,10 @@ print_string_table ()
strcat (lbuf, buf);
blen += len;
}
+
if (blen > 0)
- {
- printf (" %s\n", lbuf);
- }
+ printf (" %s\n", lbuf);
+
printf ("};\n\n");
}
@@ -2162,9 +2167,9 @@ static struct completer_entry **glist;
static int glistlen = 0;
static int glisttotlen = 0;
-/* If the completer trees ENT1 and ENT2 are equal, return 1. */
+/* If the completer trees ENT1 and ENT2 are equal, return 1. */
-int
+static int
completer_entries_eq (ent1, ent2)
struct completer_entry *ent1, *ent2;
{
@@ -2176,25 +2181,23 @@ completer_entries_eq (ent1, ent2)
|| ent1->is_terminal != ent2->is_terminal
|| ent1->dependencies != ent2->dependencies
|| ent1->order != ent2->order)
- {
- return 0;
- }
+ return 0;
+
if (! completer_entries_eq (ent1->addl_entries, ent2->addl_entries))
- {
- return 0;
- }
+ return 0;
+
ent1 = ent1->alternative;
ent2 = ent2->alternative;
}
+
return ent1 == ent2;
}
/* Insert ENT into the global list of completers and return it. If an
equivalent entry (according to completer_entries_eq) already exists,
- it is returned instead. */
-struct completer_entry *
-insert_gclist (ent)
- struct completer_entry *ent;
+ it is returned instead. */
+static struct completer_entry *
+insert_gclist (struct completer_entry *ent)
{
if (ent != NULL)
{
@@ -2223,13 +2226,9 @@ insert_gclist (ent)
}
if (ent->name->num < glist[0]->name->num)
- {
- i = 0;
- }
+ i = 0;
else if (ent->name->num > glist[end - 1]->name->num)
- {
- i = end;
- }
+ i = end;
else
{
int c;
@@ -2238,62 +2237,50 @@ insert_gclist (ent)
{
i = (start + end) / 2;
c = ent->name->num - glist[i]->name->num;
+
if (c < 0)
- {
- end = i - 1;
- }
+ end = i - 1;
else if (c == 0)
{
while (i > 0
&& ent->name->num == glist[i - 1]->name->num)
- {
- i--;
- }
+ i--;
+
break;
}
else
- {
- start = i + 1;
- }
+ start = i + 1;
+
if (start > end)
- {
- break;
- }
+ break;
}
+
if (c == 0)
{
while (i < glistlen)
{
if (ent->name->num != glist[i]->name->num)
- {
- break;
- }
+ break;
+
if (completer_entries_eq (ent, glist[i]))
- {
- return glist[i];
- }
+ return glist[i];
+
i++;
}
}
}
+
for (; i > 0 && i < glistlen; i--)
- {
- if (ent->name->num >= glist[i - 1]->name->num)
- {
- break;
- }
- }
+ if (ent->name->num >= glist[i - 1]->name->num)
+ break;
+
for (; i < glistlen; i++)
- {
- if (ent->name->num < glist[i]->name->num)
- {
- break;
- }
- }
+ if (ent->name->num < glist[i]->name->num)
+ break;
+
for (x = glistlen - 1; x >= i; x--)
- {
- glist[x + 1] = glist[x];
- }
+ glist[x + 1] = glist[x];
+
glist[i] = ent;
glistlen++;
}
@@ -2307,19 +2294,13 @@ get_prefix_len (name)
char *c;
if (name[0] == '\0')
- {
- return 0;
- }
+ return 0;
c = strchr (name, '.');
if (c != NULL)
- {
- return c - name;
- }
+ return c - name;
else
- {
- return strlen (name);
- }
+ return strlen (name);
}
static void
@@ -2340,30 +2321,21 @@ compute_completer_bits (ment, ent)
int x;
while (p != NULL && ! p->is_terminal)
- {
- p = p->parent;
- }
+ p = p->parent;
if (p != NULL)
- {
- p_bits = p->bits;
- }
+ p_bits = p->bits;
else
- {
- p_bits = ment->opcode->opcode;
- }
+ p_bits = ment->opcode->opcode;
for (x = 0; x < 64; x++)
{
ia64_insn m = ((ia64_insn) 1) << x;
+
if ((p_bits & m) != (our_bits & m))
- {
- mask |= m;
- }
+ mask |= m;
else
- {
- our_bits &= ~m;
- }
+ our_bits &= ~m;
}
ent->bits = our_bits;
ent->mask = mask;
@@ -2379,9 +2351,9 @@ compute_completer_bits (ment, ent)
}
/* Find identical completer trees that are used in different
- instructions and collapse their entries. */
-void
-collapse_redundant_completers ()
+ instructions and collapse their entries. */
+static void
+collapse_redundant_completers (void)
{
struct main_entry *ptr;
int x;
@@ -2389,43 +2361,39 @@ collapse_redundant_completers ()
for (ptr = maintable; ptr != NULL; ptr = ptr->next)
{
if (ptr->completers == NULL)
- {
- abort ();
- }
+ abort ();
+
compute_completer_bits (ptr, ptr->completers);
ptr->completers = insert_gclist (ptr->completers);
}
/* The table has been finalized, now number the indexes. */
for (x = 0; x < glistlen; x++)
- {
- glist[x]->num = x;
- }
+ glist[x]->num = x;
}
-/* attach two lists of dependencies to each opcode.
+/* Attach two lists of dependencies to each opcode.
1) all resources which, when already marked in use, conflict with this
opcode (chks)
2) all resources which must be marked in use when this opcode is used
- (regs)
-*/
-int
+ (regs). */
+static int
insert_opcode_dependencies (opc, cmp)
struct ia64_opcode *opc;
struct completer_entry *cmp ATTRIBUTE_UNUSED;
{
- /* note all resources which point to this opcode. rfi has the most chks
- (79) and cmpxchng has the most regs (54) so 100 here should be enough */
+ /* Note all resources which point to this opcode. rfi has the most chks
+ (79) and cmpxchng has the most regs (54) so 100 here should be enough. */
int i;
int nregs = 0;
unsigned short regs[256];
int nchks = 0;
unsigned short chks[256];
- /* flag insns for which no class matched; there should be none */
+ /* Flag insns for which no class matched; there should be none. */
int no_class_found = 1;
- for (i=0;i < rdepslen;i++)
+ for (i = 0; i < rdepslen; i++)
{
struct rdep *rs = rdeps[i];
int j;
@@ -2441,21 +2409,19 @@ insert_opcode_dependencies (opc, cmp)
if (in_iclass (opc, ics[rs->regs[j]], NULL, NULL, &ic_note))
{
- /* We can ignore ic_note 11 for non PR resources */
+ /* We can ignore ic_note 11 for non PR resources. */
if (ic_note == 11 && strncmp (rs->name, "PR", 2) != 0)
ic_note = 0;
if (ic_note != 0 && rs->regnotes[j] != 0
&& ic_note != rs->regnotes[j]
&& !(ic_note == 11 && rs->regnotes[j] == 1))
- fprintf (stderr, "Warning: IC note %d in opcode %s (IC:%s)"
- " conflicts with resource %s note %d\n",
- ic_note, opc->name, ics[rs->regs[j]]->name,
- rs->name, rs->regnotes[j]);
+ warn (_("IC note %d in opcode %s (IC:%s) conflicts with resource %s note %d\n"),
+ ic_note, opc->name, ics[rs->regs[j]]->name,
+ rs->name, rs->regnotes[j]);
/* Instruction class notes override resource notes.
So far, only note 11 applies to an IC instead of a resource,
- and note 11 implies note 1.
- */
+ and note 11 implies note 1. */
if (ic_note)
regs[nregs++] = RDEP(ic_note, i);
else
@@ -2464,23 +2430,23 @@ insert_opcode_dependencies (opc, cmp)
++rs->total_regs;
}
}
- for (j=0;j < rs->nchks;j++)
+
+ for (j = 0; j < rs->nchks; j++)
{
int ic_note = 0;
if (in_iclass (opc, ics[rs->chks[j]], NULL, NULL, &ic_note))
{
- /* We can ignore ic_note 11 for non PR resources */
+ /* We can ignore ic_note 11 for non PR resources. */
if (ic_note == 11 && strncmp (rs->name, "PR", 2) != 0)
ic_note = 0;
if (ic_note != 0 && rs->chknotes[j] != 0
&& ic_note != rs->chknotes[j]
&& !(ic_note == 11 && rs->chknotes[j] == 1))
- fprintf (stderr, "Warning: IC note %d for opcode %s (IC:%s)"
- " conflicts with resource %s note %d\n",
- ic_note, opc->name, ics[rs->chks[j]]->name,
- rs->name, rs->chknotes[j]);
+ warn (_("IC note %d for opcode %s (IC:%s) conflicts with resource %s note %d\n"),
+ ic_note, opc->name, ics[rs->chks[j]]->name,
+ rs->name, rs->chknotes[j]);
if (ic_note)
chks[nchks++] = RDEP(ic_note, i);
else
@@ -2492,14 +2458,14 @@ insert_opcode_dependencies (opc, cmp)
}
if (no_class_found)
- fprintf (stderr, "Warning: opcode %s has no class (ops %d %d %d)\n",
- opc->name,
- opc->operands[0], opc->operands[1], opc->operands[2]);
+ warn (_("opcode %s has no class (ops %d %d %d)\n"),
+ opc->name,
+ opc->operands[0], opc->operands[1], opc->operands[2]);
return insert_dependencies (nchks, chks, nregs, regs);
}
-void
+static void
insert_completer_entry (opc, tabent, order)
struct ia64_opcode *opc;
struct main_entry *tabent;
@@ -2511,15 +2477,13 @@ insert_completer_entry (opc, tabent, order)
int at_end = 0;
if (strlen (opc->name) > 128)
- {
- abort ();
- }
+ abort ();
+
strcpy (pcopy, opc->name);
prefix = pcopy + get_prefix_len (pcopy);
+
if (prefix[0] != '\0')
- {
- prefix++;
- }
+ prefix++;
while (! at_end)
{
@@ -2541,13 +2505,13 @@ insert_completer_entry (opc, tabent, order)
break;
}
else
- {
- ptr = &((*ptr)->alternative);
- }
+ ptr = &((*ptr)->alternative);
}
+
if (need_new_ent)
{
struct completer_entry *nent = tmalloc (struct completer_entry);
+
nent->name = sent;
nent->parent = parent;
nent->addl_entries = NULL;
@@ -2566,9 +2530,7 @@ insert_completer_entry (opc, tabent, order)
}
if ((*ptr)->is_terminal)
- {
- abort ();
- }
+ abort ();
(*ptr)->is_terminal = 1;
(*ptr)->mask = (ia64_insn)-1;
@@ -2577,7 +2539,7 @@ insert_completer_entry (opc, tabent, order)
(*ptr)->order = order;
}
-void
+static void
print_completer_entry (ent)
struct completer_entry *ent;
{
@@ -2592,10 +2554,9 @@ print_completer_entry (ent)
mask = mask >> 1;
bits = bits >> 1;
}
+
if (bits & 0xffffffff00000000LL)
- {
- abort ();
- }
+ abort ();
}
printf (" { 0x%x, 0x%x, %d, %d, %d, %d, %d, %d },\n",
@@ -2609,20 +2570,18 @@ print_completer_entry (ent)
ent->dependencies);
}
-void
+static void
print_completer_table ()
{
int x;
printf ("static const struct ia64_completer_table\ncompleter_table[] = {\n");
for (x = 0; x < glistlen; x++)
- {
- print_completer_entry (glist[x]);
- }
+ print_completer_entry (glist[x]);
printf ("};\n\n");
}
-int
+static int
opcodes_eq (opc1, opc2)
struct ia64_opcode *opc1;
struct ia64_opcode *opc2;
@@ -2633,26 +2592,22 @@ opcodes_eq (opc1, opc2)
if ((opc1->mask != opc2->mask) || (opc1->type != opc2->type)
|| (opc1->num_outputs != opc2->num_outputs)
|| (opc1->flags != opc2->flags))
- {
- return 0;
- }
+ return 0;
+
for (x = 0; x < 5; x++)
- {
- if (opc1->operands[x] != opc2->operands[x])
- {
- return 0;
- }
- }
+ if (opc1->operands[x] != opc2->operands[x])
+ return 0;
+
plen1 = get_prefix_len (opc1->name);
plen2 = get_prefix_len (opc2->name);
+
if (plen1 == plen2 && (memcmp (opc1->name, opc2->name, plen1) == 0))
- {
- return 1;
- }
+ return 1;
+
return 0;
}
-void
+static void
add_opcode_entry (opc)
struct ia64_opcode *opc;
{
@@ -2662,9 +2617,8 @@ add_opcode_entry (opc)
int found_it = 0;
if (strlen (opc->name) > 128)
- {
- abort ();
- }
+ abort ();
+
place = &maintable;
strcpy (prefix, opc->name);
prefix[get_prefix_len (prefix)] = '\0';
@@ -2672,7 +2626,7 @@ add_opcode_entry (opc)
/* Walk the list of opcode table entries. If it's a new
instruction, allocate and fill in a new entry. Note
- the main table is alphabetical by opcode name. */
+ the main table is alphabetical by opcode name. */
while (*place != NULL)
{
@@ -2683,9 +2637,8 @@ add_opcode_entry (opc)
break;
}
if ((*place)->name->num > name->num)
- {
- break;
- }
+ break;
+
place = &((*place)->next);
}
if (! found_it)
@@ -2710,8 +2663,8 @@ add_opcode_entry (opc)
insert_completer_entry (opc, *place, opcode_count++);
}
-void
-print_main_table ()
+static void
+print_main_table (void)
{
struct main_entry *ptr = maintable;
int index = 0;
@@ -2742,30 +2695,85 @@ print_main_table ()
printf ("};\n\n");
}
-void
+static void
shrink (table)
struct ia64_opcode *table;
{
int curr_opcode;
for (curr_opcode = 0; table[curr_opcode].name != NULL; curr_opcode++)
- {
- add_opcode_entry (table + curr_opcode);
- }
+ add_opcode_entry (table + curr_opcode);
}
+
+/* Program options. */
+#define OPTION_SRCDIR 200
+
+struct option long_options[] =
+{
+ {"srcdir", required_argument, NULL, OPTION_SRCDIR},
+ {"debug", no_argument, NULL, 'd'},
+ {"version", no_argument, NULL, 'V'},
+ {"help", no_argument, NULL, 'h'},
+ {0, no_argument, NULL, 0}
+};
+
+static void
+print_version (void)
+{
+ printf ("%s: version 1.0\n", program_name);
+ xexit (0);
+}
+
+static void
+usage (FILE * stream, int status)
+{
+ fprintf (stream, "Usage: %s [-V | --version] [-d | --debug] [--srcdir=dirname] [--help]\n",
+ program_name);
+ xexit (status);
+}
+
int
-main (argc, argv)
- int argc;
- char **argv ATTRIBUTE_UNUSED;
+main (int argc, char **argv)
{
- if (argc > 1)
- {
- debug = 1;
- }
+ extern int chdir (char *);
+ char *srcdir = NULL;
+ int c;
+
+ program_name = *argv;
+ xmalloc_set_program_name (program_name);
+
+ while ((c = getopt_long (argc, argv, "vVdh", long_options, 0)) != EOF)
+ switch (c)
+ {
+ case OPTION_SRCDIR:
+ srcdir = optarg;
+ break;
+ case 'V':
+ case 'v':
+ print_version ();
+ break;
+ case 'd':
+ debug = 1;
+ break;
+ case 'h':
+ case '?':
+ usage (stderr, 0);
+ default:
+ case 0:
+ break;
+ }
+
+ if (optind != argc)
+ usage (stdout, 1);
+
+ if (srcdir != NULL)
+ if (chdir (srcdir) != 0)
+ fail (_("unable to change directory to \"%s\", errno = %s\n"),
+ srcdir, strerror (errno));
- load_insn_classes();
- load_dependencies();
+ load_insn_classes ();
+ load_dependencies ();
shrink (ia64_opcodes_a);
shrink (ia64_opcodes_b);
@@ -2777,7 +2785,7 @@ main (argc, argv)
collapse_redundant_completers ();
- printf ("/* This file is automatically generated by ia64-gen. Do not edit! */\n");
+ printf ("/* This file is automatically generated by ia64-gen. Do not edit! */\n");
print_string_table ();
print_dependency_table ();
print_completer_table ();
diff --git a/opcodes/ia64-opc-a.c b/opcodes/ia64-opc-a.c
index 27d7637..c9e3162 100644
--- a/opcodes/ia64-opc-a.c
+++ b/opcodes/ia64-opc-a.c
@@ -1,5 +1,5 @@
/* ia64-opc-a.c -- IA-64 `A' opcode table.
- Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of GDB, GAS, and the GNU binutils.
@@ -82,292 +82,296 @@
(bOp (a) | bX2a (b) | bZa (c) | bZb (d) | bX4 (e) | bX2b (f)), \
(mOp | mX2a | mZa | mZb | mX4 | mX2b)
+/* Used to initialise unused fields in ia64_opcode struct,
+ in order to stop gcc from complaining. */
+#define EMPTY 0,0,NULL
+
struct ia64_opcode ia64_opcodes_a[] =
{
- /* A-type instruction encodings (sorted according to major opcode) */
+ /* A-type instruction encodings (sorted according to major opcode). */
- {"add", A, OpX2aVeX4X2b (8, 0, 0, 0, 0), {R1, R2, R3}},
- {"add", A, OpX2aVeX4X2b (8, 0, 0, 0, 1), {R1, R2, R3, C1}},
- {"sub", A, OpX2aVeX4X2b (8, 0, 0, 1, 1), {R1, R2, R3}},
- {"sub", A, OpX2aVeX4X2b (8, 0, 0, 1, 0), {R1, R2, R3, C1}},
- {"addp4", A, OpX2aVeX4X2b (8, 0, 0, 2, 0), {R1, R2, R3}},
- {"and", A, OpX2aVeX4X2b (8, 0, 0, 3, 0), {R1, R2, R3}},
- {"andcm", A, OpX2aVeX4X2b (8, 0, 0, 3, 1), {R1, R2, R3}},
- {"or", A, OpX2aVeX4X2b (8, 0, 0, 3, 2), {R1, R2, R3}},
- {"xor", A, OpX2aVeX4X2b (8, 0, 0, 3, 3), {R1, R2, R3}},
- {"shladd", A, OpX2aVeX4 (8, 0, 0, 4), {R1, R2, CNT2a, R3}},
- {"shladdp4", A, OpX2aVeX4 (8, 0, 0, 6), {R1, R2, CNT2a, R3}},
- {"sub", A, OpX2aVeX4X2b (8, 0, 0, 9, 1), {R1, IMM8, R3}},
- {"and", A, OpX2aVeX4X2b (8, 0, 0, 0xb, 0), {R1, IMM8, R3}},
- {"andcm", A, OpX2aVeX4X2b (8, 0, 0, 0xb, 1), {R1, IMM8, R3}},
- {"or", A, OpX2aVeX4X2b (8, 0, 0, 0xb, 2), {R1, IMM8, R3}},
- {"xor", A, OpX2aVeX4X2b (8, 0, 0, 0xb, 3), {R1, IMM8, R3}},
- {"mov", A, OpX2aVeImm14 (8, 2, 0, 0), {R1, R3}},
- {"mov", A, OpX2aVeR3a (8, 2, 0, 0), {R1, IMM14}, PSEUDO},
- {"adds", A, OpX2aVe (8, 2, 0), {R1, IMM14, R3}},
- {"addp4", A, OpX2aVe (8, 3, 0), {R1, IMM14, R3}},
- {"padd1", A, OpX2aZaZbX4X2b (8, 1, 0, 0, 0, 0), {R1, R2, R3}},
- {"padd2", A, OpX2aZaZbX4X2b (8, 1, 0, 1, 0, 0), {R1, R2, R3}},
- {"padd4", A, OpX2aZaZbX4X2b (8, 1, 1, 0, 0, 0), {R1, R2, R3}},
- {"padd1.sss", A, OpX2aZaZbX4X2b (8, 1, 0, 0, 0, 1), {R1, R2, R3}},
- {"padd2.sss", A, OpX2aZaZbX4X2b (8, 1, 0, 1, 0, 1), {R1, R2, R3}},
- {"padd1.uuu", A, OpX2aZaZbX4X2b (8, 1, 0, 0, 0, 2), {R1, R2, R3}},
- {"padd2.uuu", A, OpX2aZaZbX4X2b (8, 1, 0, 1, 0, 2), {R1, R2, R3}},
- {"padd1.uus", A, OpX2aZaZbX4X2b (8, 1, 0, 0, 0, 3), {R1, R2, R3}},
- {"padd2.uus", A, OpX2aZaZbX4X2b (8, 1, 0, 1, 0, 3), {R1, R2, R3}},
- {"psub1", A, OpX2aZaZbX4X2b (8, 1, 0, 0, 1, 0), {R1, R2, R3}},
- {"psub2", A, OpX2aZaZbX4X2b (8, 1, 0, 1, 1, 0), {R1, R2, R3}},
- {"psub4", A, OpX2aZaZbX4X2b (8, 1, 1, 0, 1, 0), {R1, R2, R3}},
- {"psub1.sss", A, OpX2aZaZbX4X2b (8, 1, 0, 0, 1, 1), {R1, R2, R3}},
- {"psub2.sss", A, OpX2aZaZbX4X2b (8, 1, 0, 1, 1, 1), {R1, R2, R3}},
- {"psub1.uuu", A, OpX2aZaZbX4X2b (8, 1, 0, 0, 1, 2), {R1, R2, R3}},
- {"psub2.uuu", A, OpX2aZaZbX4X2b (8, 1, 0, 1, 1, 2), {R1, R2, R3}},
- {"psub1.uus", A, OpX2aZaZbX4X2b (8, 1, 0, 0, 1, 3), {R1, R2, R3}},
- {"psub2.uus", A, OpX2aZaZbX4X2b (8, 1, 0, 1, 1, 3), {R1, R2, R3}},
- {"pavg1", A, OpX2aZaZbX4X2b (8, 1, 0, 0, 2, 2), {R1, R2, R3}},
- {"pavg2", A, OpX2aZaZbX4X2b (8, 1, 0, 1, 2, 2), {R1, R2, R3}},
- {"pavg1.raz", A, OpX2aZaZbX4X2b (8, 1, 0, 0, 2, 3), {R1, R2, R3}},
- {"pavg2.raz", A, OpX2aZaZbX4X2b (8, 1, 0, 1, 2, 3), {R1, R2, R3}},
- {"pavgsub1", A, OpX2aZaZbX4X2b (8, 1, 0, 0, 3, 2), {R1, R2, R3}},
- {"pavgsub2", A, OpX2aZaZbX4X2b (8, 1, 0, 1, 3, 2), {R1, R2, R3}},
- {"pcmp1.eq", A, OpX2aZaZbX4X2b (8, 1, 0, 0, 9, 0), {R1, R2, R3}},
- {"pcmp2.eq", A, OpX2aZaZbX4X2b (8, 1, 0, 1, 9, 0), {R1, R2, R3}},
- {"pcmp4.eq", A, OpX2aZaZbX4X2b (8, 1, 1, 0, 9, 0), {R1, R2, R3}},
- {"pcmp1.gt", A, OpX2aZaZbX4X2b (8, 1, 0, 0, 9, 1), {R1, R2, R3}},
- {"pcmp2.gt", A, OpX2aZaZbX4X2b (8, 1, 0, 1, 9, 1), {R1, R2, R3}},
- {"pcmp4.gt", A, OpX2aZaZbX4X2b (8, 1, 1, 0, 9, 1), {R1, R2, R3}},
- {"pshladd2", A, OpX2aZaZbX4 (8, 1, 0, 1, 4), {R1, R2, CNT2b, R3}},
- {"pshradd2", A, OpX2aZaZbX4 (8, 1, 0, 1, 6), {R1, R2, CNT2b, R3}},
+ {"add", A, OpX2aVeX4X2b (8, 0, 0, 0, 0), {R1, R2, R3}, EMPTY},
+ {"add", A, OpX2aVeX4X2b (8, 0, 0, 0, 1), {R1, R2, R3, C1}, EMPTY},
+ {"sub", A, OpX2aVeX4X2b (8, 0, 0, 1, 1), {R1, R2, R3}, EMPTY},
+ {"sub", A, OpX2aVeX4X2b (8, 0, 0, 1, 0), {R1, R2, R3, C1}, EMPTY},
+ {"addp4", A, OpX2aVeX4X2b (8, 0, 0, 2, 0), {R1, R2, R3}, EMPTY},
+ {"and", A, OpX2aVeX4X2b (8, 0, 0, 3, 0), {R1, R2, R3}, EMPTY},
+ {"andcm", A, OpX2aVeX4X2b (8, 0, 0, 3, 1), {R1, R2, R3}, EMPTY},
+ {"or", A, OpX2aVeX4X2b (8, 0, 0, 3, 2), {R1, R2, R3}, EMPTY},
+ {"xor", A, OpX2aVeX4X2b (8, 0, 0, 3, 3), {R1, R2, R3}, EMPTY},
+ {"shladd", A, OpX2aVeX4 (8, 0, 0, 4), {R1, R2, CNT2a, R3}, EMPTY},
+ {"shladdp4", A, OpX2aVeX4 (8, 0, 0, 6), {R1, R2, CNT2a, R3}, EMPTY},
+ {"sub", A, OpX2aVeX4X2b (8, 0, 0, 9, 1), {R1, IMM8, R3}, EMPTY},
+ {"and", A, OpX2aVeX4X2b (8, 0, 0, 0xb, 0), {R1, IMM8, R3}, EMPTY},
+ {"andcm", A, OpX2aVeX4X2b (8, 0, 0, 0xb, 1), {R1, IMM8, R3}, EMPTY},
+ {"or", A, OpX2aVeX4X2b (8, 0, 0, 0xb, 2), {R1, IMM8, R3}, EMPTY},
+ {"xor", A, OpX2aVeX4X2b (8, 0, 0, 0xb, 3), {R1, IMM8, R3}, EMPTY},
+ {"mov", A, OpX2aVeImm14 (8, 2, 0, 0), {R1, R3}, EMPTY},
+ {"mov", A, OpX2aVeR3a (8, 2, 0, 0), {R1, IMM14}, PSEUDO, 0, NULL},
+ {"adds", A, OpX2aVe (8, 2, 0), {R1, IMM14, R3}, EMPTY},
+ {"addp4", A, OpX2aVe (8, 3, 0), {R1, IMM14, R3}, EMPTY},
+ {"padd1", A, OpX2aZaZbX4X2b (8, 1, 0, 0, 0, 0), {R1, R2, R3}, EMPTY},
+ {"padd2", A, OpX2aZaZbX4X2b (8, 1, 0, 1, 0, 0), {R1, R2, R3}, EMPTY},
+ {"padd4", A, OpX2aZaZbX4X2b (8, 1, 1, 0, 0, 0), {R1, R2, R3}, EMPTY},
+ {"padd1.sss", A, OpX2aZaZbX4X2b (8, 1, 0, 0, 0, 1), {R1, R2, R3}, EMPTY},
+ {"padd2.sss", A, OpX2aZaZbX4X2b (8, 1, 0, 1, 0, 1), {R1, R2, R3}, EMPTY},
+ {"padd1.uuu", A, OpX2aZaZbX4X2b (8, 1, 0, 0, 0, 2), {R1, R2, R3}, EMPTY},
+ {"padd2.uuu", A, OpX2aZaZbX4X2b (8, 1, 0, 1, 0, 2), {R1, R2, R3}, EMPTY},
+ {"padd1.uus", A, OpX2aZaZbX4X2b (8, 1, 0, 0, 0, 3), {R1, R2, R3}, EMPTY},
+ {"padd2.uus", A, OpX2aZaZbX4X2b (8, 1, 0, 1, 0, 3), {R1, R2, R3}, EMPTY},
+ {"psub1", A, OpX2aZaZbX4X2b (8, 1, 0, 0, 1, 0), {R1, R2, R3}, EMPTY},
+ {"psub2", A, OpX2aZaZbX4X2b (8, 1, 0, 1, 1, 0), {R1, R2, R3}, EMPTY},
+ {"psub4", A, OpX2aZaZbX4X2b (8, 1, 1, 0, 1, 0), {R1, R2, R3}, EMPTY},
+ {"psub1.sss", A, OpX2aZaZbX4X2b (8, 1, 0, 0, 1, 1), {R1, R2, R3}, EMPTY},
+ {"psub2.sss", A, OpX2aZaZbX4X2b (8, 1, 0, 1, 1, 1), {R1, R2, R3}, EMPTY},
+ {"psub1.uuu", A, OpX2aZaZbX4X2b (8, 1, 0, 0, 1, 2), {R1, R2, R3}, EMPTY},
+ {"psub2.uuu", A, OpX2aZaZbX4X2b (8, 1, 0, 1, 1, 2), {R1, R2, R3}, EMPTY},
+ {"psub1.uus", A, OpX2aZaZbX4X2b (8, 1, 0, 0, 1, 3), {R1, R2, R3}, EMPTY},
+ {"psub2.uus", A, OpX2aZaZbX4X2b (8, 1, 0, 1, 1, 3), {R1, R2, R3}, EMPTY},
+ {"pavg1", A, OpX2aZaZbX4X2b (8, 1, 0, 0, 2, 2), {R1, R2, R3}, EMPTY},
+ {"pavg2", A, OpX2aZaZbX4X2b (8, 1, 0, 1, 2, 2), {R1, R2, R3}, EMPTY},
+ {"pavg1.raz", A, OpX2aZaZbX4X2b (8, 1, 0, 0, 2, 3), {R1, R2, R3}, EMPTY},
+ {"pavg2.raz", A, OpX2aZaZbX4X2b (8, 1, 0, 1, 2, 3), {R1, R2, R3}, EMPTY},
+ {"pavgsub1", A, OpX2aZaZbX4X2b (8, 1, 0, 0, 3, 2), {R1, R2, R3}, EMPTY},
+ {"pavgsub2", A, OpX2aZaZbX4X2b (8, 1, 0, 1, 3, 2), {R1, R2, R3}, EMPTY},
+ {"pcmp1.eq", A, OpX2aZaZbX4X2b (8, 1, 0, 0, 9, 0), {R1, R2, R3}, EMPTY},
+ {"pcmp2.eq", A, OpX2aZaZbX4X2b (8, 1, 0, 1, 9, 0), {R1, R2, R3}, EMPTY},
+ {"pcmp4.eq", A, OpX2aZaZbX4X2b (8, 1, 1, 0, 9, 0), {R1, R2, R3}, EMPTY},
+ {"pcmp1.gt", A, OpX2aZaZbX4X2b (8, 1, 0, 0, 9, 1), {R1, R2, R3}, EMPTY},
+ {"pcmp2.gt", A, OpX2aZaZbX4X2b (8, 1, 0, 1, 9, 1), {R1, R2, R3}, EMPTY},
+ {"pcmp4.gt", A, OpX2aZaZbX4X2b (8, 1, 1, 0, 9, 1), {R1, R2, R3}, EMPTY},
+ {"pshladd2", A, OpX2aZaZbX4 (8, 1, 0, 1, 4), {R1, R2, CNT2b, R3}, EMPTY},
+ {"pshradd2", A, OpX2aZaZbX4 (8, 1, 0, 1, 6), {R1, R2, CNT2b, R3}, EMPTY},
- {"mov", A, OpR3b (9, 0), {R1, IMM22}, PSEUDO},
- {"addl", A, Op (9), {R1, IMM22, R3_2}},
+ {"mov", A, OpR3b (9, 0), {R1, IMM22}, PSEUDO, 0, NULL},
+ {"addl", A, Op (9), {R1, IMM22, R3_2}, EMPTY},
- {"cmp.lt", A2, OpX2TbTaC (0xc, 0, 0, 0, 0), {P1, P2, R2, R3}},
- {"cmp.le", A2, OpX2TbTaC (0xc, 0, 0, 0, 0), {P2, P1, R3, R2}},
- {"cmp.gt", A2, OpX2TbTaC (0xc, 0, 0, 0, 0), {P1, P2, R3, R2}},
- {"cmp.ge", A2, OpX2TbTaC (0xc, 0, 0, 0, 0), {P2, P1, R2, R3}},
- {"cmp.lt.unc", A2, OpX2TbTaC (0xc, 0, 0, 0, 1), {P1, P2, R2, R3}},
- {"cmp.le.unc", A2, OpX2TbTaC (0xc, 0, 0, 0, 1), {P2, P1, R3, R2}},
- {"cmp.gt.unc", A2, OpX2TbTaC (0xc, 0, 0, 0, 1), {P1, P2, R3, R2}},
- {"cmp.ge.unc", A2, OpX2TbTaC (0xc, 0, 0, 0, 1), {P2, P1, R2, R3}},
- {"cmp.eq.and", A2, OpX2TbTaC (0xc, 0, 0, 1, 0), {P1, P2, R2, R3}},
- {"cmp.ne.andcm", A2, OpX2TbTaC (0xc, 0, 0, 1, 0), {P1, P2, R2, R3}, PSEUDO},
- {"cmp.ne.and", A2, OpX2TbTaC (0xc, 0, 0, 1, 1), {P1, P2, R2, R3}},
- {"cmp.eq.andcm", A2, OpX2TbTaC (0xc, 0, 0, 1, 1), {P1, P2, R2, R3}, PSEUDO},
- {"cmp4.lt", A2, OpX2TbTaC (0xc, 1, 0, 0, 0), {P1, P2, R2, R3}},
- {"cmp4.le", A2, OpX2TbTaC (0xc, 1, 0, 0, 0), {P2, P1, R3, R2}},
- {"cmp4.gt", A2, OpX2TbTaC (0xc, 1, 0, 0, 0), {P1, P2, R3, R2}},
- {"cmp4.ge", A2, OpX2TbTaC (0xc, 1, 0, 0, 0), {P2, P1, R2, R3}},
- {"cmp4.lt.unc", A2, OpX2TbTaC (0xc, 1, 0, 0, 1), {P1, P2, R2, R3}},
- {"cmp4.le.unc", A2, OpX2TbTaC (0xc, 1, 0, 0, 1), {P2, P1, R3, R2}},
- {"cmp4.gt.unc", A2, OpX2TbTaC (0xc, 1, 0, 0, 1), {P1, P2, R3, R2}},
- {"cmp4.ge.unc", A2, OpX2TbTaC (0xc, 1, 0, 0, 1), {P2, P1, R2, R3}},
- {"cmp4.eq.and", A2, OpX2TbTaC (0xc, 1, 0, 1, 0), {P1, P2, R2, R3}},
- {"cmp4.ne.andcm", A2, OpX2TbTaC (0xc, 1, 0, 1, 0), {P1, P2, R2, R3}, PSEUDO},
- {"cmp4.ne.and", A2, OpX2TbTaC (0xc, 1, 0, 1, 1), {P1, P2, R2, R3}},
- {"cmp4.eq.andcm", A2, OpX2TbTaC (0xc, 1, 0, 1, 1), {P1, P2, R2, R3}, PSEUDO},
- {"cmp.gt.and", A2, OpX2TbTaC (0xc, 0, 1, 0, 0), {P1, P2, GR0, R3}},
- {"cmp.lt.and", A2, OpX2TbTaC (0xc, 0, 1, 0, 0), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp.le.andcm", A2, OpX2TbTaC (0xc, 0, 1, 0, 0), {P1, P2, GR0, R3}, PSEUDO},
- {"cmp.ge.andcm", A2, OpX2TbTaC (0xc, 0, 1, 0, 0), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp.le.and", A2, OpX2TbTaC (0xc, 0, 1, 0, 1), {P1, P2, GR0, R3}},
- {"cmp.ge.and", A2, OpX2TbTaC (0xc, 0, 1, 0, 1), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp.gt.andcm", A2, OpX2TbTaC (0xc, 0, 1, 0, 1), {P1, P2, GR0, R3}, PSEUDO},
- {"cmp.lt.andcm", A2, OpX2TbTaC (0xc, 0, 1, 0, 1), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp.ge.and", A2, OpX2TbTaC (0xc, 0, 1, 1, 0), {P1, P2, GR0, R3}},
- {"cmp.le.and", A2, OpX2TbTaC (0xc, 0, 1, 1, 0), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp.lt.andcm", A2, OpX2TbTaC (0xc, 0, 1, 1, 0), {P1, P2, GR0, R3}, PSEUDO},
- {"cmp.gt.andcm", A2, OpX2TbTaC (0xc, 0, 1, 1, 0), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp.lt.and", A2, OpX2TbTaC (0xc, 0, 1, 1, 1), {P1, P2, GR0, R3}},
- {"cmp.gt.and", A2, OpX2TbTaC (0xc, 0, 1, 1, 1), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp.ge.andcm", A2, OpX2TbTaC (0xc, 0, 1, 1, 1), {P1, P2, GR0, R3}, PSEUDO},
- {"cmp.le.andcm", A2, OpX2TbTaC (0xc, 0, 1, 1, 1), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp4.gt.and", A2, OpX2TbTaC (0xc, 1, 1, 0, 0), {P1, P2, GR0, R3}},
- {"cmp4.lt.and", A2, OpX2TbTaC (0xc, 1, 1, 0, 0), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp4.le.andcm", A2, OpX2TbTaC (0xc, 1, 1, 0, 0), {P1, P2, GR0, R3}, PSEUDO},
- {"cmp4.ge.andcm", A2, OpX2TbTaC (0xc, 1, 1, 0, 0), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp4.le.and", A2, OpX2TbTaC (0xc, 1, 1, 0, 1), {P1, P2, GR0, R3}},
- {"cmp4.ge.and", A2, OpX2TbTaC (0xc, 1, 1, 0, 1), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp4.gt.andcm", A2, OpX2TbTaC (0xc, 1, 1, 0, 1), {P1, P2, GR0, R3}, PSEUDO},
- {"cmp4.lt.andcm", A2, OpX2TbTaC (0xc, 1, 1, 0, 1), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp4.ge.and", A2, OpX2TbTaC (0xc, 1, 1, 1, 0), {P1, P2, GR0, R3}},
- {"cmp4.le.and", A2, OpX2TbTaC (0xc, 1, 1, 1, 0), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp4.lt.andcm", A2, OpX2TbTaC (0xc, 1, 1, 1, 0), {P1, P2, GR0, R3}, PSEUDO},
- {"cmp4.gt.andcm", A2, OpX2TbTaC (0xc, 1, 1, 1, 0), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp4.lt.and", A2, OpX2TbTaC (0xc, 1, 1, 1, 1), {P1, P2, GR0, R3}},
- {"cmp4.gt.and", A2, OpX2TbTaC (0xc, 1, 1, 1, 1), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp4.ge.andcm", A2, OpX2TbTaC (0xc, 1, 1, 1, 1), {P1, P2, GR0, R3}, PSEUDO},
- {"cmp4.le.andcm", A2, OpX2TbTaC (0xc, 1, 1, 1, 1), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp.lt", A2, OpX2TaC (0xc, 2, 0, 0), {P1, P2, IMM8, R3}},
- {"cmp.le", A2, OpX2TaC (0xc, 2, 0, 0), {P1, P2, IMM8M1, R3}},
- {"cmp.gt", A2, OpX2TaC (0xc, 2, 0, 0), {P2, P1, IMM8M1, R3}},
- {"cmp.ge", A2, OpX2TaC (0xc, 2, 0, 0), {P2, P1, IMM8, R3}},
- {"cmp.lt.unc", A2, OpX2TaC (0xc, 2, 0, 1), {P1, P2, IMM8, R3}},
- {"cmp.le.unc", A2, OpX2TaC (0xc, 2, 0, 1), {P1, P2, IMM8M1, R3}},
- {"cmp.gt.unc", A2, OpX2TaC (0xc, 2, 0, 1), {P2, P1, IMM8M1, R3}},
- {"cmp.ge.unc", A2, OpX2TaC (0xc, 2, 0, 1), {P2, P1, IMM8, R3}},
- {"cmp.eq.and", A2, OpX2TaC (0xc, 2, 1, 0), {P1, P2, IMM8, R3}},
- {"cmp.ne.andcm", A2, OpX2TaC (0xc, 2, 1, 0), {P1, P2, IMM8, R3}, PSEUDO},
- {"cmp.ne.and", A2, OpX2TaC (0xc, 2, 1, 1), {P1, P2, IMM8, R3}},
- {"cmp.eq.andcm", A2, OpX2TaC (0xc, 2, 1, 1), {P1, P2, IMM8, R3}, PSEUDO},
- {"cmp4.lt", A2, OpX2TaC (0xc, 3, 0, 0), {P1, P2, IMM8, R3}},
- {"cmp4.le", A2, OpX2TaC (0xc, 3, 0, 0), {P1, P2, IMM8M1, R3}},
- {"cmp4.gt", A2, OpX2TaC (0xc, 3, 0, 0), {P2, P1, IMM8M1, R3}},
- {"cmp4.ge", A2, OpX2TaC (0xc, 3, 0, 0), {P2, P1, IMM8, R3}},
- {"cmp4.lt.unc", A2, OpX2TaC (0xc, 3, 0, 1), {P1, P2, IMM8, R3}},
- {"cmp4.le.unc", A2, OpX2TaC (0xc, 3, 0, 1), {P1, P2, IMM8M1, R3}},
- {"cmp4.gt.unc", A2, OpX2TaC (0xc, 3, 0, 1), {P2, P1, IMM8M1, R3}},
- {"cmp4.ge.unc", A2, OpX2TaC (0xc, 3, 0, 1), {P2, P1, IMM8, R3}},
- {"cmp4.eq.and", A2, OpX2TaC (0xc, 3, 1, 0), {P1, P2, IMM8, R3}},
- {"cmp4.ne.andcm", A2, OpX2TaC (0xc, 3, 1, 0), {P1, P2, IMM8, R3}, PSEUDO},
- {"cmp4.ne.and", A2, OpX2TaC (0xc, 3, 1, 1), {P1, P2, IMM8, R3}},
- {"cmp4.eq.andcm", A2, OpX2TaC (0xc, 3, 1, 1), {P1, P2, IMM8, R3}, PSEUDO},
- {"cmp.ltu", A2, OpX2TbTaC (0xd, 0, 0, 0, 0), {P1, P2, R2, R3}},
- {"cmp.leu", A2, OpX2TbTaC (0xd, 0, 0, 0, 0), {P2, P1, R3, R2}},
- {"cmp.gtu", A2, OpX2TbTaC (0xd, 0, 0, 0, 0), {P1, P2, R3, R2}},
- {"cmp.geu", A2, OpX2TbTaC (0xd, 0, 0, 0, 0), {P2, P1, R2, R3}},
- {"cmp.ltu.unc", A2, OpX2TbTaC (0xd, 0, 0, 0, 1), {P1, P2, R2, R3}},
- {"cmp.leu.unc", A2, OpX2TbTaC (0xd, 0, 0, 0, 1), {P2, P1, R3, R2}},
- {"cmp.gtu.unc", A2, OpX2TbTaC (0xd, 0, 0, 0, 1), {P1, P2, R3, R2}},
- {"cmp.geu.unc", A2, OpX2TbTaC (0xd, 0, 0, 0, 1), {P2, P1, R2, R3}},
- {"cmp.eq.or", A2, OpX2TbTaC (0xd, 0, 0, 1, 0), {P1, P2, R2, R3}},
- {"cmp.ne.orcm", A2, OpX2TbTaC (0xd, 0, 0, 1, 0), {P1, P2, R2, R3}, PSEUDO},
- {"cmp.ne.or", A2, OpX2TbTaC (0xd, 0, 0, 1, 1), {P1, P2, R2, R3}},
- {"cmp.eq.orcm", A2, OpX2TbTaC (0xd, 0, 0, 1, 1), {P1, P2, R2, R3}, PSEUDO},
- {"cmp4.ltu", A2, OpX2TbTaC (0xd, 1, 0, 0, 0), {P1, P2, R2, R3}},
- {"cmp4.leu", A2, OpX2TbTaC (0xd, 1, 0, 0, 0), {P2, P1, R3, R2}},
- {"cmp4.gtu", A2, OpX2TbTaC (0xd, 1, 0, 0, 0), {P1, P2, R3, R2}},
- {"cmp4.geu", A2, OpX2TbTaC (0xd, 1, 0, 0, 0), {P2, P1, R2, R3}},
- {"cmp4.ltu.unc", A2, OpX2TbTaC (0xd, 1, 0, 0, 1), {P1, P2, R2, R3}},
- {"cmp4.leu.unc", A2, OpX2TbTaC (0xd, 1, 0, 0, 1), {P2, P1, R3, R2}},
- {"cmp4.gtu.unc", A2, OpX2TbTaC (0xd, 1, 0, 0, 1), {P1, P2, R3, R2}},
- {"cmp4.geu.unc", A2, OpX2TbTaC (0xd, 1, 0, 0, 1), {P2, P1, R2, R3}},
- {"cmp4.eq.or", A2, OpX2TbTaC (0xd, 1, 0, 1, 0), {P1, P2, R2, R3}},
- {"cmp4.ne.orcm", A2, OpX2TbTaC (0xd, 1, 0, 1, 0), {P1, P2, R2, R3}, PSEUDO},
- {"cmp4.ne.or", A2, OpX2TbTaC (0xd, 1, 0, 1, 1), {P1, P2, R2, R3}},
- {"cmp4.eq.orcm", A2, OpX2TbTaC (0xd, 1, 0, 1, 1), {P1, P2, R2, R3}, PSEUDO},
- {"cmp.gt.or", A2, OpX2TbTaC (0xd, 0, 1, 0, 0), {P1, P2, GR0, R3}},
- {"cmp.lt.or", A2, OpX2TbTaC (0xd, 0, 1, 0, 0), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp.le.orcm", A2, OpX2TbTaC (0xd, 0, 1, 0, 0), {P1, P2, GR0, R3}, PSEUDO},
- {"cmp.ge.orcm", A2, OpX2TbTaC (0xd, 0, 1, 0, 0), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp.le.or", A2, OpX2TbTaC (0xd, 0, 1, 0, 1), {P1, P2, GR0, R3}},
- {"cmp.ge.or", A2, OpX2TbTaC (0xd, 0, 1, 0, 1), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp.gt.orcm", A2, OpX2TbTaC (0xd, 0, 1, 0, 1), {P1, P2, GR0, R3}, PSEUDO},
- {"cmp.lt.orcm", A2, OpX2TbTaC (0xd, 0, 1, 0, 1), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp.ge.or", A2, OpX2TbTaC (0xd, 0, 1, 1, 0), {P1, P2, GR0, R3}},
- {"cmp.le.or", A2, OpX2TbTaC (0xd, 0, 1, 1, 0), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp.lt.orcm", A2, OpX2TbTaC (0xd, 0, 1, 1, 0), {P1, P2, GR0, R3}, PSEUDO},
- {"cmp.gt.orcm", A2, OpX2TbTaC (0xd, 0, 1, 1, 0), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp.lt.or", A2, OpX2TbTaC (0xd, 0, 1, 1, 1), {P1, P2, GR0, R3}},
- {"cmp.gt.or", A2, OpX2TbTaC (0xd, 0, 1, 1, 1), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp.ge.orcm", A2, OpX2TbTaC (0xd, 0, 1, 1, 1), {P1, P2, GR0, R3}, PSEUDO},
- {"cmp.le.orcm", A2, OpX2TbTaC (0xd, 0, 1, 1, 1), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp4.gt.or", A2, OpX2TbTaC (0xd, 1, 1, 0, 0), {P1, P2, GR0, R3}},
- {"cmp4.lt.or", A2, OpX2TbTaC (0xd, 1, 1, 0, 0), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp4.le.orcm", A2, OpX2TbTaC (0xd, 1, 1, 0, 0), {P1, P2, GR0, R3}, PSEUDO},
- {"cmp4.ge.orcm", A2, OpX2TbTaC (0xd, 1, 1, 0, 0), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp4.le.or", A2, OpX2TbTaC (0xd, 1, 1, 0, 1), {P1, P2, GR0, R3}},
- {"cmp4.ge.or", A2, OpX2TbTaC (0xd, 1, 1, 0, 1), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp4.gt.orcm", A2, OpX2TbTaC (0xd, 1, 1, 0, 1), {P1, P2, GR0, R3}, PSEUDO},
- {"cmp4.lt.orcm", A2, OpX2TbTaC (0xd, 1, 1, 0, 1), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp4.ge.or", A2, OpX2TbTaC (0xd, 1, 1, 1, 0), {P1, P2, GR0, R3}},
- {"cmp4.le.or", A2, OpX2TbTaC (0xd, 1, 1, 1, 0), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp4.lt.orcm", A2, OpX2TbTaC (0xd, 1, 1, 1, 0), {P1, P2, GR0, R3}, PSEUDO},
- {"cmp4.gt.orcm", A2, OpX2TbTaC (0xd, 1, 1, 1, 0), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp4.lt.or", A2, OpX2TbTaC (0xd, 1, 1, 1, 1), {P1, P2, GR0, R3}},
- {"cmp4.gt.or", A2, OpX2TbTaC (0xd, 1, 1, 1, 1), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp4.ge.orcm", A2, OpX2TbTaC (0xd, 1, 1, 1, 1), {P1, P2, GR0, R3}, PSEUDO},
- {"cmp4.le.orcm", A2, OpX2TbTaC (0xd, 1, 1, 1, 1), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp.ltu", A2, OpX2TaC (0xd, 2, 0, 0), {P1, P2, IMM8, R3}},
- {"cmp.leu", A2, OpX2TaC (0xd, 2, 0, 0), {P1, P2, IMM8M1U8, R3}},
- {"cmp.gtu", A2, OpX2TaC (0xd, 2, 0, 0), {P2, P1, IMM8M1U8, R3}},
- {"cmp.geu", A2, OpX2TaC (0xd, 2, 0, 0), {P2, P1, IMM8, R3}},
- {"cmp.ltu.unc", A2, OpX2TaC (0xd, 2, 0, 1), {P1, P2, IMM8, R3}},
- {"cmp.leu.unc", A2, OpX2TaC (0xd, 2, 0, 1), {P1, P2, IMM8M1U8, R3}},
- {"cmp.gtu.unc", A2, OpX2TaC (0xd, 2, 0, 1), {P2, P1, IMM8M1U8, R3}},
- {"cmp.geu.unc", A2, OpX2TaC (0xd, 2, 0, 1), {P2, P1, IMM8, R3}},
- {"cmp.eq.or", A2, OpX2TaC (0xd, 2, 1, 0), {P1, P2, IMM8, R3}},
- {"cmp.ne.orcm", A2, OpX2TaC (0xd, 2, 1, 0), {P1, P2, IMM8, R3}, PSEUDO},
- {"cmp.ne.or", A2, OpX2TaC (0xd, 2, 1, 1), {P1, P2, IMM8, R3}},
- {"cmp.eq.orcm", A2, OpX2TaC (0xd, 2, 1, 1), {P1, P2, IMM8, R3}, PSEUDO},
- {"cmp4.ltu", A2, OpX2TaC (0xd, 3, 0, 0), {P1, P2, IMM8U4, R3}},
- {"cmp4.leu", A2, OpX2TaC (0xd, 3, 0, 0), {P1, P2, IMM8M1U4, R3}},
- {"cmp4.gtu", A2, OpX2TaC (0xd, 3, 0, 0), {P2, P1, IMM8M1U4, R3}},
- {"cmp4.geu", A2, OpX2TaC (0xd, 3, 0, 0), {P2, P1, IMM8U4, R3}},
- {"cmp4.ltu.unc", A2, OpX2TaC (0xd, 3, 0, 1), {P1, P2, IMM8U4, R3}},
- {"cmp4.leu.unc", A2, OpX2TaC (0xd, 3, 0, 1), {P1, P2, IMM8M1U4, R3}},
- {"cmp4.gtu.unc", A2, OpX2TaC (0xd, 3, 0, 1), {P2, P1, IMM8M1U4, R3}},
- {"cmp4.geu.unc", A2, OpX2TaC (0xd, 3, 0, 1), {P2, P1, IMM8U4, R3}},
- {"cmp4.eq.or", A2, OpX2TaC (0xd, 3, 1, 0), {P1, P2, IMM8, R3}},
- {"cmp4.ne.orcm", A2, OpX2TaC (0xd, 3, 1, 0), {P1, P2, IMM8, R3}, PSEUDO},
- {"cmp4.ne.or", A2, OpX2TaC (0xd, 3, 1, 1), {P1, P2, IMM8, R3}},
- {"cmp4.eq.orcm", A2, OpX2TaC (0xd, 3, 1, 1), {P1, P2, IMM8, R3}, PSEUDO},
- {"cmp.eq", A2, OpX2TbTaC (0xe, 0, 0, 0, 0), {P1, P2, R2, R3}},
- {"cmp.ne", A2, OpX2TbTaC (0xe, 0, 0, 0, 0), {P2, P1, R2, R3}},
- {"cmp.eq.unc", A2, OpX2TbTaC (0xe, 0, 0, 0, 1), {P1, P2, R2, R3}},
- {"cmp.ne.unc", A2, OpX2TbTaC (0xe, 0, 0, 0, 1), {P2, P1, R2, R3}},
- {"cmp.eq.or.andcm", A2, OpX2TbTaC (0xe, 0, 0, 1, 0), {P1, P2, R2, R3}},
- {"cmp.ne.and.orcm", A2, OpX2TbTaC (0xe, 0, 0, 1, 0), {P2, P1, R2, R3}, PSEUDO},
- {"cmp.ne.or.andcm", A2, OpX2TbTaC (0xe, 0, 0, 1, 1), {P1, P2, R2, R3}},
- {"cmp.eq.and.orcm", A2, OpX2TbTaC (0xe, 0, 0, 1, 1), {P2, P1, R2, R3}, PSEUDO},
- {"cmp4.eq", A2, OpX2TbTaC (0xe, 1, 0, 0, 0), {P1, P2, R2, R3}},
- {"cmp4.ne", A2, OpX2TbTaC (0xe, 1, 0, 0, 0), {P2, P1, R2, R3}},
- {"cmp4.eq.unc", A2, OpX2TbTaC (0xe, 1, 0, 0, 1), {P1, P2, R2, R3}},
- {"cmp4.ne.unc", A2, OpX2TbTaC (0xe, 1, 0, 0, 1), {P2, P1, R2, R3}},
- {"cmp4.eq.or.andcm", A2, OpX2TbTaC (0xe, 1, 0, 1, 0), {P1, P2, R2, R3}},
- {"cmp4.ne.and.orcm", A2, OpX2TbTaC (0xe, 1, 0, 1, 0), {P2, P1, R2, R3}, PSEUDO},
- {"cmp4.ne.or.andcm", A2, OpX2TbTaC (0xe, 1, 0, 1, 1), {P1, P2, R2, R3}},
- {"cmp4.eq.and.orcm", A2, OpX2TbTaC (0xe, 1, 0, 1, 1), {P2, P1, R2, R3}, PSEUDO},
- {"cmp.gt.or.andcm", A2, OpX2TbTaC (0xe, 0, 1, 0, 0), {P1, P2, GR0, R3}},
- {"cmp.lt.or.andcm", A2, OpX2TbTaC (0xe, 0, 1, 0, 0), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp.le.and.orcm", A2, OpX2TbTaC (0xe, 0, 1, 0, 0), {P2, P1, GR0, R3}, PSEUDO},
- {"cmp.ge.and.orcm", A2, OpX2TbTaC (0xe, 0, 1, 0, 0), {P2, P1, R3, GR0}, PSEUDO},
- {"cmp.le.or.andcm", A2, OpX2TbTaC (0xe, 0, 1, 0, 1), {P1, P2, GR0, R3}},
- {"cmp.ge.or.andcm", A2, OpX2TbTaC (0xe, 0, 1, 0, 1), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp.gt.and.orcm", A2, OpX2TbTaC (0xe, 0, 1, 0, 1), {P2, P1, GR0, R3}, PSEUDO},
- {"cmp.lt.and.orcm", A2, OpX2TbTaC (0xe, 0, 1, 0, 1), {P2, P1, R3, GR0}, PSEUDO},
- {"cmp.ge.or.andcm", A2, OpX2TbTaC (0xe, 0, 1, 1, 0), {P1, P2, GR0, R3}},
- {"cmp.le.or.andcm", A2, OpX2TbTaC (0xe, 0, 1, 1, 0), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp.lt.and.orcm", A2, OpX2TbTaC (0xe, 0, 1, 1, 0), {P2, P1, GR0, R3}, PSEUDO},
- {"cmp.gt.and.orcm", A2, OpX2TbTaC (0xe, 0, 1, 1, 0), {P2, P1, R3, GR0}, PSEUDO},
- {"cmp.lt.or.andcm", A2, OpX2TbTaC (0xe, 0, 1, 1, 1), {P1, P2, GR0, R3}},
- {"cmp.gt.or.andcm", A2, OpX2TbTaC (0xe, 0, 1, 1, 1), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp.ge.and.orcm", A2, OpX2TbTaC (0xe, 0, 1, 1, 1), {P2, P1, GR0, R3}, PSEUDO},
- {"cmp.le.and.orcm", A2, OpX2TbTaC (0xe, 0, 1, 1, 1), {P2, P1, R3, GR0}, PSEUDO},
- {"cmp4.gt.or.andcm", A2, OpX2TbTaC (0xe, 1, 1, 0, 0), {P1, P2, GR0, R3}},
- {"cmp4.lt.or.andcm", A2, OpX2TbTaC (0xe, 1, 1, 0, 0), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp4.le.and.orcm", A2, OpX2TbTaC (0xe, 1, 1, 0, 0), {P2, P1, GR0, R3}, PSEUDO},
- {"cmp4.ge.and.orcm", A2, OpX2TbTaC (0xe, 1, 1, 0, 0), {P2, P1, R3, GR0}, PSEUDO},
- {"cmp4.le.or.andcm", A2, OpX2TbTaC (0xe, 1, 1, 0, 1), {P1, P2, GR0, R3}},
- {"cmp4.ge.or.andcm", A2, OpX2TbTaC (0xe, 1, 1, 0, 1), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp4.gt.and.orcm", A2, OpX2TbTaC (0xe, 1, 1, 0, 1), {P2, P1, GR0, R3}, PSEUDO},
- {"cmp4.lt.and.orcm", A2, OpX2TbTaC (0xe, 1, 1, 0, 1), {P2, P1, R3, GR0}, PSEUDO},
- {"cmp4.ge.or.andcm", A2, OpX2TbTaC (0xe, 1, 1, 1, 0), {P1, P2, GR0, R3}},
- {"cmp4.le.or.andcm", A2, OpX2TbTaC (0xe, 1, 1, 1, 0), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp4.lt.and.orcm", A2, OpX2TbTaC (0xe, 1, 1, 1, 0), {P2, P1, GR0, R3}, PSEUDO},
- {"cmp4.gt.and.orcm", A2, OpX2TbTaC (0xe, 1, 1, 1, 0), {P2, P1, R3, GR0}, PSEUDO},
- {"cmp4.lt.or.andcm", A2, OpX2TbTaC (0xe, 1, 1, 1, 1), {P1, P2, GR0, R3}},
- {"cmp4.gt.or.andcm", A2, OpX2TbTaC (0xe, 1, 1, 1, 1), {P1, P2, R3, GR0}, PSEUDO},
- {"cmp4.ge.and.orcm", A2, OpX2TbTaC (0xe, 1, 1, 1, 1), {P2, P1, GR0, R3}, PSEUDO},
- {"cmp4.le.and.orcm", A2, OpX2TbTaC (0xe, 1, 1, 1, 1), {P2, P1, R3, GR0}, PSEUDO},
- {"cmp.eq", A2, OpX2TaC (0xe, 2, 0, 0), {P1, P2, IMM8, R3}},
- {"cmp.ne", A2, OpX2TaC (0xe, 2, 0, 0), {P2, P1, IMM8, R3}},
- {"cmp.eq.unc", A2, OpX2TaC (0xe, 2, 0, 1), {P1, P2, IMM8, R3}},
- {"cmp.ne.unc", A2, OpX2TaC (0xe, 2, 0, 1), {P2, P1, IMM8, R3}},
- {"cmp.eq.or.andcm", A2, OpX2TaC (0xe, 2, 1, 0), {P1, P2, IMM8, R3}},
- {"cmp.ne.and.orcm", A2, OpX2TaC (0xe, 2, 1, 0), {P2, P1, IMM8, R3}, PSEUDO},
- {"cmp.ne.or.andcm", A2, OpX2TaC (0xe, 2, 1, 1), {P1, P2, IMM8, R3}},
- {"cmp.eq.and.orcm", A2, OpX2TaC (0xe, 2, 1, 1), {P2, P1, IMM8, R3}, PSEUDO},
- {"cmp4.eq", A2, OpX2TaC (0xe, 3, 0, 0), {P1, P2, IMM8, R3}},
- {"cmp4.ne", A2, OpX2TaC (0xe, 3, 0, 0), {P2, P1, IMM8, R3}},
- {"cmp4.eq.unc", A2, OpX2TaC (0xe, 3, 0, 1), {P1, P2, IMM8, R3}},
- {"cmp4.ne.unc", A2, OpX2TaC (0xe, 3, 0, 1), {P2, P1, IMM8, R3}},
- {"cmp4.eq.or.andcm", A2, OpX2TaC (0xe, 3, 1, 0), {P1, P2, IMM8, R3}},
- {"cmp4.ne.and.orcm", A2, OpX2TaC (0xe, 3, 1, 0), {P2, P1, IMM8, R3}, PSEUDO},
- {"cmp4.ne.or.andcm", A2, OpX2TaC (0xe, 3, 1, 1), {P1, P2, IMM8, R3}},
- {"cmp4.eq.and.orcm", A2, OpX2TaC (0xe, 3, 1, 1), {P2, P1, IMM8, R3}, PSEUDO},
+ {"cmp.lt", A2, OpX2TbTaC (0xc, 0, 0, 0, 0), {P1, P2, R2, R3}, EMPTY},
+ {"cmp.le", A2, OpX2TbTaC (0xc, 0, 0, 0, 0), {P2, P1, R3, R2}, EMPTY},
+ {"cmp.gt", A2, OpX2TbTaC (0xc, 0, 0, 0, 0), {P1, P2, R3, R2}, EMPTY},
+ {"cmp.ge", A2, OpX2TbTaC (0xc, 0, 0, 0, 0), {P2, P1, R2, R3}, EMPTY},
+ {"cmp.lt.unc", A2, OpX2TbTaC (0xc, 0, 0, 0, 1), {P1, P2, R2, R3}, EMPTY},
+ {"cmp.le.unc", A2, OpX2TbTaC (0xc, 0, 0, 0, 1), {P2, P1, R3, R2}, EMPTY},
+ {"cmp.gt.unc", A2, OpX2TbTaC (0xc, 0, 0, 0, 1), {P1, P2, R3, R2}, EMPTY},
+ {"cmp.ge.unc", A2, OpX2TbTaC (0xc, 0, 0, 0, 1), {P2, P1, R2, R3}, EMPTY},
+ {"cmp.eq.and", A2, OpX2TbTaC (0xc, 0, 0, 1, 0), {P1, P2, R2, R3}, EMPTY},
+ {"cmp.ne.andcm", A2, OpX2TbTaC (0xc, 0, 0, 1, 0), {P1, P2, R2, R3}, PSEUDO, 0, NULL},
+ {"cmp.ne.and", A2, OpX2TbTaC (0xc, 0, 0, 1, 1), {P1, P2, R2, R3}, EMPTY},
+ {"cmp.eq.andcm", A2, OpX2TbTaC (0xc, 0, 0, 1, 1), {P1, P2, R2, R3}, PSEUDO, 0, NULL},
+ {"cmp4.lt", A2, OpX2TbTaC (0xc, 1, 0, 0, 0), {P1, P2, R2, R3}, EMPTY},
+ {"cmp4.le", A2, OpX2TbTaC (0xc, 1, 0, 0, 0), {P2, P1, R3, R2}, EMPTY},
+ {"cmp4.gt", A2, OpX2TbTaC (0xc, 1, 0, 0, 0), {P1, P2, R3, R2}, EMPTY},
+ {"cmp4.ge", A2, OpX2TbTaC (0xc, 1, 0, 0, 0), {P2, P1, R2, R3}, EMPTY},
+ {"cmp4.lt.unc", A2, OpX2TbTaC (0xc, 1, 0, 0, 1), {P1, P2, R2, R3}, EMPTY},
+ {"cmp4.le.unc", A2, OpX2TbTaC (0xc, 1, 0, 0, 1), {P2, P1, R3, R2}, EMPTY},
+ {"cmp4.gt.unc", A2, OpX2TbTaC (0xc, 1, 0, 0, 1), {P1, P2, R3, R2}, EMPTY},
+ {"cmp4.ge.unc", A2, OpX2TbTaC (0xc, 1, 0, 0, 1), {P2, P1, R2, R3}, EMPTY},
+ {"cmp4.eq.and", A2, OpX2TbTaC (0xc, 1, 0, 1, 0), {P1, P2, R2, R3}, EMPTY},
+ {"cmp4.ne.andcm", A2, OpX2TbTaC (0xc, 1, 0, 1, 0), {P1, P2, R2, R3}, PSEUDO, 0, NULL},
+ {"cmp4.ne.and", A2, OpX2TbTaC (0xc, 1, 0, 1, 1), {P1, P2, R2, R3}, EMPTY},
+ {"cmp4.eq.andcm", A2, OpX2TbTaC (0xc, 1, 0, 1, 1), {P1, P2, R2, R3}, PSEUDO, 0, NULL},
+ {"cmp.gt.and", A2, OpX2TbTaC (0xc, 0, 1, 0, 0), {P1, P2, GR0, R3}, EMPTY},
+ {"cmp.lt.and", A2, OpX2TbTaC (0xc, 0, 1, 0, 0), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp.le.andcm", A2, OpX2TbTaC (0xc, 0, 1, 0, 0), {P1, P2, GR0, R3}, PSEUDO, 0, NULL},
+ {"cmp.ge.andcm", A2, OpX2TbTaC (0xc, 0, 1, 0, 0), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp.le.and", A2, OpX2TbTaC (0xc, 0, 1, 0, 1), {P1, P2, GR0, R3}, EMPTY},
+ {"cmp.ge.and", A2, OpX2TbTaC (0xc, 0, 1, 0, 1), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp.gt.andcm", A2, OpX2TbTaC (0xc, 0, 1, 0, 1), {P1, P2, GR0, R3}, PSEUDO, 0, NULL},
+ {"cmp.lt.andcm", A2, OpX2TbTaC (0xc, 0, 1, 0, 1), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp.ge.and", A2, OpX2TbTaC (0xc, 0, 1, 1, 0), {P1, P2, GR0, R3}, EMPTY},
+ {"cmp.le.and", A2, OpX2TbTaC (0xc, 0, 1, 1, 0), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp.lt.andcm", A2, OpX2TbTaC (0xc, 0, 1, 1, 0), {P1, P2, GR0, R3}, PSEUDO, 0, NULL},
+ {"cmp.gt.andcm", A2, OpX2TbTaC (0xc, 0, 1, 1, 0), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp.lt.and", A2, OpX2TbTaC (0xc, 0, 1, 1, 1), {P1, P2, GR0, R3}, EMPTY},
+ {"cmp.gt.and", A2, OpX2TbTaC (0xc, 0, 1, 1, 1), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp.ge.andcm", A2, OpX2TbTaC (0xc, 0, 1, 1, 1), {P1, P2, GR0, R3}, PSEUDO, 0, NULL},
+ {"cmp.le.andcm", A2, OpX2TbTaC (0xc, 0, 1, 1, 1), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp4.gt.and", A2, OpX2TbTaC (0xc, 1, 1, 0, 0), {P1, P2, GR0, R3}, EMPTY},
+ {"cmp4.lt.and", A2, OpX2TbTaC (0xc, 1, 1, 0, 0), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp4.le.andcm", A2, OpX2TbTaC (0xc, 1, 1, 0, 0), {P1, P2, GR0, R3}, PSEUDO, 0, NULL},
+ {"cmp4.ge.andcm", A2, OpX2TbTaC (0xc, 1, 1, 0, 0), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp4.le.and", A2, OpX2TbTaC (0xc, 1, 1, 0, 1), {P1, P2, GR0, R3}, EMPTY},
+ {"cmp4.ge.and", A2, OpX2TbTaC (0xc, 1, 1, 0, 1), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp4.gt.andcm", A2, OpX2TbTaC (0xc, 1, 1, 0, 1), {P1, P2, GR0, R3}, PSEUDO, 0, NULL},
+ {"cmp4.lt.andcm", A2, OpX2TbTaC (0xc, 1, 1, 0, 1), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp4.ge.and", A2, OpX2TbTaC (0xc, 1, 1, 1, 0), {P1, P2, GR0, R3}, EMPTY},
+ {"cmp4.le.and", A2, OpX2TbTaC (0xc, 1, 1, 1, 0), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp4.lt.andcm", A2, OpX2TbTaC (0xc, 1, 1, 1, 0), {P1, P2, GR0, R3}, PSEUDO, 0, NULL},
+ {"cmp4.gt.andcm", A2, OpX2TbTaC (0xc, 1, 1, 1, 0), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp4.lt.and", A2, OpX2TbTaC (0xc, 1, 1, 1, 1), {P1, P2, GR0, R3}, EMPTY},
+ {"cmp4.gt.and", A2, OpX2TbTaC (0xc, 1, 1, 1, 1), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp4.ge.andcm", A2, OpX2TbTaC (0xc, 1, 1, 1, 1), {P1, P2, GR0, R3}, PSEUDO, 0, NULL},
+ {"cmp4.le.andcm", A2, OpX2TbTaC (0xc, 1, 1, 1, 1), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp.lt", A2, OpX2TaC (0xc, 2, 0, 0), {P1, P2, IMM8, R3}, EMPTY},
+ {"cmp.le", A2, OpX2TaC (0xc, 2, 0, 0), {P1, P2, IMM8M1, R3}, EMPTY},
+ {"cmp.gt", A2, OpX2TaC (0xc, 2, 0, 0), {P2, P1, IMM8M1, R3}, EMPTY},
+ {"cmp.ge", A2, OpX2TaC (0xc, 2, 0, 0), {P2, P1, IMM8, R3}, EMPTY},
+ {"cmp.lt.unc", A2, OpX2TaC (0xc, 2, 0, 1), {P1, P2, IMM8, R3}, EMPTY},
+ {"cmp.le.unc", A2, OpX2TaC (0xc, 2, 0, 1), {P1, P2, IMM8M1, R3}, EMPTY},
+ {"cmp.gt.unc", A2, OpX2TaC (0xc, 2, 0, 1), {P2, P1, IMM8M1, R3}, EMPTY},
+ {"cmp.ge.unc", A2, OpX2TaC (0xc, 2, 0, 1), {P2, P1, IMM8, R3}, EMPTY},
+ {"cmp.eq.and", A2, OpX2TaC (0xc, 2, 1, 0), {P1, P2, IMM8, R3}, EMPTY},
+ {"cmp.ne.andcm", A2, OpX2TaC (0xc, 2, 1, 0), {P1, P2, IMM8, R3}, PSEUDO, 0, NULL},
+ {"cmp.ne.and", A2, OpX2TaC (0xc, 2, 1, 1), {P1, P2, IMM8, R3}, EMPTY},
+ {"cmp.eq.andcm", A2, OpX2TaC (0xc, 2, 1, 1), {P1, P2, IMM8, R3}, PSEUDO, 0, NULL},
+ {"cmp4.lt", A2, OpX2TaC (0xc, 3, 0, 0), {P1, P2, IMM8, R3}, EMPTY},
+ {"cmp4.le", A2, OpX2TaC (0xc, 3, 0, 0), {P1, P2, IMM8M1, R3}, EMPTY},
+ {"cmp4.gt", A2, OpX2TaC (0xc, 3, 0, 0), {P2, P1, IMM8M1, R3}, EMPTY},
+ {"cmp4.ge", A2, OpX2TaC (0xc, 3, 0, 0), {P2, P1, IMM8, R3}, EMPTY},
+ {"cmp4.lt.unc", A2, OpX2TaC (0xc, 3, 0, 1), {P1, P2, IMM8, R3}, EMPTY},
+ {"cmp4.le.unc", A2, OpX2TaC (0xc, 3, 0, 1), {P1, P2, IMM8M1, R3}, EMPTY},
+ {"cmp4.gt.unc", A2, OpX2TaC (0xc, 3, 0, 1), {P2, P1, IMM8M1, R3}, EMPTY},
+ {"cmp4.ge.unc", A2, OpX2TaC (0xc, 3, 0, 1), {P2, P1, IMM8, R3}, EMPTY},
+ {"cmp4.eq.and", A2, OpX2TaC (0xc, 3, 1, 0), {P1, P2, IMM8, R3}, EMPTY},
+ {"cmp4.ne.andcm", A2, OpX2TaC (0xc, 3, 1, 0), {P1, P2, IMM8, R3}, PSEUDO, 0, NULL},
+ {"cmp4.ne.and", A2, OpX2TaC (0xc, 3, 1, 1), {P1, P2, IMM8, R3}, EMPTY},
+ {"cmp4.eq.andcm", A2, OpX2TaC (0xc, 3, 1, 1), {P1, P2, IMM8, R3}, PSEUDO, 0, NULL},
+ {"cmp.ltu", A2, OpX2TbTaC (0xd, 0, 0, 0, 0), {P1, P2, R2, R3}, EMPTY},
+ {"cmp.leu", A2, OpX2TbTaC (0xd, 0, 0, 0, 0), {P2, P1, R3, R2}, EMPTY},
+ {"cmp.gtu", A2, OpX2TbTaC (0xd, 0, 0, 0, 0), {P1, P2, R3, R2}, EMPTY},
+ {"cmp.geu", A2, OpX2TbTaC (0xd, 0, 0, 0, 0), {P2, P1, R2, R3}, EMPTY},
+ {"cmp.ltu.unc", A2, OpX2TbTaC (0xd, 0, 0, 0, 1), {P1, P2, R2, R3}, EMPTY},
+ {"cmp.leu.unc", A2, OpX2TbTaC (0xd, 0, 0, 0, 1), {P2, P1, R3, R2}, EMPTY},
+ {"cmp.gtu.unc", A2, OpX2TbTaC (0xd, 0, 0, 0, 1), {P1, P2, R3, R2}, EMPTY},
+ {"cmp.geu.unc", A2, OpX2TbTaC (0xd, 0, 0, 0, 1), {P2, P1, R2, R3}, EMPTY},
+ {"cmp.eq.or", A2, OpX2TbTaC (0xd, 0, 0, 1, 0), {P1, P2, R2, R3}, EMPTY},
+ {"cmp.ne.orcm", A2, OpX2TbTaC (0xd, 0, 0, 1, 0), {P1, P2, R2, R3}, PSEUDO, 0, NULL},
+ {"cmp.ne.or", A2, OpX2TbTaC (0xd, 0, 0, 1, 1), {P1, P2, R2, R3}, EMPTY},
+ {"cmp.eq.orcm", A2, OpX2TbTaC (0xd, 0, 0, 1, 1), {P1, P2, R2, R3}, PSEUDO, 0, NULL},
+ {"cmp4.ltu", A2, OpX2TbTaC (0xd, 1, 0, 0, 0), {P1, P2, R2, R3}, EMPTY},
+ {"cmp4.leu", A2, OpX2TbTaC (0xd, 1, 0, 0, 0), {P2, P1, R3, R2}, EMPTY},
+ {"cmp4.gtu", A2, OpX2TbTaC (0xd, 1, 0, 0, 0), {P1, P2, R3, R2}, EMPTY},
+ {"cmp4.geu", A2, OpX2TbTaC (0xd, 1, 0, 0, 0), {P2, P1, R2, R3}, EMPTY},
+ {"cmp4.ltu.unc", A2, OpX2TbTaC (0xd, 1, 0, 0, 1), {P1, P2, R2, R3}, EMPTY},
+ {"cmp4.leu.unc", A2, OpX2TbTaC (0xd, 1, 0, 0, 1), {P2, P1, R3, R2}, EMPTY},
+ {"cmp4.gtu.unc", A2, OpX2TbTaC (0xd, 1, 0, 0, 1), {P1, P2, R3, R2}, EMPTY},
+ {"cmp4.geu.unc", A2, OpX2TbTaC (0xd, 1, 0, 0, 1), {P2, P1, R2, R3}, EMPTY},
+ {"cmp4.eq.or", A2, OpX2TbTaC (0xd, 1, 0, 1, 0), {P1, P2, R2, R3}, EMPTY},
+ {"cmp4.ne.orcm", A2, OpX2TbTaC (0xd, 1, 0, 1, 0), {P1, P2, R2, R3}, PSEUDO, 0, NULL},
+ {"cmp4.ne.or", A2, OpX2TbTaC (0xd, 1, 0, 1, 1), {P1, P2, R2, R3}, EMPTY},
+ {"cmp4.eq.orcm", A2, OpX2TbTaC (0xd, 1, 0, 1, 1), {P1, P2, R2, R3}, PSEUDO, 0, NULL},
+ {"cmp.gt.or", A2, OpX2TbTaC (0xd, 0, 1, 0, 0), {P1, P2, GR0, R3}, EMPTY},
+ {"cmp.lt.or", A2, OpX2TbTaC (0xd, 0, 1, 0, 0), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp.le.orcm", A2, OpX2TbTaC (0xd, 0, 1, 0, 0), {P1, P2, GR0, R3}, PSEUDO, 0, NULL},
+ {"cmp.ge.orcm", A2, OpX2TbTaC (0xd, 0, 1, 0, 0), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp.le.or", A2, OpX2TbTaC (0xd, 0, 1, 0, 1), {P1, P2, GR0, R3}, EMPTY},
+ {"cmp.ge.or", A2, OpX2TbTaC (0xd, 0, 1, 0, 1), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp.gt.orcm", A2, OpX2TbTaC (0xd, 0, 1, 0, 1), {P1, P2, GR0, R3}, PSEUDO, 0, NULL},
+ {"cmp.lt.orcm", A2, OpX2TbTaC (0xd, 0, 1, 0, 1), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp.ge.or", A2, OpX2TbTaC (0xd, 0, 1, 1, 0), {P1, P2, GR0, R3}, EMPTY},
+ {"cmp.le.or", A2, OpX2TbTaC (0xd, 0, 1, 1, 0), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp.lt.orcm", A2, OpX2TbTaC (0xd, 0, 1, 1, 0), {P1, P2, GR0, R3}, PSEUDO, 0, NULL},
+ {"cmp.gt.orcm", A2, OpX2TbTaC (0xd, 0, 1, 1, 0), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp.lt.or", A2, OpX2TbTaC (0xd, 0, 1, 1, 1), {P1, P2, GR0, R3}, EMPTY},
+ {"cmp.gt.or", A2, OpX2TbTaC (0xd, 0, 1, 1, 1), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp.ge.orcm", A2, OpX2TbTaC (0xd, 0, 1, 1, 1), {P1, P2, GR0, R3}, PSEUDO, 0, NULL},
+ {"cmp.le.orcm", A2, OpX2TbTaC (0xd, 0, 1, 1, 1), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp4.gt.or", A2, OpX2TbTaC (0xd, 1, 1, 0, 0), {P1, P2, GR0, R3}, EMPTY},
+ {"cmp4.lt.or", A2, OpX2TbTaC (0xd, 1, 1, 0, 0), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp4.le.orcm", A2, OpX2TbTaC (0xd, 1, 1, 0, 0), {P1, P2, GR0, R3}, PSEUDO, 0, NULL},
+ {"cmp4.ge.orcm", A2, OpX2TbTaC (0xd, 1, 1, 0, 0), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp4.le.or", A2, OpX2TbTaC (0xd, 1, 1, 0, 1), {P1, P2, GR0, R3}, EMPTY},
+ {"cmp4.ge.or", A2, OpX2TbTaC (0xd, 1, 1, 0, 1), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp4.gt.orcm", A2, OpX2TbTaC (0xd, 1, 1, 0, 1), {P1, P2, GR0, R3}, PSEUDO, 0, NULL},
+ {"cmp4.lt.orcm", A2, OpX2TbTaC (0xd, 1, 1, 0, 1), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp4.ge.or", A2, OpX2TbTaC (0xd, 1, 1, 1, 0), {P1, P2, GR0, R3}, EMPTY},
+ {"cmp4.le.or", A2, OpX2TbTaC (0xd, 1, 1, 1, 0), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp4.lt.orcm", A2, OpX2TbTaC (0xd, 1, 1, 1, 0), {P1, P2, GR0, R3}, PSEUDO, 0, NULL},
+ {"cmp4.gt.orcm", A2, OpX2TbTaC (0xd, 1, 1, 1, 0), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp4.lt.or", A2, OpX2TbTaC (0xd, 1, 1, 1, 1), {P1, P2, GR0, R3}, EMPTY},
+ {"cmp4.gt.or", A2, OpX2TbTaC (0xd, 1, 1, 1, 1), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp4.ge.orcm", A2, OpX2TbTaC (0xd, 1, 1, 1, 1), {P1, P2, GR0, R3}, PSEUDO, 0, NULL},
+ {"cmp4.le.orcm", A2, OpX2TbTaC (0xd, 1, 1, 1, 1), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp.ltu", A2, OpX2TaC (0xd, 2, 0, 0), {P1, P2, IMM8, R3}, EMPTY},
+ {"cmp.leu", A2, OpX2TaC (0xd, 2, 0, 0), {P1, P2, IMM8M1U8, R3}, EMPTY},
+ {"cmp.gtu", A2, OpX2TaC (0xd, 2, 0, 0), {P2, P1, IMM8M1U8, R3}, EMPTY},
+ {"cmp.geu", A2, OpX2TaC (0xd, 2, 0, 0), {P2, P1, IMM8, R3}, EMPTY},
+ {"cmp.ltu.unc", A2, OpX2TaC (0xd, 2, 0, 1), {P1, P2, IMM8, R3}, EMPTY},
+ {"cmp.leu.unc", A2, OpX2TaC (0xd, 2, 0, 1), {P1, P2, IMM8M1U8, R3}, EMPTY},
+ {"cmp.gtu.unc", A2, OpX2TaC (0xd, 2, 0, 1), {P2, P1, IMM8M1U8, R3}, EMPTY},
+ {"cmp.geu.unc", A2, OpX2TaC (0xd, 2, 0, 1), {P2, P1, IMM8, R3}, EMPTY},
+ {"cmp.eq.or", A2, OpX2TaC (0xd, 2, 1, 0), {P1, P2, IMM8, R3}, EMPTY},
+ {"cmp.ne.orcm", A2, OpX2TaC (0xd, 2, 1, 0), {P1, P2, IMM8, R3}, PSEUDO, 0, NULL},
+ {"cmp.ne.or", A2, OpX2TaC (0xd, 2, 1, 1), {P1, P2, IMM8, R3}, EMPTY},
+ {"cmp.eq.orcm", A2, OpX2TaC (0xd, 2, 1, 1), {P1, P2, IMM8, R3}, PSEUDO, 0, NULL},
+ {"cmp4.ltu", A2, OpX2TaC (0xd, 3, 0, 0), {P1, P2, IMM8U4, R3}, EMPTY},
+ {"cmp4.leu", A2, OpX2TaC (0xd, 3, 0, 0), {P1, P2, IMM8M1U4, R3}, EMPTY},
+ {"cmp4.gtu", A2, OpX2TaC (0xd, 3, 0, 0), {P2, P1, IMM8M1U4, R3}, EMPTY},
+ {"cmp4.geu", A2, OpX2TaC (0xd, 3, 0, 0), {P2, P1, IMM8U4, R3}, EMPTY},
+ {"cmp4.ltu.unc", A2, OpX2TaC (0xd, 3, 0, 1), {P1, P2, IMM8U4, R3}, EMPTY},
+ {"cmp4.leu.unc", A2, OpX2TaC (0xd, 3, 0, 1), {P1, P2, IMM8M1U4, R3}, EMPTY},
+ {"cmp4.gtu.unc", A2, OpX2TaC (0xd, 3, 0, 1), {P2, P1, IMM8M1U4, R3}, EMPTY},
+ {"cmp4.geu.unc", A2, OpX2TaC (0xd, 3, 0, 1), {P2, P1, IMM8U4, R3}, EMPTY},
+ {"cmp4.eq.or", A2, OpX2TaC (0xd, 3, 1, 0), {P1, P2, IMM8, R3}, EMPTY},
+ {"cmp4.ne.orcm", A2, OpX2TaC (0xd, 3, 1, 0), {P1, P2, IMM8, R3}, PSEUDO, 0, NULL},
+ {"cmp4.ne.or", A2, OpX2TaC (0xd, 3, 1, 1), {P1, P2, IMM8, R3}, EMPTY},
+ {"cmp4.eq.orcm", A2, OpX2TaC (0xd, 3, 1, 1), {P1, P2, IMM8, R3}, PSEUDO, 0, NULL},
+ {"cmp.eq", A2, OpX2TbTaC (0xe, 0, 0, 0, 0), {P1, P2, R2, R3}, EMPTY},
+ {"cmp.ne", A2, OpX2TbTaC (0xe, 0, 0, 0, 0), {P2, P1, R2, R3}, EMPTY},
+ {"cmp.eq.unc", A2, OpX2TbTaC (0xe, 0, 0, 0, 1), {P1, P2, R2, R3}, EMPTY},
+ {"cmp.ne.unc", A2, OpX2TbTaC (0xe, 0, 0, 0, 1), {P2, P1, R2, R3}, EMPTY},
+ {"cmp.eq.or.andcm", A2, OpX2TbTaC (0xe, 0, 0, 1, 0), {P1, P2, R2, R3}, EMPTY},
+ {"cmp.ne.and.orcm", A2, OpX2TbTaC (0xe, 0, 0, 1, 0), {P2, P1, R2, R3}, PSEUDO, 0, NULL},
+ {"cmp.ne.or.andcm", A2, OpX2TbTaC (0xe, 0, 0, 1, 1), {P1, P2, R2, R3}, EMPTY},
+ {"cmp.eq.and.orcm", A2, OpX2TbTaC (0xe, 0, 0, 1, 1), {P2, P1, R2, R3}, PSEUDO, 0, NULL},
+ {"cmp4.eq", A2, OpX2TbTaC (0xe, 1, 0, 0, 0), {P1, P2, R2, R3}, EMPTY},
+ {"cmp4.ne", A2, OpX2TbTaC (0xe, 1, 0, 0, 0), {P2, P1, R2, R3}, EMPTY},
+ {"cmp4.eq.unc", A2, OpX2TbTaC (0xe, 1, 0, 0, 1), {P1, P2, R2, R3}, EMPTY},
+ {"cmp4.ne.unc", A2, OpX2TbTaC (0xe, 1, 0, 0, 1), {P2, P1, R2, R3}, EMPTY},
+ {"cmp4.eq.or.andcm", A2, OpX2TbTaC (0xe, 1, 0, 1, 0), {P1, P2, R2, R3}, EMPTY},
+ {"cmp4.ne.and.orcm", A2, OpX2TbTaC (0xe, 1, 0, 1, 0), {P2, P1, R2, R3}, PSEUDO, 0, NULL},
+ {"cmp4.ne.or.andcm", A2, OpX2TbTaC (0xe, 1, 0, 1, 1), {P1, P2, R2, R3}, EMPTY},
+ {"cmp4.eq.and.orcm", A2, OpX2TbTaC (0xe, 1, 0, 1, 1), {P2, P1, R2, R3}, PSEUDO, 0, NULL},
+ {"cmp.gt.or.andcm", A2, OpX2TbTaC (0xe, 0, 1, 0, 0), {P1, P2, GR0, R3}, EMPTY},
+ {"cmp.lt.or.andcm", A2, OpX2TbTaC (0xe, 0, 1, 0, 0), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp.le.and.orcm", A2, OpX2TbTaC (0xe, 0, 1, 0, 0), {P2, P1, GR0, R3}, PSEUDO, 0, NULL},
+ {"cmp.ge.and.orcm", A2, OpX2TbTaC (0xe, 0, 1, 0, 0), {P2, P1, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp.le.or.andcm", A2, OpX2TbTaC (0xe, 0, 1, 0, 1), {P1, P2, GR0, R3}, EMPTY},
+ {"cmp.ge.or.andcm", A2, OpX2TbTaC (0xe, 0, 1, 0, 1), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp.gt.and.orcm", A2, OpX2TbTaC (0xe, 0, 1, 0, 1), {P2, P1, GR0, R3}, PSEUDO, 0, NULL},
+ {"cmp.lt.and.orcm", A2, OpX2TbTaC (0xe, 0, 1, 0, 1), {P2, P1, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp.ge.or.andcm", A2, OpX2TbTaC (0xe, 0, 1, 1, 0), {P1, P2, GR0, R3}, EMPTY},
+ {"cmp.le.or.andcm", A2, OpX2TbTaC (0xe, 0, 1, 1, 0), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp.lt.and.orcm", A2, OpX2TbTaC (0xe, 0, 1, 1, 0), {P2, P1, GR0, R3}, PSEUDO, 0, NULL},
+ {"cmp.gt.and.orcm", A2, OpX2TbTaC (0xe, 0, 1, 1, 0), {P2, P1, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp.lt.or.andcm", A2, OpX2TbTaC (0xe, 0, 1, 1, 1), {P1, P2, GR0, R3}, EMPTY},
+ {"cmp.gt.or.andcm", A2, OpX2TbTaC (0xe, 0, 1, 1, 1), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp.ge.and.orcm", A2, OpX2TbTaC (0xe, 0, 1, 1, 1), {P2, P1, GR0, R3}, PSEUDO, 0, NULL},
+ {"cmp.le.and.orcm", A2, OpX2TbTaC (0xe, 0, 1, 1, 1), {P2, P1, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp4.gt.or.andcm", A2, OpX2TbTaC (0xe, 1, 1, 0, 0), {P1, P2, GR0, R3}, EMPTY},
+ {"cmp4.lt.or.andcm", A2, OpX2TbTaC (0xe, 1, 1, 0, 0), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp4.le.and.orcm", A2, OpX2TbTaC (0xe, 1, 1, 0, 0), {P2, P1, GR0, R3}, PSEUDO, 0, NULL},
+ {"cmp4.ge.and.orcm", A2, OpX2TbTaC (0xe, 1, 1, 0, 0), {P2, P1, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp4.le.or.andcm", A2, OpX2TbTaC (0xe, 1, 1, 0, 1), {P1, P2, GR0, R3}, EMPTY},
+ {"cmp4.ge.or.andcm", A2, OpX2TbTaC (0xe, 1, 1, 0, 1), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp4.gt.and.orcm", A2, OpX2TbTaC (0xe, 1, 1, 0, 1), {P2, P1, GR0, R3}, PSEUDO, 0, NULL},
+ {"cmp4.lt.and.orcm", A2, OpX2TbTaC (0xe, 1, 1, 0, 1), {P2, P1, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp4.ge.or.andcm", A2, OpX2TbTaC (0xe, 1, 1, 1, 0), {P1, P2, GR0, R3}, EMPTY},
+ {"cmp4.le.or.andcm", A2, OpX2TbTaC (0xe, 1, 1, 1, 0), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp4.lt.and.orcm", A2, OpX2TbTaC (0xe, 1, 1, 1, 0), {P2, P1, GR0, R3}, PSEUDO, 0, NULL},
+ {"cmp4.gt.and.orcm", A2, OpX2TbTaC (0xe, 1, 1, 1, 0), {P2, P1, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp4.lt.or.andcm", A2, OpX2TbTaC (0xe, 1, 1, 1, 1), {P1, P2, GR0, R3}, EMPTY},
+ {"cmp4.gt.or.andcm", A2, OpX2TbTaC (0xe, 1, 1, 1, 1), {P1, P2, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp4.ge.and.orcm", A2, OpX2TbTaC (0xe, 1, 1, 1, 1), {P2, P1, GR0, R3}, PSEUDO, 0, NULL},
+ {"cmp4.le.and.orcm", A2, OpX2TbTaC (0xe, 1, 1, 1, 1), {P2, P1, R3, GR0}, PSEUDO, 0, NULL},
+ {"cmp.eq", A2, OpX2TaC (0xe, 2, 0, 0), {P1, P2, IMM8, R3}, EMPTY},
+ {"cmp.ne", A2, OpX2TaC (0xe, 2, 0, 0), {P2, P1, IMM8, R3}, EMPTY},
+ {"cmp.eq.unc", A2, OpX2TaC (0xe, 2, 0, 1), {P1, P2, IMM8, R3}, EMPTY},
+ {"cmp.ne.unc", A2, OpX2TaC (0xe, 2, 0, 1), {P2, P1, IMM8, R3}, EMPTY},
+ {"cmp.eq.or.andcm", A2, OpX2TaC (0xe, 2, 1, 0), {P1, P2, IMM8, R3}, EMPTY},
+ {"cmp.ne.and.orcm", A2, OpX2TaC (0xe, 2, 1, 0), {P2, P1, IMM8, R3}, PSEUDO, 0, NULL},
+ {"cmp.ne.or.andcm", A2, OpX2TaC (0xe, 2, 1, 1), {P1, P2, IMM8, R3}, EMPTY},
+ {"cmp.eq.and.orcm", A2, OpX2TaC (0xe, 2, 1, 1), {P2, P1, IMM8, R3}, PSEUDO, 0, NULL},
+ {"cmp4.eq", A2, OpX2TaC (0xe, 3, 0, 0), {P1, P2, IMM8, R3}, EMPTY},
+ {"cmp4.ne", A2, OpX2TaC (0xe, 3, 0, 0), {P2, P1, IMM8, R3}, EMPTY},
+ {"cmp4.eq.unc", A2, OpX2TaC (0xe, 3, 0, 1), {P1, P2, IMM8, R3}, EMPTY},
+ {"cmp4.ne.unc", A2, OpX2TaC (0xe, 3, 0, 1), {P2, P1, IMM8, R3}, EMPTY},
+ {"cmp4.eq.or.andcm", A2, OpX2TaC (0xe, 3, 1, 0), {P1, P2, IMM8, R3}, EMPTY},
+ {"cmp4.ne.and.orcm", A2, OpX2TaC (0xe, 3, 1, 0), {P2, P1, IMM8, R3}, PSEUDO, 0, NULL},
+ {"cmp4.ne.or.andcm", A2, OpX2TaC (0xe, 3, 1, 1), {P1, P2, IMM8, R3}, EMPTY},
+ {"cmp4.eq.and.orcm", A2, OpX2TaC (0xe, 3, 1, 1), {P2, P1, IMM8, R3}, PSEUDO, 0, NULL},
- {0}
+ {NULL, 0, 0, 0, 0, {0}, 0, 0, NULL}
};
#undef A
@@ -410,3 +414,4 @@ struct ia64_opcode ia64_opcodes_a[] =
#undef OpX2TaC
#undef OpX2aZaZbX4
#undef OpX2aZaZbX4X2b
+#undef EMPTY
diff --git a/opcodes/ia64-opc-b.c b/opcodes/ia64-opc-b.c
index 9a4a850..efc2536 100644
--- a/opcodes/ia64-opc-b.c
+++ b/opcodes/ia64-opc-b.c
@@ -1,5 +1,5 @@
/* ia64-opc-b.c -- IA-64 `B' opcode table.
- Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of GDB, GAS, and the GNU binutils.
@@ -69,12 +69,16 @@
(bOp (a) | bX6 (b) | bIh (c) | bWhb (d)), \
(mOp | mX6 | mIh | mWhb)
+/* Used to initialise unused fields in ia64_opcode struct,
+ in order to stop gcc from complaining. */
+#define EMPTY 0,0,NULL
+
struct ia64_opcode ia64_opcodes_b[] =
{
/* B-type instruction encodings (sorted according to major opcode) */
#define BR(a,b) \
- B0, OpX6BtypePaWhaDPr (0, 0x20, 0, a, 0, b, 0), {B2}, PSEUDO
+ B0, OpX6BtypePaWhaDPr (0, 0x20, 0, a, 0, b, 0), {B2}, PSEUDO, 0, NULL
{"br.few", BR (0, 0)},
{"br", BR (0, 0)},
{"br.few.clr", BR (0, 1)},
@@ -83,23 +87,25 @@ struct ia64_opcode ia64_opcodes_b[] =
{"br.many.clr", BR (1, 1)},
#undef BR
-#define BR(a,b,c,d,e) B0, OpX6BtypePaWhaD (0, a, b, c, d, e), {B2}
+#define BR(a,b,c,d,e) B0, OpX6BtypePaWhaD (0, a, b, c, d, e), {B2}, EMPTY
+#define BRP(a,b,c,d,e) B0, OpX6BtypePaWhaD (0, a, b, c, d, e), {B2}, PSEUDO, 0, NULL
+#define BRT(a,b,c,d,e,f) B0, OpX6BtypePaWhaD (0, a, b, c, d, e), {B2}, f, 0, NULL
{"br.cond.sptk.few", BR (0x20, 0, 0, 0, 0)},
- {"br.cond.sptk", BR (0x20, 0, 0, 0, 0), PSEUDO},
+ {"br.cond.sptk", BRP (0x20, 0, 0, 0, 0)},
{"br.cond.sptk.few.clr", BR (0x20, 0, 0, 0, 1)},
- {"br.cond.sptk.clr", BR (0x20, 0, 0, 0, 1), PSEUDO},
+ {"br.cond.sptk.clr", BRP (0x20, 0, 0, 0, 1)},
{"br.cond.spnt.few", BR (0x20, 0, 0, 1, 0)},
- {"br.cond.spnt", BR (0x20, 0, 0, 1, 0), PSEUDO},
+ {"br.cond.spnt", BRP (0x20, 0, 0, 1, 0)},
{"br.cond.spnt.few.clr", BR (0x20, 0, 0, 1, 1)},
- {"br.cond.spnt.clr", BR (0x20, 0, 0, 1, 1), PSEUDO},
+ {"br.cond.spnt.clr", BRP (0x20, 0, 0, 1, 1)},
{"br.cond.dptk.few", BR (0x20, 0, 0, 2, 0)},
- {"br.cond.dptk", BR (0x20, 0, 0, 2, 0), PSEUDO},
+ {"br.cond.dptk", BRP (0x20, 0, 0, 2, 0)},
{"br.cond.dptk.few.clr", BR (0x20, 0, 0, 2, 1)},
- {"br.cond.dptk.clr", BR (0x20, 0, 0, 2, 1), PSEUDO},
+ {"br.cond.dptk.clr", BRP (0x20, 0, 0, 2, 1)},
{"br.cond.dpnt.few", BR (0x20, 0, 0, 3, 0)},
- {"br.cond.dpnt", BR (0x20, 0, 0, 3, 0), PSEUDO},
+ {"br.cond.dpnt", BRP (0x20, 0, 0, 3, 0)},
{"br.cond.dpnt.few.clr", BR (0x20, 0, 0, 3, 1)},
- {"br.cond.dpnt.clr", BR (0x20, 0, 0, 3, 1), PSEUDO},
+ {"br.cond.dpnt.clr", BRP (0x20, 0, 0, 3, 1)},
{"br.cond.sptk.many", BR (0x20, 0, 1, 0, 0)},
{"br.cond.sptk.many.clr", BR (0x20, 0, 1, 0, 1)},
{"br.cond.spnt.many", BR (0x20, 0, 1, 1, 0)},
@@ -109,21 +115,21 @@ struct ia64_opcode ia64_opcodes_b[] =
{"br.cond.dpnt.many", BR (0x20, 0, 1, 3, 0)},
{"br.cond.dpnt.many.clr", BR (0x20, 0, 1, 3, 1)},
{"br.sptk.few", BR (0x20, 0, 0, 0, 0)},
- {"br.sptk", BR (0x20, 0, 0, 0, 0), PSEUDO},
+ {"br.sptk", BRP (0x20, 0, 0, 0, 0)},
{"br.sptk.few.clr", BR (0x20, 0, 0, 0, 1)},
- {"br.sptk.clr", BR (0x20, 0, 0, 0, 1), PSEUDO},
+ {"br.sptk.clr", BRP (0x20, 0, 0, 0, 1)},
{"br.spnt.few", BR (0x20, 0, 0, 1, 0)},
- {"br.spnt", BR (0x20, 0, 0, 1, 0), PSEUDO},
+ {"br.spnt", BRP (0x20, 0, 0, 1, 0)},
{"br.spnt.few.clr", BR (0x20, 0, 0, 1, 1)},
- {"br.spnt.clr", BR (0x20, 0, 0, 1, 1), PSEUDO},
+ {"br.spnt.clr", BRP (0x20, 0, 0, 1, 1)},
{"br.dptk.few", BR (0x20, 0, 0, 2, 0)},
- {"br.dptk", BR (0x20, 0, 0, 2, 0), PSEUDO},
+ {"br.dptk", BRP (0x20, 0, 0, 2, 0)},
{"br.dptk.few.clr", BR (0x20, 0, 0, 2, 1)},
- {"br.dptk.clr", BR (0x20, 0, 0, 2, 1), PSEUDO},
+ {"br.dptk.clr", BRP (0x20, 0, 0, 2, 1)},
{"br.dpnt.few", BR (0x20, 0, 0, 3, 0)},
- {"br.dpnt", BR (0x20, 0, 0, 3, 0), PSEUDO},
+ {"br.dpnt", BRP (0x20, 0, 0, 3, 0)},
{"br.dpnt.few.clr", BR (0x20, 0, 0, 3, 1)},
- {"br.dpnt.clr", BR (0x20, 0, 0, 3, 1), PSEUDO},
+ {"br.dpnt.clr", BRP (0x20, 0, 0, 3, 1)},
{"br.sptk.many", BR (0x20, 0, 1, 0, 0)},
{"br.sptk.many.clr", BR (0x20, 0, 1, 0, 1)},
{"br.spnt.many", BR (0x20, 0, 1, 1, 0)},
@@ -133,21 +139,21 @@ struct ia64_opcode ia64_opcodes_b[] =
{"br.dpnt.many", BR (0x20, 0, 1, 3, 0)},
{"br.dpnt.many.clr", BR (0x20, 0, 1, 3, 1)},
{"br.ia.sptk.few", BR (0x20, 1, 0, 0, 0)},
- {"br.ia.sptk", BR (0x20, 1, 0, 0, 0), PSEUDO},
+ {"br.ia.sptk", BRP (0x20, 1, 0, 0, 0)},
{"br.ia.sptk.few.clr", BR (0x20, 1, 0, 0, 1)},
- {"br.ia.sptk.clr", BR (0x20, 1, 0, 0, 1), PSEUDO},
+ {"br.ia.sptk.clr", BRP (0x20, 1, 0, 0, 1)},
{"br.ia.spnt.few", BR (0x20, 1, 0, 1, 0)},
- {"br.ia.spnt", BR (0x20, 1, 0, 1, 0), PSEUDO},
+ {"br.ia.spnt", BRP (0x20, 1, 0, 1, 0)},
{"br.ia.spnt.few.clr", BR (0x20, 1, 0, 1, 1)},
- {"br.ia.spnt.clr", BR (0x20, 1, 0, 1, 1), PSEUDO},
+ {"br.ia.spnt.clr", BRP (0x20, 1, 0, 1, 1)},
{"br.ia.dptk.few", BR (0x20, 1, 0, 2, 0)},
- {"br.ia.dptk", BR (0x20, 1, 0, 2, 0), PSEUDO},
+ {"br.ia.dptk", BRP (0x20, 1, 0, 2, 0)},
{"br.ia.dptk.few.clr", BR (0x20, 1, 0, 2, 1)},
- {"br.ia.dptk.clr", BR (0x20, 1, 0, 2, 1), PSEUDO},
+ {"br.ia.dptk.clr", BRP (0x20, 1, 0, 2, 1)},
{"br.ia.dpnt.few", BR (0x20, 1, 0, 3, 0)},
- {"br.ia.dpnt", BR (0x20, 1, 0, 3, 0), PSEUDO},
+ {"br.ia.dpnt", BRP (0x20, 1, 0, 3, 0)},
{"br.ia.dpnt.few.clr", BR (0x20, 1, 0, 3, 1)},
- {"br.ia.dpnt.clr", BR (0x20, 1, 0, 3, 1), PSEUDO},
+ {"br.ia.dpnt.clr", BRP (0x20, 1, 0, 3, 1)},
{"br.ia.sptk.many", BR (0x20, 1, 1, 0, 0)},
{"br.ia.sptk.many.clr", BR (0x20, 1, 1, 0, 1)},
{"br.ia.spnt.many", BR (0x20, 1, 1, 1, 0)},
@@ -156,69 +162,71 @@ struct ia64_opcode ia64_opcodes_b[] =
{"br.ia.dptk.many.clr", BR (0x20, 1, 1, 2, 1)},
{"br.ia.dpnt.many", BR (0x20, 1, 1, 3, 0)},
{"br.ia.dpnt.many.clr", BR (0x20, 1, 1, 3, 1)},
- {"br.ret.sptk.few", BR (0x21, 4, 0, 0, 0), MOD_RRBS},
- {"br.ret.sptk", BR (0x21, 4, 0, 0, 0), PSEUDO | MOD_RRBS},
- {"br.ret.sptk.few.clr", BR (0x21, 4, 0, 0, 1), MOD_RRBS},
- {"br.ret.sptk.clr", BR (0x21, 4, 0, 0, 1), PSEUDO | MOD_RRBS},
- {"br.ret.spnt.few", BR (0x21, 4, 0, 1, 0), MOD_RRBS},
- {"br.ret.spnt", BR (0x21, 4, 0, 1, 0), PSEUDO | MOD_RRBS},
- {"br.ret.spnt.few.clr", BR (0x21, 4, 0, 1, 1), MOD_RRBS},
- {"br.ret.spnt.clr", BR (0x21, 4, 0, 1, 1), PSEUDO | MOD_RRBS},
- {"br.ret.dptk.few", BR (0x21, 4, 0, 2, 0), MOD_RRBS},
- {"br.ret.dptk", BR (0x21, 4, 0, 2, 0), PSEUDO | MOD_RRBS},
- {"br.ret.dptk.few.clr", BR (0x21, 4, 0, 2, 1), MOD_RRBS},
- {"br.ret.dptk.clr", BR (0x21, 4, 0, 2, 1), PSEUDO | MOD_RRBS},
- {"br.ret.dpnt.few", BR (0x21, 4, 0, 3, 0), MOD_RRBS},
- {"br.ret.dpnt", BR (0x21, 4, 0, 3, 0), PSEUDO | MOD_RRBS},
- {"br.ret.dpnt.few.clr", BR (0x21, 4, 0, 3, 1), MOD_RRBS},
- {"br.ret.dpnt.clr", BR (0x21, 4, 0, 3, 1), PSEUDO | MOD_RRBS},
- {"br.ret.sptk.many", BR (0x21, 4, 1, 0, 0), MOD_RRBS},
- {"br.ret.sptk.many.clr", BR (0x21, 4, 1, 0, 1), MOD_RRBS},
- {"br.ret.spnt.many", BR (0x21, 4, 1, 1, 0), MOD_RRBS},
- {"br.ret.spnt.many.clr", BR (0x21, 4, 1, 1, 1), MOD_RRBS},
- {"br.ret.dptk.many", BR (0x21, 4, 1, 2, 0), MOD_RRBS},
- {"br.ret.dptk.many.clr", BR (0x21, 4, 1, 2, 1), MOD_RRBS},
- {"br.ret.dpnt.many", BR (0x21, 4, 1, 3, 0), MOD_RRBS},
- {"br.ret.dpnt.many.clr", BR (0x21, 4, 1, 3, 1), MOD_RRBS},
+ {"br.ret.sptk.few", BRT (0x21, 4, 0, 0, 0, MOD_RRBS)},
+ {"br.ret.sptk", BRT (0x21, 4, 0, 0, 0, PSEUDO | MOD_RRBS)},
+ {"br.ret.sptk.few.clr", BRT (0x21, 4, 0, 0, 1, MOD_RRBS)},
+ {"br.ret.sptk.clr", BRT (0x21, 4, 0, 0, 1, PSEUDO | MOD_RRBS)},
+ {"br.ret.spnt.few", BRT (0x21, 4, 0, 1, 0, MOD_RRBS)},
+ {"br.ret.spnt", BRT (0x21, 4, 0, 1, 0, PSEUDO | MOD_RRBS)},
+ {"br.ret.spnt.few.clr", BRT (0x21, 4, 0, 1, 1, MOD_RRBS)},
+ {"br.ret.spnt.clr", BRT (0x21, 4, 0, 1, 1, PSEUDO | MOD_RRBS)},
+ {"br.ret.dptk.few", BRT (0x21, 4, 0, 2, 0, MOD_RRBS)},
+ {"br.ret.dptk", BRT (0x21, 4, 0, 2, 0, PSEUDO | MOD_RRBS)},
+ {"br.ret.dptk.few.clr", BRT (0x21, 4, 0, 2, 1, MOD_RRBS)},
+ {"br.ret.dptk.clr", BRT (0x21, 4, 0, 2, 1, PSEUDO | MOD_RRBS)},
+ {"br.ret.dpnt.few", BRT (0x21, 4, 0, 3, 0, MOD_RRBS)},
+ {"br.ret.dpnt", BRT (0x21, 4, 0, 3, 0, PSEUDO | MOD_RRBS)},
+ {"br.ret.dpnt.few.clr", BRT (0x21, 4, 0, 3, 1, MOD_RRBS)},
+ {"br.ret.dpnt.clr", BRT (0x21, 4, 0, 3, 1, PSEUDO | MOD_RRBS)},
+ {"br.ret.sptk.many", BRT (0x21, 4, 1, 0, 0, MOD_RRBS)},
+ {"br.ret.sptk.many.clr", BRT (0x21, 4, 1, 0, 1, MOD_RRBS)},
+ {"br.ret.spnt.many", BRT (0x21, 4, 1, 1, 0, MOD_RRBS)},
+ {"br.ret.spnt.many.clr", BRT (0x21, 4, 1, 1, 1, MOD_RRBS)},
+ {"br.ret.dptk.many", BRT (0x21, 4, 1, 2, 0, MOD_RRBS)},
+ {"br.ret.dptk.many.clr", BRT (0x21, 4, 1, 2, 1, MOD_RRBS)},
+ {"br.ret.dpnt.many", BRT (0x21, 4, 1, 3, 0, MOD_RRBS)},
+ {"br.ret.dpnt.many.clr", BRT (0x21, 4, 1, 3, 1, MOD_RRBS)},
#undef BR
+#undef BRP
+#undef BRT
+
+ {"cover", B0, OpX6 (0, 0x02), {0, }, NO_PRED | LAST | MOD_RRBS, 0, NULL},
+ {"clrrrb", B0, OpX6 (0, 0x04), {0, }, NO_PRED | LAST | MOD_RRBS, 0, NULL},
+ {"clrrrb.pr", B0, OpX6 (0, 0x05), {0, }, NO_PRED | LAST | MOD_RRBS, 0, NULL},
+ {"rfi", B0, OpX6 (0, 0x08), {0, }, NO_PRED | LAST | PRIV | MOD_RRBS, 0, NULL},
+ {"bsw.0", B0, OpX6 (0, 0x0c), {0, }, NO_PRED | LAST | PRIV, 0, NULL},
+ {"bsw.1", B0, OpX6 (0, 0x0d), {0, }, NO_PRED | LAST | PRIV, 0, NULL},
+ {"epc", B0, OpX6 (0, 0x10), {0, }, NO_PRED, 0, NULL},
- {"cover", B0, OpX6 (0, 0x02), {0, }, NO_PRED | LAST | MOD_RRBS},
- {"clrrrb", B0, OpX6 (0, 0x04), {0, }, NO_PRED | LAST | MOD_RRBS},
- {"clrrrb.pr", B0, OpX6 (0, 0x05), {0, }, NO_PRED | LAST | MOD_RRBS},
- {"rfi", B0, OpX6 (0, 0x08), {0, }, NO_PRED | LAST | PRIV | MOD_RRBS},
- {"bsw.0", B0, OpX6 (0, 0x0c), {0, }, NO_PRED | LAST | PRIV},
- {"bsw.1", B0, OpX6 (0, 0x0d), {0, }, NO_PRED | LAST | PRIV},
- {"epc", B0, OpX6 (0, 0x10), {0, }, NO_PRED},
-
- {"break.b", B0, OpX6 (0, 0x00), {IMMU21}},
+ {"break.b", B0, OpX6 (0, 0x00), {IMMU21}, EMPTY},
- {"br.call.sptk.few", B, OpPaWhcD (1, 0, 1, 0), {B1, B2}},
- {"br.call.sptk", B, OpPaWhcD (1, 0, 1, 0), {B1, B2}, PSEUDO},
- {"br.call.sptk.few.clr", B, OpPaWhcD (1, 0, 1, 1), {B1, B2}},
- {"br.call.sptk.clr", B, OpPaWhcD (1, 0, 1, 1), {B1, B2}, PSEUDO},
- {"br.call.spnt.few", B, OpPaWhcD (1, 0, 3, 0), {B1, B2}},
- {"br.call.spnt", B, OpPaWhcD (1, 0, 3, 0), {B1, B2}, PSEUDO},
- {"br.call.spnt.few.clr", B, OpPaWhcD (1, 0, 3, 1), {B1, B2}},
- {"br.call.spnt.clr", B, OpPaWhcD (1, 0, 3, 1), {B1, B2}, PSEUDO},
- {"br.call.dptk.few", B, OpPaWhcD (1, 0, 5, 0), {B1, B2}},
- {"br.call.dptk", B, OpPaWhcD (1, 0, 5, 0), {B1, B2}, PSEUDO},
- {"br.call.dptk.few.clr", B, OpPaWhcD (1, 0, 5, 1), {B1, B2}},
- {"br.call.dptk.clr", B, OpPaWhcD (1, 0, 5, 1), {B1, B2}, PSEUDO},
- {"br.call.dpnt.few", B, OpPaWhcD (1, 0, 7, 0), {B1, B2}},
- {"br.call.dpnt", B, OpPaWhcD (1, 0, 7, 0), {B1, B2}, PSEUDO},
- {"br.call.dpnt.few.clr", B, OpPaWhcD (1, 0, 7, 1), {B1, B2}},
- {"br.call.dpnt.clr", B, OpPaWhcD (1, 0, 7, 1), {B1, B2}, PSEUDO},
- {"br.call.sptk.many", B, OpPaWhcD (1, 1, 1, 0), {B1, B2}},
- {"br.call.sptk.many.clr", B, OpPaWhcD (1, 1, 1, 1), {B1, B2}},
- {"br.call.spnt.many", B, OpPaWhcD (1, 1, 3, 0), {B1, B2}},
- {"br.call.spnt.many.clr", B, OpPaWhcD (1, 1, 3, 1), {B1, B2}},
- {"br.call.dptk.many", B, OpPaWhcD (1, 1, 5, 0), {B1, B2}},
- {"br.call.dptk.many.clr", B, OpPaWhcD (1, 1, 5, 1), {B1, B2}},
- {"br.call.dpnt.many", B, OpPaWhcD (1, 1, 7, 0), {B1, B2}},
- {"br.call.dpnt.many.clr", B, OpPaWhcD (1, 1, 7, 1), {B1, B2}},
+ {"br.call.sptk.few", B, OpPaWhcD (1, 0, 1, 0), {B1, B2}, EMPTY},
+ {"br.call.sptk", B, OpPaWhcD (1, 0, 1, 0), {B1, B2}, PSEUDO, 0, NULL},
+ {"br.call.sptk.few.clr", B, OpPaWhcD (1, 0, 1, 1), {B1, B2}, EMPTY},
+ {"br.call.sptk.clr", B, OpPaWhcD (1, 0, 1, 1), {B1, B2}, PSEUDO, 0, NULL},
+ {"br.call.spnt.few", B, OpPaWhcD (1, 0, 3, 0), {B1, B2}, EMPTY},
+ {"br.call.spnt", B, OpPaWhcD (1, 0, 3, 0), {B1, B2}, PSEUDO, 0, NULL},
+ {"br.call.spnt.few.clr", B, OpPaWhcD (1, 0, 3, 1), {B1, B2}, EMPTY},
+ {"br.call.spnt.clr", B, OpPaWhcD (1, 0, 3, 1), {B1, B2}, PSEUDO, 0, NULL},
+ {"br.call.dptk.few", B, OpPaWhcD (1, 0, 5, 0), {B1, B2}, EMPTY},
+ {"br.call.dptk", B, OpPaWhcD (1, 0, 5, 0), {B1, B2}, PSEUDO, 0, NULL},
+ {"br.call.dptk.few.clr", B, OpPaWhcD (1, 0, 5, 1), {B1, B2}, EMPTY},
+ {"br.call.dptk.clr", B, OpPaWhcD (1, 0, 5, 1), {B1, B2}, PSEUDO, 0, NULL},
+ {"br.call.dpnt.few", B, OpPaWhcD (1, 0, 7, 0), {B1, B2}, EMPTY},
+ {"br.call.dpnt", B, OpPaWhcD (1, 0, 7, 0), {B1, B2}, PSEUDO, 0, NULL},
+ {"br.call.dpnt.few.clr", B, OpPaWhcD (1, 0, 7, 1), {B1, B2}, EMPTY},
+ {"br.call.dpnt.clr", B, OpPaWhcD (1, 0, 7, 1), {B1, B2}, PSEUDO, 0, NULL},
+ {"br.call.sptk.many", B, OpPaWhcD (1, 1, 1, 0), {B1, B2}, EMPTY},
+ {"br.call.sptk.many.clr", B, OpPaWhcD (1, 1, 1, 1), {B1, B2}, EMPTY},
+ {"br.call.spnt.many", B, OpPaWhcD (1, 1, 3, 0), {B1, B2}, EMPTY},
+ {"br.call.spnt.many.clr", B, OpPaWhcD (1, 1, 3, 1), {B1, B2}, EMPTY},
+ {"br.call.dptk.many", B, OpPaWhcD (1, 1, 5, 0), {B1, B2}, EMPTY},
+ {"br.call.dptk.many.clr", B, OpPaWhcD (1, 1, 5, 1), {B1, B2}, EMPTY},
+ {"br.call.dpnt.many", B, OpPaWhcD (1, 1, 7, 0), {B1, B2}, EMPTY},
+ {"br.call.dpnt.many.clr", B, OpPaWhcD (1, 1, 7, 1), {B1, B2}, EMPTY},
#define BRP(a,b,c) \
- B0, OpX6IhWhb (2, a, b, c), {B2, TAG13}, NO_PRED
+ B0, OpX6IhWhb (2, a, b, c), {B2, TAG13}, NO_PRED, 0, NULL
{"brp.sptk", BRP (0x10, 0, 0)},
{"brp.dptk", BRP (0x10, 0, 2)},
{"brp.sptk.imp", BRP (0x10, 1, 0)},
@@ -229,10 +237,10 @@ struct ia64_opcode ia64_opcodes_b[] =
{"brp.ret.dptk.imp", BRP (0x11, 1, 2)},
#undef BRP
- {"nop.b", B0, OpX6 (2, 0x00), {IMMU21}},
+ {"nop.b", B0, OpX6 (2, 0x00), {IMMU21}, EMPTY},
#define BR(a,b) \
- B0, OpBtypePaWhaDPr (4, 0, a, 0, b, 0), {TGT25c}, PSEUDO
+ B0, OpBtypePaWhaDPr (4, 0, a, 0, b, 0), {TGT25c}, PSEUDO, 0, NULL
{"br.few", BR (0, 0)},
{"br", BR (0, 0)},
{"br.few.clr", BR (0, 1)},
@@ -242,23 +250,25 @@ struct ia64_opcode ia64_opcodes_b[] =
#undef BR
#define BR(a,b,c) \
- B0, OpBtypePaWhaD (4, 0, a, b, c), {TGT25c}
+ B0, OpBtypePaWhaD (4, 0, a, b, c), {TGT25c}, EMPTY
+#define BRP(a,b,c) \
+ B0, OpBtypePaWhaD (4, 0, a, b, c), {TGT25c}, PSEUDO, 0, NULL
{"br.cond.sptk.few", BR (0, 0, 0)},
- {"br.cond.sptk", BR (0, 0, 0), PSEUDO},
+ {"br.cond.sptk", BRP (0, 0, 0)},
{"br.cond.sptk.few.clr", BR (0, 0, 1)},
- {"br.cond.sptk.clr", BR (0, 0, 1), PSEUDO},
+ {"br.cond.sptk.clr", BRP (0, 0, 1)},
{"br.cond.spnt.few", BR (0, 1, 0)},
- {"br.cond.spnt", BR (0, 1, 0), PSEUDO},
+ {"br.cond.spnt", BRP (0, 1, 0)},
{"br.cond.spnt.few.clr", BR (0, 1, 1)},
- {"br.cond.spnt.clr", BR (0, 1, 1), PSEUDO},
+ {"br.cond.spnt.clr", BRP (0, 1, 1)},
{"br.cond.dptk.few", BR (0, 2, 0)},
- {"br.cond.dptk", BR (0, 2, 0), PSEUDO},
+ {"br.cond.dptk", BRP (0, 2, 0)},
{"br.cond.dptk.few.clr", BR (0, 2, 1)},
- {"br.cond.dptk.clr", BR (0, 2, 1), PSEUDO},
+ {"br.cond.dptk.clr", BRP (0, 2, 1)},
{"br.cond.dpnt.few", BR (0, 3, 0)},
- {"br.cond.dpnt", BR (0, 3, 0), PSEUDO},
+ {"br.cond.dpnt", BRP (0, 3, 0)},
{"br.cond.dpnt.few.clr", BR (0, 3, 1)},
- {"br.cond.dpnt.clr", BR (0, 3, 1), PSEUDO},
+ {"br.cond.dpnt.clr", BRP (0, 3, 1)},
{"br.cond.sptk.many", BR (1, 0, 0)},
{"br.cond.sptk.many.clr", BR (1, 0, 1)},
{"br.cond.spnt.many", BR (1, 1, 0)},
@@ -268,21 +278,21 @@ struct ia64_opcode ia64_opcodes_b[] =
{"br.cond.dpnt.many", BR (1, 3, 0)},
{"br.cond.dpnt.many.clr", BR (1, 3, 1)},
{"br.sptk.few", BR (0, 0, 0)},
- {"br.sptk", BR (0, 0, 0), PSEUDO},
+ {"br.sptk", BRP (0, 0, 0)},
{"br.sptk.few.clr", BR (0, 0, 1)},
- {"br.sptk.clr", BR (0, 0, 1), PSEUDO},
+ {"br.sptk.clr", BRP (0, 0, 1)},
{"br.spnt.few", BR (0, 1, 0)},
- {"br.spnt", BR (0, 1, 0), PSEUDO},
+ {"br.spnt", BRP (0, 1, 0)},
{"br.spnt.few.clr", BR (0, 1, 1)},
- {"br.spnt.clr", BR (0, 1, 1), PSEUDO},
+ {"br.spnt.clr", BRP (0, 1, 1)},
{"br.dptk.few", BR (0, 2, 0)},
- {"br.dptk", BR (0, 2, 0), PSEUDO},
+ {"br.dptk", BRP (0, 2, 0)},
{"br.dptk.few.clr", BR (0, 2, 1)},
- {"br.dptk.clr", BR (0, 2, 1), PSEUDO},
+ {"br.dptk.clr", BRP (0, 2, 1)},
{"br.dpnt.few", BR (0, 3, 0)},
- {"br.dpnt", BR (0, 3, 0), PSEUDO},
+ {"br.dpnt", BRP (0, 3, 0)},
{"br.dpnt.few.clr", BR (0, 3, 1)},
- {"br.dpnt.clr", BR (0, 3, 1), PSEUDO},
+ {"br.dpnt.clr", BRP (0, 3, 1)},
{"br.sptk.many", BR (1, 0, 0)},
{"br.sptk.many.clr", BR (1, 0, 1)},
{"br.spnt.many", BR (1, 1, 0)},
@@ -292,77 +302,80 @@ struct ia64_opcode ia64_opcodes_b[] =
{"br.dpnt.many", BR (1, 3, 0)},
{"br.dpnt.many.clr", BR (1, 3, 1)},
#undef BR
+#undef BRP
-#define BR(a,b,c,d) \
- B0, OpBtypePaWhaD (4, a, b, c, d), {TGT25c}, SLOT2
- {"br.wexit.sptk.few", BR (2, 0, 0, 0) | MOD_RRBS},
- {"br.wexit.sptk", BR (2, 0, 0, 0) | PSEUDO | MOD_RRBS},
- {"br.wexit.sptk.few.clr", BR (2, 0, 0, 1) | MOD_RRBS},
- {"br.wexit.sptk.clr", BR (2, 0, 0, 1) | PSEUDO | MOD_RRBS},
- {"br.wexit.spnt.few", BR (2, 0, 1, 0) | MOD_RRBS},
- {"br.wexit.spnt", BR (2, 0, 1, 0) | PSEUDO | MOD_RRBS},
- {"br.wexit.spnt.few.clr", BR (2, 0, 1, 1) | MOD_RRBS},
- {"br.wexit.spnt.clr", BR (2, 0, 1, 1) | PSEUDO | MOD_RRBS},
- {"br.wexit.dptk.few", BR (2, 0, 2, 0) | MOD_RRBS},
- {"br.wexit.dptk", BR (2, 0, 2, 0) | PSEUDO | MOD_RRBS},
- {"br.wexit.dptk.few.clr", BR (2, 0, 2, 1) | MOD_RRBS},
- {"br.wexit.dptk.clr", BR (2, 0, 2, 1) | PSEUDO | MOD_RRBS},
- {"br.wexit.dpnt.few", BR (2, 0, 3, 0) | MOD_RRBS},
- {"br.wexit.dpnt", BR (2, 0, 3, 0) | PSEUDO | MOD_RRBS},
- {"br.wexit.dpnt.few.clr", BR (2, 0, 3, 1) | MOD_RRBS},
- {"br.wexit.dpnt.clr", BR (2, 0, 3, 1) | PSEUDO | MOD_RRBS},
- {"br.wexit.sptk.many", BR (2, 1, 0, 0) | MOD_RRBS},
- {"br.wexit.sptk.many.clr", BR (2, 1, 0, 1) | MOD_RRBS},
- {"br.wexit.spnt.many", BR (2, 1, 1, 0) | MOD_RRBS},
- {"br.wexit.spnt.many.clr", BR (2, 1, 1, 1) | MOD_RRBS},
- {"br.wexit.dptk.many", BR (2, 1, 2, 0) | MOD_RRBS},
- {"br.wexit.dptk.many.clr", BR (2, 1, 2, 1) | MOD_RRBS},
- {"br.wexit.dpnt.many", BR (2, 1, 3, 0) | MOD_RRBS},
- {"br.wexit.dpnt.many.clr", BR (2, 1, 3, 1) | MOD_RRBS},
- {"br.wtop.sptk.few", BR (3, 0, 0, 0) | MOD_RRBS},
- {"br.wtop.sptk", BR (3, 0, 0, 0) | PSEUDO | MOD_RRBS},
- {"br.wtop.sptk.few.clr", BR (3, 0, 0, 1) | MOD_RRBS},
- {"br.wtop.sptk.clr", BR (3, 0, 0, 1) | PSEUDO | MOD_RRBS},
- {"br.wtop.spnt.few", BR (3, 0, 1, 0) | MOD_RRBS},
- {"br.wtop.spnt", BR (3, 0, 1, 0) | PSEUDO | MOD_RRBS},
- {"br.wtop.spnt.few.clr", BR (3, 0, 1, 1) | MOD_RRBS},
- {"br.wtop.spnt.clr", BR (3, 0, 1, 1) | PSEUDO | MOD_RRBS},
- {"br.wtop.dptk.few", BR (3, 0, 2, 0) | MOD_RRBS},
- {"br.wtop.dptk", BR (3, 0, 2, 0) | PSEUDO | MOD_RRBS},
- {"br.wtop.dptk.few.clr", BR (3, 0, 2, 1) | MOD_RRBS},
- {"br.wtop.dptk.clr", BR (3, 0, 2, 1) | PSEUDO | MOD_RRBS},
- {"br.wtop.dpnt.few", BR (3, 0, 3, 0) | MOD_RRBS},
- {"br.wtop.dpnt", BR (3, 0, 3, 0) | PSEUDO | MOD_RRBS},
- {"br.wtop.dpnt.few.clr", BR (3, 0, 3, 1) | MOD_RRBS},
- {"br.wtop.dpnt.clr", BR (3, 0, 3, 1) | PSEUDO | MOD_RRBS},
- {"br.wtop.sptk.many", BR (3, 1, 0, 0) | MOD_RRBS},
- {"br.wtop.sptk.many.clr", BR (3, 1, 0, 1) | MOD_RRBS},
- {"br.wtop.spnt.many", BR (3, 1, 1, 0) | MOD_RRBS},
- {"br.wtop.spnt.many.clr", BR (3, 1, 1, 1) | MOD_RRBS},
- {"br.wtop.dptk.many", BR (3, 1, 2, 0) | MOD_RRBS},
- {"br.wtop.dptk.many.clr", BR (3, 1, 2, 1) | MOD_RRBS},
- {"br.wtop.dpnt.many", BR (3, 1, 3, 0) | MOD_RRBS},
- {"br.wtop.dpnt.many.clr", BR (3, 1, 3, 1) | MOD_RRBS},
+#define BR(a,b,c,d, e) \
+ B0, OpBtypePaWhaD (4, a, b, c, d), {TGT25c}, SLOT2 | e, 0, NULL
+ {"br.wexit.sptk.few", BR (2, 0, 0, 0, MOD_RRBS)},
+ {"br.wexit.sptk", BR (2, 0, 0, 0, PSEUDO | MOD_RRBS)},
+ {"br.wexit.sptk.few.clr", BR (2, 0, 0, 1, MOD_RRBS)},
+ {"br.wexit.sptk.clr", BR (2, 0, 0, 1, PSEUDO | MOD_RRBS)},
+ {"br.wexit.spnt.few", BR (2, 0, 1, 0, MOD_RRBS)},
+ {"br.wexit.spnt", BR (2, 0, 1, 0, PSEUDO | MOD_RRBS)},
+ {"br.wexit.spnt.few.clr", BR (2, 0, 1, 1, MOD_RRBS)},
+ {"br.wexit.spnt.clr", BR (2, 0, 1, 1, PSEUDO | MOD_RRBS)},
+ {"br.wexit.dptk.few", BR (2, 0, 2, 0, MOD_RRBS)},
+ {"br.wexit.dptk", BR (2, 0, 2, 0, PSEUDO | MOD_RRBS)},
+ {"br.wexit.dptk.few.clr", BR (2, 0, 2, 1, MOD_RRBS)},
+ {"br.wexit.dptk.clr", BR (2, 0, 2, 1, PSEUDO | MOD_RRBS)},
+ {"br.wexit.dpnt.few", BR (2, 0, 3, 0, MOD_RRBS)},
+ {"br.wexit.dpnt", BR (2, 0, 3, 0, PSEUDO | MOD_RRBS)},
+ {"br.wexit.dpnt.few.clr", BR (2, 0, 3, 1, MOD_RRBS)},
+ {"br.wexit.dpnt.clr", BR (2, 0, 3, 1, PSEUDO | MOD_RRBS)},
+ {"br.wexit.sptk.many", BR (2, 1, 0, 0, MOD_RRBS)},
+ {"br.wexit.sptk.many.clr", BR (2, 1, 0, 1, MOD_RRBS)},
+ {"br.wexit.spnt.many", BR (2, 1, 1, 0, MOD_RRBS)},
+ {"br.wexit.spnt.many.clr", BR (2, 1, 1, 1, MOD_RRBS)},
+ {"br.wexit.dptk.many", BR (2, 1, 2, 0, MOD_RRBS)},
+ {"br.wexit.dptk.many.clr", BR (2, 1, 2, 1, MOD_RRBS)},
+ {"br.wexit.dpnt.many", BR (2, 1, 3, 0, MOD_RRBS)},
+ {"br.wexit.dpnt.many.clr", BR (2, 1, 3, 1, MOD_RRBS)},
+ {"br.wtop.sptk.few", BR (3, 0, 0, 0, MOD_RRBS)},
+ {"br.wtop.sptk", BR (3, 0, 0, 0, PSEUDO | MOD_RRBS)},
+ {"br.wtop.sptk.few.clr", BR (3, 0, 0, 1, MOD_RRBS)},
+ {"br.wtop.sptk.clr", BR (3, 0, 0, 1, PSEUDO | MOD_RRBS)},
+ {"br.wtop.spnt.few", BR (3, 0, 1, 0, MOD_RRBS)},
+ {"br.wtop.spnt", BR (3, 0, 1, 0, PSEUDO | MOD_RRBS)},
+ {"br.wtop.spnt.few.clr", BR (3, 0, 1, 1, MOD_RRBS)},
+ {"br.wtop.spnt.clr", BR (3, 0, 1, 1, PSEUDO | MOD_RRBS)},
+ {"br.wtop.dptk.few", BR (3, 0, 2, 0, MOD_RRBS)},
+ {"br.wtop.dptk", BR (3, 0, 2, 0, PSEUDO | MOD_RRBS)},
+ {"br.wtop.dptk.few.clr", BR (3, 0, 2, 1, MOD_RRBS)},
+ {"br.wtop.dptk.clr", BR (3, 0, 2, 1, PSEUDO | MOD_RRBS)},
+ {"br.wtop.dpnt.few", BR (3, 0, 3, 0, MOD_RRBS)},
+ {"br.wtop.dpnt", BR (3, 0, 3, 0, PSEUDO | MOD_RRBS)},
+ {"br.wtop.dpnt.few.clr", BR (3, 0, 3, 1, MOD_RRBS)},
+ {"br.wtop.dpnt.clr", BR (3, 0, 3, 1, PSEUDO | MOD_RRBS)},
+ {"br.wtop.sptk.many", BR (3, 1, 0, 0, MOD_RRBS)},
+ {"br.wtop.sptk.many.clr", BR (3, 1, 0, 1, MOD_RRBS)},
+ {"br.wtop.spnt.many", BR (3, 1, 1, 0, MOD_RRBS)},
+ {"br.wtop.spnt.many.clr", BR (3, 1, 1, 1, MOD_RRBS)},
+ {"br.wtop.dptk.many", BR (3, 1, 2, 0, MOD_RRBS)},
+ {"br.wtop.dptk.many.clr", BR (3, 1, 2, 1, MOD_RRBS)},
+ {"br.wtop.dpnt.many", BR (3, 1, 3, 0, MOD_RRBS)},
+ {"br.wtop.dpnt.many.clr", BR (3, 1, 3, 1, MOD_RRBS)},
#undef BR
#define BR(a,b,c,d) \
- B0, OpBtypePaWhaD (4, a, b, c, d), {TGT25c}, SLOT2 | NO_PRED
+ B0, OpBtypePaWhaD (4, a, b, c, d), {TGT25c}, SLOT2 | NO_PRED, 0, NULL
+#define BRT(a,b,c,d,e) \
+ B0, OpBtypePaWhaD (4, a, b, c, d), {TGT25c}, SLOT2 | NO_PRED | e, 0, NULL
{"br.cloop.sptk.few", BR (5, 0, 0, 0)},
- {"br.cloop.sptk", BR (5, 0, 0, 0) | PSEUDO},
+ {"br.cloop.sptk", BRT (5, 0, 0, 0, PSEUDO)},
{"br.cloop.sptk.few.clr", BR (5, 0, 0, 1)},
- {"br.cloop.sptk.clr", BR (5, 0, 0, 1) | PSEUDO},
+ {"br.cloop.sptk.clr", BRT (5, 0, 0, 1, PSEUDO)},
{"br.cloop.spnt.few", BR (5, 0, 1, 0)},
- {"br.cloop.spnt", BR (5, 0, 1, 0) | PSEUDO},
+ {"br.cloop.spnt", BRT (5, 0, 1, 0, PSEUDO)},
{"br.cloop.spnt.few.clr", BR (5, 0, 1, 1)},
- {"br.cloop.spnt.clr", BR (5, 0, 1, 1) | PSEUDO},
+ {"br.cloop.spnt.clr", BRT (5, 0, 1, 1, PSEUDO)},
{"br.cloop.dptk.few", BR (5, 0, 2, 0)},
- {"br.cloop.dptk", BR (5, 0, 2, 0) | PSEUDO},
+ {"br.cloop.dptk", BRT (5, 0, 2, 0, PSEUDO)},
{"br.cloop.dptk.few.clr", BR (5, 0, 2, 1)},
- {"br.cloop.dptk.clr", BR (5, 0, 2, 1) | PSEUDO},
+ {"br.cloop.dptk.clr", BRT (5, 0, 2, 1, PSEUDO)},
{"br.cloop.dpnt.few", BR (5, 0, 3, 0)},
- {"br.cloop.dpnt", BR (5, 0, 3, 0) | PSEUDO},
+ {"br.cloop.dpnt", BRT (5, 0, 3, 0, PSEUDO)},
{"br.cloop.dpnt.few.clr", BR (5, 0, 3, 1)},
- {"br.cloop.dpnt.clr", BR (5, 0, 3, 1) | PSEUDO},
+ {"br.cloop.dpnt.clr", BRT (5, 0, 3, 1, PSEUDO)},
{"br.cloop.sptk.many", BR (5, 1, 0, 0)},
{"br.cloop.sptk.many.clr", BR (5, 1, 0, 1)},
{"br.cloop.spnt.many", BR (5, 1, 1, 0)},
@@ -371,87 +384,85 @@ struct ia64_opcode ia64_opcodes_b[] =
{"br.cloop.dptk.many.clr", BR (5, 1, 2, 1)},
{"br.cloop.dpnt.many", BR (5, 1, 3, 0)},
{"br.cloop.dpnt.many.clr", BR (5, 1, 3, 1)},
- {"br.cexit.sptk.few", BR (6, 0, 0, 0) | MOD_RRBS},
- {"br.cexit.sptk", BR (6, 0, 0, 0) | PSEUDO | MOD_RRBS},
- {"br.cexit.sptk.few.clr", BR (6, 0, 0, 1) | MOD_RRBS},
- {"br.cexit.sptk.clr", BR (6, 0, 0, 1) | PSEUDO | MOD_RRBS},
- {"br.cexit.spnt.few", BR (6, 0, 1, 0) | MOD_RRBS},
- {"br.cexit.spnt", BR (6, 0, 1, 0) | PSEUDO | MOD_RRBS},
- {"br.cexit.spnt.few.clr", BR (6, 0, 1, 1) | MOD_RRBS},
- {"br.cexit.spnt.clr", BR (6, 0, 1, 1) | PSEUDO | MOD_RRBS},
- {"br.cexit.dptk.few", BR (6, 0, 2, 0) | MOD_RRBS},
- {"br.cexit.dptk", BR (6, 0, 2, 0) | PSEUDO | MOD_RRBS},
- {"br.cexit.dptk.few.clr", BR (6, 0, 2, 1) | MOD_RRBS},
- {"br.cexit.dptk.clr", BR (6, 0, 2, 1) | PSEUDO | MOD_RRBS},
- {"br.cexit.dpnt.few", BR (6, 0, 3, 0) | MOD_RRBS},
- {"br.cexit.dpnt", BR (6, 0, 3, 0) | PSEUDO | MOD_RRBS},
- {"br.cexit.dpnt.few.clr", BR (6, 0, 3, 1) | MOD_RRBS},
- {"br.cexit.dpnt.clr", BR (6, 0, 3, 1) | PSEUDO | MOD_RRBS},
- {"br.cexit.sptk.many", BR (6, 1, 0, 0) | MOD_RRBS},
- {"br.cexit.sptk.many.clr", BR (6, 1, 0, 1) | MOD_RRBS},
- {"br.cexit.spnt.many", BR (6, 1, 1, 0) | MOD_RRBS},
- {"br.cexit.spnt.many.clr", BR (6, 1, 1, 1) | MOD_RRBS},
- {"br.cexit.dptk.many", BR (6, 1, 2, 0) | MOD_RRBS},
- {"br.cexit.dptk.many.clr", BR (6, 1, 2, 1) | MOD_RRBS},
- {"br.cexit.dpnt.many", BR (6, 1, 3, 0) | MOD_RRBS},
- {"br.cexit.dpnt.many.clr", BR (6, 1, 3, 1) | MOD_RRBS},
- {"br.ctop.sptk.few", BR (7, 0, 0, 0) | MOD_RRBS},
- {"br.ctop.sptk", BR (7, 0, 0, 0) | PSEUDO | MOD_RRBS},
- {"br.ctop.sptk.few.clr", BR (7, 0, 0, 1) | MOD_RRBS},
- {"br.ctop.sptk.clr", BR (7, 0, 0, 1) | PSEUDO | MOD_RRBS},
- {"br.ctop.spnt.few", BR (7, 0, 1, 0) | MOD_RRBS},
- {"br.ctop.spnt", BR (7, 0, 1, 0) | PSEUDO | MOD_RRBS},
- {"br.ctop.spnt.few.clr", BR (7, 0, 1, 1) | MOD_RRBS},
- {"br.ctop.spnt.clr", BR (7, 0, 1, 1) | PSEUDO | MOD_RRBS},
- {"br.ctop.dptk.few", BR (7, 0, 2, 0) | MOD_RRBS},
- {"br.ctop.dptk", BR (7, 0, 2, 0) | PSEUDO | MOD_RRBS},
- {"br.ctop.dptk.few.clr", BR (7, 0, 2, 1) | MOD_RRBS},
- {"br.ctop.dptk.clr", BR (7, 0, 2, 1) | PSEUDO | MOD_RRBS},
- {"br.ctop.dpnt.few", BR (7, 0, 3, 0) | MOD_RRBS},
- {"br.ctop.dpnt", BR (7, 0, 3, 0) | PSEUDO | MOD_RRBS},
- {"br.ctop.dpnt.few.clr", BR (7, 0, 3, 1) | MOD_RRBS},
- {"br.ctop.dpnt.clr", BR (7, 0, 3, 1) | PSEUDO | MOD_RRBS},
- {"br.ctop.sptk.many", BR (7, 1, 0, 0) | MOD_RRBS},
- {"br.ctop.sptk.many.clr", BR (7, 1, 0, 1) | MOD_RRBS},
- {"br.ctop.spnt.many", BR (7, 1, 1, 0) | MOD_RRBS},
- {"br.ctop.spnt.many.clr", BR (7, 1, 1, 1) | MOD_RRBS},
- {"br.ctop.dptk.many", BR (7, 1, 2, 0) | MOD_RRBS},
- {"br.ctop.dptk.many.clr", BR (7, 1, 2, 1) | MOD_RRBS},
- {"br.ctop.dpnt.many", BR (7, 1, 3, 0) | MOD_RRBS},
- {"br.ctop.dpnt.many.clr", BR (7, 1, 3, 1) | MOD_RRBS},
-
-#undef BR
-#define BR(a,b,c,d) \
- B0, OpBtypePaWhaD (4, a, b, c, d), {TGT25c}, SLOT2
- {"br.call.sptk.few", B, OpPaWhaD (5, 0, 0, 0), {B1, TGT25c}},
- {"br.call.sptk", B, OpPaWhaD (5, 0, 0, 0), {B1, TGT25c}, PSEUDO},
- {"br.call.sptk.few.clr", B, OpPaWhaD (5, 0, 0, 1), {B1, TGT25c}},
- {"br.call.sptk.clr", B, OpPaWhaD (5, 0, 0, 1), {B1, TGT25c}, PSEUDO},
- {"br.call.spnt.few", B, OpPaWhaD (5, 0, 1, 0), {B1, TGT25c}},
- {"br.call.spnt", B, OpPaWhaD (5, 0, 1, 0), {B1, TGT25c}, PSEUDO},
- {"br.call.spnt.few.clr", B, OpPaWhaD (5, 0, 1, 1), {B1, TGT25c}},
- {"br.call.spnt.clr", B, OpPaWhaD (5, 0, 1, 1), {B1, TGT25c}, PSEUDO},
- {"br.call.dptk.few", B, OpPaWhaD (5, 0, 2, 0), {B1, TGT25c}},
- {"br.call.dptk", B, OpPaWhaD (5, 0, 2, 0), {B1, TGT25c}, PSEUDO},
- {"br.call.dptk.few.clr", B, OpPaWhaD (5, 0, 2, 1), {B1, TGT25c}},
- {"br.call.dptk.clr", B, OpPaWhaD (5, 0, 2, 1), {B1, TGT25c}, PSEUDO},
- {"br.call.dpnt.few", B, OpPaWhaD (5, 0, 3, 0), {B1, TGT25c}},
- {"br.call.dpnt", B, OpPaWhaD (5, 0, 3, 0), {B1, TGT25c}, PSEUDO},
- {"br.call.dpnt.few.clr", B, OpPaWhaD (5, 0, 3, 1), {B1, TGT25c}},
- {"br.call.dpnt.clr", B, OpPaWhaD (5, 0, 3, 1), {B1, TGT25c}, PSEUDO},
- {"br.call.sptk.many", B, OpPaWhaD (5, 1, 0, 0), {B1, TGT25c}},
- {"br.call.sptk.many.clr", B, OpPaWhaD (5, 1, 0, 1), {B1, TGT25c}},
- {"br.call.spnt.many", B, OpPaWhaD (5, 1, 1, 0), {B1, TGT25c}},
- {"br.call.spnt.many.clr", B, OpPaWhaD (5, 1, 1, 1), {B1, TGT25c}},
- {"br.call.dptk.many", B, OpPaWhaD (5, 1, 2, 0), {B1, TGT25c}},
- {"br.call.dptk.many.clr", B, OpPaWhaD (5, 1, 2, 1), {B1, TGT25c}},
- {"br.call.dpnt.many", B, OpPaWhaD (5, 1, 3, 0), {B1, TGT25c}},
- {"br.call.dpnt.many.clr", B, OpPaWhaD (5, 1, 3, 1), {B1, TGT25c}},
+ {"br.cexit.sptk.few", BRT (6, 0, 0, 0, MOD_RRBS)},
+ {"br.cexit.sptk", BRT (6, 0, 0, 0, PSEUDO | MOD_RRBS)},
+ {"br.cexit.sptk.few.clr", BRT (6, 0, 0, 1, MOD_RRBS)},
+ {"br.cexit.sptk.clr", BRT (6, 0, 0, 1, PSEUDO | MOD_RRBS)},
+ {"br.cexit.spnt.few", BRT (6, 0, 1, 0, MOD_RRBS)},
+ {"br.cexit.spnt", BRT (6, 0, 1, 0, PSEUDO | MOD_RRBS)},
+ {"br.cexit.spnt.few.clr", BRT (6, 0, 1, 1, MOD_RRBS)},
+ {"br.cexit.spnt.clr", BRT (6, 0, 1, 1, PSEUDO | MOD_RRBS)},
+ {"br.cexit.dptk.few", BRT (6, 0, 2, 0, MOD_RRBS)},
+ {"br.cexit.dptk", BRT (6, 0, 2, 0, PSEUDO | MOD_RRBS)},
+ {"br.cexit.dptk.few.clr", BRT (6, 0, 2, 1, MOD_RRBS)},
+ {"br.cexit.dptk.clr", BRT (6, 0, 2, 1, PSEUDO | MOD_RRBS)},
+ {"br.cexit.dpnt.few", BRT (6, 0, 3, 0, MOD_RRBS)},
+ {"br.cexit.dpnt", BRT (6, 0, 3, 0, PSEUDO | MOD_RRBS)},
+ {"br.cexit.dpnt.few.clr", BRT (6, 0, 3, 1, MOD_RRBS)},
+ {"br.cexit.dpnt.clr", BRT (6, 0, 3, 1, PSEUDO | MOD_RRBS)},
+ {"br.cexit.sptk.many", BRT (6, 1, 0, 0, MOD_RRBS)},
+ {"br.cexit.sptk.many.clr", BRT (6, 1, 0, 1, MOD_RRBS)},
+ {"br.cexit.spnt.many", BRT (6, 1, 1, 0, MOD_RRBS)},
+ {"br.cexit.spnt.many.clr", BRT (6, 1, 1, 1, MOD_RRBS)},
+ {"br.cexit.dptk.many", BRT (6, 1, 2, 0, MOD_RRBS)},
+ {"br.cexit.dptk.many.clr", BRT (6, 1, 2, 1, MOD_RRBS)},
+ {"br.cexit.dpnt.many", BRT (6, 1, 3, 0, MOD_RRBS)},
+ {"br.cexit.dpnt.many.clr", BRT (6, 1, 3, 1, MOD_RRBS)},
+ {"br.ctop.sptk.few", BRT (7, 0, 0, 0, MOD_RRBS)},
+ {"br.ctop.sptk", BRT (7, 0, 0, 0, PSEUDO | MOD_RRBS)},
+ {"br.ctop.sptk.few.clr", BRT (7, 0, 0, 1, MOD_RRBS)},
+ {"br.ctop.sptk.clr", BRT (7, 0, 0, 1, PSEUDO | MOD_RRBS)},
+ {"br.ctop.spnt.few", BRT (7, 0, 1, 0, MOD_RRBS)},
+ {"br.ctop.spnt", BRT (7, 0, 1, 0, PSEUDO | MOD_RRBS)},
+ {"br.ctop.spnt.few.clr", BRT (7, 0, 1, 1, MOD_RRBS)},
+ {"br.ctop.spnt.clr", BRT (7, 0, 1, 1, PSEUDO | MOD_RRBS)},
+ {"br.ctop.dptk.few", BRT (7, 0, 2, 0, MOD_RRBS)},
+ {"br.ctop.dptk", BRT (7, 0, 2, 0, PSEUDO | MOD_RRBS)},
+ {"br.ctop.dptk.few.clr", BRT (7, 0, 2, 1, MOD_RRBS)},
+ {"br.ctop.dptk.clr", BRT (7, 0, 2, 1, PSEUDO | MOD_RRBS)},
+ {"br.ctop.dpnt.few", BRT (7, 0, 3, 0, MOD_RRBS)},
+ {"br.ctop.dpnt", BRT (7, 0, 3, 0, PSEUDO | MOD_RRBS)},
+ {"br.ctop.dpnt.few.clr", BRT (7, 0, 3, 1, MOD_RRBS)},
+ {"br.ctop.dpnt.clr", BRT (7, 0, 3, 1, PSEUDO | MOD_RRBS)},
+ {"br.ctop.sptk.many", BRT (7, 1, 0, 0, MOD_RRBS)},
+ {"br.ctop.sptk.many.clr", BRT (7, 1, 0, 1, MOD_RRBS)},
+ {"br.ctop.spnt.many", BRT (7, 1, 1, 0, MOD_RRBS)},
+ {"br.ctop.spnt.many.clr", BRT (7, 1, 1, 1, MOD_RRBS)},
+ {"br.ctop.dptk.many", BRT (7, 1, 2, 0, MOD_RRBS)},
+ {"br.ctop.dptk.many.clr", BRT (7, 1, 2, 1, MOD_RRBS)},
+ {"br.ctop.dpnt.many", BRT (7, 1, 3, 0, MOD_RRBS)},
+ {"br.ctop.dpnt.many.clr", BRT (7, 1, 3, 1, MOD_RRBS)},
#undef BR
+#undef BRT
+
+ {"br.call.sptk.few", B, OpPaWhaD (5, 0, 0, 0), {B1, TGT25c}, EMPTY},
+ {"br.call.sptk", B, OpPaWhaD (5, 0, 0, 0), {B1, TGT25c}, PSEUDO, 0, NULL},
+ {"br.call.sptk.few.clr", B, OpPaWhaD (5, 0, 0, 1), {B1, TGT25c}, EMPTY},
+ {"br.call.sptk.clr", B, OpPaWhaD (5, 0, 0, 1), {B1, TGT25c}, PSEUDO, 0, NULL},
+ {"br.call.spnt.few", B, OpPaWhaD (5, 0, 1, 0), {B1, TGT25c}, EMPTY},
+ {"br.call.spnt", B, OpPaWhaD (5, 0, 1, 0), {B1, TGT25c}, PSEUDO, 0, NULL},
+ {"br.call.spnt.few.clr", B, OpPaWhaD (5, 0, 1, 1), {B1, TGT25c}, EMPTY},
+ {"br.call.spnt.clr", B, OpPaWhaD (5, 0, 1, 1), {B1, TGT25c}, PSEUDO, 0, NULL},
+ {"br.call.dptk.few", B, OpPaWhaD (5, 0, 2, 0), {B1, TGT25c}, EMPTY},
+ {"br.call.dptk", B, OpPaWhaD (5, 0, 2, 0), {B1, TGT25c}, PSEUDO, 0, NULL},
+ {"br.call.dptk.few.clr", B, OpPaWhaD (5, 0, 2, 1), {B1, TGT25c}, EMPTY},
+ {"br.call.dptk.clr", B, OpPaWhaD (5, 0, 2, 1), {B1, TGT25c}, PSEUDO, 0, NULL},
+ {"br.call.dpnt.few", B, OpPaWhaD (5, 0, 3, 0), {B1, TGT25c}, EMPTY},
+ {"br.call.dpnt", B, OpPaWhaD (5, 0, 3, 0), {B1, TGT25c}, PSEUDO, 0, NULL},
+ {"br.call.dpnt.few.clr", B, OpPaWhaD (5, 0, 3, 1), {B1, TGT25c}, EMPTY},
+ {"br.call.dpnt.clr", B, OpPaWhaD (5, 0, 3, 1), {B1, TGT25c}, PSEUDO, 0, NULL},
+ {"br.call.sptk.many", B, OpPaWhaD (5, 1, 0, 0), {B1, TGT25c}, EMPTY},
+ {"br.call.sptk.many.clr", B, OpPaWhaD (5, 1, 0, 1), {B1, TGT25c}, EMPTY},
+ {"br.call.spnt.many", B, OpPaWhaD (5, 1, 1, 0), {B1, TGT25c}, EMPTY},
+ {"br.call.spnt.many.clr", B, OpPaWhaD (5, 1, 1, 1), {B1, TGT25c}, EMPTY},
+ {"br.call.dptk.many", B, OpPaWhaD (5, 1, 2, 0), {B1, TGT25c}, EMPTY},
+ {"br.call.dptk.many.clr", B, OpPaWhaD (5, 1, 2, 1), {B1, TGT25c}, EMPTY},
+ {"br.call.dpnt.many", B, OpPaWhaD (5, 1, 3, 0), {B1, TGT25c}, EMPTY},
+ {"br.call.dpnt.many.clr", B, OpPaWhaD (5, 1, 3, 1), {B1, TGT25c}, EMPTY},
- /* branch predict */
+ /* Branch predict. */
#define BRP(a,b) \
- B0, OpIhWhb (7, a, b), {TGT25c, TAG13}, NO_PRED
+ B0, OpIhWhb (7, a, b), {TGT25c, TAG13}, NO_PRED, 0, NULL
{"brp.sptk", BRP (0, 0)},
{"brp.loop", BRP (0, 1)},
{"brp.dptk", BRP (0, 2)},
@@ -462,7 +473,7 @@ struct ia64_opcode ia64_opcodes_b[] =
{"brp.exit.imp", BRP (1, 3)},
#undef BRP
- {0}
+ {NULL, 0, 0, 0, 0, {0}, 0, 0, NULL}
};
#undef B0
@@ -494,3 +505,4 @@ struct ia64_opcode ia64_opcodes_b[] =
#undef OpX6BtypePaWhaDPr
#undef OpIhWhb
#undef OpX6IhWhb
+#undef EMPTY
diff --git a/opcodes/ia64-opc-d.c b/opcodes/ia64-opc-d.c
index 27390f5..f0761dd 100644
--- a/opcodes/ia64-opc-d.c
+++ b/opcodes/ia64-opc-d.c
@@ -1,14 +1,33 @@
+/* ia64-opc-d.c -- IA-64 `D' opcode table.
+ Copyright 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+ Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
+
+ This file is part of GDB, GAS, and the GNU binutils.
+
+ GDB, GAS, and the GNU binutils are free software; you can redistribute
+ them and/or modify them under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either version
+ 2, or (at your option) any later version.
+
+ GDB, GAS, and the GNU binutils are distributed in the hope that they
+ will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
+ the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this file; see the file COPYING. If not, write to the
+ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
struct ia64_opcode ia64_opcodes_d[] =
{
- {"add", IA64_TYPE_DYN, 1, 0, 0,
- {IA64_OPND_R1, IA64_OPND_IMM22, IA64_OPND_R3_2}},
- {"add", IA64_TYPE_DYN, 1, 0, 0,
- {IA64_OPND_R1, IA64_OPND_IMM14, IA64_OPND_R3}},
- {"break", IA64_TYPE_DYN, 0, 0, 0, {IA64_OPND_IMMU21}},
- {"chk.s", IA64_TYPE_DYN, 0, 0, 0, {IA64_OPND_R2, IA64_OPND_TGT25b}},
- {"mov", IA64_TYPE_DYN, 1, 0, 0, {IA64_OPND_R1, IA64_OPND_AR3}},
- {"mov", IA64_TYPE_DYN, 1, 0, 0, {IA64_OPND_AR3, IA64_OPND_IMM8}},
- {"mov", IA64_TYPE_DYN, 1, 0, 0, {IA64_OPND_AR3, IA64_OPND_R2}},
- {"nop", IA64_TYPE_DYN, 0, 0, 0, {IA64_OPND_IMMU21}},
- {0}
+ {"add", IA64_TYPE_DYN, 1, 0, 0, {IA64_OPND_R1, IA64_OPND_IMM22, IA64_OPND_R3_2}, 0, 0, NULL},
+ {"add", IA64_TYPE_DYN, 1, 0, 0, {IA64_OPND_R1, IA64_OPND_IMM14, IA64_OPND_R3}, 0, 0, NULL},
+ {"break", IA64_TYPE_DYN, 0, 0, 0, {IA64_OPND_IMMU21}, 0, 0, NULL},
+ {"chk.s", IA64_TYPE_DYN, 0, 0, 0, {IA64_OPND_R2, IA64_OPND_TGT25b}, 0, 0, NULL},
+ {"mov", IA64_TYPE_DYN, 1, 0, 0, {IA64_OPND_R1, IA64_OPND_AR3}, 0, 0, NULL},
+ {"mov", IA64_TYPE_DYN, 1, 0, 0, {IA64_OPND_AR3, IA64_OPND_IMM8}, 0, 0, NULL},
+ {"mov", IA64_TYPE_DYN, 1, 0, 0, {IA64_OPND_AR3, IA64_OPND_R2}, 0, 0, NULL},
+ {"nop", IA64_TYPE_DYN, 0, 0, 0, {IA64_OPND_IMMU21}, 0, 0, NULL},
+ {NULL, 0, 0, 0, 0, {0}, 0, 0, NULL}
};
diff --git a/opcodes/ia64-opc-f.c b/opcodes/ia64-opc-f.c
index 2f898c6..41d4a00 100644
--- a/opcodes/ia64-opc-f.c
+++ b/opcodes/ia64-opc-f.c
@@ -1,5 +1,5 @@
/* ia64-opc-f.c -- IA-64 `F' opcode table.
- Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of GDB, GAS, and the GNU binutils.
@@ -74,537 +74,541 @@
#define OpXbX6Sf(a,b,c,d) \
(bOp (a) | bXb (b) | bX6 (c) | bSf (d)), (mOp | mXb | mX6 | mSf)
+/* Used to initialise unused fields in ia64_opcode struct,
+ in order to stop gcc from complaining. */
+#define EMPTY 0,0,NULL
+
struct ia64_opcode ia64_opcodes_f[] =
{
- /* F-type instruction encodings (sorted according to major opcode) */
-
- {"frcpa.s0", f2, OpXbQSf (0, 1, 0, 0), {F1, P2, F2, F3}},
- {"frcpa", f2, OpXbQSf (0, 1, 0, 0), {F1, P2, F2, F3}, PSEUDO},
- {"frcpa.s1", f2, OpXbQSf (0, 1, 0, 1), {F1, P2, F2, F3}},
- {"frcpa.s2", f2, OpXbQSf (0, 1, 0, 2), {F1, P2, F2, F3}},
- {"frcpa.s3", f2, OpXbQSf (0, 1, 0, 3), {F1, P2, F2, F3}},
-
- {"frsqrta.s0", f2, OpXbQSf (0, 1, 1, 0), {F1, P2, F3}},
- {"frsqrta", f2, OpXbQSf (0, 1, 1, 0), {F1, P2, F3}, PSEUDO},
- {"frsqrta.s1", f2, OpXbQSf (0, 1, 1, 1), {F1, P2, F3}},
- {"frsqrta.s2", f2, OpXbQSf (0, 1, 1, 2), {F1, P2, F3}},
- {"frsqrta.s3", f2, OpXbQSf (0, 1, 1, 3), {F1, P2, F3}},
-
- {"fmin.s0", f, OpXbX6Sf (0, 0, 0x14, 0), {F1, F2, F3}},
- {"fmin", f, OpXbX6Sf (0, 0, 0x14, 0), {F1, F2, F3}, PSEUDO},
- {"fmin.s1", f, OpXbX6Sf (0, 0, 0x14, 1), {F1, F2, F3}},
- {"fmin.s2", f, OpXbX6Sf (0, 0, 0x14, 2), {F1, F2, F3}},
- {"fmin.s3", f, OpXbX6Sf (0, 0, 0x14, 3), {F1, F2, F3}},
- {"fmax.s0", f, OpXbX6Sf (0, 0, 0x15, 0), {F1, F2, F3}},
- {"fmax", f, OpXbX6Sf (0, 0, 0x15, 0), {F1, F2, F3}, PSEUDO},
- {"fmax.s1", f, OpXbX6Sf (0, 0, 0x15, 1), {F1, F2, F3}},
- {"fmax.s2", f, OpXbX6Sf (0, 0, 0x15, 2), {F1, F2, F3}},
- {"fmax.s3", f, OpXbX6Sf (0, 0, 0x15, 3), {F1, F2, F3}},
- {"famin.s0", f, OpXbX6Sf (0, 0, 0x16, 0), {F1, F2, F3}},
- {"famin", f, OpXbX6Sf (0, 0, 0x16, 0), {F1, F2, F3}, PSEUDO},
- {"famin.s1", f, OpXbX6Sf (0, 0, 0x16, 1), {F1, F2, F3}},
- {"famin.s2", f, OpXbX6Sf (0, 0, 0x16, 2), {F1, F2, F3}},
- {"famin.s3", f, OpXbX6Sf (0, 0, 0x16, 3), {F1, F2, F3}},
- {"famax.s0", f, OpXbX6Sf (0, 0, 0x17, 0), {F1, F2, F3}},
- {"famax", f, OpXbX6Sf (0, 0, 0x17, 0), {F1, F2, F3}, PSEUDO},
- {"famax.s1", f, OpXbX6Sf (0, 0, 0x17, 1), {F1, F2, F3}},
- {"famax.s2", f, OpXbX6Sf (0, 0, 0x17, 2), {F1, F2, F3}},
- {"famax.s3", f, OpXbX6Sf (0, 0, 0x17, 3), {F1, F2, F3}},
-
- {"mov", f, OpXbX6 (0, 0, 0x10), {F1, F3}, PSEUDO | F2_EQ_F3},
- {"fabs", f, OpXbX6F2 (0, 0, 0x10, 0), {F1, F3}, PSEUDO},
- {"fneg", f, OpXbX6 (0, 0, 0x11), {F1, F3}, PSEUDO | F2_EQ_F3},
- {"fnegabs", f, OpXbX6F2 (0, 0, 0x11, 0), {F1, F3}, PSEUDO},
- {"fmerge.s", f, OpXbX6 (0, 0, 0x10), {F1, F2, F3}},
- {"fmerge.ns", f, OpXbX6 (0, 0, 0x11), {F1, F2, F3}},
-
- {"fmerge.se", f, OpXbX6 (0, 0, 0x12), {F1, F2, F3}},
- {"fmix.lr", f, OpXbX6 (0, 0, 0x39), {F1, F2, F3}},
- {"fmix.r", f, OpXbX6 (0, 0, 0x3a), {F1, F2, F3}},
- {"fmix.l", f, OpXbX6 (0, 0, 0x3b), {F1, F2, F3}},
- {"fsxt.r", f, OpXbX6 (0, 0, 0x3c), {F1, F2, F3}},
- {"fsxt.l", f, OpXbX6 (0, 0, 0x3d), {F1, F2, F3}},
- {"fpack", f, OpXbX6 (0, 0, 0x28), {F1, F2, F3}},
- {"fswap", f, OpXbX6 (0, 0, 0x34), {F1, F2, F3}},
- {"fswap.nl", f, OpXbX6 (0, 0, 0x35), {F1, F2, F3}},
- {"fswap.nr", f, OpXbX6 (0, 0, 0x36), {F1, F2, F3}},
- {"fand", f, OpXbX6 (0, 0, 0x2c), {F1, F2, F3}},
- {"fandcm", f, OpXbX6 (0, 0, 0x2d), {F1, F2, F3}},
- {"for", f, OpXbX6 (0, 0, 0x2e), {F1, F2, F3}},
- {"fxor", f, OpXbX6 (0, 0, 0x2f), {F1, F2, F3}},
-
- {"fcvt.fx.s0", f, OpXbX6Sf (0, 0, 0x18, 0), {F1, F2}},
- {"fcvt.fx", f, OpXbX6Sf (0, 0, 0x18, 0), {F1, F2}, PSEUDO},
- {"fcvt.fx.s1", f, OpXbX6Sf (0, 0, 0x18, 1), {F1, F2}},
- {"fcvt.fx.s2", f, OpXbX6Sf (0, 0, 0x18, 2), {F1, F2}},
- {"fcvt.fx.s3", f, OpXbX6Sf (0, 0, 0x18, 3), {F1, F2}},
- {"fcvt.fxu.s0", f, OpXbX6Sf (0, 0, 0x19, 0), {F1, F2}},
- {"fcvt.fxu", f, OpXbX6Sf (0, 0, 0x19, 0), {F1, F2}, PSEUDO},
- {"fcvt.fxu.s1", f, OpXbX6Sf (0, 0, 0x19, 1), {F1, F2}},
- {"fcvt.fxu.s2", f, OpXbX6Sf (0, 0, 0x19, 2), {F1, F2}},
- {"fcvt.fxu.s3", f, OpXbX6Sf (0, 0, 0x19, 3), {F1, F2}},
- {"fcvt.fx.trunc.s0", f, OpXbX6Sf (0, 0, 0x1a, 0), {F1, F2}},
- {"fcvt.fx.trunc", f, OpXbX6Sf (0, 0, 0x1a, 0), {F1, F2}, PSEUDO},
- {"fcvt.fx.trunc.s1", f, OpXbX6Sf (0, 0, 0x1a, 1), {F1, F2}},
- {"fcvt.fx.trunc.s2", f, OpXbX6Sf (0, 0, 0x1a, 2), {F1, F2}},
- {"fcvt.fx.trunc.s3", f, OpXbX6Sf (0, 0, 0x1a, 3), {F1, F2}},
- {"fcvt.fxu.trunc.s0", f, OpXbX6Sf (0, 0, 0x1b, 0), {F1, F2}},
- {"fcvt.fxu.trunc", f, OpXbX6Sf (0, 0, 0x1b, 0), {F1, F2}, PSEUDO},
- {"fcvt.fxu.trunc.s1", f, OpXbX6Sf (0, 0, 0x1b, 1), {F1, F2}},
- {"fcvt.fxu.trunc.s2", f, OpXbX6Sf (0, 0, 0x1b, 2), {F1, F2}},
- {"fcvt.fxu.trunc.s3", f, OpXbX6Sf (0, 0, 0x1b, 3), {F1, F2}},
-
- {"fcvt.xf", f, OpXbX6 (0, 0, 0x1c), {F1, F2}},
-
- {"fsetc.s0", f0, OpXbX6Sf (0, 0, 0x04, 0), {IMMU7a, IMMU7b}},
- {"fsetc", f0, OpXbX6Sf (0, 0, 0x04, 0), {IMMU7a, IMMU7b}, PSEUDO},
- {"fsetc.s1", f0, OpXbX6Sf (0, 0, 0x04, 1), {IMMU7a, IMMU7b}},
- {"fsetc.s2", f0, OpXbX6Sf (0, 0, 0x04, 2), {IMMU7a, IMMU7b}},
- {"fsetc.s3", f0, OpXbX6Sf (0, 0, 0x04, 3), {IMMU7a, IMMU7b}},
- {"fclrf.s0", f0, OpXbX6Sf (0, 0, 0x05, 0)},
- {"fclrf", f0, OpXbX6Sf (0, 0, 0x05, 0), {0}, PSEUDO},
- {"fclrf.s1", f0, OpXbX6Sf (0, 0, 0x05, 1)},
- {"fclrf.s2", f0, OpXbX6Sf (0, 0, 0x05, 2)},
- {"fclrf.s3", f0, OpXbX6Sf (0, 0, 0x05, 3)},
- {"fchkf.s0", f0, OpXbX6Sf (0, 0, 0x08, 0), {TGT25}},
- {"fchkf", f0, OpXbX6Sf (0, 0, 0x08, 0), {TGT25}, PSEUDO},
- {"fchkf.s1", f0, OpXbX6Sf (0, 0, 0x08, 1), {TGT25}},
- {"fchkf.s2", f0, OpXbX6Sf (0, 0, 0x08, 2), {TGT25}},
- {"fchkf.s3", f0, OpXbX6Sf (0, 0, 0x08, 3), {TGT25}},
-
- {"break.f", f0, OpXbX6 (0, 0, 0x00), {IMMU21}},
- {"nop.f", f0, OpXbX6 (0, 0, 0x01), {IMMU21}},
-
- {"fprcpa.s0", f2, OpXbQSf (1, 1, 0, 0), {F1, P2, F2, F3}},
- {"fprcpa", f2, OpXbQSf (1, 1, 0, 0), {F1, P2, F2, F3}, PSEUDO},
- {"fprcpa.s1", f2, OpXbQSf (1, 1, 0, 1), {F1, P2, F2, F3}},
- {"fprcpa.s2", f2, OpXbQSf (1, 1, 0, 2), {F1, P2, F2, F3}},
- {"fprcpa.s3", f2, OpXbQSf (1, 1, 0, 3), {F1, P2, F2, F3}},
-
- {"fprsqrta.s0", f2, OpXbQSf (1, 1, 1, 0), {F1, P2, F3}},
- {"fprsqrta", f2, OpXbQSf (1, 1, 1, 0), {F1, P2, F3}, PSEUDO},
- {"fprsqrta.s1", f2, OpXbQSf (1, 1, 1, 1), {F1, P2, F3}},
- {"fprsqrta.s2", f2, OpXbQSf (1, 1, 1, 2), {F1, P2, F3}},
- {"fprsqrta.s3", f2, OpXbQSf (1, 1, 1, 3), {F1, P2, F3}},
-
- {"fpmin.s0", f, OpXbX6Sf (1, 0, 0x14, 0), {F1, F2, F3}},
- {"fpmin", f, OpXbX6Sf (1, 0, 0x14, 0), {F1, F2, F3}, PSEUDO},
- {"fpmin.s1", f, OpXbX6Sf (1, 0, 0x14, 1), {F1, F2, F3}},
- {"fpmin.s2", f, OpXbX6Sf (1, 0, 0x14, 2), {F1, F2, F3}},
- {"fpmin.s3", f, OpXbX6Sf (1, 0, 0x14, 3), {F1, F2, F3}},
- {"fpmax.s0", f, OpXbX6Sf (1, 0, 0x15, 0), {F1, F2, F3}},
- {"fpmax", f, OpXbX6Sf (1, 0, 0x15, 0), {F1, F2, F3}, PSEUDO},
- {"fpmax.s1", f, OpXbX6Sf (1, 0, 0x15, 1), {F1, F2, F3}},
- {"fpmax.s2", f, OpXbX6Sf (1, 0, 0x15, 2), {F1, F2, F3}},
- {"fpmax.s3", f, OpXbX6Sf (1, 0, 0x15, 3), {F1, F2, F3}},
- {"fpamin.s0", f, OpXbX6Sf (1, 0, 0x16, 0), {F1, F2, F3}},
- {"fpamin", f, OpXbX6Sf (1, 0, 0x16, 0), {F1, F2, F3}, PSEUDO},
- {"fpamin.s1", f, OpXbX6Sf (1, 0, 0x16, 1), {F1, F2, F3}},
- {"fpamin.s2", f, OpXbX6Sf (1, 0, 0x16, 2), {F1, F2, F3}},
- {"fpamin.s3", f, OpXbX6Sf (1, 0, 0x16, 3), {F1, F2, F3}},
- {"fpamax.s0", f, OpXbX6Sf (1, 0, 0x17, 0), {F1, F2, F3}},
- {"fpamax", f, OpXbX6Sf (1, 0, 0x17, 0), {F1, F2, F3}, PSEUDO},
- {"fpamax.s1", f, OpXbX6Sf (1, 0, 0x17, 1), {F1, F2, F3}},
- {"fpamax.s2", f, OpXbX6Sf (1, 0, 0x17, 2), {F1, F2, F3}},
- {"fpamax.s3", f, OpXbX6Sf (1, 0, 0x17, 3), {F1, F2, F3}},
-
- {"fpcmp.eq.s0", f, OpXbX6Sf (1, 0, 0x30, 0), {F1, F2, F3}},
- {"fpcmp.eq", f, OpXbX6Sf (1, 0, 0x30, 0), {F1, F2, F3}, PSEUDO},
- {"fpcmp.eq.s1", f, OpXbX6Sf (1, 0, 0x30, 1), {F1, F2, F3}},
- {"fpcmp.eq.s2", f, OpXbX6Sf (1, 0, 0x30, 2), {F1, F2, F3}},
- {"fpcmp.eq.s3", f, OpXbX6Sf (1, 0, 0x30, 3), {F1, F2, F3}},
- {"fpcmp.lt.s0", f, OpXbX6Sf (1, 0, 0x31, 0), {F1, F2, F3}},
- {"fpcmp.lt", f, OpXbX6Sf (1, 0, 0x31, 0), {F1, F2, F3}, PSEUDO},
- {"fpcmp.lt.s1", f, OpXbX6Sf (1, 0, 0x31, 1), {F1, F2, F3}},
- {"fpcmp.lt.s2", f, OpXbX6Sf (1, 0, 0x31, 2), {F1, F2, F3}},
- {"fpcmp.lt.s3", f, OpXbX6Sf (1, 0, 0x31, 3), {F1, F2, F3}},
- {"fpcmp.le.s0", f, OpXbX6Sf (1, 0, 0x32, 0), {F1, F2, F3}},
- {"fpcmp.le", f, OpXbX6Sf (1, 0, 0x32, 0), {F1, F2, F3}, PSEUDO},
- {"fpcmp.le.s1", f, OpXbX6Sf (1, 0, 0x32, 1), {F1, F2, F3}},
- {"fpcmp.le.s2", f, OpXbX6Sf (1, 0, 0x32, 2), {F1, F2, F3}},
- {"fpcmp.le.s3", f, OpXbX6Sf (1, 0, 0x32, 3), {F1, F2, F3}},
- {"fpcmp.gt.s0", f, OpXbX6Sf (1, 0, 0x31, 0), {F1, F3, F2}, PSEUDO},
- {"fpcmp.gt", f, OpXbX6Sf (1, 0, 0x31, 0), {F1, F3, F2}, PSEUDO},
- {"fpcmp.gt.s1", f, OpXbX6Sf (1, 0, 0x31, 1), {F1, F3, F2}, PSEUDO},
- {"fpcmp.gt.s2", f, OpXbX6Sf (1, 0, 0x31, 2), {F1, F3, F2}, PSEUDO},
- {"fpcmp.gt.s3", f, OpXbX6Sf (1, 0, 0x31, 3), {F1, F3, F2}, PSEUDO},
- {"fpcmp.ge.s0", f, OpXbX6Sf (1, 0, 0x32, 0), {F1, F3, F2}, PSEUDO},
- {"fpcmp.ge", f, OpXbX6Sf (1, 0, 0x32, 0), {F1, F3, F2}, PSEUDO},
- {"fpcmp.ge.s1", f, OpXbX6Sf (1, 0, 0x32, 1), {F1, F3, F2}, PSEUDO},
- {"fpcmp.ge.s2", f, OpXbX6Sf (1, 0, 0x32, 2), {F1, F3, F2}, PSEUDO},
- {"fpcmp.ge.s3", f, OpXbX6Sf (1, 0, 0x32, 3), {F1, F3, F2}, PSEUDO},
- {"fpcmp.unord.s0", f, OpXbX6Sf (1, 0, 0x33, 0), {F1, F2, F3}},
- {"fpcmp.unord", f, OpXbX6Sf (1, 0, 0x33, 0), {F1, F2, F3}, PSEUDO},
- {"fpcmp.unord.s1", f, OpXbX6Sf (1, 0, 0x33, 1), {F1, F2, F3}},
- {"fpcmp.unord.s2", f, OpXbX6Sf (1, 0, 0x33, 2), {F1, F2, F3}},
- {"fpcmp.unord.s3", f, OpXbX6Sf (1, 0, 0x33, 3), {F1, F2, F3}},
- {"fpcmp.neq.s0", f, OpXbX6Sf (1, 0, 0x34, 0), {F1, F2, F3}},
- {"fpcmp.neq", f, OpXbX6Sf (1, 0, 0x34, 0), {F1, F2, F3}, PSEUDO},
- {"fpcmp.neq.s1", f, OpXbX6Sf (1, 0, 0x34, 1), {F1, F2, F3}},
- {"fpcmp.neq.s2", f, OpXbX6Sf (1, 0, 0x34, 2), {F1, F2, F3}},
- {"fpcmp.neq.s3", f, OpXbX6Sf (1, 0, 0x34, 3), {F1, F2, F3}},
- {"fpcmp.nlt.s0", f, OpXbX6Sf (1, 0, 0x35, 0), {F1, F2, F3}},
- {"fpcmp.nlt", f, OpXbX6Sf (1, 0, 0x35, 0), {F1, F2, F3}, PSEUDO},
- {"fpcmp.nlt.s1", f, OpXbX6Sf (1, 0, 0x35, 1), {F1, F2, F3}},
- {"fpcmp.nlt.s2", f, OpXbX6Sf (1, 0, 0x35, 2), {F1, F2, F3}},
- {"fpcmp.nlt.s3", f, OpXbX6Sf (1, 0, 0x35, 3), {F1, F2, F3}},
- {"fpcmp.nle.s0", f, OpXbX6Sf (1, 0, 0x36, 0), {F1, F2, F3}},
- {"fpcmp.nle", f, OpXbX6Sf (1, 0, 0x36, 0), {F1, F2, F3}, PSEUDO},
- {"fpcmp.nle.s1", f, OpXbX6Sf (1, 0, 0x36, 1), {F1, F2, F3}},
- {"fpcmp.nle.s2", f, OpXbX6Sf (1, 0, 0x36, 2), {F1, F2, F3}},
- {"fpcmp.nle.s3", f, OpXbX6Sf (1, 0, 0x36, 3), {F1, F2, F3}},
- {"fpcmp.ngt.s0", f, OpXbX6Sf (1, 0, 0x35, 0), {F1, F3, F2}, PSEUDO},
- {"fpcmp.ngt", f, OpXbX6Sf (1, 0, 0x35, 0), {F1, F3, F2}, PSEUDO},
- {"fpcmp.ngt.s1", f, OpXbX6Sf (1, 0, 0x35, 1), {F1, F3, F2}, PSEUDO},
- {"fpcmp.ngt.s2", f, OpXbX6Sf (1, 0, 0x35, 2), {F1, F3, F2}, PSEUDO},
- {"fpcmp.ngt.s3", f, OpXbX6Sf (1, 0, 0x35, 3), {F1, F3, F2}, PSEUDO},
- {"fpcmp.nge.s0", f, OpXbX6Sf (1, 0, 0x36, 0), {F1, F3, F2}, PSEUDO},
- {"fpcmp.nge", f, OpXbX6Sf (1, 0, 0x36, 0), {F1, F3, F2}, PSEUDO},
- {"fpcmp.nge.s1", f, OpXbX6Sf (1, 0, 0x36, 1), {F1, F3, F2}, PSEUDO},
- {"fpcmp.nge.s2", f, OpXbX6Sf (1, 0, 0x36, 2), {F1, F3, F2}, PSEUDO},
- {"fpcmp.nge.s3", f, OpXbX6Sf (1, 0, 0x36, 3), {F1, F3, F2}, PSEUDO},
- {"fpcmp.ord.s0", f, OpXbX6Sf (1, 0, 0x37, 0), {F1, F2, F3}},
- {"fpcmp.ord", f, OpXbX6Sf (1, 0, 0x37, 0), {F1, F2, F3}, PSEUDO},
- {"fpcmp.ord.s1", f, OpXbX6Sf (1, 0, 0x37, 1), {F1, F2, F3}},
- {"fpcmp.ord.s2", f, OpXbX6Sf (1, 0, 0x37, 2), {F1, F2, F3}},
- {"fpcmp.ord.s3", f, OpXbX6Sf (1, 0, 0x37, 3), {F1, F2, F3}},
-
- {"fpabs", f, OpXbX6F2 (1, 0, 0x10, 0), {F1, F3}, PSEUDO},
- {"fpneg", f, OpXbX6 (1, 0, 0x11), {F1, F3}, PSEUDO | F2_EQ_F3},
- {"fpnegabs", f, OpXbX6F2 (1, 0, 0x11, 0), {F1, F3}, PSEUDO},
- {"fpmerge.s", f, OpXbX6 (1, 0, 0x10), {F1, F2, F3}},
- {"fpmerge.ns", f, OpXbX6 (1, 0, 0x11), {F1, F2, F3}},
- {"fpmerge.se", f, OpXbX6 (1, 0, 0x12), {F1, F2, F3}},
-
- {"fpcvt.fx.s0", f, OpXbX6Sf (1, 0, 0x18, 0), {F1, F2}},
- {"fpcvt.fx", f, OpXbX6Sf (1, 0, 0x18, 0), {F1, F2}, PSEUDO},
- {"fpcvt.fx.s1", f, OpXbX6Sf (1, 0, 0x18, 1), {F1, F2}},
- {"fpcvt.fx.s2", f, OpXbX6Sf (1, 0, 0x18, 2), {F1, F2}},
- {"fpcvt.fx.s3", f, OpXbX6Sf (1, 0, 0x18, 3), {F1, F2}},
- {"fpcvt.fxu.s0", f, OpXbX6Sf (1, 0, 0x19, 0), {F1, F2}},
- {"fpcvt.fxu", f, OpXbX6Sf (1, 0, 0x19, 0), {F1, F2}, PSEUDO},
- {"fpcvt.fxu.s1", f, OpXbX6Sf (1, 0, 0x19, 1), {F1, F2}},
- {"fpcvt.fxu.s2", f, OpXbX6Sf (1, 0, 0x19, 2), {F1, F2}},
- {"fpcvt.fxu.s3", f, OpXbX6Sf (1, 0, 0x19, 3), {F1, F2}},
- {"fpcvt.fx.trunc.s0", f, OpXbX6Sf (1, 0, 0x1a, 0), {F1, F2}},
- {"fpcvt.fx.trunc", f, OpXbX6Sf (1, 0, 0x1a, 0), {F1, F2}, PSEUDO},
- {"fpcvt.fx.trunc.s1", f, OpXbX6Sf (1, 0, 0x1a, 1), {F1, F2}},
- {"fpcvt.fx.trunc.s2", f, OpXbX6Sf (1, 0, 0x1a, 2), {F1, F2}},
- {"fpcvt.fx.trunc.s3", f, OpXbX6Sf (1, 0, 0x1a, 3), {F1, F2}},
- {"fpcvt.fxu.trunc.s0", f, OpXbX6Sf (1, 0, 0x1b, 0), {F1, F2}},
- {"fpcvt.fxu.trunc", f, OpXbX6Sf (1, 0, 0x1b, 0), {F1, F2}, PSEUDO},
- {"fpcvt.fxu.trunc.s1", f, OpXbX6Sf (1, 0, 0x1b, 1), {F1, F2}},
- {"fpcvt.fxu.trunc.s2", f, OpXbX6Sf (1, 0, 0x1b, 2), {F1, F2}},
- {"fpcvt.fxu.trunc.s3", f, OpXbX6Sf (1, 0, 0x1b, 3), {F1, F2}},
-
- {"fcmp.eq.s0", f2, OpRaRbTaSf (4, 0, 0, 0, 0), {P1, P2, F2, F3}},
- {"fcmp.eq", f2, OpRaRbTaSf (4, 0, 0, 0, 0), {P1, P2, F2, F3}, PSEUDO},
- {"fcmp.eq.s1", f2, OpRaRbTaSf (4, 0, 0, 0, 1), {P1, P2, F2, F3}},
- {"fcmp.eq.s2", f2, OpRaRbTaSf (4, 0, 0, 0, 2), {P1, P2, F2, F3}},
- {"fcmp.eq.s3", f2, OpRaRbTaSf (4, 0, 0, 0, 3), {P1, P2, F2, F3}},
- {"fcmp.lt.s0", f2, OpRaRbTaSf (4, 0, 1, 0, 0), {P1, P2, F2, F3}},
- {"fcmp.lt", f2, OpRaRbTaSf (4, 0, 1, 0, 0), {P1, P2, F2, F3}, PSEUDO},
- {"fcmp.lt.s1", f2, OpRaRbTaSf (4, 0, 1, 0, 1), {P1, P2, F2, F3}},
- {"fcmp.lt.s2", f2, OpRaRbTaSf (4, 0, 1, 0, 2), {P1, P2, F2, F3}},
- {"fcmp.lt.s3", f2, OpRaRbTaSf (4, 0, 1, 0, 3), {P1, P2, F2, F3}},
- {"fcmp.le.s0", f2, OpRaRbTaSf (4, 1, 0, 0, 0), {P1, P2, F2, F3}},
- {"fcmp.le", f2, OpRaRbTaSf (4, 1, 0, 0, 0), {P1, P2, F2, F3}, PSEUDO},
- {"fcmp.le.s1", f2, OpRaRbTaSf (4, 1, 0, 0, 1), {P1, P2, F2, F3}},
- {"fcmp.le.s2", f2, OpRaRbTaSf (4, 1, 0, 0, 2), {P1, P2, F2, F3}},
- {"fcmp.le.s3", f2, OpRaRbTaSf (4, 1, 0, 0, 3), {P1, P2, F2, F3}},
- {"fcmp.unord.s0", f2, OpRaRbTaSf (4, 1, 1, 0, 0), {P1, P2, F2, F3}},
- {"fcmp.unord", f2, OpRaRbTaSf (4, 1, 1, 0, 0), {P1, P2, F2, F3}, PSEUDO},
- {"fcmp.unord.s1", f2, OpRaRbTaSf (4, 1, 1, 0, 1), {P1, P2, F2, F3}},
- {"fcmp.unord.s2", f2, OpRaRbTaSf (4, 1, 1, 0, 2), {P1, P2, F2, F3}},
- {"fcmp.unord.s3", f2, OpRaRbTaSf (4, 1, 1, 0, 3), {P1, P2, F2, F3}},
- {"fcmp.eq.unc.s0", f2, OpRaRbTaSf (4, 0, 0, 1, 0), {P1, P2, F2, F3}},
- {"fcmp.eq.unc", f2, OpRaRbTaSf (4, 0, 0, 1, 0), {P1, P2, F2, F3}, PSEUDO},
- {"fcmp.eq.unc.s1", f2, OpRaRbTaSf (4, 0, 0, 1, 1), {P1, P2, F2, F3}},
- {"fcmp.eq.unc.s2", f2, OpRaRbTaSf (4, 0, 0, 1, 2), {P1, P2, F2, F3}},
- {"fcmp.eq.unc.s3", f2, OpRaRbTaSf (4, 0, 0, 1, 3), {P1, P2, F2, F3}},
- {"fcmp.lt.unc.s0", f2, OpRaRbTaSf (4, 0, 1, 1, 0), {P1, P2, F2, F3}},
- {"fcmp.lt.unc", f2, OpRaRbTaSf (4, 0, 1, 1, 0), {P1, P2, F2, F3}, PSEUDO},
- {"fcmp.lt.unc.s1", f2, OpRaRbTaSf (4, 0, 1, 1, 1), {P1, P2, F2, F3}},
- {"fcmp.lt.unc.s2", f2, OpRaRbTaSf (4, 0, 1, 1, 2), {P1, P2, F2, F3}},
- {"fcmp.lt.unc.s3", f2, OpRaRbTaSf (4, 0, 1, 1, 3), {P1, P2, F2, F3}},
- {"fcmp.le.unc.s0", f2, OpRaRbTaSf (4, 1, 0, 1, 0), {P1, P2, F2, F3}},
- {"fcmp.le.unc", f2, OpRaRbTaSf (4, 1, 0, 1, 0), {P1, P2, F2, F3}, PSEUDO},
- {"fcmp.le.unc.s1", f2, OpRaRbTaSf (4, 1, 0, 1, 1), {P1, P2, F2, F3}},
- {"fcmp.le.unc.s2", f2, OpRaRbTaSf (4, 1, 0, 1, 2), {P1, P2, F2, F3}},
- {"fcmp.le.unc.s3", f2, OpRaRbTaSf (4, 1, 0, 1, 3), {P1, P2, F2, F3}},
- {"fcmp.unord.unc.s0", f2, OpRaRbTaSf (4, 1, 1, 1, 0), {P1, P2, F2, F3}},
- {"fcmp.unord.unc", f2, OpRaRbTaSf (4, 1, 1, 1, 0), {P1, P2, F2, F3}, PSEUDO},
- {"fcmp.unord.unc.s1", f2, OpRaRbTaSf (4, 1, 1, 1, 1), {P1, P2, F2, F3}},
- {"fcmp.unord.unc.s2", f2, OpRaRbTaSf (4, 1, 1, 1, 2), {P1, P2, F2, F3}},
- {"fcmp.unord.unc.s3", f2, OpRaRbTaSf (4, 1, 1, 1, 3), {P1, P2, F2, F3}},
+ /* F-type instruction encodings (sorted according to major opcode). */
+
+ {"frcpa.s0", f2, OpXbQSf (0, 1, 0, 0), {F1, P2, F2, F3}, EMPTY},
+ {"frcpa", f2, OpXbQSf (0, 1, 0, 0), {F1, P2, F2, F3}, PSEUDO, 0, NULL},
+ {"frcpa.s1", f2, OpXbQSf (0, 1, 0, 1), {F1, P2, F2, F3}, EMPTY},
+ {"frcpa.s2", f2, OpXbQSf (0, 1, 0, 2), {F1, P2, F2, F3}, EMPTY},
+ {"frcpa.s3", f2, OpXbQSf (0, 1, 0, 3), {F1, P2, F2, F3}, EMPTY},
+
+ {"frsqrta.s0", f2, OpXbQSf (0, 1, 1, 0), {F1, P2, F3}, EMPTY},
+ {"frsqrta", f2, OpXbQSf (0, 1, 1, 0), {F1, P2, F3}, PSEUDO, 0, NULL},
+ {"frsqrta.s1", f2, OpXbQSf (0, 1, 1, 1), {F1, P2, F3}, EMPTY},
+ {"frsqrta.s2", f2, OpXbQSf (0, 1, 1, 2), {F1, P2, F3}, EMPTY},
+ {"frsqrta.s3", f2, OpXbQSf (0, 1, 1, 3), {F1, P2, F3}, EMPTY},
+
+ {"fmin.s0", f, OpXbX6Sf (0, 0, 0x14, 0), {F1, F2, F3}, EMPTY},
+ {"fmin", f, OpXbX6Sf (0, 0, 0x14, 0), {F1, F2, F3}, PSEUDO, 0, NULL},
+ {"fmin.s1", f, OpXbX6Sf (0, 0, 0x14, 1), {F1, F2, F3}, EMPTY},
+ {"fmin.s2", f, OpXbX6Sf (0, 0, 0x14, 2), {F1, F2, F3}, EMPTY},
+ {"fmin.s3", f, OpXbX6Sf (0, 0, 0x14, 3), {F1, F2, F3}, EMPTY},
+ {"fmax.s0", f, OpXbX6Sf (0, 0, 0x15, 0), {F1, F2, F3}, EMPTY},
+ {"fmax", f, OpXbX6Sf (0, 0, 0x15, 0), {F1, F2, F3}, PSEUDO, 0, NULL},
+ {"fmax.s1", f, OpXbX6Sf (0, 0, 0x15, 1), {F1, F2, F3}, EMPTY},
+ {"fmax.s2", f, OpXbX6Sf (0, 0, 0x15, 2), {F1, F2, F3}, EMPTY},
+ {"fmax.s3", f, OpXbX6Sf (0, 0, 0x15, 3), {F1, F2, F3}, EMPTY},
+ {"famin.s0", f, OpXbX6Sf (0, 0, 0x16, 0), {F1, F2, F3}, EMPTY},
+ {"famin", f, OpXbX6Sf (0, 0, 0x16, 0), {F1, F2, F3}, PSEUDO, 0, NULL},
+ {"famin.s1", f, OpXbX6Sf (0, 0, 0x16, 1), {F1, F2, F3}, EMPTY},
+ {"famin.s2", f, OpXbX6Sf (0, 0, 0x16, 2), {F1, F2, F3}, EMPTY},
+ {"famin.s3", f, OpXbX6Sf (0, 0, 0x16, 3), {F1, F2, F3}, EMPTY},
+ {"famax.s0", f, OpXbX6Sf (0, 0, 0x17, 0), {F1, F2, F3}, EMPTY},
+ {"famax", f, OpXbX6Sf (0, 0, 0x17, 0), {F1, F2, F3}, PSEUDO, 0, NULL},
+ {"famax.s1", f, OpXbX6Sf (0, 0, 0x17, 1), {F1, F2, F3}, EMPTY},
+ {"famax.s2", f, OpXbX6Sf (0, 0, 0x17, 2), {F1, F2, F3}, EMPTY},
+ {"famax.s3", f, OpXbX6Sf (0, 0, 0x17, 3), {F1, F2, F3}, EMPTY},
+
+ {"mov", f, OpXbX6 (0, 0, 0x10), {F1, F3}, PSEUDO | F2_EQ_F3, 0, NULL},
+ {"fabs", f, OpXbX6F2 (0, 0, 0x10, 0), {F1, F3}, PSEUDO, 0, NULL},
+ {"fneg", f, OpXbX6 (0, 0, 0x11), {F1, F3}, PSEUDO | F2_EQ_F3, 0, NULL},
+ {"fnegabs", f, OpXbX6F2 (0, 0, 0x11, 0), {F1, F3}, PSEUDO, 0, NULL},
+ {"fmerge.s", f, OpXbX6 (0, 0, 0x10), {F1, F2, F3}, EMPTY},
+ {"fmerge.ns", f, OpXbX6 (0, 0, 0x11), {F1, F2, F3}, EMPTY},
+
+ {"fmerge.se", f, OpXbX6 (0, 0, 0x12), {F1, F2, F3}, EMPTY},
+ {"fmix.lr", f, OpXbX6 (0, 0, 0x39), {F1, F2, F3}, EMPTY},
+ {"fmix.r", f, OpXbX6 (0, 0, 0x3a), {F1, F2, F3}, EMPTY},
+ {"fmix.l", f, OpXbX6 (0, 0, 0x3b), {F1, F2, F3}, EMPTY},
+ {"fsxt.r", f, OpXbX6 (0, 0, 0x3c), {F1, F2, F3}, EMPTY},
+ {"fsxt.l", f, OpXbX6 (0, 0, 0x3d), {F1, F2, F3}, EMPTY},
+ {"fpack", f, OpXbX6 (0, 0, 0x28), {F1, F2, F3}, EMPTY},
+ {"fswap", f, OpXbX6 (0, 0, 0x34), {F1, F2, F3}, EMPTY},
+ {"fswap.nl", f, OpXbX6 (0, 0, 0x35), {F1, F2, F3}, EMPTY},
+ {"fswap.nr", f, OpXbX6 (0, 0, 0x36), {F1, F2, F3}, EMPTY},
+ {"fand", f, OpXbX6 (0, 0, 0x2c), {F1, F2, F3}, EMPTY},
+ {"fandcm", f, OpXbX6 (0, 0, 0x2d), {F1, F2, F3}, EMPTY},
+ {"for", f, OpXbX6 (0, 0, 0x2e), {F1, F2, F3}, EMPTY},
+ {"fxor", f, OpXbX6 (0, 0, 0x2f), {F1, F2, F3}, EMPTY},
+
+ {"fcvt.fx.s0", f, OpXbX6Sf (0, 0, 0x18, 0), {F1, F2}, EMPTY},
+ {"fcvt.fx", f, OpXbX6Sf (0, 0, 0x18, 0), {F1, F2}, PSEUDO, 0, NULL},
+ {"fcvt.fx.s1", f, OpXbX6Sf (0, 0, 0x18, 1), {F1, F2}, EMPTY},
+ {"fcvt.fx.s2", f, OpXbX6Sf (0, 0, 0x18, 2), {F1, F2}, EMPTY},
+ {"fcvt.fx.s3", f, OpXbX6Sf (0, 0, 0x18, 3), {F1, F2}, EMPTY},
+ {"fcvt.fxu.s0", f, OpXbX6Sf (0, 0, 0x19, 0), {F1, F2}, EMPTY},
+ {"fcvt.fxu", f, OpXbX6Sf (0, 0, 0x19, 0), {F1, F2}, PSEUDO, 0, NULL},
+ {"fcvt.fxu.s1", f, OpXbX6Sf (0, 0, 0x19, 1), {F1, F2}, EMPTY},
+ {"fcvt.fxu.s2", f, OpXbX6Sf (0, 0, 0x19, 2), {F1, F2}, EMPTY},
+ {"fcvt.fxu.s3", f, OpXbX6Sf (0, 0, 0x19, 3), {F1, F2}, EMPTY},
+ {"fcvt.fx.trunc.s0", f, OpXbX6Sf (0, 0, 0x1a, 0), {F1, F2}, EMPTY},
+ {"fcvt.fx.trunc", f, OpXbX6Sf (0, 0, 0x1a, 0), {F1, F2}, PSEUDO, 0, NULL},
+ {"fcvt.fx.trunc.s1", f, OpXbX6Sf (0, 0, 0x1a, 1), {F1, F2}, EMPTY},
+ {"fcvt.fx.trunc.s2", f, OpXbX6Sf (0, 0, 0x1a, 2), {F1, F2}, EMPTY},
+ {"fcvt.fx.trunc.s3", f, OpXbX6Sf (0, 0, 0x1a, 3), {F1, F2}, EMPTY},
+ {"fcvt.fxu.trunc.s0", f, OpXbX6Sf (0, 0, 0x1b, 0), {F1, F2}, EMPTY},
+ {"fcvt.fxu.trunc", f, OpXbX6Sf (0, 0, 0x1b, 0), {F1, F2}, PSEUDO, 0, NULL},
+ {"fcvt.fxu.trunc.s1", f, OpXbX6Sf (0, 0, 0x1b, 1), {F1, F2}, EMPTY},
+ {"fcvt.fxu.trunc.s2", f, OpXbX6Sf (0, 0, 0x1b, 2), {F1, F2}, EMPTY},
+ {"fcvt.fxu.trunc.s3", f, OpXbX6Sf (0, 0, 0x1b, 3), {F1, F2}, EMPTY},
+
+ {"fcvt.xf", f, OpXbX6 (0, 0, 0x1c), {F1, F2}, EMPTY},
+
+ {"fsetc.s0", f0, OpXbX6Sf (0, 0, 0x04, 0), {IMMU7a, IMMU7b}, EMPTY},
+ {"fsetc", f0, OpXbX6Sf (0, 0, 0x04, 0), {IMMU7a, IMMU7b}, PSEUDO, 0, NULL},
+ {"fsetc.s1", f0, OpXbX6Sf (0, 0, 0x04, 1), {IMMU7a, IMMU7b}, EMPTY},
+ {"fsetc.s2", f0, OpXbX6Sf (0, 0, 0x04, 2), {IMMU7a, IMMU7b}, EMPTY},
+ {"fsetc.s3", f0, OpXbX6Sf (0, 0, 0x04, 3), {IMMU7a, IMMU7b}, EMPTY},
+ {"fclrf.s0", f0, OpXbX6Sf (0, 0, 0x05, 0), {}, EMPTY},
+ {"fclrf", f0, OpXbX6Sf (0, 0, 0x05, 0), {0}, PSEUDO, 0, NULL},
+ {"fclrf.s1", f0, OpXbX6Sf (0, 0, 0x05, 1), {}, EMPTY},
+ {"fclrf.s2", f0, OpXbX6Sf (0, 0, 0x05, 2), {}, EMPTY},
+ {"fclrf.s3", f0, OpXbX6Sf (0, 0, 0x05, 3), {}, EMPTY},
+ {"fchkf.s0", f0, OpXbX6Sf (0, 0, 0x08, 0), {TGT25}, EMPTY},
+ {"fchkf", f0, OpXbX6Sf (0, 0, 0x08, 0), {TGT25}, PSEUDO, 0, NULL},
+ {"fchkf.s1", f0, OpXbX6Sf (0, 0, 0x08, 1), {TGT25}, EMPTY},
+ {"fchkf.s2", f0, OpXbX6Sf (0, 0, 0x08, 2), {TGT25}, EMPTY},
+ {"fchkf.s3", f0, OpXbX6Sf (0, 0, 0x08, 3), {TGT25}, EMPTY},
+
+ {"break.f", f0, OpXbX6 (0, 0, 0x00), {IMMU21}, EMPTY},
+ {"nop.f", f0, OpXbX6 (0, 0, 0x01), {IMMU21}, EMPTY},
+
+ {"fprcpa.s0", f2, OpXbQSf (1, 1, 0, 0), {F1, P2, F2, F3}, EMPTY},
+ {"fprcpa", f2, OpXbQSf (1, 1, 0, 0), {F1, P2, F2, F3}, PSEUDO, 0, NULL},
+ {"fprcpa.s1", f2, OpXbQSf (1, 1, 0, 1), {F1, P2, F2, F3}, EMPTY},
+ {"fprcpa.s2", f2, OpXbQSf (1, 1, 0, 2), {F1, P2, F2, F3}, EMPTY},
+ {"fprcpa.s3", f2, OpXbQSf (1, 1, 0, 3), {F1, P2, F2, F3}, EMPTY},
+
+ {"fprsqrta.s0", f2, OpXbQSf (1, 1, 1, 0), {F1, P2, F3}, EMPTY},
+ {"fprsqrta", f2, OpXbQSf (1, 1, 1, 0), {F1, P2, F3}, PSEUDO, 0, NULL},
+ {"fprsqrta.s1", f2, OpXbQSf (1, 1, 1, 1), {F1, P2, F3}, EMPTY},
+ {"fprsqrta.s2", f2, OpXbQSf (1, 1, 1, 2), {F1, P2, F3}, EMPTY},
+ {"fprsqrta.s3", f2, OpXbQSf (1, 1, 1, 3), {F1, P2, F3}, EMPTY},
+
+ {"fpmin.s0", f, OpXbX6Sf (1, 0, 0x14, 0), {F1, F2, F3}, EMPTY},
+ {"fpmin", f, OpXbX6Sf (1, 0, 0x14, 0), {F1, F2, F3}, PSEUDO, 0, NULL},
+ {"fpmin.s1", f, OpXbX6Sf (1, 0, 0x14, 1), {F1, F2, F3}, EMPTY},
+ {"fpmin.s2", f, OpXbX6Sf (1, 0, 0x14, 2), {F1, F2, F3}, EMPTY},
+ {"fpmin.s3", f, OpXbX6Sf (1, 0, 0x14, 3), {F1, F2, F3}, EMPTY},
+ {"fpmax.s0", f, OpXbX6Sf (1, 0, 0x15, 0), {F1, F2, F3}, EMPTY},
+ {"fpmax", f, OpXbX6Sf (1, 0, 0x15, 0), {F1, F2, F3}, PSEUDO, 0, NULL},
+ {"fpmax.s1", f, OpXbX6Sf (1, 0, 0x15, 1), {F1, F2, F3}, EMPTY},
+ {"fpmax.s2", f, OpXbX6Sf (1, 0, 0x15, 2), {F1, F2, F3}, EMPTY},
+ {"fpmax.s3", f, OpXbX6Sf (1, 0, 0x15, 3), {F1, F2, F3}, EMPTY},
+ {"fpamin.s0", f, OpXbX6Sf (1, 0, 0x16, 0), {F1, F2, F3}, EMPTY},
+ {"fpamin", f, OpXbX6Sf (1, 0, 0x16, 0), {F1, F2, F3}, PSEUDO, 0, NULL},
+ {"fpamin.s1", f, OpXbX6Sf (1, 0, 0x16, 1), {F1, F2, F3}, EMPTY},
+ {"fpamin.s2", f, OpXbX6Sf (1, 0, 0x16, 2), {F1, F2, F3}, EMPTY},
+ {"fpamin.s3", f, OpXbX6Sf (1, 0, 0x16, 3), {F1, F2, F3}, EMPTY},
+ {"fpamax.s0", f, OpXbX6Sf (1, 0, 0x17, 0), {F1, F2, F3}, EMPTY},
+ {"fpamax", f, OpXbX6Sf (1, 0, 0x17, 0), {F1, F2, F3}, PSEUDO, 0, NULL},
+ {"fpamax.s1", f, OpXbX6Sf (1, 0, 0x17, 1), {F1, F2, F3}, EMPTY},
+ {"fpamax.s2", f, OpXbX6Sf (1, 0, 0x17, 2), {F1, F2, F3}, EMPTY},
+ {"fpamax.s3", f, OpXbX6Sf (1, 0, 0x17, 3), {F1, F2, F3}, EMPTY},
+
+ {"fpcmp.eq.s0", f, OpXbX6Sf (1, 0, 0x30, 0), {F1, F2, F3}, EMPTY},
+ {"fpcmp.eq", f, OpXbX6Sf (1, 0, 0x30, 0), {F1, F2, F3}, PSEUDO, 0, NULL},
+ {"fpcmp.eq.s1", f, OpXbX6Sf (1, 0, 0x30, 1), {F1, F2, F3}, EMPTY},
+ {"fpcmp.eq.s2", f, OpXbX6Sf (1, 0, 0x30, 2), {F1, F2, F3}, EMPTY},
+ {"fpcmp.eq.s3", f, OpXbX6Sf (1, 0, 0x30, 3), {F1, F2, F3}, EMPTY},
+ {"fpcmp.lt.s0", f, OpXbX6Sf (1, 0, 0x31, 0), {F1, F2, F3}, EMPTY},
+ {"fpcmp.lt", f, OpXbX6Sf (1, 0, 0x31, 0), {F1, F2, F3}, PSEUDO, 0, NULL},
+ {"fpcmp.lt.s1", f, OpXbX6Sf (1, 0, 0x31, 1), {F1, F2, F3}, EMPTY},
+ {"fpcmp.lt.s2", f, OpXbX6Sf (1, 0, 0x31, 2), {F1, F2, F3}, EMPTY},
+ {"fpcmp.lt.s3", f, OpXbX6Sf (1, 0, 0x31, 3), {F1, F2, F3}, EMPTY},
+ {"fpcmp.le.s0", f, OpXbX6Sf (1, 0, 0x32, 0), {F1, F2, F3}, EMPTY},
+ {"fpcmp.le", f, OpXbX6Sf (1, 0, 0x32, 0), {F1, F2, F3}, PSEUDO, 0, NULL},
+ {"fpcmp.le.s1", f, OpXbX6Sf (1, 0, 0x32, 1), {F1, F2, F3}, EMPTY},
+ {"fpcmp.le.s2", f, OpXbX6Sf (1, 0, 0x32, 2), {F1, F2, F3}, EMPTY},
+ {"fpcmp.le.s3", f, OpXbX6Sf (1, 0, 0x32, 3), {F1, F2, F3}, EMPTY},
+ {"fpcmp.gt.s0", f, OpXbX6Sf (1, 0, 0x31, 0), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fpcmp.gt", f, OpXbX6Sf (1, 0, 0x31, 0), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fpcmp.gt.s1", f, OpXbX6Sf (1, 0, 0x31, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fpcmp.gt.s2", f, OpXbX6Sf (1, 0, 0x31, 2), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fpcmp.gt.s3", f, OpXbX6Sf (1, 0, 0x31, 3), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fpcmp.ge.s0", f, OpXbX6Sf (1, 0, 0x32, 0), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fpcmp.ge", f, OpXbX6Sf (1, 0, 0x32, 0), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fpcmp.ge.s1", f, OpXbX6Sf (1, 0, 0x32, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fpcmp.ge.s2", f, OpXbX6Sf (1, 0, 0x32, 2), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fpcmp.ge.s3", f, OpXbX6Sf (1, 0, 0x32, 3), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fpcmp.unord.s0", f, OpXbX6Sf (1, 0, 0x33, 0), {F1, F2, F3}, EMPTY},
+ {"fpcmp.unord", f, OpXbX6Sf (1, 0, 0x33, 0), {F1, F2, F3}, PSEUDO, 0, NULL},
+ {"fpcmp.unord.s1", f, OpXbX6Sf (1, 0, 0x33, 1), {F1, F2, F3}, EMPTY},
+ {"fpcmp.unord.s2", f, OpXbX6Sf (1, 0, 0x33, 2), {F1, F2, F3}, EMPTY},
+ {"fpcmp.unord.s3", f, OpXbX6Sf (1, 0, 0x33, 3), {F1, F2, F3}, EMPTY},
+ {"fpcmp.neq.s0", f, OpXbX6Sf (1, 0, 0x34, 0), {F1, F2, F3}, EMPTY},
+ {"fpcmp.neq", f, OpXbX6Sf (1, 0, 0x34, 0), {F1, F2, F3}, PSEUDO, 0, NULL},
+ {"fpcmp.neq.s1", f, OpXbX6Sf (1, 0, 0x34, 1), {F1, F2, F3}, EMPTY},
+ {"fpcmp.neq.s2", f, OpXbX6Sf (1, 0, 0x34, 2), {F1, F2, F3}, EMPTY},
+ {"fpcmp.neq.s3", f, OpXbX6Sf (1, 0, 0x34, 3), {F1, F2, F3}, EMPTY},
+ {"fpcmp.nlt.s0", f, OpXbX6Sf (1, 0, 0x35, 0), {F1, F2, F3}, EMPTY},
+ {"fpcmp.nlt", f, OpXbX6Sf (1, 0, 0x35, 0), {F1, F2, F3}, PSEUDO, 0, NULL},
+ {"fpcmp.nlt.s1", f, OpXbX6Sf (1, 0, 0x35, 1), {F1, F2, F3}, EMPTY},
+ {"fpcmp.nlt.s2", f, OpXbX6Sf (1, 0, 0x35, 2), {F1, F2, F3}, EMPTY},
+ {"fpcmp.nlt.s3", f, OpXbX6Sf (1, 0, 0x35, 3), {F1, F2, F3}, EMPTY},
+ {"fpcmp.nle.s0", f, OpXbX6Sf (1, 0, 0x36, 0), {F1, F2, F3}, EMPTY},
+ {"fpcmp.nle", f, OpXbX6Sf (1, 0, 0x36, 0), {F1, F2, F3}, PSEUDO, 0, NULL},
+ {"fpcmp.nle.s1", f, OpXbX6Sf (1, 0, 0x36, 1), {F1, F2, F3}, EMPTY},
+ {"fpcmp.nle.s2", f, OpXbX6Sf (1, 0, 0x36, 2), {F1, F2, F3}, EMPTY},
+ {"fpcmp.nle.s3", f, OpXbX6Sf (1, 0, 0x36, 3), {F1, F2, F3}, EMPTY},
+ {"fpcmp.ngt.s0", f, OpXbX6Sf (1, 0, 0x35, 0), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fpcmp.ngt", f, OpXbX6Sf (1, 0, 0x35, 0), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fpcmp.ngt.s1", f, OpXbX6Sf (1, 0, 0x35, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fpcmp.ngt.s2", f, OpXbX6Sf (1, 0, 0x35, 2), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fpcmp.ngt.s3", f, OpXbX6Sf (1, 0, 0x35, 3), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fpcmp.nge.s0", f, OpXbX6Sf (1, 0, 0x36, 0), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fpcmp.nge", f, OpXbX6Sf (1, 0, 0x36, 0), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fpcmp.nge.s1", f, OpXbX6Sf (1, 0, 0x36, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fpcmp.nge.s2", f, OpXbX6Sf (1, 0, 0x36, 2), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fpcmp.nge.s3", f, OpXbX6Sf (1, 0, 0x36, 3), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fpcmp.ord.s0", f, OpXbX6Sf (1, 0, 0x37, 0), {F1, F2, F3}, EMPTY},
+ {"fpcmp.ord", f, OpXbX6Sf (1, 0, 0x37, 0), {F1, F2, F3}, PSEUDO, 0, NULL},
+ {"fpcmp.ord.s1", f, OpXbX6Sf (1, 0, 0x37, 1), {F1, F2, F3}, EMPTY},
+ {"fpcmp.ord.s2", f, OpXbX6Sf (1, 0, 0x37, 2), {F1, F2, F3}, EMPTY},
+ {"fpcmp.ord.s3", f, OpXbX6Sf (1, 0, 0x37, 3), {F1, F2, F3}, EMPTY},
+
+ {"fpabs", f, OpXbX6F2 (1, 0, 0x10, 0), {F1, F3}, PSEUDO, 0, NULL},
+ {"fpneg", f, OpXbX6 (1, 0, 0x11), {F1, F3}, PSEUDO | F2_EQ_F3, 0, NULL},
+ {"fpnegabs", f, OpXbX6F2 (1, 0, 0x11, 0), {F1, F3}, PSEUDO, 0, NULL},
+ {"fpmerge.s", f, OpXbX6 (1, 0, 0x10), {F1, F2, F3}, EMPTY},
+ {"fpmerge.ns", f, OpXbX6 (1, 0, 0x11), {F1, F2, F3}, EMPTY},
+ {"fpmerge.se", f, OpXbX6 (1, 0, 0x12), {F1, F2, F3}, EMPTY},
+
+ {"fpcvt.fx.s0", f, OpXbX6Sf (1, 0, 0x18, 0), {F1, F2}, EMPTY},
+ {"fpcvt.fx", f, OpXbX6Sf (1, 0, 0x18, 0), {F1, F2}, PSEUDO, 0, NULL},
+ {"fpcvt.fx.s1", f, OpXbX6Sf (1, 0, 0x18, 1), {F1, F2}, EMPTY},
+ {"fpcvt.fx.s2", f, OpXbX6Sf (1, 0, 0x18, 2), {F1, F2}, EMPTY},
+ {"fpcvt.fx.s3", f, OpXbX6Sf (1, 0, 0x18, 3), {F1, F2}, EMPTY},
+ {"fpcvt.fxu.s0", f, OpXbX6Sf (1, 0, 0x19, 0), {F1, F2}, EMPTY},
+ {"fpcvt.fxu", f, OpXbX6Sf (1, 0, 0x19, 0), {F1, F2}, PSEUDO, 0, NULL},
+ {"fpcvt.fxu.s1", f, OpXbX6Sf (1, 0, 0x19, 1), {F1, F2}, EMPTY},
+ {"fpcvt.fxu.s2", f, OpXbX6Sf (1, 0, 0x19, 2), {F1, F2}, EMPTY},
+ {"fpcvt.fxu.s3", f, OpXbX6Sf (1, 0, 0x19, 3), {F1, F2}, EMPTY},
+ {"fpcvt.fx.trunc.s0", f, OpXbX6Sf (1, 0, 0x1a, 0), {F1, F2}, EMPTY},
+ {"fpcvt.fx.trunc", f, OpXbX6Sf (1, 0, 0x1a, 0), {F1, F2}, PSEUDO, 0, NULL},
+ {"fpcvt.fx.trunc.s1", f, OpXbX6Sf (1, 0, 0x1a, 1), {F1, F2}, EMPTY},
+ {"fpcvt.fx.trunc.s2", f, OpXbX6Sf (1, 0, 0x1a, 2), {F1, F2}, EMPTY},
+ {"fpcvt.fx.trunc.s3", f, OpXbX6Sf (1, 0, 0x1a, 3), {F1, F2}, EMPTY},
+ {"fpcvt.fxu.trunc.s0", f, OpXbX6Sf (1, 0, 0x1b, 0), {F1, F2}, EMPTY},
+ {"fpcvt.fxu.trunc", f, OpXbX6Sf (1, 0, 0x1b, 0), {F1, F2}, PSEUDO, 0, NULL},
+ {"fpcvt.fxu.trunc.s1", f, OpXbX6Sf (1, 0, 0x1b, 1), {F1, F2}, EMPTY},
+ {"fpcvt.fxu.trunc.s2", f, OpXbX6Sf (1, 0, 0x1b, 2), {F1, F2}, EMPTY},
+ {"fpcvt.fxu.trunc.s3", f, OpXbX6Sf (1, 0, 0x1b, 3), {F1, F2}, EMPTY},
+
+ {"fcmp.eq.s0", f2, OpRaRbTaSf (4, 0, 0, 0, 0), {P1, P2, F2, F3}, EMPTY},
+ {"fcmp.eq", f2, OpRaRbTaSf (4, 0, 0, 0, 0), {P1, P2, F2, F3}, PSEUDO, 0, NULL},
+ {"fcmp.eq.s1", f2, OpRaRbTaSf (4, 0, 0, 0, 1), {P1, P2, F2, F3}, EMPTY},
+ {"fcmp.eq.s2", f2, OpRaRbTaSf (4, 0, 0, 0, 2), {P1, P2, F2, F3}, EMPTY},
+ {"fcmp.eq.s3", f2, OpRaRbTaSf (4, 0, 0, 0, 3), {P1, P2, F2, F3}, EMPTY},
+ {"fcmp.lt.s0", f2, OpRaRbTaSf (4, 0, 1, 0, 0), {P1, P2, F2, F3}, EMPTY},
+ {"fcmp.lt", f2, OpRaRbTaSf (4, 0, 1, 0, 0), {P1, P2, F2, F3}, PSEUDO, 0, NULL},
+ {"fcmp.lt.s1", f2, OpRaRbTaSf (4, 0, 1, 0, 1), {P1, P2, F2, F3}, EMPTY},
+ {"fcmp.lt.s2", f2, OpRaRbTaSf (4, 0, 1, 0, 2), {P1, P2, F2, F3}, EMPTY},
+ {"fcmp.lt.s3", f2, OpRaRbTaSf (4, 0, 1, 0, 3), {P1, P2, F2, F3}, EMPTY},
+ {"fcmp.le.s0", f2, OpRaRbTaSf (4, 1, 0, 0, 0), {P1, P2, F2, F3}, EMPTY},
+ {"fcmp.le", f2, OpRaRbTaSf (4, 1, 0, 0, 0), {P1, P2, F2, F3}, PSEUDO, 0, NULL},
+ {"fcmp.le.s1", f2, OpRaRbTaSf (4, 1, 0, 0, 1), {P1, P2, F2, F3}, EMPTY},
+ {"fcmp.le.s2", f2, OpRaRbTaSf (4, 1, 0, 0, 2), {P1, P2, F2, F3}, EMPTY},
+ {"fcmp.le.s3", f2, OpRaRbTaSf (4, 1, 0, 0, 3), {P1, P2, F2, F3}, EMPTY},
+ {"fcmp.unord.s0", f2, OpRaRbTaSf (4, 1, 1, 0, 0), {P1, P2, F2, F3}, EMPTY},
+ {"fcmp.unord", f2, OpRaRbTaSf (4, 1, 1, 0, 0), {P1, P2, F2, F3}, PSEUDO, 0, NULL},
+ {"fcmp.unord.s1", f2, OpRaRbTaSf (4, 1, 1, 0, 1), {P1, P2, F2, F3}, EMPTY},
+ {"fcmp.unord.s2", f2, OpRaRbTaSf (4, 1, 1, 0, 2), {P1, P2, F2, F3}, EMPTY},
+ {"fcmp.unord.s3", f2, OpRaRbTaSf (4, 1, 1, 0, 3), {P1, P2, F2, F3}, EMPTY},
+ {"fcmp.eq.unc.s0", f2, OpRaRbTaSf (4, 0, 0, 1, 0), {P1, P2, F2, F3}, EMPTY},
+ {"fcmp.eq.unc", f2, OpRaRbTaSf (4, 0, 0, 1, 0), {P1, P2, F2, F3}, PSEUDO, 0, NULL},
+ {"fcmp.eq.unc.s1", f2, OpRaRbTaSf (4, 0, 0, 1, 1), {P1, P2, F2, F3}, EMPTY},
+ {"fcmp.eq.unc.s2", f2, OpRaRbTaSf (4, 0, 0, 1, 2), {P1, P2, F2, F3}, EMPTY},
+ {"fcmp.eq.unc.s3", f2, OpRaRbTaSf (4, 0, 0, 1, 3), {P1, P2, F2, F3}, EMPTY},
+ {"fcmp.lt.unc.s0", f2, OpRaRbTaSf (4, 0, 1, 1, 0), {P1, P2, F2, F3}, EMPTY},
+ {"fcmp.lt.unc", f2, OpRaRbTaSf (4, 0, 1, 1, 0), {P1, P2, F2, F3}, PSEUDO, 0, NULL},
+ {"fcmp.lt.unc.s1", f2, OpRaRbTaSf (4, 0, 1, 1, 1), {P1, P2, F2, F3}, EMPTY},
+ {"fcmp.lt.unc.s2", f2, OpRaRbTaSf (4, 0, 1, 1, 2), {P1, P2, F2, F3}, EMPTY},
+ {"fcmp.lt.unc.s3", f2, OpRaRbTaSf (4, 0, 1, 1, 3), {P1, P2, F2, F3}, EMPTY},
+ {"fcmp.le.unc.s0", f2, OpRaRbTaSf (4, 1, 0, 1, 0), {P1, P2, F2, F3}, EMPTY},
+ {"fcmp.le.unc", f2, OpRaRbTaSf (4, 1, 0, 1, 0), {P1, P2, F2, F3}, PSEUDO, 0, NULL},
+ {"fcmp.le.unc.s1", f2, OpRaRbTaSf (4, 1, 0, 1, 1), {P1, P2, F2, F3}, EMPTY},
+ {"fcmp.le.unc.s2", f2, OpRaRbTaSf (4, 1, 0, 1, 2), {P1, P2, F2, F3}, EMPTY},
+ {"fcmp.le.unc.s3", f2, OpRaRbTaSf (4, 1, 0, 1, 3), {P1, P2, F2, F3}, EMPTY},
+ {"fcmp.unord.unc.s0", f2, OpRaRbTaSf (4, 1, 1, 1, 0), {P1, P2, F2, F3}, EMPTY},
+ {"fcmp.unord.unc", f2, OpRaRbTaSf (4, 1, 1, 1, 0), {P1, P2, F2, F3}, PSEUDO, 0, NULL},
+ {"fcmp.unord.unc.s1", f2, OpRaRbTaSf (4, 1, 1, 1, 1), {P1, P2, F2, F3}, EMPTY},
+ {"fcmp.unord.unc.s2", f2, OpRaRbTaSf (4, 1, 1, 1, 2), {P1, P2, F2, F3}, EMPTY},
+ {"fcmp.unord.unc.s3", f2, OpRaRbTaSf (4, 1, 1, 1, 3), {P1, P2, F2, F3}, EMPTY},
/* pseudo-ops of the above */
- {"fcmp.gt.s0", f2, OpRaRbTaSf (4, 0, 1, 0, 0), {P1, P2, F3, F2}},
- {"fcmp.gt", f2, OpRaRbTaSf (4, 0, 1, 0, 0), {P1, P2, F3, F2}, PSEUDO},
- {"fcmp.gt.s1", f2, OpRaRbTaSf (4, 0, 1, 0, 1), {P1, P2, F3, F2}},
- {"fcmp.gt.s2", f2, OpRaRbTaSf (4, 0, 1, 0, 2), {P1, P2, F3, F2}},
- {"fcmp.gt.s3", f2, OpRaRbTaSf (4, 0, 1, 0, 3), {P1, P2, F3, F2}},
- {"fcmp.ge.s0", f2, OpRaRbTaSf (4, 1, 0, 0, 0), {P1, P2, F3, F2}},
- {"fcmp.ge", f2, OpRaRbTaSf (4, 1, 0, 0, 0), {P1, P2, F3, F2}, PSEUDO},
- {"fcmp.ge.s1", f2, OpRaRbTaSf (4, 1, 0, 0, 1), {P1, P2, F3, F2}},
- {"fcmp.ge.s2", f2, OpRaRbTaSf (4, 1, 0, 0, 2), {P1, P2, F3, F2}},
- {"fcmp.ge.s3", f2, OpRaRbTaSf (4, 1, 0, 0, 3), {P1, P2, F3, F2}},
- {"fcmp.neq.s0", f2, OpRaRbTaSf (4, 0, 0, 0, 0), {P2, P1, F2, F3}},
- {"fcmp.neq", f2, OpRaRbTaSf (4, 0, 0, 0, 0), {P2, P1, F2, F3}, PSEUDO},
- {"fcmp.neq.s1", f2, OpRaRbTaSf (4, 0, 0, 0, 1), {P2, P1, F2, F3}},
- {"fcmp.neq.s2", f2, OpRaRbTaSf (4, 0, 0, 0, 2), {P2, P1, F2, F3}},
- {"fcmp.neq.s3", f2, OpRaRbTaSf (4, 0, 0, 0, 3), {P2, P1, F2, F3}},
- {"fcmp.nlt.s0", f2, OpRaRbTaSf (4, 0, 1, 0, 0), {P2, P1, F2, F3}},
- {"fcmp.nlt", f2, OpRaRbTaSf (4, 0, 1, 0, 0), {P2, P1, F2, F3}, PSEUDO},
- {"fcmp.nlt.s1", f2, OpRaRbTaSf (4, 0, 1, 0, 1), {P2, P1, F2, F3}},
- {"fcmp.nlt.s2", f2, OpRaRbTaSf (4, 0, 1, 0, 2), {P2, P1, F2, F3}},
- {"fcmp.nlt.s3", f2, OpRaRbTaSf (4, 0, 1, 0, 3), {P2, P1, F2, F3}},
- {"fcmp.nle.s0", f2, OpRaRbTaSf (4, 1, 0, 0, 0), {P2, P1, F2, F3}},
- {"fcmp.nle", f2, OpRaRbTaSf (4, 1, 0, 0, 0), {P2, P1, F2, F3}, PSEUDO},
- {"fcmp.nle.s1", f2, OpRaRbTaSf (4, 1, 0, 0, 1), {P2, P1, F2, F3}},
- {"fcmp.nle.s2", f2, OpRaRbTaSf (4, 1, 0, 0, 2), {P2, P1, F2, F3}},
- {"fcmp.nle.s3", f2, OpRaRbTaSf (4, 1, 0, 0, 3), {P2, P1, F2, F3}},
- {"fcmp.ngt.s0", f2, OpRaRbTaSf (4, 0, 1, 0, 0), {P2, P1, F3, F2}},
- {"fcmp.ngt", f2, OpRaRbTaSf (4, 0, 1, 0, 0), {P2, P1, F3, F2}, PSEUDO},
- {"fcmp.ngt.s1", f2, OpRaRbTaSf (4, 0, 1, 0, 1), {P2, P1, F3, F2}},
- {"fcmp.ngt.s2", f2, OpRaRbTaSf (4, 0, 1, 0, 2), {P2, P1, F3, F2}},
- {"fcmp.ngt.s3", f2, OpRaRbTaSf (4, 0, 1, 0, 3), {P2, P1, F3, F2}},
- {"fcmp.nge.s0", f2, OpRaRbTaSf (4, 1, 0, 0, 0), {P2, P1, F3, F2}},
- {"fcmp.nge", f2, OpRaRbTaSf (4, 1, 0, 0, 0), {P2, P1, F3, F2}, PSEUDO},
- {"fcmp.nge.s1", f2, OpRaRbTaSf (4, 1, 0, 0, 1), {P2, P1, F3, F2}},
- {"fcmp.nge.s2", f2, OpRaRbTaSf (4, 1, 0, 0, 2), {P2, P1, F3, F2}},
- {"fcmp.nge.s3", f2, OpRaRbTaSf (4, 1, 0, 0, 3), {P2, P1, F3, F2}},
- {"fcmp.ord.s0", f2, OpRaRbTaSf (4, 1, 1, 0, 0), {P2, P1, F2, F3}},
- {"fcmp.ord", f2, OpRaRbTaSf (4, 1, 1, 0, 0), {P2, P1, F2, F3}, PSEUDO},
- {"fcmp.ord.s1", f2, OpRaRbTaSf (4, 1, 1, 0, 1), {P2, P1, F2, F3}},
- {"fcmp.ord.s2", f2, OpRaRbTaSf (4, 1, 1, 0, 2), {P2, P1, F2, F3}},
- {"fcmp.ord.s3", f2, OpRaRbTaSf (4, 1, 1, 0, 3), {P2, P1, F2, F3}},
- {"fcmp.gt.unc.s0", f2, OpRaRbTaSf (4, 0, 1, 1, 0), {P1, P2, F3, F2}},
- {"fcmp.gt.unc", f2, OpRaRbTaSf (4, 0, 1, 1, 0), {P1, P2, F3, F2}, PSEUDO},
- {"fcmp.gt.unc.s1", f2, OpRaRbTaSf (4, 0, 1, 1, 1), {P1, P2, F3, F2}},
- {"fcmp.gt.unc.s2", f2, OpRaRbTaSf (4, 0, 1, 1, 2), {P1, P2, F3, F2}},
- {"fcmp.gt.unc.s3", f2, OpRaRbTaSf (4, 0, 1, 1, 3), {P1, P2, F3, F2}},
- {"fcmp.ge.unc.s0", f2, OpRaRbTaSf (4, 1, 0, 1, 0), {P1, P2, F3, F2}},
- {"fcmp.ge.unc", f2, OpRaRbTaSf (4, 1, 0, 1, 0), {P1, P2, F3, F2}, PSEUDO},
- {"fcmp.ge.unc.s1", f2, OpRaRbTaSf (4, 1, 0, 1, 1), {P1, P2, F3, F2}},
- {"fcmp.ge.unc.s2", f2, OpRaRbTaSf (4, 1, 0, 1, 2), {P1, P2, F3, F2}},
- {"fcmp.ge.unc.s3", f2, OpRaRbTaSf (4, 1, 0, 1, 3), {P1, P2, F3, F2}},
- {"fcmp.neq.unc.s0", f2, OpRaRbTaSf (4, 0, 0, 1, 0), {P2, P1, F2, F3}},
- {"fcmp.neq.unc", f2, OpRaRbTaSf (4, 0, 0, 1, 0), {P2, P1, F2, F3}, PSEUDO},
- {"fcmp.neq.unc.s1", f2, OpRaRbTaSf (4, 0, 0, 1, 1), {P2, P1, F2, F3}},
- {"fcmp.neq.unc.s2", f2, OpRaRbTaSf (4, 0, 0, 1, 2), {P2, P1, F2, F3}},
- {"fcmp.neq.unc.s3", f2, OpRaRbTaSf (4, 0, 0, 1, 3), {P2, P1, F2, F3}},
- {"fcmp.nlt.unc.s0", f2, OpRaRbTaSf (4, 0, 1, 1, 0), {P2, P1, F2, F3}},
- {"fcmp.nlt.unc", f2, OpRaRbTaSf (4, 0, 1, 1, 0), {P2, P1, F2, F3}, PSEUDO},
- {"fcmp.nlt.unc.s1", f2, OpRaRbTaSf (4, 0, 1, 1, 1), {P2, P1, F2, F3}},
- {"fcmp.nlt.unc.s2", f2, OpRaRbTaSf (4, 0, 1, 1, 2), {P2, P1, F2, F3}},
- {"fcmp.nlt.unc.s3", f2, OpRaRbTaSf (4, 0, 1, 1, 3), {P2, P1, F2, F3}},
- {"fcmp.nle.unc.s0", f2, OpRaRbTaSf (4, 1, 0, 1, 0), {P2, P1, F2, F3}},
- {"fcmp.nle.unc", f2, OpRaRbTaSf (4, 1, 0, 1, 0), {P2, P1, F2, F3}, PSEUDO},
- {"fcmp.nle.unc.s1", f2, OpRaRbTaSf (4, 1, 0, 1, 1), {P2, P1, F2, F3}},
- {"fcmp.nle.unc.s2", f2, OpRaRbTaSf (4, 1, 0, 1, 2), {P2, P1, F2, F3}},
- {"fcmp.nle.unc.s3", f2, OpRaRbTaSf (4, 1, 0, 1, 3), {P2, P1, F2, F3}},
- {"fcmp.ngt.unc.s0", f2, OpRaRbTaSf (4, 0, 1, 1, 0), {P2, P1, F3, F2}},
- {"fcmp.ngt.unc", f2, OpRaRbTaSf (4, 0, 1, 1, 0), {P2, P1, F3, F2}, PSEUDO},
- {"fcmp.ngt.unc.s1", f2, OpRaRbTaSf (4, 0, 1, 1, 1), {P2, P1, F3, F2}},
- {"fcmp.ngt.unc.s2", f2, OpRaRbTaSf (4, 0, 1, 1, 2), {P2, P1, F3, F2}},
- {"fcmp.ngt.unc.s3", f2, OpRaRbTaSf (4, 0, 1, 1, 3), {P2, P1, F3, F2}},
- {"fcmp.nge.unc.s0", f2, OpRaRbTaSf (4, 1, 0, 1, 0), {P2, P1, F3, F2}},
- {"fcmp.nge.unc", f2, OpRaRbTaSf (4, 1, 0, 1, 0), {P2, P1, F3, F2}, PSEUDO},
- {"fcmp.nge.unc.s1", f2, OpRaRbTaSf (4, 1, 0, 1, 1), {P2, P1, F3, F2}},
- {"fcmp.nge.unc.s2", f2, OpRaRbTaSf (4, 1, 0, 1, 2), {P2, P1, F3, F2}},
- {"fcmp.nge.unc.s3", f2, OpRaRbTaSf (4, 1, 0, 1, 3), {P2, P1, F3, F2}},
- {"fcmp.ord.unc.s0", f2, OpRaRbTaSf (4, 1, 1, 1, 0), {P2, P1, F2, F3}},
- {"fcmp.ord.unc", f2, OpRaRbTaSf (4, 1, 1, 1, 0), {P2, P1, F2, F3}, PSEUDO},
- {"fcmp.ord.unc.s1", f2, OpRaRbTaSf (4, 1, 1, 1, 1), {P2, P1, F2, F3}},
- {"fcmp.ord.unc.s2", f2, OpRaRbTaSf (4, 1, 1, 1, 2), {P2, P1, F2, F3}},
- {"fcmp.ord.unc.s3", f2, OpRaRbTaSf (4, 1, 1, 1, 3), {P2, P1, F2, F3}},
-
- {"fclass.m", f2, OpTa (5, 0), {P1, P2, F2, IMMU9}},
- {"fclass.nm", f2, OpTa (5, 0), {P2, P1, F2, IMMU9}, PSEUDO},
- {"fclass.m.unc", f2, OpTa (5, 1), {P1, P2, F2, IMMU9}},
- {"fclass.nm.unc", f2, OpTa (5, 1), {P2, P1, F2, IMMU9}, PSEUDO},
+ {"fcmp.gt.s0", f2, OpRaRbTaSf (4, 0, 1, 0, 0), {P1, P2, F3, F2}, EMPTY},
+ {"fcmp.gt", f2, OpRaRbTaSf (4, 0, 1, 0, 0), {P1, P2, F3, F2}, PSEUDO, 0, NULL},
+ {"fcmp.gt.s1", f2, OpRaRbTaSf (4, 0, 1, 0, 1), {P1, P2, F3, F2}, EMPTY},
+ {"fcmp.gt.s2", f2, OpRaRbTaSf (4, 0, 1, 0, 2), {P1, P2, F3, F2}, EMPTY},
+ {"fcmp.gt.s3", f2, OpRaRbTaSf (4, 0, 1, 0, 3), {P1, P2, F3, F2}, EMPTY},
+ {"fcmp.ge.s0", f2, OpRaRbTaSf (4, 1, 0, 0, 0), {P1, P2, F3, F2}, EMPTY},
+ {"fcmp.ge", f2, OpRaRbTaSf (4, 1, 0, 0, 0), {P1, P2, F3, F2}, PSEUDO, 0, NULL},
+ {"fcmp.ge.s1", f2, OpRaRbTaSf (4, 1, 0, 0, 1), {P1, P2, F3, F2}, EMPTY},
+ {"fcmp.ge.s2", f2, OpRaRbTaSf (4, 1, 0, 0, 2), {P1, P2, F3, F2}, EMPTY},
+ {"fcmp.ge.s3", f2, OpRaRbTaSf (4, 1, 0, 0, 3), {P1, P2, F3, F2}, EMPTY},
+ {"fcmp.neq.s0", f2, OpRaRbTaSf (4, 0, 0, 0, 0), {P2, P1, F2, F3}, EMPTY},
+ {"fcmp.neq", f2, OpRaRbTaSf (4, 0, 0, 0, 0), {P2, P1, F2, F3}, PSEUDO, 0, NULL},
+ {"fcmp.neq.s1", f2, OpRaRbTaSf (4, 0, 0, 0, 1), {P2, P1, F2, F3}, EMPTY},
+ {"fcmp.neq.s2", f2, OpRaRbTaSf (4, 0, 0, 0, 2), {P2, P1, F2, F3}, EMPTY},
+ {"fcmp.neq.s3", f2, OpRaRbTaSf (4, 0, 0, 0, 3), {P2, P1, F2, F3}, EMPTY},
+ {"fcmp.nlt.s0", f2, OpRaRbTaSf (4, 0, 1, 0, 0), {P2, P1, F2, F3}, EMPTY},
+ {"fcmp.nlt", f2, OpRaRbTaSf (4, 0, 1, 0, 0), {P2, P1, F2, F3}, PSEUDO, 0, NULL},
+ {"fcmp.nlt.s1", f2, OpRaRbTaSf (4, 0, 1, 0, 1), {P2, P1, F2, F3}, EMPTY},
+ {"fcmp.nlt.s2", f2, OpRaRbTaSf (4, 0, 1, 0, 2), {P2, P1, F2, F3}, EMPTY},
+ {"fcmp.nlt.s3", f2, OpRaRbTaSf (4, 0, 1, 0, 3), {P2, P1, F2, F3}, EMPTY},
+ {"fcmp.nle.s0", f2, OpRaRbTaSf (4, 1, 0, 0, 0), {P2, P1, F2, F3}, EMPTY},
+ {"fcmp.nle", f2, OpRaRbTaSf (4, 1, 0, 0, 0), {P2, P1, F2, F3}, PSEUDO, 0, NULL},
+ {"fcmp.nle.s1", f2, OpRaRbTaSf (4, 1, 0, 0, 1), {P2, P1, F2, F3}, EMPTY},
+ {"fcmp.nle.s2", f2, OpRaRbTaSf (4, 1, 0, 0, 2), {P2, P1, F2, F3}, EMPTY},
+ {"fcmp.nle.s3", f2, OpRaRbTaSf (4, 1, 0, 0, 3), {P2, P1, F2, F3}, EMPTY},
+ {"fcmp.ngt.s0", f2, OpRaRbTaSf (4, 0, 1, 0, 0), {P2, P1, F3, F2}, EMPTY},
+ {"fcmp.ngt", f2, OpRaRbTaSf (4, 0, 1, 0, 0), {P2, P1, F3, F2}, PSEUDO, 0, NULL},
+ {"fcmp.ngt.s1", f2, OpRaRbTaSf (4, 0, 1, 0, 1), {P2, P1, F3, F2}, EMPTY},
+ {"fcmp.ngt.s2", f2, OpRaRbTaSf (4, 0, 1, 0, 2), {P2, P1, F3, F2}, EMPTY},
+ {"fcmp.ngt.s3", f2, OpRaRbTaSf (4, 0, 1, 0, 3), {P2, P1, F3, F2}, EMPTY},
+ {"fcmp.nge.s0", f2, OpRaRbTaSf (4, 1, 0, 0, 0), {P2, P1, F3, F2}, EMPTY},
+ {"fcmp.nge", f2, OpRaRbTaSf (4, 1, 0, 0, 0), {P2, P1, F3, F2}, PSEUDO, 0, NULL},
+ {"fcmp.nge.s1", f2, OpRaRbTaSf (4, 1, 0, 0, 1), {P2, P1, F3, F2}, EMPTY},
+ {"fcmp.nge.s2", f2, OpRaRbTaSf (4, 1, 0, 0, 2), {P2, P1, F3, F2}, EMPTY},
+ {"fcmp.nge.s3", f2, OpRaRbTaSf (4, 1, 0, 0, 3), {P2, P1, F3, F2}, EMPTY},
+ {"fcmp.ord.s0", f2, OpRaRbTaSf (4, 1, 1, 0, 0), {P2, P1, F2, F3}, EMPTY},
+ {"fcmp.ord", f2, OpRaRbTaSf (4, 1, 1, 0, 0), {P2, P1, F2, F3}, PSEUDO, 0, NULL},
+ {"fcmp.ord.s1", f2, OpRaRbTaSf (4, 1, 1, 0, 1), {P2, P1, F2, F3}, EMPTY},
+ {"fcmp.ord.s2", f2, OpRaRbTaSf (4, 1, 1, 0, 2), {P2, P1, F2, F3}, EMPTY},
+ {"fcmp.ord.s3", f2, OpRaRbTaSf (4, 1, 1, 0, 3), {P2, P1, F2, F3}, EMPTY},
+ {"fcmp.gt.unc.s0", f2, OpRaRbTaSf (4, 0, 1, 1, 0), {P1, P2, F3, F2}, EMPTY},
+ {"fcmp.gt.unc", f2, OpRaRbTaSf (4, 0, 1, 1, 0), {P1, P2, F3, F2}, PSEUDO, 0, NULL},
+ {"fcmp.gt.unc.s1", f2, OpRaRbTaSf (4, 0, 1, 1, 1), {P1, P2, F3, F2}, EMPTY},
+ {"fcmp.gt.unc.s2", f2, OpRaRbTaSf (4, 0, 1, 1, 2), {P1, P2, F3, F2}, EMPTY},
+ {"fcmp.gt.unc.s3", f2, OpRaRbTaSf (4, 0, 1, 1, 3), {P1, P2, F3, F2}, EMPTY},
+ {"fcmp.ge.unc.s0", f2, OpRaRbTaSf (4, 1, 0, 1, 0), {P1, P2, F3, F2}, EMPTY},
+ {"fcmp.ge.unc", f2, OpRaRbTaSf (4, 1, 0, 1, 0), {P1, P2, F3, F2}, PSEUDO, 0, NULL},
+ {"fcmp.ge.unc.s1", f2, OpRaRbTaSf (4, 1, 0, 1, 1), {P1, P2, F3, F2}, EMPTY},
+ {"fcmp.ge.unc.s2", f2, OpRaRbTaSf (4, 1, 0, 1, 2), {P1, P2, F3, F2}, EMPTY},
+ {"fcmp.ge.unc.s3", f2, OpRaRbTaSf (4, 1, 0, 1, 3), {P1, P2, F3, F2}, EMPTY},
+ {"fcmp.neq.unc.s0", f2, OpRaRbTaSf (4, 0, 0, 1, 0), {P2, P1, F2, F3}, EMPTY},
+ {"fcmp.neq.unc", f2, OpRaRbTaSf (4, 0, 0, 1, 0), {P2, P1, F2, F3}, PSEUDO, 0, NULL},
+ {"fcmp.neq.unc.s1", f2, OpRaRbTaSf (4, 0, 0, 1, 1), {P2, P1, F2, F3}, EMPTY},
+ {"fcmp.neq.unc.s2", f2, OpRaRbTaSf (4, 0, 0, 1, 2), {P2, P1, F2, F3}, EMPTY},
+ {"fcmp.neq.unc.s3", f2, OpRaRbTaSf (4, 0, 0, 1, 3), {P2, P1, F2, F3}, EMPTY},
+ {"fcmp.nlt.unc.s0", f2, OpRaRbTaSf (4, 0, 1, 1, 0), {P2, P1, F2, F3}, EMPTY},
+ {"fcmp.nlt.unc", f2, OpRaRbTaSf (4, 0, 1, 1, 0), {P2, P1, F2, F3}, PSEUDO, 0, NULL},
+ {"fcmp.nlt.unc.s1", f2, OpRaRbTaSf (4, 0, 1, 1, 1), {P2, P1, F2, F3}, EMPTY},
+ {"fcmp.nlt.unc.s2", f2, OpRaRbTaSf (4, 0, 1, 1, 2), {P2, P1, F2, F3}, EMPTY},
+ {"fcmp.nlt.unc.s3", f2, OpRaRbTaSf (4, 0, 1, 1, 3), {P2, P1, F2, F3}, EMPTY},
+ {"fcmp.nle.unc.s0", f2, OpRaRbTaSf (4, 1, 0, 1, 0), {P2, P1, F2, F3}, EMPTY},
+ {"fcmp.nle.unc", f2, OpRaRbTaSf (4, 1, 0, 1, 0), {P2, P1, F2, F3}, PSEUDO, 0, NULL},
+ {"fcmp.nle.unc.s1", f2, OpRaRbTaSf (4, 1, 0, 1, 1), {P2, P1, F2, F3}, EMPTY},
+ {"fcmp.nle.unc.s2", f2, OpRaRbTaSf (4, 1, 0, 1, 2), {P2, P1, F2, F3}, EMPTY},
+ {"fcmp.nle.unc.s3", f2, OpRaRbTaSf (4, 1, 0, 1, 3), {P2, P1, F2, F3}, EMPTY},
+ {"fcmp.ngt.unc.s0", f2, OpRaRbTaSf (4, 0, 1, 1, 0), {P2, P1, F3, F2}, EMPTY},
+ {"fcmp.ngt.unc", f2, OpRaRbTaSf (4, 0, 1, 1, 0), {P2, P1, F3, F2}, PSEUDO, 0, NULL},
+ {"fcmp.ngt.unc.s1", f2, OpRaRbTaSf (4, 0, 1, 1, 1), {P2, P1, F3, F2}, EMPTY},
+ {"fcmp.ngt.unc.s2", f2, OpRaRbTaSf (4, 0, 1, 1, 2), {P2, P1, F3, F2}, EMPTY},
+ {"fcmp.ngt.unc.s3", f2, OpRaRbTaSf (4, 0, 1, 1, 3), {P2, P1, F3, F2}, EMPTY},
+ {"fcmp.nge.unc.s0", f2, OpRaRbTaSf (4, 1, 0, 1, 0), {P2, P1, F3, F2}, EMPTY},
+ {"fcmp.nge.unc", f2, OpRaRbTaSf (4, 1, 0, 1, 0), {P2, P1, F3, F2}, PSEUDO, 0, NULL},
+ {"fcmp.nge.unc.s1", f2, OpRaRbTaSf (4, 1, 0, 1, 1), {P2, P1, F3, F2}, EMPTY},
+ {"fcmp.nge.unc.s2", f2, OpRaRbTaSf (4, 1, 0, 1, 2), {P2, P1, F3, F2}, EMPTY},
+ {"fcmp.nge.unc.s3", f2, OpRaRbTaSf (4, 1, 0, 1, 3), {P2, P1, F3, F2}, EMPTY},
+ {"fcmp.ord.unc.s0", f2, OpRaRbTaSf (4, 1, 1, 1, 0), {P2, P1, F2, F3}, EMPTY},
+ {"fcmp.ord.unc", f2, OpRaRbTaSf (4, 1, 1, 1, 0), {P2, P1, F2, F3}, PSEUDO, 0, NULL},
+ {"fcmp.ord.unc.s1", f2, OpRaRbTaSf (4, 1, 1, 1, 1), {P2, P1, F2, F3}, EMPTY},
+ {"fcmp.ord.unc.s2", f2, OpRaRbTaSf (4, 1, 1, 1, 2), {P2, P1, F2, F3}, EMPTY},
+ {"fcmp.ord.unc.s3", f2, OpRaRbTaSf (4, 1, 1, 1, 3), {P2, P1, F2, F3}, EMPTY},
+
+ {"fclass.m", f2, OpTa (5, 0), {P1, P2, F2, IMMU9}, EMPTY},
+ {"fclass.nm", f2, OpTa (5, 0), {P2, P1, F2, IMMU9}, PSEUDO, 0, NULL},
+ {"fclass.m.unc", f2, OpTa (5, 1), {P1, P2, F2, IMMU9}, EMPTY},
+ {"fclass.nm.unc", f2, OpTa (5, 1), {P2, P1, F2, IMMU9}, PSEUDO, 0, NULL},
/* note: fnorm and fcvt.xuf have identical encodings! */
- {"fnorm.s0", f, OpXaSfF2F4 (0x8, 0, 0, 0, 1), {F1, F3}, PSEUDO},
- {"fnorm", f, OpXaSfF2F4 (0x8, 0, 0, 0, 1), {F1, F3}, PSEUDO},
- {"fnorm.s1", f, OpXaSfF2F4 (0x8, 0, 1, 0, 1), {F1, F3}, PSEUDO},
- {"fnorm.s2", f, OpXaSfF2F4 (0x8, 0, 2, 0, 1), {F1, F3}, PSEUDO},
- {"fnorm.s3", f, OpXaSfF2F4 (0x8, 0, 3, 0, 1), {F1, F3}, PSEUDO},
- {"fnorm.s.s0", f, OpXaSfF2F4 (0x8, 1, 0, 0, 1), {F1, F3}, PSEUDO},
- {"fnorm.s", f, OpXaSfF2F4 (0x8, 1, 0, 0, 1), {F1, F3}, PSEUDO},
- {"fnorm.s.s1", f, OpXaSfF2F4 (0x8, 1, 1, 0, 1), {F1, F3}, PSEUDO},
- {"fnorm.s.s2", f, OpXaSfF2F4 (0x8, 1, 2, 0, 1), {F1, F3}, PSEUDO},
- {"fnorm.s.s3", f, OpXaSfF2F4 (0x8, 1, 3, 0, 1), {F1, F3}, PSEUDO},
- {"fcvt.xuf.s0", f, OpXaSfF2F4 (0x8, 0, 0, 0, 1), {F1, F3}, PSEUDO},
- {"fcvt.xuf", f, OpXaSfF2F4 (0x8, 0, 0, 0, 1), {F1, F3}, PSEUDO},
- {"fcvt.xuf.s1", f, OpXaSfF2F4 (0x8, 0, 1, 0, 1), {F1, F3}, PSEUDO},
- {"fcvt.xuf.s2", f, OpXaSfF2F4 (0x8, 0, 2, 0, 1), {F1, F3}, PSEUDO},
- {"fcvt.xuf.s3", f, OpXaSfF2F4 (0x8, 0, 3, 0, 1), {F1, F3}, PSEUDO},
- {"fcvt.xuf.s.s0", f, OpXaSfF2F4 (0x8, 1, 0, 0, 1), {F1, F3}, PSEUDO},
- {"fcvt.xuf.s", f, OpXaSfF2F4 (0x8, 1, 0, 0, 1), {F1, F3}, PSEUDO},
- {"fcvt.xuf.s.s1", f, OpXaSfF2F4 (0x8, 1, 1, 0, 1), {F1, F3}, PSEUDO},
- {"fcvt.xuf.s.s2", f, OpXaSfF2F4 (0x8, 1, 2, 0, 1), {F1, F3}, PSEUDO},
- {"fcvt.xuf.s.s3", f, OpXaSfF2F4 (0x8, 1, 3, 0, 1), {F1, F3}, PSEUDO},
- {"fadd.s0", f, OpXaSfF4 (0x8, 0, 0, 1), {F1, F3, F2}, PSEUDO},
- {"fadd", f, OpXaSfF4 (0x8, 0, 0, 1), {F1, F3, F2}, PSEUDO},
- {"fadd.s1", f, OpXaSfF4 (0x8, 0, 1, 1), {F1, F3, F2}, PSEUDO},
- {"fadd.s2", f, OpXaSfF4 (0x8, 0, 2, 1), {F1, F3, F2}, PSEUDO},
- {"fadd.s3", f, OpXaSfF4 (0x8, 0, 3, 1), {F1, F3, F2}, PSEUDO},
- {"fadd.s.s0", f, OpXaSfF4 (0x8, 1, 0, 1), {F1, F3, F2}, PSEUDO},
- {"fadd.s", f, OpXaSfF4 (0x8, 1, 0, 1), {F1, F3, F2}, PSEUDO},
- {"fadd.s.s1", f, OpXaSfF4 (0x8, 1, 1, 1), {F1, F3, F2}, PSEUDO},
- {"fadd.s.s2", f, OpXaSfF4 (0x8, 1, 2, 1), {F1, F3, F2}, PSEUDO},
- {"fadd.s.s3", f, OpXaSfF4 (0x8, 1, 3, 1), {F1, F3, F2}, PSEUDO},
- {"fmpy.s0", f, OpXaSfF2 (0x8, 0, 0, 0), {F1, F3, F4}, PSEUDO},
- {"fmpy", f, OpXaSfF2 (0x8, 0, 0, 0), {F1, F3, F4}, PSEUDO},
- {"fmpy.s1", f, OpXaSfF2 (0x8, 0, 1, 0), {F1, F3, F4}, PSEUDO},
- {"fmpy.s2", f, OpXaSfF2 (0x8, 0, 2, 0), {F1, F3, F4}, PSEUDO},
- {"fmpy.s3", f, OpXaSfF2 (0x8, 0, 3, 0), {F1, F3, F4}, PSEUDO},
- {"fmpy.s.s0", f, OpXaSfF2 (0x8, 1, 0, 0), {F1, F3, F4}, PSEUDO},
- {"fmpy.s", f, OpXaSfF2 (0x8, 1, 0, 0), {F1, F3, F4}, PSEUDO},
- {"fmpy.s.s1", f, OpXaSfF2 (0x8, 1, 1, 0), {F1, F3, F4}, PSEUDO},
- {"fmpy.s.s2", f, OpXaSfF2 (0x8, 1, 2, 0), {F1, F3, F4}, PSEUDO},
- {"fmpy.s.s3", f, OpXaSfF2 (0x8, 1, 3, 0), {F1, F3, F4}, PSEUDO},
- {"fma.s0", f, OpXaSf (0x8, 0, 0), {F1, F3, F4, F2}},
- {"fma", f, OpXaSf (0x8, 0, 0), {F1, F3, F4, F2}, PSEUDO},
- {"fma.s1", f, OpXaSf (0x8, 0, 1), {F1, F3, F4, F2}},
- {"fma.s2", f, OpXaSf (0x8, 0, 2), {F1, F3, F4, F2}},
- {"fma.s3", f, OpXaSf (0x8, 0, 3), {F1, F3, F4, F2}},
- {"fma.s.s0", f, OpXaSf (0x8, 1, 0), {F1, F3, F4, F2}},
- {"fma.s", f, OpXaSf (0x8, 1, 0), {F1, F3, F4, F2}, PSEUDO},
- {"fma.s.s1", f, OpXaSf (0x8, 1, 1), {F1, F3, F4, F2}},
- {"fma.s.s2", f, OpXaSf (0x8, 1, 2), {F1, F3, F4, F2}},
- {"fma.s.s3", f, OpXaSf (0x8, 1, 3), {F1, F3, F4, F2}},
-
- {"fnorm.d.s0", f, OpXaSfF2F4 (0x9, 0, 0, 0, 1), {F1, F3}, PSEUDO},
- {"fnorm.d", f, OpXaSfF2F4 (0x9, 0, 0, 0, 1), {F1, F3}, PSEUDO},
- {"fnorm.d.s1", f, OpXaSfF2F4 (0x9, 0, 1, 0, 1), {F1, F3}, PSEUDO},
- {"fnorm.d.s2", f, OpXaSfF2F4 (0x9, 0, 2, 0, 1), {F1, F3}, PSEUDO},
- {"fnorm.d.s3", f, OpXaSfF2F4 (0x9, 0, 3, 0, 1), {F1, F3}, PSEUDO},
- {"fcvt.xuf.d.s0", f, OpXaSfF2F4 (0x9, 0, 0, 0, 1), {F1, F3}, PSEUDO},
- {"fcvt.xuf.d", f, OpXaSfF2F4 (0x9, 0, 0, 0, 1), {F1, F3}, PSEUDO},
- {"fcvt.xuf.d.s1", f, OpXaSfF2F4 (0x9, 0, 1, 0, 1), {F1, F3}, PSEUDO},
- {"fcvt.xuf.d.s2", f, OpXaSfF2F4 (0x9, 0, 2, 0, 1), {F1, F3}, PSEUDO},
- {"fcvt.xuf.d.s3", f, OpXaSfF2F4 (0x9, 0, 3, 0, 1), {F1, F3}, PSEUDO},
- {"fadd.d.s0", f, OpXaSfF4 (0x9, 0, 0, 1), {F1, F3, F2}, PSEUDO},
- {"fadd.d", f, OpXaSfF4 (0x9, 0, 0, 1), {F1, F3, F2}, PSEUDO},
- {"fadd.d.s1", f, OpXaSfF4 (0x9, 0, 1, 1), {F1, F3, F2}, PSEUDO},
- {"fadd.d.s2", f, OpXaSfF4 (0x9, 0, 2, 1), {F1, F3, F2}, PSEUDO},
- {"fadd.d.s3", f, OpXaSfF4 (0x9, 0, 3, 1), {F1, F3, F2}, PSEUDO},
- {"fmpy.d.s0", f, OpXaSfF2 (0x9, 0, 0, 0), {F1, F3, F4}, PSEUDO},
- {"fmpy.d", f, OpXaSfF2 (0x9, 0, 0, 0), {F1, F3, F4}, PSEUDO},
- {"fmpy.d.s1", f, OpXaSfF2 (0x9, 0, 1, 0), {F1, F3, F4}, PSEUDO},
- {"fmpy.d.s2", f, OpXaSfF2 (0x9, 0, 2, 0), {F1, F3, F4}, PSEUDO},
- {"fmpy.d.s3", f, OpXaSfF2 (0x9, 0, 3, 0), {F1, F3, F4}, PSEUDO},
- {"fma.d.s0", f, OpXaSf (0x9, 0, 0), {F1, F3, F4, F2}},
- {"fma.d", f, OpXaSf (0x9, 0, 0), {F1, F3, F4, F2}, PSEUDO},
- {"fma.d.s1", f, OpXaSf (0x9, 0, 1), {F1, F3, F4, F2}},
- {"fma.d.s2", f, OpXaSf (0x9, 0, 2), {F1, F3, F4, F2}},
- {"fma.d.s3", f, OpXaSf (0x9, 0, 3), {F1, F3, F4, F2}},
-
- {"fpmpy.s0", f, OpXaSfF2 (0x9, 1, 0, 0), {F1, F3, F4}, PSEUDO},
- {"fpmpy", f, OpXaSfF2 (0x9, 1, 0, 0), {F1, F3, F4}, PSEUDO},
- {"fpmpy.s1", f, OpXaSfF2 (0x9, 1, 1, 0), {F1, F3, F4}, PSEUDO},
- {"fpmpy.s2", f, OpXaSfF2 (0x9, 1, 2, 0), {F1, F3, F4}, PSEUDO},
- {"fpmpy.s3", f, OpXaSfF2 (0x9, 1, 3, 0), {F1, F3, F4}, PSEUDO},
- {"fpma.s0", f, OpXaSf (0x9, 1, 0), {F1, F3, F4, F2}},
- {"fpma", f, OpXaSf (0x9, 1, 0), {F1, F3, F4, F2}, PSEUDO},
- {"fpma.s1", f, OpXaSf (0x9, 1, 1), {F1, F3, F4, F2}},
- {"fpma.s2", f, OpXaSf (0x9, 1, 2), {F1, F3, F4, F2}},
- {"fpma.s3", f, OpXaSf (0x9, 1, 3), {F1, F3, F4, F2}},
-
- {"fsub.s0", f, OpXaSfF4 (0xa, 0, 0, 1), {F1, F3, F2}, PSEUDO},
- {"fsub", f, OpXaSfF4 (0xa, 0, 0, 1), {F1, F3, F2}, PSEUDO},
- {"fsub.s1", f, OpXaSfF4 (0xa, 0, 1, 1), {F1, F3, F2}, PSEUDO},
- {"fsub.s2", f, OpXaSfF4 (0xa, 0, 2, 1), {F1, F3, F2}, PSEUDO},
- {"fsub.s3", f, OpXaSfF4 (0xa, 0, 3, 1), {F1, F3, F2}, PSEUDO},
- {"fsub.s.s0", f, OpXaSfF4 (0xa, 1, 0, 1), {F1, F3, F2}, PSEUDO},
- {"fsub.s", f, OpXaSfF4 (0xa, 1, 0, 1), {F1, F3, F2}, PSEUDO},
- {"fsub.s.s1", f, OpXaSfF4 (0xa, 1, 1, 1), {F1, F3, F2}, PSEUDO},
- {"fsub.s.s2", f, OpXaSfF4 (0xa, 1, 2, 1), {F1, F3, F2}, PSEUDO},
- {"fsub.s.s3", f, OpXaSfF4 (0xa, 1, 3, 1), {F1, F3, F2}, PSEUDO},
- {"fms.s0", f, OpXaSf (0xa, 0, 0), {F1, F3, F4, F2}},
- {"fms", f, OpXaSf (0xa, 0, 0), {F1, F3, F4, F2}, PSEUDO},
- {"fms.s1", f, OpXaSf (0xa, 0, 1), {F1, F3, F4, F2}},
- {"fms.s2", f, OpXaSf (0xa, 0, 2), {F1, F3, F4, F2}},
- {"fms.s3", f, OpXaSf (0xa, 0, 3), {F1, F3, F4, F2}},
- {"fms.s.s0", f, OpXaSf (0xa, 1, 0), {F1, F3, F4, F2}},
- {"fms.s", f, OpXaSf (0xa, 1, 0), {F1, F3, F4, F2}, PSEUDO},
- {"fms.s.s1", f, OpXaSf (0xa, 1, 1), {F1, F3, F4, F2}},
- {"fms.s.s2", f, OpXaSf (0xa, 1, 2), {F1, F3, F4, F2}},
- {"fms.s.s3", f, OpXaSf (0xa, 1, 3), {F1, F3, F4, F2}},
- {"fsub.d.s0", f, OpXaSfF4 (0xb, 0, 0, 1), {F1, F3, F2}, PSEUDO},
- {"fsub.d", f, OpXaSfF4 (0xb, 0, 0, 1), {F1, F3, F2}, PSEUDO},
- {"fsub.d.s1", f, OpXaSfF4 (0xb, 0, 1, 1), {F1, F3, F2}, PSEUDO},
- {"fsub.d.s2", f, OpXaSfF4 (0xb, 0, 2, 1), {F1, F3, F2}, PSEUDO},
- {"fsub.d.s3", f, OpXaSfF4 (0xb, 0, 3, 1), {F1, F3, F2}, PSEUDO},
- {"fms.d.s0", f, OpXaSf (0xb, 0, 0), {F1, F3, F4, F2}},
- {"fms.d", f, OpXaSf (0xb, 0, 0), {F1, F3, F4, F2}, PSEUDO},
- {"fms.d.s1", f, OpXaSf (0xb, 0, 1), {F1, F3, F4, F2}},
- {"fms.d.s2", f, OpXaSf (0xb, 0, 2), {F1, F3, F4, F2}},
- {"fms.d.s3", f, OpXaSf (0xb, 0, 3), {F1, F3, F4, F2}},
-
- {"fpms.s0", f, OpXaSf (0xb, 1, 0), {F1, F3, F4, F2}},
- {"fpms", f, OpXaSf (0xb, 1, 0), {F1, F3, F4, F2}, PSEUDO},
- {"fpms.s1", f, OpXaSf (0xb, 1, 1), {F1, F3, F4, F2}},
- {"fpms.s2", f, OpXaSf (0xb, 1, 2), {F1, F3, F4, F2}},
- {"fpms.s3", f, OpXaSf (0xb, 1, 3), {F1, F3, F4, F2}},
-
- {"fnmpy.s0", f, OpXaSfF2 (0xc, 0, 0, 0), {F1, F3, F4}, PSEUDO},
- {"fnmpy", f, OpXaSfF2 (0xc, 0, 0, 0), {F1, F3, F4}, PSEUDO},
- {"fnmpy.s1", f, OpXaSfF2 (0xc, 0, 1, 0), {F1, F3, F4}, PSEUDO},
- {"fnmpy.s2", f, OpXaSfF2 (0xc, 0, 2, 0), {F1, F3, F4}, PSEUDO},
- {"fnmpy.s3", f, OpXaSfF2 (0xc, 0, 3, 0), {F1, F3, F4}, PSEUDO},
- {"fnmpy.s.s0", f, OpXaSfF2 (0xc, 1, 0, 0), {F1, F3, F4}, PSEUDO},
- {"fnmpy.s", f, OpXaSfF2 (0xc, 1, 0, 0), {F1, F3, F4}, PSEUDO},
- {"fnmpy.s.s1", f, OpXaSfF2 (0xc, 1, 1, 0), {F1, F3, F4}, PSEUDO},
- {"fnmpy.s.s2", f, OpXaSfF2 (0xc, 1, 2, 0), {F1, F3, F4}, PSEUDO},
- {"fnmpy.s.s3", f, OpXaSfF2 (0xc, 1, 3, 0), {F1, F3, F4}, PSEUDO},
- {"fnma.s0", f, OpXaSf (0xc, 0, 0), {F1, F3, F4, F2}},
- {"fnma", f, OpXaSf (0xc, 0, 0), {F1, F3, F4, F2}, PSEUDO},
- {"fnma.s1", f, OpXaSf (0xc, 0, 1), {F1, F3, F4, F2}},
- {"fnma.s2", f, OpXaSf (0xc, 0, 2), {F1, F3, F4, F2}},
- {"fnma.s3", f, OpXaSf (0xc, 0, 3), {F1, F3, F4, F2}},
- {"fnma.s.s0", f, OpXaSf (0xc, 1, 0), {F1, F3, F4, F2}},
- {"fnma.s", f, OpXaSf (0xc, 1, 0), {F1, F3, F4, F2}, PSEUDO},
- {"fnma.s.s1", f, OpXaSf (0xc, 1, 1), {F1, F3, F4, F2}},
- {"fnma.s.s2", f, OpXaSf (0xc, 1, 2), {F1, F3, F4, F2}},
- {"fnma.s.s3", f, OpXaSf (0xc, 1, 3), {F1, F3, F4, F2}},
- {"fnmpy.d.s0", f, OpXaSfF2 (0xd, 0, 0, 0), {F1, F3, F4}, PSEUDO},
- {"fnmpy.d", f, OpXaSfF2 (0xd, 0, 0, 0), {F1, F3, F4}, PSEUDO},
- {"fnmpy.d.s1", f, OpXaSfF2 (0xd, 0, 1, 0), {F1, F3, F4}, PSEUDO},
- {"fnmpy.d.s2", f, OpXaSfF2 (0xd, 0, 2, 0), {F1, F3, F4}, PSEUDO},
- {"fnmpy.d.s3", f, OpXaSfF2 (0xd, 0, 3, 0), {F1, F3, F4}, PSEUDO},
- {"fnma.d.s0", f, OpXaSf (0xd, 0, 0), {F1, F3, F4, F2}},
- {"fnma.d", f, OpXaSf (0xd, 0, 0), {F1, F3, F4, F2}, PSEUDO},
- {"fnma.d.s1", f, OpXaSf (0xd, 0, 1), {F1, F3, F4, F2}},
- {"fnma.d.s2", f, OpXaSf (0xd, 0, 2), {F1, F3, F4, F2}},
- {"fnma.d.s3", f, OpXaSf (0xd, 0, 3), {F1, F3, F4, F2}},
-
- {"fpnmpy.s0", f, OpXaSfF2 (0xd, 1, 0, 0), {F1, F3, F4}, PSEUDO},
- {"fpnmpy", f, OpXaSfF2 (0xd, 1, 0, 0), {F1, F3, F4}, PSEUDO},
- {"fpnmpy.s1", f, OpXaSfF2 (0xd, 1, 1, 0), {F1, F3, F4}, PSEUDO},
- {"fpnmpy.s2", f, OpXaSfF2 (0xd, 1, 2, 0), {F1, F3, F4}, PSEUDO},
- {"fpnmpy.s3", f, OpXaSfF2 (0xd, 1, 3, 0), {F1, F3, F4}, PSEUDO},
- {"fpnma.s0", f, OpXaSf (0xd, 1, 0), {F1, F3, F4, F2}},
- {"fpnma", f, OpXaSf (0xd, 1, 0), {F1, F3, F4, F2}, PSEUDO},
- {"fpnma.s1", f, OpXaSf (0xd, 1, 1), {F1, F3, F4, F2}},
- {"fpnma.s2", f, OpXaSf (0xd, 1, 2), {F1, F3, F4, F2}},
- {"fpnma.s3", f, OpXaSf (0xd, 1, 3), {F1, F3, F4, F2}},
-
- {"xmpy.l", f, OpXaX2F2 (0xe, 1, 0, 0), {F1, F3, F4}, PSEUDO},
- {"xmpy.lu", f, OpXaX2F2 (0xe, 1, 0, 0), {F1, F3, F4}, PSEUDO},
- {"xmpy.h", f, OpXaX2F2 (0xe, 1, 3, 0), {F1, F3, F4}, PSEUDO},
- {"xmpy.hu", f, OpXaX2F2 (0xe, 1, 2, 0), {F1, F3, F4}, PSEUDO},
- {"xma.l", f, OpXaX2 (0xe, 1, 0), {F1, F3, F4, F2}},
- {"xma.lu", f, OpXaX2 (0xe, 1, 0), {F1, F3, F4, F2}, PSEUDO},
- {"xma.h", f, OpXaX2 (0xe, 1, 3), {F1, F3, F4, F2}},
- {"xma.hu", f, OpXaX2 (0xe, 1, 2), {F1, F3, F4, F2}},
-
- {"fselect", f, OpXa (0xe, 0), {F1, F3, F4, F2}},
-
- {0}
+ {"fnorm.s0", f, OpXaSfF2F4 (0x8, 0, 0, 0, 1), {F1, F3}, PSEUDO, 0, NULL},
+ {"fnorm", f, OpXaSfF2F4 (0x8, 0, 0, 0, 1), {F1, F3}, PSEUDO, 0, NULL},
+ {"fnorm.s1", f, OpXaSfF2F4 (0x8, 0, 1, 0, 1), {F1, F3}, PSEUDO, 0, NULL},
+ {"fnorm.s2", f, OpXaSfF2F4 (0x8, 0, 2, 0, 1), {F1, F3}, PSEUDO, 0, NULL},
+ {"fnorm.s3", f, OpXaSfF2F4 (0x8, 0, 3, 0, 1), {F1, F3}, PSEUDO, 0, NULL},
+ {"fnorm.s.s0", f, OpXaSfF2F4 (0x8, 1, 0, 0, 1), {F1, F3}, PSEUDO, 0, NULL},
+ {"fnorm.s", f, OpXaSfF2F4 (0x8, 1, 0, 0, 1), {F1, F3}, PSEUDO, 0, NULL},
+ {"fnorm.s.s1", f, OpXaSfF2F4 (0x8, 1, 1, 0, 1), {F1, F3}, PSEUDO, 0, NULL},
+ {"fnorm.s.s2", f, OpXaSfF2F4 (0x8, 1, 2, 0, 1), {F1, F3}, PSEUDO, 0, NULL},
+ {"fnorm.s.s3", f, OpXaSfF2F4 (0x8, 1, 3, 0, 1), {F1, F3}, PSEUDO, 0, NULL},
+ {"fcvt.xuf.s0", f, OpXaSfF2F4 (0x8, 0, 0, 0, 1), {F1, F3}, PSEUDO, 0, NULL},
+ {"fcvt.xuf", f, OpXaSfF2F4 (0x8, 0, 0, 0, 1), {F1, F3}, PSEUDO, 0, NULL},
+ {"fcvt.xuf.s1", f, OpXaSfF2F4 (0x8, 0, 1, 0, 1), {F1, F3}, PSEUDO, 0, NULL},
+ {"fcvt.xuf.s2", f, OpXaSfF2F4 (0x8, 0, 2, 0, 1), {F1, F3}, PSEUDO, 0, NULL},
+ {"fcvt.xuf.s3", f, OpXaSfF2F4 (0x8, 0, 3, 0, 1), {F1, F3}, PSEUDO, 0, NULL},
+ {"fcvt.xuf.s.s0", f, OpXaSfF2F4 (0x8, 1, 0, 0, 1), {F1, F3}, PSEUDO, 0, NULL},
+ {"fcvt.xuf.s", f, OpXaSfF2F4 (0x8, 1, 0, 0, 1), {F1, F3}, PSEUDO, 0, NULL},
+ {"fcvt.xuf.s.s1", f, OpXaSfF2F4 (0x8, 1, 1, 0, 1), {F1, F3}, PSEUDO, 0, NULL},
+ {"fcvt.xuf.s.s2", f, OpXaSfF2F4 (0x8, 1, 2, 0, 1), {F1, F3}, PSEUDO, 0, NULL},
+ {"fcvt.xuf.s.s3", f, OpXaSfF2F4 (0x8, 1, 3, 0, 1), {F1, F3}, PSEUDO, 0, NULL},
+ {"fadd.s0", f, OpXaSfF4 (0x8, 0, 0, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fadd", f, OpXaSfF4 (0x8, 0, 0, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fadd.s1", f, OpXaSfF4 (0x8, 0, 1, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fadd.s2", f, OpXaSfF4 (0x8, 0, 2, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fadd.s3", f, OpXaSfF4 (0x8, 0, 3, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fadd.s.s0", f, OpXaSfF4 (0x8, 1, 0, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fadd.s", f, OpXaSfF4 (0x8, 1, 0, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fadd.s.s1", f, OpXaSfF4 (0x8, 1, 1, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fadd.s.s2", f, OpXaSfF4 (0x8, 1, 2, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fadd.s.s3", f, OpXaSfF4 (0x8, 1, 3, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fmpy.s0", f, OpXaSfF2 (0x8, 0, 0, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fmpy", f, OpXaSfF2 (0x8, 0, 0, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fmpy.s1", f, OpXaSfF2 (0x8, 0, 1, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fmpy.s2", f, OpXaSfF2 (0x8, 0, 2, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fmpy.s3", f, OpXaSfF2 (0x8, 0, 3, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fmpy.s.s0", f, OpXaSfF2 (0x8, 1, 0, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fmpy.s", f, OpXaSfF2 (0x8, 1, 0, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fmpy.s.s1", f, OpXaSfF2 (0x8, 1, 1, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fmpy.s.s2", f, OpXaSfF2 (0x8, 1, 2, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fmpy.s.s3", f, OpXaSfF2 (0x8, 1, 3, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fma.s0", f, OpXaSf (0x8, 0, 0), {F1, F3, F4, F2}, EMPTY},
+ {"fma", f, OpXaSf (0x8, 0, 0), {F1, F3, F4, F2}, PSEUDO, 0, NULL},
+ {"fma.s1", f, OpXaSf (0x8, 0, 1), {F1, F3, F4, F2}, EMPTY},
+ {"fma.s2", f, OpXaSf (0x8, 0, 2), {F1, F3, F4, F2}, EMPTY},
+ {"fma.s3", f, OpXaSf (0x8, 0, 3), {F1, F3, F4, F2}, EMPTY},
+ {"fma.s.s0", f, OpXaSf (0x8, 1, 0), {F1, F3, F4, F2}, EMPTY},
+ {"fma.s", f, OpXaSf (0x8, 1, 0), {F1, F3, F4, F2}, PSEUDO, 0, NULL},
+ {"fma.s.s1", f, OpXaSf (0x8, 1, 1), {F1, F3, F4, F2}, EMPTY},
+ {"fma.s.s2", f, OpXaSf (0x8, 1, 2), {F1, F3, F4, F2}, EMPTY},
+ {"fma.s.s3", f, OpXaSf (0x8, 1, 3), {F1, F3, F4, F2}, EMPTY},
+
+ {"fnorm.d.s0", f, OpXaSfF2F4 (0x9, 0, 0, 0, 1), {F1, F3}, PSEUDO, 0, NULL},
+ {"fnorm.d", f, OpXaSfF2F4 (0x9, 0, 0, 0, 1), {F1, F3}, PSEUDO, 0, NULL},
+ {"fnorm.d.s1", f, OpXaSfF2F4 (0x9, 0, 1, 0, 1), {F1, F3}, PSEUDO, 0, NULL},
+ {"fnorm.d.s2", f, OpXaSfF2F4 (0x9, 0, 2, 0, 1), {F1, F3}, PSEUDO, 0, NULL},
+ {"fnorm.d.s3", f, OpXaSfF2F4 (0x9, 0, 3, 0, 1), {F1, F3}, PSEUDO, 0, NULL},
+ {"fcvt.xuf.d.s0", f, OpXaSfF2F4 (0x9, 0, 0, 0, 1), {F1, F3}, PSEUDO, 0, NULL},
+ {"fcvt.xuf.d", f, OpXaSfF2F4 (0x9, 0, 0, 0, 1), {F1, F3}, PSEUDO, 0, NULL},
+ {"fcvt.xuf.d.s1", f, OpXaSfF2F4 (0x9, 0, 1, 0, 1), {F1, F3}, PSEUDO, 0, NULL},
+ {"fcvt.xuf.d.s2", f, OpXaSfF2F4 (0x9, 0, 2, 0, 1), {F1, F3}, PSEUDO, 0, NULL},
+ {"fcvt.xuf.d.s3", f, OpXaSfF2F4 (0x9, 0, 3, 0, 1), {F1, F3}, PSEUDO, 0, NULL},
+ {"fadd.d.s0", f, OpXaSfF4 (0x9, 0, 0, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fadd.d", f, OpXaSfF4 (0x9, 0, 0, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fadd.d.s1", f, OpXaSfF4 (0x9, 0, 1, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fadd.d.s2", f, OpXaSfF4 (0x9, 0, 2, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fadd.d.s3", f, OpXaSfF4 (0x9, 0, 3, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fmpy.d.s0", f, OpXaSfF2 (0x9, 0, 0, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fmpy.d", f, OpXaSfF2 (0x9, 0, 0, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fmpy.d.s1", f, OpXaSfF2 (0x9, 0, 1, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fmpy.d.s2", f, OpXaSfF2 (0x9, 0, 2, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fmpy.d.s3", f, OpXaSfF2 (0x9, 0, 3, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fma.d.s0", f, OpXaSf (0x9, 0, 0), {F1, F3, F4, F2}, EMPTY},
+ {"fma.d", f, OpXaSf (0x9, 0, 0), {F1, F3, F4, F2}, PSEUDO, 0, NULL},
+ {"fma.d.s1", f, OpXaSf (0x9, 0, 1), {F1, F3, F4, F2}, EMPTY},
+ {"fma.d.s2", f, OpXaSf (0x9, 0, 2), {F1, F3, F4, F2}, EMPTY},
+ {"fma.d.s3", f, OpXaSf (0x9, 0, 3), {F1, F3, F4, F2}, EMPTY},
+
+ {"fpmpy.s0", f, OpXaSfF2 (0x9, 1, 0, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fpmpy", f, OpXaSfF2 (0x9, 1, 0, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fpmpy.s1", f, OpXaSfF2 (0x9, 1, 1, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fpmpy.s2", f, OpXaSfF2 (0x9, 1, 2, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fpmpy.s3", f, OpXaSfF2 (0x9, 1, 3, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fpma.s0", f, OpXaSf (0x9, 1, 0), {F1, F3, F4, F2}, EMPTY},
+ {"fpma", f, OpXaSf (0x9, 1, 0), {F1, F3, F4, F2}, PSEUDO, 0, NULL},
+ {"fpma.s1", f, OpXaSf (0x9, 1, 1), {F1, F3, F4, F2}, EMPTY},
+ {"fpma.s2", f, OpXaSf (0x9, 1, 2), {F1, F3, F4, F2}, EMPTY},
+ {"fpma.s3", f, OpXaSf (0x9, 1, 3), {F1, F3, F4, F2}, EMPTY},
+
+ {"fsub.s0", f, OpXaSfF4 (0xa, 0, 0, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fsub", f, OpXaSfF4 (0xa, 0, 0, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fsub.s1", f, OpXaSfF4 (0xa, 0, 1, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fsub.s2", f, OpXaSfF4 (0xa, 0, 2, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fsub.s3", f, OpXaSfF4 (0xa, 0, 3, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fsub.s.s0", f, OpXaSfF4 (0xa, 1, 0, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fsub.s", f, OpXaSfF4 (0xa, 1, 0, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fsub.s.s1", f, OpXaSfF4 (0xa, 1, 1, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fsub.s.s2", f, OpXaSfF4 (0xa, 1, 2, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fsub.s.s3", f, OpXaSfF4 (0xa, 1, 3, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fms.s0", f, OpXaSf (0xa, 0, 0), {F1, F3, F4, F2}, EMPTY},
+ {"fms", f, OpXaSf (0xa, 0, 0), {F1, F3, F4, F2}, PSEUDO, 0, NULL},
+ {"fms.s1", f, OpXaSf (0xa, 0, 1), {F1, F3, F4, F2}, EMPTY},
+ {"fms.s2", f, OpXaSf (0xa, 0, 2), {F1, F3, F4, F2}, EMPTY},
+ {"fms.s3", f, OpXaSf (0xa, 0, 3), {F1, F3, F4, F2}, EMPTY},
+ {"fms.s.s0", f, OpXaSf (0xa, 1, 0), {F1, F3, F4, F2}, EMPTY},
+ {"fms.s", f, OpXaSf (0xa, 1, 0), {F1, F3, F4, F2}, PSEUDO, 0, NULL},
+ {"fms.s.s1", f, OpXaSf (0xa, 1, 1), {F1, F3, F4, F2}, EMPTY},
+ {"fms.s.s2", f, OpXaSf (0xa, 1, 2), {F1, F3, F4, F2}, EMPTY},
+ {"fms.s.s3", f, OpXaSf (0xa, 1, 3), {F1, F3, F4, F2}, EMPTY},
+ {"fsub.d.s0", f, OpXaSfF4 (0xb, 0, 0, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fsub.d", f, OpXaSfF4 (0xb, 0, 0, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fsub.d.s1", f, OpXaSfF4 (0xb, 0, 1, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fsub.d.s2", f, OpXaSfF4 (0xb, 0, 2, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fsub.d.s3", f, OpXaSfF4 (0xb, 0, 3, 1), {F1, F3, F2}, PSEUDO, 0, NULL},
+ {"fms.d.s0", f, OpXaSf (0xb, 0, 0), {F1, F3, F4, F2}, EMPTY},
+ {"fms.d", f, OpXaSf (0xb, 0, 0), {F1, F3, F4, F2}, PSEUDO, 0, NULL},
+ {"fms.d.s1", f, OpXaSf (0xb, 0, 1), {F1, F3, F4, F2}, EMPTY},
+ {"fms.d.s2", f, OpXaSf (0xb, 0, 2), {F1, F3, F4, F2}, EMPTY},
+ {"fms.d.s3", f, OpXaSf (0xb, 0, 3), {F1, F3, F4, F2}, EMPTY},
+
+ {"fpms.s0", f, OpXaSf (0xb, 1, 0), {F1, F3, F4, F2}, EMPTY},
+ {"fpms", f, OpXaSf (0xb, 1, 0), {F1, F3, F4, F2}, PSEUDO, 0, NULL},
+ {"fpms.s1", f, OpXaSf (0xb, 1, 1), {F1, F3, F4, F2}, EMPTY},
+ {"fpms.s2", f, OpXaSf (0xb, 1, 2), {F1, F3, F4, F2}, EMPTY},
+ {"fpms.s3", f, OpXaSf (0xb, 1, 3), {F1, F3, F4, F2}, EMPTY},
+
+ {"fnmpy.s0", f, OpXaSfF2 (0xc, 0, 0, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fnmpy", f, OpXaSfF2 (0xc, 0, 0, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fnmpy.s1", f, OpXaSfF2 (0xc, 0, 1, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fnmpy.s2", f, OpXaSfF2 (0xc, 0, 2, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fnmpy.s3", f, OpXaSfF2 (0xc, 0, 3, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fnmpy.s.s0", f, OpXaSfF2 (0xc, 1, 0, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fnmpy.s", f, OpXaSfF2 (0xc, 1, 0, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fnmpy.s.s1", f, OpXaSfF2 (0xc, 1, 1, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fnmpy.s.s2", f, OpXaSfF2 (0xc, 1, 2, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fnmpy.s.s3", f, OpXaSfF2 (0xc, 1, 3, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fnma.s0", f, OpXaSf (0xc, 0, 0), {F1, F3, F4, F2}, EMPTY},
+ {"fnma", f, OpXaSf (0xc, 0, 0), {F1, F3, F4, F2}, PSEUDO, 0, NULL},
+ {"fnma.s1", f, OpXaSf (0xc, 0, 1), {F1, F3, F4, F2}, EMPTY},
+ {"fnma.s2", f, OpXaSf (0xc, 0, 2), {F1, F3, F4, F2}, EMPTY},
+ {"fnma.s3", f, OpXaSf (0xc, 0, 3), {F1, F3, F4, F2}, EMPTY},
+ {"fnma.s.s0", f, OpXaSf (0xc, 1, 0), {F1, F3, F4, F2}, EMPTY},
+ {"fnma.s", f, OpXaSf (0xc, 1, 0), {F1, F3, F4, F2}, PSEUDO, 0, NULL},
+ {"fnma.s.s1", f, OpXaSf (0xc, 1, 1), {F1, F3, F4, F2}, EMPTY},
+ {"fnma.s.s2", f, OpXaSf (0xc, 1, 2), {F1, F3, F4, F2}, EMPTY},
+ {"fnma.s.s3", f, OpXaSf (0xc, 1, 3), {F1, F3, F4, F2}, EMPTY},
+ {"fnmpy.d.s0", f, OpXaSfF2 (0xd, 0, 0, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fnmpy.d", f, OpXaSfF2 (0xd, 0, 0, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fnmpy.d.s1", f, OpXaSfF2 (0xd, 0, 1, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fnmpy.d.s2", f, OpXaSfF2 (0xd, 0, 2, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fnmpy.d.s3", f, OpXaSfF2 (0xd, 0, 3, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fnma.d.s0", f, OpXaSf (0xd, 0, 0), {F1, F3, F4, F2}, EMPTY},
+ {"fnma.d", f, OpXaSf (0xd, 0, 0), {F1, F3, F4, F2}, PSEUDO, 0, NULL},
+ {"fnma.d.s1", f, OpXaSf (0xd, 0, 1), {F1, F3, F4, F2}, EMPTY},
+ {"fnma.d.s2", f, OpXaSf (0xd, 0, 2), {F1, F3, F4, F2}, EMPTY},
+ {"fnma.d.s3", f, OpXaSf (0xd, 0, 3), {F1, F3, F4, F2}, EMPTY},
+
+ {"fpnmpy.s0", f, OpXaSfF2 (0xd, 1, 0, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fpnmpy", f, OpXaSfF2 (0xd, 1, 0, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fpnmpy.s1", f, OpXaSfF2 (0xd, 1, 1, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fpnmpy.s2", f, OpXaSfF2 (0xd, 1, 2, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fpnmpy.s3", f, OpXaSfF2 (0xd, 1, 3, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"fpnma.s0", f, OpXaSf (0xd, 1, 0), {F1, F3, F4, F2}, EMPTY},
+ {"fpnma", f, OpXaSf (0xd, 1, 0), {F1, F3, F4, F2}, PSEUDO, 0, NULL},
+ {"fpnma.s1", f, OpXaSf (0xd, 1, 1), {F1, F3, F4, F2}, EMPTY},
+ {"fpnma.s2", f, OpXaSf (0xd, 1, 2), {F1, F3, F4, F2}, EMPTY},
+ {"fpnma.s3", f, OpXaSf (0xd, 1, 3), {F1, F3, F4, F2}, EMPTY},
+
+ {"xmpy.l", f, OpXaX2F2 (0xe, 1, 0, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"xmpy.lu", f, OpXaX2F2 (0xe, 1, 0, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"xmpy.h", f, OpXaX2F2 (0xe, 1, 3, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"xmpy.hu", f, OpXaX2F2 (0xe, 1, 2, 0), {F1, F3, F4}, PSEUDO, 0, NULL},
+ {"xma.l", f, OpXaX2 (0xe, 1, 0), {F1, F3, F4, F2}, EMPTY},
+ {"xma.lu", f, OpXaX2 (0xe, 1, 0), {F1, F3, F4, F2}, PSEUDO, 0, NULL},
+ {"xma.h", f, OpXaX2 (0xe, 1, 3), {F1, F3, F4, F2}, EMPTY},
+ {"xma.hu", f, OpXaX2 (0xe, 1, 2), {F1, F3, F4, F2}, EMPTY},
+
+ {"fselect", f, OpXa (0xe, 0), {F1, F3, F4, F2}, EMPTY},
+
+ {NULL, 0, 0, 0, 0, {0}, 0, 0, NULL}
};
#undef f0
@@ -644,3 +648,4 @@ struct ia64_opcode ia64_opcodes_f[] =
#undef OpXbX6
#undef OpXbX6F2
#undef OpXbX6Sf
+#undef EMPTY
diff --git a/opcodes/ia64-opc-i.c b/opcodes/ia64-opc-i.c
index 899e651..8de1696 100644
--- a/opcodes/ia64-opc-i.c
+++ b/opcodes/ia64-opc-i.c
@@ -1,5 +1,5 @@
/* ia64-opc-i.c -- IA-64 `I' opcode table.
- Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of GDB, GAS, and the GNU binutils.
@@ -93,17 +93,21 @@
(bOp (a) | bX3 (b) | bXb (c) | bIh (d) | bWh (e) | bTag13 (f)), \
(mOp | mX3 | mXb | mIh | mWh | mTag13)
+/* Used to initialise unused fields in ia64_opcode struct,
+ in order to stop gcc from complaining. */
+#define EMPTY 0,0,NULL
+
struct ia64_opcode ia64_opcodes_i[] =
{
- /* I-type instruction encodings (sorted according to major opcode) */
+ /* I-type instruction encodings (sorted according to major opcode). */
- {"break.i", I0, OpX3X6 (0, 0, 0x00), {IMMU21}, X_IN_MLX},
- {"nop.i", I0, OpX3X6 (0, 0, 0x01), {IMMU21}, X_IN_MLX},
- {"chk.s.i", I0, OpX3 (0, 1), {R2, TGT25b}},
+ {"break.i", I0, OpX3X6 (0, 0, 0x00), {IMMU21}, X_IN_MLX, 0, NULL},
+ {"nop.i", I0, OpX3X6 (0, 0, 0x01), {IMMU21}, X_IN_MLX, 0, NULL},
+ {"chk.s.i", I0, OpX3 (0, 1), {R2, TGT25b}, EMPTY},
- {"mov", I, OpX3XbIhWhTag13 (0, 7, 0, 0, 1, 0), {B1, R2}, PSEUDO},
+ {"mov", I, OpX3XbIhWhTag13 (0, 7, 0, 0, 1, 0), {B1, R2}, PSEUDO, 0, NULL},
#define MOV(a,b,c,d) \
- I, OpX3XbIhWh (0, a, b, c, d), {B1, R2, TAG13b}
+ I, OpX3XbIhWh (0, a, b, c, d), {B1, R2, TAG13b}, EMPTY
{"mov.sptk", MOV (7, 0, 0, 0)},
{"mov.sptk.imp", MOV (7, 0, 1, 0)},
{"mov", MOV (7, 0, 0, 1)},
@@ -117,46 +121,46 @@ struct ia64_opcode ia64_opcodes_i[] =
{"mov.ret.dptk", MOV (7, 1, 0, 2)},
{"mov.ret.dptk.imp", MOV (7, 1, 1, 2)},
#undef MOV
- {"mov", I, OpX3X6 (0, 0, 0x31), {R1, B2}},
- {"mov", I, OpX3 (0, 3), {PR, R2, IMM17}},
- {"mov", I, OpX3 (0, 2), {PR_ROT, IMM44}},
- {"mov", I, OpX3X6 (0, 0, 0x30), {R1, IP}},
- {"mov", I, OpX3X6 (0, 0, 0x33), {R1, PR}},
- {"mov.i", I, OpX3X6 (0, 0, 0x2a), {AR3, R2}},
- {"mov.i", I, OpX3X6 (0, 0, 0x0a), {AR3, IMM8}},
- {"mov.i", I, OpX3X6 (0, 0, 0x32), {R1, AR3}},
- {"zxt1", I, OpX3X6 (0, 0, 0x10), {R1, R3}},
- {"zxt2", I, OpX3X6 (0, 0, 0x11), {R1, R3}},
- {"zxt4", I, OpX3X6 (0, 0, 0x12), {R1, R3}},
- {"sxt1", I, OpX3X6 (0, 0, 0x14), {R1, R3}},
- {"sxt2", I, OpX3X6 (0, 0, 0x15), {R1, R3}},
- {"sxt4", I, OpX3X6 (0, 0, 0x16), {R1, R3}},
- {"czx1.l", I, OpX3X6 (0, 0, 0x18), {R1, R3}},
- {"czx2.l", I, OpX3X6 (0, 0, 0x19), {R1, R3}},
- {"czx1.r", I, OpX3X6 (0, 0, 0x1c), {R1, R3}},
- {"czx2.r", I, OpX3X6 (0, 0, 0x1d), {R1, R3}},
+ {"mov", I, OpX3X6 (0, 0, 0x31), {R1, B2}, EMPTY},
+ {"mov", I, OpX3 (0, 3), {PR, R2, IMM17}, EMPTY},
+ {"mov", I, OpX3 (0, 2), {PR_ROT, IMM44}, EMPTY},
+ {"mov", I, OpX3X6 (0, 0, 0x30), {R1, IP}, EMPTY},
+ {"mov", I, OpX3X6 (0, 0, 0x33), {R1, PR}, EMPTY},
+ {"mov.i", I, OpX3X6 (0, 0, 0x2a), {AR3, R2}, EMPTY},
+ {"mov.i", I, OpX3X6 (0, 0, 0x0a), {AR3, IMM8}, EMPTY},
+ {"mov.i", I, OpX3X6 (0, 0, 0x32), {R1, AR3}, EMPTY},
+ {"zxt1", I, OpX3X6 (0, 0, 0x10), {R1, R3}, EMPTY},
+ {"zxt2", I, OpX3X6 (0, 0, 0x11), {R1, R3}, EMPTY},
+ {"zxt4", I, OpX3X6 (0, 0, 0x12), {R1, R3}, EMPTY},
+ {"sxt1", I, OpX3X6 (0, 0, 0x14), {R1, R3}, EMPTY},
+ {"sxt2", I, OpX3X6 (0, 0, 0x15), {R1, R3}, EMPTY},
+ {"sxt4", I, OpX3X6 (0, 0, 0x16), {R1, R3}, EMPTY},
+ {"czx1.l", I, OpX3X6 (0, 0, 0x18), {R1, R3}, EMPTY},
+ {"czx2.l", I, OpX3X6 (0, 0, 0x19), {R1, R3}, EMPTY},
+ {"czx1.r", I, OpX3X6 (0, 0, 0x1c), {R1, R3}, EMPTY},
+ {"czx2.r", I, OpX3X6 (0, 0, 0x1d), {R1, R3}, EMPTY},
- {"dep", I, Op (4), {R1, R2, R3, CPOS6c, LEN4}},
+ {"dep", I, Op (4), {R1, R2, R3, CPOS6c, LEN4}, EMPTY},
- {"shrp", I, OpX2X (5, 3, 0), {R1, R2, R3, CNT6}},
+ {"shrp", I, OpX2X (5, 3, 0), {R1, R2, R3, CNT6}, EMPTY},
{"shr.u", I, OpX2XYa (5, 1, 0, 0), {R1, R3, POS6},
- PSEUDO | LEN_EQ_64MCNT},
- {"extr.u", I, OpX2XYa (5, 1, 0, 0), {R1, R3, POS6, LEN6}},
+ PSEUDO | LEN_EQ_64MCNT, 0, NULL},
+ {"extr.u", I, OpX2XYa (5, 1, 0, 0), {R1, R3, POS6, LEN6}, EMPTY},
{"shr", I, OpX2XYa (5, 1, 0, 1), {R1, R3, POS6},
- PSEUDO | LEN_EQ_64MCNT},
- {"extr", I, OpX2XYa (5, 1, 0, 1), {R1, R3, POS6, LEN6}},
+ PSEUDO | LEN_EQ_64MCNT, 0, NULL},
+ {"extr", I, OpX2XYa (5, 1, 0, 1), {R1, R3, POS6, LEN6}, EMPTY},
{"shl", I, OpX2XYb (5, 1, 1, 0), {R1, R2, CPOS6a},
- PSEUDO | LEN_EQ_64MCNT},
- {"dep.z", I, OpX2XYb (5, 1, 1, 0), {R1, R2, CPOS6a, LEN6}},
- {"dep.z", I, OpX2XYb (5, 1, 1, 1), {R1, IMM8, CPOS6a, LEN6}},
- {"dep", I, OpX2X (5, 3, 1), {R1, IMM1, R3, CPOS6b, LEN6}},
+ PSEUDO | LEN_EQ_64MCNT, 0, NULL},
+ {"dep.z", I, OpX2XYb (5, 1, 1, 0), {R1, R2, CPOS6a, LEN6}, EMPTY},
+ {"dep.z", I, OpX2XYb (5, 1, 1, 1), {R1, IMM8, CPOS6a, LEN6}, EMPTY},
+ {"dep", I, OpX2X (5, 3, 1), {R1, IMM1, R3, CPOS6b, LEN6}, EMPTY},
#define TBIT(a,b,c,d) \
- I2, OpX2TaTbYaC (5, 0, a, b, c, d), {P1, P2, R3, POS6}
+ I2, OpX2TaTbYaC (5, 0, a, b, c, d), {P1, P2, R3, POS6}, EMPTY
#define TBITCM(a,b,c,d) \
- I2, OpX2TaTbYaC (5, 0, a, b, c, d), {P2, P1, R3, POS6}, PSEUDO
+ I2, OpX2TaTbYaC (5, 0, a, b, c, d), {P2, P1, R3, POS6}, PSEUDO, 0, NULL
{"tbit.z", TBIT (0, 0, 0, 0)},
{"tbit.nz", TBITCM (0, 0, 0, 0)},
{"tbit.z.unc", TBIT (0, 0, 0, 1)},
@@ -175,9 +179,9 @@ struct ia64_opcode ia64_opcodes_i[] =
{"tbit.z.and.orcm", TBITCM (1, 1, 0, 1)},
#undef TBIT
#define TNAT(a,b,c,d) \
- I2, OpX2TaTbYaC (5, 0, a, b, c, d), {P1, P2, R3}
+ I2, OpX2TaTbYaC (5, 0, a, b, c, d), {P1, P2, R3}, EMPTY
#define TNATCM(a,b,c,d) \
- I2, OpX2TaTbYaC (5, 0, a, b, c, d), {P2, P1, R3}, PSEUDO
+ I2, OpX2TaTbYaC (5, 0, a, b, c, d), {P2, P1, R3}, PSEUDO, 0, NULL
{"tnat.z", TNAT (0, 0, 1, 0)},
{"tnat.nz", TNATCM (0, 0, 1, 0)},
{"tnat.z.unc", TNAT (0, 0, 1, 1)},
@@ -196,50 +200,50 @@ struct ia64_opcode ia64_opcodes_i[] =
{"tnat.z.and.orcm", TNATCM (1, 1, 1, 1)},
#undef TNAT
- {"pmpyshr2", I, OpZaZbVeX2aX2b (7, 0, 1, 0, 0, 3), {R1, R2, R3, CNT2c}},
- {"pmpyshr2.u", I, OpZaZbVeX2aX2b (7, 0, 1, 0, 0, 1), {R1, R2, R3, CNT2c}},
- {"pmpy2.r", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 2, 1, 3), {R1, R2, R3}},
- {"pmpy2.l", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 2, 3, 3), {R1, R2, R3}},
- {"mix1.r", I, OpZaZbVeX2aX2bX2c (7, 0, 0, 0, 2, 0, 2), {R1, R2, R3}},
- {"mix2.r", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 2, 0, 2), {R1, R2, R3}},
- {"mix4.r", I, OpZaZbVeX2aX2bX2c (7, 1, 0, 0, 2, 0, 2), {R1, R2, R3}},
- {"mix1.l", I, OpZaZbVeX2aX2bX2c (7, 0, 0, 0, 2, 2, 2), {R1, R2, R3}},
- {"mix2.l", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 2, 2, 2), {R1, R2, R3}},
- {"mix4.l", I, OpZaZbVeX2aX2bX2c (7, 1, 0, 0, 2, 2, 2), {R1, R2, R3}},
- {"pack2.uss", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 2, 0, 0), {R1, R2, R3}},
- {"pack2.sss", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 2, 2, 0), {R1, R2, R3}},
- {"pack4.sss", I, OpZaZbVeX2aX2bX2c (7, 1, 0, 0, 2, 2, 0), {R1, R2, R3}},
- {"unpack1.h", I, OpZaZbVeX2aX2bX2c (7, 0, 0, 0, 2, 0, 1), {R1, R2, R3}},
- {"unpack2.h", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 2, 0, 1), {R1, R2, R3}},
- {"unpack4.h", I, OpZaZbVeX2aX2bX2c (7, 1, 0, 0, 2, 0, 1), {R1, R2, R3}},
- {"unpack1.l", I, OpZaZbVeX2aX2bX2c (7, 0, 0, 0, 2, 2, 1), {R1, R2, R3}},
- {"unpack2.l", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 2, 2, 1), {R1, R2, R3}},
- {"unpack4.l", I, OpZaZbVeX2aX2bX2c (7, 1, 0, 0, 2, 2, 1), {R1, R2, R3}},
- {"pmin1.u", I, OpZaZbVeX2aX2bX2c (7, 0, 0, 0, 2, 1, 0), {R1, R2, R3}},
- {"pmax1.u", I, OpZaZbVeX2aX2bX2c (7, 0, 0, 0, 2, 1, 1), {R1, R2, R3}},
- {"pmin2", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 2, 3, 0), {R1, R2, R3}},
- {"pmax2", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 2, 3, 1), {R1, R2, R3}},
- {"psad1", I, OpZaZbVeX2aX2bX2c (7, 0, 0, 0, 2, 3, 2), {R1, R2, R3}},
- {"mux1", I, OpZaZbVeX2aX2bX2c (7, 0, 0, 0, 3, 2, 2), {R1, R2, MBTYPE4}},
- {"mux2", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 3, 2, 2), {R1, R2, MHTYPE8}},
- {"pshr2", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 0, 2, 0), {R1, R3, R2}},
- {"pshr4", I, OpZaZbVeX2aX2bX2c (7, 1, 0, 0, 0, 2, 0), {R1, R3, R2}},
- {"shr", I, OpZaZbVeX2aX2bX2c (7, 1, 1, 0, 0, 2, 0), {R1, R3, R2}},
- {"pshr2.u", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 0, 0, 0), {R1, R3, R2}},
- {"pshr4.u", I, OpZaZbVeX2aX2bX2c (7, 1, 0, 0, 0, 0, 0), {R1, R3, R2}},
- {"shr.u", I, OpZaZbVeX2aX2bX2c (7, 1, 1, 0, 0, 0, 0), {R1, R3, R2}},
- {"pshr2", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 1, 3, 0), {R1, R3, CNT5}},
- {"pshr4", I, OpZaZbVeX2aX2bX2c (7, 1, 0, 0, 1, 3, 0), {R1, R3, CNT5}},
- {"pshr2.u", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 1, 1, 0), {R1, R3, CNT5}},
- {"pshr4.u", I, OpZaZbVeX2aX2bX2c (7, 1, 0, 0, 1, 1, 0), {R1, R3, CNT5}},
- {"pshl2", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 0, 0, 1), {R1, R2, R3}},
- {"pshl4", I, OpZaZbVeX2aX2bX2c (7, 1, 0, 0, 0, 0, 1), {R1, R2, R3}},
- {"shl", I, OpZaZbVeX2aX2bX2c (7, 1, 1, 0, 0, 0, 1), {R1, R2, R3}},
- {"pshl2", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 3, 1, 1), {R1, R2, CCNT5}},
- {"pshl4", I, OpZaZbVeX2aX2bX2c (7, 1, 0, 0, 3, 1, 1), {R1, R2, CCNT5}},
- {"popcnt", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 1, 1, 2), {R1, R3}},
+ {"pmpyshr2", I, OpZaZbVeX2aX2b (7, 0, 1, 0, 0, 3), {R1, R2, R3, CNT2c}, EMPTY},
+ {"pmpyshr2.u", I, OpZaZbVeX2aX2b (7, 0, 1, 0, 0, 1), {R1, R2, R3, CNT2c}, EMPTY},
+ {"pmpy2.r", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 2, 1, 3), {R1, R2, R3}, EMPTY},
+ {"pmpy2.l", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 2, 3, 3), {R1, R2, R3}, EMPTY},
+ {"mix1.r", I, OpZaZbVeX2aX2bX2c (7, 0, 0, 0, 2, 0, 2), {R1, R2, R3}, EMPTY},
+ {"mix2.r", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 2, 0, 2), {R1, R2, R3}, EMPTY},
+ {"mix4.r", I, OpZaZbVeX2aX2bX2c (7, 1, 0, 0, 2, 0, 2), {R1, R2, R3}, EMPTY},
+ {"mix1.l", I, OpZaZbVeX2aX2bX2c (7, 0, 0, 0, 2, 2, 2), {R1, R2, R3}, EMPTY},
+ {"mix2.l", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 2, 2, 2), {R1, R2, R3}, EMPTY},
+ {"mix4.l", I, OpZaZbVeX2aX2bX2c (7, 1, 0, 0, 2, 2, 2), {R1, R2, R3}, EMPTY},
+ {"pack2.uss", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 2, 0, 0), {R1, R2, R3}, EMPTY},
+ {"pack2.sss", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 2, 2, 0), {R1, R2, R3}, EMPTY},
+ {"pack4.sss", I, OpZaZbVeX2aX2bX2c (7, 1, 0, 0, 2, 2, 0), {R1, R2, R3}, EMPTY},
+ {"unpack1.h", I, OpZaZbVeX2aX2bX2c (7, 0, 0, 0, 2, 0, 1), {R1, R2, R3}, EMPTY},
+ {"unpack2.h", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 2, 0, 1), {R1, R2, R3}, EMPTY},
+ {"unpack4.h", I, OpZaZbVeX2aX2bX2c (7, 1, 0, 0, 2, 0, 1), {R1, R2, R3}, EMPTY},
+ {"unpack1.l", I, OpZaZbVeX2aX2bX2c (7, 0, 0, 0, 2, 2, 1), {R1, R2, R3}, EMPTY},
+ {"unpack2.l", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 2, 2, 1), {R1, R2, R3}, EMPTY},
+ {"unpack4.l", I, OpZaZbVeX2aX2bX2c (7, 1, 0, 0, 2, 2, 1), {R1, R2, R3}, EMPTY},
+ {"pmin1.u", I, OpZaZbVeX2aX2bX2c (7, 0, 0, 0, 2, 1, 0), {R1, R2, R3}, EMPTY},
+ {"pmax1.u", I, OpZaZbVeX2aX2bX2c (7, 0, 0, 0, 2, 1, 1), {R1, R2, R3}, EMPTY},
+ {"pmin2", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 2, 3, 0), {R1, R2, R3}, EMPTY},
+ {"pmax2", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 2, 3, 1), {R1, R2, R3}, EMPTY},
+ {"psad1", I, OpZaZbVeX2aX2bX2c (7, 0, 0, 0, 2, 3, 2), {R1, R2, R3}, EMPTY},
+ {"mux1", I, OpZaZbVeX2aX2bX2c (7, 0, 0, 0, 3, 2, 2), {R1, R2, MBTYPE4}, EMPTY},
+ {"mux2", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 3, 2, 2), {R1, R2, MHTYPE8}, EMPTY},
+ {"pshr2", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 0, 2, 0), {R1, R3, R2}, EMPTY},
+ {"pshr4", I, OpZaZbVeX2aX2bX2c (7, 1, 0, 0, 0, 2, 0), {R1, R3, R2}, EMPTY},
+ {"shr", I, OpZaZbVeX2aX2bX2c (7, 1, 1, 0, 0, 2, 0), {R1, R3, R2}, EMPTY},
+ {"pshr2.u", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 0, 0, 0), {R1, R3, R2}, EMPTY},
+ {"pshr4.u", I, OpZaZbVeX2aX2bX2c (7, 1, 0, 0, 0, 0, 0), {R1, R3, R2}, EMPTY},
+ {"shr.u", I, OpZaZbVeX2aX2bX2c (7, 1, 1, 0, 0, 0, 0), {R1, R3, R2}, EMPTY},
+ {"pshr2", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 1, 3, 0), {R1, R3, CNT5}, EMPTY},
+ {"pshr4", I, OpZaZbVeX2aX2bX2c (7, 1, 0, 0, 1, 3, 0), {R1, R3, CNT5}, EMPTY},
+ {"pshr2.u", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 1, 1, 0), {R1, R3, CNT5}, EMPTY},
+ {"pshr4.u", I, OpZaZbVeX2aX2bX2c (7, 1, 0, 0, 1, 1, 0), {R1, R3, CNT5}, EMPTY},
+ {"pshl2", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 0, 0, 1), {R1, R2, R3}, EMPTY},
+ {"pshl4", I, OpZaZbVeX2aX2bX2c (7, 1, 0, 0, 0, 0, 1), {R1, R2, R3}, EMPTY},
+ {"shl", I, OpZaZbVeX2aX2bX2c (7, 1, 1, 0, 0, 0, 1), {R1, R2, R3}, EMPTY},
+ {"pshl2", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 3, 1, 1), {R1, R2, CCNT5}, EMPTY},
+ {"pshl4", I, OpZaZbVeX2aX2bX2c (7, 1, 0, 0, 3, 1, 1), {R1, R2, CCNT5}, EMPTY},
+ {"popcnt", I, OpZaZbVeX2aX2bX2c (7, 0, 1, 0, 1, 1, 2), {R1, R3}, EMPTY},
- {0}
+ {NULL, 0, 0, 0, 0, {0}, 0, 0, NULL}
};
#undef I0
@@ -294,3 +298,4 @@ struct ia64_opcode ia64_opcodes_i[] =
#undef OpX3X6
#undef OpX3XbIhWh
#undef OpX3XbIhWhTag13
+#undef EMPTY
diff --git a/opcodes/ia64-opc-m.c b/opcodes/ia64-opc-m.c
index bc09816..ba59d1d 100644
--- a/opcodes/ia64-opc-m.c
+++ b/opcodes/ia64-opc-m.c
@@ -1,5 +1,5 @@
/* ia64-opc-m.c -- IA-64 `M' opcode table.
- Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of GDB, GAS, and the GNU binutils.
@@ -61,208 +61,212 @@
(bOp (a) | bM (b) | bX (c) | bX6a (d) | bHint (e)), \
(mOp | mM | mX | mX6a | mHint)
+/* Used to initialise unused fields in ia64_opcode struct,
+ in order to stop gcc from complaining. */
+#define EMPTY 0,0,NULL
+
struct ia64_opcode ia64_opcodes_m[] =
{
- /* M-type instruction encodings (sorted according to major opcode) */
+ /* M-type instruction encodings (sorted according to major opcode). */
- {"chk.a.nc", M0, OpX3 (0, 4), {R1, TGT25c}},
- {"chk.a.clr", M0, OpX3 (0, 5), {R1, TGT25c}},
- {"chk.a.nc", M0, OpX3 (0, 6), {F1, TGT25c}},
- {"chk.a.clr", M0, OpX3 (0, 7), {F1, TGT25c}},
+ {"chk.a.nc", M0, OpX3 (0, 4), {R1, TGT25c}, EMPTY},
+ {"chk.a.clr", M0, OpX3 (0, 5), {R1, TGT25c}, EMPTY},
+ {"chk.a.nc", M0, OpX3 (0, 6), {F1, TGT25c}, EMPTY},
+ {"chk.a.clr", M0, OpX3 (0, 7), {F1, TGT25c}, EMPTY},
- {"invala", M0, OpX3X4X2 (0, 0, 0, 1)},
- {"fwb", M0, OpX3X4X2 (0, 0, 0, 2)},
- {"mf", M0, OpX3X4X2 (0, 0, 2, 2)},
- {"mf.a", M0, OpX3X4X2 (0, 0, 3, 2)},
- {"srlz.d", M0, OpX3X4X2 (0, 0, 0, 3)},
- {"srlz.i", M0, OpX3X4X2 (0, 0, 1, 3)},
- {"sync.i", M0, OpX3X4X2 (0, 0, 3, 3)},
- {"flushrs", M0, OpX3X4X2 (0, 0, 0xc, 0), {0, }, FIRST | NO_PRED},
- {"loadrs", M0, OpX3X4X2 (0, 0, 0xa, 0), {0, }, FIRST | NO_PRED},
- {"invala.e", M0, OpX3X4X2 (0, 0, 2, 1), {R1}},
- {"invala.e", M0, OpX3X4X2 (0, 0, 3, 1), {F1}},
- {"mov.m", M, OpX3X4X2 (0, 0, 8, 2), {AR3, IMM8}},
+ {"invala", M0, OpX3X4X2 (0, 0, 0, 1), {}, EMPTY},
+ {"fwb", M0, OpX3X4X2 (0, 0, 0, 2), {}, EMPTY},
+ {"mf", M0, OpX3X4X2 (0, 0, 2, 2), {}, EMPTY},
+ {"mf.a", M0, OpX3X4X2 (0, 0, 3, 2), {}, EMPTY},
+ {"srlz.d", M0, OpX3X4X2 (0, 0, 0, 3), {}, EMPTY},
+ {"srlz.i", M0, OpX3X4X2 (0, 0, 1, 3), {}, EMPTY},
+ {"sync.i", M0, OpX3X4X2 (0, 0, 3, 3), {}, EMPTY},
+ {"flushrs", M0, OpX3X4X2 (0, 0, 0xc, 0), {}, FIRST | NO_PRED, 0, NULL},
+ {"loadrs", M0, OpX3X4X2 (0, 0, 0xa, 0), {}, FIRST | NO_PRED, 0, NULL},
+ {"invala.e", M0, OpX3X4X2 (0, 0, 2, 1), {R1}, EMPTY},
+ {"invala.e", M0, OpX3X4X2 (0, 0, 3, 1), {F1}, EMPTY},
+ {"mov.m", M, OpX3X4X2 (0, 0, 8, 2), {AR3, IMM8}, EMPTY},
- {"break.m", M0, OpX3X4X2 (0, 0, 0, 0), {IMMU21}},
- {"nop.m", M0, OpX3X4X2 (0, 0, 1, 0), {IMMU21}},
+ {"break.m", M0, OpX3X4X2 (0, 0, 0, 0), {IMMU21}, EMPTY},
+ {"nop.m", M0, OpX3X4X2 (0, 0, 1, 0), {IMMU21}, EMPTY},
- {"sum", M0, OpX3X4 (0, 0, 4), {IMMU24}},
- {"rum", M0, OpX3X4 (0, 0, 5), {IMMU24}},
- {"ssm", M0, OpX3X4 (0, 0, 6), {IMMU24}, PRIV},
- {"rsm", M0, OpX3X4 (0, 0, 7), {IMMU24}, PRIV},
+ {"sum", M0, OpX3X4 (0, 0, 4), {IMMU24}, EMPTY},
+ {"rum", M0, OpX3X4 (0, 0, 5), {IMMU24}, EMPTY},
+ {"ssm", M0, OpX3X4 (0, 0, 6), {IMMU24}, PRIV, 0, NULL},
+ {"rsm", M0, OpX3X4 (0, 0, 7), {IMMU24}, PRIV, 0, NULL},
- {"mov.m", M, OpX3X6b (1, 0, 0x2a), {AR3, R2}},
- {"mov.m", M, OpX3X6b (1, 0, 0x22), {R1, AR3}},
- {"mov", M, OpX3X6b (1, 0, 0x2c), {CR3, R2}, PRIV},
- {"mov", M, OpX3X6b (1, 0, 0x24), {R1, CR3}, PRIV},
+ {"mov.m", M, OpX3X6b (1, 0, 0x2a), {AR3, R2}, EMPTY},
+ {"mov.m", M, OpX3X6b (1, 0, 0x22), {R1, AR3}, EMPTY},
+ {"mov", M, OpX3X6b (1, 0, 0x2c), {CR3, R2}, PRIV, 0, NULL},
+ {"mov", M, OpX3X6b (1, 0, 0x24), {R1, CR3}, PRIV, 0, NULL},
- {"alloc", M, OpX3 (1, 6), {R1, AR_PFS, SOF, SOL, SOR}, FIRST|NO_PRED|MOD_RRBS},
+ {"alloc", M, OpX3 (1, 6), {R1, AR_PFS, SOF, SOL, SOR}, FIRST|NO_PRED|MOD_RRBS, 0, NULL},
- {"mov", M, OpX3X6b (1, 0, 0x2d), {PSR_L, R2}, PRIV},
- {"mov", M, OpX3X6b (1, 0, 0x29), {PSR_UM, R2}},
- {"mov", M, OpX3X6b (1, 0, 0x25), {R1, PSR}, PRIV},
- {"mov", M, OpX3X6b (1, 0, 0x21), {R1, PSR_UM}},
- {"probe.r", M, OpX3X6b (1, 0, 0x38), {R1, R3, R2}},
- {"probe.w", M, OpX3X6b (1, 0, 0x39), {R1, R3, R2}},
- {"probe.r", M, OpX3X6b (1, 0, 0x18), {R1, R3, IMMU2}},
- {"probe.w", M, OpX3X6b (1, 0, 0x19), {R1, R3, IMMU2}},
- {"probe.rw.fault", M0, OpX3X6b (1, 0, 0x31), {R3, IMMU2}},
- {"probe.r.fault", M0, OpX3X6b (1, 0, 0x32), {R3, IMMU2}},
- {"probe.w.fault", M0, OpX3X6b (1, 0, 0x33), {R3, IMMU2}},
- {"itc.d", M0, OpX3X6b (1, 0, 0x2e), {R2}, LAST | PRIV},
- {"itc.i", M0, OpX3X6b (1, 0, 0x2f), {R2}, LAST | PRIV},
+ {"mov", M, OpX3X6b (1, 0, 0x2d), {PSR_L, R2}, PRIV, 0, NULL},
+ {"mov", M, OpX3X6b (1, 0, 0x29), {PSR_UM, R2}, EMPTY},
+ {"mov", M, OpX3X6b (1, 0, 0x25), {R1, PSR}, PRIV, 0, NULL},
+ {"mov", M, OpX3X6b (1, 0, 0x21), {R1, PSR_UM}, EMPTY},
+ {"probe.r", M, OpX3X6b (1, 0, 0x38), {R1, R3, R2}, EMPTY},
+ {"probe.w", M, OpX3X6b (1, 0, 0x39), {R1, R3, R2}, EMPTY},
+ {"probe.r", M, OpX3X6b (1, 0, 0x18), {R1, R3, IMMU2}, EMPTY},
+ {"probe.w", M, OpX3X6b (1, 0, 0x19), {R1, R3, IMMU2}, EMPTY},
+ {"probe.rw.fault", M0, OpX3X6b (1, 0, 0x31), {R3, IMMU2}, EMPTY},
+ {"probe.r.fault", M0, OpX3X6b (1, 0, 0x32), {R3, IMMU2}, EMPTY},
+ {"probe.w.fault", M0, OpX3X6b (1, 0, 0x33), {R3, IMMU2}, EMPTY},
+ {"itc.d", M0, OpX3X6b (1, 0, 0x2e), {R2}, LAST | PRIV, 0, NULL},
+ {"itc.i", M0, OpX3X6b (1, 0, 0x2f), {R2}, LAST | PRIV, 0, NULL},
- {"mov", M, OpX3X6b (1, 0, 0x00), {RR_R3, R2}, PRIV},
- {"mov", M, OpX3X6b (1, 0, 0x01), {DBR_R3, R2}, PRIV},
- {"mov", M, OpX3X6b (1, 0, 0x02), {IBR_R3, R2}, PRIV},
- {"mov", M, OpX3X6b (1, 0, 0x03), {PKR_R3, R2}, PRIV},
- {"mov", M, OpX3X6b (1, 0, 0x04), {PMC_R3, R2}, PRIV},
- {"mov", M, OpX3X6b (1, 0, 0x05), {PMD_R3, R2}, PRIV},
- {"mov", M, OpX3X6b (1, 0, 0x06), {MSR_R3, R2}, PRIV},
- {"itr.d", M, OpX3X6b (1, 0, 0x0e), {DTR_R3, R2}, PRIV},
- {"itr.i", M, OpX3X6b (1, 0, 0x0f), {ITR_R3, R2}, PRIV},
+ {"mov", M, OpX3X6b (1, 0, 0x00), {RR_R3, R2}, PRIV, 0, NULL},
+ {"mov", M, OpX3X6b (1, 0, 0x01), {DBR_R3, R2}, PRIV, 0, NULL},
+ {"mov", M, OpX3X6b (1, 0, 0x02), {IBR_R3, R2}, PRIV, 0, NULL},
+ {"mov", M, OpX3X6b (1, 0, 0x03), {PKR_R3, R2}, PRIV, 0, NULL},
+ {"mov", M, OpX3X6b (1, 0, 0x04), {PMC_R3, R2}, PRIV, 0, NULL},
+ {"mov", M, OpX3X6b (1, 0, 0x05), {PMD_R3, R2}, PRIV, 0, NULL},
+ {"mov", M, OpX3X6b (1, 0, 0x06), {MSR_R3, R2}, PRIV, 0, NULL},
+ {"itr.d", M, OpX3X6b (1, 0, 0x0e), {DTR_R3, R2}, PRIV, 0, NULL},
+ {"itr.i", M, OpX3X6b (1, 0, 0x0f), {ITR_R3, R2}, PRIV, 0, NULL},
- {"mov", M, OpX3X6b (1, 0, 0x10), {R1, RR_R3}, PRIV},
- {"mov", M, OpX3X6b (1, 0, 0x11), {R1, DBR_R3}, PRIV},
- {"mov", M, OpX3X6b (1, 0, 0x12), {R1, IBR_R3}, PRIV},
- {"mov", M, OpX3X6b (1, 0, 0x13), {R1, PKR_R3}, PRIV},
- {"mov", M, OpX3X6b (1, 0, 0x14), {R1, PMC_R3}, PRIV},
- {"mov", M, OpX3X6b (1, 0, 0x15), {R1, PMD_R3}},
- {"mov", M, OpX3X6b (1, 0, 0x16), {R1, MSR_R3}, PRIV},
- {"mov", M, OpX3X6b (1, 0, 0x17), {R1, CPUID_R3}},
+ {"mov", M, OpX3X6b (1, 0, 0x10), {R1, RR_R3}, PRIV, 0, NULL},
+ {"mov", M, OpX3X6b (1, 0, 0x11), {R1, DBR_R3}, PRIV, 0, NULL},
+ {"mov", M, OpX3X6b (1, 0, 0x12), {R1, IBR_R3}, PRIV, 0, NULL},
+ {"mov", M, OpX3X6b (1, 0, 0x13), {R1, PKR_R3}, PRIV, 0, NULL},
+ {"mov", M, OpX3X6b (1, 0, 0x14), {R1, PMC_R3}, PRIV, 0, NULL},
+ {"mov", M, OpX3X6b (1, 0, 0x15), {R1, PMD_R3}, EMPTY},
+ {"mov", M, OpX3X6b (1, 0, 0x16), {R1, MSR_R3}, PRIV, 0, NULL},
+ {"mov", M, OpX3X6b (1, 0, 0x17), {R1, CPUID_R3}, EMPTY},
- {"ptc.l", M0, OpX3X6b (1, 0, 0x09), {R3, R2}, PRIV},
- {"ptc.g", M0, OpX3X6b (1, 0, 0x0a), {R3, R2}, LAST | PRIV},
- {"ptc.ga", M0, OpX3X6b (1, 0, 0x0b), {R3, R2}, LAST | PRIV},
- {"ptr.d", M0, OpX3X6b (1, 0, 0x0c), {R3, R2}, PRIV},
- {"ptr.i", M0, OpX3X6b (1, 0, 0x0d), {R3, R2}, PRIV},
+ {"ptc.l", M0, OpX3X6b (1, 0, 0x09), {R3, R2}, PRIV, 0, NULL},
+ {"ptc.g", M0, OpX3X6b (1, 0, 0x0a), {R3, R2}, LAST | PRIV, 0, NULL},
+ {"ptc.ga", M0, OpX3X6b (1, 0, 0x0b), {R3, R2}, LAST | PRIV, 0, NULL},
+ {"ptr.d", M0, OpX3X6b (1, 0, 0x0c), {R3, R2}, PRIV, 0, NULL},
+ {"ptr.i", M0, OpX3X6b (1, 0, 0x0d), {R3, R2}, PRIV, 0, NULL},
- {"thash", M, OpX3X6b (1, 0, 0x1a), {R1, R3}},
- {"ttag", M, OpX3X6b (1, 0, 0x1b), {R1, R3}},
- {"tpa", M, OpX3X6b (1, 0, 0x1e), {R1, R3}, PRIV},
- {"tak", M, OpX3X6b (1, 0, 0x1f), {R1, R3}, PRIV},
+ {"thash", M, OpX3X6b (1, 0, 0x1a), {R1, R3}, EMPTY},
+ {"ttag", M, OpX3X6b (1, 0, 0x1b), {R1, R3}, EMPTY},
+ {"tpa", M, OpX3X6b (1, 0, 0x1e), {R1, R3}, PRIV, 0, NULL},
+ {"tak", M, OpX3X6b (1, 0, 0x1f), {R1, R3}, PRIV, 0, NULL},
- {"chk.s.m", M0, OpX3 (1, 1), {R2, TGT25b}},
- {"chk.s", M0, OpX3 (1, 3), {F2, TGT25b}},
+ {"chk.s.m", M0, OpX3 (1, 1), {R2, TGT25b}, EMPTY},
+ {"chk.s", M0, OpX3 (1, 3), {F2, TGT25b}, EMPTY},
- {"fc", M0, OpX3X6b (1, 0, 0x30), {R3}},
- {"ptc.e", M0, OpX3X6b (1, 0, 0x34), {R3}, PRIV},
+ {"fc", M0, OpX3X6b (1, 0, 0x30), {R3}, EMPTY},
+ {"ptc.e", M0, OpX3X6b (1, 0, 0x34), {R3}, PRIV, 0, NULL},
/* integer load */
- {"ld1", M, OpMXX6aHint (4, 0, 0, 0x00, 0), {R1, MR3}},
- {"ld1.nt1", M, OpMXX6aHint (4, 0, 0, 0x00, 1), {R1, MR3}},
- {"ld1.nta", M, OpMXX6aHint (4, 0, 0, 0x00, 3), {R1, MR3}},
- {"ld2", M, OpMXX6aHint (4, 0, 0, 0x01, 0), {R1, MR3}},
- {"ld2.nt1", M, OpMXX6aHint (4, 0, 0, 0x01, 1), {R1, MR3}},
- {"ld2.nta", M, OpMXX6aHint (4, 0, 0, 0x01, 3), {R1, MR3}},
- {"ld4", M, OpMXX6aHint (4, 0, 0, 0x02, 0), {R1, MR3}},
- {"ld4.nt1", M, OpMXX6aHint (4, 0, 0, 0x02, 1), {R1, MR3}},
- {"ld4.nta", M, OpMXX6aHint (4, 0, 0, 0x02, 3), {R1, MR3}},
- {"ld8", M, OpMXX6aHint (4, 0, 0, 0x03, 0), {R1, MR3}},
- {"ld8.nt1", M, OpMXX6aHint (4, 0, 0, 0x03, 1), {R1, MR3}},
- {"ld8.nta", M, OpMXX6aHint (4, 0, 0, 0x03, 3), {R1, MR3}},
- {"ld1.s", M, OpMXX6aHint (4, 0, 0, 0x04, 0), {R1, MR3}},
- {"ld1.s.nt1", M, OpMXX6aHint (4, 0, 0, 0x04, 1), {R1, MR3}},
- {"ld1.s.nta", M, OpMXX6aHint (4, 0, 0, 0x04, 3), {R1, MR3}},
- {"ld2.s", M, OpMXX6aHint (4, 0, 0, 0x05, 0), {R1, MR3}},
- {"ld2.s.nt1", M, OpMXX6aHint (4, 0, 0, 0x05, 1), {R1, MR3}},
- {"ld2.s.nta", M, OpMXX6aHint (4, 0, 0, 0x05, 3), {R1, MR3}},
- {"ld4.s", M, OpMXX6aHint (4, 0, 0, 0x06, 0), {R1, MR3}},
- {"ld4.s.nt1", M, OpMXX6aHint (4, 0, 0, 0x06, 1), {R1, MR3}},
- {"ld4.s.nta", M, OpMXX6aHint (4, 0, 0, 0x06, 3), {R1, MR3}},
- {"ld8.s", M, OpMXX6aHint (4, 0, 0, 0x07, 0), {R1, MR3}},
- {"ld8.s.nt1", M, OpMXX6aHint (4, 0, 0, 0x07, 1), {R1, MR3}},
- {"ld8.s.nta", M, OpMXX6aHint (4, 0, 0, 0x07, 3), {R1, MR3}},
- {"ld1.a", M, OpMXX6aHint (4, 0, 0, 0x08, 0), {R1, MR3}},
- {"ld1.a.nt1", M, OpMXX6aHint (4, 0, 0, 0x08, 1), {R1, MR3}},
- {"ld1.a.nta", M, OpMXX6aHint (4, 0, 0, 0x08, 3), {R1, MR3}},
- {"ld2.a", M, OpMXX6aHint (4, 0, 0, 0x09, 0), {R1, MR3}},
- {"ld2.a.nt1", M, OpMXX6aHint (4, 0, 0, 0x09, 1), {R1, MR3}},
- {"ld2.a.nta", M, OpMXX6aHint (4, 0, 0, 0x09, 3), {R1, MR3}},
- {"ld4.a", M, OpMXX6aHint (4, 0, 0, 0x0a, 0), {R1, MR3}},
- {"ld4.a.nt1", M, OpMXX6aHint (4, 0, 0, 0x0a, 1), {R1, MR3}},
- {"ld4.a.nta", M, OpMXX6aHint (4, 0, 0, 0x0a, 3), {R1, MR3}},
- {"ld8.a", M, OpMXX6aHint (4, 0, 0, 0x0b, 0), {R1, MR3}},
- {"ld8.a.nt1", M, OpMXX6aHint (4, 0, 0, 0x0b, 1), {R1, MR3}},
- {"ld8.a.nta", M, OpMXX6aHint (4, 0, 0, 0x0b, 3), {R1, MR3}},
- {"ld1.sa", M, OpMXX6aHint (4, 0, 0, 0x0c, 0), {R1, MR3}},
- {"ld1.sa.nt1", M, OpMXX6aHint (4, 0, 0, 0x0c, 1), {R1, MR3}},
- {"ld1.sa.nta", M, OpMXX6aHint (4, 0, 0, 0x0c, 3), {R1, MR3}},
- {"ld2.sa", M, OpMXX6aHint (4, 0, 0, 0x0d, 0), {R1, MR3}},
- {"ld2.sa.nt1", M, OpMXX6aHint (4, 0, 0, 0x0d, 1), {R1, MR3}},
- {"ld2.sa.nta", M, OpMXX6aHint (4, 0, 0, 0x0d, 3), {R1, MR3}},
- {"ld4.sa", M, OpMXX6aHint (4, 0, 0, 0x0e, 0), {R1, MR3}},
- {"ld4.sa.nt1", M, OpMXX6aHint (4, 0, 0, 0x0e, 1), {R1, MR3}},
- {"ld4.sa.nta", M, OpMXX6aHint (4, 0, 0, 0x0e, 3), {R1, MR3}},
- {"ld8.sa", M, OpMXX6aHint (4, 0, 0, 0x0f, 0), {R1, MR3}},
- {"ld8.sa.nt1", M, OpMXX6aHint (4, 0, 0, 0x0f, 1), {R1, MR3}},
- {"ld8.sa.nta", M, OpMXX6aHint (4, 0, 0, 0x0f, 3), {R1, MR3}},
- {"ld1.bias", M, OpMXX6aHint (4, 0, 0, 0x10, 0), {R1, MR3}},
- {"ld1.bias.nt1", M, OpMXX6aHint (4, 0, 0, 0x10, 1), {R1, MR3}},
- {"ld1.bias.nta", M, OpMXX6aHint (4, 0, 0, 0x10, 3), {R1, MR3}},
- {"ld2.bias", M, OpMXX6aHint (4, 0, 0, 0x11, 0), {R1, MR3}},
- {"ld2.bias.nt1", M, OpMXX6aHint (4, 0, 0, 0x11, 1), {R1, MR3}},
- {"ld2.bias.nta", M, OpMXX6aHint (4, 0, 0, 0x11, 3), {R1, MR3}},
- {"ld4.bias", M, OpMXX6aHint (4, 0, 0, 0x12, 0), {R1, MR3}},
- {"ld4.bias.nt1", M, OpMXX6aHint (4, 0, 0, 0x12, 1), {R1, MR3}},
- {"ld4.bias.nta", M, OpMXX6aHint (4, 0, 0, 0x12, 3), {R1, MR3}},
- {"ld8.bias", M, OpMXX6aHint (4, 0, 0, 0x13, 0), {R1, MR3}},
- {"ld8.bias.nt1", M, OpMXX6aHint (4, 0, 0, 0x13, 1), {R1, MR3}},
- {"ld8.bias.nta", M, OpMXX6aHint (4, 0, 0, 0x13, 3), {R1, MR3}},
- {"ld1.acq", M, OpMXX6aHint (4, 0, 0, 0x14, 0), {R1, MR3}},
- {"ld1.acq.nt1", M, OpMXX6aHint (4, 0, 0, 0x14, 1), {R1, MR3}},
- {"ld1.acq.nta", M, OpMXX6aHint (4, 0, 0, 0x14, 3), {R1, MR3}},
- {"ld2.acq", M, OpMXX6aHint (4, 0, 0, 0x15, 0), {R1, MR3}},
- {"ld2.acq.nt1", M, OpMXX6aHint (4, 0, 0, 0x15, 1), {R1, MR3}},
- {"ld2.acq.nta", M, OpMXX6aHint (4, 0, 0, 0x15, 3), {R1, MR3}},
- {"ld4.acq", M, OpMXX6aHint (4, 0, 0, 0x16, 0), {R1, MR3}},
- {"ld4.acq.nt1", M, OpMXX6aHint (4, 0, 0, 0x16, 1), {R1, MR3}},
- {"ld4.acq.nta", M, OpMXX6aHint (4, 0, 0, 0x16, 3), {R1, MR3}},
- {"ld8.acq", M, OpMXX6aHint (4, 0, 0, 0x17, 0), {R1, MR3}},
- {"ld8.acq.nt1", M, OpMXX6aHint (4, 0, 0, 0x17, 1), {R1, MR3}},
- {"ld8.acq.nta", M, OpMXX6aHint (4, 0, 0, 0x17, 3), {R1, MR3}},
- {"ld8.fill", M, OpMXX6aHint (4, 0, 0, 0x1b, 0), {R1, MR3}},
- {"ld8.fill.nt1", M, OpMXX6aHint (4, 0, 0, 0x1b, 1), {R1, MR3}},
- {"ld8.fill.nta", M, OpMXX6aHint (4, 0, 0, 0x1b, 3), {R1, MR3}},
- {"ld1.c.clr", M, OpMXX6aHint (4, 0, 0, 0x20, 0), {R1, MR3}},
- {"ld1.c.clr.nt1", M, OpMXX6aHint (4, 0, 0, 0x20, 1), {R1, MR3}},
- {"ld1.c.clr.nta", M, OpMXX6aHint (4, 0, 0, 0x20, 3), {R1, MR3}},
- {"ld2.c.clr", M, OpMXX6aHint (4, 0, 0, 0x21, 0), {R1, MR3}},
- {"ld2.c.clr.nt1", M, OpMXX6aHint (4, 0, 0, 0x21, 1), {R1, MR3}},
- {"ld2.c.clr.nta", M, OpMXX6aHint (4, 0, 0, 0x21, 3), {R1, MR3}},
- {"ld4.c.clr", M, OpMXX6aHint (4, 0, 0, 0x22, 0), {R1, MR3}},
- {"ld4.c.clr.nt1", M, OpMXX6aHint (4, 0, 0, 0x22, 1), {R1, MR3}},
- {"ld4.c.clr.nta", M, OpMXX6aHint (4, 0, 0, 0x22, 3), {R1, MR3}},
- {"ld8.c.clr", M, OpMXX6aHint (4, 0, 0, 0x23, 0), {R1, MR3}},
- {"ld8.c.clr.nt1", M, OpMXX6aHint (4, 0, 0, 0x23, 1), {R1, MR3}},
- {"ld8.c.clr.nta", M, OpMXX6aHint (4, 0, 0, 0x23, 3), {R1, MR3}},
- {"ld1.c.nc", M, OpMXX6aHint (4, 0, 0, 0x24, 0), {R1, MR3}},
- {"ld1.c.nc.nt1", M, OpMXX6aHint (4, 0, 0, 0x24, 1), {R1, MR3}},
- {"ld1.c.nc.nta", M, OpMXX6aHint (4, 0, 0, 0x24, 3), {R1, MR3}},
- {"ld2.c.nc", M, OpMXX6aHint (4, 0, 0, 0x25, 0), {R1, MR3}},
- {"ld2.c.nc.nt1", M, OpMXX6aHint (4, 0, 0, 0x25, 1), {R1, MR3}},
- {"ld2.c.nc.nta", M, OpMXX6aHint (4, 0, 0, 0x25, 3), {R1, MR3}},
- {"ld4.c.nc", M, OpMXX6aHint (4, 0, 0, 0x26, 0), {R1, MR3}},
- {"ld4.c.nc.nt1", M, OpMXX6aHint (4, 0, 0, 0x26, 1), {R1, MR3}},
- {"ld4.c.nc.nta", M, OpMXX6aHint (4, 0, 0, 0x26, 3), {R1, MR3}},
- {"ld8.c.nc", M, OpMXX6aHint (4, 0, 0, 0x27, 0), {R1, MR3}},
- {"ld8.c.nc.nt1", M, OpMXX6aHint (4, 0, 0, 0x27, 1), {R1, MR3}},
- {"ld8.c.nc.nta", M, OpMXX6aHint (4, 0, 0, 0x27, 3), {R1, MR3}},
- {"ld1.c.clr.acq", M, OpMXX6aHint (4, 0, 0, 0x28, 0), {R1, MR3}},
- {"ld1.c.clr.acq.nt1", M, OpMXX6aHint (4, 0, 0, 0x28, 1), {R1, MR3}},
- {"ld1.c.clr.acq.nta", M, OpMXX6aHint (4, 0, 0, 0x28, 3), {R1, MR3}},
- {"ld2.c.clr.acq", M, OpMXX6aHint (4, 0, 0, 0x29, 0), {R1, MR3}},
- {"ld2.c.clr.acq.nt1", M, OpMXX6aHint (4, 0, 0, 0x29, 1), {R1, MR3}},
- {"ld2.c.clr.acq.nta", M, OpMXX6aHint (4, 0, 0, 0x29, 3), {R1, MR3}},
- {"ld4.c.clr.acq", M, OpMXX6aHint (4, 0, 0, 0x2a, 0), {R1, MR3}},
- {"ld4.c.clr.acq.nt1", M, OpMXX6aHint (4, 0, 0, 0x2a, 1), {R1, MR3}},
- {"ld4.c.clr.acq.nta", M, OpMXX6aHint (4, 0, 0, 0x2a, 3), {R1, MR3}},
- {"ld8.c.clr.acq", M, OpMXX6aHint (4, 0, 0, 0x2b, 0), {R1, MR3}},
- {"ld8.c.clr.acq.nt1", M, OpMXX6aHint (4, 0, 0, 0x2b, 1), {R1, MR3}},
- {"ld8.c.clr.acq.nta", M, OpMXX6aHint (4, 0, 0, 0x2b, 3), {R1, MR3}},
+ {"ld1", M, OpMXX6aHint (4, 0, 0, 0x00, 0), {R1, MR3}, EMPTY},
+ {"ld1.nt1", M, OpMXX6aHint (4, 0, 0, 0x00, 1), {R1, MR3}, EMPTY},
+ {"ld1.nta", M, OpMXX6aHint (4, 0, 0, 0x00, 3), {R1, MR3}, EMPTY},
+ {"ld2", M, OpMXX6aHint (4, 0, 0, 0x01, 0), {R1, MR3}, EMPTY},
+ {"ld2.nt1", M, OpMXX6aHint (4, 0, 0, 0x01, 1), {R1, MR3}, EMPTY},
+ {"ld2.nta", M, OpMXX6aHint (4, 0, 0, 0x01, 3), {R1, MR3}, EMPTY},
+ {"ld4", M, OpMXX6aHint (4, 0, 0, 0x02, 0), {R1, MR3}, EMPTY},
+ {"ld4.nt1", M, OpMXX6aHint (4, 0, 0, 0x02, 1), {R1, MR3}, EMPTY},
+ {"ld4.nta", M, OpMXX6aHint (4, 0, 0, 0x02, 3), {R1, MR3}, EMPTY},
+ {"ld8", M, OpMXX6aHint (4, 0, 0, 0x03, 0), {R1, MR3}, EMPTY},
+ {"ld8.nt1", M, OpMXX6aHint (4, 0, 0, 0x03, 1), {R1, MR3}, EMPTY},
+ {"ld8.nta", M, OpMXX6aHint (4, 0, 0, 0x03, 3), {R1, MR3}, EMPTY},
+ {"ld1.s", M, OpMXX6aHint (4, 0, 0, 0x04, 0), {R1, MR3}, EMPTY},
+ {"ld1.s.nt1", M, OpMXX6aHint (4, 0, 0, 0x04, 1), {R1, MR3}, EMPTY},
+ {"ld1.s.nta", M, OpMXX6aHint (4, 0, 0, 0x04, 3), {R1, MR3}, EMPTY},
+ {"ld2.s", M, OpMXX6aHint (4, 0, 0, 0x05, 0), {R1, MR3}, EMPTY},
+ {"ld2.s.nt1", M, OpMXX6aHint (4, 0, 0, 0x05, 1), {R1, MR3}, EMPTY},
+ {"ld2.s.nta", M, OpMXX6aHint (4, 0, 0, 0x05, 3), {R1, MR3}, EMPTY},
+ {"ld4.s", M, OpMXX6aHint (4, 0, 0, 0x06, 0), {R1, MR3}, EMPTY},
+ {"ld4.s.nt1", M, OpMXX6aHint (4, 0, 0, 0x06, 1), {R1, MR3}, EMPTY},
+ {"ld4.s.nta", M, OpMXX6aHint (4, 0, 0, 0x06, 3), {R1, MR3}, EMPTY},
+ {"ld8.s", M, OpMXX6aHint (4, 0, 0, 0x07, 0), {R1, MR3}, EMPTY},
+ {"ld8.s.nt1", M, OpMXX6aHint (4, 0, 0, 0x07, 1), {R1, MR3}, EMPTY},
+ {"ld8.s.nta", M, OpMXX6aHint (4, 0, 0, 0x07, 3), {R1, MR3}, EMPTY},
+ {"ld1.a", M, OpMXX6aHint (4, 0, 0, 0x08, 0), {R1, MR3}, EMPTY},
+ {"ld1.a.nt1", M, OpMXX6aHint (4, 0, 0, 0x08, 1), {R1, MR3}, EMPTY},
+ {"ld1.a.nta", M, OpMXX6aHint (4, 0, 0, 0x08, 3), {R1, MR3}, EMPTY},
+ {"ld2.a", M, OpMXX6aHint (4, 0, 0, 0x09, 0), {R1, MR3}, EMPTY},
+ {"ld2.a.nt1", M, OpMXX6aHint (4, 0, 0, 0x09, 1), {R1, MR3}, EMPTY},
+ {"ld2.a.nta", M, OpMXX6aHint (4, 0, 0, 0x09, 3), {R1, MR3}, EMPTY},
+ {"ld4.a", M, OpMXX6aHint (4, 0, 0, 0x0a, 0), {R1, MR3}, EMPTY},
+ {"ld4.a.nt1", M, OpMXX6aHint (4, 0, 0, 0x0a, 1), {R1, MR3}, EMPTY},
+ {"ld4.a.nta", M, OpMXX6aHint (4, 0, 0, 0x0a, 3), {R1, MR3}, EMPTY},
+ {"ld8.a", M, OpMXX6aHint (4, 0, 0, 0x0b, 0), {R1, MR3}, EMPTY},
+ {"ld8.a.nt1", M, OpMXX6aHint (4, 0, 0, 0x0b, 1), {R1, MR3}, EMPTY},
+ {"ld8.a.nta", M, OpMXX6aHint (4, 0, 0, 0x0b, 3), {R1, MR3}, EMPTY},
+ {"ld1.sa", M, OpMXX6aHint (4, 0, 0, 0x0c, 0), {R1, MR3}, EMPTY},
+ {"ld1.sa.nt1", M, OpMXX6aHint (4, 0, 0, 0x0c, 1), {R1, MR3}, EMPTY},
+ {"ld1.sa.nta", M, OpMXX6aHint (4, 0, 0, 0x0c, 3), {R1, MR3}, EMPTY},
+ {"ld2.sa", M, OpMXX6aHint (4, 0, 0, 0x0d, 0), {R1, MR3}, EMPTY},
+ {"ld2.sa.nt1", M, OpMXX6aHint (4, 0, 0, 0x0d, 1), {R1, MR3}, EMPTY},
+ {"ld2.sa.nta", M, OpMXX6aHint (4, 0, 0, 0x0d, 3), {R1, MR3}, EMPTY},
+ {"ld4.sa", M, OpMXX6aHint (4, 0, 0, 0x0e, 0), {R1, MR3}, EMPTY},
+ {"ld4.sa.nt1", M, OpMXX6aHint (4, 0, 0, 0x0e, 1), {R1, MR3}, EMPTY},
+ {"ld4.sa.nta", M, OpMXX6aHint (4, 0, 0, 0x0e, 3), {R1, MR3}, EMPTY},
+ {"ld8.sa", M, OpMXX6aHint (4, 0, 0, 0x0f, 0), {R1, MR3}, EMPTY},
+ {"ld8.sa.nt1", M, OpMXX6aHint (4, 0, 0, 0x0f, 1), {R1, MR3}, EMPTY},
+ {"ld8.sa.nta", M, OpMXX6aHint (4, 0, 0, 0x0f, 3), {R1, MR3}, EMPTY},
+ {"ld1.bias", M, OpMXX6aHint (4, 0, 0, 0x10, 0), {R1, MR3}, EMPTY},
+ {"ld1.bias.nt1", M, OpMXX6aHint (4, 0, 0, 0x10, 1), {R1, MR3}, EMPTY},
+ {"ld1.bias.nta", M, OpMXX6aHint (4, 0, 0, 0x10, 3), {R1, MR3}, EMPTY},
+ {"ld2.bias", M, OpMXX6aHint (4, 0, 0, 0x11, 0), {R1, MR3}, EMPTY},
+ {"ld2.bias.nt1", M, OpMXX6aHint (4, 0, 0, 0x11, 1), {R1, MR3}, EMPTY},
+ {"ld2.bias.nta", M, OpMXX6aHint (4, 0, 0, 0x11, 3), {R1, MR3}, EMPTY},
+ {"ld4.bias", M, OpMXX6aHint (4, 0, 0, 0x12, 0), {R1, MR3}, EMPTY},
+ {"ld4.bias.nt1", M, OpMXX6aHint (4, 0, 0, 0x12, 1), {R1, MR3}, EMPTY},
+ {"ld4.bias.nta", M, OpMXX6aHint (4, 0, 0, 0x12, 3), {R1, MR3}, EMPTY},
+ {"ld8.bias", M, OpMXX6aHint (4, 0, 0, 0x13, 0), {R1, MR3}, EMPTY},
+ {"ld8.bias.nt1", M, OpMXX6aHint (4, 0, 0, 0x13, 1), {R1, MR3}, EMPTY},
+ {"ld8.bias.nta", M, OpMXX6aHint (4, 0, 0, 0x13, 3), {R1, MR3}, EMPTY},
+ {"ld1.acq", M, OpMXX6aHint (4, 0, 0, 0x14, 0), {R1, MR3}, EMPTY},
+ {"ld1.acq.nt1", M, OpMXX6aHint (4, 0, 0, 0x14, 1), {R1, MR3}, EMPTY},
+ {"ld1.acq.nta", M, OpMXX6aHint (4, 0, 0, 0x14, 3), {R1, MR3}, EMPTY},
+ {"ld2.acq", M, OpMXX6aHint (4, 0, 0, 0x15, 0), {R1, MR3}, EMPTY},
+ {"ld2.acq.nt1", M, OpMXX6aHint (4, 0, 0, 0x15, 1), {R1, MR3}, EMPTY},
+ {"ld2.acq.nta", M, OpMXX6aHint (4, 0, 0, 0x15, 3), {R1, MR3}, EMPTY},
+ {"ld4.acq", M, OpMXX6aHint (4, 0, 0, 0x16, 0), {R1, MR3}, EMPTY},
+ {"ld4.acq.nt1", M, OpMXX6aHint (4, 0, 0, 0x16, 1), {R1, MR3}, EMPTY},
+ {"ld4.acq.nta", M, OpMXX6aHint (4, 0, 0, 0x16, 3), {R1, MR3}, EMPTY},
+ {"ld8.acq", M, OpMXX6aHint (4, 0, 0, 0x17, 0), {R1, MR3}, EMPTY},
+ {"ld8.acq.nt1", M, OpMXX6aHint (4, 0, 0, 0x17, 1), {R1, MR3}, EMPTY},
+ {"ld8.acq.nta", M, OpMXX6aHint (4, 0, 0, 0x17, 3), {R1, MR3}, EMPTY},
+ {"ld8.fill", M, OpMXX6aHint (4, 0, 0, 0x1b, 0), {R1, MR3}, EMPTY},
+ {"ld8.fill.nt1", M, OpMXX6aHint (4, 0, 0, 0x1b, 1), {R1, MR3}, EMPTY},
+ {"ld8.fill.nta", M, OpMXX6aHint (4, 0, 0, 0x1b, 3), {R1, MR3}, EMPTY},
+ {"ld1.c.clr", M, OpMXX6aHint (4, 0, 0, 0x20, 0), {R1, MR3}, EMPTY},
+ {"ld1.c.clr.nt1", M, OpMXX6aHint (4, 0, 0, 0x20, 1), {R1, MR3}, EMPTY},
+ {"ld1.c.clr.nta", M, OpMXX6aHint (4, 0, 0, 0x20, 3), {R1, MR3}, EMPTY},
+ {"ld2.c.clr", M, OpMXX6aHint (4, 0, 0, 0x21, 0), {R1, MR3}, EMPTY},
+ {"ld2.c.clr.nt1", M, OpMXX6aHint (4, 0, 0, 0x21, 1), {R1, MR3}, EMPTY},
+ {"ld2.c.clr.nta", M, OpMXX6aHint (4, 0, 0, 0x21, 3), {R1, MR3}, EMPTY},
+ {"ld4.c.clr", M, OpMXX6aHint (4, 0, 0, 0x22, 0), {R1, MR3}, EMPTY},
+ {"ld4.c.clr.nt1", M, OpMXX6aHint (4, 0, 0, 0x22, 1), {R1, MR3}, EMPTY},
+ {"ld4.c.clr.nta", M, OpMXX6aHint (4, 0, 0, 0x22, 3), {R1, MR3}, EMPTY},
+ {"ld8.c.clr", M, OpMXX6aHint (4, 0, 0, 0x23, 0), {R1, MR3}, EMPTY},
+ {"ld8.c.clr.nt1", M, OpMXX6aHint (4, 0, 0, 0x23, 1), {R1, MR3}, EMPTY},
+ {"ld8.c.clr.nta", M, OpMXX6aHint (4, 0, 0, 0x23, 3), {R1, MR3}, EMPTY},
+ {"ld1.c.nc", M, OpMXX6aHint (4, 0, 0, 0x24, 0), {R1, MR3}, EMPTY},
+ {"ld1.c.nc.nt1", M, OpMXX6aHint (4, 0, 0, 0x24, 1), {R1, MR3}, EMPTY},
+ {"ld1.c.nc.nta", M, OpMXX6aHint (4, 0, 0, 0x24, 3), {R1, MR3}, EMPTY},
+ {"ld2.c.nc", M, OpMXX6aHint (4, 0, 0, 0x25, 0), {R1, MR3}, EMPTY},
+ {"ld2.c.nc.nt1", M, OpMXX6aHint (4, 0, 0, 0x25, 1), {R1, MR3}, EMPTY},
+ {"ld2.c.nc.nta", M, OpMXX6aHint (4, 0, 0, 0x25, 3), {R1, MR3}, EMPTY},
+ {"ld4.c.nc", M, OpMXX6aHint (4, 0, 0, 0x26, 0), {R1, MR3}, EMPTY},
+ {"ld4.c.nc.nt1", M, OpMXX6aHint (4, 0, 0, 0x26, 1), {R1, MR3}, EMPTY},
+ {"ld4.c.nc.nta", M, OpMXX6aHint (4, 0, 0, 0x26, 3), {R1, MR3}, EMPTY},
+ {"ld8.c.nc", M, OpMXX6aHint (4, 0, 0, 0x27, 0), {R1, MR3}, EMPTY},
+ {"ld8.c.nc.nt1", M, OpMXX6aHint (4, 0, 0, 0x27, 1), {R1, MR3}, EMPTY},
+ {"ld8.c.nc.nta", M, OpMXX6aHint (4, 0, 0, 0x27, 3), {R1, MR3}, EMPTY},
+ {"ld1.c.clr.acq", M, OpMXX6aHint (4, 0, 0, 0x28, 0), {R1, MR3}, EMPTY},
+ {"ld1.c.clr.acq.nt1", M, OpMXX6aHint (4, 0, 0, 0x28, 1), {R1, MR3}, EMPTY},
+ {"ld1.c.clr.acq.nta", M, OpMXX6aHint (4, 0, 0, 0x28, 3), {R1, MR3}, EMPTY},
+ {"ld2.c.clr.acq", M, OpMXX6aHint (4, 0, 0, 0x29, 0), {R1, MR3}, EMPTY},
+ {"ld2.c.clr.acq.nt1", M, OpMXX6aHint (4, 0, 0, 0x29, 1), {R1, MR3}, EMPTY},
+ {"ld2.c.clr.acq.nta", M, OpMXX6aHint (4, 0, 0, 0x29, 3), {R1, MR3}, EMPTY},
+ {"ld4.c.clr.acq", M, OpMXX6aHint (4, 0, 0, 0x2a, 0), {R1, MR3}, EMPTY},
+ {"ld4.c.clr.acq.nt1", M, OpMXX6aHint (4, 0, 0, 0x2a, 1), {R1, MR3}, EMPTY},
+ {"ld4.c.clr.acq.nta", M, OpMXX6aHint (4, 0, 0, 0x2a, 3), {R1, MR3}, EMPTY},
+ {"ld8.c.clr.acq", M, OpMXX6aHint (4, 0, 0, 0x2b, 0), {R1, MR3}, EMPTY},
+ {"ld8.c.clr.acq.nt1", M, OpMXX6aHint (4, 0, 0, 0x2b, 1), {R1, MR3}, EMPTY},
+ {"ld8.c.clr.acq.nta", M, OpMXX6aHint (4, 0, 0, 0x2b, 3), {R1, MR3}, EMPTY},
- /* integer load w/increment by register */
-#define LDINCREG(c,h) M, OpMXX6aHint (4, 1, 0, c, h), {R1, MR3, R2}, POSTINC,
+ /* Integer load w/increment by register. */
+#define LDINCREG(c,h) M, OpMXX6aHint (4, 1, 0, c, h), {R1, MR3, R2}, POSTINC, 0, NULL
{"ld1", LDINCREG (0x00, 0)},
{"ld1.nt1", LDINCREG (0x00, 1)},
{"ld1.nta", LDINCREG (0x00, 3)},
@@ -376,26 +380,26 @@ struct ia64_opcode ia64_opcodes_m[] =
{"ld8.c.clr.acq.nta", LDINCREG (0x2b, 3)},
#undef LDINCREG
- {"st1", M, OpMXX6aHint (4, 0, 0, 0x30, 0), {MR3, R2}},
- {"st1.nta", M, OpMXX6aHint (4, 0, 0, 0x30, 3), {MR3, R2}},
- {"st2", M, OpMXX6aHint (4, 0, 0, 0x31, 0), {MR3, R2}},
- {"st2.nta", M, OpMXX6aHint (4, 0, 0, 0x31, 3), {MR3, R2}},
- {"st4", M, OpMXX6aHint (4, 0, 0, 0x32, 0), {MR3, R2}},
- {"st4.nta", M, OpMXX6aHint (4, 0, 0, 0x32, 3), {MR3, R2}},
- {"st8", M, OpMXX6aHint (4, 0, 0, 0x33, 0), {MR3, R2}},
- {"st8.nta", M, OpMXX6aHint (4, 0, 0, 0x33, 3), {MR3, R2}},
- {"st1.rel", M, OpMXX6aHint (4, 0, 0, 0x34, 0), {MR3, R2}},
- {"st1.rel.nta", M, OpMXX6aHint (4, 0, 0, 0x34, 3), {MR3, R2}},
- {"st2.rel", M, OpMXX6aHint (4, 0, 0, 0x35, 0), {MR3, R2}},
- {"st2.rel.nta", M, OpMXX6aHint (4, 0, 0, 0x35, 3), {MR3, R2}},
- {"st4.rel", M, OpMXX6aHint (4, 0, 0, 0x36, 0), {MR3, R2}},
- {"st4.rel.nta", M, OpMXX6aHint (4, 0, 0, 0x36, 3), {MR3, R2}},
- {"st8.rel", M, OpMXX6aHint (4, 0, 0, 0x37, 0), {MR3, R2}},
- {"st8.rel.nta", M, OpMXX6aHint (4, 0, 0, 0x37, 3), {MR3, R2}},
- {"st8.spill", M, OpMXX6aHint (4, 0, 0, 0x3b, 0), {MR3, R2}},
- {"st8.spill.nta", M, OpMXX6aHint (4, 0, 0, 0x3b, 3), {MR3, R2}},
+ {"st1", M, OpMXX6aHint (4, 0, 0, 0x30, 0), {MR3, R2}, EMPTY},
+ {"st1.nta", M, OpMXX6aHint (4, 0, 0, 0x30, 3), {MR3, R2}, EMPTY},
+ {"st2", M, OpMXX6aHint (4, 0, 0, 0x31, 0), {MR3, R2}, EMPTY},
+ {"st2.nta", M, OpMXX6aHint (4, 0, 0, 0x31, 3), {MR3, R2}, EMPTY},
+ {"st4", M, OpMXX6aHint (4, 0, 0, 0x32, 0), {MR3, R2}, EMPTY},
+ {"st4.nta", M, OpMXX6aHint (4, 0, 0, 0x32, 3), {MR3, R2}, EMPTY},
+ {"st8", M, OpMXX6aHint (4, 0, 0, 0x33, 0), {MR3, R2}, EMPTY},
+ {"st8.nta", M, OpMXX6aHint (4, 0, 0, 0x33, 3), {MR3, R2}, EMPTY},
+ {"st1.rel", M, OpMXX6aHint (4, 0, 0, 0x34, 0), {MR3, R2}, EMPTY},
+ {"st1.rel.nta", M, OpMXX6aHint (4, 0, 0, 0x34, 3), {MR3, R2}, EMPTY},
+ {"st2.rel", M, OpMXX6aHint (4, 0, 0, 0x35, 0), {MR3, R2}, EMPTY},
+ {"st2.rel.nta", M, OpMXX6aHint (4, 0, 0, 0x35, 3), {MR3, R2}, EMPTY},
+ {"st4.rel", M, OpMXX6aHint (4, 0, 0, 0x36, 0), {MR3, R2}, EMPTY},
+ {"st4.rel.nta", M, OpMXX6aHint (4, 0, 0, 0x36, 3), {MR3, R2}, EMPTY},
+ {"st8.rel", M, OpMXX6aHint (4, 0, 0, 0x37, 0), {MR3, R2}, EMPTY},
+ {"st8.rel.nta", M, OpMXX6aHint (4, 0, 0, 0x37, 3), {MR3, R2}, EMPTY},
+ {"st8.spill", M, OpMXX6aHint (4, 0, 0, 0x3b, 0), {MR3, R2}, EMPTY},
+ {"st8.spill.nta", M, OpMXX6aHint (4, 0, 0, 0x3b, 3), {MR3, R2}, EMPTY},
-#define CMPXCHG(c,h) M, OpMXX6aHint (4, 0, 1, c, h), {R1, MR3, R2, AR_CCV}
+#define CMPXCHG(c,h) M, OpMXX6aHint (4, 0, 1, c, h), {R1, MR3, R2, AR_CCV}, EMPTY
{"cmpxchg1.acq", CMPXCHG (0x00, 0)},
{"cmpxchg1.acq.nt1", CMPXCHG (0x00, 1)},
{"cmpxchg1.acq.nta", CMPXCHG (0x00, 3)},
@@ -421,39 +425,39 @@ struct ia64_opcode ia64_opcodes_m[] =
{"cmpxchg8.rel.nt1", CMPXCHG (0x07, 1)},
{"cmpxchg8.rel.nta", CMPXCHG (0x07, 3)},
#undef CMPXCHG
- {"xchg1", M, OpMXX6aHint (4, 0, 1, 0x08, 0), {R1, MR3, R2}},
- {"xchg1.nt1", M, OpMXX6aHint (4, 0, 1, 0x08, 1), {R1, MR3, R2}},
- {"xchg1.nta", M, OpMXX6aHint (4, 0, 1, 0x08, 3), {R1, MR3, R2}},
- {"xchg2", M, OpMXX6aHint (4, 0, 1, 0x09, 0), {R1, MR3, R2}},
- {"xchg2.nt1", M, OpMXX6aHint (4, 0, 1, 0x09, 1), {R1, MR3, R2}},
- {"xchg2.nta", M, OpMXX6aHint (4, 0, 1, 0x09, 3), {R1, MR3, R2}},
- {"xchg4", M, OpMXX6aHint (4, 0, 1, 0x0a, 0), {R1, MR3, R2}},
- {"xchg4.nt1", M, OpMXX6aHint (4, 0, 1, 0x0a, 1), {R1, MR3, R2}},
- {"xchg4.nta", M, OpMXX6aHint (4, 0, 1, 0x0a, 3), {R1, MR3, R2}},
- {"xchg8", M, OpMXX6aHint (4, 0, 1, 0x0b, 0), {R1, MR3, R2}},
- {"xchg8.nt1", M, OpMXX6aHint (4, 0, 1, 0x0b, 1), {R1, MR3, R2}},
- {"xchg8.nta", M, OpMXX6aHint (4, 0, 1, 0x0b, 3), {R1, MR3, R2}},
+ {"xchg1", M, OpMXX6aHint (4, 0, 1, 0x08, 0), {R1, MR3, R2}, EMPTY},
+ {"xchg1.nt1", M, OpMXX6aHint (4, 0, 1, 0x08, 1), {R1, MR3, R2}, EMPTY},
+ {"xchg1.nta", M, OpMXX6aHint (4, 0, 1, 0x08, 3), {R1, MR3, R2}, EMPTY},
+ {"xchg2", M, OpMXX6aHint (4, 0, 1, 0x09, 0), {R1, MR3, R2}, EMPTY},
+ {"xchg2.nt1", M, OpMXX6aHint (4, 0, 1, 0x09, 1), {R1, MR3, R2}, EMPTY},
+ {"xchg2.nta", M, OpMXX6aHint (4, 0, 1, 0x09, 3), {R1, MR3, R2}, EMPTY},
+ {"xchg4", M, OpMXX6aHint (4, 0, 1, 0x0a, 0), {R1, MR3, R2}, EMPTY},
+ {"xchg4.nt1", M, OpMXX6aHint (4, 0, 1, 0x0a, 1), {R1, MR3, R2}, EMPTY},
+ {"xchg4.nta", M, OpMXX6aHint (4, 0, 1, 0x0a, 3), {R1, MR3, R2}, EMPTY},
+ {"xchg8", M, OpMXX6aHint (4, 0, 1, 0x0b, 0), {R1, MR3, R2}, EMPTY},
+ {"xchg8.nt1", M, OpMXX6aHint (4, 0, 1, 0x0b, 1), {R1, MR3, R2}, EMPTY},
+ {"xchg8.nta", M, OpMXX6aHint (4, 0, 1, 0x0b, 3), {R1, MR3, R2}, EMPTY},
- {"fetchadd4.acq", M, OpMXX6aHint (4, 0, 1, 0x12, 0), {R1, MR3, INC3}},
- {"fetchadd4.acq.nt1", M, OpMXX6aHint (4, 0, 1, 0x12, 1), {R1, MR3, INC3}},
- {"fetchadd4.acq.nta", M, OpMXX6aHint (4, 0, 1, 0x12, 3), {R1, MR3, INC3}},
- {"fetchadd8.acq", M, OpMXX6aHint (4, 0, 1, 0x13, 0), {R1, MR3, INC3}},
- {"fetchadd8.acq.nt1", M, OpMXX6aHint (4, 0, 1, 0x13, 1), {R1, MR3, INC3}},
- {"fetchadd8.acq.nta", M, OpMXX6aHint (4, 0, 1, 0x13, 3), {R1, MR3, INC3}},
- {"fetchadd4.rel", M, OpMXX6aHint (4, 0, 1, 0x16, 0), {R1, MR3, INC3}},
- {"fetchadd4.rel.nt1", M, OpMXX6aHint (4, 0, 1, 0x16, 1), {R1, MR3, INC3}},
- {"fetchadd4.rel.nta", M, OpMXX6aHint (4, 0, 1, 0x16, 3), {R1, MR3, INC3}},
- {"fetchadd8.rel", M, OpMXX6aHint (4, 0, 1, 0x17, 0), {R1, MR3, INC3}},
- {"fetchadd8.rel.nt1", M, OpMXX6aHint (4, 0, 1, 0x17, 1), {R1, MR3, INC3}},
- {"fetchadd8.rel.nta", M, OpMXX6aHint (4, 0, 1, 0x17, 3), {R1, MR3, INC3}},
+ {"fetchadd4.acq", M, OpMXX6aHint (4, 0, 1, 0x12, 0), {R1, MR3, INC3}, EMPTY},
+ {"fetchadd4.acq.nt1", M, OpMXX6aHint (4, 0, 1, 0x12, 1), {R1, MR3, INC3}, EMPTY},
+ {"fetchadd4.acq.nta", M, OpMXX6aHint (4, 0, 1, 0x12, 3), {R1, MR3, INC3}, EMPTY},
+ {"fetchadd8.acq", M, OpMXX6aHint (4, 0, 1, 0x13, 0), {R1, MR3, INC3}, EMPTY},
+ {"fetchadd8.acq.nt1", M, OpMXX6aHint (4, 0, 1, 0x13, 1), {R1, MR3, INC3}, EMPTY},
+ {"fetchadd8.acq.nta", M, OpMXX6aHint (4, 0, 1, 0x13, 3), {R1, MR3, INC3}, EMPTY},
+ {"fetchadd4.rel", M, OpMXX6aHint (4, 0, 1, 0x16, 0), {R1, MR3, INC3}, EMPTY},
+ {"fetchadd4.rel.nt1", M, OpMXX6aHint (4, 0, 1, 0x16, 1), {R1, MR3, INC3}, EMPTY},
+ {"fetchadd4.rel.nta", M, OpMXX6aHint (4, 0, 1, 0x16, 3), {R1, MR3, INC3}, EMPTY},
+ {"fetchadd8.rel", M, OpMXX6aHint (4, 0, 1, 0x17, 0), {R1, MR3, INC3}, EMPTY},
+ {"fetchadd8.rel.nt1", M, OpMXX6aHint (4, 0, 1, 0x17, 1), {R1, MR3, INC3}, EMPTY},
+ {"fetchadd8.rel.nta", M, OpMXX6aHint (4, 0, 1, 0x17, 3), {R1, MR3, INC3}, EMPTY},
- {"getf.sig", M, OpMXX6a (4, 0, 1, 0x1c), {R1, F2}},
- {"getf.exp", M, OpMXX6a (4, 0, 1, 0x1d), {R1, F2}},
- {"getf.s", M, OpMXX6a (4, 0, 1, 0x1e), {R1, F2}},
- {"getf.d", M, OpMXX6a (4, 0, 1, 0x1f), {R1, F2}},
+ {"getf.sig", M, OpMXX6a (4, 0, 1, 0x1c), {R1, F2}, EMPTY},
+ {"getf.exp", M, OpMXX6a (4, 0, 1, 0x1d), {R1, F2}, EMPTY},
+ {"getf.s", M, OpMXX6a (4, 0, 1, 0x1e), {R1, F2}, EMPTY},
+ {"getf.d", M, OpMXX6a (4, 0, 1, 0x1f), {R1, F2}, EMPTY},
- /* integer load w/increment by immediate */
-#define LDINCIMMED(c,h) M, OpX6aHint (5, c, h), {R1, MR3, IMM9b}, POSTINC
+ /* Integer load w/increment by immediate. */
+#define LDINCIMMED(c,h) M, OpX6aHint (5, c, h), {R1, MR3, IMM9b}, POSTINC, 0, NULL
{"ld1", LDINCIMMED (0x00, 0)},
{"ld1.nt1", LDINCIMMED (0x00, 1)},
{"ld1.nta", LDINCIMMED (0x00, 3)},
@@ -567,8 +571,8 @@ struct ia64_opcode ia64_opcodes_m[] =
{"ld8.c.clr.acq.nta", LDINCIMMED (0x2b, 3)},
#undef LDINCIMMED
- /* store w/increment by immediate */
-#define STINCIMMED(c,h) M, OpX6aHint (5, c, h), {MR3, R2, IMM9a}, POSTINC
+ /* Store w/increment by immediate. */
+#define STINCIMMED(c,h) M, OpX6aHint (5, c, h), {MR3, R2, IMM9a}, POSTINC, 0, NULL
{"st1", STINCIMMED (0x30, 0)},
{"st1.nta", STINCIMMED (0x30, 3)},
{"st2", STINCIMMED (0x31, 0)},
@@ -589,85 +593,85 @@ struct ia64_opcode ia64_opcodes_m[] =
{"st8.spill.nta", STINCIMMED (0x3b, 3)},
#undef STINCIMMED
- /* floating-point load */
- {"ldfs", M, OpMXX6aHint (6, 0, 0, 0x02, 0), {F1, MR3}},
- {"ldfs.nt1", M, OpMXX6aHint (6, 0, 0, 0x02, 1), {F1, MR3}},
- {"ldfs.nta", M, OpMXX6aHint (6, 0, 0, 0x02, 3), {F1, MR3}},
- {"ldfd", M, OpMXX6aHint (6, 0, 0, 0x03, 0), {F1, MR3}},
- {"ldfd.nt1", M, OpMXX6aHint (6, 0, 0, 0x03, 1), {F1, MR3}},
- {"ldfd.nta", M, OpMXX6aHint (6, 0, 0, 0x03, 3), {F1, MR3}},
- {"ldf8", M, OpMXX6aHint (6, 0, 0, 0x01, 0), {F1, MR3}},
- {"ldf8.nt1", M, OpMXX6aHint (6, 0, 0, 0x01, 1), {F1, MR3}},
- {"ldf8.nta", M, OpMXX6aHint (6, 0, 0, 0x01, 3), {F1, MR3}},
- {"ldfe", M, OpMXX6aHint (6, 0, 0, 0x00, 0), {F1, MR3}},
- {"ldfe.nt1", M, OpMXX6aHint (6, 0, 0, 0x00, 1), {F1, MR3}},
- {"ldfe.nta", M, OpMXX6aHint (6, 0, 0, 0x00, 3), {F1, MR3}},
- {"ldfs.s", M, OpMXX6aHint (6, 0, 0, 0x06, 0), {F1, MR3}},
- {"ldfs.s.nt1", M, OpMXX6aHint (6, 0, 0, 0x06, 1), {F1, MR3}},
- {"ldfs.s.nta", M, OpMXX6aHint (6, 0, 0, 0x06, 3), {F1, MR3}},
- {"ldfd.s", M, OpMXX6aHint (6, 0, 0, 0x07, 0), {F1, MR3}},
- {"ldfd.s.nt1", M, OpMXX6aHint (6, 0, 0, 0x07, 1), {F1, MR3}},
- {"ldfd.s.nta", M, OpMXX6aHint (6, 0, 0, 0x07, 3), {F1, MR3}},
- {"ldf8.s", M, OpMXX6aHint (6, 0, 0, 0x05, 0), {F1, MR3}},
- {"ldf8.s.nt1", M, OpMXX6aHint (6, 0, 0, 0x05, 1), {F1, MR3}},
- {"ldf8.s.nta", M, OpMXX6aHint (6, 0, 0, 0x05, 3), {F1, MR3}},
- {"ldfe.s", M, OpMXX6aHint (6, 0, 0, 0x04, 0), {F1, MR3}},
- {"ldfe.s.nt1", M, OpMXX6aHint (6, 0, 0, 0x04, 1), {F1, MR3}},
- {"ldfe.s.nta", M, OpMXX6aHint (6, 0, 0, 0x04, 3), {F1, MR3}},
- {"ldfs.a", M, OpMXX6aHint (6, 0, 0, 0x0a, 0), {F1, MR3}},
- {"ldfs.a.nt1", M, OpMXX6aHint (6, 0, 0, 0x0a, 1), {F1, MR3}},
- {"ldfs.a.nta", M, OpMXX6aHint (6, 0, 0, 0x0a, 3), {F1, MR3}},
- {"ldfd.a", M, OpMXX6aHint (6, 0, 0, 0x0b, 0), {F1, MR3}},
- {"ldfd.a.nt1", M, OpMXX6aHint (6, 0, 0, 0x0b, 1), {F1, MR3}},
- {"ldfd.a.nta", M, OpMXX6aHint (6, 0, 0, 0x0b, 3), {F1, MR3}},
- {"ldf8.a", M, OpMXX6aHint (6, 0, 0, 0x09, 0), {F1, MR3}},
- {"ldf8.a.nt1", M, OpMXX6aHint (6, 0, 0, 0x09, 1), {F1, MR3}},
- {"ldf8.a.nta", M, OpMXX6aHint (6, 0, 0, 0x09, 3), {F1, MR3}},
- {"ldfe.a", M, OpMXX6aHint (6, 0, 0, 0x08, 0), {F1, MR3}},
- {"ldfe.a.nt1", M, OpMXX6aHint (6, 0, 0, 0x08, 1), {F1, MR3}},
- {"ldfe.a.nta", M, OpMXX6aHint (6, 0, 0, 0x08, 3), {F1, MR3}},
- {"ldfs.sa", M, OpMXX6aHint (6, 0, 0, 0x0e, 0), {F1, MR3}},
- {"ldfs.sa.nt1", M, OpMXX6aHint (6, 0, 0, 0x0e, 1), {F1, MR3}},
- {"ldfs.sa.nta", M, OpMXX6aHint (6, 0, 0, 0x0e, 3), {F1, MR3}},
- {"ldfd.sa", M, OpMXX6aHint (6, 0, 0, 0x0f, 0), {F1, MR3}},
- {"ldfd.sa.nt1", M, OpMXX6aHint (6, 0, 0, 0x0f, 1), {F1, MR3}},
- {"ldfd.sa.nta", M, OpMXX6aHint (6, 0, 0, 0x0f, 3), {F1, MR3}},
- {"ldf8.sa", M, OpMXX6aHint (6, 0, 0, 0x0d, 0), {F1, MR3}},
- {"ldf8.sa.nt1", M, OpMXX6aHint (6, 0, 0, 0x0d, 1), {F1, MR3}},
- {"ldf8.sa.nta", M, OpMXX6aHint (6, 0, 0, 0x0d, 3), {F1, MR3}},
- {"ldfe.sa", M, OpMXX6aHint (6, 0, 0, 0x0c, 0), {F1, MR3}},
- {"ldfe.sa.nt1", M, OpMXX6aHint (6, 0, 0, 0x0c, 1), {F1, MR3}},
- {"ldfe.sa.nta", M, OpMXX6aHint (6, 0, 0, 0x0c, 3), {F1, MR3}},
- {"ldf.fill", M, OpMXX6aHint (6, 0, 0, 0x1b, 0), {F1, MR3}},
- {"ldf.fill.nt1", M, OpMXX6aHint (6, 0, 0, 0x1b, 1), {F1, MR3}},
- {"ldf.fill.nta", M, OpMXX6aHint (6, 0, 0, 0x1b, 3), {F1, MR3}},
- {"ldfs.c.clr", M, OpMXX6aHint (6, 0, 0, 0x22, 0), {F1, MR3}},
- {"ldfs.c.clr.nt1", M, OpMXX6aHint (6, 0, 0, 0x22, 1), {F1, MR3}},
- {"ldfs.c.clr.nta", M, OpMXX6aHint (6, 0, 0, 0x22, 3), {F1, MR3}},
- {"ldfd.c.clr", M, OpMXX6aHint (6, 0, 0, 0x23, 0), {F1, MR3}},
- {"ldfd.c.clr.nt1", M, OpMXX6aHint (6, 0, 0, 0x23, 1), {F1, MR3}},
- {"ldfd.c.clr.nta", M, OpMXX6aHint (6, 0, 0, 0x23, 3), {F1, MR3}},
- {"ldf8.c.clr", M, OpMXX6aHint (6, 0, 0, 0x21, 0), {F1, MR3}},
- {"ldf8.c.clr.nt1", M, OpMXX6aHint (6, 0, 0, 0x21, 1), {F1, MR3}},
- {"ldf8.c.clr.nta", M, OpMXX6aHint (6, 0, 0, 0x21, 3), {F1, MR3}},
- {"ldfe.c.clr", M, OpMXX6aHint (6, 0, 0, 0x20, 0), {F1, MR3}},
- {"ldfe.c.clr.nt1", M, OpMXX6aHint (6, 0, 0, 0x20, 1), {F1, MR3}},
- {"ldfe.c.clr.nta", M, OpMXX6aHint (6, 0, 0, 0x20, 3), {F1, MR3}},
- {"ldfs.c.nc", M, OpMXX6aHint (6, 0, 0, 0x26, 0), {F1, MR3}},
- {"ldfs.c.nc.nt1", M, OpMXX6aHint (6, 0, 0, 0x26, 1), {F1, MR3}},
- {"ldfs.c.nc.nta", M, OpMXX6aHint (6, 0, 0, 0x26, 3), {F1, MR3}},
- {"ldfd.c.nc", M, OpMXX6aHint (6, 0, 0, 0x27, 0), {F1, MR3}},
- {"ldfd.c.nc.nt1", M, OpMXX6aHint (6, 0, 0, 0x27, 1), {F1, MR3}},
- {"ldfd.c.nc.nta", M, OpMXX6aHint (6, 0, 0, 0x27, 3), {F1, MR3}},
- {"ldf8.c.nc", M, OpMXX6aHint (6, 0, 0, 0x25, 0), {F1, MR3}},
- {"ldf8.c.nc.nt1", M, OpMXX6aHint (6, 0, 0, 0x25, 1), {F1, MR3}},
- {"ldf8.c.nc.nta", M, OpMXX6aHint (6, 0, 0, 0x25, 3), {F1, MR3}},
- {"ldfe.c.nc", M, OpMXX6aHint (6, 0, 0, 0x24, 0), {F1, MR3}},
- {"ldfe.c.nc.nt1", M, OpMXX6aHint (6, 0, 0, 0x24, 1), {F1, MR3}},
- {"ldfe.c.nc.nta", M, OpMXX6aHint (6, 0, 0, 0x24, 3), {F1, MR3}},
+ /* Floating-point load. */
+ {"ldfs", M, OpMXX6aHint (6, 0, 0, 0x02, 0), {F1, MR3}, EMPTY},
+ {"ldfs.nt1", M, OpMXX6aHint (6, 0, 0, 0x02, 1), {F1, MR3}, EMPTY},
+ {"ldfs.nta", M, OpMXX6aHint (6, 0, 0, 0x02, 3), {F1, MR3}, EMPTY},
+ {"ldfd", M, OpMXX6aHint (6, 0, 0, 0x03, 0), {F1, MR3}, EMPTY},
+ {"ldfd.nt1", M, OpMXX6aHint (6, 0, 0, 0x03, 1), {F1, MR3}, EMPTY},
+ {"ldfd.nta", M, OpMXX6aHint (6, 0, 0, 0x03, 3), {F1, MR3}, EMPTY},
+ {"ldf8", M, OpMXX6aHint (6, 0, 0, 0x01, 0), {F1, MR3}, EMPTY},
+ {"ldf8.nt1", M, OpMXX6aHint (6, 0, 0, 0x01, 1), {F1, MR3}, EMPTY},
+ {"ldf8.nta", M, OpMXX6aHint (6, 0, 0, 0x01, 3), {F1, MR3}, EMPTY},
+ {"ldfe", M, OpMXX6aHint (6, 0, 0, 0x00, 0), {F1, MR3}, EMPTY},
+ {"ldfe.nt1", M, OpMXX6aHint (6, 0, 0, 0x00, 1), {F1, MR3}, EMPTY},
+ {"ldfe.nta", M, OpMXX6aHint (6, 0, 0, 0x00, 3), {F1, MR3}, EMPTY},
+ {"ldfs.s", M, OpMXX6aHint (6, 0, 0, 0x06, 0), {F1, MR3}, EMPTY},
+ {"ldfs.s.nt1", M, OpMXX6aHint (6, 0, 0, 0x06, 1), {F1, MR3}, EMPTY},
+ {"ldfs.s.nta", M, OpMXX6aHint (6, 0, 0, 0x06, 3), {F1, MR3}, EMPTY},
+ {"ldfd.s", M, OpMXX6aHint (6, 0, 0, 0x07, 0), {F1, MR3}, EMPTY},
+ {"ldfd.s.nt1", M, OpMXX6aHint (6, 0, 0, 0x07, 1), {F1, MR3}, EMPTY},
+ {"ldfd.s.nta", M, OpMXX6aHint (6, 0, 0, 0x07, 3), {F1, MR3}, EMPTY},
+ {"ldf8.s", M, OpMXX6aHint (6, 0, 0, 0x05, 0), {F1, MR3}, EMPTY},
+ {"ldf8.s.nt1", M, OpMXX6aHint (6, 0, 0, 0x05, 1), {F1, MR3}, EMPTY},
+ {"ldf8.s.nta", M, OpMXX6aHint (6, 0, 0, 0x05, 3), {F1, MR3}, EMPTY},
+ {"ldfe.s", M, OpMXX6aHint (6, 0, 0, 0x04, 0), {F1, MR3}, EMPTY},
+ {"ldfe.s.nt1", M, OpMXX6aHint (6, 0, 0, 0x04, 1), {F1, MR3}, EMPTY},
+ {"ldfe.s.nta", M, OpMXX6aHint (6, 0, 0, 0x04, 3), {F1, MR3}, EMPTY},
+ {"ldfs.a", M, OpMXX6aHint (6, 0, 0, 0x0a, 0), {F1, MR3}, EMPTY},
+ {"ldfs.a.nt1", M, OpMXX6aHint (6, 0, 0, 0x0a, 1), {F1, MR3}, EMPTY},
+ {"ldfs.a.nta", M, OpMXX6aHint (6, 0, 0, 0x0a, 3), {F1, MR3}, EMPTY},
+ {"ldfd.a", M, OpMXX6aHint (6, 0, 0, 0x0b, 0), {F1, MR3}, EMPTY},
+ {"ldfd.a.nt1", M, OpMXX6aHint (6, 0, 0, 0x0b, 1), {F1, MR3}, EMPTY},
+ {"ldfd.a.nta", M, OpMXX6aHint (6, 0, 0, 0x0b, 3), {F1, MR3}, EMPTY},
+ {"ldf8.a", M, OpMXX6aHint (6, 0, 0, 0x09, 0), {F1, MR3}, EMPTY},
+ {"ldf8.a.nt1", M, OpMXX6aHint (6, 0, 0, 0x09, 1), {F1, MR3}, EMPTY},
+ {"ldf8.a.nta", M, OpMXX6aHint (6, 0, 0, 0x09, 3), {F1, MR3}, EMPTY},
+ {"ldfe.a", M, OpMXX6aHint (6, 0, 0, 0x08, 0), {F1, MR3}, EMPTY},
+ {"ldfe.a.nt1", M, OpMXX6aHint (6, 0, 0, 0x08, 1), {F1, MR3}, EMPTY},
+ {"ldfe.a.nta", M, OpMXX6aHint (6, 0, 0, 0x08, 3), {F1, MR3}, EMPTY},
+ {"ldfs.sa", M, OpMXX6aHint (6, 0, 0, 0x0e, 0), {F1, MR3}, EMPTY},
+ {"ldfs.sa.nt1", M, OpMXX6aHint (6, 0, 0, 0x0e, 1), {F1, MR3}, EMPTY},
+ {"ldfs.sa.nta", M, OpMXX6aHint (6, 0, 0, 0x0e, 3), {F1, MR3}, EMPTY},
+ {"ldfd.sa", M, OpMXX6aHint (6, 0, 0, 0x0f, 0), {F1, MR3}, EMPTY},
+ {"ldfd.sa.nt1", M, OpMXX6aHint (6, 0, 0, 0x0f, 1), {F1, MR3}, EMPTY},
+ {"ldfd.sa.nta", M, OpMXX6aHint (6, 0, 0, 0x0f, 3), {F1, MR3}, EMPTY},
+ {"ldf8.sa", M, OpMXX6aHint (6, 0, 0, 0x0d, 0), {F1, MR3}, EMPTY},
+ {"ldf8.sa.nt1", M, OpMXX6aHint (6, 0, 0, 0x0d, 1), {F1, MR3}, EMPTY},
+ {"ldf8.sa.nta", M, OpMXX6aHint (6, 0, 0, 0x0d, 3), {F1, MR3}, EMPTY},
+ {"ldfe.sa", M, OpMXX6aHint (6, 0, 0, 0x0c, 0), {F1, MR3}, EMPTY},
+ {"ldfe.sa.nt1", M, OpMXX6aHint (6, 0, 0, 0x0c, 1), {F1, MR3}, EMPTY},
+ {"ldfe.sa.nta", M, OpMXX6aHint (6, 0, 0, 0x0c, 3), {F1, MR3}, EMPTY},
+ {"ldf.fill", M, OpMXX6aHint (6, 0, 0, 0x1b, 0), {F1, MR3}, EMPTY},
+ {"ldf.fill.nt1", M, OpMXX6aHint (6, 0, 0, 0x1b, 1), {F1, MR3}, EMPTY},
+ {"ldf.fill.nta", M, OpMXX6aHint (6, 0, 0, 0x1b, 3), {F1, MR3}, EMPTY},
+ {"ldfs.c.clr", M, OpMXX6aHint (6, 0, 0, 0x22, 0), {F1, MR3}, EMPTY},
+ {"ldfs.c.clr.nt1", M, OpMXX6aHint (6, 0, 0, 0x22, 1), {F1, MR3}, EMPTY},
+ {"ldfs.c.clr.nta", M, OpMXX6aHint (6, 0, 0, 0x22, 3), {F1, MR3}, EMPTY},
+ {"ldfd.c.clr", M, OpMXX6aHint (6, 0, 0, 0x23, 0), {F1, MR3}, EMPTY},
+ {"ldfd.c.clr.nt1", M, OpMXX6aHint (6, 0, 0, 0x23, 1), {F1, MR3}, EMPTY},
+ {"ldfd.c.clr.nta", M, OpMXX6aHint (6, 0, 0, 0x23, 3), {F1, MR3}, EMPTY},
+ {"ldf8.c.clr", M, OpMXX6aHint (6, 0, 0, 0x21, 0), {F1, MR3}, EMPTY},
+ {"ldf8.c.clr.nt1", M, OpMXX6aHint (6, 0, 0, 0x21, 1), {F1, MR3}, EMPTY},
+ {"ldf8.c.clr.nta", M, OpMXX6aHint (6, 0, 0, 0x21, 3), {F1, MR3}, EMPTY},
+ {"ldfe.c.clr", M, OpMXX6aHint (6, 0, 0, 0x20, 0), {F1, MR3}, EMPTY},
+ {"ldfe.c.clr.nt1", M, OpMXX6aHint (6, 0, 0, 0x20, 1), {F1, MR3}, EMPTY},
+ {"ldfe.c.clr.nta", M, OpMXX6aHint (6, 0, 0, 0x20, 3), {F1, MR3}, EMPTY},
+ {"ldfs.c.nc", M, OpMXX6aHint (6, 0, 0, 0x26, 0), {F1, MR3}, EMPTY},
+ {"ldfs.c.nc.nt1", M, OpMXX6aHint (6, 0, 0, 0x26, 1), {F1, MR3}, EMPTY},
+ {"ldfs.c.nc.nta", M, OpMXX6aHint (6, 0, 0, 0x26, 3), {F1, MR3}, EMPTY},
+ {"ldfd.c.nc", M, OpMXX6aHint (6, 0, 0, 0x27, 0), {F1, MR3}, EMPTY},
+ {"ldfd.c.nc.nt1", M, OpMXX6aHint (6, 0, 0, 0x27, 1), {F1, MR3}, EMPTY},
+ {"ldfd.c.nc.nta", M, OpMXX6aHint (6, 0, 0, 0x27, 3), {F1, MR3}, EMPTY},
+ {"ldf8.c.nc", M, OpMXX6aHint (6, 0, 0, 0x25, 0), {F1, MR3}, EMPTY},
+ {"ldf8.c.nc.nt1", M, OpMXX6aHint (6, 0, 0, 0x25, 1), {F1, MR3}, EMPTY},
+ {"ldf8.c.nc.nta", M, OpMXX6aHint (6, 0, 0, 0x25, 3), {F1, MR3}, EMPTY},
+ {"ldfe.c.nc", M, OpMXX6aHint (6, 0, 0, 0x24, 0), {F1, MR3}, EMPTY},
+ {"ldfe.c.nc.nt1", M, OpMXX6aHint (6, 0, 0, 0x24, 1), {F1, MR3}, EMPTY},
+ {"ldfe.c.nc.nta", M, OpMXX6aHint (6, 0, 0, 0x24, 3), {F1, MR3}, EMPTY},
- /* floating-point load w/increment by register */
-#define FLDINCREG(c,h) M, OpMXX6aHint (6, 1, 0, c, h), {F1, MR3, R2}, POSTINC
+ /* Floating-point load w/increment by register. */
+#define FLDINCREG(c,h) M, OpMXX6aHint (6, 1, 0, c, h), {F1, MR3, R2}, POSTINC, 0, NULL
{"ldfs", FLDINCREG (0x02, 0)},
{"ldfs.nt1", FLDINCREG (0x02, 1)},
{"ldfs.nta", FLDINCREG (0x02, 3)},
@@ -745,76 +749,76 @@ struct ia64_opcode ia64_opcodes_m[] =
{"ldfe.c.nc.nta", FLDINCREG (0x24, 3)},
#undef FLDINCREG
- /* floating-point store */
- {"stfs", M, OpMXX6aHint (6, 0, 0, 0x32, 0), {MR3, F2}},
- {"stfs.nta", M, OpMXX6aHint (6, 0, 0, 0x32, 3), {MR3, F2}},
- {"stfd", M, OpMXX6aHint (6, 0, 0, 0x33, 0), {MR3, F2}},
- {"stfd.nta", M, OpMXX6aHint (6, 0, 0, 0x33, 3), {MR3, F2}},
- {"stf8", M, OpMXX6aHint (6, 0, 0, 0x31, 0), {MR3, F2}},
- {"stf8.nta", M, OpMXX6aHint (6, 0, 0, 0x31, 3), {MR3, F2}},
- {"stfe", M, OpMXX6aHint (6, 0, 0, 0x30, 0), {MR3, F2}},
- {"stfe.nta", M, OpMXX6aHint (6, 0, 0, 0x30, 3), {MR3, F2}},
- {"stf.spill", M, OpMXX6aHint (6, 0, 0, 0x3b, 0), {MR3, F2}},
- {"stf.spill.nta", M, OpMXX6aHint (6, 0, 0, 0x3b, 3), {MR3, F2}},
+ /* Floating-point store. */
+ {"stfs", M, OpMXX6aHint (6, 0, 0, 0x32, 0), {MR3, F2}, EMPTY},
+ {"stfs.nta", M, OpMXX6aHint (6, 0, 0, 0x32, 3), {MR3, F2}, EMPTY},
+ {"stfd", M, OpMXX6aHint (6, 0, 0, 0x33, 0), {MR3, F2}, EMPTY},
+ {"stfd.nta", M, OpMXX6aHint (6, 0, 0, 0x33, 3), {MR3, F2}, EMPTY},
+ {"stf8", M, OpMXX6aHint (6, 0, 0, 0x31, 0), {MR3, F2}, EMPTY},
+ {"stf8.nta", M, OpMXX6aHint (6, 0, 0, 0x31, 3), {MR3, F2}, EMPTY},
+ {"stfe", M, OpMXX6aHint (6, 0, 0, 0x30, 0), {MR3, F2}, EMPTY},
+ {"stfe.nta", M, OpMXX6aHint (6, 0, 0, 0x30, 3), {MR3, F2}, EMPTY},
+ {"stf.spill", M, OpMXX6aHint (6, 0, 0, 0x3b, 0), {MR3, F2}, EMPTY},
+ {"stf.spill.nta", M, OpMXX6aHint (6, 0, 0, 0x3b, 3), {MR3, F2}, EMPTY},
- /* floating-point load pair */
- {"ldfps", M2, OpMXX6aHint (6, 0, 1, 0x02, 0), {F1, F2, MR3}},
- {"ldfps.nt1", M2, OpMXX6aHint (6, 0, 1, 0x02, 1), {F1, F2, MR3}},
- {"ldfps.nta", M2, OpMXX6aHint (6, 0, 1, 0x02, 3), {F1, F2, MR3}},
- {"ldfpd", M2, OpMXX6aHint (6, 0, 1, 0x03, 0), {F1, F2, MR3}},
- {"ldfpd.nt1", M2, OpMXX6aHint (6, 0, 1, 0x03, 1), {F1, F2, MR3}},
- {"ldfpd.nta", M2, OpMXX6aHint (6, 0, 1, 0x03, 3), {F1, F2, MR3}},
- {"ldfp8", M2, OpMXX6aHint (6, 0, 1, 0x01, 0), {F1, F2, MR3}},
- {"ldfp8.nt1", M2, OpMXX6aHint (6, 0, 1, 0x01, 1), {F1, F2, MR3}},
- {"ldfp8.nta", M2, OpMXX6aHint (6, 0, 1, 0x01, 3), {F1, F2, MR3}},
- {"ldfps.s", M2, OpMXX6aHint (6, 0, 1, 0x06, 0), {F1, F2, MR3}},
- {"ldfps.s.nt1", M2, OpMXX6aHint (6, 0, 1, 0x06, 1), {F1, F2, MR3}},
- {"ldfps.s.nta", M2, OpMXX6aHint (6, 0, 1, 0x06, 3), {F1, F2, MR3}},
- {"ldfpd.s", M2, OpMXX6aHint (6, 0, 1, 0x07, 0), {F1, F2, MR3}},
- {"ldfpd.s.nt1", M2, OpMXX6aHint (6, 0, 1, 0x07, 1), {F1, F2, MR3}},
- {"ldfpd.s.nta", M2, OpMXX6aHint (6, 0, 1, 0x07, 3), {F1, F2, MR3}},
- {"ldfp8.s", M2, OpMXX6aHint (6, 0, 1, 0x05, 0), {F1, F2, MR3}},
- {"ldfp8.s.nt1", M2, OpMXX6aHint (6, 0, 1, 0x05, 1), {F1, F2, MR3}},
- {"ldfp8.s.nta", M2, OpMXX6aHint (6, 0, 1, 0x05, 3), {F1, F2, MR3}},
- {"ldfps.a", M2, OpMXX6aHint (6, 0, 1, 0x0a, 0), {F1, F2, MR3}},
- {"ldfps.a.nt1", M2, OpMXX6aHint (6, 0, 1, 0x0a, 1), {F1, F2, MR3}},
- {"ldfps.a.nta", M2, OpMXX6aHint (6, 0, 1, 0x0a, 3), {F1, F2, MR3}},
- {"ldfpd.a", M2, OpMXX6aHint (6, 0, 1, 0x0b, 0), {F1, F2, MR3}},
- {"ldfpd.a.nt1", M2, OpMXX6aHint (6, 0, 1, 0x0b, 1), {F1, F2, MR3}},
- {"ldfpd.a.nta", M2, OpMXX6aHint (6, 0, 1, 0x0b, 3), {F1, F2, MR3}},
- {"ldfp8.a", M2, OpMXX6aHint (6, 0, 1, 0x09, 0), {F1, F2, MR3}},
- {"ldfp8.a.nt1", M2, OpMXX6aHint (6, 0, 1, 0x09, 1), {F1, F2, MR3}},
- {"ldfp8.a.nta", M2, OpMXX6aHint (6, 0, 1, 0x09, 3), {F1, F2, MR3}},
- {"ldfps.sa", M2, OpMXX6aHint (6, 0, 1, 0x0e, 0), {F1, F2, MR3}},
- {"ldfps.sa.nt1", M2, OpMXX6aHint (6, 0, 1, 0x0e, 1), {F1, F2, MR3}},
- {"ldfps.sa.nta", M2, OpMXX6aHint (6, 0, 1, 0x0e, 3), {F1, F2, MR3}},
- {"ldfpd.sa", M2, OpMXX6aHint (6, 0, 1, 0x0f, 0), {F1, F2, MR3}},
- {"ldfpd.sa.nt1", M2, OpMXX6aHint (6, 0, 1, 0x0f, 1), {F1, F2, MR3}},
- {"ldfpd.sa.nta", M2, OpMXX6aHint (6, 0, 1, 0x0f, 3), {F1, F2, MR3}},
- {"ldfp8.sa", M2, OpMXX6aHint (6, 0, 1, 0x0d, 0), {F1, F2, MR3}},
- {"ldfp8.sa.nt1", M2, OpMXX6aHint (6, 0, 1, 0x0d, 1), {F1, F2, MR3}},
- {"ldfp8.sa.nta", M2, OpMXX6aHint (6, 0, 1, 0x0d, 3), {F1, F2, MR3}},
- {"ldfps.c.clr", M2, OpMXX6aHint (6, 0, 1, 0x22, 0), {F1, F2, MR3}},
- {"ldfps.c.clr.nt1", M2, OpMXX6aHint (6, 0, 1, 0x22, 1), {F1, F2, MR3}},
- {"ldfps.c.clr.nta", M2, OpMXX6aHint (6, 0, 1, 0x22, 3), {F1, F2, MR3}},
- {"ldfpd.c.clr", M2, OpMXX6aHint (6, 0, 1, 0x23, 0), {F1, F2, MR3}},
- {"ldfpd.c.clr.nt1", M2, OpMXX6aHint (6, 0, 1, 0x23, 1), {F1, F2, MR3}},
- {"ldfpd.c.clr.nta", M2, OpMXX6aHint (6, 0, 1, 0x23, 3), {F1, F2, MR3}},
- {"ldfp8.c.clr", M2, OpMXX6aHint (6, 0, 1, 0x21, 0), {F1, F2, MR3}},
- {"ldfp8.c.clr.nt1", M2, OpMXX6aHint (6, 0, 1, 0x21, 1), {F1, F2, MR3}},
- {"ldfp8.c.clr.nta", M2, OpMXX6aHint (6, 0, 1, 0x21, 3), {F1, F2, MR3}},
- {"ldfps.c.nc", M2, OpMXX6aHint (6, 0, 1, 0x26, 0), {F1, F2, MR3}},
- {"ldfps.c.nc.nt1", M2, OpMXX6aHint (6, 0, 1, 0x26, 1), {F1, F2, MR3}},
- {"ldfps.c.nc.nta", M2, OpMXX6aHint (6, 0, 1, 0x26, 3), {F1, F2, MR3}},
- {"ldfpd.c.nc", M2, OpMXX6aHint (6, 0, 1, 0x27, 0), {F1, F2, MR3}},
- {"ldfpd.c.nc.nt1", M2, OpMXX6aHint (6, 0, 1, 0x27, 1), {F1, F2, MR3}},
- {"ldfpd.c.nc.nta", M2, OpMXX6aHint (6, 0, 1, 0x27, 3), {F1, F2, MR3}},
- {"ldfp8.c.nc", M2, OpMXX6aHint (6, 0, 1, 0x25, 0), {F1, F2, MR3}},
- {"ldfp8.c.nc.nt1", M2, OpMXX6aHint (6, 0, 1, 0x25, 1), {F1, F2, MR3}},
- {"ldfp8.c.nc.nta", M2, OpMXX6aHint (6, 0, 1, 0x25, 3), {F1, F2, MR3}},
+ /* Floating-point load pair. */
+ {"ldfps", M2, OpMXX6aHint (6, 0, 1, 0x02, 0), {F1, F2, MR3}, EMPTY},
+ {"ldfps.nt1", M2, OpMXX6aHint (6, 0, 1, 0x02, 1), {F1, F2, MR3}, EMPTY},
+ {"ldfps.nta", M2, OpMXX6aHint (6, 0, 1, 0x02, 3), {F1, F2, MR3}, EMPTY},
+ {"ldfpd", M2, OpMXX6aHint (6, 0, 1, 0x03, 0), {F1, F2, MR3}, EMPTY},
+ {"ldfpd.nt1", M2, OpMXX6aHint (6, 0, 1, 0x03, 1), {F1, F2, MR3}, EMPTY},
+ {"ldfpd.nta", M2, OpMXX6aHint (6, 0, 1, 0x03, 3), {F1, F2, MR3}, EMPTY},
+ {"ldfp8", M2, OpMXX6aHint (6, 0, 1, 0x01, 0), {F1, F2, MR3}, EMPTY},
+ {"ldfp8.nt1", M2, OpMXX6aHint (6, 0, 1, 0x01, 1), {F1, F2, MR3}, EMPTY},
+ {"ldfp8.nta", M2, OpMXX6aHint (6, 0, 1, 0x01, 3), {F1, F2, MR3}, EMPTY},
+ {"ldfps.s", M2, OpMXX6aHint (6, 0, 1, 0x06, 0), {F1, F2, MR3}, EMPTY},
+ {"ldfps.s.nt1", M2, OpMXX6aHint (6, 0, 1, 0x06, 1), {F1, F2, MR3}, EMPTY},
+ {"ldfps.s.nta", M2, OpMXX6aHint (6, 0, 1, 0x06, 3), {F1, F2, MR3}, EMPTY},
+ {"ldfpd.s", M2, OpMXX6aHint (6, 0, 1, 0x07, 0), {F1, F2, MR3}, EMPTY},
+ {"ldfpd.s.nt1", M2, OpMXX6aHint (6, 0, 1, 0x07, 1), {F1, F2, MR3}, EMPTY},
+ {"ldfpd.s.nta", M2, OpMXX6aHint (6, 0, 1, 0x07, 3), {F1, F2, MR3}, EMPTY},
+ {"ldfp8.s", M2, OpMXX6aHint (6, 0, 1, 0x05, 0), {F1, F2, MR3}, EMPTY},
+ {"ldfp8.s.nt1", M2, OpMXX6aHint (6, 0, 1, 0x05, 1), {F1, F2, MR3}, EMPTY},
+ {"ldfp8.s.nta", M2, OpMXX6aHint (6, 0, 1, 0x05, 3), {F1, F2, MR3}, EMPTY},
+ {"ldfps.a", M2, OpMXX6aHint (6, 0, 1, 0x0a, 0), {F1, F2, MR3}, EMPTY},
+ {"ldfps.a.nt1", M2, OpMXX6aHint (6, 0, 1, 0x0a, 1), {F1, F2, MR3}, EMPTY},
+ {"ldfps.a.nta", M2, OpMXX6aHint (6, 0, 1, 0x0a, 3), {F1, F2, MR3}, EMPTY},
+ {"ldfpd.a", M2, OpMXX6aHint (6, 0, 1, 0x0b, 0), {F1, F2, MR3}, EMPTY},
+ {"ldfpd.a.nt1", M2, OpMXX6aHint (6, 0, 1, 0x0b, 1), {F1, F2, MR3}, EMPTY},
+ {"ldfpd.a.nta", M2, OpMXX6aHint (6, 0, 1, 0x0b, 3), {F1, F2, MR3}, EMPTY},
+ {"ldfp8.a", M2, OpMXX6aHint (6, 0, 1, 0x09, 0), {F1, F2, MR3}, EMPTY},
+ {"ldfp8.a.nt1", M2, OpMXX6aHint (6, 0, 1, 0x09, 1), {F1, F2, MR3}, EMPTY},
+ {"ldfp8.a.nta", M2, OpMXX6aHint (6, 0, 1, 0x09, 3), {F1, F2, MR3}, EMPTY},
+ {"ldfps.sa", M2, OpMXX6aHint (6, 0, 1, 0x0e, 0), {F1, F2, MR3}, EMPTY},
+ {"ldfps.sa.nt1", M2, OpMXX6aHint (6, 0, 1, 0x0e, 1), {F1, F2, MR3}, EMPTY},
+ {"ldfps.sa.nta", M2, OpMXX6aHint (6, 0, 1, 0x0e, 3), {F1, F2, MR3}, EMPTY},
+ {"ldfpd.sa", M2, OpMXX6aHint (6, 0, 1, 0x0f, 0), {F1, F2, MR3}, EMPTY},
+ {"ldfpd.sa.nt1", M2, OpMXX6aHint (6, 0, 1, 0x0f, 1), {F1, F2, MR3}, EMPTY},
+ {"ldfpd.sa.nta", M2, OpMXX6aHint (6, 0, 1, 0x0f, 3), {F1, F2, MR3}, EMPTY},
+ {"ldfp8.sa", M2, OpMXX6aHint (6, 0, 1, 0x0d, 0), {F1, F2, MR3}, EMPTY},
+ {"ldfp8.sa.nt1", M2, OpMXX6aHint (6, 0, 1, 0x0d, 1), {F1, F2, MR3}, EMPTY},
+ {"ldfp8.sa.nta", M2, OpMXX6aHint (6, 0, 1, 0x0d, 3), {F1, F2, MR3}, EMPTY},
+ {"ldfps.c.clr", M2, OpMXX6aHint (6, 0, 1, 0x22, 0), {F1, F2, MR3}, EMPTY},
+ {"ldfps.c.clr.nt1", M2, OpMXX6aHint (6, 0, 1, 0x22, 1), {F1, F2, MR3}, EMPTY},
+ {"ldfps.c.clr.nta", M2, OpMXX6aHint (6, 0, 1, 0x22, 3), {F1, F2, MR3}, EMPTY},
+ {"ldfpd.c.clr", M2, OpMXX6aHint (6, 0, 1, 0x23, 0), {F1, F2, MR3}, EMPTY},
+ {"ldfpd.c.clr.nt1", M2, OpMXX6aHint (6, 0, 1, 0x23, 1), {F1, F2, MR3}, EMPTY},
+ {"ldfpd.c.clr.nta", M2, OpMXX6aHint (6, 0, 1, 0x23, 3), {F1, F2, MR3}, EMPTY},
+ {"ldfp8.c.clr", M2, OpMXX6aHint (6, 0, 1, 0x21, 0), {F1, F2, MR3}, EMPTY},
+ {"ldfp8.c.clr.nt1", M2, OpMXX6aHint (6, 0, 1, 0x21, 1), {F1, F2, MR3}, EMPTY},
+ {"ldfp8.c.clr.nta", M2, OpMXX6aHint (6, 0, 1, 0x21, 3), {F1, F2, MR3}, EMPTY},
+ {"ldfps.c.nc", M2, OpMXX6aHint (6, 0, 1, 0x26, 0), {F1, F2, MR3}, EMPTY},
+ {"ldfps.c.nc.nt1", M2, OpMXX6aHint (6, 0, 1, 0x26, 1), {F1, F2, MR3}, EMPTY},
+ {"ldfps.c.nc.nta", M2, OpMXX6aHint (6, 0, 1, 0x26, 3), {F1, F2, MR3}, EMPTY},
+ {"ldfpd.c.nc", M2, OpMXX6aHint (6, 0, 1, 0x27, 0), {F1, F2, MR3}, EMPTY},
+ {"ldfpd.c.nc.nt1", M2, OpMXX6aHint (6, 0, 1, 0x27, 1), {F1, F2, MR3}, EMPTY},
+ {"ldfpd.c.nc.nta", M2, OpMXX6aHint (6, 0, 1, 0x27, 3), {F1, F2, MR3}, EMPTY},
+ {"ldfp8.c.nc", M2, OpMXX6aHint (6, 0, 1, 0x25, 0), {F1, F2, MR3}, EMPTY},
+ {"ldfp8.c.nc.nt1", M2, OpMXX6aHint (6, 0, 1, 0x25, 1), {F1, F2, MR3}, EMPTY},
+ {"ldfp8.c.nc.nta", M2, OpMXX6aHint (6, 0, 1, 0x25, 3), {F1, F2, MR3}, EMPTY},
- /* floating-point load pair w/increment by immediate */
-#define LD(a,b,c) M2, OpMXX6aHint (6, 1, 1, a, b), {F1, F2, MR3, c}, POSTINC
+ /* Floating-point load pair w/increment by immediate. */
+#define LD(a,b,c) M2, OpMXX6aHint (6, 1, 1, a, b), {F1, F2, MR3, c}, POSTINC, 0, NULL
{"ldfps", LD (0x02, 0, C8)},
{"ldfps.nt1", LD (0x02, 1, C8)},
{"ldfps.nta", LD (0x02, 3, C8)},
@@ -871,26 +875,26 @@ struct ia64_opcode ia64_opcodes_m[] =
{"ldfp8.c.nc.nta", LD (0x25, 3, C16)},
#undef LD
- /* line prefetch */
- {"lfetch", M0, OpMXX6aHint (6, 0, 0, 0x2c, 0), {MR3}},
- {"lfetch.nt1", M0, OpMXX6aHint (6, 0, 0, 0x2c, 1), {MR3}},
- {"lfetch.nt2", M0, OpMXX6aHint (6, 0, 0, 0x2c, 2), {MR3}},
- {"lfetch.nta", M0, OpMXX6aHint (6, 0, 0, 0x2c, 3), {MR3}},
- {"lfetch.excl", M0, OpMXX6aHint (6, 0, 0, 0x2d, 0), {MR3}},
- {"lfetch.excl.nt1", M0, OpMXX6aHint (6, 0, 0, 0x2d, 1), {MR3}},
- {"lfetch.excl.nt2", M0, OpMXX6aHint (6, 0, 0, 0x2d, 2), {MR3}},
- {"lfetch.excl.nta", M0, OpMXX6aHint (6, 0, 0, 0x2d, 3), {MR3}},
- {"lfetch.fault", M0, OpMXX6aHint (6, 0, 0, 0x2e, 0), {MR3}},
- {"lfetch.fault.nt1", M0, OpMXX6aHint (6, 0, 0, 0x2e, 1), {MR3}},
- {"lfetch.fault.nt2", M0, OpMXX6aHint (6, 0, 0, 0x2e, 2), {MR3}},
- {"lfetch.fault.nta", M0, OpMXX6aHint (6, 0, 0, 0x2e, 3), {MR3}},
- {"lfetch.fault.excl", M0, OpMXX6aHint (6, 0, 0, 0x2f, 0), {MR3}},
- {"lfetch.fault.excl.nt1", M0, OpMXX6aHint (6, 0, 0, 0x2f, 1), {MR3}},
- {"lfetch.fault.excl.nt2", M0, OpMXX6aHint (6, 0, 0, 0x2f, 2), {MR3}},
- {"lfetch.fault.excl.nta", M0, OpMXX6aHint (6, 0, 0, 0x2f, 3), {MR3}},
+ /* Line prefetch. */
+ {"lfetch", M0, OpMXX6aHint (6, 0, 0, 0x2c, 0), {MR3}, EMPTY},
+ {"lfetch.nt1", M0, OpMXX6aHint (6, 0, 0, 0x2c, 1), {MR3}, EMPTY},
+ {"lfetch.nt2", M0, OpMXX6aHint (6, 0, 0, 0x2c, 2), {MR3}, EMPTY},
+ {"lfetch.nta", M0, OpMXX6aHint (6, 0, 0, 0x2c, 3), {MR3}, EMPTY},
+ {"lfetch.excl", M0, OpMXX6aHint (6, 0, 0, 0x2d, 0), {MR3}, EMPTY},
+ {"lfetch.excl.nt1", M0, OpMXX6aHint (6, 0, 0, 0x2d, 1), {MR3}, EMPTY},
+ {"lfetch.excl.nt2", M0, OpMXX6aHint (6, 0, 0, 0x2d, 2), {MR3}, EMPTY},
+ {"lfetch.excl.nta", M0, OpMXX6aHint (6, 0, 0, 0x2d, 3), {MR3}, EMPTY},
+ {"lfetch.fault", M0, OpMXX6aHint (6, 0, 0, 0x2e, 0), {MR3}, EMPTY},
+ {"lfetch.fault.nt1", M0, OpMXX6aHint (6, 0, 0, 0x2e, 1), {MR3}, EMPTY},
+ {"lfetch.fault.nt2", M0, OpMXX6aHint (6, 0, 0, 0x2e, 2), {MR3}, EMPTY},
+ {"lfetch.fault.nta", M0, OpMXX6aHint (6, 0, 0, 0x2e, 3), {MR3}, EMPTY},
+ {"lfetch.fault.excl", M0, OpMXX6aHint (6, 0, 0, 0x2f, 0), {MR3}, EMPTY},
+ {"lfetch.fault.excl.nt1", M0, OpMXX6aHint (6, 0, 0, 0x2f, 1), {MR3}, EMPTY},
+ {"lfetch.fault.excl.nt2", M0, OpMXX6aHint (6, 0, 0, 0x2f, 2), {MR3}, EMPTY},
+ {"lfetch.fault.excl.nta", M0, OpMXX6aHint (6, 0, 0, 0x2f, 3), {MR3}, EMPTY},
- /* line prefetch w/increment by register */
-#define LFETCHINCREG(c,h) M0, OpMXX6aHint (6, 1, 0, c, h), {MR3, R2}, POSTINC
+ /* Line prefetch w/increment by register. */
+#define LFETCHINCREG(c,h) M0, OpMXX6aHint (6, 1, 0, c, h), {MR3, R2}, POSTINC, 0, NULL
{"lfetch", LFETCHINCREG (0x2c, 0)},
{"lfetch.nt1", LFETCHINCREG (0x2c, 1)},
{"lfetch.nt2", LFETCHINCREG (0x2c, 2)},
@@ -909,14 +913,14 @@ struct ia64_opcode ia64_opcodes_m[] =
{"lfetch.fault.excl.nta", LFETCHINCREG (0x2f, 3)},
#undef LFETCHINCREG
- /* semaphore operations */
- {"setf.sig", M, OpMXX6a (6, 0, 1, 0x1c), {F1, R2}},
- {"setf.exp", M, OpMXX6a (6, 0, 1, 0x1d), {F1, R2}},
- {"setf.s", M, OpMXX6a (6, 0, 1, 0x1e), {F1, R2}},
- {"setf.d", M, OpMXX6a (6, 0, 1, 0x1f), {F1, R2}},
+ /* Semaphore operations. */
+ {"setf.sig", M, OpMXX6a (6, 0, 1, 0x1c), {F1, R2}, EMPTY},
+ {"setf.exp", M, OpMXX6a (6, 0, 1, 0x1d), {F1, R2}, EMPTY},
+ {"setf.s", M, OpMXX6a (6, 0, 1, 0x1e), {F1, R2}, EMPTY},
+ {"setf.d", M, OpMXX6a (6, 0, 1, 0x1f), {F1, R2}, EMPTY},
- /* floating-point load w/increment by immediate */
-#define FLDINCIMMED(c,h) M, OpX6aHint (7, c, h), {F1, MR3, IMM9b}, POSTINC
+ /* Floating-point load w/increment by immediate. */
+#define FLDINCIMMED(c,h) M, OpX6aHint (7, c, h), {F1, MR3, IMM9b}, POSTINC, 0, NULL
{"ldfs", FLDINCIMMED (0x02, 0)},
{"ldfs.nt1", FLDINCIMMED (0x02, 1)},
{"ldfs.nta", FLDINCIMMED (0x02, 3)},
@@ -994,8 +998,8 @@ struct ia64_opcode ia64_opcodes_m[] =
{"ldfe.c.nc.nta", FLDINCIMMED (0x24, 3)},
#undef FLDINCIMMED
- /* floating-point store w/increment by immediate */
-#define FSTINCIMMED(c,h) M, OpX6aHint (7, c, h), {MR3, F2, IMM9a}, POSTINC
+ /* Floating-point store w/increment by immediate. */
+#define FSTINCIMMED(c,h) M, OpX6aHint (7, c, h), {MR3, F2, IMM9a}, POSTINC, 0, NULL
{"stfs", FSTINCIMMED (0x32, 0)},
{"stfs.nta", FSTINCIMMED (0x32, 3)},
{"stfd", FSTINCIMMED (0x33, 0)},
@@ -1008,8 +1012,8 @@ struct ia64_opcode ia64_opcodes_m[] =
{"stf.spill.nta", FSTINCIMMED (0x3b, 3)},
#undef FSTINCIMMED
- /* line prefetch w/increment by immediate */
-#define LFETCHINCIMMED(c,h) M0, OpX6aHint (7, c, h), {MR3, IMM9b}, POSTINC
+ /* Line prefetch w/increment by immediate. */
+#define LFETCHINCIMMED(c,h) M0, OpX6aHint (7, c, h), {MR3, IMM9b}, POSTINC, 0, NULL
{"lfetch", LFETCHINCIMMED (0x2c, 0)},
{"lfetch.nt1", LFETCHINCIMMED (0x2c, 1)},
{"lfetch.nt2", LFETCHINCIMMED (0x2c, 2)},
@@ -1028,7 +1032,7 @@ struct ia64_opcode ia64_opcodes_m[] =
{"lfetch.fault.excl.nta", LFETCHINCIMMED (0x2f, 3)},
#undef LFETCHINCIMMED
- {0}
+ {NULL, 0, 0, 0, 0, {0}, 0, 0, NULL}
};
#undef M0
@@ -1058,3 +1062,4 @@ struct ia64_opcode ia64_opcodes_m[] =
#undef OpXX6aHint
#undef OpMXX6a
#undef OpMXX6aHint
+#undef EMPTY
diff --git a/opcodes/ia64-opc-x.c b/opcodes/ia64-opc-x.c
index 5f382fd..9d9a6c1 100644
--- a/opcodes/ia64-opc-x.c
+++ b/opcodes/ia64-opc-x.c
@@ -1,5 +1,5 @@
/* ia64-opc-x.c -- IA-64 `X' opcode table.
- Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
Contributed by Timothy Wall <twall@cygnus.com>
This file is part of GDB, GAS, and the GNU binutils.
@@ -21,11 +21,11 @@
#include "ia64-opc.h"
-/* identify the specific X-unit type */
+/* Identify the specific X-unit type. */
#define X0 IA64_TYPE_X, 0
#define X IA64_TYPE_X, 1
-/* instruction bit fields: */
+/* Instruction bit fields: */
#define bBtype(x) (((ia64_insn) ((x) & 0x7)) << 6)
#define bD(x) (((ia64_insn) ((x) & 0x1)) << 35)
#define bPa(x) (((ia64_insn) ((x) & 0x1)) << 12)
@@ -58,36 +58,38 @@
struct ia64_opcode ia64_opcodes_x[] =
{
- {"break.x", X0, OpX3X6 (0, 0, 0x00), {IMMU62}},
- {"nop.x", X0, OpX3X6 (0, 0, 0x01), {IMMU62}},
- {"movl", X, OpVc (6, 0), {R1, IMMU64}},
+ {"break.x", X0, OpX3X6 (0, 0, 0x00), {IMMU62}, 0, 0, NULL},
+ {"nop.x", X0, OpX3X6 (0, 0, 0x01), {IMMU62}, 0, 0, NULL},
+ {"movl", X, OpVc (6, 0), {R1, IMMU64}, 0, 0, NULL},
#define BRL(a,b) \
- X0, OpBtypePaWhaDPr (0xC, 0, a, 0, b, 0), {TGT64}, 0
- {"brl.few", BRL (0, 0) | PSEUDO},
- {"brl", BRL (0, 0) | PSEUDO},
- {"brl.few.clr", BRL (0, 1) | PSEUDO},
- {"brl.clr", BRL (0, 1) | PSEUDO},
- {"brl.many", BRL (1, 0) | PSEUDO},
- {"brl.many.clr", BRL (1, 1) | PSEUDO},
+ X0, OpBtypePaWhaDPr (0xC, 0, a, 0, b, 0), {TGT64}, PSEUDO, 0, NULL
+ {"brl.few", BRL (0, 0)},
+ {"brl", BRL (0, 0)},
+ {"brl.few.clr", BRL (0, 1)},
+ {"brl.clr", BRL (0, 1)},
+ {"brl.many", BRL (1, 0)},
+ {"brl.many.clr", BRL (1, 1)},
#undef BRL
#define BRL(a,b,c) \
- X0, OpBtypePaWhaD (0xC, 0, a, b, c), {TGT64}, 0
+ X0, OpBtypePaWhaD (0xC, 0, a, b, c), {TGT64}, 0, 0, NULL
+#define BRLP(a,b,c) \
+ X0, OpBtypePaWhaD (0xC, 0, a, b, c), {TGT64}, PSEUDO, 0, NULL
{"brl.cond.sptk.few", BRL (0, 0, 0)},
- {"brl.cond.sptk", BRL (0, 0, 0) | PSEUDO},
+ {"brl.cond.sptk", BRLP (0, 0, 0)},
{"brl.cond.sptk.few.clr", BRL (0, 0, 1)},
- {"brl.cond.sptk.clr", BRL (0, 0, 1) | PSEUDO},
+ {"brl.cond.sptk.clr", BRLP (0, 0, 1)},
{"brl.cond.spnt.few", BRL (0, 1, 0)},
- {"brl.cond.spnt", BRL (0, 1, 0) | PSEUDO},
+ {"brl.cond.spnt", BRLP (0, 1, 0)},
{"brl.cond.spnt.few.clr", BRL (0, 1, 1)},
- {"brl.cond.spnt.clr", BRL (0, 1, 1) | PSEUDO},
+ {"brl.cond.spnt.clr", BRLP (0, 1, 1)},
{"brl.cond.dptk.few", BRL (0, 2, 0)},
- {"brl.cond.dptk", BRL (0, 2, 0) | PSEUDO},
+ {"brl.cond.dptk", BRLP (0, 2, 0)},
{"brl.cond.dptk.few.clr", BRL (0, 2, 1)},
- {"brl.cond.dptk.clr", BRL (0, 2, 1) | PSEUDO},
+ {"brl.cond.dptk.clr", BRLP (0, 2, 1)},
{"brl.cond.dpnt.few", BRL (0, 3, 0)},
- {"brl.cond.dpnt", BRL (0, 3, 0) | PSEUDO},
+ {"brl.cond.dpnt", BRLP (0, 3, 0)},
{"brl.cond.dpnt.few.clr", BRL (0, 3, 1)},
- {"brl.cond.dpnt.clr", BRL (0, 3, 1) | PSEUDO},
+ {"brl.cond.dpnt.clr", BRLP (0, 3, 1)},
{"brl.cond.sptk.many", BRL (1, 0, 0)},
{"brl.cond.sptk.many.clr", BRL (1, 0, 1)},
{"brl.cond.spnt.many", BRL (1, 1, 0)},
@@ -97,21 +99,21 @@ struct ia64_opcode ia64_opcodes_x[] =
{"brl.cond.dpnt.many", BRL (1, 3, 0)},
{"brl.cond.dpnt.many.clr", BRL (1, 3, 1)},
{"brl.sptk.few", BRL (0, 0, 0)},
- {"brl.sptk", BRL (0, 0, 0) | PSEUDO},
+ {"brl.sptk", BRLP (0, 0, 0)},
{"brl.sptk.few.clr", BRL (0, 0, 1)},
- {"brl.sptk.clr", BRL (0, 0, 1) | PSEUDO},
+ {"brl.sptk.clr", BRLP (0, 0, 1)},
{"brl.spnt.few", BRL (0, 1, 0)},
- {"brl.spnt", BRL (0, 1, 0) | PSEUDO},
+ {"brl.spnt", BRLP (0, 1, 0)},
{"brl.spnt.few.clr", BRL (0, 1, 1)},
- {"brl.spnt.clr", BRL (0, 1, 1) | PSEUDO},
+ {"brl.spnt.clr", BRLP (0, 1, 1)},
{"brl.dptk.few", BRL (0, 2, 0)},
- {"brl.dptk", BRL (0, 2, 0) | PSEUDO},
+ {"brl.dptk", BRLP (0, 2, 0)},
{"brl.dptk.few.clr", BRL (0, 2, 1)},
- {"brl.dptk.clr", BRL (0, 2, 1) | PSEUDO},
+ {"brl.dptk.clr", BRLP (0, 2, 1)},
{"brl.dpnt.few", BRL (0, 3, 0)},
- {"brl.dpnt", BRL (0, 3, 0) | PSEUDO},
+ {"brl.dpnt", BRLP (0, 3, 0)},
{"brl.dpnt.few.clr", BRL (0, 3, 1)},
- {"brl.dpnt.clr", BRL (0, 3, 1) | PSEUDO},
+ {"brl.dpnt.clr", BRLP (0, 3, 1)},
{"brl.sptk.many", BRL (1, 0, 0)},
{"brl.sptk.many.clr", BRL (1, 0, 1)},
{"brl.spnt.many", BRL (1, 1, 0)},
@@ -121,23 +123,25 @@ struct ia64_opcode ia64_opcodes_x[] =
{"brl.dpnt.many", BRL (1, 3, 0)},
{"brl.dpnt.many.clr", BRL (1, 3, 1)},
#undef BRL
-#define BRL(a,b,c) X, OpPaWhaD (0xD, a, b, c), {B1, TGT64}, 0
+#undef BRLP
+#define BRL(a,b,c) X, OpPaWhaD (0xD, a, b, c), {B1, TGT64}, 0, 0, NULL
+#define BRLP(a,b,c) X, OpPaWhaD (0xD, a, b, c), {B1, TGT64}, PSEUDO, 0, NULL
{"brl.call.sptk.few", BRL (0, 0, 0)},
- {"brl.call.sptk", BRL (0, 0, 0) | PSEUDO},
+ {"brl.call.sptk", BRLP (0, 0, 0)},
{"brl.call.sptk.few.clr", BRL (0, 0, 1)},
- {"brl.call.sptk.clr", BRL (0, 0, 1) | PSEUDO},
+ {"brl.call.sptk.clr", BRLP (0, 0, 1)},
{"brl.call.spnt.few", BRL (0, 1, 0)},
- {"brl.call.spnt", BRL (0, 1, 0) | PSEUDO},
+ {"brl.call.spnt", BRLP (0, 1, 0)},
{"brl.call.spnt.few.clr", BRL (0, 1, 1)},
- {"brl.call.spnt.clr", BRL (0, 1, 1) | PSEUDO},
+ {"brl.call.spnt.clr", BRLP (0, 1, 1)},
{"brl.call.dptk.few", BRL (0, 2, 0)},
- {"brl.call.dptk", BRL (0, 2, 0) | PSEUDO},
+ {"brl.call.dptk", BRLP (0, 2, 0)},
{"brl.call.dptk.few.clr", BRL (0, 2, 1)},
- {"brl.call.dptk.clr", BRL (0, 2, 1) | PSEUDO},
+ {"brl.call.dptk.clr", BRLP (0, 2, 1)},
{"brl.call.dpnt.few", BRL (0, 3, 0)},
- {"brl.call.dpnt", BRL (0, 3, 0) | PSEUDO},
+ {"brl.call.dpnt", BRLP (0, 3, 0)},
{"brl.call.dpnt.few.clr", BRL (0, 3, 1)},
- {"brl.call.dpnt.clr", BRL (0, 3, 1) | PSEUDO},
+ {"brl.call.dpnt.clr", BRLP (0, 3, 1)},
{"brl.call.sptk.many", BRL (1, 0, 0)},
{"brl.call.sptk.many.clr", BRL (1, 0, 1)},
{"brl.call.spnt.many", BRL (1, 1, 0)},
@@ -147,7 +151,8 @@ struct ia64_opcode ia64_opcodes_x[] =
{"brl.call.dpnt.many", BRL (1, 3, 0)},
{"brl.call.dpnt.many.clr", BRL (1, 3, 1)},
#undef BRL
- {0}
+#undef BRLP
+ {NULL, 0, 0, 0, 0, {0}, 0, 0, NULL}
};
#undef X0
diff --git a/opcodes/ppc-dis.c b/opcodes/ppc-dis.c
index 0c4cfe4..3df7dc1 100644
--- a/opcodes/ppc-dis.c
+++ b/opcodes/ppc-dis.c
@@ -52,13 +52,13 @@ powerpc_dialect(info)
|| strcmp (info->disassembler_options, "booke32") == 0
|| strcmp (info->disassembler_options, "booke64") == 0))
dialect |= PPC_OPCODE_BOOKE | PPC_OPCODE_BOOKE64;
- else
+ else
if ((info->mach == bfd_mach_ppc_e500)
- || (info->disassembler_options
+ || (info->disassembler_options
&& ( strcmp (info->disassembler_options, "e500") == 0
|| strcmp (info->disassembler_options, "e500x2") == 0)))
{
- dialect |= PPC_OPCODE_BOOKE
+ dialect |= PPC_OPCODE_BOOKE
| PPC_OPCODE_SPE | PPC_OPCODE_ISEL
| PPC_OPCODE_EFS | PPC_OPCODE_BRLOCK
| PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK
@@ -66,7 +66,7 @@ powerpc_dialect(info)
/* efs* and AltiVec conflict. */
dialect &= ~PPC_OPCODE_ALTIVEC;
}
- else
+ else
if (info->disassembler_options
&& (strcmp (info->disassembler_options, "efs") == 0))
{
@@ -177,7 +177,7 @@ print_insn_powerpc (memaddr, info, bigendian, dialect)
continue;
if ((dialect & PPC_OPCODE_EFS) && (opcode->flags & PPC_OPCODE_ALTIVEC))
- continue;
+ continue;
/* Make two passes over the operands. First see if any of them
have extraction functions, and, if they do, make sure the
@@ -262,14 +262,9 @@ print_insn_powerpc (memaddr, info, bigendian, dialect)
cr = value >> 2;
if (cr != 0)
- (*info->fprintf_func) (info->stream, "4*cr%d", cr);
+ (*info->fprintf_func) (info->stream, "4*cr%d+", cr);
cc = value & 3;
- if (cc != 0)
- {
- if (cr != 0)
- (*info->fprintf_func) (info->stream, "+");
- (*info->fprintf_func) (info->stream, "%s", cbnames[cc]);
- }
+ (*info->fprintf_func) (info->stream, "%s", cbnames[cc]);
}
}
@@ -304,7 +299,7 @@ print_ppc_disassembler_options (FILE * stream)
fprintf (stream, "\n\
The following PPC specific disassembler options are supported for use with\n\
the -M switch:\n");
-
+
fprintf (stream, " booke|booke32|booke64 Disassemble the BookE instructions\n");
fprintf (stream, " e500|e500x2 Disassemble the e500 instructions\n");
fprintf (stream, " efs Disassemble the EFS instructions\n");
diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
index f6c9ce4..dc014d2 100644
--- a/opcodes/ppc-opc.c
+++ b/opcodes/ppc-opc.c
@@ -544,15 +544,15 @@ const struct powerpc_operand powerpc_operands[] =
/* The other UIMM field in a half word EVX form instruction. */
#define EVUIMM_2 EVUIMM + 1
- { 5, 11, insert_ev2, extract_ev2, PPC_OPERAND_PARENS },
+ { 32, 11, insert_ev2, extract_ev2, PPC_OPERAND_PARENS },
/* The other UIMM field in a word EVX form instruction. */
#define EVUIMM_4 EVUIMM_2 + 1
- { 5, 11, insert_ev4, extract_ev4, PPC_OPERAND_PARENS },
+ { 32, 11, insert_ev4, extract_ev4, PPC_OPERAND_PARENS },
/* The other UIMM field in a double EVX form instruction. */
#define EVUIMM_8 EVUIMM_4 + 1
- { 8, 11, insert_ev8, extract_ev8, PPC_OPERAND_PARENS },
+ { 32, 11, insert_ev8, extract_ev8, PPC_OPERAND_PARENS },
/* The WS field. */
#define WS EVUIMM_8 + 1
@@ -2124,10 +2124,10 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "evsrwiu", VX(4, 546), VX_MASK, PPCSPE, { RD, RA, EVUIMM } },
{ "evsplati", VX(4, 553), VX_MASK, PPCSPE, { RD, SIMM } },
{ "evsplatfi", VX(4, 555), VX_MASK, PPCSPE, { RD, SIMM } },
-{ "evmergehi", VX(4, 556), VX_MASK, PPCSPE, { RD, RA, RB } },
-{ "evmergelo", VX(4, 557), VX_MASK, PPCSPE, { RD, RA, RB } },
-{ "evmergehilo",VX(4,558), VX_MASK, PPCSPE, { RD, RA, RB } },
-{ "evmergelohi",VX(4,559), VX_MASK, PPCSPE, { RD, RA, RB } },
+{ "evmergehi", VX(4, 556), VX_MASK, PPCSPE, { RS, RA, RB } },
+{ "evmergelo", VX(4, 557), VX_MASK, PPCSPE, { RS, RA, RB } },
+{ "evmergehilo",VX(4,558), VX_MASK, PPCSPE, { RS, RA, RB } },
+{ "evmergelohi",VX(4,559), VX_MASK, PPCSPE, { RS, RA, RB } },
{ "evcmpgts", VX(4, 561), VX_MASK, PPCSPE, { CRFD, RA, RB } },
{ "evcmpgtu", VX(4, 560), VX_MASK, PPCSPE, { CRFD, RA, RB } },
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index eb38a7b..1e49576 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,12 @@
+2002-11-13 Andrew Cagney <cagney@redhat.com>
+
+ * run.c (main): Remove SIM_HAVE_ENVIRONMENT from #endif.
+
+2002-11-06 Richard Sandiford <rsandifo@redhat.com>
+
+ * Make-common.in (SIM_EXTRA_DISTCLEAN): New macro.
+ (distclean): Depend on it.
+
2002-10-14 Alan Modra <amodra@bigpond.net.au>
* cgen-trace.h: Test __BFD_H_SEEN__ rather than BFD_VERSION.
diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
index 1f29f6a..e3e1239 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -134,6 +134,8 @@ SIM_EXTRA_ALL =
SIM_EXTRA_INSTALL =
# Dependency of `clean' to clean any extra files.
SIM_EXTRA_CLEAN =
+# Likewise `distclean'
+SIM_EXTRA_DISTCLEAN =
# Every time a new general purpose source file was added every target's
# Makefile.in needed to be updated to include the file in SIM_OBJS.
@@ -622,7 +624,7 @@ clean: $(SIM_EXTRA_CLEAN)
fi
rm -f tmp-mloop.hin tmp-mloop.h tmp-mloop.cin tmp-mloop.c
-distclean mostlyclean maintainer-clean realclean: clean
+distclean mostlyclean maintainer-clean realclean: clean $(SIM_EXTRA_DISTCLEAN)
rm -f TAGS
rm -f Makefile config.cache config.log config.status .gdbinit
rm -f tconfig.h config.h stamp-h
diff --git a/sim/common/run.c b/sim/common/run.c
index d8c86cd..ca3194b 100644
--- a/sim/common/run.c
+++ b/sim/common/run.c
@@ -156,7 +156,7 @@ main (ac, av)
target. */
operating_p = 1;
break;
-#endif SIM_HAVE_ENVIRONMENT
+#endif
#ifdef SIM_HAVE_PROFILE
case 'p':
sim_set_profile (atoi (optarg));
diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog
index 320eb98..9c42d35 100644
--- a/sim/d10v/ChangeLog
+++ b/sim/d10v/ChangeLog
@@ -1,3 +1,7 @@
+2002-11-13 Andrew Cagney <cagney@redhat.com>
+
+ * simops.c: Include <string.h>.
+
2002-06-17 Andrew Cagney <cagney@redhat.com>
* d10v_sim.h (SET_PSW_BIT): Add cast to avoid inverting an enum.
diff --git a/sim/d10v/simops.c b/sim/d10v/simops.c
index 1c0ecfe..fbffa4d 100644
--- a/sim/d10v/simops.c
+++ b/sim/d10v/simops.c
@@ -7,6 +7,9 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
#include "d10v_sim.h"
#include "simops.h"
diff --git a/sim/igen/ChangeLog b/sim/igen/ChangeLog
index 9484c22..4e4b3a4 100644
--- a/sim/igen/ChangeLog
+++ b/sim/igen/ChangeLog
@@ -1,3 +1,9 @@
+2002-11-06 Richard Sandiford <rsandifo@redhat.com>
+
+ * gen-engine.c (print_engine_issue_prefix_hook): Don't add the
+ global prefix to ENGINE_ISSUE_PREFIX_HOOK.
+ (print_engine_issue_postfix_hook): Likewise ENGINE_ISSUE_POSTFIX_HOOK.
+
2002-08-28 Dave Brolley <brolley@redhat.com>
* gen-support.c (gen_support_h): Generate
diff --git a/sim/igen/gen-engine.c b/sim/igen/gen-engine.c
index ee27e68..1de477d 100644
--- a/sim/igen/gen-engine.c
+++ b/sim/igen/gen-engine.c
@@ -41,10 +41,8 @@ print_engine_issue_prefix_hook (lf *file)
{
lf_printf (file, "\n");
lf_indent_suppress (file);
- lf_printf (file, "#if defined (%sENGINE_ISSUE_PREFIX_HOOK)\n",
- options.module.global.prefix.l);
- lf_printf (file, "%sENGINE_ISSUE_PREFIX_HOOK();\n",
- options.module.global.prefix.l);
+ lf_printf (file, "#if defined (ENGINE_ISSUE_PREFIX_HOOK)\n");
+ lf_printf (file, "ENGINE_ISSUE_PREFIX_HOOK();\n");
lf_indent_suppress (file);
lf_printf (file, "#endif\n");
lf_printf (file, "\n");
@@ -55,10 +53,8 @@ print_engine_issue_postfix_hook (lf *file)
{
lf_printf (file, "\n");
lf_indent_suppress (file);
- lf_printf (file, "#if defined (%sENGINE_ISSUE_POSTFIX_HOOK)\n",
- options.module.global.prefix.l);
- lf_printf (file, "%sENGINE_ISSUE_POSTFIX_HOOK();\n",
- options.module.global.prefix.l);
+ lf_printf (file, "#if defined (ENGINE_ISSUE_POSTFIX_HOOK)\n");
+ lf_printf (file, "ENGINE_ISSUE_POSTFIX_HOOK();\n");
lf_indent_suppress (file);
lf_printf (file, "#endif\n");
lf_printf (file, "\n");