- 08 Mar, 2005 1 commit
-
-
Benoit Perrot authored
Remove redundant accessors from virtual machine. * src/vm/virtual_machine.hh (get_cpu_register, get_cpu_pc): Remove. * src/shell/shell.hh: Use VirtualMachine::get_cpu() instead.
-
- 06 Mar, 2005 3 commits
-
-
Benoit Perrot authored
Display the number of executed R,I and J-type instructions on profile. * src/vm/cpu.hh, src/vm/cpu.cc: Add an array of counters and update them for each executed instruction. * src/vm/virtual_machine.hh: Add accessor to CPU. * src/vm-tasks.cc: Print the counters on profile.
-
Benoit Perrot authored
Specify instruction format type to distinguish register, immediate and jump instructions. * src/inst/inst.hh: Add a format attribute. * dev/nolimips.xml, dev/nolimips.py, dev/inst-nodes-gen.py: Fill it.
-
Benoit Perrot authored
Provide `--profile' option. * src/vm/virtual_machine.hh: Add accessor to control coprocessor. * src/vm-tasks.hh, src/vm-tasks.cc: Declare and define the `profile' task. For the moment, simply print on stderr the number of executed cyles at the end of the program's execution.
-
- 15 Feb, 2005 1 commit
-
-
Benoit Perrot authored
Implement print_err. * src/vm/cpu.c: Print buffer pointed to by $a0 on standard error stream on syscall when $v0 = 15.
-
- 03 Feb, 2005 3 commits
-
-
Benoit Perrot authored
* src/inst/data_section.hh, src/inst/data_section.cc, * src/inst/text_section.hh, src/inst/text_section.cc: Maintain a list of encountered (not sorted) labels. Use it to print the content of the sections. * src/inst/section.hh: Remove deprecated attributes. * src/inst/text_label.hh (get_iterator): Constify return value.
-
Benoit Perrot authored
* src/inst/section.hh: Store the labels in a set. Use Labels to get the offset. * src/inst/label.hh (deref_ptr_less): Declare and define a label pointer comparator.
-
Benoit Perrot authored
Store an iterator in TextLabels. * src/inst/text_label.hh: Do it. * src/inst/text_section.hh (define_label): Move its implementation into... * src/inst/text_section.cc (define_label): This file, to solve inclusion cycle.
-
- 01 Feb, 2005 3 commits
-
-
Benoit Perrot authored
Prepare iterator in text_label storage. * src/inst/text_section.hh: Maintain an iterator on the very last instruction slot.
-
Benoit Perrot authored
Store the instructions in a list to prepare future random insertions. * src/inst/text_section.hh: Store the instructions in a list instead of a vector to ease random insertions. * src/inst/text_section.cc (~TextSection, print): Use TextSection's typedefs and dedicated begin and end to iterate through the instruction container. * dev/inst-solver-gen.py: Use operator!= instead of operator< to stop the iteration.
-
Benoit Perrot authored
Make Label compose its associated offset. * src/inst/label.hh: Protect default constructor. Compose its associated offset. Add a constructor that waits for it. * src/inst/section.hh (has_label, get_offset): Update accordingly. (register_label): Wait for a Label only and use it to get its offset. * src/inst/data_section.hh: Update accordingly. * src/inst/text_label.hh: New. * src/inst/Makefile.am: Update accordingly. * src/inst/text_section.hh: Create TextLabels instead of Labels. * src/inst/text_section.cc: Include inst.hh to gain access to Inst's interface.
-
- 27 Jan, 2005 1 commit
-
-
Benoit Perrot authored
from Benoît Perrot <benoit@lrde.epita.fr> Make LabelExp independent from Label. * src/inst/exp.hh, src/inst/exp.cc: Make LabelExp aggregate a unique_string instead of a Label. * dev/parse-asm-scan-gen.py: Return a unique_string when scanning an identifier (instead of a Label). * dev/parse-asm-parse-gen.py: Update accordingly. * src/inst/section.hh (has_label, get_offset): Wait for a unique_string (instead of a Label). * dev/inst-builder-gen.py, dev/inst-solver-gen.py, * src/vm/virtual_machine.cc, src/shell/shell.cc: Update accordingly.
-
- 26 Jan, 2005 1 commit
-
-
Benoit Perrot authored
from Benoît Perrot <benoit@lrde.epita.fr> Let concrete sections choose how to handle labels definitions. * src/inst/section.hh (add_label): Rename as `register_label'. * src/inst/data_section.hh, src/inst/text_section.hh: (add_label): Rename as... (define_label): This, and make it wait for a unique_string and build the label. * dev/parse-asm-scan-gen.py: Return a unique_string on a label definition. * dev/parse-asm-parse-gen.py: Update accordingly. Index: src/inst/data_section.hh --- src/inst/data_section.hh (revision 160) +++ src/inst/data_section.hh (working copy) @@ -54,9 +54,9 @@ } public: - void add_label(Label *label) + void define_label(const misc::unique_string &id) { - Section::add_label(label, size_); + Section::register_label(new inst::Label(id), size_); } public: Index: src/inst/section.hh --- src/inst/section.hh (revision 160) +++ src/inst/section.hh (working copy) @@ -49,7 +49,7 @@ {} protected: - void add_label(Label *label, int offset) + void register_label(Label *label, int offset) { // FIXME: check that this label has not already been added. offsets_[*label] = offset; Index: src/inst/text_section.hh --- src/inst/text_section.hh (revision 160) +++ src/inst/text_section.hh (working copy) @@ -54,9 +54,9 @@ } public: - void add_label(Label *label) + void define_label(const misc::unique_string &id) { - Section::add_label(label, insts_.size() * 4); + Section::register_label(new inst::Label(id), insts_.size() * 4); } public: Index: dev/inst-builder-gen.py --- dev/inst-builder-gen.py (revision 160) +++ dev/inst-builder-gen.py (working copy) @@ -78,14 +78,14 @@ } public: - void add_inst_label(Label *label) + void define_inst_label(const misc::unique_string &id) { - program_->text_section ().add_label(label); + program_->text_section ().define_label(id); } - void add_data_label(Label *label) + void define_data_label(const misc::unique_string &id) { - program_->data_section ().add_label(label); + program_->data_section ().define_label(id); } public: Index: dev/parse-asm-scan-gen.py --- dev/parse-asm-scan-gen.py (revision 160) +++ dev/parse-asm-scan-gen.py (working copy) @@ -71,7 +71,7 @@ dec_int [0-9]+ hex_int 0x[0-9A-Fa-f]+ -label [a-zA-Z_][a-zA-Z_0-9]* +id [a-zA-Z_][a-zA-Z_0-9]* %% %{ @@ -144,14 +144,14 @@ } -{label} { +{id} { yylval->label = new inst::Label (yytext); return LABEL; } -{label}\":\" { +{id}\":\" { std::string label = yytext; label.resize(yyleng - 1); - yylval->label = new inst::Label (label); + yylval->id = &misc::unique_string::create(label); return LABEL_DEF; } Index: dev/parse-asm-parse-gen.py --- dev/parse-asm-parse-gen.py (revision 160) +++ dev/parse-asm-parse-gen.py (working copy) @@ -75,6 +75,7 @@ { int i; std::string *s; + const misc::unique_string *id; inst::Label *label; inst::Register *reg; inst::Exp *exp; @@ -84,7 +85,7 @@ %} %token <label> LABEL \"label\" -%token <label> LABEL_DEF \"label definition\" +%token <id> LABEL_DEF \"label definition\" %token <i> INTEGER \"integer\" %token <s> STRING \"string\" %token <reg> REGISTER \"register\" @@ -138,7 +139,7 @@ data // Label : LABEL_DEF -{ program_builder.add_data_label($1); } +{ program_builder.define_data_label(*$1); } // Uninitialized space | DIR_SPACE INTEGER @@ -169,7 +170,7 @@ instruction // Label : LABEL_DEF -{ program_builder.add_inst_label($1); } +{ program_builder.define_inst_label(*$1); } // Opcodes"""
-
- 24 Jan, 2005 3 commits
-
-
Benoit Perrot authored
from Benoît Perrot <benoit@lrde.epita.fr> Copy the instruction list of text section when storing one. * src/inst/text_section.hh, dev/inst-solver-gen.py: Hide the concrete type of instruction list. * src/vm/mmu.hh: Aggregate the instructions instead of a text section. (inst_store) Copy the instruction pointers into a local vector. (inst_load) Access the local vector instead of text section.
-
Benoit Perrot authored
from Benoît Perrot <benoit@lrde.epita.fr> Hide the text section loaded in virtual machine's memory. * src/vm/mmu.hh (inst_has_label, inst_get_offset): Remove. * src/vm/virtual_machine.hh (has_label, get_offset): Remove. (add_breakpoint) Wait for an offset instead of a label. * src/vm/virtual_machine.cc: Update accordingly, move label translation into... * src/shell/shell.cc (do_break): ...this method.
-
Benoit Perrot authored
from Benoît Perrot <benoit@lrde.epita.fr> Introduce some (weak) reentrancy into lexer. * dev/parse-asm-scan-gen.py: Maintain a stack of scanning states. This comes from the LRDE's Tiger Compiler's scanner.
-
- 22 Jan, 2005 1 commit
-
-
Benoit Perrot authored
from Benoît Perrot <benoit@lrde.epita.fr> Fix shell's `load' command. * src/shell.hh: Implement destructor in corresponding .cc. Aggregate the program being run. * src/shell.cc (do_load): Recover on parse or solve error. (do_load, do_run, do_continue, do-next, do_break) Use aggregated program pointer instead of global one.
-
- 17 Jan, 2005 2 commits
-
-
Benoit Perrot authored
from Benoît Perrot <benoit@lrde.epita.fr> * src/shell.hh (is_register, is_label, get_next_word): Rename and move into... * src/shell.cc (eat_register, eat_label, eat_word): This.
-
Benoit Perrot authored
from Benoît Perrot <benoit@lrde.epita.fr> Introduce utilities for lexical analysis. * src/misc/lexutils.hh, src/misc/lexutils.cc: Pack utilities for lexical analysis in these files. * src/misc/Makefile.am: Update accordingly. * src/shell/shell.hh, src/shell/shell.cc: Use lexutils.
-
- 15 Jan, 2005 1 commit
-
-
Benoit Perrot authored
from Benoît Perrot <benoit@lrde.epita.fr> Improve command identifiers recognition. * src/shell/cmd.hh: Rename (cmd_type_type, cmd_type_, get_type) as (identifier_type, id_, get_identifier) for readability. * src/shell/shell.hh (eat_word): Rename as (eat_command_id) and move its implementation into... * src/shell/shell.cc: This file. Recognize uncomplete command identifiers and warn on ambiguity. Factor `build_cmd'.
-
- 14 Jan, 2005 1 commit
-
-
Benoit Perrot authored
from Benoît Perrot <benoit@lrde.epita.fr> Introduce unique_strings. * src/misc/unique_string.hh, src/misc/unique_string.cc: Declare and define the string uniquifier. * src/misc/test-unique_string.cc: Test it. * src/misc/Makefile.am: Update accordingly. * src/Makefile.am: Link with libmisc.a. * src/inst/section.hh, src/inst/label.hh: Use misc::unique_string instead of std::string. * src/inst/label.cc: Empty it.
-
- 11 Jan, 2005 1 commit
-
-
Benoit Perrot authored
from Benoît Perrot <benoit@lrde.epita.fr> 2005-01-08 Benoît Perrot <benoit@lrde.epita.fr> Migrate to bison2.0a. * dev/parse-asm-parse-gen.py: Call the parser with a filename and a program builder instead of using global variables. Use bison's builtin system to print token values. Remove global program builder. * dev/parse-asm-scan-gen.py: Remove global string for file name. Use yy::location instead of yy::Location. * src/parse/asm-scan.hh: Call the scanner with a trace flag. * src/parse/libparse.hh, src/parse/libparse.cc: Declare trace flags as booleans. * src/vm/cp0.hh: Include common.hh to get exit_set.
-
- 06 Jan, 2005 1 commit
-
-
Benoit Perrot authored
from Benoît Perrot <benoit@lrde.epita.fr> Strengthen lexical analysis. * dev/parse-asm-scan-gen.py: Complain when a lexicaly correct integer cannot be converted by istringstream, for example when the said integer is too large. For hexadecimal integers, a maximal number of digits might be used, but it seems more generic to handle it through istringstream; never knowns, someday nolimips may have to support 64 or event 128 bits long integers :). Call step() each time an invalid character is detected, to have a more clever error message. Step only one line when an eol sequence is detected. * tests/lexical/invalid-characters.s, integer-too-large.s: New. * tests/lexical/Makefile.am: Update accordingly.
-
- 18 Dec, 2004 2 commits
-
-
Benoit Perrot authored
from Benoît Perrot <benoit@lrde.epita.fr> Kill (some) autotools warnings. Some m4 files from GNUlib still use deprecated autotools constructions. * src/vm/Makefile.am, src/misc/Makefile.am, * src/task/Makefile.am, src/shell/Makefile.am, * src/parse/Makefile.am, src/inst/Makefile.am, * src/Makefile.am: Use *_CPPFLAGS instead of obsoleted INCLUDES. * configure.ac: Run autoupdate.
-
Benoit Perrot authored
from Benoît Perrot <benoit@lrde.epita.fr> Move tasks to top level, to make libraries "side-effect free". * src/task/task-tasks.hh, src/task/task-tasks.cc, * src/parse/parse-tasks.hh, src/parse/parse-tasks.cc * src/inst/inst-tasks.hh, src/inst/inst-tasks.cc * src/vm/vm-tasks.hh, src/vm/vm-tasks.cc, * src/shell/shell-tasks.hh, src/shell/shell-tasks.cc: Move to... * src/task-tasks.hh, src/task-tasks.cc, * src/parse-tasks.hh, src/parse-tasks.cc * src/inst-tasks.hh, src/inst-tasks.cc * src/vm-tasks.hh, src/vm-tasks.cc, * src/shell-tasks.hh, src/shell-tasks.cc: These files. * src/task/Makefile.am, * src/parse/Makefile.am, * src/inst/Makefile.am, * src/vm/Makefile.am, * src/shell/Makefile.am, * src/Makefile.am, * src/modules.hh: Update accordingly.
-
- 28 Nov, 2004 1 commit
-
-
Benoit Perrot authored
from Benoît Perrot <benoit@lrde.epita.fr> Use GNUlib as it shall be. Thanks to Akim Demaille and Paul Eggert for showing me the right way to do it. * bootstrap: Get gnulib files from CVS repository or local directory (extracted from GNU tar's bootstrap script, written by Paul Eggert and Sergey Poznyakoff). * lib/Makefile.am.tmpl: New. * Makefile.am: Add `lib' as subdirectory. * configure.ac: Use gnulib's automake snippets. * src/stdint_.h, config/stdint.m4, config/inttypes.m4: Remove, as deprecated by the correct use of gnulib. * src/Makefile.am, src/vm/Makefile.am, src/inst/Makefile.am: Update accordingly.
-
- 02 Nov, 2004 1 commit
-
-
Benoit Perrot authored
from Benoît Perrot <benoit@lrde.epita.fr> * dev/inst-solver-gen.py: Include config.h to get configuration needed by <stdint.h>.
-
- 31 Oct, 2004 3 commits
-
-
Benoit Perrot authored
from Benoît Perrot <benoit@lrde.epita.fr> * src/parse/libparse.cc: Use the up-to-date bison parser constructor. make check failed on platforms that have bison1.875e, which generates an error message when the deprecated parser constructor is invoked.
-
Benoit Perrot authored
from Benoît Perrot <benoit@lrde.epita.fr> * bootstrap: Update the time stamp of reference output files to avoid them to be illegitimately regenerated when checked out from the repository.
-
Benoit Perrot authored
from Benoît Perrot <benoit@lrde.epita.fr> 2004-10-31 Benoît Perrot <benoit@lrde.epita.fr> * configure.ac: Check <sys/int_limits.h> presence. * src/stdint_.h: Use <sys/int_limits.h> when it is present to define limit macros. A problem occured on our SunOS: <stdint_.h> includes <sys/int_limits.h> through several files, leading to a macro definition clash.
-
- 30 Oct, 2004 3 commits
-
-
Benoit Perrot authored
from Benoît Perrot <benoit@lrde.epita.fr> * configure.ac: Check isblank presence. * src/shell/shell.hh, src/shell/shell.cc: Provide isblank when the platform lack it.
-
Benoit Perrot authored
from Benoît Perrot <benoit@lrde.epita.fr> * src/vm/cpu.cc: Effectively use Cpu::register_type, and not system's register_t. cpu.cc did not compile on SunOS, where register_t is not defined.
-
Benoit Perrot authored
from Benoît Perrot <benoit@lrde.epita.fr> * config/stdint.m4, config/inttypes.m4: GNUlib's <stdint.h>/<inttypes.h> detection tools. * configure.ac: Use gl_HAVE_STDINT_H to check <stdint.h>/<inttypes.h> presence. Define __STDC_LIMIT_MACROS to access to some macros that the ISO C99 standard specifies to be explicitly requested in C++ implementation. * src/stdint_.h: GNUlib's "ISO C 99 <stdint.h> for platforms that lack it." * src/Makefile.am: Generate stdint.h from stdint_.h on platforms that lack it. * src/vm/cpu.hh, src/vm/memory.hh, src/inst/data_section.hh: Include config.h to get information on <stdint.h>/<inttypes.h> presence.
-
- 28 Oct, 2004 3 commits
-
-
Clement Vasseur authored
* dev/parse-asm-scan-gen.py: Add missing <cerrno> header for `errno'. The problem appeared on NetBSD.
-
Clement Vasseur authored
Fix problem with case-insensitive filesystems. * distrib/debian/changelog: Rename as... * distrib/debian/changelog-deb: ...this. * distrib/debian/Makefile.am: Adjust.
-
Clement Vasseur authored
* bootstrap.sh: Stop at first error (sh -e). Don't use "cd -" because it does not work with BSD's /bin/sh.
-
- 25 Oct, 2004 1 commit
-
-
Benoit Perrot authored
from Benoît Perrot <benoit@lrde.epita.fr> Participate to "builddir != srcdir" compilation. * dev/inst-builder-gen.py, * dev/inst-nodes-gen.py, * dev/inst-solver-gen.py, * dev/doc-inst-set-gen.py, * dev/parse-asm-scan-gen.py, * dev/parse-asm-parse-gen.py: Ask for a directory where the files have to be generated. * src/parse/Makefile.am, * src/inst/Makefile.am, * doc/Makefile.am: Specify the directory where to generate.
-
- 04 Oct, 2004 1 commit
-
-
Benoit Perrot authored
from Benoît Perrot <benoit@lrde.epita.fr> Use a dedicated script to launch bison to control the directory where the generated files are output. * config/move-if-change, config/bison++: Provided by Akim Demaille. * config/Makefile.am: Distribute them. * src/parse/Makefile.am: Use bison++.
-
- 03 Oct, 2004 2 commits
-
-
Benoit Perrot authored
-
Benoit Perrot authored
from Benoît Perrot <benoit@lrde.epita.fr> * dev/inst-nodes-mk-gen.py: Split into... * src/inst/Makefile.am: This file.
-