Sorry for the following posts... I'll try to stop posting a little after this one. It's just that I'd like the first part of the code to be good enough. I added the Debugger implementation to the Simulator.
Alexandre On Jan 18, 3:52 pm, Alexandre Rames <[email protected]> wrote: > I am fixing bugs in the simulator. There are quite a few... > > On Jan 18, 2:47 pm, Alexandre Rames <[email protected]> wrote: > > > > > The code is uploading right now. > > I hope I did everything right. Here are some details about the > > uploaded code. > > > The code implements MIPS assembly generation, simulator and > > disassembler. > > Not all instructions supported in the simulator have been tested > > thoroughly yet. > > > The files containing the code concerned are: > > - constants-mips.h / .cc holds the assembly constants and some > > helpers. They are shared by the assembler, the simulator, and the > > disassembler. > > - assembler-mips.h / .cc holds the assembler code. > > - macro-assembler-mips.h / .cc is partly implemented: pseudo > > instructions, etc. > > - simulator-mips.h / .cc for the simulator > > - disasm-mips.cc for the disassembler > > > The architecture dependent files are modified to support the mips > > architecture. > > In bootstrapper.cc I added some pre-processor condition around the > > configuration of the environment. MIPS needs this to skip compiling > > natives and others (for this code). > > > In the SConstruct file there are two architectures defined for mips: > > "mips" and "mips-simu". > > This is because when compiling for the hardware we need some flags we > > don't want when compiling for the simulator. So when compiling for the > > simulator we take the arguments in the "mips-simu" architecture > > instead. > > > Also an interface for testing all this is implemented with > > - test-mips.h / .cc in which, a test stub is declared, and where > > we can write some assembly code. > > - test-interface-mips.h / .cc makes the interface between the user > > and test-mips files. > > > To run the interface compile v8 ( scons simulator=mips mode=debug - > > j4 ) > > then compile the test interface. I use the following > > "compile_mips_test.sh" script to do all this: > > > #!/bin/sh > > INTERFACE=test-interface-mips.cc > > TESTCORE=test-mips.cc > > TESTCORE_O=$PWD/obj/debug/mips/test-mips.o > > PATH_TO_TEST=$PWD/src/mips > > ARGS="-Wall -Werror" > > V8ARGS="-Iinclude libv8_g.a -lpthread" > > echo "g++ ${PATH_TO_TEST}/${INTERFACE} -o mips-test-interface $ > > {TESTCORE_O} ${V8ARGS} ${ARGS}" > > g++ ${PATH_TO_TEST}/${INTERFACE} -o mips-test-interface ${TESTCORE_O} $ > > {V8ARGS} ${ARGS}
-- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
