summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>1999-07-07 17:31:57 +0000
committerJason Molenda <jmolenda@apple.com>1999-07-07 17:31:57 +0000
commit9846de1bb5d61521885ef51fa6b99121ec1be577 (patch)
tree56c938421752cf160876766aaee7e729a8e47050
parentf04894943e847e4c9dec6a7a73b9e03a3c0aa90a (diff)
downloadbinutils-gdb-9846de1bb5d61521885ef51fa6b99121ec1be577.tar.gz
import gdb-1999-07-07 pre reformat
-rw-r--r--gdb/ChangeLog53
-rw-r--r--gdb/Makefile.in6
-rw-r--r--gdb/NEWS1
-rw-r--r--gdb/config/a29k/tm-a29k.h5
-rw-r--r--gdb/config/m68k/xm-3b1.h2
-rw-r--r--gdb/config/pyr/pyramid.mh16
-rw-r--r--gdb/config/pyr/pyramid.mt6
-rw-r--r--gdb/config/pyr/tm-pyr.h966
-rw-r--r--gdb/config/pyr/xm-pyr.h184
-rw-r--r--gdb/configure.host6
-rw-r--r--gdb/configure.tgt4
-rw-r--r--gdb/defs.h2
-rw-r--r--gdb/dwarfread.c2
-rw-r--r--gdb/event-loop.h1
-rw-r--r--gdb/exec.c14
-rw-r--r--gdb/gdbtypes.c12
-rw-r--r--gdb/gnu-nat.c6
-rw-r--r--gdb/gnu-nat.h2
-rw-r--r--gdb/gnu-regex.c1
-rw-r--r--gdb/gnu-regex.h1
-rw-r--r--gdb/infcmd.c6
-rw-r--r--gdb/language.c2
-rw-r--r--gdb/lynx-nat.c2
-rw-r--r--gdb/mips-tdep.c2
-rw-r--r--gdb/mn10200-tdep.c3
-rw-r--r--gdb/parse.c4
-rw-r--r--gdb/pyr-tdep.c904
-rw-r--r--gdb/pyr-xdep.c738
-rw-r--r--gdb/remote-mips.c62
-rw-r--r--gdb/remote-os9k.c9
-rw-r--r--gdb/remote-rdp.c10
-rw-r--r--gdb/remote-sds.c40
-rw-r--r--gdb/remote-st.c9
-rw-r--r--gdb/remote-udi.c25
-rw-r--r--gdb/remote.c7
-rw-r--r--gdb/ser-tcp.c6
-rw-r--r--gdb/ser-unix.c6
-rw-r--r--gdb/sh-tdep.c2
-rw-r--r--gdb/sparc-tdep.c2
-rw-r--r--gdb/sparcl-tdep.c6
-rw-r--r--gdb/stabsread.c2
-rw-r--r--gdb/target.c2
-rw-r--r--gdb/testsuite/ChangeLog15
-rw-r--r--gdb/testsuite/gdb.base/Makefile.in2
-rw-r--r--gdb/testsuite/gdb.base/nodebug.exp3
-rw-r--r--gdb/testsuite/gdb.base/printcmds.exp8
-rw-r--r--gdb/testsuite/gdb.base/ptype.exp6
-rw-r--r--gdb/testsuite/gdb.base/setvar.exp3
-rw-r--r--gdb/testsuite/gdb.c++/Makefile.in2
-rw-r--r--gdb/utils.c30
-rw-r--r--gdb/xcoffread.c2
-rw-r--r--gdb/xmodem.c2
-rw-r--r--sim/common/ChangeLog13
-rw-r--r--sim/common/cgen-accfp.c24
-rw-r--r--sim/common/dv-sockser.c1
-rw-r--r--sim/common/sim-model.c7
-rw-r--r--sim/fr30/ChangeLog4
-rw-r--r--sim/fr30/cpu.h285
-rw-r--r--sim/fr30/decode.c759
-rw-r--r--sim/fr30/model.c24
-rw-r--r--sim/fr30/sem-switch.c24
-rw-r--r--sim/fr30/sem.c24
-rw-r--r--sim/mips/ChangeLog6
-rwxr-xr-xsim/mips/configure339
-rw-r--r--sim/mips/mips.igen18
-rw-r--r--sim/mips/tx.igen7
66 files changed, 2328 insertions, 2419 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ac6d4d2267d..b1d8b8f1ad1 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,56 @@
+1999-07-07 Stan Shebs <shebs@andros.cygnus.com>
+
+ * gnu-regex.c, gnu-regex.h: Don't let indent mess with these.
+
+Wed Jul 7 13:06:24 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * remote-mips.c (fputs_readable): Rename puts_readable, add struct
+ gdb_file argument.
+ (fputc_readable): Rename putc_readable, add struct gdb_file
+ argument.
+
+ * remote-mips.c (mips_expect_timeout, mips_receive_header,
+ mips_send_packet, mips_receive_packet), remote-rdp.c (put_byte,
+ get_byte, put_word, rdp_init, rdp_init), remote-sds.c
+ (sds_interrupt, sds_wait, readchar, putmessage, read_frame,
+ getmessage), remote-udi.c (udi_store_registers, fetch_register):
+ (store_register), xmodem.c (readchar), utils.c (puts_debug),
+ gnu-nat.h (debug), parse.c (parse_exp_1): Cleanup - send debug/log
+ messages to gdb_stdlog.
+
+1999-07-06 Stan Shebs <shebs@andros.cygnus.com>
+
+ * exec.c: Remove long-#ifed-out section of code that confuses
+ indent.
+ * gdbtypes.c (add_mangled_type): Add some braces to indicate
+ grouping better.
+ * gnu-nat.c: Remove literal newlines embedded in strings,
+ causes indent to weird out.
+ * language.c (binop_result_type): Remove extra paren.
+ * lynx-nat.c: Add a missing paren to fetch_core_registers decl.
+ * nec4102rom.c (vr4102_insert_step): Fix typos.
+ (_initialize_vr4102_rom): Remove literal newline in string.
+ * config/a29k/tm-a29k.h: Suppress formatting of pictures.
+ * config/m68k/xm-3b1.h: Remove excess #endif.
+
+ Declare Pyramid configuration obsolete.
+ * configure.host, configure.tgt: Comment out Pyramid configs.
+ * Makefile.in: Comment out Pyramid-related actions.
+ * pyr-xdep.c, pyr-tdep.c, config/pyr/*: Comment out.
+ * NEWS: Mention obsolete status.
+
+1999-07-06 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * remote.c: Include <sys/time.h> to pick up FD_SET et al defns on
+ some old Linux distributions.
+ * remote-os9k.c, remote-st.c, ser-tcp.c, ser-unix.c,
+ sparcl-tdep.c, remote.c: Back out inclusion of <sys/select.h>.
+ It isn't necessary after all.
+
+1999-07-06 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * infcmd.c (strip_bg_char): Remove assignment from 'if' condition.
+
1999-07-05 Jason Molenda (jsm@bugshack.cygnus.com)
* remote.c: Include <sys/select.h> if it exists in order to pick up
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index b13fa01b21e..a46d01a98b9 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -224,7 +224,7 @@ CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE) \
ADD_FILES = $(REGEX) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
ADD_DEPS = $(REGEX1) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
-VERSION = 19990705
+VERSION = 19990707
DIST=gdb
LINT=/usr/5bin/lint
@@ -1368,9 +1368,9 @@ printcmd.o: printcmd.c $(breakpoint_h) $(defs_h) $(expression_h) \
procfs.o: procfs.c $(command_h) $(defs_h) $(gdbcore_h) $(inferior_h) \
target.h gdb_string.h
-pyr-tdep.o: pyr-tdep.c $(defs_h)
+# OBSOLETE pyr-tdep.o: pyr-tdep.c $(defs_h)
-pyr-xdep.o: pyr-xdep.c $(defs_h) $(gdbcore_h) $(inferior_h)
+# OBSOLETE pyr-xdep.o: pyr-xdep.c $(defs_h) $(gdbcore_h) $(inferior_h)
gnu-regex.o: gnu-regex.c gnu-regex.h $(defs_h) gdb_string.h
diff --git a/gdb/NEWS b/gdb/NEWS
index c6cf4c399ab..9018d3cf0dd 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -11,6 +11,7 @@ TI TMS320C80 tic80-*-*
Altos 3068 m68*-altos-*
Convex c1-*-*, c2-*-*
+Pyramid pyramid-*-*
*** Changes in GDB-4.18:
diff --git a/gdb/config/a29k/tm-a29k.h b/gdb/config/a29k/tm-a29k.h
index 8fae020d403..8eb476e3cb2 100644
--- a/gdb/config/a29k/tm-a29k.h
+++ b/gdb/config/a29k/tm-a29k.h
@@ -310,6 +310,7 @@ extern use_struct_convention_fn a29k_use_struct_convention;
TYPE_LENGTH (TYPE)); \
}
+/* *INDENT-OFF* */
/* The a29k user's guide documents well what the stacks look like.
But what isn't so clear there is how this interracts with the
symbols, or with GDB.
@@ -410,6 +411,7 @@ extern use_struct_convention_fn a29k_use_struct_convention;
computed by adding msize to the saved_msp of the
next frame.
* msize is in the frame cache only for high C's sake. */
+/* *INDENT-ON* */
void read_register_stack ();
long read_register_stack_integer ();
@@ -513,7 +515,7 @@ void a29k_get_saved_register PARAMS ((char *raw_buffer, int *optimized, CORE_ADD
a29k_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
/* Call function stuff. */
-
+/* *INDENT-OFF* */
/* The dummy frame looks like this (see also the general frame picture
above):
@@ -563,6 +565,7 @@ void a29k_get_saved_register PARAMS ((char *raw_buffer, int *optimized, CORE_ADD
retaddr_sproc: Contains the PC at the time we call the function.
set by PUSH_DUMMY_FRAME and read by POP_FRAME.
retaddr_dummy: This points to a breakpoint instruction in the dummy. */
+/* *INDENT-ON* */
/* Rsize for dummy frame, in bytes. */
diff --git a/gdb/config/m68k/xm-3b1.h b/gdb/config/m68k/xm-3b1.h
index d1cc7f151eb..ad4b5b7c57a 100644
--- a/gdb/config/m68k/xm-3b1.h
+++ b/gdb/config/m68k/xm-3b1.h
@@ -81,5 +81,3 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
{ asm ("subil $8,28(sp)"); \
asm ("movem (sp),$ 0xffff"); \
asm ("rte"); }
-
-#endif
diff --git a/gdb/config/pyr/pyramid.mh b/gdb/config/pyr/pyramid.mh
index cd25e57e4a3..d7ebc37819b 100644
--- a/gdb/config/pyr/pyramid.mh
+++ b/gdb/config/pyr/pyramid.mh
@@ -1,8 +1,8 @@
-# Host: Pyramid under OSx 4.0 (4.2bsd).
-
-#msg If you don't compile GDB with GCC, you'll need to add
-#msg ALLOCA=alloca.o and ALLOCA1=alloca.o to the Makefile.
-#msg
-
-XDEPFILES= pyr-xdep.o infptrace.o inftarg.o fork-child.o
-XM_FILE= xm-pyr.h
+# OBSOLETE # Host: Pyramid under OSx 4.0 (4.2bsd).
+# OBSOLETE
+# OBSOLETE #msg If you don't compile GDB with GCC, you'll need to add
+# OBSOLETE #msg ALLOCA=alloca.o and ALLOCA1=alloca.o to the Makefile.#
+# OBSOLETE msg
+# OBSOLETE
+# OBSOLETE XDEPFILES= pyr-xdep.o infptrace.o inftarg.o fork-child.o
+# OBSOLETE XM_FILE= xm-pyr.h
diff --git a/gdb/config/pyr/pyramid.mt b/gdb/config/pyr/pyramid.mt
index 48f955769d0..342a77d5d87 100644
--- a/gdb/config/pyr/pyramid.mt
+++ b/gdb/config/pyr/pyramid.mt
@@ -1,3 +1,3 @@
-# Target: Pyramid under OSx 4.0 (4.2bsd).
-TDEPFILES= pyr-tdep.o
-TM_FILE= tm-pyr.h
+# OBSOLETE # Target: Pyramid under OSx 4.0 (4.2bsd).
+# OBSOLETE TDEPFILES= pyr-tdep.o
+# OBSOLETE TM_FILE= tm-pyr.h
diff --git a/gdb/config/pyr/tm-pyr.h b/gdb/config/pyr/tm-pyr.h
index b1deeed775f..e28d6fb2019 100644
--- a/gdb/config/pyr/tm-pyr.h
+++ b/gdb/config/pyr/tm-pyr.h
@@ -1,483 +1,483 @@
-/* Definitions to make GDB run on a Pyramid under OSx 4.0 (4.2bsd).
- Copyright 1988, 1989, 1991, 1993 Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#define TARGET_BYTE_ORDER BIG_ENDIAN
-
-/* Traditional Unix virtual address spaces have thre regions: text,
- data and stack. The text, initialised data, and uninitialised data
- are represented in separate segments of the a.out file.
- When a process dumps core, the data and stack regions are written
- to a core file. This gives a debugger enough information to
- reconstruct (and debug) the virtual address space at the time of
- the coredump.
- Pyramids have an distinct fourth region of the virtual address
- space, in which the contents of the windowed registers are stacked
- in fixed-size frames. Pyramid refer to this region as the control
- stack. Each call (or trap) automatically allocates a new register
- frame; each return deallocates the current frame and restores the
- windowed registers to their values before the call.
-
- When dumping core, the control stack is written to a core files as
- a third segment. The core-handling functions need to know to deal
- with it. */
-
-/* Tell corefile.c there is an extra segment. */
-#define REG_STACK_SEGMENT
-
-/* Floating point is IEEE compatible on most Pyramid hardware
- (Older processors do not have IEEE NaNs). */
-#define IEEE_FLOAT
-
-/* Offset from address of function to start of its code.
- Zero on most machines. */
-
-#define FUNCTION_START_OFFSET 0
-
-/* Advance PC across any function entry prologue instructions
- to reach some "real" code. */
-
-/* FIXME -- do we want to skip insns to allocate the local frame?
- If so, what do they look like?
- This is becoming harder, since tege@sics.SE wants to change
- gcc to not output a prologue when no frame is needed. */
-#define SKIP_PROLOGUE(pc) (pc)
-
-
-/* Immediately after a function call, return the saved pc.
- Can't always go through the frames for this because on some machines
- the new frame is not set up until the new function executes
- some instructions. */
-
-#define SAVED_PC_AFTER_CALL(frame) FRAME_SAVED_PC(frame)
-
-/* Address of end of stack space. */
-/* This seems to be right for the 90x comp.vuw.ac.nz.
- The correct value at any site may be a function of the configured
- maximum control stack depth. If so, I don't know where the
- control-stack depth is configured, so I can't #include it here. */
-#define STACK_END_ADDR (0xc00cc000)
-
-/* Register window stack (Control stack) stack definitions
- - Address of beginning of control stack.
- - size of control stack frame
- (Note that since crts0 is usually the first function called,
- main()'s control stack is one frame (0x80 bytes) beyond this value. */
-
-#define CONTROL_STACK_ADDR (0xc00cd000)
-
-/* Bytes in a register window -- 16 parameter regs, 16 local regs
- for each call, is 32 regs * 4 bytes */
-
-#define CONTROL_STACK_FRAME_SIZE (32*4)
-
-/* FIXME. On a pyr, Data Stack grows downward; control stack goes upwards.
- Which direction should we use for INNER_THAN, PC_INNER_THAN ?? */
-
-#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
-
-/* Stack must be aligned on 32-bit boundaries when synthesizing
- function calls. */
-
-#define STACK_ALIGN(ADDR) (((ADDR) + 3) & -4)
-
-/* Sequence of bytes for breakpoint instruction. */
-
-#define BREAKPOINT {0xf0, 00, 00, 00}
-
-/* Amount PC must be decremented by after a breakpoint.
- This is often the number of bytes in BREAKPOINT
- but not always. */
-
-#define DECR_PC_AFTER_BREAK 0
-
-/* Say how long (ordinary) registers are. This is a piece of bogosity
- used in push_word and a few other places; REGISTER_RAW_SIZE is the
- real way to know how big a register is. */
-
-#define REGISTER_SIZE 4
-
-/* Number of machine registers */
-/* pyramids have 64, plus one for the PSW; plus perhaps one more for the
- kernel stack pointer (ksp) and control-stack pointer (CSP) */
-
-#define NUM_REGS 67
-
-/* Initializer for an array of names of registers.
- There should be NUM_REGS strings in this initializer. */
-
-#define REGISTER_NAMES \
-{"gr0", "gr1", "gr2", "gr3", "gr4", "gr5", "gr6", "gr7", \
- "gr8", "gr9", "gr10", "gr11", "logpsw", "cfp", "sp", "pc", \
- "pr0", "pr1", "pr2", "pr3", "pr4", "pr5", "pr6", "pr7", \
- "pr8", "pr9", "pr10", "pr11", "pr12", "pr13", "pr14", "pr15", \
- "lr0", "lr1", "lr2", "lr3", "lr4", "lr5", "lr6", "lr7", \
- "lr8", "lr9", "lr10", "lr11", "lr12", "lr13", "lr14", "lr15", \
- "tr0", "tr1", "tr2", "tr3", "tr4", "tr5", "tr6", "tr7", \
- "tr8", "tr9", "tr10", "tr11", "tr12", "tr13", "tr14", "tr15", \
- "psw", "ksp", "csp"}
-
-/* Register numbers of various important registers.
- Note that some of these values are "real" register numbers,
- and correspond to the general registers of the machine,
- and some are "phony" register numbers which are too large
- to be actual register numbers as far as the user is concerned
- but do serve to get the desired values when passed to read_register. */
-
-/* pseudo-registers: */
-#define PS_REGNUM 64 /* Contains processor status */
-#define PSW_REGNUM 64 /* Contains current psw, whatever it is.*/
-#define CSP_REGNUM 65 /* address of this control stack frame*/
-#define KSP_REGNUM 66 /* Contains process's Kernel Stack Pointer */
-
-#define CFP_REGNUM 13 /* Current data-stack frame ptr */
-#define TR0_REGNUM 48 /* After function call, contains
- function result */
-
-/* Registers interesting to the machine-independent part of gdb*/
-
-#define FP_REGNUM CSP_REGNUM /* Contains address of executing (control)
- stack frame */
-#define SP_REGNUM 14 /* Contains address of top of stack -??*/
-#define PC_REGNUM 15 /* Contains program counter */
-
-/* Define DO_REGISTERS_INFO() to do machine-specific formatting
- of register dumps. */
-
-#define DO_REGISTERS_INFO(_regnum, fp) pyr_do_registers_info(_regnum, fp)
-
-/* need this so we can find the global registers: they never get saved. */
-extern unsigned int global_reg_offset;
-extern unsigned int last_frame_offset;
-
-/* Total amount of space needed to store our copies of the machine's
- register state, the array `registers'. */
-#define REGISTER_BYTES (NUM_REGS*4)
-
-/* the Pyramid has register windows. */
-
-#define HAVE_REGISTER_WINDOWS
-
-/* Is this register part of the register window system? A yes answer
- implies that 1) The name of this register will not be the same in
- other frames, and 2) This register is automatically "saved" (out
- registers shifting into ins counts) upon subroutine calls and thus
- there is no need to search more than one stack frame for it. */
-
-#define REGISTER_IN_WINDOW_P(regnum) \
- ((regnum) >= 16 && (regnum) < 64)
-
-/* Index within `registers' of the first byte of the space for
- register N. */
-
-#define REGISTER_BYTE(N) ((N) * 4)
-
-/* Number of bytes of storage in the actual machine representation
- for register N. On the Pyramid, all regs are 4 bytes. */
-
-#define REGISTER_RAW_SIZE(N) 4
-
-/* Number of bytes of storage in the program's representation
- for register N. On the Pyramid, all regs are 4 bytes. */
-
-#define REGISTER_VIRTUAL_SIZE(N) 4
-
-/* Largest value REGISTER_RAW_SIZE can have. */
-
-#define MAX_REGISTER_RAW_SIZE 4
-
-/* Largest value REGISTER_VIRTUAL_SIZE can have. */
-
-#define MAX_REGISTER_VIRTUAL_SIZE 4
-
-/* Return the GDB type object for the "standard" data type
- of data in register N. */
-
-#define REGISTER_VIRTUAL_TYPE(N) builtin_type_int
-
-/* FIXME: It seems impossible for both EXTRACT_RETURN_VALUE and
- STORE_RETURN_VALUE to be correct. */
-
-/* Store the address of the place in which to copy the structure the
- subroutine will return. This is called from call_function. */
-
-/****FIXME****/
-#define STORE_STRUCT_RETURN(ADDR, SP) \
- { write_register (TR0_REGNUM, (ADDR)); }
-
-/* Extract from an array REGBUF containing the (raw) register state
- a function return value of type TYPE, and copy that, in virtual format,
- into VALBUF. */
-
-/* Note that on a register-windowing machine (eg, Pyr, SPARC), this is
- where the value is found after the function call -- ie, it should
- correspond to GNU CC's FUNCTION_VALUE rather than FUNCTION_OUTGOING_VALUE.*/
-
-#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
- memcpy (VALBUF, ((int *)(REGBUF))+TR0_REGNUM, TYPE_LENGTH (TYPE))
-
-/* Write into appropriate registers a function return value
- of type TYPE, given in virtual format. */
-/* on pyrs, values are returned in */
-
-#define STORE_RETURN_VALUE(TYPE,VALBUF) \
- write_register_bytes (REGISTER_BYTE(TR0_REGNUM), 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,
- as a CORE_ADDR (or an expression that can be used as one). */
-/* FIXME */
-#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
- ( ((int *)(REGBUF)) [TR0_REGNUM])
-
-
-/* Describe the pointer in each stack frame to the previous stack frame
- (its caller). */
-
-#define EXTRA_FRAME_INFO \
- CORE_ADDR bottom; \
- CORE_ADDR frame_cfp; \
- CORE_ADDR frame_window_addr;
-
-/* The bottom field is misnamed, since it might imply that memory from
- bottom to frame contains this frame. That need not be true if
- stack frames are allocated in different segments (e.g. some on a
- stack, some on a heap in the data segment). */
-
-#define INIT_EXTRA_FRAME_INFO(fromleaf, fci) \
-do { \
- (fci)->frame_window_addr = (fci)->frame; \
- (fci)->bottom = \
- ((fci)->next ? \
- ((fci)->frame == (fci)->next->frame ? \
- (fci)->next->bottom : (fci)->next->frame) : \
- read_register (SP_REGNUM)); \
- (fci)->frame_cfp = \
- read_register (CFP_REGNUM); \
- /***fprintf (stderr, \
- "[[creating new frame for %0x,pc=%0x,csp=%0x]]\n", \
- (fci)->frame, (fci)->pc,(fci)->frame_cfp);*/ \
-} while (0);
-
-/* FRAME_CHAIN takes a frame's nominal address
- and produces the frame's chain-pointer. */
-
-/* In the case of the pyr, the frame's nominal address is the address
- of parameter register 0. The previous frame is found 32 words up. */
-
-#define FRAME_CHAIN(thisframe) \
- ( (thisframe) -> frame - CONTROL_STACK_FRAME_SIZE)
-
- /*((thisframe) >= CONTROL_STACK_ADDR))*/
-
-/* Define other aspects of the stack frame. */
-
-/* A macro that tells us whether the function invocation represented
- by FI does not have a frame on the stack associated with it. If it
- does not, FRAMELESS is set to 1, else 0.
-
- I do not understand what this means on a Pyramid, where functions
- *always* have a control-stack frame, but may or may not have a
- frame on the data stack. Since GBD uses the value of the
- control stack pointer as its "address" of a frame, FRAMELESS
- is always 1, so does not need to be defined. */
-
-
-/* Where is the PC for a specific frame */
-
-#define FRAME_SAVED_PC(fi) \
- ((CORE_ADDR) (read_memory_integer ( (fi) -> frame + 60, 4)))
-
-/* There may be bugs in FRAME_ARGS_ADDRESS and FRAME_LOCALS_ADDRESS;
- or there may be bugs in accessing the registers that break
- their definitions.
- Having the macros expand into functions makes them easier to debug.
- When the bug is finally located, the inline macro defintions can
- be un-#if 0ed, and frame_args_addr and frame_locals_address can
- be deleted from pyr-dep.c */
-
-/* If the argument is on the stack, it will be here. */
-#define FRAME_ARGS_ADDRESS(fi) \
- frame_args_addr(fi)
-
-#define FRAME_LOCALS_ADDRESS(fi) \
- frame_locals_address(fi)
-
-/* The following definitions doesn't seem to work.
- I don't understand why. */
-#if 0
-#define FRAME_ARGS_ADDRESS(fi) \
- /*(FRAME_FP(fi) + (13*4))*/ (read_register (CFP_REGNUM))
-
-#define FRAME_LOCALS_ADDRESS(fi) \
- ((fi)->frame +(16*4))
-
-#endif /* 0 */
-
-/* Return number of args passed to a frame.
- Can return -1, meaning no way to tell. */
-
-#define FRAME_NUM_ARGS(fi) (-1)
-
-/* Return number of bytes at start of arglist that are not really args. */
-
-#define FRAME_ARGS_SKIP 0
-
-/* Put here the code to store, into a struct frame_saved_regs,
- the addresses of the saved registers of frame described by FRAME_INFO.
- This includes special registers such as pc and fp saved in special
- ways in the stack frame. sp is even more special:
- the address we return for it IS the sp for the next frame.
-
- Note that on register window machines, we are currently making the
- assumption that window registers are being saved somewhere in the
- frame in which they are being used. If they are stored in an
- inferior frame, find_saved_register will break.
-
- On pyrs, frames of window registers are stored contiguously on a
- separate stack. All window registers are always stored.
- The pc and psw (gr15 and gr14) are also always saved: the call
- insn saves them in pr15 and pr14 of the new frame (tr15,tr14 of the
- old frame).
- The data-stack frame pointer (CFP) is only saved in functions which
- allocate a (data)stack frame (with "adsf"). We detect them by
- looking at the first insn of the procedure.
-
- Other non-window registers (gr0-gr11) are never saved. Pyramid's C
- compiler and gcc currently ignore them, so it's not an issue. */
-
-#define FRAME_FIND_SAVED_REGS(fi_p, frame_saved_regs) \
-{ register int regnum; \
- register CORE_ADDR pc; \
- register CORE_ADDR fn_start_pc; \
- register int first_insn; \
- register CORE_ADDR prev_cf_addr; \
- register int window_ptr; \
- if (!fi_p) fatal ("Bad frame info struct in FRAME_FIND_SAVED_REGS"); \
- memset (&(frame_saved_regs), '\0', sizeof (frame_saved_regs)); \
- \
- window_ptr = prev_cf_addr = FRAME_FP(fi_p); \
- \
- for (regnum = 16 ; regnum < 64; regnum++,window_ptr+=4) \
- { \
- (frame_saved_regs).regs[regnum] = window_ptr; \
- } \
- \
- /* In each window, psw, and pc are "saved" in tr14,tr15. */ \
- /*** psw is sometimes saved in gr12 (so sez <sys/pcb.h>) */ \
- (frame_saved_regs).regs[PS_REGNUM] = FRAME_FP(fi_p) + (14*4); \
- \
-/*(frame_saved_regs).regs[PC_REGNUM] = (frame_saved_regs).regs[31];*/ \
- (frame_saved_regs).regs[PC_REGNUM] = FRAME_FP(fi_p) + ((15+32)*4); \
- \
- /* Functions that allocate a frame save sp *where*? */ \
-/*first_insn = read_memory_integer (get_pc_function_start ((fi_p)->pc),4); */ \
- \
- fn_start_pc = (get_pc_function_start ((fi_p)->pc)); \
- first_insn = read_memory_integer(fn_start_pc, 4); \
- \
- if (0x08 == ((first_insn >> 20) &0x0ff)) { \
- /* NB: because WINDOW_REGISTER_P(cfp) is false, a saved cfp \
- in this frame is only visible in this frame's callers. \
- That means the cfp we mark saved is my caller's cfp, ie pr13. \
- I don't understand why we don't have to do that for pc, too. */ \
- \
- (frame_saved_regs).regs[CFP_REGNUM] = FRAME_FP(fi_p)+(13*4); \
- \
- (frame_saved_regs).regs[SP_REGNUM] = \
- read_memory_integer (FRAME_FP(fi_p)+((13+32)*4),4); \
- } \
- \
-/* \
- *(frame_saved_regs).regs[CFP_REGNUM] = (frame_saved_regs).regs[61]; \
- * (frame_saved_regs).regs[SP_REGNUM] = \
- * read_memory_integer (FRAME_FP(fi_p)+((13+32)*4),4); \
- */ \
- \
- (frame_saved_regs).regs[CSP_REGNUM] = prev_cf_addr; \
-}
-
-/* Things needed for making the inferior call functions. */
-#if 0
-/* These are all lies. These macro definitions are appropriate for a
- SPARC. On a pyramid, pushing a dummy frame will
- surely involve writing the control stack pointer,
- then saving the pc. This requires a privileged instruction.
- Maybe one day Pyramid can be persuaded to add a syscall to do this.
- Until then, we are out of luck. */
-
-/* Push an empty stack frame, to record the current PC, etc. */
-
-#define PUSH_DUMMY_FRAME \
-{ register CORE_ADDR sp = read_register (SP_REGNUM);\
- register int regnum; \
- sp = push_word (sp, 0); /* arglist */ \
- for (regnum = 11; regnum >= 0; regnum--) \
- sp = push_word (sp, read_register (regnum)); \
- sp = push_word (sp, read_register (PC_REGNUM)); \
- sp = push_word (sp, read_register (FP_REGNUM)); \
-/* sp = push_word (sp, read_register (AP_REGNUM));*/ \
- sp = push_word (sp, (read_register (PS_REGNUM) & 0xffef) \
- + 0x2fff0000); \
- sp = push_word (sp, 0); \
- write_register (SP_REGNUM, sp); \
- write_register (FP_REGNUM, sp); \
-/* write_register (AP_REGNUM, sp + 17 * sizeof (int));*/ }
-
-/* Discard from the stack the innermost frame, restoring all registers. */
-
-#define POP_FRAME \
-{ register CORE_ADDR fp = read_register (FP_REGNUM); \
- register int regnum; \
- register int regmask = read_memory_integer (fp + 4, 4); \
- write_register (PS_REGNUM, \
- (regmask & 0xffff) \
- | (read_register (PS_REGNUM) & 0xffff0000)); \
- write_register (PC_REGNUM, read_memory_integer (fp + 16, 4)); \
- write_register (FP_REGNUM, read_memory_integer (fp + 12, 4)); \
-/* write_register (AP_REGNUM, read_memory_integer (fp + 8, 4));*/ \
- fp += 16; \
- for (regnum = 0; regnum < 12; regnum++) \
- if (regmask & (0x10000 << regnum)) \
- write_register (regnum, read_memory_integer (fp += 4, 4)); \
- fp = fp + 4 + ((regmask >> 30) & 3); \
- if (regmask & 0x20000000) \
- { regnum = read_memory_integer (fp, 4); \
- fp += (regnum + 1) * 4; } \
- write_register (SP_REGNUM, fp); \
- set_current_frame (read_register (FP_REGNUM)); }
-
-/* This sequence of words is the instructions
- calls #69, @#32323232
- bpt
- Note this is 8 bytes. */
-
-#define CALL_DUMMY {0x329f69fb, 0x03323232}
-
-#define CALL_DUMMY_START_OFFSET 0 /* Start execution at beginning of dummy */
-
-/* Insert the specified number of args and function address
- into a call sequence of the above form stored at DUMMYNAME. */
-
-#define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \
-{ *((char *) dummyname + 1) = nargs; \
- *(int *)((char *) dummyname + 3) = fun; }
-#endif /* 0 */
-
-#define POP_FRAME \
- { error ("The return command is not supported on this machine."); }
+/* OBSOLETE /* Definitions to make GDB run on a Pyramid under OSx 4.0 (4.2bsd). */
+/* OBSOLETE Copyright 1988, 1989, 1991, 1993 Free Software Foundation, Inc. */
+/* OBSOLETE */
+/* OBSOLETE This file is part of GDB. */
+/* 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. *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define TARGET_BYTE_ORDER BIG_ENDIAN */
+/* OBSOLETE */
+/* OBSOLETE /* Traditional Unix virtual address spaces have thre regions: text, */
+/* OBSOLETE data and stack. The text, initialised data, and uninitialised data */
+/* OBSOLETE are represented in separate segments of the a.out file. */
+/* OBSOLETE When a process dumps core, the data and stack regions are written */
+/* OBSOLETE to a core file. This gives a debugger enough information to */
+/* OBSOLETE reconstruct (and debug) the virtual address space at the time of */
+/* OBSOLETE the coredump. */
+/* OBSOLETE Pyramids have an distinct fourth region of the virtual address */
+/* OBSOLETE space, in which the contents of the windowed registers are stacked */
+/* OBSOLETE in fixed-size frames. Pyramid refer to this region as the control */
+/* OBSOLETE stack. Each call (or trap) automatically allocates a new register */
+/* OBSOLETE frame; each return deallocates the current frame and restores the */
+/* OBSOLETE windowed registers to their values before the call. */
+/* OBSOLETE */
+/* OBSOLETE When dumping core, the control stack is written to a core files as */
+/* OBSOLETE a third segment. The core-handling functions need to know to deal */
+/* OBSOLETE with it. *x/ */
+/* OBSOLETE */
+/* OBSOLETE /* Tell corefile.c there is an extra segment. *x/ */
+/* OBSOLETE #define REG_STACK_SEGMENT */
+/* OBSOLETE */
+/* OBSOLETE /* Floating point is IEEE compatible on most Pyramid hardware */
+/* OBSOLETE (Older processors do not have IEEE NaNs). *x/ */
+/* OBSOLETE #define IEEE_FLOAT */
+/* OBSOLETE */
+/* OBSOLETE /* Offset from address of function to start of its code. */
+/* OBSOLETE Zero on most machines. *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define FUNCTION_START_OFFSET 0 */
+/* OBSOLETE */
+/* OBSOLETE /* Advance PC across any function entry prologue instructions */
+/* OBSOLETE to reach some "real" code. *x/ */
+/* OBSOLETE */
+/* OBSOLETE /* FIXME -- do we want to skip insns to allocate the local frame? */
+/* OBSOLETE If so, what do they look like? */
+/* OBSOLETE This is becoming harder, since tege@sics.SE wants to change */
+/* OBSOLETE gcc to not output a prologue when no frame is needed. *x/ */
+/* OBSOLETE #define SKIP_PROLOGUE(pc) (pc) */
+/* OBSOLETE */
+/* OBSOLETE */
+/* OBSOLETE /* Immediately after a function call, return the saved pc. */
+/* OBSOLETE Can't always go through the frames for this because on some machines */
+/* OBSOLETE the new frame is not set up until the new function executes */
+/* OBSOLETE some instructions. *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define SAVED_PC_AFTER_CALL(frame) FRAME_SAVED_PC(frame) */
+/* OBSOLETE */
+/* OBSOLETE /* Address of end of stack space. *x/ */
+/* OBSOLETE /* This seems to be right for the 90x comp.vuw.ac.nz. */
+/* OBSOLETE The correct value at any site may be a function of the configured */
+/* OBSOLETE maximum control stack depth. If so, I don't know where the */
+/* OBSOLETE control-stack depth is configured, so I can't #include it here. *x/ */
+/* OBSOLETE #define STACK_END_ADDR (0xc00cc000) */
+/* OBSOLETE */
+/* OBSOLETE /* Register window stack (Control stack) stack definitions */
+/* OBSOLETE - Address of beginning of control stack. */
+/* OBSOLETE - size of control stack frame */
+/* OBSOLETE (Note that since crts0 is usually the first function called, */
+/* OBSOLETE main()'s control stack is one frame (0x80 bytes) beyond this value. *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define CONTROL_STACK_ADDR (0xc00cd000) */
+/* OBSOLETE */
+/* OBSOLETE /* Bytes in a register window -- 16 parameter regs, 16 local regs */
+/* OBSOLETE for each call, is 32 regs * 4 bytes *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define CONTROL_STACK_FRAME_SIZE (32*4) */
+/* OBSOLETE */
+/* OBSOLETE /* FIXME. On a pyr, Data Stack grows downward; control stack goes upwards. */
+/* OBSOLETE Which direction should we use for INNER_THAN, PC_INNER_THAN ?? *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define INNER_THAN(lhs,rhs) ((lhs) < (rhs)) */
+/* OBSOLETE */
+/* OBSOLETE /* Stack must be aligned on 32-bit boundaries when synthesizing */
+/* OBSOLETE function calls. *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define STACK_ALIGN(ADDR) (((ADDR) + 3) & -4) */
+/* OBSOLETE */
+/* OBSOLETE /* Sequence of bytes for breakpoint instruction. *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define BREAKPOINT {0xf0, 00, 00, 00} */
+/* OBSOLETE */
+/* OBSOLETE /* Amount PC must be decremented by after a breakpoint. */
+/* OBSOLETE This is often the number of bytes in BREAKPOINT */
+/* OBSOLETE but not always. *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define DECR_PC_AFTER_BREAK 0 */
+/* OBSOLETE */
+/* OBSOLETE /* Say how long (ordinary) registers are. This is a piece of bogosity */
+/* OBSOLETE used in push_word and a few other places; REGISTER_RAW_SIZE is the */
+/* OBSOLETE real way to know how big a register is. *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define REGISTER_SIZE 4 */
+/* OBSOLETE */
+/* OBSOLETE /* Number of machine registers *x/ */
+/* OBSOLETE /* pyramids have 64, plus one for the PSW; plus perhaps one more for the */
+/* OBSOLETE kernel stack pointer (ksp) and control-stack pointer (CSP) *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define NUM_REGS 67 */
+/* OBSOLETE */
+/* OBSOLETE /* Initializer for an array of names of registers. */
+/* OBSOLETE There should be NUM_REGS strings in this initializer. *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define REGISTER_NAMES \ */
+/* OBSOLETE {"gr0", "gr1", "gr2", "gr3", "gr4", "gr5", "gr6", "gr7", \ */
+/* OBSOLETE "gr8", "gr9", "gr10", "gr11", "logpsw", "cfp", "sp", "pc", \ */
+/* OBSOLETE "pr0", "pr1", "pr2", "pr3", "pr4", "pr5", "pr6", "pr7", \ */
+/* OBSOLETE "pr8", "pr9", "pr10", "pr11", "pr12", "pr13", "pr14", "pr15", \ */
+/* OBSOLETE "lr0", "lr1", "lr2", "lr3", "lr4", "lr5", "lr6", "lr7", \ */
+/* OBSOLETE "lr8", "lr9", "lr10", "lr11", "lr12", "lr13", "lr14", "lr15", \ */
+/* OBSOLETE "tr0", "tr1", "tr2", "tr3", "tr4", "tr5", "tr6", "tr7", \ */
+/* OBSOLETE "tr8", "tr9", "tr10", "tr11", "tr12", "tr13", "tr14", "tr15", \ */
+/* OBSOLETE "psw", "ksp", "csp"} */
+/* OBSOLETE */
+/* OBSOLETE /* Register numbers of various important registers. */
+/* OBSOLETE Note that some of these values are "real" register numbers, */
+/* OBSOLETE and correspond to the general registers of the machine, */
+/* OBSOLETE and some are "phony" register numbers which are too large */
+/* OBSOLETE to be actual register numbers as far as the user is concerned */
+/* OBSOLETE but do serve to get the desired values when passed to read_register. *x/ */
+/* OBSOLETE */
+/* OBSOLETE /* pseudo-registers: *x/ */
+/* OBSOLETE #define PS_REGNUM 64 /* Contains processor status *x/ */
+/* OBSOLETE #define PSW_REGNUM 64 /* Contains current psw, whatever it is.*x/ */
+/* OBSOLETE #define CSP_REGNUM 65 /* address of this control stack frame*x/ */
+/* OBSOLETE #define KSP_REGNUM 66 /* Contains process's Kernel Stack Pointer *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define CFP_REGNUM 13 /* Current data-stack frame ptr *x/ */
+/* OBSOLETE #define TR0_REGNUM 48 /* After function call, contains */
+/* OBSOLETE function result *x/ */
+/* OBSOLETE */
+/* OBSOLETE /* Registers interesting to the machine-independent part of gdb*x/ */
+/* OBSOLETE */
+/* OBSOLETE #define FP_REGNUM CSP_REGNUM /* Contains address of executing (control) */
+/* OBSOLETE stack frame *x/ */
+/* OBSOLETE #define SP_REGNUM 14 /* Contains address of top of stack -??*x/ */
+/* OBSOLETE #define PC_REGNUM 15 /* Contains program counter *x/ */
+/* OBSOLETE */
+/* OBSOLETE /* Define DO_REGISTERS_INFO() to do machine-specific formatting */
+/* OBSOLETE of register dumps. *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define DO_REGISTERS_INFO(_regnum, fp) pyr_do_registers_info(_regnum, fp) */
+/* OBSOLETE */
+/* OBSOLETE /* need this so we can find the global registers: they never get saved. *x/ */
+/* OBSOLETE extern unsigned int global_reg_offset; */
+/* OBSOLETE extern unsigned int last_frame_offset; */
+/* OBSOLETE */
+/* OBSOLETE /* Total amount of space needed to store our copies of the machine's */
+/* OBSOLETE register state, the array `registers'. *x/ */
+/* OBSOLETE #define REGISTER_BYTES (NUM_REGS*4) */
+/* OBSOLETE */
+/* OBSOLETE /* the Pyramid has register windows. *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define HAVE_REGISTER_WINDOWS */
+/* OBSOLETE */
+/* OBSOLETE /* Is this register part of the register window system? A yes answer */
+/* OBSOLETE implies that 1) The name of this register will not be the same in */
+/* OBSOLETE other frames, and 2) This register is automatically "saved" (out */
+/* OBSOLETE registers shifting into ins counts) upon subroutine calls and thus */
+/* OBSOLETE there is no need to search more than one stack frame for it. *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define REGISTER_IN_WINDOW_P(regnum) \ */
+/* OBSOLETE ((regnum) >= 16 && (regnum) < 64) */
+/* OBSOLETE */
+/* OBSOLETE /* Index within `registers' of the first byte of the space for */
+/* OBSOLETE register N. *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define REGISTER_BYTE(N) ((N) * 4) */
+/* OBSOLETE */
+/* OBSOLETE /* Number of bytes of storage in the actual machine representation */
+/* OBSOLETE for register N. On the Pyramid, all regs are 4 bytes. *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define REGISTER_RAW_SIZE(N) 4 */
+/* OBSOLETE */
+/* OBSOLETE /* Number of bytes of storage in the program's representation */
+/* OBSOLETE for register N. On the Pyramid, all regs are 4 bytes. *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define REGISTER_VIRTUAL_SIZE(N) 4 */
+/* OBSOLETE */
+/* OBSOLETE /* Largest value REGISTER_RAW_SIZE can have. *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define MAX_REGISTER_RAW_SIZE 4 */
+/* OBSOLETE */
+/* OBSOLETE /* Largest value REGISTER_VIRTUAL_SIZE can have. *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE 4 */
+/* OBSOLETE */
+/* OBSOLETE /* Return the GDB type object for the "standard" data type */
+/* OBSOLETE of data in register N. *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) builtin_type_int */
+/* OBSOLETE */
+/* OBSOLETE /* FIXME: It seems impossible for both EXTRACT_RETURN_VALUE and */
+/* OBSOLETE STORE_RETURN_VALUE to be correct. *x/ */
+/* OBSOLETE */
+/* OBSOLETE /* Store the address of the place in which to copy the structure the */
+/* OBSOLETE subroutine will return. This is called from call_function. *x/ */
+/* OBSOLETE */
+/* OBSOLETE /****FIXME****x/ */
+/* OBSOLETE #define STORE_STRUCT_RETURN(ADDR, SP) \ */
+/* OBSOLETE { write_register (TR0_REGNUM, (ADDR)); } */
+/* OBSOLETE */
+/* OBSOLETE /* Extract from an array REGBUF containing the (raw) register state */
+/* OBSOLETE a function return value of type TYPE, and copy that, in virtual format, */
+/* OBSOLETE into VALBUF. *x/ */
+/* OBSOLETE */
+/* OBSOLETE /* Note that on a register-windowing machine (eg, Pyr, SPARC), this is */
+/* OBSOLETE where the value is found after the function call -- ie, it should */
+/* OBSOLETE correspond to GNU CC's FUNCTION_VALUE rather than FUNCTION_OUTGOING_VALUE.*x/ */
+/* OBSOLETE */
+/* OBSOLETE #define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ */
+/* OBSOLETE memcpy (VALBUF, ((int *)(REGBUF))+TR0_REGNUM, TYPE_LENGTH (TYPE)) */
+/* OBSOLETE */
+/* OBSOLETE /* Write into appropriate registers a function return value */
+/* OBSOLETE of type TYPE, given in virtual format. *x/ */
+/* OBSOLETE /* on pyrs, values are returned in *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define STORE_RETURN_VALUE(TYPE,VALBUF) \ */
+/* OBSOLETE write_register_bytes (REGISTER_BYTE(TR0_REGNUM), VALBUF, TYPE_LENGTH (TYPE)) */
+/* OBSOLETE */
+/* OBSOLETE /* Extract from an array REGBUF containing the (raw) register state */
+/* OBSOLETE the address in which a function should return its structure value, */
+/* OBSOLETE as a CORE_ADDR (or an expression that can be used as one). *x/ */
+/* OBSOLETE /* FIXME *x/ */
+/* OBSOLETE #define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \ */
+/* OBSOLETE ( ((int *)(REGBUF)) [TR0_REGNUM]) */
+/* OBSOLETE */
+/* OBSOLETE */
+/* OBSOLETE /* Describe the pointer in each stack frame to the previous stack frame */
+/* OBSOLETE (its caller). *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define EXTRA_FRAME_INFO \ */
+/* OBSOLETE CORE_ADDR bottom; \ */
+/* OBSOLETE CORE_ADDR frame_cfp; \ */
+/* OBSOLETE CORE_ADDR frame_window_addr; */
+/* OBSOLETE */
+/* OBSOLETE /* The bottom field is misnamed, since it might imply that memory from */
+/* OBSOLETE bottom to frame contains this frame. That need not be true if */
+/* OBSOLETE stack frames are allocated in different segments (e.g. some on a */
+/* OBSOLETE stack, some on a heap in the data segment). *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define INIT_EXTRA_FRAME_INFO(fromleaf, fci) \ */
+/* OBSOLETE do { \ */
+/* OBSOLETE (fci)->frame_window_addr = (fci)->frame; \ */
+/* OBSOLETE (fci)->bottom = \ */
+/* OBSOLETE ((fci)->next ? \ */
+/* OBSOLETE ((fci)->frame == (fci)->next->frame ? \ */
+/* OBSOLETE (fci)->next->bottom : (fci)->next->frame) : \ */
+/* OBSOLETE read_register (SP_REGNUM)); \ */
+/* OBSOLETE (fci)->frame_cfp = \ */
+/* OBSOLETE read_register (CFP_REGNUM); \ */
+/* OBSOLETE /***fprintf (stderr, \ */
+/* OBSOLETE "[[creating new frame for %0x,pc=%0x,csp=%0x]]\n", \ */
+/* OBSOLETE (fci)->frame, (fci)->pc,(fci)->frame_cfp);*x/ \ */
+/* OBSOLETE } while (0); */
+/* OBSOLETE */
+/* OBSOLETE /* FRAME_CHAIN takes a frame's nominal address */
+/* OBSOLETE and produces the frame's chain-pointer. *x/ */
+/* OBSOLETE */
+/* OBSOLETE /* In the case of the pyr, the frame's nominal address is the address */
+/* OBSOLETE of parameter register 0. The previous frame is found 32 words up. *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define FRAME_CHAIN(thisframe) \ */
+/* OBSOLETE ( (thisframe) -> frame - CONTROL_STACK_FRAME_SIZE) */
+/* OBSOLETE */
+/* OBSOLETE /*((thisframe) >= CONTROL_STACK_ADDR))*x/ */
+/* OBSOLETE */
+/* OBSOLETE /* Define other aspects of the stack frame. *x/ */
+/* OBSOLETE */
+/* OBSOLETE /* A macro that tells us whether the function invocation represented */
+/* OBSOLETE by FI does not have a frame on the stack associated with it. If it */
+/* OBSOLETE does not, FRAMELESS is set to 1, else 0. */
+/* OBSOLETE */
+/* OBSOLETE I do not understand what this means on a Pyramid, where functions */
+/* OBSOLETE *always* have a control-stack frame, but may or may not have a */
+/* OBSOLETE frame on the data stack. Since GBD uses the value of the */
+/* OBSOLETE control stack pointer as its "address" of a frame, FRAMELESS */
+/* OBSOLETE is always 1, so does not need to be defined. *x/ */
+/* OBSOLETE */
+/* OBSOLETE */
+/* OBSOLETE /* Where is the PC for a specific frame *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define FRAME_SAVED_PC(fi) \ */
+/* OBSOLETE ((CORE_ADDR) (read_memory_integer ( (fi) -> frame + 60, 4))) */
+/* OBSOLETE */
+/* OBSOLETE /* There may be bugs in FRAME_ARGS_ADDRESS and FRAME_LOCALS_ADDRESS; */
+/* OBSOLETE or there may be bugs in accessing the registers that break */
+/* OBSOLETE their definitions. */
+/* OBSOLETE Having the macros expand into functions makes them easier to debug. */
+/* OBSOLETE When the bug is finally located, the inline macro defintions can */
+/* OBSOLETE be un-#if 0ed, and frame_args_addr and frame_locals_address can */
+/* OBSOLETE be deleted from pyr-dep.c *x/ */
+/* OBSOLETE */
+/* OBSOLETE /* If the argument is on the stack, it will be here. *x/ */
+/* OBSOLETE #define FRAME_ARGS_ADDRESS(fi) \ */
+/* OBSOLETE frame_args_addr(fi) */
+/* OBSOLETE */
+/* OBSOLETE #define FRAME_LOCALS_ADDRESS(fi) \ */
+/* OBSOLETE frame_locals_address(fi) */
+/* OBSOLETE */
+/* OBSOLETE /* The following definitions doesn't seem to work. */
+/* OBSOLETE I don't understand why. *x/ */
+/* OBSOLETE #if 0 */
+/* OBSOLETE #define FRAME_ARGS_ADDRESS(fi) \ */
+/* OBSOLETE /*(FRAME_FP(fi) + (13*4))*x/ (read_register (CFP_REGNUM)) */
+/* OBSOLETE */
+/* OBSOLETE #define FRAME_LOCALS_ADDRESS(fi) \ */
+/* OBSOLETE ((fi)->frame +(16*4)) */
+/* OBSOLETE */
+/* OBSOLETE #endif /* 0 *x/ */
+/* OBSOLETE */
+/* OBSOLETE /* Return number of args passed to a frame. */
+/* OBSOLETE Can return -1, meaning no way to tell. *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define FRAME_NUM_ARGS(fi) (-1) */
+/* OBSOLETE */
+/* OBSOLETE /* Return number of bytes at start of arglist that are not really args. *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define FRAME_ARGS_SKIP 0 */
+/* OBSOLETE */
+/* OBSOLETE /* Put here the code to store, into a struct frame_saved_regs, */
+/* OBSOLETE the addresses of the saved registers of frame described by FRAME_INFO. */
+/* OBSOLETE This includes special registers such as pc and fp saved in special */
+/* OBSOLETE ways in the stack frame. sp is even more special: */
+/* OBSOLETE the address we return for it IS the sp for the next frame. */
+/* OBSOLETE */
+/* OBSOLETE Note that on register window machines, we are currently making the */
+/* OBSOLETE assumption that window registers are being saved somewhere in the */
+/* OBSOLETE frame in which they are being used. If they are stored in an */
+/* OBSOLETE inferior frame, find_saved_register will break. */
+/* OBSOLETE */
+/* OBSOLETE On pyrs, frames of window registers are stored contiguously on a */
+/* OBSOLETE separate stack. All window registers are always stored. */
+/* OBSOLETE The pc and psw (gr15 and gr14) are also always saved: the call */
+/* OBSOLETE insn saves them in pr15 and pr14 of the new frame (tr15,tr14 of the */
+/* OBSOLETE old frame). */
+/* OBSOLETE The data-stack frame pointer (CFP) is only saved in functions which */
+/* OBSOLETE allocate a (data)stack frame (with "adsf"). We detect them by */
+/* OBSOLETE looking at the first insn of the procedure. */
+/* OBSOLETE */
+/* OBSOLETE Other non-window registers (gr0-gr11) are never saved. Pyramid's C */
+/* OBSOLETE compiler and gcc currently ignore them, so it's not an issue. *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define FRAME_FIND_SAVED_REGS(fi_p, frame_saved_regs) \ */
+/* OBSOLETE { register int regnum; \ */
+/* OBSOLETE register CORE_ADDR pc; \ */
+/* OBSOLETE register CORE_ADDR fn_start_pc; \ */
+/* OBSOLETE register int first_insn; \ */
+/* OBSOLETE register CORE_ADDR prev_cf_addr; \ */
+/* OBSOLETE register int window_ptr; \ */
+/* OBSOLETE if (!fi_p) fatal ("Bad frame info struct in FRAME_FIND_SAVED_REGS"); \ */
+/* OBSOLETE memset (&(frame_saved_regs), '\0', sizeof (frame_saved_regs)); \ */
+/* OBSOLETE \ */
+/* OBSOLETE window_ptr = prev_cf_addr = FRAME_FP(fi_p); \ */
+/* OBSOLETE \ */
+/* OBSOLETE for (regnum = 16 ; regnum < 64; regnum++,window_ptr+=4) \ */
+/* OBSOLETE { \ */
+/* OBSOLETE (frame_saved_regs).regs[regnum] = window_ptr; \ */
+/* OBSOLETE } \ */
+/* OBSOLETE \ */
+/* OBSOLETE /* In each window, psw, and pc are "saved" in tr14,tr15. *x/ \ */
+/* OBSOLETE /*** psw is sometimes saved in gr12 (so sez <sys/pcb.h>) *x/ \ */
+/* OBSOLETE (frame_saved_regs).regs[PS_REGNUM] = FRAME_FP(fi_p) + (14*4); \ */
+/* OBSOLETE \ */
+/* OBSOLETE /*(frame_saved_regs).regs[PC_REGNUM] = (frame_saved_regs).regs[31];*x/ \ */
+/* OBSOLETE (frame_saved_regs).regs[PC_REGNUM] = FRAME_FP(fi_p) + ((15+32)*4); \ */
+/* OBSOLETE \ */
+/* OBSOLETE /* Functions that allocate a frame save sp *where*? *x/ \ */
+/* OBSOLETE /*first_insn = read_memory_integer (get_pc_function_start ((fi_p)->pc),4); *x/ \ */
+/* OBSOLETE \ */
+/* OBSOLETE fn_start_pc = (get_pc_function_start ((fi_p)->pc)); \ */
+/* OBSOLETE first_insn = read_memory_integer(fn_start_pc, 4); \ */
+/* OBSOLETE \ */
+/* OBSOLETE if (0x08 == ((first_insn >> 20) &0x0ff)) { \ */
+/* OBSOLETE /* NB: because WINDOW_REGISTER_P(cfp) is false, a saved cfp \ */
+/* OBSOLETE in this frame is only visible in this frame's callers. \ */
+/* OBSOLETE That means the cfp we mark saved is my caller's cfp, ie pr13. \ */
+/* OBSOLETE I don't understand why we don't have to do that for pc, too. *x/ \ */
+/* OBSOLETE \ */
+/* OBSOLETE (frame_saved_regs).regs[CFP_REGNUM] = FRAME_FP(fi_p)+(13*4); \ */
+/* OBSOLETE \ */
+/* OBSOLETE (frame_saved_regs).regs[SP_REGNUM] = \ */
+/* OBSOLETE read_memory_integer (FRAME_FP(fi_p)+((13+32)*4),4); \ */
+/* OBSOLETE } \ */
+/* OBSOLETE \ */
+/* OBSOLETE /* \ */
+/* OBSOLETE *(frame_saved_regs).regs[CFP_REGNUM] = (frame_saved_regs).regs[61]; \ */
+/* OBSOLETE * (frame_saved_regs).regs[SP_REGNUM] = \ */
+/* OBSOLETE * read_memory_integer (FRAME_FP(fi_p)+((13+32)*4),4); \ */
+/* OBSOLETE *x/ \ */
+/* OBSOLETE \ */
+/* OBSOLETE (frame_saved_regs).regs[CSP_REGNUM] = prev_cf_addr; \ */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE /* Things needed for making the inferior call functions. *x/ */
+/* OBSOLETE #if 0 */
+/* OBSOLETE /* These are all lies. These macro definitions are appropriate for a */
+/* OBSOLETE SPARC. On a pyramid, pushing a dummy frame will */
+/* OBSOLETE surely involve writing the control stack pointer, */
+/* OBSOLETE then saving the pc. This requires a privileged instruction. */
+/* OBSOLETE Maybe one day Pyramid can be persuaded to add a syscall to do this. */
+/* OBSOLETE Until then, we are out of luck. *x/ */
+/* OBSOLETE */
+/* OBSOLETE /* Push an empty stack frame, to record the current PC, etc. *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define PUSH_DUMMY_FRAME \ */
+/* OBSOLETE { register CORE_ADDR sp = read_register (SP_REGNUM);\ */
+/* OBSOLETE register int regnum; \ */
+/* OBSOLETE sp = push_word (sp, 0); /* arglist *x/ \ */
+/* OBSOLETE for (regnum = 11; regnum >= 0; regnum--) \ */
+/* OBSOLETE sp = push_word (sp, read_register (regnum)); \ */
+/* OBSOLETE sp = push_word (sp, read_register (PC_REGNUM)); \ */
+/* OBSOLETE sp = push_word (sp, read_register (FP_REGNUM)); \ */
+/* OBSOLETE /* sp = push_word (sp, read_register (AP_REGNUM));*x/ \ */
+/* OBSOLETE sp = push_word (sp, (read_register (PS_REGNUM) & 0xffef) \ */
+/* OBSOLETE + 0x2fff0000); \ */
+/* OBSOLETE sp = push_word (sp, 0); \ */
+/* OBSOLETE write_register (SP_REGNUM, sp); \ */
+/* OBSOLETE write_register (FP_REGNUM, sp); \ */
+/* OBSOLETE /* write_register (AP_REGNUM, sp + 17 * sizeof (int));*x/ } */
+/* OBSOLETE */
+/* OBSOLETE /* Discard from the stack the innermost frame, restoring all registers. *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define POP_FRAME \ */
+/* OBSOLETE { register CORE_ADDR fp = read_register (FP_REGNUM); \ */
+/* OBSOLETE register int regnum; \ */
+/* OBSOLETE register int regmask = read_memory_integer (fp + 4, 4); \ */
+/* OBSOLETE write_register (PS_REGNUM, \ */
+/* OBSOLETE (regmask & 0xffff) \ */
+/* OBSOLETE | (read_register (PS_REGNUM) & 0xffff0000)); \ */
+/* OBSOLETE write_register (PC_REGNUM, read_memory_integer (fp + 16, 4)); \ */
+/* OBSOLETE write_register (FP_REGNUM, read_memory_integer (fp + 12, 4)); \ */
+/* OBSOLETE /* write_register (AP_REGNUM, read_memory_integer (fp + 8, 4));*x/ \ */
+/* OBSOLETE fp += 16; \ */
+/* OBSOLETE for (regnum = 0; regnum < 12; regnum++) \ */
+/* OBSOLETE if (regmask & (0x10000 << regnum)) \ */
+/* OBSOLETE write_register (regnum, read_memory_integer (fp += 4, 4)); \ */
+/* OBSOLETE fp = fp + 4 + ((regmask >> 30) & 3); \ */
+/* OBSOLETE if (regmask & 0x20000000) \ */
+/* OBSOLETE { regnum = read_memory_integer (fp, 4); \ */
+/* OBSOLETE fp += (regnum + 1) * 4; } \ */
+/* OBSOLETE write_register (SP_REGNUM, fp); \ */
+/* OBSOLETE set_current_frame (read_register (FP_REGNUM)); } */
+/* OBSOLETE */
+/* OBSOLETE /* This sequence of words is the instructions */
+/* OBSOLETE calls #69, @#32323232 */
+/* OBSOLETE bpt */
+/* OBSOLETE Note this is 8 bytes. *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define CALL_DUMMY {0x329f69fb, 0x03323232} */
+/* OBSOLETE */
+/* OBSOLETE #define CALL_DUMMY_START_OFFSET 0 /* Start execution at beginning of dummy *x/ */
+/* OBSOLETE */
+/* OBSOLETE /* Insert the specified number of args and function address */
+/* OBSOLETE into a call sequence of the above form stored at DUMMYNAME. *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \ */
+/* OBSOLETE { *((char *) dummyname + 1) = nargs; \ */
+/* OBSOLETE *(int *)((char *) dummyname + 3) = fun; } */
+/* OBSOLETE #endif /* 0 *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define POP_FRAME \ */
+/* OBSOLETE { error ("The return command is not supported on this machine."); } */
diff --git a/gdb/config/pyr/xm-pyr.h b/gdb/config/pyr/xm-pyr.h
index f45d10aa8ca..d10afc5c7e8 100644
--- a/gdb/config/pyr/xm-pyr.h
+++ b/gdb/config/pyr/xm-pyr.h
@@ -1,92 +1,92 @@
-/* Definitions to make GDB run on a Pyramidax under OSx 4.0 (4.2bsd).
- Copyright 1988, 1989, 1992 Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#define HOST_BYTE_ORDER BIG_ENDIAN
-
-/* Define PYRAMID_CONTROL_FRAME_DEBUGGING to get copious messages
- about reading the control stack on standard output. This
- makes gdb unusable as a debugger. */
-
-/* #define PYRAMID_CONTROL_FRAME_DEBUGGING */
-
-/* Define PYRAMID_FRAME_DEBUGGING for ? */
-
-/* use Pyramid's slightly strange ptrace */
-#define PYRAMID_PTRACE
-
-/* Traditional Unix virtual address spaces have thre regions: text,
- data and stack. The text, initialised data, and uninitialised data
- are represented in separate segments of the a.out file.
- When a process dumps core, the data and stack regions are written
- to a core file. This gives a debugger enough information to
- reconstruct (and debug) the virtual address space at the time of
- the coredump.
- Pyramids have an distinct fourth region of the virtual address
- space, in which the contents of the windowed registers are stacked
- in fixed-size frames. Pyramid refer to this region as the control
- stack. Each call (or trap) automatically allocates a new register
- frame; each return deallocates the current frame and restores the
- windowed registers to their values before the call.
-
- When dumping core, the control stack is written to a core files as
- a third segment. The core-handling functions need to know to deal
- with it. */
-
-/* Tell dep.c what the extra segment is. */
-#define PYRAMID_CORE
-
-#define NO_SIGINTERRUPT
-
-#define HAVE_WAIT_STRUCT
-
-/* This is the amount to subtract from u.u_ar0
- to get the offset in the core file of the register values. */
-
-#define KERNEL_U_ADDR (0x80000000 - (UPAGES * NBPG))
-
-/* Define offsets of registers in the core file (or maybe u area) */
-#define REGISTER_U_ADDR(addr, blockend, regno) \
-{ struct user __u; \
- addr = blockend + (regno - 16 ) * 4; \
- if (regno == 67) { \
- printf("\\geting reg 67\\"); \
- addr = (int)(&__u.u_pcb.pcb_csp) - (int) &__u; \
- } else if (regno == KSP_REGNUM) { \
- printf("\\geting KSP (reg %d)\\", KSP_REGNUM); \
- addr = (int)(&__u.u_pcb.pcb_ksp) - (int) &__u; \
- } else if (regno == CSP_REGNUM) { \
- printf("\\geting CSP (reg %d\\",CSP_REGNUM); \
- addr = (int)(&__u.u_pcb.pcb_csp) - (int) &__u; \
- } else if (regno == 64) { \
- printf("\\geting reg 64\\"); \
- addr = (int)(&__u.u_pcb.pcb_csp) - (int) &__u; \
- } else if (regno == PS_REGNUM) \
- addr = blockend - 4; \
- else if (1 && ((16 > regno) && (regno > 11))) \
- addr = last_frame_offset + (4 *(regno+32)); \
- else if (0 && (12 > regno)) \
- addr = global_reg_offset + (4 *regno); \
- else if (16 > regno) \
- addr = global_reg_offset + (4 *regno); \
- else \
- addr = blockend + (regno - 16 ) * 4; \
-}
-
-/* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
-#define FETCH_INFERIOR_REGISTERS
+/* OBSOLETE /* Definitions to make GDB run on a Pyramidax under OSx 4.0 (4.2bsd). */
+/* OBSOLETE Copyright 1988, 1989, 1992 Free Software Foundation, Inc. */
+/* OBSOLETE */
+/* OBSOLETE This file is part of GDB. */
+/* 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. *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define HOST_BYTE_ORDER BIG_ENDIAN */
+/* OBSOLETE */
+/* OBSOLETE /* Define PYRAMID_CONTROL_FRAME_DEBUGGING to get copious messages */
+/* OBSOLETE about reading the control stack on standard output. This */
+/* OBSOLETE makes gdb unusable as a debugger. *x/ */
+/* OBSOLETE */
+/* OBSOLETE /* #define PYRAMID_CONTROL_FRAME_DEBUGGING *x/ */
+/* OBSOLETE */
+/* OBSOLETE /* Define PYRAMID_FRAME_DEBUGGING for ? *x/ */
+/* OBSOLETE */
+/* OBSOLETE /* use Pyramid's slightly strange ptrace *x/ */
+/* OBSOLETE #define PYRAMID_PTRACE */
+/* OBSOLETE */
+/* OBSOLETE /* Traditional Unix virtual address spaces have thre regions: text, */
+/* OBSOLETE data and stack. The text, initialised data, and uninitialised data */
+/* OBSOLETE are represented in separate segments of the a.out file. */
+/* OBSOLETE When a process dumps core, the data and stack regions are written */
+/* OBSOLETE to a core file. This gives a debugger enough information to */
+/* OBSOLETE reconstruct (and debug) the virtual address space at the time of */
+/* OBSOLETE the coredump. */
+/* OBSOLETE Pyramids have an distinct fourth region of the virtual address */
+/* OBSOLETE space, in which the contents of the windowed registers are stacked */
+/* OBSOLETE in fixed-size frames. Pyramid refer to this region as the control */
+/* OBSOLETE stack. Each call (or trap) automatically allocates a new register */
+/* OBSOLETE frame; each return deallocates the current frame and restores the */
+/* OBSOLETE windowed registers to their values before the call. */
+/* OBSOLETE */
+/* OBSOLETE When dumping core, the control stack is written to a core files as */
+/* OBSOLETE a third segment. The core-handling functions need to know to deal */
+/* OBSOLETE with it. *x/ */
+/* OBSOLETE */
+/* OBSOLETE /* Tell dep.c what the extra segment is. *x/ */
+/* OBSOLETE #define PYRAMID_CORE */
+/* OBSOLETE */
+/* OBSOLETE #define NO_SIGINTERRUPT */
+/* OBSOLETE */
+/* OBSOLETE #define HAVE_WAIT_STRUCT */
+/* OBSOLETE */
+/* OBSOLETE /* This is the amount to subtract from u.u_ar0 */
+/* OBSOLETE to get the offset in the core file of the register values. *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define KERNEL_U_ADDR (0x80000000 - (UPAGES * NBPG)) */
+/* OBSOLETE */
+/* OBSOLETE /* Define offsets of registers in the core file (or maybe u area) *x/ */
+/* OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \ */
+/* OBSOLETE { struct user __u; \ */
+/* OBSOLETE addr = blockend + (regno - 16 ) * 4; \ */
+/* OBSOLETE if (regno == 67) { \ */
+/* OBSOLETE printf("\\geting reg 67\\"); \ */
+/* OBSOLETE addr = (int)(&__u.u_pcb.pcb_csp) - (int) &__u; \ */
+/* OBSOLETE } else if (regno == KSP_REGNUM) { \ */
+/* OBSOLETE printf("\\geting KSP (reg %d)\\", KSP_REGNUM); \ */
+/* OBSOLETE addr = (int)(&__u.u_pcb.pcb_ksp) - (int) &__u; \ */
+/* OBSOLETE } else if (regno == CSP_REGNUM) { \ */
+/* OBSOLETE printf("\\geting CSP (reg %d\\",CSP_REGNUM); \ */
+/* OBSOLETE addr = (int)(&__u.u_pcb.pcb_csp) - (int) &__u; \ */
+/* OBSOLETE } else if (regno == 64) { \ */
+/* OBSOLETE printf("\\geting reg 64\\"); \ */
+/* OBSOLETE addr = (int)(&__u.u_pcb.pcb_csp) - (int) &__u; \ */
+/* OBSOLETE } else if (regno == PS_REGNUM) \ */
+/* OBSOLETE addr = blockend - 4; \ */
+/* OBSOLETE else if (1 && ((16 > regno) && (regno > 11))) \ */
+/* OBSOLETE addr = last_frame_offset + (4 *(regno+32)); \ */
+/* OBSOLETE else if (0 && (12 > regno)) \ */
+/* OBSOLETE addr = global_reg_offset + (4 *regno); \ */
+/* OBSOLETE else if (16 > regno) \ */
+/* OBSOLETE addr = global_reg_offset + (4 *regno); \ */
+/* OBSOLETE else \ */
+/* OBSOLETE addr = blockend + (regno - 16 ) * 4; \ */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE /* Override copies of {fetch,store}_inferior_registers in infptrace.c. *x/ */
+/* OBSOLETE #define FETCH_INFERIOR_REGISTERS */
diff --git a/gdb/configure.host b/gdb/configure.host
index 84df8fa2aec..47e8603cc04 100644
--- a/gdb/configure.host
+++ b/gdb/configure.host
@@ -17,7 +17,7 @@ i[3456]86*) gdb_host_cpu=i386 ;;
m68*) gdb_host_cpu=m68k ;;
m88*) gdb_host_cpu=m88k ;;
# OBSOLETE np1) gdb_host_cpu=gould ;;
-pyramid) gdb_host_cpu=pyr ;;
+# OBSOLETE pyramid) gdb_host_cpu=pyr ;;
powerpc*) gdb_host_cpu=powerpc ;;
sparc64) gdb_host_cpu=sparc ;;
*) gdb_host_cpu=$host_cpu ;;
@@ -133,9 +133,9 @@ powerpcle-*-cygwin*) gdb_host=cygwin ;;
powerpcle-*-solaris*) gdb_host=solaris ;;
powerpc-*-linux*) gdb_host=linux ;;
-# OBSOLETE pn-*-*) gdb_host=pn ;;
+# OBSOLETE pn-*-*) gdb_host=pn ;;
-pyramid-*-*) gdb_host=pyramid ;;
+# OBSOLETE pyramid-*-*) gdb_host=pyramid ;;
romp-*-*) gdb_host=rtbsd ;;
diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index dbe822ab237..3f23a73409e 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -22,7 +22,7 @@ mips*) gdb_target_cpu=mips ;;
# OBSOLETE np1) gdb_target_cpu=gould ;;
powerpc*) gdb_target_cpu=powerpc ;;
# OBSOLETE pn) gdb_target_cpu=gould ;;
-pyramid) gdb_target_cpu=pyr ;;
+# OBSOLETE pyramid) gdb_target_cpu=pyr ;;
sparc*) gdb_target_cpu=sparc ;;
thumb*) gdb_target_cpu=arm ;;
strongarm*) gdb_target_cpu=arm ;;
@@ -225,7 +225,7 @@ powerpcle-*-eabi* | powerpcle-*-sysv* | powerpcle-*-elf*)
gdb_target=ppcle-eabi
fi ;;
-pyramid-*-*) gdb_target=pyramid ;;
+# OBSOLETE pyramid-*-*) gdb_target=pyramid ;;
rs6000-*-lynxos*) gdb_target=rs6000lynx ;;
rs6000-*-aix4*) gdb_target=aix4 ;;
diff --git a/gdb/defs.h b/gdb/defs.h
index b933698455b..fe112f0897c 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -1,3 +1,4 @@
+/* *INDENT-OFF* */ /* ATTR_FORMAT confuses indent, avoid running it for now */
/* Basic, host-specific, and target-specific definitions for GDB.
Copyright (C) 1986, 89, 91, 92, 93, 94, 95, 96, 1998
Free Software Foundation, Inc.
@@ -1224,3 +1225,4 @@ extern int use_windows;
#endif
#endif /* #ifndef DEFS_H */
+/* *INDENT-ON* */
diff --git a/gdb/dwarfread.c b/gdb/dwarfread.c
index 9de03123d7d..45a0e238550 100644
--- a/gdb/dwarfread.c
+++ b/gdb/dwarfread.c
@@ -2658,6 +2658,7 @@ add_partial_symbol (dip, objfile)
}
}
+/* *INDENT-OFF* */
/*
LOCAL FUNCTION
@@ -2721,6 +2722,7 @@ NOTES
where the actual definition occurs, rather than just a reference
to an external.
*/
+/* *INDENT-ON* */
static void
scan_partial_symbols (thisdie, enddie, objfile)
diff --git a/gdb/event-loop.h b/gdb/event-loop.h
index b53f8e25235..86abb22f2b7 100644
--- a/gdb/event-loop.h
+++ b/gdb/event-loop.h
@@ -255,3 +255,4 @@ extern char *new_async_prompt;
extern struct prompts the_prompts;
extern void (*call_readline) PARAMS ((void));
extern void (*input_handler) PARAMS ((char *));
+extern int input_fd;
diff --git a/gdb/exec.c b/gdb/exec.c
index d24c4b49bff..2e5e8bd12ee 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -570,20 +570,6 @@ xfer_memory (memaddr, myaddr, len, write, target)
return - (nextsectaddr - memaddr); /* Next boundary where we can help */
}
-#ifdef FIXME
-#ifdef REG_STACK_SEGMENT
-/* MOVE TO BFD... */
- /* Pyramids and AM29000s have an extra segment in the virtual address space
- for the (control) stack of register-window frames. The AM29000 folk
- call it the "register stack" rather than the "memory stack". */
- else if (memaddr >= reg_stack_start && memaddr < reg_stack_end)
- {
- i = min (len, reg_stack_end - memaddr);
- fileptr = memaddr - reg_stack_start + reg_stack_offset;
- wanna_xfer = coredata;
- }
-#endif /* REG_STACK_SEGMENT */
-#endif /* FIXME */
void
print_section_info (t, abfd)
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 1037be72a2b..dc026a4159d 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -1211,10 +1211,14 @@ add_mangled_type(pextras,t)
{
char* pname;
if ((pname=strrchr(tname,'l'),pname) && !strcmp(pname,"long"))
- ADD_EXTRA('l')
- else
- ADD_EXTRA('i')
- }
+ {
+ ADD_EXTRA ('l');
+ }
+ else
+ {
+ ADD_EXTRA ('i');
+ }
+ }
break;
default:
{
diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
index 2c5843ba02f..f50b64f326d 100644
--- a/gdb/gnu-nat.c
+++ b/gdb/gnu-nat.c
@@ -2524,8 +2524,7 @@ struct cmd_list_element *show_thread_default_cmd_list = NULL;
static void
set_thread_cmd (char *args, int from_tty)
{
- printf_unfiltered ("\"set thread\" must be followed by the name of a thread
-property, or \"default\".\n");
+ printf_unfiltered ("\"set thread\" must be followed by the name of a thread property, or \"default\".\n");
}
static void
@@ -2952,8 +2951,7 @@ static void add_task_commands ()
"Set whether new threads are allowed to run (once gdb has noticed them).",
&set_thread_default_cmd_list);
add_cmd ("run", no_class, show_thread_default_run_cmd,
- "Show whether new threads are allowed to run (once gdb has noticed
-them).",
+ "Show whether new threads are allowed to run (once gdb has noticed them).",
&show_thread_default_cmd_list);
add_cmd ("detach-suspend-count", class_run, set_thread_default_detach_sc_cmd,
"Set the default detach-suspend-count value for new threads.",
diff --git a/gdb/gnu-nat.h b/gdb/gnu-nat.h
index f50ba60a95f..3a32ab66991 100644
--- a/gdb/gnu-nat.h
+++ b/gdb/gnu-nat.h
@@ -85,6 +85,6 @@ extern int gnu_debug_flag;
#define debug(msg, args...) \
do { if (gnu_debug_flag) \
- fprintf (stderr, "%s: " msg "\r\n", __FUNCTION__ , ##args); } while (0)
+ fprintf_unfiltered (gdb_stdlog, "%s: " msg "\r\n", __FUNCTION__ , ##args); } while (0)
#endif /* __GNU_NAT_H__ */
diff --git a/gdb/gnu-regex.c b/gdb/gnu-regex.c
index 84db70f7952..3b8332752fb 100644
--- a/gdb/gnu-regex.c
+++ b/gdb/gnu-regex.c
@@ -1,3 +1,4 @@
+/* *INDENT-OFF* */ /* keep in sync with glibc */
/* Extended regular expression matching and search library,
version 0.12.
(Implements POSIX draft P1003.2/D11.2, except for some of the
diff --git a/gdb/gnu-regex.h b/gdb/gnu-regex.h
index 9153ea1b07d..4d62b03a8c6 100644
--- a/gdb/gnu-regex.h
+++ b/gdb/gnu-regex.h
@@ -1,3 +1,4 @@
+/* *INDENT-OFF* */ /* keep in sync with glibc */
/* Definitions for data structures and routines for the regular
expression library, version 0.12.
Copyright (C) 1985,89,90,91,92,93,95,96,97,98 Free Software Foundation, Inc.
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index ba4e798696d..17c3d6dbc64 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -198,8 +198,10 @@ strip_bg_char (args)
char **args;
{
char *p = NULL;
-
- if (p = strchr (*args, '&'))
+
+ p = strchr (*args, '&');
+
+ if (p)
{
if (p == (*args + strlen (*args) - 1))
{
diff --git a/gdb/language.c b/gdb/language.c
index 394a500f02b..011fa21de9a 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -488,7 +488,7 @@ binop_result_type (v1, v2)
return TYPE_CODE(t2) == TYPE_CODE_FLT && l2 > l1 ?
VALUE_TYPE(v2) : VALUE_TYPE(v1);
else if (TYPE_CODE(t2)==TYPE_CODE_FLT)
- return TYPE_CODE(t1)) == TYPE_CODE_FLT && l1 > l2 ?
+ return TYPE_CODE(t1) == TYPE_CODE_FLT && l1 > l2 ?
VALUE_TYPE(v1) : VALUE_TYPE(v2);
else if (TYPE_UNSIGNED(t1) && l1 > l2)
return VALUE_TYPE(v1);
diff --git a/gdb/lynx-nat.c b/gdb/lynx-nat.c
index f006aa46c9c..38f72eabc1a 100644
--- a/gdb/lynx-nat.c
+++ b/gdb/lynx-nat.c
@@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <sys/fpp.h>
static unsigned long registers_addr PARAMS ((int pid));
-static void fetch_core_registers PARAMS ((char *, unsigned, int, CORE_ADDR);
+static void fetch_core_registers PARAMS ((char *, unsigned, int, CORE_ADDR));
#define X(ENTRY)(offsetof(struct econtext, ENTRY))
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index d472b18b200..5d75e482af2 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -123,6 +123,7 @@ mips_register_name (i)
}
+/* *INDENT-OFF* */
/* Names of IDT R3041 registers. */
char *mips_r3041_reg_names[] = {
@@ -203,6 +204,7 @@ struct {
{ "lsi33k", mips_lsi33k_reg_names },
{ NULL, NULL }
};
+/* *INDENT-ON* */
/* Table to translate MIPS16 register field to actual register number. */
static int mips16_to_32_reg[8] = { 16, 17, 2, 3, 4, 5, 6, 7 };
diff --git a/gdb/mn10200-tdep.c b/gdb/mn10200-tdep.c
index bdc3e94447d..44188ba408c 100644
--- a/gdb/mn10200-tdep.c
+++ b/gdb/mn10200-tdep.c
@@ -39,7 +39,7 @@ mn10200_use_struct_convention (gcc_p, type)
}
-
+/* *INDENT-OFF* */
/* The main purpose of this file is dealing with prologues to extract
information about stack frames and saved registers.
@@ -102,6 +102,7 @@ mn10200_use_struct_convention (gcc_p, type)
NO_MORE_FRAMES: Set this if the current frame is "start" or
if the first instruction looks like mov <imm>,sp. This tells
frame chain to not bother trying to unwind past this frame. */
+/* *INDENT-ON* */
#define MY_FRAME_IN_SP 0x1
#define MY_FRAME_IN_FP 0x2
diff --git a/gdb/parse.c b/gdb/parse.c
index 6f5a93e485f..86267ea6730 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -1168,13 +1168,13 @@ parse_exp_1 (stringptr, block, comma)
parser, to a prefix form. */
if (expressiondebug)
- dump_prefix_expression (expout, gdb_stdout,
+ dump_prefix_expression (expout, gdb_stdlog,
"before conversion to prefix form");
prefixify_expression (expout);
if (expressiondebug)
- dump_postfix_expression (expout, gdb_stdout,
+ dump_postfix_expression (expout, gdb_stdlog,
"after conversion to prefix form");
*stringptr = lexptr;
diff --git a/gdb/pyr-tdep.c b/gdb/pyr-tdep.c
index 85e9a072f3c..f8c570ef49e 100644
--- a/gdb/pyr-tdep.c
+++ b/gdb/pyr-tdep.c
@@ -1,452 +1,452 @@
-/* Pyramid target-dependent code for GDB.
- Copyright (C) 1988, 1989, 1991 Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "defs.h"
-
-/*** Prettier register printing. ***/
-
-/* Print registers in the same format as pyramid's dbx, adb, sdb. */
-pyr_print_registers(reg_buf, regnum)
- long *reg_buf[];
-{
- register int regno;
- int usp, ksp;
- struct user u;
-
- for (regno = 0; regno < 16; regno++) {
- printf_unfiltered/*_filtered*/ ("%6.6s: %8x %6.6s: %8x %6s: %8x %6s: %8x\n",
- REGISTER_NAME (regno), reg_buf[regno],
- REGISTER_NAME (regno+16), reg_buf[regno+16],
- REGISTER_NAME (regno+32), reg_buf[regno+32],
- REGISTER_NAME (regno+48), reg_buf[regno+48]);
- }
- usp = ptrace (3, inferior_pid,
- (PTRACE_ARG3_TYPE) ((char *)&u.u_pcb.pcb_usp) -
- ((char *)&u), 0);
- ksp = ptrace (3, inferior_pid,
- (PTRACE_ARG3_TYPE) ((char *)&u.u_pcb.pcb_ksp) -
- ((char *)&u), 0);
- printf_unfiltered/*_filtered*/ ("\n%6.6s: %8x %6.6s: %8x (%08x) %6.6s %8x\n",
- REGISTER_NAME (CSP_REGNUM),reg_buf[CSP_REGNUM],
- REGISTER_NAME (KSP_REGNUM), reg_buf[KSP_REGNUM], ksp,
- "usp", usp);
-}
-
-/* Print the register regnum, or all registers if regnum is -1.
- fpregs is currently ignored. */
-
-pyr_do_registers_info (regnum, fpregs)
- int regnum;
- int fpregs;
-{
- /* On a pyr, we know a virtual register can always fit in an long.
- Here (and elsewhere) we take advantage of that. Yuk. */
- long raw_regs[MAX_REGISTER_RAW_SIZE*NUM_REGS];
- register int i;
-
- for (i = 0 ; i < 64 ; i++) {
- read_relative_register_raw_bytes(i, raw_regs+i);
- }
- if (regnum == -1)
- pyr_print_registers (raw_regs, regnum);
- else
- for (i = 0; i < NUM_REGS; i++)
- if (i == regnum) {
- long val = raw_regs[i];
-
- fputs_filtered (REGISTER_NAME (i), gdb_stdout);
- printf_filtered(":");
- print_spaces_filtered (6 - strlen (REGISTER_NAME (i)), gdb_stdout);
- if (val == 0)
- printf_filtered ("0");
- else
- printf_filtered ("%s %d", local_hex_string_custom(val,"08"), val);
- printf_filtered("\n");
- }
-}
-
-/*** Debugging editions of various macros from m-pyr.h ****/
-
-CORE_ADDR frame_locals_address (frame)
- struct frame_info *frame;
-{
- register int addr = find_saved_register (frame,CFP_REGNUM);
- register int result = read_memory_integer (addr, 4);
-#ifdef PYRAMID_CONTROL_FRAME_DEBUGGING
- fprintf_unfiltered (gdb_stderr,
- "\t[[..frame_locals:%8x, %s= %x @%x fcfp= %x foo= %x\n\t gr13=%x pr13=%x tr13=%x @%x]]\n",
- frame->frame,
- REGISTER_NAME (CFP_REGNUM),
- result, addr,
- frame->frame_cfp, (CFP_REGNUM),
-
-
- read_register(13), read_register(29), read_register(61),
- find_saved_register(frame, 61));
-#endif /* PYRAMID_CONTROL_FRAME_DEBUGGING */
-
- /* FIXME: I thought read_register (CFP_REGNUM) should be the right answer;
- or at least CFP_REGNUM relative to FRAME (ie, result).
- There seems to be a bug in the way the innermost frame is set up. */
-
- return ((frame->next) ? result: frame->frame_cfp);
-}
-
-CORE_ADDR frame_args_addr (frame)
- struct frame_info *frame;
-{
- register int addr = find_saved_register (frame,CFP_REGNUM);
- register int result = read_memory_integer (addr, 4);
-
-#ifdef PYRAMID_CONTROL_FRAME_DEBUGGING
- fprintf_unfiltered (gdb_stderr,
- "\t[[..frame_args:%8x, %s= %x @%x fcfp= %x r_r= %x\n\t gr13=%x pr13=%x tr13=%x @%x]]\n",
- frame->frame,
- REGISTER_NAME (CFP_REGNUM),
- result, addr,
- frame->frame_cfp, read_register(CFP_REGNUM),
-
- read_register(13), read_register(29), read_register(61),
- find_saved_register(frame, 61));
-#endif /* PYRAMID_CONTROL_FRAME_DEBUGGING */
-
- /* FIXME: I thought read_register (CFP_REGNUM) should be the right answer;
- or at least CFP_REGNUM relative to FRAME (ie, result).
- There seems to be a bug in the way the innermost frame is set up. */
- return ((frame->next) ? result: frame->frame_cfp);
-}
-
-#include "symtab.h"
-#include "opcode/pyr.h"
-#include "gdbcore.h"
-
-
-/* A couple of functions used for debugging frame-handling on
- Pyramids. (The Pyramid-dependent handling of register values for
- windowed registers is known to be buggy.)
-
- When debugging, these functions can supplant the normal definitions of some
- of the macros in tm-pyramid.h The quantity of information produced
- when these functions are used makes the gdb unusable as a
- debugger for user programs. */
-
-extern unsigned pyr_saved_pc(), pyr_frame_chain();
-
-CORE_ADDR pyr_frame_chain(frame)
- CORE_ADDR frame;
-{
- int foo=frame - CONTROL_STACK_FRAME_SIZE;
- /* printf_unfiltered ("...following chain from %x: got %x\n", frame, foo);*/
- return foo;
-}
-
-CORE_ADDR pyr_saved_pc(frame)
- CORE_ADDR frame;
-{
- int foo=0;
- foo = read_memory_integer (((CORE_ADDR)(frame))+60, 4);
- printf_unfiltered ("..reading pc from frame 0x%0x+%d regs: got %0x\n",
- frame, 60/4, foo);
- return foo;
-}
-
-/* Pyramid instructions are never longer than this many bytes. */
-#define MAXLEN 24
-
-/* Number of elements in the opcode table. */
-/*const*/ static int nopcodes = (sizeof (pyr_opcodes) / sizeof( pyr_opcodes[0]));
-#define NOPCODES (nopcodes)
-
-/* Let's be byte-independent so we can use this as a cross-assembler. */
-
-#define NEXTLONG(p) \
- (p += 4, (((((p[-4] << 8) + p[-3]) << 8) + p[-2]) << 8) + p[-1])
-
-/* Print one instruction at address MEMADDR in debugged memory,
- on STREAM. Returns length of the instruction, in bytes. */
-
-int
-pyr_print_insn (memaddr, stream)
- CORE_ADDR memaddr;
- GDB_FILE *stream;
-{
- unsigned char buffer[MAXLEN];
- register int i, nargs, insn_size =4;
- register unsigned char *p;
- register char *d;
- register int insn_opcode, operand_mode;
- register int index_multiplier, index_reg_regno, op_1_regno, op_2_regno ;
- long insn; /* first word of the insn, not broken down. */
- pyr_insn_format insn_decode; /* the same, broken out into op{code,erands} */
- long extra_1, extra_2;
-
- read_memory (memaddr, buffer, MAXLEN);
- insn_decode = *((pyr_insn_format *) buffer);
- insn = * ((int *) buffer);
- insn_opcode = insn_decode.operator;
- operand_mode = insn_decode.mode;
- index_multiplier = insn_decode.index_scale;
- index_reg_regno = insn_decode.index_reg;
- op_1_regno = insn_decode.operand_1;
- op_2_regno = insn_decode.operand_2;
-
-
- if (*((int *)buffer) == 0x0) {
- /* "halt" looks just like an invalid "jump" to the insn decoder,
- so is dealt with as a special case */
- fprintf_unfiltered (stream, "halt");
- return (4);
- }
-
- for (i = 0; i < NOPCODES; i++)
- if (pyr_opcodes[i].datum.code == insn_opcode)
- break;
-
- if (i == NOPCODES)
- /* FIXME: Handle unrecognised instructions better. */
- fprintf_unfiltered (stream, "???\t#%08x\t(op=%x mode =%x)",
- insn, insn_decode.operator, insn_decode.mode);
- else
- {
- /* Print the mnemonic for the instruction. Pyramid insn operands
- are so regular that we can deal with almost all of them
- separately.
- Unconditional branches are an exception: they are encoded as
- conditional branches (branch if false condition, I think)
- with no condition specified. The average user will not be
- aware of this. To maintain their illusion that an
- unconditional branch insn exists, we will have to FIXME to
- treat the insn mnemnonic of all branch instructions here as a
- special case: check the operands of branch insn and print an
- appropriate mnemonic. */
-
- fprintf_unfiltered (stream, "%s\t", pyr_opcodes[i].name);
-
- /* Print the operands of the insn (as specified in
- insn.operand_mode).
- Branch operands of branches are a special case: they are a word
- offset, not a byte offset. */
-
- if (insn_decode.operator == 0x01 || insn_decode.operator == 0x02) {
- register int bit_codes=(insn >> 16)&0xf;
- register int i;
- register int displacement = (insn & 0x0000ffff) << 2;
-
- static char cc_bit_names[] = "cvzn"; /* z,n,c,v: strange order? */
-
- /* Is bfc and no bits specified an unconditional branch?*/
- for (i=0;i<4;i++) {
- if ((bit_codes) & 0x1)
- fputc_unfiltered (cc_bit_names[i], stream);
- bit_codes >>= 1;
- }
-
- fprintf_unfiltered (stream, ",%0x",
- displacement + memaddr);
- return (insn_size);
- }
-
- switch (operand_mode) {
- case 0:
- fprintf_unfiltered (stream, "%s,%s",
- REGISTER_NAME (op_1_regno),
- REGISTER_NAME (op_2_regno));
- break;
-
- case 1:
- fprintf_unfiltered (stream, " 0x%0x,%s",
- op_1_regno,
- REGISTER_NAME (op_2_regno));
- break;
-
- case 2:
- read_memory (memaddr+4, buffer, MAXLEN);
- insn_size += 4;
- extra_1 = * ((int *) buffer);
- fprintf_unfiltered (stream, " $0x%0x,%s",
- extra_1,
- REGISTER_NAME (op_2_regno));
- break;
- case 3:
- fprintf_unfiltered (stream, " (%s),%s",
- REGISTER_NAME (op_1_regno),
- REGISTER_NAME (op_2_regno));
- break;
-
- case 4:
- read_memory (memaddr+4, buffer, MAXLEN);
- insn_size += 4;
- extra_1 = * ((int *) buffer);
- fprintf_unfiltered (stream, " 0x%0x(%s),%s",
- extra_1,
- REGISTER_NAME (op_1_regno),
- REGISTER_NAME (op_2_regno));
- break;
-
- /* S1 destination mode */
- case 5:
- fprintf_unfiltered (stream,
- ((index_reg_regno) ? "%s,(%s)[%s*%1d]" : "%s,(%s)"),
- REGISTER_NAME (op_1_regno),
- REGISTER_NAME (op_2_regno),
- REGISTER_NAME (index_reg_regno),
- index_multiplier);
- break;
-
- case 6:
- fprintf_unfiltered (stream,
- ((index_reg_regno) ? " $%#0x,(%s)[%s*%1d]"
- : " $%#0x,(%s)"),
- op_1_regno,
- REGISTER_NAME (op_2_regno),
- REGISTER_NAME (index_reg_regno),
- index_multiplier);
- break;
-
- case 7:
- read_memory (memaddr+4, buffer, MAXLEN);
- insn_size += 4;
- extra_1 = * ((int *) buffer);
- fprintf_unfiltered (stream,
- ((index_reg_regno) ? " $%#0x,(%s)[%s*%1d]"
- : " $%#0x,(%s)"),
- extra_1,
- REGISTER_NAME (op_2_regno),
- REGISTER_NAME (index_reg_regno),
- index_multiplier);
- break;
-
- case 8:
- fprintf_unfiltered (stream,
- ((index_reg_regno) ? " (%s),(%s)[%s*%1d]" : " (%s),(%s)"),
- REGISTER_NAME (op_1_regno),
- REGISTER_NAME (op_2_regno),
- REGISTER_NAME (index_reg_regno),
- index_multiplier);
- break;
-
- case 9:
- read_memory (memaddr+4, buffer, MAXLEN);
- insn_size += 4;
- extra_1 = * ((int *) buffer);
- fprintf_unfiltered (stream,
- ((index_reg_regno)
- ? "%#0x(%s),(%s)[%s*%1d]"
- : "%#0x(%s),(%s)"),
- extra_1,
- REGISTER_NAME (op_1_regno),
- REGISTER_NAME (op_2_regno),
- REGISTER_NAME (index_reg_regno),
- index_multiplier);
- break;
-
- /* S2 destination mode */
- case 10:
- read_memory (memaddr+4, buffer, MAXLEN);
- insn_size += 4;
- extra_1 = * ((int *) buffer);
- fprintf_unfiltered (stream,
- ((index_reg_regno) ? "%s,%#0x(%s)[%s*%1d]" : "%s,%#0x(%s)"),
- REGISTER_NAME (op_1_regno),
- extra_1,
- REGISTER_NAME (op_2_regno),
- REGISTER_NAME (index_reg_regno),
- index_multiplier);
- break;
- case 11:
- read_memory (memaddr+4, buffer, MAXLEN);
- insn_size += 4;
- extra_1 = * ((int *) buffer);
- fprintf_unfiltered (stream,
- ((index_reg_regno) ?
- " $%#0x,%#0x(%s)[%s*%1d]" : " $%#0x,%#0x(%s)"),
- op_1_regno,
- extra_1,
- REGISTER_NAME (op_2_regno),
- REGISTER_NAME (index_reg_regno),
- index_multiplier);
- break;
- case 12:
- read_memory (memaddr+4, buffer, MAXLEN);
- insn_size += 4;
- extra_1 = * ((int *) buffer);
- read_memory (memaddr+8, buffer, MAXLEN);
- insn_size += 4;
- extra_2 = * ((int *) buffer);
- fprintf_unfiltered (stream,
- ((index_reg_regno) ?
- " $%#0x,%#0x(%s)[%s*%1d]" : " $%#0x,%#0x(%s)"),
- extra_1,
- extra_2,
- REGISTER_NAME (op_2_regno),
- REGISTER_NAME (index_reg_regno),
- index_multiplier);
- break;
-
- case 13:
- read_memory (memaddr+4, buffer, MAXLEN);
- insn_size += 4;
- extra_1 = * ((int *) buffer);
- fprintf_unfiltered (stream,
- ((index_reg_regno)
- ? " (%s),%#0x(%s)[%s*%1d]"
- : " (%s),%#0x(%s)"),
- REGISTER_NAME (op_1_regno),
- extra_1,
- REGISTER_NAME (op_2_regno),
- REGISTER_NAME (index_reg_regno),
- index_multiplier);
- break;
- case 14:
- read_memory (memaddr+4, buffer, MAXLEN);
- insn_size += 4;
- extra_1 = * ((int *) buffer);
- read_memory (memaddr+8, buffer, MAXLEN);
- insn_size += 4;
- extra_2 = * ((int *) buffer);
- fprintf_unfiltered (stream,
- ((index_reg_regno) ? "%#0x(%s),%#0x(%s)[%s*%1d]"
- : "%#0x(%s),%#0x(%s) "),
- extra_1,
- REGISTER_NAME (op_1_regno),
- extra_2,
- REGISTER_NAME (op_2_regno),
- REGISTER_NAME (index_reg_regno),
- index_multiplier);
- break;
-
- default:
- fprintf_unfiltered (stream,
- ((index_reg_regno) ? "%s,%s [%s*%1d]" : "%s,%s"),
- REGISTER_NAME (op_1_regno),
- REGISTER_NAME (op_2_regno),
- REGISTER_NAME (index_reg_regno),
- index_multiplier);
- fprintf_unfiltered (stream,
- "\t\t# unknown mode in %08x",
- insn);
- break;
- } /* switch */
- }
-
- {
- return insn_size;
- }
- abort ();
-}
+/* OBSOLETE /* Pyramid target-dependent code for GDB. */
+/* OBSOLETE Copyright (C) 1988, 1989, 1991 Free Software Foundation, Inc. */
+/* OBSOLETE */
+/* OBSOLETE This file is part of GDB. */
+/* 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. *x/ */
+/* OBSOLETE */
+/* OBSOLETE #include "defs.h" */
+/* OBSOLETE */
+/* OBSOLETE /*** Prettier register printing. ***x/ */
+/* OBSOLETE */
+/* OBSOLETE /* Print registers in the same format as pyramid's dbx, adb, sdb. *x/ */
+/* OBSOLETE pyr_print_registers(reg_buf, regnum) */
+/* OBSOLETE long *reg_buf[]; */
+/* OBSOLETE { */
+/* OBSOLETE register int regno; */
+/* OBSOLETE int usp, ksp; */
+/* OBSOLETE struct user u; */
+/* OBSOLETE */
+/* OBSOLETE for (regno = 0; regno < 16; regno++) { */
+/* OBSOLETE printf_unfiltered/*_filtered*x/ ("%6.6s: %8x %6.6s: %8x %6s: %8x %6s: %8x\n", */
+/* OBSOLETE REGISTER_NAME (regno), reg_buf[regno], */
+/* OBSOLETE REGISTER_NAME (regno+16), reg_buf[regno+16], */
+/* OBSOLETE REGISTER_NAME (regno+32), reg_buf[regno+32], */
+/* OBSOLETE REGISTER_NAME (regno+48), reg_buf[regno+48]); */
+/* OBSOLETE } */
+/* OBSOLETE usp = ptrace (3, inferior_pid, */
+/* OBSOLETE (PTRACE_ARG3_TYPE) ((char *)&u.u_pcb.pcb_usp) - */
+/* OBSOLETE ((char *)&u), 0); */
+/* OBSOLETE ksp = ptrace (3, inferior_pid, */
+/* OBSOLETE (PTRACE_ARG3_TYPE) ((char *)&u.u_pcb.pcb_ksp) - */
+/* OBSOLETE ((char *)&u), 0); */
+/* OBSOLETE printf_unfiltered/*_filtered*x/ ("\n%6.6s: %8x %6.6s: %8x (%08x) %6.6s %8x\n", */
+/* OBSOLETE REGISTER_NAME (CSP_REGNUM),reg_buf[CSP_REGNUM], */
+/* OBSOLETE REGISTER_NAME (KSP_REGNUM), reg_buf[KSP_REGNUM], ksp, */
+/* OBSOLETE "usp", usp); */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE /* Print the register regnum, or all registers if regnum is -1. */
+/* OBSOLETE fpregs is currently ignored. *x/ */
+/* OBSOLETE */
+/* OBSOLETE pyr_do_registers_info (regnum, fpregs) */
+/* OBSOLETE int regnum; */
+/* OBSOLETE int fpregs; */
+/* OBSOLETE { */
+/* OBSOLETE /* On a pyr, we know a virtual register can always fit in an long. */
+/* OBSOLETE Here (and elsewhere) we take advantage of that. Yuk. *x/ */
+/* OBSOLETE long raw_regs[MAX_REGISTER_RAW_SIZE*NUM_REGS]; */
+/* OBSOLETE register int i; */
+/* OBSOLETE */
+/* OBSOLETE for (i = 0 ; i < 64 ; i++) { */
+/* OBSOLETE read_relative_register_raw_bytes(i, raw_regs+i); */
+/* OBSOLETE } */
+/* OBSOLETE if (regnum == -1) */
+/* OBSOLETE pyr_print_registers (raw_regs, regnum); */
+/* OBSOLETE else */
+/* OBSOLETE for (i = 0; i < NUM_REGS; i++) */
+/* OBSOLETE if (i == regnum) { */
+/* OBSOLETE long val = raw_regs[i]; */
+/* OBSOLETE */
+/* OBSOLETE fputs_filtered (REGISTER_NAME (i), gdb_stdout); */
+/* OBSOLETE printf_filtered(":"); */
+/* OBSOLETE print_spaces_filtered (6 - strlen (REGISTER_NAME (i)), gdb_stdout); */
+/* OBSOLETE if (val == 0) */
+/* OBSOLETE printf_filtered ("0"); */
+/* OBSOLETE else */
+/* OBSOLETE printf_filtered ("%s %d", local_hex_string_custom(val,"08"), val); */
+/* OBSOLETE printf_filtered("\n"); */
+/* OBSOLETE } */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE /*** Debugging editions of various macros from m-pyr.h ****x/ */
+/* OBSOLETE */
+/* OBSOLETE CORE_ADDR frame_locals_address (frame) */
+/* OBSOLETE struct frame_info *frame; */
+/* OBSOLETE { */
+/* OBSOLETE register int addr = find_saved_register (frame,CFP_REGNUM); */
+/* OBSOLETE register int result = read_memory_integer (addr, 4); */
+/* OBSOLETE #ifdef PYRAMID_CONTROL_FRAME_DEBUGGING */
+/* OBSOLETE fprintf_unfiltered (gdb_stderr, */
+/* OBSOLETE "\t[[..frame_locals:%8x, %s= %x @%x fcfp= %x foo= %x\n\t gr13=%x pr13=%x tr13=%x @%x]]\n", */
+/* OBSOLETE frame->frame, */
+/* OBSOLETE REGISTER_NAME (CFP_REGNUM), */
+/* OBSOLETE result, addr, */
+/* OBSOLETE frame->frame_cfp, (CFP_REGNUM), */
+/* OBSOLETE */
+/* OBSOLETE */
+/* OBSOLETE read_register(13), read_register(29), read_register(61), */
+/* OBSOLETE find_saved_register(frame, 61)); */
+/* OBSOLETE #endif /* PYRAMID_CONTROL_FRAME_DEBUGGING *x/ */
+/* OBSOLETE */
+/* OBSOLETE /* FIXME: I thought read_register (CFP_REGNUM) should be the right answer; */
+/* OBSOLETE or at least CFP_REGNUM relative to FRAME (ie, result). */
+/* OBSOLETE There seems to be a bug in the way the innermost frame is set up. *x/ */
+/* OBSOLETE */
+/* OBSOLETE return ((frame->next) ? result: frame->frame_cfp); */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE CORE_ADDR frame_args_addr (frame) */
+/* OBSOLETE struct frame_info *frame; */
+/* OBSOLETE { */
+/* OBSOLETE register int addr = find_saved_register (frame,CFP_REGNUM); */
+/* OBSOLETE register int result = read_memory_integer (addr, 4); */
+/* OBSOLETE */
+/* OBSOLETE #ifdef PYRAMID_CONTROL_FRAME_DEBUGGING */
+/* OBSOLETE fprintf_unfiltered (gdb_stderr, */
+/* OBSOLETE "\t[[..frame_args:%8x, %s= %x @%x fcfp= %x r_r= %x\n\t gr13=%x pr13=%x tr13=%x @%x]]\n", */
+/* OBSOLETE frame->frame, */
+/* OBSOLETE REGISTER_NAME (CFP_REGNUM), */
+/* OBSOLETE result, addr, */
+/* OBSOLETE frame->frame_cfp, read_register(CFP_REGNUM), */
+/* OBSOLETE */
+/* OBSOLETE read_register(13), read_register(29), read_register(61), */
+/* OBSOLETE find_saved_register(frame, 61)); */
+/* OBSOLETE #endif /* PYRAMID_CONTROL_FRAME_DEBUGGING *x/ */
+/* OBSOLETE */
+/* OBSOLETE /* FIXME: I thought read_register (CFP_REGNUM) should be the right answer; */
+/* OBSOLETE or at least CFP_REGNUM relative to FRAME (ie, result). */
+/* OBSOLETE There seems to be a bug in the way the innermost frame is set up. *x/ */
+/* OBSOLETE return ((frame->next) ? result: frame->frame_cfp); */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE #include "symtab.h" */
+/* OBSOLETE #include "opcode/pyr.h" */
+/* OBSOLETE #include "gdbcore.h" */
+/* OBSOLETE */
+/* OBSOLETE */
+/* OBSOLETE /* A couple of functions used for debugging frame-handling on */
+/* OBSOLETE Pyramids. (The Pyramid-dependent handling of register values for */
+/* OBSOLETE windowed registers is known to be buggy.) */
+/* OBSOLETE */
+/* OBSOLETE When debugging, these functions can supplant the normal definitions of some */
+/* OBSOLETE of the macros in tm-pyramid.h The quantity of information produced */
+/* OBSOLETE when these functions are used makes the gdb unusable as a */
+/* OBSOLETE debugger for user programs. *x/ */
+/* OBSOLETE */
+/* OBSOLETE extern unsigned pyr_saved_pc(), pyr_frame_chain(); */
+/* OBSOLETE */
+/* OBSOLETE CORE_ADDR pyr_frame_chain(frame) */
+/* OBSOLETE CORE_ADDR frame; */
+/* OBSOLETE { */
+/* OBSOLETE int foo=frame - CONTROL_STACK_FRAME_SIZE; */
+/* OBSOLETE /* printf_unfiltered ("...following chain from %x: got %x\n", frame, foo);*x/ */
+/* OBSOLETE return foo; */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE CORE_ADDR pyr_saved_pc(frame) */
+/* OBSOLETE CORE_ADDR frame; */
+/* OBSOLETE { */
+/* OBSOLETE int foo=0; */
+/* OBSOLETE foo = read_memory_integer (((CORE_ADDR)(frame))+60, 4); */
+/* OBSOLETE printf_unfiltered ("..reading pc from frame 0x%0x+%d regs: got %0x\n", */
+/* OBSOLETE frame, 60/4, foo); */
+/* OBSOLETE return foo; */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE /* Pyramid instructions are never longer than this many bytes. *x/ */
+/* OBSOLETE #define MAXLEN 24 */
+/* OBSOLETE */
+/* OBSOLETE /* Number of elements in the opcode table. *x/ */
+/* OBSOLETE /*const*x/ static int nopcodes = (sizeof (pyr_opcodes) / sizeof( pyr_opcodes[0])); */
+/* OBSOLETE #define NOPCODES (nopcodes) */
+/* OBSOLETE */
+/* OBSOLETE /* Let's be byte-independent so we can use this as a cross-assembler. *x/ */
+/* OBSOLETE */
+/* OBSOLETE #define NEXTLONG(p) \ */
+/* OBSOLETE (p += 4, (((((p[-4] << 8) + p[-3]) << 8) + p[-2]) << 8) + p[-1]) */
+/* OBSOLETE */
+/* OBSOLETE /* Print one instruction at address MEMADDR in debugged memory, */
+/* OBSOLETE on STREAM. Returns length of the instruction, in bytes. *x/ */
+/* OBSOLETE */
+/* OBSOLETE int */
+/* OBSOLETE pyr_print_insn (memaddr, stream) */
+/* OBSOLETE CORE_ADDR memaddr; */
+/* OBSOLETE GDB_FILE *stream; */
+/* OBSOLETE { */
+/* OBSOLETE unsigned char buffer[MAXLEN]; */
+/* OBSOLETE register int i, nargs, insn_size =4; */
+/* OBSOLETE register unsigned char *p; */
+/* OBSOLETE register char *d; */
+/* OBSOLETE register int insn_opcode, operand_mode; */
+/* OBSOLETE register int index_multiplier, index_reg_regno, op_1_regno, op_2_regno ; */
+/* OBSOLETE long insn; /* first word of the insn, not broken down. *x/ */
+/* OBSOLETE pyr_insn_format insn_decode; /* the same, broken out into op{code,erands} *x/ */
+/* OBSOLETE long extra_1, extra_2; */
+/* OBSOLETE */
+/* OBSOLETE read_memory (memaddr, buffer, MAXLEN); */
+/* OBSOLETE insn_decode = *((pyr_insn_format *) buffer); */
+/* OBSOLETE insn = * ((int *) buffer); */
+/* OBSOLETE insn_opcode = insn_decode.operator; */
+/* OBSOLETE operand_mode = insn_decode.mode; */
+/* OBSOLETE index_multiplier = insn_decode.index_scale; */
+/* OBSOLETE index_reg_regno = insn_decode.index_reg; */
+/* OBSOLETE op_1_regno = insn_decode.operand_1; */
+/* OBSOLETE op_2_regno = insn_decode.operand_2; */
+/* OBSOLETE */
+/* OBSOLETE */
+/* OBSOLETE if (*((int *)buffer) == 0x0) { */
+/* OBSOLETE /* "halt" looks just like an invalid "jump" to the insn decoder, */
+/* OBSOLETE so is dealt with as a special case *x/ */
+/* OBSOLETE fprintf_unfiltered (stream, "halt"); */
+/* OBSOLETE return (4); */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE for (i = 0; i < NOPCODES; i++) */
+/* OBSOLETE if (pyr_opcodes[i].datum.code == insn_opcode) */
+/* OBSOLETE break; */
+/* OBSOLETE */
+/* OBSOLETE if (i == NOPCODES) */
+/* OBSOLETE /* FIXME: Handle unrecognised instructions better. *x/ */
+/* OBSOLETE fprintf_unfiltered (stream, "???\t#%08x\t(op=%x mode =%x)", */
+/* OBSOLETE insn, insn_decode.operator, insn_decode.mode); */
+/* OBSOLETE else */
+/* OBSOLETE { */
+/* OBSOLETE /* Print the mnemonic for the instruction. Pyramid insn operands */
+/* OBSOLETE are so regular that we can deal with almost all of them */
+/* OBSOLETE separately. */
+/* OBSOLETE Unconditional branches are an exception: they are encoded as */
+/* OBSOLETE conditional branches (branch if false condition, I think) */
+/* OBSOLETE with no condition specified. The average user will not be */
+/* OBSOLETE aware of this. To maintain their illusion that an */
+/* OBSOLETE unconditional branch insn exists, we will have to FIXME to */
+/* OBSOLETE treat the insn mnemnonic of all branch instructions here as a */
+/* OBSOLETE special case: check the operands of branch insn and print an */
+/* OBSOLETE appropriate mnemonic. *x/ */
+/* OBSOLETE */
+/* OBSOLETE fprintf_unfiltered (stream, "%s\t", pyr_opcodes[i].name); */
+/* OBSOLETE */
+/* OBSOLETE /* Print the operands of the insn (as specified in */
+/* OBSOLETE insn.operand_mode). */
+/* OBSOLETE Branch operands of branches are a special case: they are a word */
+/* OBSOLETE offset, not a byte offset. *x/ */
+/* OBSOLETE */
+/* OBSOLETE if (insn_decode.operator == 0x01 || insn_decode.operator == 0x02) { */
+/* OBSOLETE register int bit_codes=(insn >> 16)&0xf; */
+/* OBSOLETE register int i; */
+/* OBSOLETE register int displacement = (insn & 0x0000ffff) << 2; */
+/* OBSOLETE */
+/* OBSOLETE static char cc_bit_names[] = "cvzn"; /* z,n,c,v: strange order? *x/ */
+/* OBSOLETE */
+/* OBSOLETE /* Is bfc and no bits specified an unconditional branch?*x/ */
+/* OBSOLETE for (i=0;i<4;i++) { */
+/* OBSOLETE if ((bit_codes) & 0x1) */
+/* OBSOLETE fputc_unfiltered (cc_bit_names[i], stream); */
+/* OBSOLETE bit_codes >>= 1; */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE fprintf_unfiltered (stream, ",%0x", */
+/* OBSOLETE displacement + memaddr); */
+/* OBSOLETE return (insn_size); */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE switch (operand_mode) { */
+/* OBSOLETE case 0: */
+/* OBSOLETE fprintf_unfiltered (stream, "%s,%s", */
+/* OBSOLETE REGISTER_NAME (op_1_regno), */
+/* OBSOLETE REGISTER_NAME (op_2_regno)); */
+/* OBSOLETE break; */
+/* OBSOLETE */
+/* OBSOLETE case 1: */
+/* OBSOLETE fprintf_unfiltered (stream, " 0x%0x,%s", */
+/* OBSOLETE op_1_regno, */
+/* OBSOLETE REGISTER_NAME (op_2_regno)); */
+/* OBSOLETE break; */
+/* OBSOLETE */
+/* OBSOLETE case 2: */
+/* OBSOLETE read_memory (memaddr+4, buffer, MAXLEN); */
+/* OBSOLETE insn_size += 4; */
+/* OBSOLETE extra_1 = * ((int *) buffer); */
+/* OBSOLETE fprintf_unfiltered (stream, " $0x%0x,%s", */
+/* OBSOLETE extra_1, */
+/* OBSOLETE REGISTER_NAME (op_2_regno)); */
+/* OBSOLETE break; */
+/* OBSOLETE case 3: */
+/* OBSOLETE fprintf_unfiltered (stream, " (%s),%s", */
+/* OBSOLETE REGISTER_NAME (op_1_regno), */
+/* OBSOLETE REGISTER_NAME (op_2_regno)); */
+/* OBSOLETE break; */
+/* OBSOLETE */
+/* OBSOLETE case 4: */
+/* OBSOLETE read_memory (memaddr+4, buffer, MAXLEN); */
+/* OBSOLETE insn_size += 4; */
+/* OBSOLETE extra_1 = * ((int *) buffer); */
+/* OBSOLETE fprintf_unfiltered (stream, " 0x%0x(%s),%s", */
+/* OBSOLETE extra_1, */
+/* OBSOLETE REGISTER_NAME (op_1_regno), */
+/* OBSOLETE REGISTER_NAME (op_2_regno)); */
+/* OBSOLETE break; */
+/* OBSOLETE */
+/* OBSOLETE /* S1 destination mode *x/ */
+/* OBSOLETE case 5: */
+/* OBSOLETE fprintf_unfiltered (stream, */
+/* OBSOLETE ((index_reg_regno) ? "%s,(%s)[%s*%1d]" : "%s,(%s)"), */
+/* OBSOLETE REGISTER_NAME (op_1_regno), */
+/* OBSOLETE REGISTER_NAME (op_2_regno), */
+/* OBSOLETE REGISTER_NAME (index_reg_regno), */
+/* OBSOLETE index_multiplier); */
+/* OBSOLETE break; */
+/* OBSOLETE */
+/* OBSOLETE case 6: */
+/* OBSOLETE fprintf_unfiltered (stream, */
+/* OBSOLETE ((index_reg_regno) ? " $%#0x,(%s)[%s*%1d]" */
+/* OBSOLETE : " $%#0x,(%s)"), */
+/* OBSOLETE op_1_regno, */
+/* OBSOLETE REGISTER_NAME (op_2_regno), */
+/* OBSOLETE REGISTER_NAME (index_reg_regno), */
+/* OBSOLETE index_multiplier); */
+/* OBSOLETE break; */
+/* OBSOLETE */
+/* OBSOLETE case 7: */
+/* OBSOLETE read_memory (memaddr+4, buffer, MAXLEN); */
+/* OBSOLETE insn_size += 4; */
+/* OBSOLETE extra_1 = * ((int *) buffer); */
+/* OBSOLETE fprintf_unfiltered (stream, */
+/* OBSOLETE ((index_reg_regno) ? " $%#0x,(%s)[%s*%1d]" */
+/* OBSOLETE : " $%#0x,(%s)"), */
+/* OBSOLETE extra_1, */
+/* OBSOLETE REGISTER_NAME (op_2_regno), */
+/* OBSOLETE REGISTER_NAME (index_reg_regno), */
+/* OBSOLETE index_multiplier); */
+/* OBSOLETE break; */
+/* OBSOLETE */
+/* OBSOLETE case 8: */
+/* OBSOLETE fprintf_unfiltered (stream, */
+/* OBSOLETE ((index_reg_regno) ? " (%s),(%s)[%s*%1d]" : " (%s),(%s)"), */
+/* OBSOLETE REGISTER_NAME (op_1_regno), */
+/* OBSOLETE REGISTER_NAME (op_2_regno), */
+/* OBSOLETE REGISTER_NAME (index_reg_regno), */
+/* OBSOLETE index_multiplier); */
+/* OBSOLETE break; */
+/* OBSOLETE */
+/* OBSOLETE case 9: */
+/* OBSOLETE read_memory (memaddr+4, buffer, MAXLEN); */
+/* OBSOLETE insn_size += 4; */
+/* OBSOLETE extra_1 = * ((int *) buffer); */
+/* OBSOLETE fprintf_unfiltered (stream, */
+/* OBSOLETE ((index_reg_regno) */
+/* OBSOLETE ? "%#0x(%s),(%s)[%s*%1d]" */
+/* OBSOLETE : "%#0x(%s),(%s)"), */
+/* OBSOLETE extra_1, */
+/* OBSOLETE REGISTER_NAME (op_1_regno), */
+/* OBSOLETE REGISTER_NAME (op_2_regno), */
+/* OBSOLETE REGISTER_NAME (index_reg_regno), */
+/* OBSOLETE index_multiplier); */
+/* OBSOLETE break; */
+/* OBSOLETE */
+/* OBSOLETE /* S2 destination mode *x/ */
+/* OBSOLETE case 10: */
+/* OBSOLETE read_memory (memaddr+4, buffer, MAXLEN); */
+/* OBSOLETE insn_size += 4; */
+/* OBSOLETE extra_1 = * ((int *) buffer); */
+/* OBSOLETE fprintf_unfiltered (stream, */
+/* OBSOLETE ((index_reg_regno) ? "%s,%#0x(%s)[%s*%1d]" : "%s,%#0x(%s)"), */
+/* OBSOLETE REGISTER_NAME (op_1_regno), */
+/* OBSOLETE extra_1, */
+/* OBSOLETE REGISTER_NAME (op_2_regno), */
+/* OBSOLETE REGISTER_NAME (index_reg_regno), */
+/* OBSOLETE index_multiplier); */
+/* OBSOLETE break; */
+/* OBSOLETE case 11: */
+/* OBSOLETE read_memory (memaddr+4, buffer, MAXLEN); */
+/* OBSOLETE insn_size += 4; */
+/* OBSOLETE extra_1 = * ((int *) buffer); */
+/* OBSOLETE fprintf_unfiltered (stream, */
+/* OBSOLETE ((index_reg_regno) ? */
+/* OBSOLETE " $%#0x,%#0x(%s)[%s*%1d]" : " $%#0x,%#0x(%s)"), */
+/* OBSOLETE op_1_regno, */
+/* OBSOLETE extra_1, */
+/* OBSOLETE REGISTER_NAME (op_2_regno), */
+/* OBSOLETE REGISTER_NAME (index_reg_regno), */
+/* OBSOLETE index_multiplier); */
+/* OBSOLETE break; */
+/* OBSOLETE case 12: */
+/* OBSOLETE read_memory (memaddr+4, buffer, MAXLEN); */
+/* OBSOLETE insn_size += 4; */
+/* OBSOLETE extra_1 = * ((int *) buffer); */
+/* OBSOLETE read_memory (memaddr+8, buffer, MAXLEN); */
+/* OBSOLETE insn_size += 4; */
+/* OBSOLETE extra_2 = * ((int *) buffer); */
+/* OBSOLETE fprintf_unfiltered (stream, */
+/* OBSOLETE ((index_reg_regno) ? */
+/* OBSOLETE " $%#0x,%#0x(%s)[%s*%1d]" : " $%#0x,%#0x(%s)"), */
+/* OBSOLETE extra_1, */
+/* OBSOLETE extra_2, */
+/* OBSOLETE REGISTER_NAME (op_2_regno), */
+/* OBSOLETE REGISTER_NAME (index_reg_regno), */
+/* OBSOLETE index_multiplier); */
+/* OBSOLETE break; */
+/* OBSOLETE */
+/* OBSOLETE case 13: */
+/* OBSOLETE read_memory (memaddr+4, buffer, MAXLEN); */
+/* OBSOLETE insn_size += 4; */
+/* OBSOLETE extra_1 = * ((int *) buffer); */
+/* OBSOLETE fprintf_unfiltered (stream, */
+/* OBSOLETE ((index_reg_regno) */
+/* OBSOLETE ? " (%s),%#0x(%s)[%s*%1d]" */
+/* OBSOLETE : " (%s),%#0x(%s)"), */
+/* OBSOLETE REGISTER_NAME (op_1_regno), */
+/* OBSOLETE extra_1, */
+/* OBSOLETE REGISTER_NAME (op_2_regno), */
+/* OBSOLETE REGISTER_NAME (index_reg_regno), */
+/* OBSOLETE index_multiplier); */
+/* OBSOLETE break; */
+/* OBSOLETE case 14: */
+/* OBSOLETE read_memory (memaddr+4, buffer, MAXLEN); */
+/* OBSOLETE insn_size += 4; */
+/* OBSOLETE extra_1 = * ((int *) buffer); */
+/* OBSOLETE read_memory (memaddr+8, buffer, MAXLEN); */
+/* OBSOLETE insn_size += 4; */
+/* OBSOLETE extra_2 = * ((int *) buffer); */
+/* OBSOLETE fprintf_unfiltered (stream, */
+/* OBSOLETE ((index_reg_regno) ? "%#0x(%s),%#0x(%s)[%s*%1d]" */
+/* OBSOLETE : "%#0x(%s),%#0x(%s) "), */
+/* OBSOLETE extra_1, */
+/* OBSOLETE REGISTER_NAME (op_1_regno), */
+/* OBSOLETE extra_2, */
+/* OBSOLETE REGISTER_NAME (op_2_regno), */
+/* OBSOLETE REGISTER_NAME (index_reg_regno), */
+/* OBSOLETE index_multiplier); */
+/* OBSOLETE break; */
+/* OBSOLETE */
+/* OBSOLETE default: */
+/* OBSOLETE fprintf_unfiltered (stream, */
+/* OBSOLETE ((index_reg_regno) ? "%s,%s [%s*%1d]" : "%s,%s"), */
+/* OBSOLETE REGISTER_NAME (op_1_regno), */
+/* OBSOLETE REGISTER_NAME (op_2_regno), */
+/* OBSOLETE REGISTER_NAME (index_reg_regno), */
+/* OBSOLETE index_multiplier); */
+/* OBSOLETE fprintf_unfiltered (stream, */
+/* OBSOLETE "\t\t# unknown mode in %08x", */
+/* OBSOLETE insn); */
+/* OBSOLETE break; */
+/* OBSOLETE } /* switch *x/ */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE { */
+/* OBSOLETE return insn_size; */
+/* OBSOLETE } */
+/* OBSOLETE abort (); */
+/* OBSOLETE } */
diff --git a/gdb/pyr-xdep.c b/gdb/pyr-xdep.c
index 5c95bd638a4..0ca79e1dae6 100644
--- a/gdb/pyr-xdep.c
+++ b/gdb/pyr-xdep.c
@@ -1,369 +1,369 @@
-/* Low level Pyramid interface to ptrace, for GDB when running under Unix.
- Copyright (C) 1988, 1989, 1991 Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "defs.h"
-#include "frame.h"
-#include "inferior.h"
-
-#include <sys/param.h>
-#include <sys/dir.h>
-#include <signal.h>
-#include <sys/ioctl.h>
-/* #include <fcntl.h> Can we live without this? */
-
-#include "gdbcore.h"
-#include <sys/user.h> /* After a.out.h */
-#include <sys/file.h>
-#include "gdb_stat.h"
-
-
-void
-fetch_inferior_registers (regno)
- int regno;
-{
- register int datum;
- register unsigned int regaddr;
- int reg_buf[NUM_REGS+1];
- struct user u;
- register int skipped_frames = 0;
-
- registers_fetched ();
-
- for (regno = 0; regno < 64; regno++) {
- reg_buf[regno] = ptrace (3, inferior_pid, (PTRACE_ARG3_TYPE) regno, 0);
-
-#if defined(PYRAMID_CONTROL_FRAME_DEBUGGING)
- printf_unfiltered ("Fetching register %s, got %0x\n",
- REGISTER_NAME (regno),
- reg_buf[regno]);
-#endif /* PYRAMID_CONTROL_FRAME_DEBUGGING */
-
- if (reg_buf[regno] == -1 && errno == EIO) {
- printf_unfiltered("fetch_interior_registers: fetching register %s\n",
- REGISTER_NAME (regno));
- errno = 0;
- }
- supply_register (regno, reg_buf+regno);
- }
- /* that leaves regs 64, 65, and 66 */
- datum = ptrace (3, inferior_pid,
- (PTRACE_ARG3_TYPE) (((char *)&u.u_pcb.pcb_csp) -
- ((char *)&u)), 0);
-
-
-
- /* FIXME: Find the Current Frame Pointer (CFP). CFP is a global
- register (ie, NOT windowed), that gets saved in a frame iff
- the code for that frame has a prologue (ie, "adsf N"). If
- there is a prologue, the adsf insn saves the old cfp in
- pr13, cfp is set to sp, and N bytes of locals are allocated
- (sp is decremented by n).
- This makes finding CFP hard. I guess the right way to do it
- is:
- - If this is the innermost frame, believe ptrace() or
- the core area.
- - Otherwise:
- Find the first insn of the current frame.
- - find the saved pc;
- - find the call insn that saved it;
- - figure out where the call is to;
- - if the first insn is an adsf, we got a frame
- pointer. */
-
-
- /* Normal processors have separate stack pointers for user and
- kernel mode. Getting the last user mode frame on such
- machines is easy: the kernel context of the ptrace()'d
- process is on the kernel stack, and the USP points to what
- we want. But Pyramids only have a single cfp for both user and
- kernel mode. And processes being ptrace()'d have some
- kernel-context control frames on their stack.
- To avoid tracing back into the kernel context of an inferior,
- we skip 0 or more contiguous control frames where the pc is
- in the kernel. */
-
- while (1) {
- register int inferior_saved_pc;
- inferior_saved_pc = ptrace (1, inferior_pid,
- (PTRACE_ARG3_TYPE) (datum+((32+15)*4)), 0);
- if (inferior_saved_pc > 0) break;
-#if defined(PYRAMID_CONTROL_FRAME_DEBUGGING)
- printf_unfiltered("skipping kernel frame %08x, pc=%08x\n", datum,
- inferior_saved_pc);
-#endif /* PYRAMID_CONTROL_FRAME_DEBUGGING */
- skipped_frames++;
- datum -= CONTROL_STACK_FRAME_SIZE;
- }
-
- reg_buf[CSP_REGNUM] = datum;
- supply_register(CSP_REGNUM, reg_buf+CSP_REGNUM);
-#ifdef PYRAMID_CONTROL_FRAME_DEBUGGING
- if (skipped_frames) {
- fprintf_unfiltered (gdb_stderr,
- "skipped %d frames from %x to %x; cfp was %x, now %x\n",
- skipped_frames, reg_buf[CSP_REGNUM]);
- }
-#endif /* PYRAMID_CONTROL_FRAME_DEBUGGING */
-}
-
-/* Store our register values back into the inferior.
- If REGNO is -1, do this for all registers.
- Otherwise, REGNO specifies which register (so we can save time). */
-
-void
-store_inferior_registers (regno)
- int regno;
-{
- register unsigned int regaddr;
- char buf[80];
-
- if (regno >= 0)
- {
- if ((0 <= regno) && (regno < 64)) {
- /*regaddr = register_addr (regno, offset);*/
- regaddr = regno;
- errno = 0;
- ptrace (6, inferior_pid, (PTRACE_ARG3_TYPE) regaddr,
- read_register (regno));
- if (errno != 0)
- {
- sprintf (buf, "writing register number %d", regno);
- perror_with_name (buf);
- }
- }
- }
- else
- {
- for (regno = 0; regno < NUM_REGS; regno++)
- {
- /*regaddr = register_addr (regno, offset);*/
- regaddr = regno;
- errno = 0;
- ptrace (6, inferior_pid, (PTRACE_ARG3_TYPE) regaddr,
- read_register (regno));
- if (errno != 0)
- {
- sprintf (buf, "writing all regs, number %d", regno);
- perror_with_name (buf);
- }
- }
-}
-
-/*** Extensions to core and dump files, for GDB. */
-
-extern unsigned int last_frame_offset;
-
-#ifdef PYRAMID_CORE
-
-/* Can't make definitions here static, since corefile.c needs them
- to do bounds checking on the core-file areas. O well. */
-
-/* have two stacks: one for data, one for register windows. */
-extern CORE_ADDR reg_stack_start;
-extern CORE_ADDR reg_stack_end;
-
-/* need this so we can find the global registers: they never get saved. */
-CORE_ADDR global_reg_offset;
-static CORE_ADDR last_frame_address;
-CORE_ADDR last_frame_offset;
-
-
-/* Address in core file of start of register window stack area.
- Don't know if is this any of meaningful, useful or necessary. */
-extern int reg_stack_offset;
-
-#endif /* PYRAMID_CORE */
-
-
-/* Work with core dump and executable files, for GDB.
- This code would be in corefile.c if it weren't machine-dependent. */
-
-void
-core_file_command (filename, from_tty)
- char *filename;
- int from_tty;
-{
- int val;
-
- /* Discard all vestiges of any previous core file
- and mark data and stack spaces as empty. */
-
- if (corefile)
- free (corefile);
- corefile = 0;
-
- if (corechan >= 0)
- close (corechan);
- corechan = -1;
-
- data_start = 0;
- data_end = 0;
- stack_start = STACK_END_ADDR;
- stack_end = STACK_END_ADDR;
-
-#ifdef PYRAMID_CORE
- reg_stack_start = CONTROL_STACK_ADDR;
- reg_stack_end = CONTROL_STACK_ADDR; /* this isn't strictly true...*/
-#endif /* PYRAMID_CORE */
-
- /* Now, if a new core file was specified, open it and digest it. */
-
- if (filename)
- {
- filename = tilde_expand (filename);
- make_cleanup (free, filename);
-
- if (have_inferior_p ())
- error ("To look at a core file, you must kill the program with \"kill\".");
- corechan = open (filename, O_RDONLY, 0);
- if (corechan < 0)
- perror_with_name (filename);
- /* 4.2-style (and perhaps also sysV-style) core dump file. */
- {
- struct user u;
-
- unsigned int reg_offset;
-
- val = myread (corechan, &u, sizeof u);
- if (val < 0)
- perror_with_name ("Not a core file: reading upage");
- if (val != sizeof u)
- error ("Not a core file: could only read %d bytes", val);
- data_start = exec_data_start;
-
- data_end = data_start + NBPG * u.u_dsize;
- data_offset = NBPG * UPAGES;
- stack_offset = NBPG * (UPAGES + u.u_dsize);
-
- /* find registers in core file */
-#ifdef PYRAMID_PTRACE
- stack_start = stack_end - NBPG * u.u_ussize;
- reg_stack_offset = stack_offset + (NBPG *u.u_ussize);
- reg_stack_end = reg_stack_start + NBPG * u.u_cssize;
-
- last_frame_address = ((int) u.u_pcb.pcb_csp);
- last_frame_offset = reg_stack_offset + last_frame_address
- - CONTROL_STACK_ADDR ;
- global_reg_offset = (char *)&u - (char *)&u.u_pcb.pcb_gr0 ;
-
- /* skip any control-stack frames that were executed in the
- kernel. */
-
- while (1) {
- char buf[4];
- val = lseek (corechan, last_frame_offset+(47*4), 0);
- if (val < 0)
- perror_with_name (filename);
- val = myread (corechan, buf, sizeof buf);
- if (val < 0)
- perror_with_name (filename);
-
- if (*(int *)buf >= 0)
- break;
- printf_unfiltered ("skipping frame %s\n", local_hex_string (last_frame_address));
- last_frame_offset -= CONTROL_STACK_FRAME_SIZE;
- last_frame_address -= CONTROL_STACK_FRAME_SIZE;
- }
- reg_offset = last_frame_offset;
-
-#if 1 || defined(PYRAMID_CONTROL_FRAME_DEBUGGING)
- printf_unfiltered ("Control stack pointer = %s\n",
- local_hex_string (u.u_pcb.pcb_csp));
- printf_unfiltered ("offset to control stack %d outermost frame %d (%s)\n",
- reg_stack_offset, reg_offset, local_hex_string (last_frame_address));
-#endif /* PYRAMID_CONTROL_FRAME_DEBUGGING */
-
-#else /* not PYRAMID_CORE */
- stack_start = stack_end - NBPG * u.u_ssize;
- reg_offset = (int) u.u_ar0 - KERNEL_U_ADDR;
-#endif /* not PYRAMID_CORE */
-
-#ifdef __not_on_pyr_yet
- /* Some machines put an absolute address in here and some put
- the offset in the upage of the regs. */
- reg_offset = (int) u.u_ar0;
- if (reg_offset > NBPG * UPAGES)
- reg_offset -= KERNEL_U_ADDR;
-#endif
-
- /* I don't know where to find this info.
- So, for now, mark it as not available. */
- N_SET_MAGIC (core_aouthdr, 0);
-
- /* Read the register values out of the core file and store
- them where `read_register' will find them. */
-
- {
- register int regno;
-
- for (regno = 0; regno < 64; regno++)
- {
- char buf[MAX_REGISTER_RAW_SIZE];
-
- val = lseek (corechan, register_addr (regno, reg_offset), 0);
- if (val < 0
- || (val = myread (corechan, buf, sizeof buf)) < 0)
- {
- char * buffer = (char *) alloca (strlen (REGISTER_NAME (regno))
- + 30);
- strcpy (buffer, "Reading register ");
- strcat (buffer, REGISTER_NAME (regno));
-
- perror_with_name (buffer);
- }
-
- if (val < 0)
- perror_with_name (filename);
-#ifdef PYRAMID_CONTROL_FRAME_DEBUGGING
- printf_unfiltered ("[reg %s(%d), offset in file %s=0x%0x, addr =0x%0x, =%0x]\n",
- REGISTER_NAME (regno), regno, filename,
- register_addr(regno, reg_offset),
- regno * 4 + last_frame_address,
- *((int *)buf));
-#endif /* PYRAMID_CONTROL_FRAME_DEBUGGING */
- supply_register (regno, buf);
- }
- }
- }
- if (filename[0] == '/')
- corefile = savestring (filename, strlen (filename));
- else
- {
- corefile = concat (current_directory, "/", filename, NULL);
- }
-
-#if 1 || defined(PYRAMID_CONTROL_FRAME_DEBUGGING)
- printf_unfiltered ("Providing CSP (%s) as nominal address of current frame.\n",
- local_hex_string(last_frame_address));
-#endif PYRAMID_CONTROL_FRAME_DEBUGGING
- /* FIXME: Which of the following is correct? */
-#if 0
- set_current_frame ( create_new_frame (read_register (FP_REGNUM),
- read_pc ()));
-#else
- set_current_frame ( create_new_frame (last_frame_address,
- read_pc ()));
-#endif
-
- select_frame (get_current_frame (), 0);
- validate_files ();
- }
- else if (from_tty)
- printf_unfiltered ("No core file now.\n");
-}
+/* OBSOLETE /* Low level Pyramid interface to ptrace, for GDB when running under Unix. */
+/* OBSOLETE Copyright (C) 1988, 1989, 1991 Free Software Foundation, Inc. */
+/* OBSOLETE */
+/* OBSOLETE This file is part of GDB. */
+/* 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. *x/ */
+/* OBSOLETE */
+/* OBSOLETE #include "defs.h" */
+/* OBSOLETE #include "frame.h" */
+/* OBSOLETE #include "inferior.h" */
+/* OBSOLETE */
+/* OBSOLETE #include <sys/param.h> */
+/* OBSOLETE #include <sys/dir.h> */
+/* OBSOLETE #include <signal.h> */
+/* OBSOLETE #include <sys/ioctl.h> */
+/* OBSOLETE /* #include <fcntl.h> Can we live without this? *x/ */
+/* OBSOLETE */
+/* OBSOLETE #include "gdbcore.h" */
+/* OBSOLETE #include <sys/user.h> /* After a.out.h *x/ */
+/* OBSOLETE #include <sys/file.h> */
+/* OBSOLETE #include "gdb_stat.h" */
+/* OBSOLETE */
+/* OBSOLETE */
+/* OBSOLETE void */
+/* OBSOLETE fetch_inferior_registers (regno) */
+/* OBSOLETE int regno; */
+/* OBSOLETE { */
+/* OBSOLETE register int datum; */
+/* OBSOLETE register unsigned int regaddr; */
+/* OBSOLETE int reg_buf[NUM_REGS+1]; */
+/* OBSOLETE struct user u; */
+/* OBSOLETE register int skipped_frames = 0; */
+/* OBSOLETE */
+/* OBSOLETE registers_fetched (); */
+/* OBSOLETE */
+/* OBSOLETE for (regno = 0; regno < 64; regno++) { */
+/* OBSOLETE reg_buf[regno] = ptrace (3, inferior_pid, (PTRACE_ARG3_TYPE) regno, 0); */
+/* OBSOLETE */
+/* OBSOLETE #if defined(PYRAMID_CONTROL_FRAME_DEBUGGING) */
+/* OBSOLETE printf_unfiltered ("Fetching register %s, got %0x\n", */
+/* OBSOLETE REGISTER_NAME (regno), */
+/* OBSOLETE reg_buf[regno]); */
+/* OBSOLETE #endif /* PYRAMID_CONTROL_FRAME_DEBUGGING *x/ */
+/* OBSOLETE */
+/* OBSOLETE if (reg_buf[regno] == -1 && errno == EIO) { */
+/* OBSOLETE printf_unfiltered("fetch_interior_registers: fetching register %s\n", */
+/* OBSOLETE REGISTER_NAME (regno)); */
+/* OBSOLETE errno = 0; */
+/* OBSOLETE } */
+/* OBSOLETE supply_register (regno, reg_buf+regno); */
+/* OBSOLETE } */
+/* OBSOLETE /* that leaves regs 64, 65, and 66 *x/ */
+/* OBSOLETE datum = ptrace (3, inferior_pid, */
+/* OBSOLETE (PTRACE_ARG3_TYPE) (((char *)&u.u_pcb.pcb_csp) - */
+/* OBSOLETE ((char *)&u)), 0); */
+/* OBSOLETE */
+/* OBSOLETE */
+/* OBSOLETE */
+/* OBSOLETE /* FIXME: Find the Current Frame Pointer (CFP). CFP is a global */
+/* OBSOLETE register (ie, NOT windowed), that gets saved in a frame iff */
+/* OBSOLETE the code for that frame has a prologue (ie, "adsf N"). If */
+/* OBSOLETE there is a prologue, the adsf insn saves the old cfp in */
+/* OBSOLETE pr13, cfp is set to sp, and N bytes of locals are allocated */
+/* OBSOLETE (sp is decremented by n). */
+/* OBSOLETE This makes finding CFP hard. I guess the right way to do it */
+/* OBSOLETE is: */
+/* OBSOLETE - If this is the innermost frame, believe ptrace() or */
+/* OBSOLETE the core area. */
+/* OBSOLETE - Otherwise: */
+/* OBSOLETE Find the first insn of the current frame. */
+/* OBSOLETE - find the saved pc; */
+/* OBSOLETE - find the call insn that saved it; */
+/* OBSOLETE - figure out where the call is to; */
+/* OBSOLETE - if the first insn is an adsf, we got a frame */
+/* OBSOLETE pointer. *x/ */
+/* OBSOLETE */
+/* OBSOLETE */
+/* OBSOLETE /* Normal processors have separate stack pointers for user and */
+/* OBSOLETE kernel mode. Getting the last user mode frame on such */
+/* OBSOLETE machines is easy: the kernel context of the ptrace()'d */
+/* OBSOLETE process is on the kernel stack, and the USP points to what */
+/* OBSOLETE we want. But Pyramids only have a single cfp for both user and */
+/* OBSOLETE kernel mode. And processes being ptrace()'d have some */
+/* OBSOLETE kernel-context control frames on their stack. */
+/* OBSOLETE To avoid tracing back into the kernel context of an inferior, */
+/* OBSOLETE we skip 0 or more contiguous control frames where the pc is */
+/* OBSOLETE in the kernel. *x/ */
+/* OBSOLETE */
+/* OBSOLETE while (1) { */
+/* OBSOLETE register int inferior_saved_pc; */
+/* OBSOLETE inferior_saved_pc = ptrace (1, inferior_pid, */
+/* OBSOLETE (PTRACE_ARG3_TYPE) (datum+((32+15)*4)), 0); */
+/* OBSOLETE if (inferior_saved_pc > 0) break; */
+/* OBSOLETE #if defined(PYRAMID_CONTROL_FRAME_DEBUGGING) */
+/* OBSOLETE printf_unfiltered("skipping kernel frame %08x, pc=%08x\n", datum, */
+/* OBSOLETE inferior_saved_pc); */
+/* OBSOLETE #endif /* PYRAMID_CONTROL_FRAME_DEBUGGING *x/ */
+/* OBSOLETE skipped_frames++; */
+/* OBSOLETE datum -= CONTROL_STACK_FRAME_SIZE; */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE reg_buf[CSP_REGNUM] = datum; */
+/* OBSOLETE supply_register(CSP_REGNUM, reg_buf+CSP_REGNUM); */
+/* OBSOLETE #ifdef PYRAMID_CONTROL_FRAME_DEBUGGING */
+/* OBSOLETE if (skipped_frames) { */
+/* OBSOLETE fprintf_unfiltered (gdb_stderr, */
+/* OBSOLETE "skipped %d frames from %x to %x; cfp was %x, now %x\n", */
+/* OBSOLETE skipped_frames, reg_buf[CSP_REGNUM]); */
+/* OBSOLETE } */
+/* OBSOLETE #endif /* PYRAMID_CONTROL_FRAME_DEBUGGING *x/ */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE /* Store our register values back into the inferior. */
+/* OBSOLETE If REGNO is -1, do this for all registers. */
+/* OBSOLETE Otherwise, REGNO specifies which register (so we can save time). *x/ */
+/* OBSOLETE */
+/* OBSOLETE void */
+/* OBSOLETE store_inferior_registers (regno) */
+/* OBSOLETE int regno; */
+/* OBSOLETE { */
+/* OBSOLETE register unsigned int regaddr; */
+/* OBSOLETE char buf[80]; */
+/* OBSOLETE */
+/* OBSOLETE if (regno >= 0) */
+/* OBSOLETE { */
+/* OBSOLETE if ((0 <= regno) && (regno < 64)) { */
+/* OBSOLETE /*regaddr = register_addr (regno, offset);*x/ */
+/* OBSOLETE regaddr = regno; */
+/* OBSOLETE errno = 0; */
+/* OBSOLETE ptrace (6, inferior_pid, (PTRACE_ARG3_TYPE) regaddr, */
+/* OBSOLETE read_register (regno)); */
+/* OBSOLETE if (errno != 0) */
+/* OBSOLETE { */
+/* OBSOLETE sprintf (buf, "writing register number %d", regno); */
+/* OBSOLETE perror_with_name (buf); */
+/* OBSOLETE } */
+/* OBSOLETE } */
+/* OBSOLETE } */
+/* OBSOLETE else */
+/* OBSOLETE { */
+/* OBSOLETE for (regno = 0; regno < NUM_REGS; regno++) */
+/* OBSOLETE { */
+/* OBSOLETE /*regaddr = register_addr (regno, offset);*x/ */
+/* OBSOLETE regaddr = regno; */
+/* OBSOLETE errno = 0; */
+/* OBSOLETE ptrace (6, inferior_pid, (PTRACE_ARG3_TYPE) regaddr, */
+/* OBSOLETE read_register (regno)); */
+/* OBSOLETE if (errno != 0) */
+/* OBSOLETE { */
+/* OBSOLETE sprintf (buf, "writing all regs, number %d", regno); */
+/* OBSOLETE perror_with_name (buf); */
+/* OBSOLETE } */
+/* OBSOLETE } */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE /*** Extensions to core and dump files, for GDB. *x/ */
+/* OBSOLETE */
+/* OBSOLETE extern unsigned int last_frame_offset; */
+/* OBSOLETE */
+/* OBSOLETE #ifdef PYRAMID_CORE */
+/* OBSOLETE */
+/* OBSOLETE /* Can't make definitions here static, since corefile.c needs them */
+/* OBSOLETE to do bounds checking on the core-file areas. O well. *x/ */
+/* OBSOLETE */
+/* OBSOLETE /* have two stacks: one for data, one for register windows. *x/ */
+/* OBSOLETE extern CORE_ADDR reg_stack_start; */
+/* OBSOLETE extern CORE_ADDR reg_stack_end; */
+/* OBSOLETE */
+/* OBSOLETE /* need this so we can find the global registers: they never get saved. *x/ */
+/* OBSOLETE CORE_ADDR global_reg_offset; */
+/* OBSOLETE static CORE_ADDR last_frame_address; */
+/* OBSOLETE CORE_ADDR last_frame_offset; */
+/* OBSOLETE */
+/* OBSOLETE */
+/* OBSOLETE /* Address in core file of start of register window stack area. */
+/* OBSOLETE Don't know if is this any of meaningful, useful or necessary. *x/ */
+/* OBSOLETE extern int reg_stack_offset; */
+/* OBSOLETE */
+/* OBSOLETE #endif /* PYRAMID_CORE *x/ */
+/* OBSOLETE */
+/* OBSOLETE */
+/* OBSOLETE /* Work with core dump and executable files, for GDB. */
+/* OBSOLETE This code would be in corefile.c if it weren't machine-dependent. *x/ */
+/* OBSOLETE */
+/* OBSOLETE void */
+/* OBSOLETE core_file_command (filename, from_tty) */
+/* OBSOLETE char *filename; */
+/* OBSOLETE int from_tty; */
+/* OBSOLETE { */
+/* OBSOLETE int val; */
+/* OBSOLETE */
+/* OBSOLETE /* Discard all vestiges of any previous core file */
+/* OBSOLETE and mark data and stack spaces as empty. *x/ */
+/* OBSOLETE */
+/* OBSOLETE if (corefile) */
+/* OBSOLETE free (corefile); */
+/* OBSOLETE corefile = 0; */
+/* OBSOLETE */
+/* OBSOLETE if (corechan >= 0) */
+/* OBSOLETE close (corechan); */
+/* OBSOLETE corechan = -1; */
+/* OBSOLETE */
+/* OBSOLETE data_start = 0; */
+/* OBSOLETE data_end = 0; */
+/* OBSOLETE stack_start = STACK_END_ADDR; */
+/* OBSOLETE stack_end = STACK_END_ADDR; */
+/* OBSOLETE */
+/* OBSOLETE #ifdef PYRAMID_CORE */
+/* OBSOLETE reg_stack_start = CONTROL_STACK_ADDR; */
+/* OBSOLETE reg_stack_end = CONTROL_STACK_ADDR; /* this isn't strictly true...*x/ */
+/* OBSOLETE #endif /* PYRAMID_CORE *x/ */
+/* OBSOLETE */
+/* OBSOLETE /* Now, if a new core file was specified, open it and digest it. *x/ */
+/* OBSOLETE */
+/* OBSOLETE if (filename) */
+/* OBSOLETE { */
+/* OBSOLETE filename = tilde_expand (filename); */
+/* OBSOLETE make_cleanup (free, filename); */
+/* OBSOLETE */
+/* OBSOLETE if (have_inferior_p ()) */
+/* OBSOLETE error ("To look at a core file, you must kill the program with \"kill\"."); */
+/* OBSOLETE corechan = open (filename, O_RDONLY, 0); */
+/* OBSOLETE if (corechan < 0) */
+/* OBSOLETE perror_with_name (filename); */
+/* OBSOLETE /* 4.2-style (and perhaps also sysV-style) core dump file. *x/ */
+/* OBSOLETE { */
+/* OBSOLETE struct user u; */
+/* OBSOLETE */
+/* OBSOLETE unsigned int reg_offset; */
+/* OBSOLETE */
+/* OBSOLETE val = myread (corechan, &u, sizeof u); */
+/* OBSOLETE if (val < 0) */
+/* OBSOLETE perror_with_name ("Not a core file: reading upage"); */
+/* OBSOLETE if (val != sizeof u) */
+/* OBSOLETE error ("Not a core file: could only read %d bytes", val); */
+/* OBSOLETE data_start = exec_data_start; */
+/* OBSOLETE */
+/* OBSOLETE data_end = data_start + NBPG * u.u_dsize; */
+/* OBSOLETE data_offset = NBPG * UPAGES; */
+/* OBSOLETE stack_offset = NBPG * (UPAGES + u.u_dsize); */
+/* OBSOLETE */
+/* OBSOLETE /* find registers in core file *x/ */
+/* OBSOLETE #ifdef PYRAMID_PTRACE */
+/* OBSOLETE stack_start = stack_end - NBPG * u.u_ussize; */
+/* OBSOLETE reg_stack_offset = stack_offset + (NBPG *u.u_ussize); */
+/* OBSOLETE reg_stack_end = reg_stack_start + NBPG * u.u_cssize; */
+/* OBSOLETE */
+/* OBSOLETE last_frame_address = ((int) u.u_pcb.pcb_csp); */
+/* OBSOLETE last_frame_offset = reg_stack_offset + last_frame_address */
+/* OBSOLETE - CONTROL_STACK_ADDR ; */
+/* OBSOLETE global_reg_offset = (char *)&u - (char *)&u.u_pcb.pcb_gr0 ; */
+/* OBSOLETE */
+/* OBSOLETE /* skip any control-stack frames that were executed in the */
+/* OBSOLETE kernel. *x/ */
+/* OBSOLETE */
+/* OBSOLETE while (1) { */
+/* OBSOLETE char buf[4]; */
+/* OBSOLETE val = lseek (corechan, last_frame_offset+(47*4), 0); */
+/* OBSOLETE if (val < 0) */
+/* OBSOLETE perror_with_name (filename); */
+/* OBSOLETE val = myread (corechan, buf, sizeof buf); */
+/* OBSOLETE if (val < 0) */
+/* OBSOLETE perror_with_name (filename); */
+/* OBSOLETE */
+/* OBSOLETE if (*(int *)buf >= 0) */
+/* OBSOLETE break; */
+/* OBSOLETE printf_unfiltered ("skipping frame %s\n", local_hex_string (last_frame_address)); */
+/* OBSOLETE last_frame_offset -= CONTROL_STACK_FRAME_SIZE; */
+/* OBSOLETE last_frame_address -= CONTROL_STACK_FRAME_SIZE; */
+/* OBSOLETE } */
+/* OBSOLETE reg_offset = last_frame_offset; */
+/* OBSOLETE */
+/* OBSOLETE #if 1 || defined(PYRAMID_CONTROL_FRAME_DEBUGGING) */
+/* OBSOLETE printf_unfiltered ("Control stack pointer = %s\n", */
+/* OBSOLETE local_hex_string (u.u_pcb.pcb_csp)); */
+/* OBSOLETE printf_unfiltered ("offset to control stack %d outermost frame %d (%s)\n", */
+/* OBSOLETE reg_stack_offset, reg_offset, local_hex_string (last_frame_address)); */
+/* OBSOLETE #endif /* PYRAMID_CONTROL_FRAME_DEBUGGING *x/ */
+/* OBSOLETE */
+/* OBSOLETE #else /* not PYRAMID_CORE *x/ */
+/* OBSOLETE stack_start = stack_end - NBPG * u.u_ssize; */
+/* OBSOLETE reg_offset = (int) u.u_ar0 - KERNEL_U_ADDR; */
+/* OBSOLETE #endif /* not PYRAMID_CORE *x/ */
+/* OBSOLETE */
+/* OBSOLETE #ifdef __not_on_pyr_yet */
+/* OBSOLETE /* Some machines put an absolute address in here and some put */
+/* OBSOLETE the offset in the upage of the regs. *x/ */
+/* OBSOLETE reg_offset = (int) u.u_ar0; */
+/* OBSOLETE if (reg_offset > NBPG * UPAGES) */
+/* OBSOLETE reg_offset -= KERNEL_U_ADDR; */
+/* OBSOLETE #endif */
+/* OBSOLETE */
+/* OBSOLETE /* I don't know where to find this info. */
+/* OBSOLETE So, for now, mark it as not available. *x/ */
+/* OBSOLETE N_SET_MAGIC (core_aouthdr, 0); */
+/* OBSOLETE */
+/* OBSOLETE /* Read the register values out of the core file and store */
+/* OBSOLETE them where `read_register' will find them. *x/ */
+/* OBSOLETE */
+/* OBSOLETE { */
+/* OBSOLETE register int regno; */
+/* OBSOLETE */
+/* OBSOLETE for (regno = 0; regno < 64; regno++) */
+/* OBSOLETE { */
+/* OBSOLETE char buf[MAX_REGISTER_RAW_SIZE]; */
+/* OBSOLETE */
+/* OBSOLETE val = lseek (corechan, register_addr (regno, reg_offset), 0); */
+/* OBSOLETE if (val < 0 */
+/* OBSOLETE || (val = myread (corechan, buf, sizeof buf)) < 0) */
+/* OBSOLETE { */
+/* OBSOLETE char * buffer = (char *) alloca (strlen (REGISTER_NAME (regno)) */
+/* OBSOLETE + 30); */
+/* OBSOLETE strcpy (buffer, "Reading register "); */
+/* OBSOLETE strcat (buffer, REGISTER_NAME (regno)); */
+/* OBSOLETE */
+/* OBSOLETE perror_with_name (buffer); */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE if (val < 0) */
+/* OBSOLETE perror_with_name (filename); */
+/* OBSOLETE #ifdef PYRAMID_CONTROL_FRAME_DEBUGGING */
+/* OBSOLETE printf_unfiltered ("[reg %s(%d), offset in file %s=0x%0x, addr =0x%0x, =%0x]\n", */
+/* OBSOLETE REGISTER_NAME (regno), regno, filename, */
+/* OBSOLETE register_addr(regno, reg_offset), */
+/* OBSOLETE regno * 4 + last_frame_address, */
+/* OBSOLETE *((int *)buf)); */
+/* OBSOLETE #endif /* PYRAMID_CONTROL_FRAME_DEBUGGING *x/ */
+/* OBSOLETE supply_register (regno, buf); */
+/* OBSOLETE } */
+/* OBSOLETE } */
+/* OBSOLETE } */
+/* OBSOLETE if (filename[0] == '/') */
+/* OBSOLETE corefile = savestring (filename, strlen (filename)); */
+/* OBSOLETE else */
+/* OBSOLETE { */
+/* OBSOLETE corefile = concat (current_directory, "/", filename, NULL); */
+/* OBSOLETE } */
+/* OBSOLETE */
+/* OBSOLETE #if 1 || defined(PYRAMID_CONTROL_FRAME_DEBUGGING) */
+/* OBSOLETE printf_unfiltered ("Providing CSP (%s) as nominal address of current frame.\n", */
+/* OBSOLETE local_hex_string(last_frame_address)); */
+/* OBSOLETE #endif PYRAMID_CONTROL_FRAME_DEBUGGING */
+/* OBSOLETE /* FIXME: Which of the following is correct? *x/ */
+/* OBSOLETE #if 0 */
+/* OBSOLETE set_current_frame ( create_new_frame (read_register (FP_REGNUM), */
+/* OBSOLETE read_pc ())); */
+/* OBSOLETE #else */
+/* OBSOLETE set_current_frame ( create_new_frame (last_frame_address, */
+/* OBSOLETE read_pc ())); */
+/* OBSOLETE #endif */
+/* OBSOLETE */
+/* OBSOLETE select_frame (get_current_frame (), 0); */
+/* OBSOLETE validate_files (); */
+/* OBSOLETE } */
+/* OBSOLETE else if (from_tty) */
+/* OBSOLETE printf_unfiltered ("No core file now.\n"); */
+/* OBSOLETE } */
diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c
index 5e5a1c53cee..f5aca89d15c 100644
--- a/gdb/remote-mips.c
+++ b/gdb/remote-mips.c
@@ -167,6 +167,7 @@ extern struct target_ops mips_ops;
extern struct target_ops pmon_ops;
extern struct target_ops ddb_ops;
+/* *INDENT-OFF* */
/* The MIPS remote debugging interface is built on top of a simple
packet protocol. Each packet is organized as follows:
@@ -230,6 +231,7 @@ extern struct target_ops ddb_ops;
communicates with ASCII strings. Because of this, this
implementation doesn't bother to handle the DLE quoting mechanism,
since it will never be required. */
+/* *INDENT-ON* */
/* The SYN character which starts each packet. */
#define SYN '\026'
@@ -523,19 +525,20 @@ mips_error (va_alist)
^x notation or in hex. */
static void
-putc_readable (ch)
+fputc_readable (ch, file)
int ch;
+ struct gdb_file *file;
{
if (ch == '\n')
- putchar_unfiltered ('\n');
+ fputc_unfiltered ('\n', file);
else if (ch == '\r')
- printf_unfiltered ("\\r");
+ fprintf_unfiltered (file, "\\r");
else if (ch < 0x20) /* ASCII control character */
- printf_unfiltered ("^%c", ch + '@');
+ fprintf_unfiltered (file, "^%c", ch + '@');
else if (ch >= 0x7f) /* non-ASCII characters (rubout or greater) */
- printf_unfiltered ("[%02x]", ch & 0xff);
+ fprintf_unfiltered (file, "[%02x]", ch & 0xff);
else
- putchar_unfiltered (ch);
+ fputc_unfiltered (ch, file);
}
@@ -543,13 +546,14 @@ putc_readable (ch)
^x notation or in hex. */
static void
-puts_readable (string)
+fputs_readable (string, file)
char *string;
+ struct gdb_file *file;
{
int c;
while ((c = *string++) != '\0')
- putc_readable (c);
+ fputc_readable (c, file);
}
@@ -566,9 +570,9 @@ mips_expect_timeout (string, timeout)
if (remote_debug)
{
- printf_unfiltered ("Expected \"");
- puts_readable (string);
- printf_unfiltered ("\", got \"");
+ fprintf_unfiltered (gdb_stdlog, "Expected \"");
+ fputs_readable (string, gdb_stdlog);
+ fprintf_unfiltered (gdb_stdlog, "\", got \"");
}
immediate_quit = 1;
@@ -584,12 +588,12 @@ mips_expect_timeout (string, timeout)
if (c == SERIAL_TIMEOUT)
{
if (remote_debug)
- printf_unfiltered ("\": FAIL\n");
+ fprintf_unfiltered (gdb_stdlog, "\": FAIL\n");
return 0;
}
if (remote_debug)
- putc_readable (c);
+ fputc_readable (c, gdb_stdlog);
if (c == *p++)
{
@@ -597,7 +601,7 @@ mips_expect_timeout (string, timeout)
{
immediate_quit = 0;
if (remote_debug)
- printf_unfiltered ("\": OK\n");
+ fprintf_unfiltered (gdb_stdlog, "\": OK\n");
return 1;
}
}
@@ -699,9 +703,9 @@ mips_readchar (timeout)
/* Don't use _filtered; we can't deal with a QUIT out of
target_wait, and I think this might be called from there. */
if (ch != SERIAL_TIMEOUT)
- printf_unfiltered ("Read '%c' %d 0x%x\n", ch, ch, ch);
+ fprintf_unfiltered (gdb_stdlog, "Read '%c' %d 0x%x\n", ch, ch, ch);
else
- printf_unfiltered ("Timed out in read\n");
+ fprintf_unfiltered (gdb_stdlog, "Timed out in read\n");
}
/* If we have seen mips_monitor_prompt and we either time out, or
@@ -717,7 +721,7 @@ mips_readchar (timeout)
if (remote_debug > 0)
/* Don't use _filtered; we can't deal with a QUIT out of
target_wait, and I think this might be called from there. */
- printf_unfiltered ("Reinitializing MIPS debugging mode\n");
+ fprintf_unfiltered (gdb_stdlog, "Reinitializing MIPS debugging mode\n");
mips_need_reply = 0;
mips_initialize ();
@@ -771,8 +775,8 @@ mips_receive_header (hdr, pgarbage, ch, timeout)
we can't deal with a QUIT out of target_wait. */
if (! mips_initializing || remote_debug > 0)
{
- putc_readable (ch);
- gdb_flush (gdb_stdout);
+ fputc_readable (ch, gdb_stdlog);
+ gdb_flush (gdb_stdlog);
}
++*pgarbage;
@@ -907,7 +911,7 @@ mips_send_packet (s, get_ack)
/* Don't use _filtered; we can't deal with a QUIT out of
target_wait, and I think this might be called from there. */
packet[HDR_LENGTH + len + TRLR_LENGTH] = '\0';
- printf_unfiltered ("Writing \"%s\"\n", packet + 1);
+ fprintf_unfiltered (gdb_stdlog, "Writing \"%s\"\n", packet + 1);
}
if (SERIAL_WRITE (mips_desc, packet,
@@ -997,8 +1001,8 @@ mips_send_packet (s, get_ack)
trlr[TRLR_LENGTH] = '\0';
/* Don't use _filtered; we can't deal with a QUIT out of
target_wait, and I think this might be called from there. */
- printf_unfiltered ("Got ack %d \"%s%s\"\n",
- HDR_GET_SEQ (hdr), hdr + 1, trlr);
+ fprintf_unfiltered (gdb_stdlog, "Got ack %d \"%s%s\"\n",
+ HDR_GET_SEQ (hdr), hdr + 1, trlr);
}
/* If this ack is for the current packet, we're done. */
@@ -1074,7 +1078,7 @@ mips_receive_packet (buff, throw_error, timeout)
/* Don't use _filtered; we can't deal with a QUIT out of
target_wait, and I think this might be called from there. */
if (remote_debug > 0)
- printf_unfiltered ("Ignoring unexpected ACK\n");
+ fprintf_unfiltered (gdb_stdlog, "Ignoring unexpected ACK\n");
continue;
}
@@ -1104,8 +1108,9 @@ mips_receive_packet (buff, throw_error, timeout)
/* Don't use _filtered; we can't deal with a QUIT out of
target_wait, and I think this might be called from there. */
if (remote_debug > 0)
- printf_unfiltered ("Got new SYN after %d chars (wanted %d)\n",
- i, len);
+ fprintf_unfiltered (gdb_stdlog,
+ "Got new SYN after %d chars (wanted %d)\n",
+ i, len);
continue;
}
@@ -1122,7 +1127,7 @@ mips_receive_packet (buff, throw_error, timeout)
/* Don't use _filtered; we can't deal with a QUIT out of
target_wait, and I think this might be called from there. */
if (remote_debug > 0)
- printf_unfiltered ("Got SYN when wanted trailer\n");
+ fprintf_unfiltered (gdb_stdlog, "Got SYN when wanted trailer\n");
continue;
}
@@ -1132,8 +1137,9 @@ mips_receive_packet (buff, throw_error, timeout)
/* Don't use _filtered; we can't deal with a QUIT out of
target_wait, and I think this might be called from there. */
if (remote_debug > 0)
- printf_unfiltered ("Ignoring sequence number %d (want %d)\n",
- HDR_GET_SEQ (hdr), mips_receive_seq);
+ fprintf_unfiltered (gdb_stdlog,
+ "Ignoring sequence number %d (want %d)\n",
+ HDR_GET_SEQ (hdr), mips_receive_seq);
continue;
}
diff --git a/gdb/remote-os9k.c b/gdb/remote-os9k.c
index 714400f57d5..2abfa837683 100644
--- a/gdb/remote-os9k.c
+++ b/gdb/remote-os9k.c
@@ -1,5 +1,5 @@
/* Remote debugging interface for boot monitors, for GDB.
- Copyright 1990, 1991, 1992, 1993, 1999 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
This file is part of GDB.
@@ -40,19 +40,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "gdbcore.h"
#include "target.h"
#include "wait.h"
-
#ifdef ANSI_PROTOTYPES
#include <stdarg.h>
#else
#include <varargs.h>
#endif
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
#include <signal.h>
-#include <sys/types.h>
-
#include "gdb_string.h"
+#include <sys/types.h>
#include "command.h"
#include "serial.h"
#include "monitor.h"
diff --git a/gdb/remote-rdp.c b/gdb/remote-rdp.c
index 1d596a42c1f..7b979d2fb6b 100644
--- a/gdb/remote-rdp.c
+++ b/gdb/remote-rdp.c
@@ -186,7 +186,7 @@ get_byte ()
int c = SERIAL_READCHAR (io, timeout);
if (remote_debug)
- printf ("[%02x]\n", c);
+ fprintf_unfiltered (gdb_stdlog, "[%02x]\n", c);
if (c == SERIAL_TIMEOUT)
{
@@ -220,7 +220,7 @@ put_byte (val)
char val;
{
if (remote_debug)
- printf ("(%02x)\n", val);
+ fprintf_unfiltered (gdb_stdlog, "(%02x)\n", val);
SERIAL_WRITE (io, &val, 1);
}
@@ -236,7 +236,7 @@ put_word (val)
b[3] = val >> 24;
if (remote_debug)
- printf ("(%04x)", val);
+ fprintf_unfiltered (gdb_stdlog, "(%04x)", val);
SERIAL_WRITE (io, b, 4);
}
@@ -314,7 +314,7 @@ rdp_init (cold, tty)
while (!sync && (restype = SERIAL_READCHAR (io, 1)) > 0)
{
if (remote_debug)
- printf_unfiltered ("[%02x]\n", restype);
+ fprintf_unfiltered (gdb_stdlog, "[%02x]\n", restype);
switch (restype)
{
@@ -349,7 +349,7 @@ rdp_init (cold, tty)
int resval = SERIAL_READCHAR (io, 1);
if (remote_debug)
- printf_unfiltered ("[%02x]\n", resval);
+ fprintf_unfiltered (gdb_stdlog, "[%02x]\n", resval);
switch (resval)
{
diff --git a/gdb/remote-sds.c b/gdb/remote-sds.c
index 74a86806081..013b06baf46 100644
--- a/gdb/remote-sds.c
+++ b/gdb/remote-sds.c
@@ -394,7 +394,7 @@ sds_interrupt (signo)
signal (signo, sds_interrupt_twice);
if (remote_debug)
- printf_unfiltered ("sds_interrupt called\n");
+ fprintf_unfiltered (gdb_stdlog, "sds_interrupt called\n");
buf[0] = 25;
sds_send (buf, 1);
@@ -471,7 +471,7 @@ sds_wait (pid, status)
retlen = sds_send (buf, 1);
if (remote_debug)
{
- fprintf_unfiltered (gdb_stderr, "Signals: %02x%02x %02x %02x\n",
+ fprintf_unfiltered (gdb_stdlog, "Signals: %02x%02x %02x %02x\n",
buf[0], buf[1],
buf[2], buf[3]);
}
@@ -723,7 +723,7 @@ readchar (timeout)
ch = SERIAL_READCHAR (sds_desc, timeout);
if (remote_debug > 1 && ch >= 0)
- printf_unfiltered("%c(%x)", ch, ch);
+ fprintf_unfiltered (gdb_stdlog, "%c(%x)", ch, ch);
switch (ch)
{
@@ -791,10 +791,10 @@ putmessage (buf, len)
if (remote_debug)
{
- fprintf_unfiltered (gdb_stderr, "Message to send: \"");
+ fprintf_unfiltered (gdb_stdlog, "Message to send: \"");
for (i = 0; i < len; ++i)
- fprintf_unfiltered (gdb_stderr, "%02x", buf[i]);
- fprintf_unfiltered (gdb_stderr, "\"\n");
+ fprintf_unfiltered (gdb_stdlog, "%02x", buf[i]);
+ fprintf_unfiltered (gdb_stdlog, "\"\n");
}
p = buf2;
@@ -835,10 +835,11 @@ putmessage (buf, len)
if (remote_debug)
{
*p = '\0';
- printf_unfiltered ("Sending encoded: \"%s\"", buf2);
- printf_unfiltered (" (Checksum %d, id %d, length %d)\n",
- header[0], header[1], header[2]);
- gdb_flush (gdb_stdout);
+ fprintf_unfiltered (gdb_stdlog, "Sending encoded: \"%s\"", buf2);
+ fprintf_unfiltered (gdb_stdlog,
+ " (Checksum %d, id %d, length %d)\n",
+ header[0], header[1], header[2]);
+ gdb_flush (gdb_stdlog);
}
if (SERIAL_WRITE (sds_desc, buf2, p - buf2))
perror_with_name ("putmessage: write failed");
@@ -869,11 +870,12 @@ read_frame (buf)
{
case SERIAL_TIMEOUT:
if (remote_debug)
- puts_filtered ("Timeout in mid-message, retrying\n");
+ fputs_filtered ("Timeout in mid-message, retrying\n", gdb_stdlog);
return 0;
case '$':
if (remote_debug)
- puts_filtered ("Saw new packet start in middle of old one\n");
+ fputs_filtered ("Saw new packet start in middle of old one\n",
+ gdb_stdlog);
return 0; /* Start a new packet, count retries */
case '\r':
break;
@@ -882,7 +884,7 @@ read_frame (buf)
{
*bp = '\000';
if (remote_debug)
- fprintf_unfiltered (gdb_stderr, "Received encoded: \"%s\"\n",
+ fprintf_unfiltered (gdb_stdlog, "Received encoded: \"%s\"\n",
buf);
return 1;
}
@@ -955,7 +957,7 @@ getmessage (buf, forever)
error ("Watchdog has expired. Target detached.\n");
}
if (remote_debug)
- puts_filtered ("Timed out.\n");
+ fputs_filtered ("Timed out.\n", gdb_stdlog);
goto retry;
}
}
@@ -970,7 +972,7 @@ getmessage (buf, forever)
c2 = readchar (timeout);
c3 = readchar (timeout);
if (remote_debug)
- fprintf_unfiltered (gdb_stderr, "Trigraph %c%c%c received\n",
+ fprintf_unfiltered (gdb_stdlog, "Trigraph %c%c%c received\n",
c, c2, c3);
if (c3 == '+')
{
@@ -1004,15 +1006,15 @@ getmessage (buf, forever)
if (remote_debug)
{
- fprintf_unfiltered (gdb_stderr,
+ fprintf_unfiltered (gdb_stdlog,
"... (Got checksum %d, id %d, length %d)\n",
header[0], header[1], header[2]);
- fprintf_unfiltered (gdb_stderr, "Message received: \"");
+ fprintf_unfiltered (gdb_stdlog, "Message received: \"");
for (i = 0; i < len; ++i)
{
- fprintf_unfiltered (gdb_stderr, "%02x", (unsigned char) buf[i]);
+ fprintf_unfiltered (gdb_stdlog, "%02x", (unsigned char) buf[i]);
}
- fprintf_unfiltered (gdb_stderr, "\"\n");
+ fprintf_unfiltered (gdb_stdlog, "\"\n");
}
/* no ack required? */
diff --git a/gdb/remote-st.c b/gdb/remote-st.c
index 108fa9618c3..1efdbfac027 100644
--- a/gdb/remote-st.c
+++ b/gdb/remote-st.c
@@ -1,5 +1,5 @@
/* Remote debugging interface for Tandem ST2000 phone switch, for GDB.
- Copyright 1990, 1991, 1992, 1999 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992 Free Software Foundation, Inc.
Contributed by Cygnus Support. Written by Jim Kingdon for Cygnus.
This file is part of GDB.
@@ -38,19 +38,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "gdbcore.h"
#include "target.h"
#include "wait.h"
-
#ifdef ANSI_PROTOTYPES
#include <stdarg.h>
#else
#include <varargs.h>
#endif
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
#include <signal.h>
-#include <sys/types.h>
-
#include "gdb_string.h"
+#include <sys/types.h>
#include "serial.h"
extern struct target_ops st2000_ops; /* Forward declaration */
diff --git a/gdb/remote-udi.c b/gdb/remote-udi.c
index 6397bca5d16..30bbfb9b338 100644
--- a/gdb/remote-udi.c
+++ b/gdb/remote-udi.c
@@ -750,10 +750,12 @@ int regno;
if (remote_debug)
{
- printf_unfiltered("Fetching all registers\n");
- printf_unfiltered("Fetching PC0 = 0x%x, PC1 = 0x%x, PC2 = 0x%x\n",
- read_register(NPC_REGNUM), read_register(PC_REGNUM),
- read_register(PC2_REGNUM));
+ fprintf_unfiltered (gdb_stdlog, "Fetching all registers\n");
+ fprintf_unfiltered (gdb_stdlog,
+ "Fetching PC0 = 0x%x, PC1 = 0x%x, PC2 = 0x%x\n",
+ read_register (NPC_REGNUM),
+ read_register (PC_REGNUM),
+ read_register (PC2_REGNUM));
}
/* There doesn't seem to be any way to get these. */
@@ -791,9 +793,12 @@ int regno;
if (remote_debug)
{
- printf_unfiltered("Storing all registers\n");
- printf_unfiltered("PC0 = 0x%x, PC1 = 0x%x, PC2 = 0x%x\n", read_register(NPC_REGNUM),
- read_register(PC_REGNUM), read_register(PC2_REGNUM));
+ fprintf_unfiltered (gdb_stdlog, "Storing all registers\n");
+ fprintf_unfiltered (gdb_stdlog,
+ "PC0 = 0x%x, PC1 = 0x%x, PC2 = 0x%x\n",
+ read_register (NPC_REGNUM),
+ read_register (PC_REGNUM),
+ read_register (PC2_REGNUM));
}
/* Gr1/rsp */
@@ -1450,7 +1455,8 @@ fetch_register (regno)
supply_register(regno, (char *) &To);
if (remote_debug)
- printf_unfiltered("Fetching register %s = 0x%x\n", REGISTER_NAME (regno), To);
+ fprintf_unfiltered (gdb_stdlog, "Fetching register %s = 0x%x\n",
+ REGISTER_NAME (regno), To);
}
/*****************************************************************************/
/* Store a single register indicated by 'regno'.
@@ -1471,7 +1477,8 @@ store_register (regno)
From = read_register (regno); /* get data value */
if (remote_debug)
- printf_unfiltered("Storing register %s = 0x%x\n", REGISTER_NAME (regno), From);
+ fprintf_unfiltered (gdb_stdlog, "Storing register %s = 0x%x\n",
+ REGISTER_NAME (regno), From);
if (regno == GR1_REGNUM)
{
diff --git a/gdb/remote.c b/gdb/remote.c
index a88194cf324..fd9e90269ff 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -18,6 +18,7 @@ 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. */
+/* *INDENT-OFF* */
/* Remote communication protocol.
A debug packet whose contents are <data>
@@ -195,6 +196,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
So
"0* " means the same as "0000". */
+/* *INDENT-ON* */
#include "defs.h"
#include "gdb_string.h"
@@ -215,14 +217,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "dcache.h"
#include <ctype.h>
+#include <sys/time.h>
#ifdef USG
#include <sys/types.h>
#endif
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
-
#include "event-loop.h"
#include <signal.h>
diff --git a/gdb/ser-tcp.c b/gdb/ser-tcp.c
index 86c7f5ae701..e6443a08f5c 100644
--- a/gdb/ser-tcp.c
+++ b/gdb/ser-tcp.c
@@ -1,5 +1,5 @@
/* Serial interface for raw TCP connections on Un*x like systems
- Copyright 1992, 1993, 1998, 1999 Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1998 Free Software Foundation, Inc.
This file is part of GDB.
@@ -33,10 +33,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <netinet/tcp.h>
#endif
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
-
#include "signals.h"
#include "gdb_string.h"
diff --git a/gdb/ser-unix.c b/gdb/ser-unix.c
index 50f28066176..dc5236fbe66 100644
--- a/gdb/ser-unix.c
+++ b/gdb/ser-unix.c
@@ -1,5 +1,5 @@
/* Serial interface for local (hardwired) serial ports on Un*x like systems
- Copyright 1992, 1993, 1994, 1998, 1999 Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1994, 1998 Free Software Foundation, Inc.
This file is part of GDB.
@@ -26,10 +26,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <unistd.h>
#endif
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
-
#ifdef HAVE_TERMIOS
struct hardwire_ttystate
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index fa0ecb84c3e..49df334a766 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -38,6 +38,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* A set of original names, to be used when restoring back to generic
registers from a specific set. */
+/* *INDENT-OFF* */
static char *sh_generic_reg_names[] = {
"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
"r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
@@ -85,6 +86,7 @@ static char *sh3e_reg_names[] = {
"r0b0", "r1b0", "r2b0", "r3b0", "r4b0", "r5b0", "r6b0", "r7b0",
"r0b1", "r1b1", "r2b1", "r3b1", "r4b1", "r5b1", "r6b1", "r7b1",
};
+/* *INDENT-ON* */
char **sh_register_names = sh_generic_reg_names;
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index 7a1abf84282..f31878fc30a 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -1283,6 +1283,7 @@ sunos4_skip_trampoline_code (pc)
#ifdef USE_PROC_FS /* Target dependent support for /proc */
+/* *INDENT-OFF* */
/* The /proc interface divides the target machine's register set up into
two different sets, the general register set (gregset) and the floating
point register set (fpregset). For each set, there is an ioctl to get
@@ -1318,6 +1319,7 @@ sunos4_skip_trampoline_code (pc)
fpregset_t formatted data.
*/
+/* *INDENT-ON* */
/* Given a pointer to a general register set in /proc format (gregset_t *),
unpack the register contents and supply them as gdb's idea of the current
diff --git a/gdb/sparcl-tdep.c b/gdb/sparcl-tdep.c
index 4c8ff97dc3e..e39bf306ec9 100644
--- a/gdb/sparcl-tdep.c
+++ b/gdb/sparcl-tdep.c
@@ -1,5 +1,5 @@
/* Target dependent code for the Fujitsu SPARClite for GDB, the GNU debugger.
- Copyright 1994, 1995, 1996, 1999 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996 Free Software Foundation, Inc.
This file is part of GDB.
@@ -24,10 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "serial.h"
#include <sys/types.h>
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
-
#if (!defined(__GO32__) && !defined(_WIN32)) || defined(__CYGWIN32__)
#define HAVE_SOCKETS
#include <sys/time.h>
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 9e1217b6529..d8139aeb25a 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -3574,6 +3574,7 @@ read_struct_fields (fip, pp, type, objfile)
return 1;
}
+/* *INDENT-OFF* */
/* The stabs for C++ derived classes contain baseclass information which
is marked by a '!' character after the total size. This function is
called when we encounter the baseclass marker, and slurps up all the
@@ -3597,6 +3598,7 @@ read_struct_fields (fip, pp, type, objfile)
Type number of base class ____________________________________|
Return 1 for success, 0 for (error-type-inducing) failure. */
+/* *INDENT-ON* */
static int
read_baseclasses (fip, pp, type, objfile)
diff --git a/gdb/target.c b/gdb/target.c
index a9217d887b2..1c033bd057d 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -1182,6 +1182,7 @@ generic_mourn_inferior ()
/* This table must match in order and size the signals in enum target_signal
in target.h. */
+/* *INDENT-OFF* */
static struct {
char *name;
char *string;
@@ -1282,6 +1283,7 @@ static struct {
/* Last entry, used to check whether the table is the right size. */
{NULL, "TARGET_SIGNAL_MAGIC"}
};
+/* *INDENT-ON* */
/* Return the string for a signal. */
char *
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 6e53b6743de..1c56333d76a 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,18 @@
+Wed Jul 7 00:27:35 1999 Andrew Cagney <cagney@amy.cygnus.com>
+
+ * gdb.base/setvar.exp: Increase the time-out on tests indirectly
+ calling malloc.
+ * nodebug.exp, printcmds.exp, ptype.exp, setvar.exp: Ditto.
+ * ptype.exp: Move test for get_debug_format to before its first
+ use.
+
+1999-07-06 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * gdb.base/Makefile.in (EXECUTABLES): Remove annota2 executable.
+ * gdb.base/annota2.cc, annota2.exp: Move from here.
+ * gdb.c++/annota2.cc, annota2.exp: To here.
+ * gdb.c++/Makefile.in (PROGS): Add annota2 executable.
+
Tue Jun 29 11:56:06 1999 Andrew Cagney <cagney@b1.cygnus.com>
* lib/gdb.exp (gdb_expect_list): Output one message per pattern in
diff --git a/gdb/testsuite/gdb.base/Makefile.in b/gdb/testsuite/gdb.base/Makefile.in
index 050ccc8bb8e..fbb7fe2fad2 100644
--- a/gdb/testsuite/gdb.base/Makefile.in
+++ b/gdb/testsuite/gdb.base/Makefile.in
@@ -1,7 +1,7 @@
VPATH = @srcdir@
srcdir = @srcdir@
-EXECUTABLES = all-types annota1 annota2 bitfields break \
+EXECUTABLES = all-types annota1 bitfields break \
call-ar-st call-rt-st call-strs callfuncs callfuncs2 commands \
compiler condbreak constvars coremaker display \
ending-run exprs funcargs int-type interrupt \
diff --git a/gdb/testsuite/gdb.base/nodebug.exp b/gdb/testsuite/gdb.base/nodebug.exp
index 684476ee0d7..d8832722012 100644
--- a/gdb/testsuite/gdb.base/nodebug.exp
+++ b/gdb/testsuite/gdb.base/nodebug.exp
@@ -164,6 +164,9 @@ if [runto inner] then {
timeout { fail "(timeout) p/c array_index" }
}
} else {
+ # We need to up this because this can be really slow on some boards.
+ # (malloc() is called as part of the test).
+ set timeout 60;
gdb_test {p/c array_index("abcdef",2)} " = 99 'c'"
}
}
diff --git a/gdb/testsuite/gdb.base/printcmds.exp b/gdb/testsuite/gdb.base/printcmds.exp
index 4953ec5c4a8..cdbe56c9010 100644
--- a/gdb/testsuite/gdb.base/printcmds.exp
+++ b/gdb/testsuite/gdb.base/printcmds.exp
@@ -598,6 +598,10 @@ proc test_print_string_constants {} {
return
}
+ # We need to up this because this can be really slow on some boards.
+ # (Test may involve inferior malloc() calls).
+ set timeout 60;
+
setup_xfail "a29k-*-udi" 2416
gdb_test "p \"a string\"" " = \"a string\""
setup_xfail "a29k-*-udi" 2416
@@ -628,6 +632,10 @@ proc test_print_array_constants {} {
return
}
+ # We need to up this because this can be really slow on some boards.
+ # (Test may involve inferior malloc() calls).
+ set timeout 60;
+
setup_xfail "a29k-*-udi" 2416
gdb_test "print {'a','b','c'}" " = \"abc\""
setup_xfail "a29k-*-udi" 2416
diff --git a/gdb/testsuite/gdb.base/ptype.exp b/gdb/testsuite/gdb.base/ptype.exp
index 98d45869e87..d36efec12c6 100644
--- a/gdb/testsuite/gdb.base/ptype.exp
+++ b/gdb/testsuite/gdb.base/ptype.exp
@@ -131,6 +131,7 @@ gdb_test "ptype boolean" "type = enum (boolean |)\{FALSE, TRUE\}.*" "ptype unnam
if {!$gcc_compiled && !$hp_aCC_compiler} {
setup_xfail "rs6000-*-*" "i*86-*-sysv4*" "hppa*-*-*" # CLLbs14773
}
+get_debug_format
setup_xfail_format "DWARF 1"
gdb_test "whatis v_boolean" "type = (enum |)boolean" \
"whatis unnamed typedef'd enum (compiler bug in IBM's xlc)"
@@ -530,13 +531,16 @@ gdb_test "ptype nested_su.inner_union_instance" "type = union ${outer}inner_unio
if [runto_main] then {
- get_debug_format
if [target_info exists gdb,cannot_call_functions] {
setup_xfail "*-*-*" 2416
fail "This target can not call functions"
continue
}
+ # We need to up this because this can be really slow on some boards.
+ # (malloc() is called as part of the test).
+ set timeout 60;
+
gdb_test "ptype \"abc\"" "type = char \\\[4\\\]"
gdb_test "ptype {'a','b','c'}" "type = char \\\[3\\\]"
gdb_test "ptype {0,1,2}" "type = int \\\[3\\\]"
diff --git a/gdb/testsuite/gdb.base/setvar.exp b/gdb/testsuite/gdb.base/setvar.exp
index e7d31dc87a6..ec217cf78c0 100644
--- a/gdb/testsuite/gdb.base/setvar.exp
+++ b/gdb/testsuite/gdb.base/setvar.exp
@@ -396,6 +396,9 @@ if [target_info exists gdb,cannot_call_functions] {
fail "set variable v_struct1 = {32, 33, 34, 35, 36, 37}"
continue
}
+# We need to up this because this can be really slow on some boards.
+# (malloc() is called as part of the test).
+set timeout 60;
gdb_test "set variable v_struct1 = {32, 33, 34, 35, 36, 37}" "Invalid.*"
# And after the error the structure should be unchanged.
diff --git a/gdb/testsuite/gdb.c++/Makefile.in b/gdb/testsuite/gdb.c++/Makefile.in
index 13a1234a890..5efba8d1617 100644
--- a/gdb/testsuite/gdb.c++/Makefile.in
+++ b/gdb/testsuite/gdb.c++/Makefile.in
@@ -1,7 +1,7 @@
VPATH = @srcdir@
srcdir = @srcdir@
-PROGS = anon-union compiler cplusfuncs derivation inherit local \
+PROGS = annota2 anon-union compiler cplusfuncs derivation inherit local \
member-ptr method misc \
overload ovldbreak ref-types ref-types2 templates userdef virtfunc
diff --git a/gdb/utils.c b/gdb/utils.c
index 26f05a75e01..0e7c8234bf8 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -2251,16 +2251,16 @@ puts_debug (prefix, string, suffix)
and the new prefix. */
if ((return_p || (strcmp(prev_prefix, prefix) != 0)) && !new_line)
{
- fputs_unfiltered (prev_suffix, gdb_stderr);
- fputs_unfiltered ("\n", gdb_stderr);
- fputs_unfiltered (prefix, gdb_stderr);
+ fputs_unfiltered (prev_suffix, gdb_stdlog);
+ fputs_unfiltered ("\n", gdb_stdlog);
+ fputs_unfiltered (prefix, gdb_stdlog);
}
/* Print prefix if we printed a newline during the previous call. */
if (new_line)
{
new_line = 0;
- fputs_unfiltered (prefix, gdb_stderr);
+ fputs_unfiltered (prefix, gdb_stdlog);
}
prev_prefix = prefix;
@@ -2273,20 +2273,20 @@ puts_debug (prefix, string, suffix)
{
default:
if (isprint (ch))
- fputc_unfiltered (ch, gdb_stderr);
+ fputc_unfiltered (ch, gdb_stdlog);
else
- fprintf_unfiltered (gdb_stderr, "\\x%02x", ch & 0xff);
+ fprintf_unfiltered (gdb_stdlog, "\\x%02x", ch & 0xff);
break;
- case '\\': fputs_unfiltered ("\\\\", gdb_stderr); break;
- case '\b': fputs_unfiltered ("\\b", gdb_stderr); break;
- case '\f': fputs_unfiltered ("\\f", gdb_stderr); break;
+ case '\\': fputs_unfiltered ("\\\\", gdb_stdlog); break;
+ case '\b': fputs_unfiltered ("\\b", gdb_stdlog); break;
+ case '\f': fputs_unfiltered ("\\f", gdb_stdlog); break;
case '\n': new_line = 1;
- fputs_unfiltered ("\\n", gdb_stderr); break;
- case '\r': fputs_unfiltered ("\\r", gdb_stderr); break;
- case '\t': fputs_unfiltered ("\\t", gdb_stderr); break;
- case '\v': fputs_unfiltered ("\\v", gdb_stderr); break;
+ fputs_unfiltered ("\\n", gdb_stdlog); break;
+ case '\r': fputs_unfiltered ("\\r", gdb_stdlog); break;
+ case '\t': fputs_unfiltered ("\\t", gdb_stdlog); break;
+ case '\v': fputs_unfiltered ("\\v", gdb_stdlog); break;
}
return_p = ch == '\r';
@@ -2295,8 +2295,8 @@ puts_debug (prefix, string, suffix)
/* Print suffix if we printed a newline. */
if (new_line)
{
- fputs_unfiltered (suffix, gdb_stderr);
- fputs_unfiltered ("\n", gdb_stderr);
+ fputs_unfiltered (suffix, gdb_stdlog);
+ fputs_unfiltered ("\n", gdb_stdlog);
}
}
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 0cf93714821..f5f2670a2c6 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -353,6 +353,7 @@ struct pending_stabs **stabvector;
#endif
+/* *INDENT-OFF* */
/* Linenos are processed on a file-by-file basis.
Two reasons:
@@ -404,6 +405,7 @@ struct pending_stabs **stabvector;
on when we come the end of the compilation unit.
Include table (inclTable) and process_linenos() handle
that. */
+/* *INDENT-ON* */
/* compare line table entry addresses. */
diff --git a/gdb/xmodem.c b/gdb/xmodem.c
index dd13b873c14..d4faa42db3f 100644
--- a/gdb/xmodem.c
+++ b/gdb/xmodem.c
@@ -44,7 +44,7 @@ readchar (desc, timeout)
c = SERIAL_READCHAR (desc, timeout);
if (remote_debug > 0)
- fputc_unfiltered (c, gdb_stderr);
+ fputc_unfiltered (c, gdb_stdlog);
if (c >= 0)
return c;
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index d8847c605a0..5f702b0c6a1 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,16 @@
+Wed Jul 7 19:56:03 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * dv-sockser.c (connected_p): Initialize addrlen.
+
+1999-07-06 Dave Brolley <brolley@cygnus.com>
+
+ * cgen-accfp.c (floatsidf): New function.
+ (fixdfsi): New function.
+
+1999-07-06 Doug Evans <devans@casey.cygnus.com>
+
+ * sim-model.c (sim_model_init): Issue error if machine is unsupported.
+
1999-07-05 Doug Evans <devans@casey.cygnus.com>
* Make-common.in (CGEN_MAIN_CPU_DEPS): Add cgen-fpu.h.
diff --git a/sim/common/cgen-accfp.c b/sim/common/cgen-accfp.c
index 8c7b4f4c13f..9ce204f97a2 100644
--- a/sim/common/cgen-accfp.c
+++ b/sim/common/cgen-accfp.c
@@ -268,6 +268,17 @@ floatsisf (CGEN_FPU* fpu, SI x)
return res;
}
+static DF
+floatsidf (CGEN_FPU* fpu, SI x)
+{
+ sim_fpu ans;
+ unsigned64 res;
+
+ sim_fpu_i32to (&ans, x, sim_fpu_round_near);
+ sim_fpu_to64 (&res, &ans);
+ return res;
+}
+
static SF
ufloatsisf (CGEN_FPU* fpu, USI x)
{
@@ -290,6 +301,17 @@ fixsfsi (CGEN_FPU* fpu, SF x)
return res;
}
+static SI
+fixdfsi (CGEN_FPU* fpu, DF x)
+{
+ sim_fpu op1;
+ unsigned32 res;
+
+ sim_fpu_64to (&op1, x);
+ sim_fpu_to32i (&res, &op1, sim_fpu_round_near);
+ return res;
+}
+
static USI
ufixsfsi (CGEN_FPU* fpu, SF x)
{
@@ -596,7 +618,9 @@ cgen_init_accurate_fpu (SIM_CPU* cpu, CGEN_FPU* fpu, CGEN_FPU_ERROR_FN* error)
o->gtdf = gtdf;
o->gedf = gedf;
o->floatsisf = floatsisf;
+ o->floatsidf = floatsidf;
o->ufloatsisf = ufloatsisf;
o->fixsfsi = fixsfsi;
+ o->fixdfsi = fixdfsi;
o->ufixsfsi = ufixsfsi;
}
diff --git a/sim/common/dv-sockser.c b/sim/common/dv-sockser.c
index c95288ca775..fb457d4f0b0 100644
--- a/sim/common/dv-sockser.c
+++ b/sim/common/dv-sockser.c
@@ -268,6 +268,7 @@ connected_p (SIM_DESC sd)
if (numfds <= 0)
return 0;
+ addrlen = sizeof (sockaddr);
sockser_fd = accept (sockser_listen_fd, &sockaddr, &addrlen);
if (sockser_fd < 0)
return 0;
diff --git a/sim/common/sim-model.c b/sim/common/sim-model.c
index a126fb16c66..8037dcd3c45 100644
--- a/sim/common/sim-model.c
+++ b/sim/common/sim-model.c
@@ -197,6 +197,13 @@ sim_model_init (SIM_DESC sd)
/* Use the default model for the selected machine.
The default model is the first one in the list. */
const MACH *mach = sim_mach_lookup_bfd_name (STATE_ARCHITECTURE (sd)->printable_name);
+
+ if (mach == NULL)
+ {
+ sim_io_eprintf (sd, "unsupported machine `%s'\n",
+ STATE_ARCHITECTURE (sd)->printable_name);
+ return SIM_RC_FAIL;
+ }
sim_model_set (sd, NULL, MACH_MODELS (mach));
}
else
diff --git a/sim/fr30/ChangeLog b/sim/fr30/ChangeLog
index 7951762e8f8..16ad6d4826c 100644
--- a/sim/fr30/ChangeLog
+++ b/sim/fr30/ChangeLog
@@ -1,3 +1,7 @@
+1999-07-06 Doug Evans <devans@casey.cygnus.com>
+
+ * cpu.h,decode.h,model.c,sem-switch.c,sem.c: Rebuild.
+
1999-05-08 Felix Lee <flee@cygnus.com>
* configure: Regenerated to track ../common/aclocal.m4 changes.
diff --git a/sim/fr30/cpu.h b/sim/fr30/cpu.h
index 13aceb4e4fd..fa07884071b 100644
--- a/sim/fr30/cpu.h
+++ b/sim/fr30/cpu.h
@@ -362,18 +362,6 @@ union sem_fields {
unsigned char in_Rj;
unsigned char out_Ri;
} fmt_ld;
- struct { /* e.g. lduh @$Rj,$Ri */
- SI * i_Rj;
- SI * i_Ri;
- unsigned char in_Rj;
- unsigned char out_Ri;
- } fmt_lduh;
- struct { /* e.g. ldub @$Rj,$Ri */
- SI * i_Rj;
- SI * i_Ri;
- unsigned char in_Rj;
- unsigned char out_Ri;
- } fmt_ldub;
struct { /* e.g. ld @($R13,$Rj),$Ri */
SI * i_Rj;
SI * i_Ri;
@@ -381,20 +369,6 @@ union sem_fields {
unsigned char in_h_gr_13;
unsigned char out_Ri;
} fmt_ldr13;
- struct { /* e.g. lduh @($R13,$Rj),$Ri */
- SI * i_Rj;
- SI * i_Ri;
- unsigned char in_Rj;
- unsigned char in_h_gr_13;
- unsigned char out_Ri;
- } fmt_ldr13uh;
- struct { /* e.g. ldub @($R13,$Rj),$Ri */
- SI * i_Rj;
- SI * i_Ri;
- unsigned char in_Rj;
- unsigned char in_h_gr_13;
- unsigned char out_Ri;
- } fmt_ldr13ub;
struct { /* e.g. ld @($R14,$disp10),$Ri */
SI f_disp10;
SI * i_Ri;
@@ -442,18 +416,6 @@ union sem_fields {
unsigned char in_Ri;
unsigned char in_Rj;
} fmt_st;
- struct { /* e.g. sth $Ri,@$Rj */
- SI * i_Ri;
- SI * i_Rj;
- unsigned char in_Ri;
- unsigned char in_Rj;
- } fmt_sth;
- struct { /* e.g. stb $Ri,@$Rj */
- SI * i_Ri;
- SI * i_Rj;
- unsigned char in_Ri;
- unsigned char in_Rj;
- } fmt_stb;
struct { /* e.g. st $Ri,@($R13,$Rj) */
SI * i_Ri;
SI * i_Rj;
@@ -461,20 +423,6 @@ union sem_fields {
unsigned char in_Rj;
unsigned char in_h_gr_13;
} fmt_str13;
- struct { /* e.g. sth $Ri,@($R13,$Rj) */
- SI * i_Ri;
- SI * i_Rj;
- unsigned char in_Ri;
- unsigned char in_Rj;
- unsigned char in_h_gr_13;
- } fmt_str13h;
- struct { /* e.g. stb $Ri,@($R13,$Rj) */
- SI * i_Ri;
- SI * i_Rj;
- unsigned char in_Ri;
- unsigned char in_Rj;
- unsigned char in_h_gr_13;
- } fmt_str13b;
struct { /* e.g. st $Ri,@($R14,$disp10) */
SI f_disp10;
SI * i_Ri;
@@ -614,15 +562,6 @@ union sem_fields {
struct { /* e.g. copop $u4c,$ccc,$CRj,$CRi */
int empty;
} fmt_copop;
- struct { /* e.g. copld $u4c,$ccc,$Rjc,$CRi */
- int empty;
- } fmt_copld;
- struct { /* e.g. copst $u4c,$ccc,$CRj,$Ric */
- int empty;
- } fmt_copst;
- struct { /* e.g. nop */
- int empty;
- } fmt_nop;
struct { /* e.g. andccr $u8 */
UINT f_u8;
} fmt_andccr;
@@ -846,10 +785,10 @@ struct scache {
unsigned int length;
#define EXTRACT_IFMT_ADD_CODE \
length = 2; \
- f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \
- f_op2 = EXTRACT_UINT (insn, 16, 4, 4); \
- f_Rj = EXTRACT_UINT (insn, 16, 8, 4); \
- f_Ri = EXTRACT_UINT (insn, 16, 12, 4); \
+ f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+ f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+ f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
#define EXTRACT_IFMT_ADDI_VARS \
/* Instruction fields. */ \
@@ -860,10 +799,10 @@ struct scache {
unsigned int length;
#define EXTRACT_IFMT_ADDI_CODE \
length = 2; \
- f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \
- f_op2 = EXTRACT_UINT (insn, 16, 4, 4); \
- f_u4 = EXTRACT_UINT (insn, 16, 8, 4); \
- f_Ri = EXTRACT_UINT (insn, 16, 12, 4); \
+ f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+ f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+ f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
#define EXTRACT_IFMT_ADD2_VARS \
/* Instruction fields. */ \
@@ -874,10 +813,10 @@ struct scache {
unsigned int length;
#define EXTRACT_IFMT_ADD2_CODE \
length = 2; \
- f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \
- f_op2 = EXTRACT_UINT (insn, 16, 4, 4); \
- f_m4 = ((EXTRACT_UINT (insn, 16, 8, 4)) | (((-1) << (4)))); \
- f_Ri = EXTRACT_UINT (insn, 16, 12, 4); \
+ f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+ f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+ f_m4 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 4)) | (((-1) << (4)))); \
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
#define EXTRACT_IFMT_DIV0S_VARS \
/* Instruction fields. */ \
@@ -888,10 +827,10 @@ struct scache {
unsigned int length;
#define EXTRACT_IFMT_DIV0S_CODE \
length = 2; \
- f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \
- f_op2 = EXTRACT_UINT (insn, 16, 4, 4); \
- f_op3 = EXTRACT_UINT (insn, 16, 8, 4); \
- f_Ri = EXTRACT_UINT (insn, 16, 12, 4); \
+ f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+ f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+ f_op3 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
#define EXTRACT_IFMT_DIV3_VARS \
/* Instruction fields. */ \
@@ -902,10 +841,10 @@ struct scache {
unsigned int length;
#define EXTRACT_IFMT_DIV3_CODE \
length = 2; \
- f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \
- f_op2 = EXTRACT_UINT (insn, 16, 4, 4); \
- f_op3 = EXTRACT_UINT (insn, 16, 8, 4); \
- f_op4 = EXTRACT_UINT (insn, 16, 12, 4); \
+ f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+ f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+ f_op3 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \
+ f_op4 = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
#define EXTRACT_IFMT_LDI8_VARS \
/* Instruction fields. */ \
@@ -915,16 +854,16 @@ struct scache {
unsigned int length;
#define EXTRACT_IFMT_LDI8_CODE \
length = 2; \
- f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \
- f_i8 = EXTRACT_UINT (insn, 16, 4, 8); \
- f_Ri = EXTRACT_UINT (insn, 16, 12, 4); \
+ f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+ f_i8 = EXTRACT_MSB0_UINT (insn, 16, 4, 8); \
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
#define EXTRACT_IFMT_LDI20_VARS \
/* Instruction fields. */ \
UINT f_op1; \
- UINT f_i20; \
UINT f_i20_4; \
UINT f_i20_16; \
+ UINT f_i20; \
UINT f_op2; \
UINT f_Ri; \
/* Contents of trailing part of insn. */ \
@@ -933,14 +872,14 @@ struct scache {
#define EXTRACT_IFMT_LDI20_CODE \
length = 4; \
word_1 = GETIMEMUHI (current_cpu, pc + 2); \
- f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \
- f_i20_4 = EXTRACT_UINT (insn, 16, 8, 4); \
- f_i20_16 = (0|(EXTRACT_UINT (word_1, 16, 0, 16) << 0)); \
+ f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+ f_i20_4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \
+ f_i20_16 = (0|(EXTRACT_MSB0_UINT (word_1, 16, 0, 16) << 0)); \
{\
f_i20 = ((((f_i20_4) << (16))) | (f_i20_16));\
}\
- f_op2 = EXTRACT_UINT (insn, 16, 4, 4); \
- f_Ri = EXTRACT_UINT (insn, 16, 12, 4); \
+ f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
#define EXTRACT_IFMT_LDI32_VARS \
/* Instruction fields. */ \
@@ -957,11 +896,11 @@ struct scache {
length = 6; \
word_1 = GETIMEMUHI (current_cpu, pc + 2); \
word_2 = GETIMEMUHI (current_cpu, pc + 4); \
- f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \
- f_i32 = (0|(EXTRACT_UINT (word_2, 16, 0, 16) << 0)|(EXTRACT_UINT (word_1, 16, 0, 16) << 16)); \
- f_op2 = EXTRACT_UINT (insn, 16, 4, 4); \
- f_op3 = EXTRACT_UINT (insn, 16, 8, 4); \
- f_Ri = EXTRACT_UINT (insn, 16, 12, 4); \
+ f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+ f_i32 = (0|(EXTRACT_MSB0_UINT (word_2, 16, 0, 16) << 0)|(EXTRACT_MSB0_UINT (word_1, 16, 0, 16) << 16)); \
+ f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+ f_op3 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
#define EXTRACT_IFMT_LDR14_VARS \
/* Instruction fields. */ \
@@ -971,9 +910,9 @@ struct scache {
unsigned int length;
#define EXTRACT_IFMT_LDR14_CODE \
length = 2; \
- f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \
- f_disp10 = ((EXTRACT_INT (insn, 16, 4, 8)) << (2)); \
- f_Ri = EXTRACT_UINT (insn, 16, 12, 4); \
+ f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+ f_disp10 = ((EXTRACT_MSB0_INT (insn, 16, 4, 8)) << (2)); \
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
#define EXTRACT_IFMT_LDR14UH_VARS \
/* Instruction fields. */ \
@@ -983,9 +922,9 @@ struct scache {
unsigned int length;
#define EXTRACT_IFMT_LDR14UH_CODE \
length = 2; \
- f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \
- f_disp9 = ((EXTRACT_INT (insn, 16, 4, 8)) << (1)); \
- f_Ri = EXTRACT_UINT (insn, 16, 12, 4); \
+ f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+ f_disp9 = ((EXTRACT_MSB0_INT (insn, 16, 4, 8)) << (1)); \
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
#define EXTRACT_IFMT_LDR14UB_VARS \
/* Instruction fields. */ \
@@ -995,9 +934,9 @@ struct scache {
unsigned int length;
#define EXTRACT_IFMT_LDR14UB_CODE \
length = 2; \
- f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \
- f_disp8 = EXTRACT_INT (insn, 16, 4, 8); \
- f_Ri = EXTRACT_UINT (insn, 16, 12, 4); \
+ f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+ f_disp8 = EXTRACT_MSB0_INT (insn, 16, 4, 8); \
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
#define EXTRACT_IFMT_LDR15_VARS \
/* Instruction fields. */ \
@@ -1008,10 +947,10 @@ struct scache {
unsigned int length;
#define EXTRACT_IFMT_LDR15_CODE \
length = 2; \
- f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \
- f_op2 = EXTRACT_UINT (insn, 16, 4, 4); \
- f_udisp6 = ((EXTRACT_UINT (insn, 16, 8, 4)) << (2)); \
- f_Ri = EXTRACT_UINT (insn, 16, 12, 4); \
+ f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+ f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+ f_udisp6 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 4)) << (2)); \
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
#define EXTRACT_IFMT_LDR15DR_VARS \
/* Instruction fields. */ \
@@ -1022,10 +961,10 @@ struct scache {
unsigned int length;
#define EXTRACT_IFMT_LDR15DR_CODE \
length = 2; \
- f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \
- f_op2 = EXTRACT_UINT (insn, 16, 4, 4); \
- f_op3 = EXTRACT_UINT (insn, 16, 8, 4); \
- f_Rs2 = EXTRACT_UINT (insn, 16, 12, 4); \
+ f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+ f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+ f_op3 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \
+ f_Rs2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
#define EXTRACT_IFMT_MOVDR_VARS \
/* Instruction fields. */ \
@@ -1036,10 +975,10 @@ struct scache {
unsigned int length;
#define EXTRACT_IFMT_MOVDR_CODE \
length = 2; \
- f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \
- f_op2 = EXTRACT_UINT (insn, 16, 4, 4); \
- f_Rs1 = EXTRACT_UINT (insn, 16, 8, 4); \
- f_Ri = EXTRACT_UINT (insn, 16, 12, 4); \
+ f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+ f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+ f_Rs1 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
#define EXTRACT_IFMT_CALL_VARS \
/* Instruction fields. */ \
@@ -1049,9 +988,9 @@ struct scache {
unsigned int length;
#define EXTRACT_IFMT_CALL_CODE \
length = 2; \
- f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \
- f_op5 = EXTRACT_UINT (insn, 16, 4, 1); \
- f_rel12 = ((((EXTRACT_INT (insn, 16, 5, 11)) << (1))) + (((pc) + (2)))); \
+ f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+ f_op5 = EXTRACT_MSB0_UINT (insn, 16, 4, 1); \
+ f_rel12 = ((((EXTRACT_MSB0_INT (insn, 16, 5, 11)) << (1))) + (((pc) + (2)))); \
#define EXTRACT_IFMT_INT_VARS \
/* Instruction fields. */ \
@@ -1061,9 +1000,9 @@ struct scache {
unsigned int length;
#define EXTRACT_IFMT_INT_CODE \
length = 2; \
- f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \
- f_op2 = EXTRACT_UINT (insn, 16, 4, 4); \
- f_u8 = EXTRACT_UINT (insn, 16, 8, 8); \
+ f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+ f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+ f_u8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8); \
#define EXTRACT_IFMT_BRAD_VARS \
/* Instruction fields. */ \
@@ -1073,9 +1012,9 @@ struct scache {
unsigned int length;
#define EXTRACT_IFMT_BRAD_CODE \
length = 2; \
- f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \
- f_cc = EXTRACT_UINT (insn, 16, 4, 4); \
- f_rel9 = ((((EXTRACT_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2)))); \
+ f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+ f_cc = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+ f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2)))); \
#define EXTRACT_IFMT_DMOVR13_VARS \
/* Instruction fields. */ \
@@ -1085,9 +1024,9 @@ struct scache {
unsigned int length;
#define EXTRACT_IFMT_DMOVR13_CODE \
length = 2; \
- f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \
- f_op2 = EXTRACT_UINT (insn, 16, 4, 4); \
- f_dir10 = ((EXTRACT_UINT (insn, 16, 8, 8)) << (2)); \
+ f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+ f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+ f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2)); \
#define EXTRACT_IFMT_DMOVR13H_VARS \
/* Instruction fields. */ \
@@ -1097,9 +1036,9 @@ struct scache {
unsigned int length;
#define EXTRACT_IFMT_DMOVR13H_CODE \
length = 2; \
- f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \
- f_op2 = EXTRACT_UINT (insn, 16, 4, 4); \
- f_dir9 = ((EXTRACT_UINT (insn, 16, 8, 8)) << (1)); \
+ f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+ f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+ f_dir9 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (1)); \
#define EXTRACT_IFMT_DMOVR13B_VARS \
/* Instruction fields. */ \
@@ -1109,9 +1048,9 @@ struct scache {
unsigned int length;
#define EXTRACT_IFMT_DMOVR13B_CODE \
length = 2; \
- f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \
- f_op2 = EXTRACT_UINT (insn, 16, 4, 4); \
- f_dir8 = EXTRACT_UINT (insn, 16, 8, 8); \
+ f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+ f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+ f_dir8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8); \
#define EXTRACT_IFMT_COPOP_VARS \
/* Instruction fields. */ \
@@ -1128,13 +1067,13 @@ struct scache {
#define EXTRACT_IFMT_COPOP_CODE \
length = 4; \
word_1 = GETIMEMUHI (current_cpu, pc + 2); \
- f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \
- f_ccc = (0|(EXTRACT_UINT (word_1, 16, 0, 8) << 0)); \
- f_op2 = EXTRACT_UINT (insn, 16, 4, 4); \
- f_op3 = EXTRACT_UINT (insn, 16, 8, 4); \
- f_CRj = (0|(EXTRACT_UINT (word_1, 16, 8, 4) << 0)); \
- f_u4c = EXTRACT_UINT (insn, 16, 12, 4); \
- f_CRi = (0|(EXTRACT_UINT (word_1, 16, 12, 16) << 0)); \
+ f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+ f_ccc = (0|(EXTRACT_MSB0_UINT (word_1, 16, 0, 8) << 0)); \
+ f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+ f_op3 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \
+ f_CRj = (0|(EXTRACT_MSB0_UINT (word_1, 16, 8, 4) << 0)); \
+ f_u4c = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
+ f_CRi = (0|(EXTRACT_MSB0_UINT (word_1, 16, 12, 16) << 0)); \
#define EXTRACT_IFMT_COPLD_VARS \
/* Instruction fields. */ \
@@ -1151,13 +1090,13 @@ struct scache {
#define EXTRACT_IFMT_COPLD_CODE \
length = 4; \
word_1 = GETIMEMUHI (current_cpu, pc + 2); \
- f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \
- f_ccc = (0|(EXTRACT_UINT (word_1, 16, 0, 8) << 0)); \
- f_op2 = EXTRACT_UINT (insn, 16, 4, 4); \
- f_op3 = EXTRACT_UINT (insn, 16, 8, 4); \
- f_Rjc = (0|(EXTRACT_UINT (word_1, 16, 8, 4) << 0)); \
- f_u4c = EXTRACT_UINT (insn, 16, 12, 4); \
- f_CRi = (0|(EXTRACT_UINT (word_1, 16, 12, 16) << 0)); \
+ f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+ f_ccc = (0|(EXTRACT_MSB0_UINT (word_1, 16, 0, 8) << 0)); \
+ f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+ f_op3 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \
+ f_Rjc = (0|(EXTRACT_MSB0_UINT (word_1, 16, 8, 4) << 0)); \
+ f_u4c = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
+ f_CRi = (0|(EXTRACT_MSB0_UINT (word_1, 16, 12, 16) << 0)); \
#define EXTRACT_IFMT_COPST_VARS \
/* Instruction fields. */ \
@@ -1174,13 +1113,13 @@ struct scache {
#define EXTRACT_IFMT_COPST_CODE \
length = 4; \
word_1 = GETIMEMUHI (current_cpu, pc + 2); \
- f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \
- f_ccc = (0|(EXTRACT_UINT (word_1, 16, 0, 8) << 0)); \
- f_op2 = EXTRACT_UINT (insn, 16, 4, 4); \
- f_op3 = EXTRACT_UINT (insn, 16, 8, 4); \
- f_CRj = (0|(EXTRACT_UINT (word_1, 16, 8, 4) << 0)); \
- f_u4c = EXTRACT_UINT (insn, 16, 12, 4); \
- f_Ric = (0|(EXTRACT_UINT (word_1, 16, 12, 16) << 0)); \
+ f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+ f_ccc = (0|(EXTRACT_MSB0_UINT (word_1, 16, 0, 8) << 0)); \
+ f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+ f_op3 = EXTRACT_MSB0_UINT (insn, 16, 8, 4); \
+ f_CRj = (0|(EXTRACT_MSB0_UINT (word_1, 16, 8, 4) << 0)); \
+ f_u4c = EXTRACT_MSB0_UINT (insn, 16, 12, 4); \
+ f_Ric = (0|(EXTRACT_MSB0_UINT (word_1, 16, 12, 16) << 0)); \
#define EXTRACT_IFMT_ADDSP_VARS \
/* Instruction fields. */ \
@@ -1190,9 +1129,9 @@ struct scache {
unsigned int length;
#define EXTRACT_IFMT_ADDSP_CODE \
length = 2; \
- f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \
- f_op2 = EXTRACT_UINT (insn, 16, 4, 4); \
- f_s10 = ((EXTRACT_INT (insn, 16, 8, 8)) << (2)); \
+ f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+ f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+ f_s10 = ((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (2)); \
#define EXTRACT_IFMT_LDM0_VARS \
/* Instruction fields. */ \
@@ -1202,9 +1141,9 @@ struct scache {
unsigned int length;
#define EXTRACT_IFMT_LDM0_CODE \
length = 2; \
- f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \
- f_op2 = EXTRACT_UINT (insn, 16, 4, 4); \
- f_reglist_low_ld = EXTRACT_UINT (insn, 16, 8, 8); \
+ f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+ f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+ f_reglist_low_ld = EXTRACT_MSB0_UINT (insn, 16, 8, 8); \
#define EXTRACT_IFMT_LDM1_VARS \
/* Instruction fields. */ \
@@ -1214,9 +1153,9 @@ struct scache {
unsigned int length;
#define EXTRACT_IFMT_LDM1_CODE \
length = 2; \
- f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \
- f_op2 = EXTRACT_UINT (insn, 16, 4, 4); \
- f_reglist_hi_ld = EXTRACT_UINT (insn, 16, 8, 8); \
+ f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+ f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+ f_reglist_hi_ld = EXTRACT_MSB0_UINT (insn, 16, 8, 8); \
#define EXTRACT_IFMT_STM0_VARS \
/* Instruction fields. */ \
@@ -1226,9 +1165,9 @@ struct scache {
unsigned int length;
#define EXTRACT_IFMT_STM0_CODE \
length = 2; \
- f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \
- f_op2 = EXTRACT_UINT (insn, 16, 4, 4); \
- f_reglist_low_st = EXTRACT_UINT (insn, 16, 8, 8); \
+ f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+ f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+ f_reglist_low_st = EXTRACT_MSB0_UINT (insn, 16, 8, 8); \
#define EXTRACT_IFMT_STM1_VARS \
/* Instruction fields. */ \
@@ -1238,9 +1177,9 @@ struct scache {
unsigned int length;
#define EXTRACT_IFMT_STM1_CODE \
length = 2; \
- f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \
- f_op2 = EXTRACT_UINT (insn, 16, 4, 4); \
- f_reglist_hi_st = EXTRACT_UINT (insn, 16, 8, 8); \
+ f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+ f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+ f_reglist_hi_st = EXTRACT_MSB0_UINT (insn, 16, 8, 8); \
#define EXTRACT_IFMT_ENTER_VARS \
/* Instruction fields. */ \
@@ -1250,9 +1189,9 @@ struct scache {
unsigned int length;
#define EXTRACT_IFMT_ENTER_CODE \
length = 2; \
- f_op1 = EXTRACT_UINT (insn, 16, 0, 4); \
- f_op2 = EXTRACT_UINT (insn, 16, 4, 4); \
- f_u10 = ((EXTRACT_UINT (insn, 16, 8, 8)) << (2)); \
+ f_op1 = EXTRACT_MSB0_UINT (insn, 16, 0, 4); \
+ f_op2 = EXTRACT_MSB0_UINT (insn, 16, 4, 4); \
+ f_u10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2)); \
/* Collection of various things for the trace handler to use. */
diff --git a/sim/fr30/decode.c b/sim/fr30/decode.c
index e41c45f53fa..ef87676bd45 100644
--- a/sim/fr30/decode.c
+++ b/sim/fr30/decode.c
@@ -323,12 +323,12 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
switch (val)
{
case 0 : itype = FR30BF_INSN_LDR13; goto extract_fmt_ldr13;
- case 1 : itype = FR30BF_INSN_LDR13UH; goto extract_fmt_ldr13uh;
- case 2 : itype = FR30BF_INSN_LDR13UB; goto extract_fmt_ldr13ub;
+ case 1 : itype = FR30BF_INSN_LDR13UH; goto extract_fmt_ldr13;
+ case 2 : itype = FR30BF_INSN_LDR13UB; goto extract_fmt_ldr13;
case 3 : itype = FR30BF_INSN_LDR15; goto extract_fmt_ldr15;
case 4 : itype = FR30BF_INSN_LD; goto extract_fmt_ld;
- case 5 : itype = FR30BF_INSN_LDUH; goto extract_fmt_lduh;
- case 6 : itype = FR30BF_INSN_LDUB; goto extract_fmt_ldub;
+ case 5 : itype = FR30BF_INSN_LDUH; goto extract_fmt_ld;
+ case 6 : itype = FR30BF_INSN_LDUB; goto extract_fmt_ld;
case 7 :
{
unsigned int val = (((insn >> 4) & (15 << 0)));
@@ -350,12 +350,12 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
case 14 : itype = FR30BF_INSN_DMOV2R13PIB; goto extract_fmt_dmov2r13pib;
case 15 : itype = FR30BF_INSN_ENTER; goto extract_fmt_enter;
case 16 : itype = FR30BF_INSN_STR13; goto extract_fmt_str13;
- case 17 : itype = FR30BF_INSN_STR13H; goto extract_fmt_str13h;
- case 18 : itype = FR30BF_INSN_STR13B; goto extract_fmt_str13b;
+ case 17 : itype = FR30BF_INSN_STR13H; goto extract_fmt_str13;
+ case 18 : itype = FR30BF_INSN_STR13B; goto extract_fmt_str13;
case 19 : itype = FR30BF_INSN_STR15; goto extract_fmt_str15;
case 20 : itype = FR30BF_INSN_ST; goto extract_fmt_st;
- case 21 : itype = FR30BF_INSN_STH; goto extract_fmt_sth;
- case 22 : itype = FR30BF_INSN_STB; goto extract_fmt_stb;
+ case 21 : itype = FR30BF_INSN_STH; goto extract_fmt_st;
+ case 22 : itype = FR30BF_INSN_STB; goto extract_fmt_st;
case 23 :
{
unsigned int val = (((insn >> 4) & (15 << 0)));
@@ -535,11 +535,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
case 7 : itype = FR30BF_INSN_DIV4S; goto extract_fmt_div4s;
case 8 : itype = FR30BF_INSN_LDI32; goto extract_fmt_ldi32;
case 9 : itype = FR30BF_INSN_LEAVE; goto extract_fmt_leave;
- case 10 : itype = FR30BF_INSN_NOP; goto extract_fmt_nop;
+ case 10 : itype = FR30BF_INSN_NOP; goto extract_fmt_bnod;
case 12 : itype = FR30BF_INSN_COPOP; goto extract_fmt_copop;
- case 13 : itype = FR30BF_INSN_COPLD; goto extract_fmt_copld;
- case 14 : itype = FR30BF_INSN_COPST; goto extract_fmt_copst;
- case 15 : itype = FR30BF_INSN_COPSV; goto extract_fmt_copst;
+ case 13 : itype = FR30BF_INSN_COPLD; goto extract_fmt_copop;
+ case 14 : itype = FR30BF_INSN_COPST; goto extract_fmt_copop;
+ case 15 : itype = FR30BF_INSN_COPSV; goto extract_fmt_copop;
default : itype = FR30BF_INSN_X_INVALID; goto extract_fmt_empty;
}
}
@@ -650,9 +650,7 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_empty.f
- EXTRACT_IFMT_EMPTY_VARS /* */
- EXTRACT_IFMT_EMPTY_CODE
/* Record the fields for the semantic handler. */
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "fmt_empty", (char *) 0));
@@ -666,9 +664,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_add.f
- EXTRACT_IFMT_ADD_VARS /* f-op1 f-op2 f-Rj f-Ri */
+ UINT f_Rj;
+ UINT f_Ri;
- EXTRACT_IFMT_ADD_CODE
+ f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (i_Ri) = & CPU (h_gr)[f_Ri];
@@ -693,9 +693,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_addi.f
- EXTRACT_IFMT_ADDI_VARS /* f-op1 f-op2 f-u4 f-Ri */
+ UINT f_u4;
+ UINT f_Ri;
- EXTRACT_IFMT_ADDI_CODE
+ f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (f_u4) = f_u4;
@@ -719,9 +721,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_add2.f
- EXTRACT_IFMT_ADD2_VARS /* f-op1 f-op2 f-m4 f-Ri */
+ SI f_m4;
+ UINT f_Ri;
- EXTRACT_IFMT_ADD2_CODE
+ f_m4 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 4)) | (((-1) << (4))));
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (f_m4) = f_m4;
@@ -745,9 +749,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_addc.f
- EXTRACT_IFMT_ADD_VARS /* f-op1 f-op2 f-Rj f-Ri */
+ UINT f_Rj;
+ UINT f_Ri;
- EXTRACT_IFMT_ADD_CODE
+ f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (i_Ri) = & CPU (h_gr)[f_Ri];
@@ -772,9 +778,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_addn.f
- EXTRACT_IFMT_ADD_VARS /* f-op1 f-op2 f-Rj f-Ri */
+ UINT f_Rj;
+ UINT f_Ri;
- EXTRACT_IFMT_ADD_CODE
+ f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (i_Ri) = & CPU (h_gr)[f_Ri];
@@ -799,9 +807,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_addni.f
- EXTRACT_IFMT_ADDI_VARS /* f-op1 f-op2 f-u4 f-Ri */
+ UINT f_u4;
+ UINT f_Ri;
- EXTRACT_IFMT_ADDI_CODE
+ f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (f_u4) = f_u4;
@@ -825,9 +835,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_addn2.f
- EXTRACT_IFMT_ADD2_VARS /* f-op1 f-op2 f-m4 f-Ri */
+ SI f_m4;
+ UINT f_Ri;
- EXTRACT_IFMT_ADD2_CODE
+ f_m4 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 4)) | (((-1) << (4))));
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (f_m4) = f_m4;
@@ -851,9 +863,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_cmp.f
- EXTRACT_IFMT_ADD_VARS /* f-op1 f-op2 f-Rj f-Ri */
+ UINT f_Rj;
+ UINT f_Ri;
- EXTRACT_IFMT_ADD_CODE
+ f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (i_Ri) = & CPU (h_gr)[f_Ri];
@@ -877,9 +891,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_cmpi.f
- EXTRACT_IFMT_ADDI_VARS /* f-op1 f-op2 f-u4 f-Ri */
+ UINT f_u4;
+ UINT f_Ri;
- EXTRACT_IFMT_ADDI_CODE
+ f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (f_u4) = f_u4;
@@ -902,9 +918,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_cmp2.f
- EXTRACT_IFMT_ADD2_VARS /* f-op1 f-op2 f-m4 f-Ri */
+ SI f_m4;
+ UINT f_Ri;
- EXTRACT_IFMT_ADD2_CODE
+ f_m4 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 4)) | (((-1) << (4))));
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (f_m4) = f_m4;
@@ -927,9 +945,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_and.f
- EXTRACT_IFMT_ADD_VARS /* f-op1 f-op2 f-Rj f-Ri */
+ UINT f_Rj;
+ UINT f_Ri;
- EXTRACT_IFMT_ADD_CODE
+ f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (i_Ri) = & CPU (h_gr)[f_Ri];
@@ -954,9 +974,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_andm.f
- EXTRACT_IFMT_ADD_VARS /* f-op1 f-op2 f-Rj f-Ri */
+ UINT f_Rj;
+ UINT f_Ri;
- EXTRACT_IFMT_ADD_CODE
+ f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (i_Ri) = & CPU (h_gr)[f_Ri];
@@ -980,9 +1002,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_andh.f
- EXTRACT_IFMT_ADD_VARS /* f-op1 f-op2 f-Rj f-Ri */
+ UINT f_Rj;
+ UINT f_Ri;
- EXTRACT_IFMT_ADD_CODE
+ f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (i_Ri) = & CPU (h_gr)[f_Ri];
@@ -1006,9 +1030,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_andb.f
- EXTRACT_IFMT_ADD_VARS /* f-op1 f-op2 f-Rj f-Ri */
+ UINT f_Rj;
+ UINT f_Ri;
- EXTRACT_IFMT_ADD_CODE
+ f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (i_Ri) = & CPU (h_gr)[f_Ri];
@@ -1032,9 +1058,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_bandl.f
- EXTRACT_IFMT_ADDI_VARS /* f-op1 f-op2 f-u4 f-Ri */
+ UINT f_u4;
+ UINT f_Ri;
- EXTRACT_IFMT_ADDI_CODE
+ f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (f_u4) = f_u4;
@@ -1057,9 +1085,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_btstl.f
- EXTRACT_IFMT_ADDI_VARS /* f-op1 f-op2 f-u4 f-Ri */
+ UINT f_u4;
+ UINT f_Ri;
- EXTRACT_IFMT_ADDI_CODE
+ f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (f_u4) = f_u4;
@@ -1082,9 +1112,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_mul.f
- EXTRACT_IFMT_ADD_VARS /* f-op1 f-op2 f-Rj f-Ri */
+ UINT f_Rj;
+ UINT f_Ri;
- EXTRACT_IFMT_ADD_CODE
+ f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (i_Ri) = & CPU (h_gr)[f_Ri];
@@ -1108,9 +1140,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_mulu.f
- EXTRACT_IFMT_ADD_VARS /* f-op1 f-op2 f-Rj f-Ri */
+ UINT f_Rj;
+ UINT f_Ri;
- EXTRACT_IFMT_ADD_CODE
+ f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (i_Ri) = & CPU (h_gr)[f_Ri];
@@ -1134,9 +1168,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_mulh.f
- EXTRACT_IFMT_ADD_VARS /* f-op1 f-op2 f-Rj f-Ri */
+ UINT f_Rj;
+ UINT f_Ri;
- EXTRACT_IFMT_ADD_CODE
+ f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (i_Ri) = & CPU (h_gr)[f_Ri];
@@ -1160,9 +1196,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_div0s.f
- EXTRACT_IFMT_DIV0S_VARS /* f-op1 f-op2 f-op3 f-Ri */
+ UINT f_Ri;
- EXTRACT_IFMT_DIV0S_CODE
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (i_Ri) = & CPU (h_gr)[f_Ri];
@@ -1184,9 +1220,7 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_div0u.f
- EXTRACT_IFMT_DIV0S_VARS /* f-op1 f-op2 f-op3 f-Ri */
- EXTRACT_IFMT_DIV0S_CODE
/* Record the fields for the semantic handler. */
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "fmt_div0u", (char *) 0));
@@ -1200,9 +1234,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_div1.f
- EXTRACT_IFMT_DIV0S_VARS /* f-op1 f-op2 f-op3 f-Ri */
+ UINT f_Ri;
- EXTRACT_IFMT_DIV0S_CODE
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (i_Ri) = & CPU (h_gr)[f_Ri];
@@ -1224,9 +1258,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_div2.f
- EXTRACT_IFMT_DIV0S_VARS /* f-op1 f-op2 f-op3 f-Ri */
+ UINT f_Ri;
- EXTRACT_IFMT_DIV0S_CODE
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (i_Ri) = & CPU (h_gr)[f_Ri];
@@ -1248,9 +1282,7 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_div3.f
- EXTRACT_IFMT_DIV3_VARS /* f-op1 f-op2 f-op3 f-op4 */
- EXTRACT_IFMT_DIV3_CODE
/* Record the fields for the semantic handler. */
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "fmt_div3", (char *) 0));
@@ -1264,9 +1296,7 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_div4s.f
- EXTRACT_IFMT_DIV3_VARS /* f-op1 f-op2 f-op3 f-op4 */
- EXTRACT_IFMT_DIV3_CODE
/* Record the fields for the semantic handler. */
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "fmt_div4s", (char *) 0));
@@ -1280,9 +1310,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_lsl.f
- EXTRACT_IFMT_ADD_VARS /* f-op1 f-op2 f-Rj f-Ri */
+ UINT f_Rj;
+ UINT f_Ri;
- EXTRACT_IFMT_ADD_CODE
+ f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (i_Ri) = & CPU (h_gr)[f_Ri];
@@ -1307,9 +1339,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_lsli.f
- EXTRACT_IFMT_ADDI_VARS /* f-op1 f-op2 f-u4 f-Ri */
+ UINT f_u4;
+ UINT f_Ri;
- EXTRACT_IFMT_ADDI_CODE
+ f_u4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (f_u4) = f_u4;
@@ -1333,9 +1367,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_ldi8.f
- EXTRACT_IFMT_LDI8_VARS /* f-op1 f-i8 f-Ri */
+ UINT f_i8;
+ UINT f_Ri;
- EXTRACT_IFMT_LDI8_CODE
+ f_i8 = EXTRACT_MSB0_UINT (insn, 16, 4, 8);
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (f_i8) = f_i8;
@@ -1358,9 +1394,20 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_ldi20.f
- EXTRACT_IFMT_LDI20_VARS /* f-op1 f-i20 f-op2 f-Ri */
-
- EXTRACT_IFMT_LDI20_CODE
+ UINT f_i20_16;
+ UINT f_i20_4;
+ UINT f_Ri;
+ UINT f_i20;
+ /* Contents of trailing part of insn. */
+ UINT word_1;
+
+ word_1 = GETIMEMUHI (current_cpu, pc + 2);
+ f_i20_16 = (0|(EXTRACT_MSB0_UINT (word_1, 16, 0, 16) << 0));
+ f_i20_4 = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
+{
+ f_i20 = ((((f_i20_4) << (16))) | (f_i20_16));
+}
/* Record the fields for the semantic handler. */
FLD (f_i20) = f_i20;
@@ -1383,9 +1430,16 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_ldi32.f
- EXTRACT_IFMT_LDI32_VARS /* f-op1 f-i32 f-op2 f-op3 f-Ri */
+ UINT f_i32;
+ UINT f_Ri;
+ /* Contents of trailing part of insn. */
+ UINT word_1;
+ UINT word_2;
- EXTRACT_IFMT_LDI32_CODE
+ word_1 = GETIMEMUHI (current_cpu, pc + 2);
+ word_2 = GETIMEMUHI (current_cpu, pc + 4);
+ f_i32 = (0|(EXTRACT_MSB0_UINT (word_2, 16, 0, 16) << 0)|(EXTRACT_MSB0_UINT (word_1, 16, 0, 16) << 16));
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (f_i32) = f_i32;
@@ -1408,9 +1462,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_ld.f
- EXTRACT_IFMT_ADD_VARS /* f-op1 f-op2 f-Rj f-Ri */
+ UINT f_Rj;
+ UINT f_Ri;
- EXTRACT_IFMT_ADD_CODE
+ f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (i_Rj) = & CPU (h_gr)[f_Rj];
@@ -1429,66 +1485,16 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
return idesc;
}
- extract_fmt_lduh:
- {
- const IDESC *idesc = &fr30bf_insn_data[itype];
- CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.fmt_lduh.f
- EXTRACT_IFMT_ADD_VARS /* f-op1 f-op2 f-Rj f-Ri */
-
- EXTRACT_IFMT_ADD_CODE
-
- /* Record the fields for the semantic handler. */
- FLD (i_Rj) = & CPU (h_gr)[f_Rj];
- FLD (i_Ri) = & CPU (h_gr)[f_Ri];
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "fmt_lduh", "Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
- /* Record the fields for profiling. */
- if (PROFILE_MODEL_P (current_cpu))
- {
- FLD (in_Rj) = f_Rj;
- FLD (out_Ri) = f_Ri;
- }
-#endif
-#undef FLD
- return idesc;
- }
-
- extract_fmt_ldub:
- {
- const IDESC *idesc = &fr30bf_insn_data[itype];
- CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.fmt_ldub.f
- EXTRACT_IFMT_ADD_VARS /* f-op1 f-op2 f-Rj f-Ri */
-
- EXTRACT_IFMT_ADD_CODE
-
- /* Record the fields for the semantic handler. */
- FLD (i_Rj) = & CPU (h_gr)[f_Rj];
- FLD (i_Ri) = & CPU (h_gr)[f_Ri];
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "fmt_ldub", "Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
- /* Record the fields for profiling. */
- if (PROFILE_MODEL_P (current_cpu))
- {
- FLD (in_Rj) = f_Rj;
- FLD (out_Ri) = f_Ri;
- }
-#endif
-#undef FLD
- return idesc;
- }
-
extract_fmt_ldr13:
{
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_ldr13.f
- EXTRACT_IFMT_ADD_VARS /* f-op1 f-op2 f-Rj f-Ri */
+ UINT f_Rj;
+ UINT f_Ri;
- EXTRACT_IFMT_ADD_CODE
+ f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (i_Rj) = & CPU (h_gr)[f_Rj];
@@ -1508,68 +1514,16 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
return idesc;
}
- extract_fmt_ldr13uh:
- {
- const IDESC *idesc = &fr30bf_insn_data[itype];
- CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.fmt_ldr13uh.f
- EXTRACT_IFMT_ADD_VARS /* f-op1 f-op2 f-Rj f-Ri */
-
- EXTRACT_IFMT_ADD_CODE
-
- /* Record the fields for the semantic handler. */
- FLD (i_Rj) = & CPU (h_gr)[f_Rj];
- FLD (i_Ri) = & CPU (h_gr)[f_Ri];
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "fmt_ldr13uh", "Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
- /* Record the fields for profiling. */
- if (PROFILE_MODEL_P (current_cpu))
- {
- FLD (in_Rj) = f_Rj;
- FLD (in_h_gr_13) = 13;
- FLD (out_Ri) = f_Ri;
- }
-#endif
-#undef FLD
- return idesc;
- }
-
- extract_fmt_ldr13ub:
- {
- const IDESC *idesc = &fr30bf_insn_data[itype];
- CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.fmt_ldr13ub.f
- EXTRACT_IFMT_ADD_VARS /* f-op1 f-op2 f-Rj f-Ri */
-
- EXTRACT_IFMT_ADD_CODE
-
- /* Record the fields for the semantic handler. */
- FLD (i_Rj) = & CPU (h_gr)[f_Rj];
- FLD (i_Ri) = & CPU (h_gr)[f_Ri];
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "fmt_ldr13ub", "Rj 0x%x", 'x', f_Rj, "Ri 0x%x", 'x', f_Ri, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
- /* Record the fields for profiling. */
- if (PROFILE_MODEL_P (current_cpu))
- {
- FLD (in_Rj) = f_Rj;
- FLD (in_h_gr_13) = 13;
- FLD (out_Ri) = f_Ri;
- }
-#endif
-#undef FLD
- return idesc;
- }
-
extract_fmt_ldr14:
{
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_ldr14.f
- EXTRACT_IFMT_LDR14_VARS /* f-op1 f-disp10 f-Ri */
+ SI f_disp10;
+ UINT f_Ri;
- EXTRACT_IFMT_LDR14_CODE
+ f_disp10 = ((EXTRACT_MSB0_INT (insn, 16, 4, 8)) << (2));
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (f_disp10) = f_disp10;
@@ -1593,9 +1547,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_ldr14uh.f
- EXTRACT_IFMT_LDR14UH_VARS /* f-op1 f-disp9 f-Ri */
+ SI f_disp9;
+ UINT f_Ri;
- EXTRACT_IFMT_LDR14UH_CODE
+ f_disp9 = ((EXTRACT_MSB0_INT (insn, 16, 4, 8)) << (1));
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (f_disp9) = f_disp9;
@@ -1619,9 +1575,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_ldr14ub.f
- EXTRACT_IFMT_LDR14UB_VARS /* f-op1 f-disp8 f-Ri */
+ INT f_disp8;
+ UINT f_Ri;
- EXTRACT_IFMT_LDR14UB_CODE
+ f_disp8 = EXTRACT_MSB0_INT (insn, 16, 4, 8);
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (f_disp8) = f_disp8;
@@ -1645,9 +1603,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_ldr15.f
- EXTRACT_IFMT_LDR15_VARS /* f-op1 f-op2 f-udisp6 f-Ri */
+ USI f_udisp6;
+ UINT f_Ri;
- EXTRACT_IFMT_LDR15_CODE
+ f_udisp6 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 4)) << (2));
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (f_udisp6) = f_udisp6;
@@ -1671,9 +1631,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_ldr15gr.f
- EXTRACT_IFMT_DIV0S_VARS /* f-op1 f-op2 f-op3 f-Ri */
+ UINT f_Ri;
- EXTRACT_IFMT_DIV0S_CODE
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (f_Ri) = f_Ri;
@@ -1698,9 +1658,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_ldr15dr.f
- EXTRACT_IFMT_LDR15DR_VARS /* f-op1 f-op2 f-op3 f-Rs2 */
+ UINT f_Rs2;
- EXTRACT_IFMT_LDR15DR_CODE
+ f_Rs2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (f_Rs2) = f_Rs2;
@@ -1723,9 +1683,7 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_ldr15ps.f
- EXTRACT_IFMT_DIV3_VARS /* f-op1 f-op2 f-op3 f-op4 */
- EXTRACT_IFMT_DIV3_CODE
/* Record the fields for the semantic handler. */
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "fmt_ldr15ps", (char *) 0));
@@ -1747,9 +1705,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_st.f
- EXTRACT_IFMT_ADD_VARS /* f-op1 f-op2 f-Rj f-Ri */
+ UINT f_Rj;
+ UINT f_Ri;
- EXTRACT_IFMT_ADD_CODE
+ f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (i_Ri) = & CPU (h_gr)[f_Ri];
@@ -1768,66 +1728,16 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
return idesc;
}
- extract_fmt_sth:
- {
- const IDESC *idesc = &fr30bf_insn_data[itype];
- CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.fmt_sth.f
- EXTRACT_IFMT_ADD_VARS /* f-op1 f-op2 f-Rj f-Ri */
-
- EXTRACT_IFMT_ADD_CODE
-
- /* Record the fields for the semantic handler. */
- FLD (i_Ri) = & CPU (h_gr)[f_Ri];
- FLD (i_Rj) = & CPU (h_gr)[f_Rj];
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "fmt_sth", "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
- /* Record the fields for profiling. */
- if (PROFILE_MODEL_P (current_cpu))
- {
- FLD (in_Ri) = f_Ri;
- FLD (in_Rj) = f_Rj;
- }
-#endif
-#undef FLD
- return idesc;
- }
-
- extract_fmt_stb:
- {
- const IDESC *idesc = &fr30bf_insn_data[itype];
- CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.fmt_stb.f
- EXTRACT_IFMT_ADD_VARS /* f-op1 f-op2 f-Rj f-Ri */
-
- EXTRACT_IFMT_ADD_CODE
-
- /* Record the fields for the semantic handler. */
- FLD (i_Ri) = & CPU (h_gr)[f_Ri];
- FLD (i_Rj) = & CPU (h_gr)[f_Rj];
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "fmt_stb", "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
- /* Record the fields for profiling. */
- if (PROFILE_MODEL_P (current_cpu))
- {
- FLD (in_Ri) = f_Ri;
- FLD (in_Rj) = f_Rj;
- }
-#endif
-#undef FLD
- return idesc;
- }
-
extract_fmt_str13:
{
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_str13.f
- EXTRACT_IFMT_ADD_VARS /* f-op1 f-op2 f-Rj f-Ri */
+ UINT f_Rj;
+ UINT f_Ri;
- EXTRACT_IFMT_ADD_CODE
+ f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (i_Ri) = & CPU (h_gr)[f_Ri];
@@ -1847,68 +1757,16 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
return idesc;
}
- extract_fmt_str13h:
- {
- const IDESC *idesc = &fr30bf_insn_data[itype];
- CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.fmt_str13h.f
- EXTRACT_IFMT_ADD_VARS /* f-op1 f-op2 f-Rj f-Ri */
-
- EXTRACT_IFMT_ADD_CODE
-
- /* Record the fields for the semantic handler. */
- FLD (i_Ri) = & CPU (h_gr)[f_Ri];
- FLD (i_Rj) = & CPU (h_gr)[f_Rj];
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "fmt_str13h", "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
- /* Record the fields for profiling. */
- if (PROFILE_MODEL_P (current_cpu))
- {
- FLD (in_Ri) = f_Ri;
- FLD (in_Rj) = f_Rj;
- FLD (in_h_gr_13) = 13;
- }
-#endif
-#undef FLD
- return idesc;
- }
-
- extract_fmt_str13b:
- {
- const IDESC *idesc = &fr30bf_insn_data[itype];
- CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.fmt_str13b.f
- EXTRACT_IFMT_ADD_VARS /* f-op1 f-op2 f-Rj f-Ri */
-
- EXTRACT_IFMT_ADD_CODE
-
- /* Record the fields for the semantic handler. */
- FLD (i_Ri) = & CPU (h_gr)[f_Ri];
- FLD (i_Rj) = & CPU (h_gr)[f_Rj];
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "fmt_str13b", "Ri 0x%x", 'x', f_Ri, "Rj 0x%x", 'x', f_Rj, (char *) 0));
-
-#if WITH_PROFILE_MODEL_P
- /* Record the fields for profiling. */
- if (PROFILE_MODEL_P (current_cpu))
- {
- FLD (in_Ri) = f_Ri;
- FLD (in_Rj) = f_Rj;
- FLD (in_h_gr_13) = 13;
- }
-#endif
-#undef FLD
- return idesc;
- }
-
extract_fmt_str14:
{
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_str14.f
- EXTRACT_IFMT_LDR14_VARS /* f-op1 f-disp10 f-Ri */
+ SI f_disp10;
+ UINT f_Ri;
- EXTRACT_IFMT_LDR14_CODE
+ f_disp10 = ((EXTRACT_MSB0_INT (insn, 16, 4, 8)) << (2));
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (f_disp10) = f_disp10;
@@ -1932,9 +1790,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_str14h.f
- EXTRACT_IFMT_LDR14UH_VARS /* f-op1 f-disp9 f-Ri */
+ SI f_disp9;
+ UINT f_Ri;
- EXTRACT_IFMT_LDR14UH_CODE
+ f_disp9 = ((EXTRACT_MSB0_INT (insn, 16, 4, 8)) << (1));
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (f_disp9) = f_disp9;
@@ -1958,9 +1818,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_str14b.f
- EXTRACT_IFMT_LDR14UB_VARS /* f-op1 f-disp8 f-Ri */
+ INT f_disp8;
+ UINT f_Ri;
- EXTRACT_IFMT_LDR14UB_CODE
+ f_disp8 = EXTRACT_MSB0_INT (insn, 16, 4, 8);
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (f_disp8) = f_disp8;
@@ -1984,9 +1846,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_str15.f
- EXTRACT_IFMT_LDR15_VARS /* f-op1 f-op2 f-udisp6 f-Ri */
+ USI f_udisp6;
+ UINT f_Ri;
- EXTRACT_IFMT_LDR15_CODE
+ f_udisp6 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 4)) << (2));
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (f_udisp6) = f_udisp6;
@@ -2010,9 +1874,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_str15gr.f
- EXTRACT_IFMT_DIV0S_VARS /* f-op1 f-op2 f-op3 f-Ri */
+ UINT f_Ri;
- EXTRACT_IFMT_DIV0S_CODE
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (i_Ri) = & CPU (h_gr)[f_Ri];
@@ -2036,9 +1900,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_str15dr.f
- EXTRACT_IFMT_LDR15DR_VARS /* f-op1 f-op2 f-op3 f-Rs2 */
+ UINT f_Rs2;
- EXTRACT_IFMT_LDR15DR_CODE
+ f_Rs2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (f_Rs2) = f_Rs2;
@@ -2061,9 +1925,7 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_str15ps.f
- EXTRACT_IFMT_DIV3_VARS /* f-op1 f-op2 f-op3 f-op4 */
- EXTRACT_IFMT_DIV3_CODE
/* Record the fields for the semantic handler. */
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "fmt_str15ps", (char *) 0));
@@ -2085,9 +1947,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_mov.f
- EXTRACT_IFMT_ADD_VARS /* f-op1 f-op2 f-Rj f-Ri */
+ UINT f_Rj;
+ UINT f_Ri;
- EXTRACT_IFMT_ADD_CODE
+ f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (i_Rj) = & CPU (h_gr)[f_Rj];
@@ -2111,9 +1975,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_movdr.f
- EXTRACT_IFMT_MOVDR_VARS /* f-op1 f-op2 f-Rs1 f-Ri */
+ UINT f_Rs1;
+ UINT f_Ri;
- EXTRACT_IFMT_MOVDR_CODE
+ f_Rs1 = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (f_Rs1) = f_Rs1;
@@ -2136,9 +2002,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_movps.f
- EXTRACT_IFMT_DIV0S_VARS /* f-op1 f-op2 f-op3 f-Ri */
+ UINT f_Ri;
- EXTRACT_IFMT_DIV0S_CODE
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (i_Ri) = & CPU (h_gr)[f_Ri];
@@ -2160,9 +2026,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_mov2dr.f
- EXTRACT_IFMT_MOVDR_VARS /* f-op1 f-op2 f-Rs1 f-Ri */
+ UINT f_Rs1;
+ UINT f_Ri;
- EXTRACT_IFMT_MOVDR_CODE
+ f_Rs1 = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (f_Rs1) = f_Rs1;
@@ -2185,9 +2053,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_mov2ps.f
- EXTRACT_IFMT_DIV0S_VARS /* f-op1 f-op2 f-op3 f-Ri */
+ UINT f_Ri;
- EXTRACT_IFMT_DIV0S_CODE
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (i_Ri) = & CPU (h_gr)[f_Ri];
@@ -2209,9 +2077,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.cti.fields.fmt_jmp.f
- EXTRACT_IFMT_DIV0S_VARS /* f-op1 f-op2 f-op3 f-Ri */
+ UINT f_Ri;
- EXTRACT_IFMT_DIV0S_CODE
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (i_Ri) = & CPU (h_gr)[f_Ri];
@@ -2234,9 +2102,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.cti.fields.fmt_callr.f
- EXTRACT_IFMT_DIV0S_VARS /* f-op1 f-op2 f-op3 f-Ri */
+ UINT f_Ri;
- EXTRACT_IFMT_DIV0S_CODE
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (i_Ri) = & CPU (h_gr)[f_Ri];
@@ -2259,9 +2127,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.cti.fields.fmt_call.f
- EXTRACT_IFMT_CALL_VARS /* f-op1 f-op5 f-rel12 */
+ SI f_rel12;
- EXTRACT_IFMT_CALL_CODE
+ f_rel12 = ((((EXTRACT_MSB0_INT (insn, 16, 5, 11)) << (1))) + (((pc) + (2))));
/* Record the fields for the semantic handler. */
FLD (i_label12) = f_rel12;
@@ -2283,9 +2151,7 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.cti.fields.fmt_ret.f
- EXTRACT_IFMT_DIV3_VARS /* f-op1 f-op2 f-op3 f-op4 */
- EXTRACT_IFMT_DIV3_CODE
/* Record the fields for the semantic handler. */
SEM_BRANCH_INIT_EXTRACT (abuf);
@@ -2306,9 +2172,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.cti.fields.fmt_int.f
- EXTRACT_IFMT_INT_VARS /* f-op1 f-op2 f-u8 */
+ UINT f_u8;
- EXTRACT_IFMT_INT_CODE
+ f_u8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
/* Record the fields for the semantic handler. */
FLD (f_u8) = f_u8;
@@ -2330,9 +2196,7 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.cti.fields.fmt_inte.f
- EXTRACT_IFMT_DIV3_VARS /* f-op1 f-op2 f-op3 f-op4 */
- EXTRACT_IFMT_DIV3_CODE
/* Record the fields for the semantic handler. */
SEM_BRANCH_INIT_EXTRACT (abuf);
@@ -2353,9 +2217,7 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.cti.fields.fmt_reti.f
- EXTRACT_IFMT_DIV3_VARS /* f-op1 f-op2 f-op3 f-op4 */
- EXTRACT_IFMT_DIV3_CODE
/* Record the fields for the semantic handler. */
SEM_BRANCH_INIT_EXTRACT (abuf);
@@ -2376,9 +2238,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.cti.fields.fmt_brad.f
- EXTRACT_IFMT_BRAD_VARS /* f-op1 f-cc f-rel9 */
+ SI f_rel9;
- EXTRACT_IFMT_BRAD_CODE
+ f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2))));
/* Record the fields for the semantic handler. */
FLD (i_label9) = f_rel9;
@@ -2400,9 +2262,7 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_bnod.f
- EXTRACT_IFMT_BRAD_VARS /* f-op1 f-cc f-rel9 */
- EXTRACT_IFMT_BRAD_CODE
/* Record the fields for the semantic handler. */
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "fmt_bnod", (char *) 0));
@@ -2416,9 +2276,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.cti.fields.fmt_beqd.f
- EXTRACT_IFMT_BRAD_VARS /* f-op1 f-cc f-rel9 */
+ SI f_rel9;
- EXTRACT_IFMT_BRAD_CODE
+ f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2))));
/* Record the fields for the semantic handler. */
FLD (i_label9) = f_rel9;
@@ -2440,9 +2300,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.cti.fields.fmt_bcd.f
- EXTRACT_IFMT_BRAD_VARS /* f-op1 f-cc f-rel9 */
+ SI f_rel9;
- EXTRACT_IFMT_BRAD_CODE
+ f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2))));
/* Record the fields for the semantic handler. */
FLD (i_label9) = f_rel9;
@@ -2464,9 +2324,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.cti.fields.fmt_bnd.f
- EXTRACT_IFMT_BRAD_VARS /* f-op1 f-cc f-rel9 */
+ SI f_rel9;
- EXTRACT_IFMT_BRAD_CODE
+ f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2))));
/* Record the fields for the semantic handler. */
FLD (i_label9) = f_rel9;
@@ -2488,9 +2348,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.cti.fields.fmt_bvd.f
- EXTRACT_IFMT_BRAD_VARS /* f-op1 f-cc f-rel9 */
+ SI f_rel9;
- EXTRACT_IFMT_BRAD_CODE
+ f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2))));
/* Record the fields for the semantic handler. */
FLD (i_label9) = f_rel9;
@@ -2512,9 +2372,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.cti.fields.fmt_bltd.f
- EXTRACT_IFMT_BRAD_VARS /* f-op1 f-cc f-rel9 */
+ SI f_rel9;
- EXTRACT_IFMT_BRAD_CODE
+ f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2))));
/* Record the fields for the semantic handler. */
FLD (i_label9) = f_rel9;
@@ -2536,9 +2396,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.cti.fields.fmt_bled.f
- EXTRACT_IFMT_BRAD_VARS /* f-op1 f-cc f-rel9 */
+ SI f_rel9;
- EXTRACT_IFMT_BRAD_CODE
+ f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2))));
/* Record the fields for the semantic handler. */
FLD (i_label9) = f_rel9;
@@ -2560,9 +2420,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.cti.fields.fmt_blsd.f
- EXTRACT_IFMT_BRAD_VARS /* f-op1 f-cc f-rel9 */
+ SI f_rel9;
- EXTRACT_IFMT_BRAD_CODE
+ f_rel9 = ((((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (1))) + (((pc) + (2))));
/* Record the fields for the semantic handler. */
FLD (i_label9) = f_rel9;
@@ -2584,9 +2444,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_dmovr13.f
- EXTRACT_IFMT_DMOVR13_VARS /* f-op1 f-op2 f-dir10 */
+ USI f_dir10;
- EXTRACT_IFMT_DMOVR13_CODE
+ f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2));
/* Record the fields for the semantic handler. */
FLD (f_dir10) = f_dir10;
@@ -2608,9 +2468,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_dmovr13h.f
- EXTRACT_IFMT_DMOVR13H_VARS /* f-op1 f-op2 f-dir9 */
+ USI f_dir9;
- EXTRACT_IFMT_DMOVR13H_CODE
+ f_dir9 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (1));
/* Record the fields for the semantic handler. */
FLD (f_dir9) = f_dir9;
@@ -2632,9 +2492,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_dmovr13b.f
- EXTRACT_IFMT_DMOVR13B_VARS /* f-op1 f-op2 f-dir8 */
+ UINT f_dir8;
- EXTRACT_IFMT_DMOVR13B_CODE
+ f_dir8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
/* Record the fields for the semantic handler. */
FLD (f_dir8) = f_dir8;
@@ -2656,9 +2516,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_dmovr13pi.f
- EXTRACT_IFMT_DMOVR13_VARS /* f-op1 f-op2 f-dir10 */
+ USI f_dir10;
- EXTRACT_IFMT_DMOVR13_CODE
+ f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2));
/* Record the fields for the semantic handler. */
FLD (f_dir10) = f_dir10;
@@ -2681,9 +2541,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_dmovr13pih.f
- EXTRACT_IFMT_DMOVR13H_VARS /* f-op1 f-op2 f-dir9 */
+ USI f_dir9;
- EXTRACT_IFMT_DMOVR13H_CODE
+ f_dir9 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (1));
/* Record the fields for the semantic handler. */
FLD (f_dir9) = f_dir9;
@@ -2706,9 +2566,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_dmovr13pib.f
- EXTRACT_IFMT_DMOVR13B_VARS /* f-op1 f-op2 f-dir8 */
+ UINT f_dir8;
- EXTRACT_IFMT_DMOVR13B_CODE
+ f_dir8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
/* Record the fields for the semantic handler. */
FLD (f_dir8) = f_dir8;
@@ -2731,9 +2591,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_dmovr15pi.f
- EXTRACT_IFMT_DMOVR13_VARS /* f-op1 f-op2 f-dir10 */
+ USI f_dir10;
- EXTRACT_IFMT_DMOVR13_CODE
+ f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2));
/* Record the fields for the semantic handler. */
FLD (f_dir10) = f_dir10;
@@ -2756,9 +2616,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_dmov2r13.f
- EXTRACT_IFMT_DMOVR13_VARS /* f-op1 f-op2 f-dir10 */
+ USI f_dir10;
- EXTRACT_IFMT_DMOVR13_CODE
+ f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2));
/* Record the fields for the semantic handler. */
FLD (f_dir10) = f_dir10;
@@ -2780,9 +2640,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_dmov2r13h.f
- EXTRACT_IFMT_DMOVR13H_VARS /* f-op1 f-op2 f-dir9 */
+ USI f_dir9;
- EXTRACT_IFMT_DMOVR13H_CODE
+ f_dir9 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (1));
/* Record the fields for the semantic handler. */
FLD (f_dir9) = f_dir9;
@@ -2804,9 +2664,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_dmov2r13b.f
- EXTRACT_IFMT_DMOVR13B_VARS /* f-op1 f-op2 f-dir8 */
+ UINT f_dir8;
- EXTRACT_IFMT_DMOVR13B_CODE
+ f_dir8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
/* Record the fields for the semantic handler. */
FLD (f_dir8) = f_dir8;
@@ -2828,9 +2688,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_dmov2r13pi.f
- EXTRACT_IFMT_DMOVR13_VARS /* f-op1 f-op2 f-dir10 */
+ USI f_dir10;
- EXTRACT_IFMT_DMOVR13_CODE
+ f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2));
/* Record the fields for the semantic handler. */
FLD (f_dir10) = f_dir10;
@@ -2853,9 +2713,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_dmov2r13pih.f
- EXTRACT_IFMT_DMOVR13H_VARS /* f-op1 f-op2 f-dir9 */
+ USI f_dir9;
- EXTRACT_IFMT_DMOVR13H_CODE
+ f_dir9 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (1));
/* Record the fields for the semantic handler. */
FLD (f_dir9) = f_dir9;
@@ -2878,9 +2738,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_dmov2r13pib.f
- EXTRACT_IFMT_DMOVR13B_VARS /* f-op1 f-op2 f-dir8 */
+ UINT f_dir8;
- EXTRACT_IFMT_DMOVR13B_CODE
+ f_dir8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
/* Record the fields for the semantic handler. */
FLD (f_dir8) = f_dir8;
@@ -2903,9 +2763,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_dmov2r15pd.f
- EXTRACT_IFMT_DMOVR13_VARS /* f-op1 f-op2 f-dir10 */
+ USI f_dir10;
- EXTRACT_IFMT_DMOVR13_CODE
+ f_dir10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2));
/* Record the fields for the semantic handler. */
FLD (f_dir10) = f_dir10;
@@ -2928,9 +2788,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_ldres.f
- EXTRACT_IFMT_ADDI_VARS /* f-op1 f-op2 f-u4 f-Ri */
+ UINT f_Ri;
- EXTRACT_IFMT_ADDI_CODE
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (i_Ri) = & CPU (h_gr)[f_Ri];
@@ -2953,9 +2813,10 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_copop.f
- EXTRACT_IFMT_COPOP_VARS /* f-op1 f-ccc f-op2 f-op3 f-CRj f-u4c f-CRi */
+ /* Contents of trailing part of insn. */
+ UINT word_1;
- EXTRACT_IFMT_COPOP_CODE
+ word_1 = GETIMEMUHI (current_cpu, pc + 2);
/* Record the fields for the semantic handler. */
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "fmt_copop", (char *) 0));
@@ -2964,62 +2825,14 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
return idesc;
}
- extract_fmt_copld:
- {
- const IDESC *idesc = &fr30bf_insn_data[itype];
- CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.fmt_copld.f
- EXTRACT_IFMT_COPLD_VARS /* f-op1 f-ccc f-op2 f-op3 f-Rjc f-u4c f-CRi */
-
- EXTRACT_IFMT_COPLD_CODE
-
- /* Record the fields for the semantic handler. */
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "fmt_copld", (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_fmt_copst:
- {
- const IDESC *idesc = &fr30bf_insn_data[itype];
- CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.fmt_copst.f
- EXTRACT_IFMT_COPST_VARS /* f-op1 f-ccc f-op2 f-op3 f-CRj f-u4c f-Ric */
-
- EXTRACT_IFMT_COPST_CODE
-
- /* Record the fields for the semantic handler. */
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "fmt_copst", (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
- extract_fmt_nop:
- {
- const IDESC *idesc = &fr30bf_insn_data[itype];
- CGEN_INSN_INT insn = base_insn;
-#define FLD(f) abuf->fields.fmt_nop.f
- EXTRACT_IFMT_DIV3_VARS /* f-op1 f-op2 f-op3 f-op4 */
-
- EXTRACT_IFMT_DIV3_CODE
-
- /* Record the fields for the semantic handler. */
- TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "fmt_nop", (char *) 0));
-
-#undef FLD
- return idesc;
- }
-
extract_fmt_andccr:
{
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_andccr.f
- EXTRACT_IFMT_INT_VARS /* f-op1 f-op2 f-u8 */
+ UINT f_u8;
- EXTRACT_IFMT_INT_CODE
+ f_u8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
/* Record the fields for the semantic handler. */
FLD (f_u8) = f_u8;
@@ -3034,9 +2847,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_stilm.f
- EXTRACT_IFMT_INT_VARS /* f-op1 f-op2 f-u8 */
+ UINT f_u8;
- EXTRACT_IFMT_INT_CODE
+ f_u8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
/* Record the fields for the semantic handler. */
FLD (f_u8) = f_u8;
@@ -3051,9 +2864,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_addsp.f
- EXTRACT_IFMT_ADDSP_VARS /* f-op1 f-op2 f-s10 */
+ SI f_s10;
- EXTRACT_IFMT_ADDSP_CODE
+ f_s10 = ((EXTRACT_MSB0_INT (insn, 16, 8, 8)) << (2));
/* Record the fields for the semantic handler. */
FLD (f_s10) = f_s10;
@@ -3076,9 +2889,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_extsb.f
- EXTRACT_IFMT_DIV0S_VARS /* f-op1 f-op2 f-op3 f-Ri */
+ UINT f_Ri;
- EXTRACT_IFMT_DIV0S_CODE
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (i_Ri) = & CPU (h_gr)[f_Ri];
@@ -3101,9 +2914,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_extub.f
- EXTRACT_IFMT_DIV0S_VARS /* f-op1 f-op2 f-op3 f-Ri */
+ UINT f_Ri;
- EXTRACT_IFMT_DIV0S_CODE
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (i_Ri) = & CPU (h_gr)[f_Ri];
@@ -3126,9 +2939,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_extsh.f
- EXTRACT_IFMT_DIV0S_VARS /* f-op1 f-op2 f-op3 f-Ri */
+ UINT f_Ri;
- EXTRACT_IFMT_DIV0S_CODE
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (i_Ri) = & CPU (h_gr)[f_Ri];
@@ -3151,9 +2964,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_extuh.f
- EXTRACT_IFMT_DIV0S_VARS /* f-op1 f-op2 f-op3 f-Ri */
+ UINT f_Ri;
- EXTRACT_IFMT_DIV0S_CODE
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (i_Ri) = & CPU (h_gr)[f_Ri];
@@ -3176,9 +2989,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_ldm0.f
- EXTRACT_IFMT_LDM0_VARS /* f-op1 f-op2 f-reglist_low_ld */
+ UINT f_reglist_low_ld;
- EXTRACT_IFMT_LDM0_CODE
+ f_reglist_low_ld = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
/* Record the fields for the semantic handler. */
FLD (f_reglist_low_ld) = f_reglist_low_ld;
@@ -3209,9 +3022,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_ldm1.f
- EXTRACT_IFMT_LDM1_VARS /* f-op1 f-op2 f-reglist_hi_ld */
+ UINT f_reglist_hi_ld;
- EXTRACT_IFMT_LDM1_CODE
+ f_reglist_hi_ld = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
/* Record the fields for the semantic handler. */
FLD (f_reglist_hi_ld) = f_reglist_hi_ld;
@@ -3241,9 +3054,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_stm0.f
- EXTRACT_IFMT_STM0_VARS /* f-op1 f-op2 f-reglist_low_st */
+ UINT f_reglist_low_st;
- EXTRACT_IFMT_STM0_CODE
+ f_reglist_low_st = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
/* Record the fields for the semantic handler. */
FLD (f_reglist_low_st) = f_reglist_low_st;
@@ -3274,9 +3087,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_stm1.f
- EXTRACT_IFMT_STM1_VARS /* f-op1 f-op2 f-reglist_hi_st */
+ UINT f_reglist_hi_st;
- EXTRACT_IFMT_STM1_CODE
+ f_reglist_hi_st = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
/* Record the fields for the semantic handler. */
FLD (f_reglist_hi_st) = f_reglist_hi_st;
@@ -3306,9 +3119,9 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_enter.f
- EXTRACT_IFMT_ENTER_VARS /* f-op1 f-op2 f-u10 */
+ USI f_u10;
- EXTRACT_IFMT_ENTER_CODE
+ f_u10 = ((EXTRACT_MSB0_UINT (insn, 16, 8, 8)) << (2));
/* Record the fields for the semantic handler. */
FLD (f_u10) = f_u10;
@@ -3333,9 +3146,7 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_leave.f
- EXTRACT_IFMT_DIV3_VARS /* f-op1 f-op2 f-op3 f-op4 */
- EXTRACT_IFMT_DIV3_CODE
/* Record the fields for the semantic handler. */
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "fmt_leave", (char *) 0));
@@ -3359,9 +3170,11 @@ fr30bf_decode (SIM_CPU *current_cpu, IADDR pc,
const IDESC *idesc = &fr30bf_insn_data[itype];
CGEN_INSN_INT insn = base_insn;
#define FLD(f) abuf->fields.fmt_xchb.f
- EXTRACT_IFMT_ADD_VARS /* f-op1 f-op2 f-Rj f-Ri */
+ UINT f_Rj;
+ UINT f_Ri;
- EXTRACT_IFMT_ADD_CODE
+ f_Rj = EXTRACT_MSB0_UINT (insn, 16, 8, 4);
+ f_Ri = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
/* Record the fields for the semantic handler. */
FLD (i_Ri) = & CPU (h_gr)[f_Ri];
diff --git a/sim/fr30/model.c b/sim/fr30/model.c
index a4d0714cbe2..9dd6612d889 100644
--- a/sim/fr30/model.c
+++ b/sim/fr30/model.c
@@ -1594,7 +1594,7 @@ model_fr30_1_ld (SIM_CPU *current_cpu, void *sem_arg)
static int
model_fr30_1_lduh (SIM_CPU *current_cpu, void *sem_arg)
{
-#define FLD(f) abuf->fields.fmt_lduh.f
+#define FLD(f) abuf->fields.fmt_ld.f
const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
const IDESC * UNUSED idesc = abuf->idesc;
int cycles = 0;
@@ -1616,7 +1616,7 @@ model_fr30_1_lduh (SIM_CPU *current_cpu, void *sem_arg)
static int
model_fr30_1_ldub (SIM_CPU *current_cpu, void *sem_arg)
{
-#define FLD(f) abuf->fields.fmt_ldub.f
+#define FLD(f) abuf->fields.fmt_ld.f
const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
const IDESC * UNUSED idesc = abuf->idesc;
int cycles = 0;
@@ -1660,7 +1660,7 @@ model_fr30_1_ldr13 (SIM_CPU *current_cpu, void *sem_arg)
static int
model_fr30_1_ldr13uh (SIM_CPU *current_cpu, void *sem_arg)
{
-#define FLD(f) abuf->fields.fmt_ldr13uh.f
+#define FLD(f) abuf->fields.fmt_ldr13.f
const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
const IDESC * UNUSED idesc = abuf->idesc;
int cycles = 0;
@@ -1682,7 +1682,7 @@ model_fr30_1_ldr13uh (SIM_CPU *current_cpu, void *sem_arg)
static int
model_fr30_1_ldr13ub (SIM_CPU *current_cpu, void *sem_arg)
{
-#define FLD(f) abuf->fields.fmt_ldr13ub.f
+#define FLD(f) abuf->fields.fmt_ldr13.f
const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
const IDESC * UNUSED idesc = abuf->idesc;
int cycles = 0;
@@ -1862,7 +1862,7 @@ model_fr30_1_st (SIM_CPU *current_cpu, void *sem_arg)
static int
model_fr30_1_sth (SIM_CPU *current_cpu, void *sem_arg)
{
-#define FLD(f) abuf->fields.fmt_sth.f
+#define FLD(f) abuf->fields.fmt_st.f
const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
const IDESC * UNUSED idesc = abuf->idesc;
int cycles = 0;
@@ -1884,7 +1884,7 @@ model_fr30_1_sth (SIM_CPU *current_cpu, void *sem_arg)
static int
model_fr30_1_stb (SIM_CPU *current_cpu, void *sem_arg)
{
-#define FLD(f) abuf->fields.fmt_stb.f
+#define FLD(f) abuf->fields.fmt_st.f
const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
const IDESC * UNUSED idesc = abuf->idesc;
int cycles = 0;
@@ -1928,7 +1928,7 @@ model_fr30_1_str13 (SIM_CPU *current_cpu, void *sem_arg)
static int
model_fr30_1_str13h (SIM_CPU *current_cpu, void *sem_arg)
{
-#define FLD(f) abuf->fields.fmt_str13h.f
+#define FLD(f) abuf->fields.fmt_str13.f
const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
const IDESC * UNUSED idesc = abuf->idesc;
int cycles = 0;
@@ -1950,7 +1950,7 @@ model_fr30_1_str13h (SIM_CPU *current_cpu, void *sem_arg)
static int
model_fr30_1_str13b (SIM_CPU *current_cpu, void *sem_arg)
{
-#define FLD(f) abuf->fields.fmt_str13b.f
+#define FLD(f) abuf->fields.fmt_str13.f
const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
const IDESC * UNUSED idesc = abuf->idesc;
int cycles = 0;
@@ -3371,7 +3371,7 @@ model_fr30_1_copop (SIM_CPU *current_cpu, void *sem_arg)
static int
model_fr30_1_copld (SIM_CPU *current_cpu, void *sem_arg)
{
-#define FLD(f) abuf->fields.fmt_copld.f
+#define FLD(f) abuf->fields.fmt_copop.f
const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
const IDESC * UNUSED idesc = abuf->idesc;
int cycles = 0;
@@ -3390,7 +3390,7 @@ model_fr30_1_copld (SIM_CPU *current_cpu, void *sem_arg)
static int
model_fr30_1_copst (SIM_CPU *current_cpu, void *sem_arg)
{
-#define FLD(f) abuf->fields.fmt_copst.f
+#define FLD(f) abuf->fields.fmt_copop.f
const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
const IDESC * UNUSED idesc = abuf->idesc;
int cycles = 0;
@@ -3409,7 +3409,7 @@ model_fr30_1_copst (SIM_CPU *current_cpu, void *sem_arg)
static int
model_fr30_1_copsv (SIM_CPU *current_cpu, void *sem_arg)
{
-#define FLD(f) abuf->fields.fmt_copst.f
+#define FLD(f) abuf->fields.fmt_copop.f
const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
const IDESC * UNUSED idesc = abuf->idesc;
int cycles = 0;
@@ -3428,7 +3428,7 @@ model_fr30_1_copsv (SIM_CPU *current_cpu, void *sem_arg)
static int
model_fr30_1_nop (SIM_CPU *current_cpu, void *sem_arg)
{
-#define FLD(f) abuf->fields.fmt_nop.f
+#define FLD(f) abuf->fields.fmt_bnod.f
const ARGBUF * UNUSED abuf = SEM_ARGBUF ((SEM_ARG) sem_arg);
const IDESC * UNUSED idesc = abuf->idesc;
int cycles = 0;
diff --git a/sim/fr30/sem-switch.c b/sim/fr30/sem-switch.c
index ace4bcab907..2f8827e9045 100644
--- a/sim/fr30/sem-switch.c
+++ b/sim/fr30/sem-switch.c
@@ -2388,7 +2388,7 @@ if (NESI (tmp_shift, 0)) {
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_lduh.f
+#define FLD(f) abuf->fields.fmt_ld.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
@@ -2407,7 +2407,7 @@ if (NESI (tmp_shift, 0)) {
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_ldub.f
+#define FLD(f) abuf->fields.fmt_ld.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
@@ -2445,7 +2445,7 @@ if (NESI (tmp_shift, 0)) {
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_ldr13uh.f
+#define FLD(f) abuf->fields.fmt_ldr13.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
@@ -2464,7 +2464,7 @@ if (NESI (tmp_shift, 0)) {
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_ldr13ub.f
+#define FLD(f) abuf->fields.fmt_ldr13.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
@@ -2662,7 +2662,7 @@ if (NESI (FLD (f_Ri), 15)) {
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_sth.f
+#define FLD(f) abuf->fields.fmt_st.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
@@ -2681,7 +2681,7 @@ if (NESI (FLD (f_Ri), 15)) {
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_stb.f
+#define FLD(f) abuf->fields.fmt_st.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
@@ -2719,7 +2719,7 @@ if (NESI (FLD (f_Ri), 15)) {
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_str13h.f
+#define FLD(f) abuf->fields.fmt_str13.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
@@ -2738,7 +2738,7 @@ if (NESI (FLD (f_Ri), 15)) {
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_str13b.f
+#define FLD(f) abuf->fields.fmt_str13.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
@@ -4517,7 +4517,7 @@ do { } while (0); /*nop*/
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_copld.f
+#define FLD(f) abuf->fields.fmt_copop.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
@@ -4532,7 +4532,7 @@ do { } while (0); /*nop*/
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_copst.f
+#define FLD(f) abuf->fields.fmt_copop.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
@@ -4547,7 +4547,7 @@ do { } while (0); /*nop*/
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_copst.f
+#define FLD(f) abuf->fields.fmt_copop.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
@@ -4562,7 +4562,7 @@ do { } while (0); /*nop*/
{
SEM_ARG sem_arg = SEM_SEM_ARG (vpc, sc);
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
-#define FLD(f) abuf->fields.fmt_nop.f
+#define FLD(f) abuf->fields.fmt_bnod.f
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
vpc = SEM_NEXT_VPC (sem_arg, pc, 2);
diff --git a/sim/fr30/sem.c b/sim/fr30/sem.c
index e35c421654a..40c19366ef2 100644
--- a/sim/fr30/sem.c
+++ b/sim/fr30/sem.c
@@ -2287,7 +2287,7 @@ SEM_FN_NAME (fr30bf,ld) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
SEM_PC
SEM_FN_NAME (fr30bf,lduh) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_lduh.f
+#define FLD(f) abuf->fields.fmt_ld.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
@@ -2308,7 +2308,7 @@ SEM_FN_NAME (fr30bf,lduh) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
SEM_PC
SEM_FN_NAME (fr30bf,ldub) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_ldub.f
+#define FLD(f) abuf->fields.fmt_ld.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
@@ -2350,7 +2350,7 @@ SEM_FN_NAME (fr30bf,ldr13) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
SEM_PC
SEM_FN_NAME (fr30bf,ldr13uh) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_ldr13uh.f
+#define FLD(f) abuf->fields.fmt_ldr13.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
@@ -2371,7 +2371,7 @@ SEM_FN_NAME (fr30bf,ldr13uh) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
SEM_PC
SEM_FN_NAME (fr30bf,ldr13ub) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_ldr13ub.f
+#define FLD(f) abuf->fields.fmt_ldr13.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
@@ -2587,7 +2587,7 @@ SEM_FN_NAME (fr30bf,st) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
SEM_PC
SEM_FN_NAME (fr30bf,sth) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_sth.f
+#define FLD(f) abuf->fields.fmt_st.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
@@ -2608,7 +2608,7 @@ SEM_FN_NAME (fr30bf,sth) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
SEM_PC
SEM_FN_NAME (fr30bf,stb) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_stb.f
+#define FLD(f) abuf->fields.fmt_st.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
@@ -2650,7 +2650,7 @@ SEM_FN_NAME (fr30bf,str13) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
SEM_PC
SEM_FN_NAME (fr30bf,str13h) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_str13h.f
+#define FLD(f) abuf->fields.fmt_str13.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
@@ -2671,7 +2671,7 @@ SEM_FN_NAME (fr30bf,str13h) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
SEM_PC
SEM_FN_NAME (fr30bf,str13b) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_str13b.f
+#define FLD(f) abuf->fields.fmt_str13.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
@@ -4596,7 +4596,7 @@ do { } while (0); /*nop*/
SEM_PC
SEM_FN_NAME (fr30bf,copld) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_copld.f
+#define FLD(f) abuf->fields.fmt_copop.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
@@ -4613,7 +4613,7 @@ do { } while (0); /*nop*/
SEM_PC
SEM_FN_NAME (fr30bf,copst) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_copst.f
+#define FLD(f) abuf->fields.fmt_copop.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
@@ -4630,7 +4630,7 @@ do { } while (0); /*nop*/
SEM_PC
SEM_FN_NAME (fr30bf,copsv) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_copst.f
+#define FLD(f) abuf->fields.fmt_copop.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
@@ -4647,7 +4647,7 @@ do { } while (0); /*nop*/
SEM_PC
SEM_FN_NAME (fr30bf,nop) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
{
-#define FLD(f) abuf->fields.fmt_nop.f
+#define FLD(f) abuf->fields.fmt_bnod.f
ARGBUF *abuf = SEM_ARGBUF (sem_arg);
int UNUSED written = 0;
IADDR UNUSED pc = abuf->addr;
diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog
index e996d62b14b..04f0bc65218 100644
--- a/sim/mips/ChangeLog
+++ b/sim/mips/ChangeLog
@@ -1,3 +1,9 @@
+Wed Jul 7 12:45:58 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * mips.igen (MULT, MULTU): Add syntax for two operand version.
+ (DMFC0, DMTC0): Recognize. Call DecodeCoproc which will report
+ them as unimplemented.
+
1999-05-08 Felix Lee <flee@cygnus.com>
* configure: Regenerated to track ../common/aclocal.m4 changes.
diff --git a/sim/mips/configure b/sim/mips/configure
index b17aed47614..b58a9632d63 100755
--- a/sim/mips/configure
+++ b/sim/mips/configure
@@ -194,7 +194,6 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
-sitefile=
srcdir=
target=NONE
verbose=
@@ -309,7 +308,6 @@ Configuration:
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
- --site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
@@ -480,11 +478,6 @@ EOF
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
- -site-file | --site-file | --site-fil | --site-fi | --site-f)
- ac_prev=sitefile ;;
- -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
- sitefile="$ac_optarg" ;;
-
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@@ -650,16 +643,12 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
-if test -z "$sitefile"; then
- if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
-else
- CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
@@ -700,7 +689,7 @@ fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:704: checking how to run the C preprocessor" >&5
+echo "configure:693: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -715,13 +704,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 719 "configure"
+#line 708 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:714: \"$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
:
@@ -732,13 +721,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 736 "configure"
+#line 725 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:731: \"$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
:
@@ -749,13 +738,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 753 "configure"
+#line 742 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:759: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:748: \"$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
:
@@ -780,7 +769,7 @@ fi
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:784: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:773: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -807,7 +796,7 @@ else
fi
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:811: checking for POSIXized ISC" >&5
+echo "configure:800: checking for POSIXized ISC" >&5
if test -d /etc/conf/kconfig.d &&
grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
@@ -828,12 +817,12 @@ else
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:832: checking for ANSI C header files" >&5
+echo "configure:821: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 837 "configure"
+#line 826 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -841,7 +830,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:834: \"$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*
@@ -858,7 +847,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 862 "configure"
+#line 851 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -876,7 +865,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 880 "configure"
+#line 869 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -897,7 +886,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 901 "configure"
+#line 890 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -908,7 +897,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -932,12 +921,12 @@ EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:936: checking for working const" >&5
+echo "configure:925: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 941 "configure"
+#line 930 "configure"
#include "confdefs.h"
int main() {
@@ -986,7 +975,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -1007,21 +996,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1011: checking for inline" >&5
+echo "configure:1000: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 1018 "configure"
+#line 1007 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:1025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -1047,12 +1036,12 @@ EOF
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1051: checking for off_t" >&5
+echo "configure:1040: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1056 "configure"
+#line 1045 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1080,12 +1069,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1084: checking for size_t" >&5
+echo "configure:1073: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1089 "configure"
+#line 1078 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1115,19 +1104,19 @@ fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:1119: checking for working alloca.h" >&5
+echo "configure:1108: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1124 "configure"
+#line 1113 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:1131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@@ -1148,12 +1137,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1152: checking for alloca" >&5
+echo "configure:1141: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1157 "configure"
+#line 1146 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -1181,7 +1170,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:1185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -1213,12 +1202,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1217: checking whether alloca needs Cray hooks" >&5
+echo "configure:1206: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1222 "configure"
+#line 1211 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -1243,12 +1232,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1247: checking for $ac_func" >&5
+echo "configure:1236: 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 1252 "configure"
+#line 1241 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1271,7 +1260,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1264: \"$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
@@ -1298,7 +1287,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1302: checking stack direction for C alloca" >&5
+echo "configure:1291: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1306,7 +1295,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 1310 "configure"
+#line 1299 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -1325,7 +1314,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:1329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -1350,17 +1339,17 @@ for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1354: checking for $ac_hdr" >&5
+echo "configure:1343: 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 1359 "configure"
+#line 1348 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1353: \"$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*
@@ -1389,12 +1378,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1393: checking for $ac_func" >&5
+echo "configure:1382: 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 1398 "configure"
+#line 1387 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1417,7 +1406,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1410: \"$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
@@ -1442,7 +1431,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1446: checking for working mmap" >&5
+echo "configure:1435: 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
@@ -1450,7 +1439,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 1454 "configure"
+#line 1443 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -1590,7 +1579,7 @@ main()
}
EOF
-if { (eval echo configure:1594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1583: \"$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
@@ -1613,12 +1602,12 @@ EOF
fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1617: checking for Cygwin environment" >&5
+echo "configure:1606: 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 1622 "configure"
+#line 1611 "configure"
#include "confdefs.h"
int main() {
@@ -1629,7 +1618,7 @@ int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:1633: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
@@ -1646,19 +1635,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:1650: checking for mingw32 environment" >&5
+echo "configure:1639: 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 1655 "configure"
+#line 1644 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:1662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
@@ -1725,7 +1714,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1729: checking host system type" >&5
+echo "configure:1718: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -1746,7 +1735,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1750: checking target system type" >&5
+echo "configure:1739: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -1764,7 +1753,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1768: checking build system type" >&5
+echo "configure:1757: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -1808,7 +1797,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x,"
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1812: checking for $ac_word" >&5
+echo "configure:1801: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1838,7 +1827,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1842: checking for $ac_word" >&5
+echo "configure:1831: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1889,7 +1878,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1893: checking for $ac_word" >&5
+echo "configure:1882: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1921,7 +1910,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1925: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1914: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -1932,12 +1921,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 1936 "configure"
+#line 1925 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -1963,12 +1952,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1967: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1956: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1972: checking whether we are using GNU C" >&5
+echo "configure:1961: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1977,7 +1966,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1970: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -1996,7 +1985,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2000: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1989: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2039,7 +2028,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2043: checking for a BSD compatible install" >&5
+echo "configure:2032: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2107,7 +2096,7 @@ AR=${AR-ar}
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2111: checking for $ac_word" >&5
+echo "configure:2100: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2142,17 +2131,17 @@ unistd.h values.h sys/param.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2146: checking for $ac_hdr" >&5
+echo "configure:2135: 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 2151 "configure"
+#line 2140 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2145: \"$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*
@@ -2182,12 +2171,12 @@ done
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2186: checking for $ac_func" >&5
+echo "configure:2175: 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 2191 "configure"
+#line 2180 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2210,7 +2199,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2203: \"$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
@@ -2239,12 +2228,12 @@ done
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2243: checking for $ac_func" >&5
+echo "configure:2232: 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 2248 "configure"
+#line 2237 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2267,7 +2256,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2260: \"$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
@@ -2301,19 +2290,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2305: checking for LC_MESSAGES" >&5
+echo "configure:2294: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2310 "configure"
+#line 2299 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:2317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_val_LC_MESSAGES=yes
else
@@ -2334,7 +2323,7 @@ EOF
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2338: checking whether NLS is requested" >&5
+echo "configure:2327: checking whether NLS is requested" >&5
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
@@ -2354,7 +2343,7 @@ fi
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2358: checking whether included gettext is requested" >&5
+echo "configure:2347: checking whether included gettext is requested" >&5
# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
@@ -2373,17 +2362,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2377: checking for libintl.h" >&5
+echo "configure:2366: checking for libintl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2382 "configure"
+#line 2371 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2376: \"$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*
@@ -2400,19 +2389,19 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:2404: checking for gettext in libc" >&5
+echo "configure:2393: checking for gettext in libc" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2409 "configure"
+#line 2398 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:2416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libc=yes
else
@@ -2428,7 +2417,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
if test "$gt_cv_func_gettext_libc" != "yes"; then
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:2432: checking for bindtextdomain in -lintl" >&5
+echo "configure:2421: checking for bindtextdomain in -lintl" >&5
ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2436,7 +2425,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2440 "configure"
+#line 2429 "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
@@ -2447,7 +2436,7 @@ int main() {
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:2451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2440: \"$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
@@ -2463,19 +2452,19 @@ fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:2467: checking for gettext in libintl" >&5
+echo "configure:2456: checking for gettext in libintl" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2472 "configure"
+#line 2461 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:2479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libintl=yes
else
@@ -2503,7 +2492,7 @@ EOF
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2507: checking for $ac_word" >&5
+echo "configure:2496: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2537,12 +2526,12 @@ fi
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2541: checking for $ac_func" >&5
+echo "configure:2530: 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 2546 "configure"
+#line 2535 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2565,7 +2554,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2558: \"$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
@@ -2592,7 +2581,7 @@ done
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2596: checking for $ac_word" >&5
+echo "configure:2585: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2628,7 +2617,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2632: checking for $ac_word" >&5
+echo "configure:2621: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2660,7 +2649,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
-#line 2664 "configure"
+#line 2653 "configure"
#include "confdefs.h"
int main() {
@@ -2668,7 +2657,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:2672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
@@ -2700,7 +2689,7 @@ fi
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2704: checking for $ac_word" >&5
+echo "configure:2693: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2734,7 +2723,7 @@ fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2738: checking for $ac_word" >&5
+echo "configure:2727: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2770,7 +2759,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2774: checking for $ac_word" >&5
+echo "configure:2763: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2860,7 +2849,7 @@ fi
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2864: checking for catalogs to be installed" >&5
+echo "configure:2853: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
@@ -2888,17 +2877,17 @@ echo "configure:2864: checking for catalogs to be installed" >&5
if test "$CATOBJEXT" = ".cat"; then
ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:2892: checking for linux/version.h" >&5
+echo "configure:2881: checking for linux/version.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2897 "configure"
+#line 2886 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2891: \"$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*
@@ -2967,17 +2956,17 @@ for ac_hdr in stdlib.h string.h strings.h unistd.h time.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2971: checking for $ac_hdr" >&5
+echo "configure:2960: 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 2976 "configure"
+#line 2965 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2970: \"$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*
@@ -3007,17 +2996,17 @@ for ac_hdr in sys/time.h sys/resource.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3011: checking for $ac_hdr" >&5
+echo "configure:3000: 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 3016 "configure"
+#line 3005 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3010: \"$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*
@@ -3047,17 +3036,17 @@ for ac_hdr in fcntl.h fpu_control.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3051: checking for $ac_hdr" >&5
+echo "configure:3040: 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 3056 "configure"
+#line 3045 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3050: \"$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*
@@ -3087,17 +3076,17 @@ for ac_hdr in dlfcn.h errno.h sys/stat.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3091: checking for $ac_hdr" >&5
+echo "configure:3080: 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 3096 "configure"
+#line 3085 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3101: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3090: \"$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*
@@ -3126,12 +3115,12 @@ done
for ac_func in getrusage time sigaction __setfpucw
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3130: checking for $ac_func" >&5
+echo "configure:3119: 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 3135 "configure"
+#line 3124 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3154,7 +3143,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3147: \"$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
@@ -3181,7 +3170,7 @@ done
# Check for socket libraries
echo $ac_n "checking for bind in -lsocket""... $ac_c" 1>&6
-echo "configure:3185: checking for bind in -lsocket" >&5
+echo "configure:3174: checking for bind in -lsocket" >&5
ac_lib_var=`echo socket'_'bind | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3189,7 +3178,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3193 "configure"
+#line 3182 "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
@@ -3200,7 +3189,7 @@ int main() {
bind()
; return 0; }
EOF
-if { (eval echo configure:3204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3193: \"$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
@@ -3228,7 +3217,7 @@ else
fi
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:3232: checking for gethostbyname in -lnsl" >&5
+echo "configure:3221: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3236,7 +3225,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3240 "configure"
+#line 3229 "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
@@ -3247,7 +3236,7 @@ int main() {
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:3251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3240: \"$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
@@ -3423,12 +3412,12 @@ fi
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3427: checking return type of signal handlers" >&5
+echo "configure:3416: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3432 "configure"
+#line 3421 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -3445,7 +3434,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:3449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -3467,7 +3456,7 @@ EOF
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:3471: checking for executable suffix" >&5
+echo "configure:3460: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3477,10 +3466,10 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:3481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:3470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
- *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *.c | *.o | *.obj) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
@@ -3627,14 +3616,14 @@ else
if test "x$cross_compiling" = "xno"; then
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3631: checking whether byte ordering is bigendian" >&5
+echo "configure:3620: checking whether byte ordering is bigendian" >&5
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF
-#line 3638 "configure"
+#line 3627 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -3645,11 +3634,11 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:3649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
# It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <<EOF
-#line 3653 "configure"
+#line 3642 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -3660,7 +3649,7 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:3664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_bigendian=yes
else
@@ -3680,7 +3669,7 @@ if test "$cross_compiling" = yes; then
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3684 "configure"
+#line 3673 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
@@ -3693,7 +3682,7 @@ main () {
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
-if { (eval echo configure:3697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_bigendian=no
else
@@ -4108,7 +4097,7 @@ esac
# 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:4212: checking for X" >&5
+echo "configure:4207: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
@@ -4170,12 +4159,12 @@ if test "$ac_x_includes" = NO; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 4274 "configure"
+#line 4269 "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:4279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4274: \"$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*
@@ -4244,14 +4233,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 4348 "configure"
+#line 4343 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:4355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4350: \"$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.
@@ -4344,17 +4333,17 @@ for ac_hdr in string.h strings.h stdlib.h stdlib.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5242: checking for $ac_hdr" >&5
+echo "configure:5237: 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 5247 "configure"
+#line 5242 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5247: \"$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*
@@ -4381,7 +4370,7 @@ fi
done
echo $ac_n "checking for fabs in -lm""... $ac_c" 1>&6
-echo "configure:5279: checking for fabs in -lm" >&5
+echo "configure:5274: checking for fabs in -lm" >&5
ac_lib_var=`echo m'_'fabs | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4389,7 +4378,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5287 "configure"
+#line 5282 "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
@@ -4400,7 +4389,7 @@ int main() {
fabs()
; return 0; }
EOF
-if { (eval echo configure:5298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5293: \"$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
@@ -4430,12 +4419,12 @@ fi
for ac_func in aint anint sqrt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5328: checking for $ac_func" >&5
+echo "configure:5323: 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 5333 "configure"
+#line 5328 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4458,7 +4447,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5351: \"$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/sim/mips/mips.igen b/sim/mips/mips.igen
index 66c475a7e42..ad5700b34f1 100644
--- a/sim/mips/mips.igen
+++ b/sim/mips/mips.igen
@@ -1720,6 +1720,7 @@
000000,5.RS,5.RT,5.RD,00000011000:SPECIAL:32::MULT
+"mult r<RS>, r<RT>":RD == 0
"mult r<RD>, r<RS>, r<RT>"
*vr5000:
*r3900:
@@ -1751,6 +1752,7 @@
}
000000,5.RS,5.RT,5.RD,00000011001:SPECIAL:32::MULTU
+"multu r<RS>, r<RT>":RD == 0
"multu r<RD>, r<RS>, r<RT>"
*vr5000:
*r3900:
@@ -3795,6 +3797,22 @@
*vr5000:
+010000,00001,5.RT,5.RD,000,0000,0000:COP0:64::DMFC0
+"dmfc0 r<RT>, r<RD>"
+*mipsIII,mipsIV:
+{
+ DecodeCoproc (instruction_0);
+}
+
+
+010000,00101,5.RT,5.RD,000,0000,0000:COP0:64::DMTC0
+"dmtc0 r<RT>, r<RD>"
+*mipsIII,mipsIV:
+{
+ DecodeCoproc (instruction_0);
+}
+
+
010000,10000,000000000000000,111000:COP0:32::EI
"ei"
*mipsI,mipsII,mipsIII,mipsIV:
diff --git a/sim/mips/tx.igen b/sim/mips/tx.igen
index 1727eccb080..d38da01cc15 100644
--- a/sim/mips/tx.igen
+++ b/sim/mips/tx.igen
@@ -38,4 +38,9 @@
GPR[RD] = LO;
}
-
+000000,CODE.20,001110::CO1:::SDBBP
+"sdbbp"
+*r4900:
+{
+ SignalException (DebugBreakPoint, instruction);
+}