3 * interp.c (store_word, load_word): New static functions.
4 (mips16_entry): New static function.
5 (SignalException): Look for mips16 entry and exit instructions.
6 (simulate): Use the correct index when setting fpr_state after
11 * interp.c: Fix byte-swapping code throughout to work on
12 both little- and big-endian hosts.
16 * support.h: Make definitions of SIGTRAP and SIGQUIT consistent
17 with gdb/config/i386/xm-windows.h.
21 * gencode.c (build_instruction): Work around MSVC++ code gen bug
22 that messes up arithmetic shifts.
26 * support.h: Use _WIN32 instead of __WIN32__. Also add defs for
27 SIGTRAP and SIGQUIT for _WIN32.
31 * gencode.c (build_instruction) [MUL]: Cast operands to word64, to
32 force a 64 bit multiplication.
33 (build_instruction) [OR]: In mips16 mode, don't do anything if the
34 destination register is 0, since that is the default mips16 nop
39 * gencode.c (MIPS16_DECODE): SWRASP is I8, not RI.
40 (build_endian_shift): Don't check proc64.
41 (build_instruction): Always set memval to uword64. Cast op2 to
42 uword64 when shifting it left in memory instructions. Always use
43 the same code for stores--don't special case proc64.
45 * gencode.c (build_mips16_operands): Fix base PC value for PC
47 (build_instruction): Call JALDELAYSLOT rather than DELAYSLOT for a
49 * interp.c (simJALDELAYSLOT): Define.
50 (JALDELAYSLOT): Define.
51 (INDELAYSLOT, INJALDELAYSLOT): Define.
52 (simulate): Clear simJALDELAYSLOT when simDELAYSLOT is cleared.
56 * interp.c (sim_open): add flush_cache as a PMON routine
57 (sim_monitor): handle flush_cache by ignoring it
61 * gencode.c (build_instruction): Use !ByteSwapMem instead of
63 * interp.c (CONFIG, config_EP_{mask,shift,D,DxxDxx, config_BE): Delete.
64 (BigEndianMem): Rename to ByteSwapMem and change sense.
65 (BigEndianCPU, sim_write, LoadMemory, StoreMemory): Change
66 BigEndianMem references to !ByteSwapMem.
67 (set_endianness): New function, with prototype.
68 (sim_open): Call set_endianness.
69 (sim_info): Use simBE instead of BigEndianMem.
70 (xfer_direct_word, xfer_direct_long, swap_direct_word,
71 swap_direct_long, xfer_big_word, xfer_big_long, xfer_little_word,
72 xfer_little_long, swap_word, swap_long): Delete unnecessary MSC_VER
73 ifdefs, keeping the prototype declaration.
74 (swap_word): Rewrite correctly.
75 (ColdReset): Delete references to CONFIG. Delete endianness related
76 code; moved to set_endianness.
80 * gencode.c (build_instruction, case JUMP): Truncate PC to 32 bits.
81 * interp.c (CHECKHILO): Define away.
82 (simSIGINT): New macro.
83 (membank_size): Increase from 1MB to 2MB.
84 (control_c): New function.
85 (sim_resume): Rename parameter signal to signal_number. Add local
86 variable prev. Call signal before and after simulate.
87 (sim_stop_reason): Add simSIGINT support.
88 (sim_warning, sim_error, dotrace, SignalException): Define as stdarg
90 (sim_warning): Delete call to SignalException. Do call printf_filtered
92 (AddressTranslation): Add #ifdef DEBUG around debugging message and
93 a call to sim_warning.
97 * gencode.c (process_instructions): If ! proc64, skip DOUBLEWORD
102 Add support for mips16 (16 bit MIPS implementation):
103 * gencode.c (inst_type): Add mips16 instruction encoding types.
104 (GETDATASIZEINSN): Define.
105 (MIPS_DECODE): Add REG flag to dsllv, dsrav, and dsrlv. Add
106 jalx. Add LEFT flag to mfhi and mflo. Add RIGHT flag to mthi and
108 (MIPS16_DECODE): New table, for mips16 instructions.
109 (bitmap_val): New static function.
110 (struct mips16_op): Define.
111 (mips16_op_table): New table, for mips16 operands.
112 (build_mips16_operands): New static function.
113 (process_instructions): If PC is odd, decode a mips16
114 instruction. Break out instruction handling into new
115 build_instruction function.
116 (build_instruction): New static function, broken out of
117 process_instructions. Check modifiers rather than flags for SHIFT
118 bit count and m[ft]{hi,lo} direction.
119 (usage): Pass program name to fprintf.
120 (main): Remove unused variable this_option_optind. Change
121 ``*loptarg++'' to ``loptarg++''.
122 (my_strtoul): Parenthesize && within ||.
123 * interp.c (LoadMemory): Accept a halfword pAddr if vAddr is odd.
124 (simulate): If PC is odd, fetch a 16 bit instruction, and
125 increment PC by 2 rather than 4.
126 * configure.in: Add case for mips16*-*-*.
127 * configure: Rebuild.
131 * interp.c: Allow -t to enable tracing in standalone simulator.
132 Fix garbage output in trace file and error messages.
136 * Makefile.in: Delete stuff moved to ../common/Make-common.in.
137 (SIM_{OBJS,EXTRA_CFLAGS,EXTRA_CLEAN}): Define.
138 * configure.in: Simplify using macros in ../common/aclocal.m4.
139 * configure: Regenerated.
140 * tconfig.in: New file.
144 * interp.c: Fix bugs in 64-bit port.
145 Use ansi function declarations for msvc compiler.
146 Initialize and test file pointer in trace code.
147 Prevent duplicate definition of LAST_EMED_REGNUM.
151 * interp.c (xfer_big_long): Prevent unwanted sign extension.
155 * interp.c (SignalException): Check for explicit terminating
157 * gencode.c: Pass instruction value through SignalException()
158 calls for Trap, Breakpoint and Syscall.
162 * interp.c (SquareRoot): Add HAVE_SQRT check to ensure sqrt() is
163 only used on those hosts that provide it.
164 * configure.in: Add sqrt() to list of functions to be checked for.
165 * config.in: Re-generated.
166 * configure: Re-generated.
170 * gencode.c (process_instructions): Call build_endian_shift when
171 expanding STORE RIGHT, to fix swr.
172 * support.h (SIGNEXTEND): If the sign bit is not set, explicitly
174 * interp.c (Convert): Fix fmt_single to fmt_long to not truncate.
175 Fix float to int conversions to produce signed values.
179 * gencode.c (MIPS_DECODE): Set UNSIGNED for multu instruction.
180 (process_instructions): Correct handling of nor instruction.
181 Correct shift count for 32 bit shift instructions. Correct sign
182 extension for arithmetic shifts to not shift the number of bits in
183 the type. Fix 64 bit multiply high word calculation. Fix 32 bit
184 unsigned multiply. Fix ldxc1 and friends to use coprocessor 1.
186 * interp.c (CHECKHILO): Don't set HIACCESS, LOACCESS, or HLPC.
187 It's OK to have a mult follow a mult. What's not OK is to have a
189 (Convert): Comment out incorrect rounding code.
193 * interp.c (sim_monitor): Improved monitor printf
194 simulation. Tidied up simulator warnings, and added "--log" option
195 for directing warning message output.
196 * gencode.c: Use sim_warning() rather than WARNING macro.
200 * Makefile.in (gencode): Depend upon gencode.o, getopt.o, and
201 getopt1.o, rather than on gencode.c. Link objects together.
202 Don't link against -liberty.
203 (gencode.o, getopt.o, getopt1.o): New targets.
204 * gencode.c: Include <ctype.h> and "ansidecl.h".
205 (AND): Undefine after including "ansidecl.h".
206 (ULONG_MAX): Define if not defined.
207 (OP_*): Don't define macros; now defined in opcode/mips.h.
208 (main): Call my_strtoul rather than strtoul.
209 (my_strtoul): New static function.
213 * gencode.c (process_instructions): Generate word64 and uword64
214 instead of `long long' and `unsigned long long' data types.
215 * interp.c: #include sysdep.h to get signals, and define default
217 * (Convert): Work around for Visual-C++ compiler bug with type
219 * support.h: Make things compile under Visual-C++ by using
220 __int64 instead of `long long'. Change many refs to long long
221 into word64/uword64 typedefs.
225 * Makefile.in (bindir, libdir, datadir, mandir, infodir, includedir,
226 INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set values.
228 * configure.in (AC_PREREQ): autoconf 2.5 or higher.
229 (AC_PROG_INSTALL): Added.
230 (AC_PROG_CC): Moved to before configure.host call.
231 * configure: Rebuilt.
235 * configure.in: Define @SIMCONF@ depending on mips target.
236 * configure: Rebuild.
237 * Makefile.in (run): Add @SIMCONF@ to control simulator
239 * gencode.c: Change LOADDRMASK to 64bit memory model only.
240 * interp.c: Remove some debugging, provide more detailed error
241 messages, update memory accesses to use LOADDRMASK.
245 * configure.in: Add calls to AC_CONFIG_HEADER, AC_CHECK_HEADERS,
246 AC_CHECK_LIB, and AC_CHECK_FUNCS. Change AC_OUTPUT to set
248 * configure: Rebuild.
249 * config.in: New file, generated by autoheader.
250 * interp.c: Include "config.h". Include <stdlib.h>, <string.h>,
251 and <strings.h> if they exist. Replace #ifdef sun with #ifdef
252 HAVE_ANINT and HAVE_AINT, as appropriate.
253 * Makefile.in (run): Use @LIBS@ rather than -lm.
254 (interp.o): Depend upon config.h.
255 (Makefile): Just rebuild Makefile.
256 (clean): Remove stamp-h.
257 (mostlyclean): Make the same as clean, not as distclean.
258 (config.h, stamp-h): New targets.
262 * interp.c (ColdReset): Fix boolean test. Make all simulator
267 * interp.c (xfer_direct_word, xfer_direct_long,
268 swap_direct_word, swap_direct_long, xfer_big_word,
269 xfer_big_long, xfer_little_word, xfer_little_long,
270 swap_word,swap_long): Added.
271 * interp.c (ColdReset): Provide function indirection to
272 host<->simulated_target transfer routines.
273 * interp.c (sim_store_register, sim_fetch_register): Updated to
274 make use of indirected transfer routines.
278 * gencode.c (process_instructions): Ensure FP ABS instruction
280 * interp.c (AbsoluteValue): Add routine. Also provide simple PMON
285 * interp.c (sim_do_command): Complain if callback structure not
290 * interp.c (Convert): Provide round-to-nearest and round-to-zero
291 support for Sun hosts.
292 * Makefile.in (gencode): Ensure the host compiler and libraries
293 used for cross-hosted build.
297 * interp.c, gencode.c: Some more (TODO) tidying.
301 * gencode.c, interp.c: Replaced explicit long long references with
302 WORD64HI, WORD64LO, SET64HI and SET64LO macro calls.
303 * support.h (SET64LO, SET64HI): Macros added.
307 * configure: Regenerate with autoconf 2.7.
311 * interp.c (LoadMemory): Enclose text following #endif in /* */.
312 * support.h: Remove superfluous "1" from #if.
313 * support.h (CHECKSIM): Remove stray 'a' at end of line.
317 * interp.c (StoreFPR): Control UndefinedResult() call on
318 WARN_RESULT manifest.
322 * gencode.c: Tidied instruction decoding, and added FP instruction
325 * interp.c: Added dineroIII, and BSD profiling support. Also
326 run-time FP handling.
330 * Changelog, Makefile.in, README.Cygnus, configure, configure.in,
331 gencode.c, interp.c, support.h: created.