Thank you for doing this work. I have provided some initial comments to your change (should arrive in a separate mail), most of a more general kind, and not related to the meat of the MIPS stuff. In general all the files where the implementation is stubbed out using UNIMPLEMENTED() or returning some default value all the code in comments should be removed.
Please take a look at http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml for code style guidelines. Also try to run tools/presubmit.py to lint the code. This is a BIG change, so we need to somehow land it in smaller pieces while keeping all other platforms running. Maybe aiming for an initial change with the assembler, disassembler and simulator and a simple test could get things started. Maybe tests like in test-assembler-ia32.cc or test-disasm-ia32.cc which can run in the simulator. You should know, that we are working on a new optimizing compiler to replace the initial one in the codegen-xxx files. Also before we can land any of your code you will have to sign sign contributor license which can be signed electronically here: http://code.google.com/legal/individual-cla-v1.0.html. Regards, Søren On Tue, Jan 19, 2010 at 02:27, Alexandre Rames <[email protected]>wrote: > 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 >
-- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
