aboutsummaryrefslogtreecommitdiff
path: root/sim
AgeCommit message (Collapse)AuthorFilesLines
1996-12-10New revision from AndrewMichael Meissner8-377/+3635
1996-12-09 * callback.c: #include <stdlib.h>David Edelsohn2-0/+459
(os_error): New function. (default_callback): Add os_error.
1996-12-07 * simops.c (REG0_16): Fix typo.Jeff Law2-1/+5
1996-12-07Add missing semicolons in last change.Jeff Law1-13/+13
1996-12-06 * simops.c: Call abort for any instruction that's not currentlyJeff Law2-0/+16
simulated.
1996-12-06 * simops.c: Define accessor macros to extract registerJeff Law2-368/+329
values from instructions. Use them consistently.
1996-12-06 * interp.c: Delete unused global variable "OP".Jeff Law3-31/+30
(sim_resume): Remove unused variable "opcode". * simops.c: Fix some uninitialized variable problems, add parens to fix various -Wall warnings. Fixing assorted -Wall problems.
1996-12-06Opps. Forgot something in last change.Jeff Law1-1/+1
1996-12-06 * gencode.c (write_header): Add "insn" and "extension" argumentsJeff Law5-248/+699
to the OP_* declarations. (write_template): Similarly for function templates. * interp.c (insn, extension): Remove global variables. Instead pass them as arguments to the OP_* functions. * mn10300_sim.h: Remove decls for "insn" and "extension". * simops.c (OP_*): Accept "insn" and "extension" as arguments instead of using globals. Starting to clean things up.
1996-12-06 * simops.c: Fix typos in "mov am,(d16,an)" and "mov am,(d32,an)"Jeff Law2-3/+5
Fixes remaining hangs while running c-torture execution tests. Only 12 c-torture execution failures left: * 920625-1.c fails all 6 execution tests. * 960521-1.c fails all 6 execution tests.
1996-12-06 * simops.c: Fix thinkos in last change to "inc dn".Jeff Law2-5/+11
1996-12-04 * simops.c: "add imm,sp" does not effect the condition codes.Jeff Law2-31/+20
"inc dn" does effect the condition codes. Just something I noticed.
1996-12-04 * simops.c: Treat both operands as signed values forJeff Law2-2/+13
"div" instruction. Fixes another dozen c-torture execution failures.
1996-12-04 * configure.in: Look for libtermcap.a.Rob Savoye3-64/+132
* Makefile.in: Only link in -ltermcap if it exists. * erc32.c: Update to version 2.6a. Fix uart handling. * exec.c: Update to version 2.6a. Add sparclite support. * float.c: Update to version 2.6a. Convert comments to preprocessor warnings. Add __setfpucw() for i385 hosts so floating point exceptions work. * func.c: Update to version 2.6a. Fix uart handling, add support for user error traps. * help.c: Update to version 2.6a. Add help note on user error traps. * interf.c: Update to version 2.6a. Fix uart handling, and add sparclite support. * examples/gccx: Use sparclite cross compiler, not native gcc. * examples/srt0.S: Use "mov" rather than "wr" for manipulating the psr register.
1996-12-04 * simops.c: Fix simulation of division instructions.Jeff Law1-12/+8
Fix typos/thinkos in several "cmp" and "sub" instructions. Another couple dozen c-torture failures fixed.
1996-12-02 * simomps.c: Fix carry bit handling in "sub" and "cmp"Jeff Law1-9/+9
instructions. Another dozen execution failures fixed.
1996-12-02 * simops.c: Fix "mov imm8,an" and "mov imm16,dn".Jeff Law2-2/+6
Fixes 80 or so c-torture execution failures. 400 to go.
1996-12-02 * simops.c: Fix overflow computation for many instructions.Jeff Law2-87/+89
Fixes several hangs in the c-torture execution tests. Also fixes about 40 failures.
1996-12-02 * simops.c: Fix "movdm, an", "movbu dm, (an)", and "movhu dm, (an)".Jeff Law2-5/+7
Along with some compiler, bfd, assembler changes this fixes 90 or so c-torture execution failures.
1996-12-02 * simops.c: Fix "mov am, dn".Jeff Law2-1/+3
Fixes more c-torture problems.
1996-12-01 * simops.c: Fix more bugs in "add imm,an" andJeff Law2-8/+13
"add imm,dn". Fixes a half-dozen (of several hundred :( c-torture failures.
1996-11-27 * simops.c: Fix bugs in "movm" and "add imm,an".Jeff Law2-17/+19
main(){write (0, "hello world\n", 13);} works!
1996-11-27 * simops.c: Don't lose the upper 24 bits of the returnJeff Law2-16/+154
pointer in "call" and "calls" instructions. Rough cut at emulated system calls.
1996-11-27 * simops.c: Implement the remaining 5, 6 and 7 byte instructions.Jeff Law2-50/+168
Everything except the extended instructions, the loop instructions, trap, rti, and rtm.
1996-11-27 * simops.c Implement remaining 4 byte instructions.Jeff Law2-39/+145
1996-11-27 * gencode.c (process_instructions): If ! proc64, skip DOUBLEWORDIan Lance Taylor1-0/+3
16 bit instructions.
1996-11-27 * simops.c Implement remaining 3 byte instructions.Jeff Law2-32/+120
Moving right along...
1996-11-27 * simops.c: Implement remaining 2 byte instructions. CallJeff Law2-23/+120
abort for instructions we're not implementing now.
1996-11-27Actually check in the right change to interp.c.Ian Lance Taylor1-2/+1
1996-11-27 * simops.c: Implement lots of random instructions.Jeff Law2-129/+642
Implments most instructions with first nibble 0x0 - 0xe and those with the first byte 0xf0 - 0xf2.
1996-11-27 * simops.c: Implement "movm" and "bCC" insns.Jeff Law2-7/+160
Function calls and conditional branches work!
1996-11-27 * mn10300_sim.h (_state): Add another register (MDR).Jeff Law3-9/+199
(REG_MDR): Define. * simops.c: Implement "cmp", "calls", "rets", "jmp" and a few additional random insns. We can now function calls. We get out of crt0 into main now, then lose when calls are nested (because don't handle movm yet).
1996-11-26 * mn10300_sim.h (PSW_*): Define for CC status tracking.Jeff Law3-20/+310
(REG_D0, REG_A0, REG_SP): Define. * simops.c: Implement "add", "addc" and a few other random instructions. Starting to simulate instructions for the mn10300. Executes some of the crt0 code now!
1996-11-26 * gencode.c, interp.c: Snapshot current simulator code.Jeff Law3-3/+27
(crude) hashing works, along with dispatch to the OP_* functions.
1996-11-26 Add support for mips16 (16 bit MIPS implementation):Ian Lance Taylor3-1062/+1631
* gencode.c (inst_type): Add mips16 instruction encoding types. (GETDATASIZEINSN): Define. (MIPS_DECODE): Add REG flag to dsllv, dsrav, and dsrlv. Add jalx. Add LEFT flag to mfhi and mflo. Add RIGHT flag to mthi and mtlo. (MIPS16_DECODE): New table, for mips16 instructions. (bitmap_val): New static function. (struct mips16_op): Define. (mips16_op_table): New table, for mips16 operands. (build_mips16_operands): New static function. (process_instructions): If PC is odd, decode a mips16 instruction. Break out instruction handling into new build_instruction function. (build_instruction): New static function, broken out of process_instructions. Check modifiers rather than flags for SHIFT bit count and m[ft]{hi,lo} direction. (usage): Pass program name to fprintf. (main): Remove unused variable this_option_optind. Change ``*loptarg++'' to ``loptarg++''. (my_strtoul): Parenthesize && within ||. * interp.c (sim_trace): If tracefh is NULL, set it to stderr. (LoadMemory): Accept a halfword pAddr if vAddr is odd. (simulate): If PC is odd, fetch a 16 bit instruction, and increment PC by 2 rather than 4. * configure.in: Add case for mips16*-*-*. * configure: Rebuild.
1996-11-26Regenerated since aclocal.m4 changed.David Edelsohn1-41/+378
1996-11-26 * config.in (WORDS_BIGENDIAN): Add.David Edelsohn2-88/+383
* configure: Regenerated. * d10v_sim.h: #include "config.h"
1996-11-25 * Makefile.in, config.in, configure, configure.in: New files.Jeff Law9-0/+1956
* gencode.c, interp.c, mn10300_sim.h, simops.c: New files. Skeleton mn10300 simulator
1996-11-21Make address in I/O space a bus error; properly cast callocMichael Meissner1-0/+9
1996-11-20 * run.c: Deleted, using one in ../common now.David Edelsohn3-93/+1
1996-11-20 * Makefile.in: Delete stuff moved to ../common/Make-common.in.David Edelsohn2-36/+4
(SIM_OBJS,SIM_EXTRA_CFLAGS,SIM_EXTRA_CLEAN): Define. * configure.in: Simplify using macros in ../common/aclocal.m4. Call AC_CHECK_HEADERS(unistd.h). * configure: Regenerated. * config.in: New file. * simops.c: #include "config.h". #include <unistd.h> if present.
1996-11-20 * Makefile.in: Delete stuff moved to ../common/Make-common.in.David Edelsohn2-22/+4
(SIM_OBJS,SIM_EXTRA_LIBS): Define. * configure.in: Simplify using macros in ../common/aclocal.m4. Call AC_CHECK_HEADERS(unistd.h). * configure: Regenerated. * config.in: New file. * interp.c: #include "config.h". #include <unistd.h> if present. (trap): Fetch errno value with callback->get_errno.
1996-11-20 * Makefile.in (LIBCOMMON): Define.David Edelsohn1-0/+3
($(TARGETLIB)): Add files from $(LIBCOMMON).
1996-11-20 * Makefile.in: Delete stuff moved to ../common/Make-common.in.David Edelsohn6-90/+209
(SIM_{OBJS,EXTRA_CFLAGS,EXTRA_CLEAN}): Define. * configure.in: Simplify using macros in ../common/aclocal.m4. * configure: Regenerated. * tconfig.in: New file.
1996-11-20 * Makefile.in: Delete stuff moved to ../common/Make-common.in.David Edelsohn4-162/+31
(SIM_OBJS): Define. * configure.in: Simplify using macros in ../common/aclocal.m4. * configure: Regenerated. * inst.h (enum sim_state): Define. (cpu_state_type): New member `state'. Set it whenever `exception' is set. * compile.c (sim_callback): New global. (sim_set_simcache_size): Renamed from sim_csize. (sim_resume, case O_SLEEP): Add right way to decode r0 but #if 0 out 'cus it can't work. Change main loop exit test to use cpu.state. (sim_trace): New function. (sim_stop_reason): Add right way to set results, but #if 0 out. (sim_size): New function. (sim_info): Redirect calls to printf_filtered through callback. (sim_set_callbacks): Record callback. * run.c: Deleted, using one in ../common now. * tconfig.in: New file.
1996-11-20 * Makefile.in: Delete stuff moved to ../common/Make-common.in.David Edelsohn5-186/+338
(SIM_{OBJS,EXTRA_LIBS,EXTRA_LIBDEPS,EXTRA_ALL,EXTRA_INSTALL}): Define. (SIM_{EXTRA_CLEAN,EXTRA_CFLAGS}): Define. * configure.in: Simplify using macros in ../common/aclocal.m4. Call AC_CHECK_HEADERS(stdlib.h). * configure: Regenerated. * config.in: New file. * func.c (sim_set_callbacks): Delete, moved to * interf.c (sim_set_callbacks): here. (sim_callback): New global. Rewrite all calls to printf_filtered to go through callback. (sim_size,sim_trace): New functions. (sim_{insert,remove}_breakpoint): #if 0 out. * sis.c: #include "config.h". #include <stdlib.h> if present. (main): Coerce fprintf arg to INIT_DISASSEMBLE_INFO to fprintf_ftype. * sis.h: #include "callback.h".
1996-11-20New file.David Edelsohn2-0/+5
1996-11-20 * Makefile.in: Delete all stuff moved to ../common/Make-common.in.David Edelsohn3-81/+62
(SIM_OBJS,SIM_EXTRA_CFLAGS,SIM_EXTRA_CLEAN): Define. * configure.in: Simplify using macros in ../common/aclocal.m4. Call AC_CHECK_HEADERS(unistd.h). * configure: Regenerated. * config.in: New file. * interp.c: #include "callback.h". * simops.c: #include "config.h". #include <unistd.h> if present.
1996-11-20Add new files.David Edelsohn1-0/+11
1996-11-20 * run.c: #include ../common/config.h, tconfig.h.David Edelsohn5-0/+395
(myname): New static global. (main): Recognize new options -a, -c. Also recognize -h if h8/300. Only process -c ifdef SIM_HAVE_SIMCACHE. Only process -p/-s ifdef SIM_HAVE_PROFILE. Parse program name from argv[0] and use in error messages. Pass sim_args to sim_open. Pass prog_args to sim_create_inferior. Add support for incomplete h8/300 termination indicators. (usage): Make more verbose. * aclocal.m4,config.in,tconfig.in,configure.in,configure: New files. * Makefile.in,Make-common.in,callback.c: New files. * nltvals.def,gentmap.c,gentvals.sh: New files.