+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
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
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
Altos 3068 m68*-altos-*
Convex c1-*-*, c2-*-*
+Pyramid pyramid-*-*
*** Changes in GDB-4.18:
TYPE_LENGTH (TYPE)); \
}
\f
+/* *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.
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 ();
a29k_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
\f
/* Call function stuff. */
-
+/* *INDENT-OFF* */
/* The dummy frame looks like this (see also the general frame picture
above):
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* */
\f
/* Rsize for dummy frame, in bytes. */
{ asm ("subil $8,28(sp)"); \
asm ("movem (sp),$ 0xffff"); \
asm ("rte"); }
-
-#endif
-# 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
-# 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
-/* 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])
-
-\f
-/* 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; \
-}
-\f
-/* 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 \f */
+/* 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 \f */
+/* 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."); } */
-/* 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 */
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 ;;
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 ;;
# 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 ;;
gdb_target=ppcle-eabi
fi ;;
-pyramid-*-*) gdb_target=pyramid ;;
+# OBSOLETE pyramid-*-*) gdb_target=pyramid ;;
rs6000-*-lynxos*) gdb_target=rs6000lynx ;;
rs6000-*-aix4*) gdb_target=aix4 ;;
+/* *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.
#endif
#endif /* #ifndef DEFS_H */
+/* *INDENT-ON* */
}
}
+/* *INDENT-OFF* */
/*
LOCAL FUNCTION
where the actual definition occurs, rather than just a reference
to an external.
*/
+/* *INDENT-ON* */
static void
scan_partial_symbols (thisdie, enddie, objfile)
extern struct prompts the_prompts;
extern void (*call_readline) PARAMS ((void));
extern void (*input_handler) PARAMS ((char *));
+extern int input_fd;
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 */
\f
void
print_section_info (t, abfd)
{
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:
{
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
"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.",
#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__ */
+/* *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
+/* *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.
char **args;
{
char *p = NULL;
-
- if (p = strchr (*args, '&'))
+
+ p = strchr (*args, '&');
+
+ if (p)
{
if (p == (*args + strlen (*args) - 1))
{
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);
#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))
}
+/* *INDENT-OFF* */
/* Names of IDT R3041 registers. */
char *mips_r3041_reg_names[] = {
{ "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 };
}
-
+/* *INDENT-OFF* */
/* The main purpose of this file is dealing with prologues to extract
information about stack frames and saved registers.
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
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;
-/* 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");
- }
-}
-\f
-/*** 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"
-
-\f
-/* 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])
-\f
-/* 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 \f */
+/* 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 \f */
+/* 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 \f */
+/* 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 } */
-/* 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"
-
-\f
-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);
- }
- }
-}
-\f
-/*** 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 */
-
-\f
-/* 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 \f */
+/* 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 \f */
+/* 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 \f */
+/* 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 } */
extern struct target_ops pmon_ops;
extern struct target_ops ddb_ops;
\f
+/* *INDENT-OFF* */
/* The MIPS remote debugging interface is built on top of a simple
packet protocol. Each packet is organized as follows:
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'
^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);
}
^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);
}
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;
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++)
{
{
immediate_quit = 0;
if (remote_debug)
- printf_unfiltered ("\": OK\n");
+ fprintf_unfiltered (gdb_stdlog, "\": OK\n");
return 1;
}
}
/* 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
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 ();
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;
/* 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,
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. */
/* 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;
}
/* 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;
}
/* 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;
}
/* 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;
}
/* 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.
#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"
int c = SERIAL_READCHAR (io, timeout);
if (remote_debug)
- printf ("[%02x]\n", c);
+ fprintf_unfiltered (gdb_stdlog, "[%02x]\n", c);
if (c == SERIAL_TIMEOUT)
{
char val;
{
if (remote_debug)
- printf ("(%02x)\n", val);
+ fprintf_unfiltered (gdb_stdlog, "(%02x)\n", val);
SERIAL_WRITE (io, &val, 1);
}
b[3] = val >> 24;
if (remote_debug)
- printf ("(%04x)", val);
+ fprintf_unfiltered (gdb_stdlog, "(%04x)", val);
SERIAL_WRITE (io, b, 4);
}
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)
{
int resval = SERIAL_READCHAR (io, 1);
if (remote_debug)
- printf_unfiltered ("[%02x]\n", resval);
+ fprintf_unfiltered (gdb_stdlog, "[%02x]\n", resval);
switch (resval)
{
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);
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]);
}
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)
{
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;
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");
{
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;
{
*bp = '\000';
if (remote_debug)
- fprintf_unfiltered (gdb_stderr, "Received encoded: \"%s\"\n",
+ fprintf_unfiltered (gdb_stdlog, "Received encoded: \"%s\"\n",
buf);
return 1;
}
error ("Watchdog has expired. Target detached.\n");
}
if (remote_debug)
- puts_filtered ("Timed out.\n");
+ fputs_filtered ("Timed out.\n", gdb_stdlog);
goto retry;
}
}
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 == '+')
{
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? */
/* 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.
#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 */
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. */
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 */
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'.
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)
{
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>
So
"0* " means the same as "0000". */
+/* *INDENT-ON* */
#include "defs.h"
#include "gdb_string.h"
#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>
/* 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.
#include <netinet/tcp.h>
#endif
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
-
#include "signals.h"
#include "gdb_string.h"
/* 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.
#include <unistd.h>
#endif
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
-
#ifdef HAVE_TERMIOS
struct hardwire_ttystate
/* 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",
"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;
\f
#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
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
/* 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.
#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>
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
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)
\f
/* 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;
/* 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 *
+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
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 \
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'"
}
}
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
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
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)"
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\\\]"
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.
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
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;
{
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';
/* 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);
}
}
#endif
\f
+/* *INDENT-OFF* */
/* Linenos are processed on a file-by-file basis.
Two reasons:
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. */
c = SERIAL_READCHAR (desc, timeout);
if (remote_debug > 0)
- fputc_unfiltered (c, gdb_stderr);
+ fputc_unfiltered (c, gdb_stdlog);
if (c >= 0)
return c;
+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.
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)
{
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)
{
o->gtdf = gtdf;
o->gedf = gedf;
o->floatsisf = floatsisf;
+ o->floatsidf = floatsidf;
o->ufloatsisf = ufloatsisf;
o->fixsfsi = fixsfsi;
+ o->fixdfsi = fixdfsi;
o->ufixsfsi = ufixsfsi;
}
if (numfds <= 0)
return 0;
+ addrlen = sizeof (sockaddr);
sockser_fd = accept (sockser_listen_fd, &sockaddr, &addrlen);
if (sockser_fd < 0)
return 0;
/* 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
+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.
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;
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;
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;
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;
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;
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. */ \
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. */ \
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. */ \
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. */ \
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. */ \
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. */ \
#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. */ \
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. */ \
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. */ \
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. */ \
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. */ \
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. */ \
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. */ \
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. */ \
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. */ \
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. */ \
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. */ \
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. */ \
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. */ \
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. */ \
#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. */ \
#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. */ \
#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. */ \
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. */ \
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. */ \
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. */ \
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. */ \
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. */ \
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. */
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)));
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)));
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;
}
}
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));
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];
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;
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;
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];
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];
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;
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;
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];
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;
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;
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];
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];
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];
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];
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;
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;
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];
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];
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];
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];
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));
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];
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];
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));
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));
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];
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;
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;
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;
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;
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];
FLD (i_Ri) = & CPU (h_gr)[f_Ri];
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "fmt_ld", "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_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))
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];
FLD (i_Ri) = & CPU (h_gr)[f_Ri];
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "fmt_ldr13", "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_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))
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;
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;
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;
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;
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;
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;
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));
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];
FLD (i_Rj) = & CPU (h_gr)[f_Rj];
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "fmt_st", "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_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))
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];
FLD (i_Rj) = & CPU (h_gr)[f_Rj];
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "fmt_str13", "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_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))
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;
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;
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;
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;
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];
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;
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));
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];
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;
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];
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;
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];
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];
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];
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;
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);
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;
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);
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);
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;
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));
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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];
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));
-#undef FLD
- 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;
}
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;
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;
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;
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];
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];
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];
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];
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;
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;
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;
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;
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;
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));
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];
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
{
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);
{
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);
{
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);
{
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);
{
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);
{
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);
{
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);
{
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);
{
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);
{
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);
{
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);
{
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);
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
+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.
program_transform_name=s,x,x,
silent=
site=
-sitefile=
srcdir=
target=NONE
verbose=
--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
-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=*)
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
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=
# 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
:
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
:
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
:
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
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
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>
#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*
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
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
:
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')
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
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() {
; 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
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
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
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
# 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
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__
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
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
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. */
; 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
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
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 1310 "configure"
+#line 1299 "configure"
#include "confdefs.h"
find_stack_direction ()
{
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
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*
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. */
; 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
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
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.
}
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
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() {
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
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
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
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
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
# 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
# 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
# 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
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.
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
{ 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
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
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
# 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
# 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
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*
__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. */
; 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
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. */
; 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
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
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"
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"
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*
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
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
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
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
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
# 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
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. */
; 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
# 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
# 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
fi
cat > conftest.$ac_ext <<EOF
-#line 2664 "configure"
+#line 2653 "configure"
#include "confdefs.h"
int main() {
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
# 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
# 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
# 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
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
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*
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*
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*
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*
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*
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. */
; 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
# 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
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
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
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
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
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
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>
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
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
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
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>
#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>
#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
{ 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. */
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
# 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
# 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*
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.
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*
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
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
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
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. */
; 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
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:
}
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:
*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:
GPR[RD] = LO;
}
-
+000000,CODE.20,001110::CO1:::SDBBP
+"sdbbp"
+*r4900:
+{
+ SignalException (DebugBreakPoint, instruction);
+}