3 Add support for mips16 (16 bit MIPS implementation):
4 * gencode.c (inst_type): Add mips16 instruction encoding types.
5 (GETDATASIZEINSN): Define.
6 (MIPS_DECODE): Add REG flag to dsllv, dsrav, and dsrlv. Add
7 jalx. Add LEFT flag to mfhi and mflo. Add RIGHT flag to mthi and
9 (MIPS16_DECODE): New table, for mips16 instructions.
10 (bitmap_val): New static function.
11 (struct mips16_op): Define.
12 (mips16_op_table): New table, for mips16 operands.
13 (build_mips16_operands): New static function.
14 (process_instructions): If PC is odd, decode a mips16
15 instruction. Break out instruction handling into new
16 build_instruction function.
17 (build_instruction): New static function, broken out of
18 process_instructions. Check modifiers rather than flags for SHIFT
19 bit count and m[ft]{hi,lo} direction.
20 (usage): Pass program name to fprintf.
21 (main): Remove unused variable this_option_optind. Change
22 ``*loptarg++'' to ``loptarg++''.
23 (my_strtoul): Parenthesize && within ||.
24 * interp.c (sim_trace): If tracefh is NULL, set it to stderr.
25 (LoadMemory): Accept a halfword pAddr if vAddr is odd.
26 (simulate): If PC is odd, fetch a 16 bit instruction, and
27 increment PC by 2 rather than 4.
28 * configure.in: Add case for mips16*-*-*.
33 * interp.c: Allow -t to enable tracing in standalone simulator.
34 Fix garbage output in trace file and error messages.
38 * Makefile.in: Delete stuff moved to ../common/Make-common.in.
39 (SIM_{OBJS,EXTRA_CFLAGS,EXTRA_CLEAN}): Define.
40 * configure.in: Simplify using macros in ../common/aclocal.m4.
41 * configure: Regenerated.
42 * tconfig.in: New file.
46 * interp.c: Fix bugs in 64-bit port.
47 Use ansi function declarations for msvc compiler.
48 Initialize and test file pointer in trace code.
49 Prevent duplicate definition of LAST_EMED_REGNUM.
53 * interp.c (xfer_big_long): Prevent unwanted sign extension.
57 * interp.c (SignalException): Check for explicit terminating
59 * gencode.c: Pass instruction value through SignalException()
60 calls for Trap, Breakpoint and Syscall.
64 * interp.c (SquareRoot): Add HAVE_SQRT check to ensure sqrt() is
65 only used on those hosts that provide it.
66 * configure.in: Add sqrt() to list of functions to be checked for.
67 * config.in: Re-generated.
68 * configure: Re-generated.
72 * gencode.c (process_instructions): Call build_endian_shift when
73 expanding STORE RIGHT, to fix swr.
74 * support.h (SIGNEXTEND): If the sign bit is not set, explicitly
76 * interp.c (Convert): Fix fmt_single to fmt_long to not truncate.
77 Fix float to int conversions to produce signed values.
81 * gencode.c (MIPS_DECODE): Set UNSIGNED for multu instruction.
82 (process_instructions): Correct handling of nor instruction.
83 Correct shift count for 32 bit shift instructions. Correct sign
84 extension for arithmetic shifts to not shift the number of bits in
85 the type. Fix 64 bit multiply high word calculation. Fix 32 bit
86 unsigned multiply. Fix ldxc1 and friends to use coprocessor 1.
88 * interp.c (CHECKHILO): Don't set HIACCESS, LOACCESS, or HLPC.
89 It's OK to have a mult follow a mult. What's not OK is to have a
91 (Convert): Comment out incorrect rounding code.
95 * interp.c (sim_monitor): Improved monitor printf
96 simulation. Tidied up simulator warnings, and added "--log" option
97 for directing warning message output.
98 * gencode.c: Use sim_warning() rather than WARNING macro.
102 * Makefile.in (gencode): Depend upon gencode.o, getopt.o, and
103 getopt1.o, rather than on gencode.c. Link objects together.
104 Don't link against -liberty.
105 (gencode.o, getopt.o, getopt1.o): New targets.
106 * gencode.c: Include <ctype.h> and "ansidecl.h".
107 (AND): Undefine after including "ansidecl.h".
108 (ULONG_MAX): Define if not defined.
109 (OP_*): Don't define macros; now defined in opcode/mips.h.
110 (main): Call my_strtoul rather than strtoul.
111 (my_strtoul): New static function.
115 * gencode.c (process_instructions): Generate word64 and uword64
116 instead of `long long' and `unsigned long long' data types.
117 * interp.c: #include sysdep.h to get signals, and define default
119 * (Convert): Work around for Visual-C++ compiler bug with type
121 * support.h: Make things compile under Visual-C++ by using
122 __int64 instead of `long long'. Change many refs to long long
123 into word64/uword64 typedefs.
127 * Makefile.in (bindir, libdir, datadir, mandir, infodir, includedir,
128 INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set values.
130 * configure.in (AC_PREREQ): autoconf 2.5 or higher.
131 (AC_PROG_INSTALL): Added.
132 (AC_PROG_CC): Moved to before configure.host call.
133 * configure: Rebuilt.
137 * configure.in: Define @SIMCONF@ depending on mips target.
138 * configure: Rebuild.
139 * Makefile.in (run): Add @SIMCONF@ to control simulator
141 * gencode.c: Change LOADDRMASK to 64bit memory model only.
142 * interp.c: Remove some debugging, provide more detailed error
143 messages, update memory accesses to use LOADDRMASK.
147 * configure.in: Add calls to AC_CONFIG_HEADER, AC_CHECK_HEADERS,
148 AC_CHECK_LIB, and AC_CHECK_FUNCS. Change AC_OUTPUT to set
150 * configure: Rebuild.
151 * config.in: New file, generated by autoheader.
152 * interp.c: Include "config.h". Include <stdlib.h>, <string.h>,
153 and <strings.h> if they exist. Replace #ifdef sun with #ifdef
154 HAVE_ANINT and HAVE_AINT, as appropriate.
155 * Makefile.in (run): Use @LIBS@ rather than -lm.
156 (interp.o): Depend upon config.h.
157 (Makefile): Just rebuild Makefile.
158 (clean): Remove stamp-h.
159 (mostlyclean): Make the same as clean, not as distclean.
160 (config.h, stamp-h): New targets.
164 * interp.c (ColdReset): Fix boolean test. Make all simulator
169 * interp.c (xfer_direct_word, xfer_direct_long,
170 swap_direct_word, swap_direct_long, xfer_big_word,
171 xfer_big_long, xfer_little_word, xfer_little_long,
172 swap_word,swap_long): Added.
173 * interp.c (ColdReset): Provide function indirection to
174 host<->simulated_target transfer routines.
175 * interp.c (sim_store_register, sim_fetch_register): Updated to
176 make use of indirected transfer routines.
180 * gencode.c (process_instructions): Ensure FP ABS instruction
182 * interp.c (AbsoluteValue): Add routine. Also provide simple PMON
187 * interp.c (sim_do_command): Complain if callback structure not
192 * interp.c (Convert): Provide round-to-nearest and round-to-zero
193 support for Sun hosts.
194 * Makefile.in (gencode): Ensure the host compiler and libraries
195 used for cross-hosted build.
199 * interp.c, gencode.c: Some more (TODO) tidying.
203 * gencode.c, interp.c: Replaced explicit long long references with
204 WORD64HI, WORD64LO, SET64HI and SET64LO macro calls.
205 * support.h (SET64LO, SET64HI): Macros added.
209 * configure: Regenerate with autoconf 2.7.
213 * interp.c (LoadMemory): Enclose text following #endif in /* */.
214 * support.h: Remove superfluous "1" from #if.
215 * support.h (CHECKSIM): Remove stray 'a' at end of line.
219 * interp.c (StoreFPR): Control UndefinedResult() call on
220 WARN_RESULT manifest.
224 * gencode.c: Tidied instruction decoding, and added FP instruction
227 * interp.c: Added dineroIII, and BSD profiling support. Also
228 run-time FP handling.
232 * Changelog, Makefile.in, README.Cygnus, configure, configure.in,
233 gencode.c, interp.c, support.h: created.