Commit eeaef65a authored by Benoit Perrot's avatar Benoit Perrot
Browse files

Index: ChangeLog

from  Benoît Perrot  <benoit@lrde.epita.fr>

        Homogenize attribute names.

        * dev/inst-builder-gen.py, src/inst/program_builder.cc,
        * src/inst/data_section.hh, src/inst/data_section.cc,
        * src/inst/exp.hh, src/inst/exp.cc,
        * src/inst/label.cc, src/inst/label.hh,
        * src/inst/program.hh,
        * src/inst/program_solver.hh,
        * src/inst/register.hh,
        * src/inst/section.hh,
        * src/inst/text_section.hh, src/inst/text_section.cc,
        * src/misc/deref.hh, src/misc/escape.hh,
        * src/task/task.cc, src/task/task.hh
        * src/task/task_register.cc, src/task/task_register.hh
        * src/vm/cpu.hh, src/vm/cpu.cc
        * src/vm/memory.hh, src/vm/segment.hh,
        * src/vm/table.hh,
        * src/vm/virtual_machine.hh:
        Rename...
        (_program, fill_delay_slot_p, _size, bytes, immediate, integer)
        (label, kind, left, right, set, set_node, _text_section, _data_section)
        (_pc, _program, kind, index, labels, offsets, insts, postr, s)
        (print_delim, _long_opt, _short_opt, _module, _description)
        (dependencies, _execute, _modules, _tasks, _enabled_tasks, mmu, GPR)
        (hi, lo, pc, unlimited, halt, istr, ostr, call_stack)
        (check_callee_save_p, trace_p, bubble, pipeline, heap, stack)
        (stack_top, _size, _bytes, _scopes, memory, mmu, cpu)
        as...
        (program_, fill_delay_slot_p_, size_, bytes_, immediate_, integer_)
        (label_, kind_, left_, right_, set_, set_node_, text_section_)
        (data_section_, pc_, program_, kind_, index_, labels_, offsets_)
        (insts_, postr_, s_, print_delim_, long_opt_, short_opt_, module_)
        (description_, dependencies_, execute_, modules_, tasks_)
        (enabled_tasks_, mmu_, GPR_, hi_, lo_, pc_, unlimited_, halt_, istr_)
        (ostr_, call_stack_, check_callee_save_p_, trace_p_, bubble_)
        (pipeline_, heap_, stack_, stack_top_, size_, bytes_, scopes_)
        (memory_, mmu_, cpu_)
parent f76d93c9
2004-03-28 Benot Perrot <benoit@lrde.epita.fr>
Homogenize attribute names.
* dev/inst-builder-gen.py, src/inst/program_builder.cc,
* src/inst/data_section.hh, src/inst/data_section.cc,
* src/inst/exp.hh, src/inst/exp.cc,
* src/inst/label.cc, src/inst/label.hh,
* src/inst/program.hh,
* src/inst/program_solver.hh,
* src/inst/register.hh,
* src/inst/section.hh,
* src/inst/text_section.hh, src/inst/text_section.cc,
* src/misc/deref.hh, src/misc/escape.hh,
* src/task/task.cc, src/task/task.hh
* src/task/task_register.cc, src/task/task_register.hh
* src/vm/cpu.hh, src/vm/cpu.cc
* src/vm/memory.hh, src/vm/segment.hh,
* src/vm/table.hh,
* src/vm/virtual_machine.hh:
Rename...
(_program, fill_delay_slot_p, _size, bytes, immediate, integer)
(label, kind, left, right, set, set_node, _text_section, _data_section)
(_pc, _program, kind, index, labels, offsets, insts, postr, s)
(print_delim, _long_opt, _short_opt, _module, _description)
(dependencies, _execute, _modules, _tasks, _enabled_tasks, mmu, GPR)
(hi, lo, pc, unlimited, halt, istr, ostr, call_stack)
(check_callee_save_p, trace_p, bubble, pipeline, heap, stack)
(stack_top, _size, _bytes, _scopes, memory, mmu, cpu)
as...
(program_, fill_delay_slot_p_, size_, bytes_, immediate_, integer_)
(label_, kind_, left_, right_, set_, set_node_, text_section_)
(data_section_, pc_, program_, kind_, index_, labels_, offsets_)
(insts_, postr_, s_, print_delim_, long_opt_, short_opt_, module_)
(description_, dependencies_, execute_, modules_, tasks_)
(enabled_tasks_, mmu_, GPR_, hi_, lo_, pc_, unlimited_, halt_, istr_)
(ostr_, call_stack_, check_callee_save_p_, trace_p_, bubble_)
(pipeline_, heap_, stack_, stack_top_, size_, bytes_, scopes_)
(memory_, mmu_, cpu_)
2004-03-21 Benot Perrot <benoit@lrde.epita.fr>
* INSTALL: New.
......
......@@ -50,57 +50,57 @@ namespace inst
{
public:
ProgramBuilder(bool fill_delay_slot_p = false):
_program(0), fill_delay_slot_p(fill_delay_slot_p)
program_(0), fill_delay_slot_p_(fill_delay_slot_p)
{
}
public:
void reset(bool fill_delay_slot_p = false)
{
this->fill_delay_slot_p = fill_delay_slot_p;
_program = new Program();
fill_delay_slot_p_ = fill_delay_slot_p;
program_ = new Program();
}
Program* get()
{
// FIXME: fill end of program with NOPs for pipeline (really dirty!)
for (unsigned i = 0; i < 6; ++i)
_program->text_section().
program_->text_section().
add_inst (new Sll(new Register(Register::general, Cpu::zero),
new Register(Register::general, Cpu::zero),
new IntExp(0)));
return _program;
return program_;
}
public:
void add_data_label(Label *label)
{
_program->data_section ().add_label(label);
program_->data_section ().add_label(label);
}
void add_inst_label(Label *label)
{
_program->text_section ().add_label(label);
program_->text_section ().add_label(label);
}
void add_space (int size)
{
_program->data_section ().add_space(size);
program_->data_section ().add_space(size);
}
void add_word (int imm)
{
_program->data_section ().add_word (imm);
program_->data_section ().add_word (imm);
}
void add_word (Label *label)
{
// FIXME: use a precondition
_program->data_section ().
add_word (_program->data_section ().get_offset(* label));
program_->data_section ().
add_word (program_->data_section ().get_offset(* label));
}
void add_asciiz (const std::string *str)
{
_program->data_section ().add_asciiz (str);
program_->data_section ().add_asciiz (str);
}
public:"""
......@@ -128,10 +128,10 @@ for inst in instructions:
print " void\tadd_" + inst.opcode + "(" + proto + ")"
print " {"
call = "new " + class_id(inst.opcode) + "(" + call + ")"
print " _program->text_section().add_inst (" + call + ");"
print " program_->text_section().add_inst (" + call + ");"
if inst.kind == "branch":
print " if (fill_delay_slot_p)"
print " _program->text_section()."
print " if (fill_delay_slot_p_)"
print " program_->text_section()."
print " add_inst (new Sll(new Register(Register::general, " + \
"Cpu::zero), "
print " new Register(Register::general, " + \
......@@ -151,8 +151,8 @@ for inst in instructions:
print """
protected:
Program* _program;
bool fill_delay_slot_p;
Program* program_;
bool fill_delay_slot_p_;
};
} // namespace inst
......
......@@ -2,29 +2,64 @@
(Created-By-Prcs-Version 1 3 2)
(Project-Description "")
(Project-Version mipsy 0 76)
(Parent-Version mipsy 0 75)
(Project-Version mipsy 0 77)
(Parent-Version mipsy 0 76)
(Version-Log
"Index: ChangeLog
from Benot Perrot <benoit@lrde.epita.fr>
* INSTALL: New.
* README, TODO: Update.
Homogenize attribute names.
* dev/inst-builder-gen.py, src/inst/program_builder.cc,
* src/inst/data_section.hh, src/inst/data_section.cc,
* src/inst/exp.hh, src/inst/exp.cc,
* src/inst/label.cc, src/inst/label.hh,
* src/inst/program.hh,
* src/inst/program_solver.hh,
* src/inst/register.hh,
* src/inst/section.hh,
* src/inst/text_section.hh, src/inst/text_section.cc,
* src/misc/deref.hh, src/misc/escape.hh,
* src/task/task.cc, src/task/task.hh
* src/task/task_register.cc, src/task/task_register.hh
* src/vm/cpu.hh, src/vm/cpu.cc
* src/vm/memory.hh, src/vm/segment.hh,
* src/vm/table.hh,
* src/vm/virtual_machine.hh:
Rename...
(_program, fill_delay_slot_p, _size, bytes, immediate, integer)
(label, kind, left, right, set, set_node, _text_section, _data_section)
(_pc, _program, kind, index, labels, offsets, insts, postr, s)
(print_delim, _long_opt, _short_opt, _module, _description)
(dependencies, _execute, _modules, _tasks, _enabled_tasks, mmu, GPR)
(hi, lo, pc, unlimited, halt, istr, ostr, call_stack)
(check_callee_save_p, trace_p, bubble, pipeline, heap, stack)
(stack_top, _size, _bytes, _scopes, memory, mmu, cpu)
as...
(program_, fill_delay_slot_p_, size_, bytes_, immediate_, integer_)
(label_, kind_, left_, right_, set_, set_node_, text_section_)
(data_section_, pc_, program_, kind_, index_, labels_, offsets_)
(insts_, postr_, s_, print_delim_, long_opt_, short_opt_, module_)
(description_, dependencies_, execute_, modules_, tasks_)
(enabled_tasks_, mmu_, GPR_, hi_, lo_, pc_, unlimited_, halt_, istr_)
(ostr_, call_stack_, check_callee_save_p_, trace_p_, bubble_)
(pipeline_, heap_, stack_, stack_top_, size_, bytes_, scopes_)
(memory_, mmu_, cpu_)
")
(New-Version-Log
"")
(Checkin-Time "Sun, 21 Mar 2004 16:39:08 +0100")
(Checkin-Login noe)
(Checkin-Time "Sun, 28 Mar 2004 17:02:13 +0200")
(Checkin-Login benoit)
(Files
;; ./
(AUTHORS (mipsy/0_AUTHORS 1.1 604))
(COPYING (mipsy/1_COPYING 1.1 604))
(ChangeLog (mipsy/2_ChangeLog 1.70 604))
(AUTHORS (mipsy/0_AUTHORS 1.1 644))
(COPYING (mipsy/1_COPYING 1.1 644))
(ChangeLog (mipsy/2_ChangeLog 1.71 604))
(INSTALL (mipsy/b/12_INSTALL 1.1 604))
(Makefile.am (mipsy/3_Makefile.a 1.8 604))
(NEWS (mipsy/b/25_NEWS 1.6 604))
......@@ -35,11 +70,11 @@ from Beno
(prj (mipsy.prj) :symlink)
;; ./config/
(config/Makefile.am (mipsy/7_Makefile.a 1.1 604))
(config/Makefile.am (mipsy/7_Makefile.a 1.1 644))
;; ./dev/
(dev/doc-inst-set-gen.py (mipsy/c/21_doc-inst-s 1.3 705))
(dev/inst-builder-gen.py (mipsy/15_mipsy-buil 1.11 705))
(dev/inst-builder-gen.py (mipsy/15_mipsy-buil 1.12 705))
(dev/inst-makefile-gen.py (mipsy/b/15_mipsy-mk-i 1.8 705))
(dev/inst-nodes-gen.py (mipsy/12_mipsy-inst 1.9 705))
(dev/mipsy.py (mipsy/16_mipsy.py 1.8 705))
......@@ -58,123 +93,123 @@ from Beno
(doc/mipsy.texi (mipsy/b/10_mipsy.texi 1.4 604))
;; ./src/
(src/Makefile.am (mipsy/18_Makefile.a 1.2 604))
(src/common.hh (mipsy/19_common.hh 1.4 604))
(src/mipsy-tasks.cc (mipsy/20_mipsy-task 1.3 604))
(src/mipsy-tasks.hh (mipsy/21_mipsy-task 1.3 604))
(src/Makefile.am (mipsy/18_Makefile.a 1.2 644))
(src/common.hh (mipsy/19_common.hh 1.4 644))
(src/mipsy-tasks.cc (mipsy/20_mipsy-task 1.3 644))
(src/mipsy-tasks.hh (mipsy/21_mipsy-task 1.3 644))
(src/mipsy.cc (mipsy/22_mipsy.cc 1.4 604))
(src/modules.hh (mipsy/23_modules.hh 1.3 604))
(src/modules.hh (mipsy/23_modules.hh 1.3 644))
;; ./src/inst/
(src/inst/data_section.hh (mipsy/24_data_secti 1.7 604))
(src/inst/data_section.cc (mipsy/c/31_data_secti 1.1 604))
(src/inst/data_section.hh (mipsy/24_data_secti 1.8 604))
(src/inst/data_section.cc (mipsy/c/31_data_secti 1.2 644))
(src/inst/exp-visitor.hh (mipsy/25_exp-visito 1.4 604))
(src/inst/exp.hh (mipsy/26_exp.hh 1.6 604))
(src/inst/exp.cc (mipsy/c/32_exp.cc 1.1 604))
(src/inst/inst-tasks.cc (mipsy/b/23_inst-tasks 1.2 604))
(src/inst/inst-tasks.hh (mipsy/b/22_inst-tasks 1.2 604))
(src/inst/inst.hh (mipsy/27_inst.hh 1.3 604))
(src/inst/label.cc (mipsy/b/21_label.cc 1.3 604))
(src/inst/label.hh (mipsy/b/20_label.hh 1.3 604))
(src/inst/program.hh (mipsy/28_program.hh 1.3 604))
(src/inst/program_builder.cc (mipsy/29_program_bu 1.13 604))
(src/inst/program_solver.hh (mipsy/30_program_so 1.7 604))
(src/inst/register.hh (mipsy/31_register.h 1.5 604))
(src/inst/section.hh (mipsy/b/24_section.hh 1.7 604))
(src/inst/text_section.hh (mipsy/32_text_secti 1.7 604))
(src/inst/text_section.cc (mipsy/c/33_text_secti 1.1 604))
(src/inst/exp.hh (mipsy/26_exp.hh 1.7 604))
(src/inst/exp.cc (mipsy/c/32_exp.cc 1.2 644))
(src/inst/inst-tasks.cc (mipsy/b/23_inst-tasks 1.2 644))
(src/inst/inst-tasks.hh (mipsy/b/22_inst-tasks 1.2 644))
(src/inst/inst.hh (mipsy/27_inst.hh 1.3 644))
(src/inst/label.cc (mipsy/b/21_label.cc 1.4 604))
(src/inst/label.hh (mipsy/b/20_label.hh 1.4 604))
(src/inst/program.hh (mipsy/28_program.hh 1.4 644))
(src/inst/program_builder.cc (mipsy/29_program_bu 1.14 604))
(src/inst/program_solver.hh (mipsy/30_program_so 1.8 644))
(src/inst/register.hh (mipsy/31_register.h 1.6 644))
(src/inst/section.hh (mipsy/b/24_section.hh 1.8 604))
(src/inst/text_section.hh (mipsy/32_text_secti 1.8 604))
(src/inst/text_section.cc (mipsy/c/33_text_secti 1.2 644))
;; ./src/misc/
(src/misc/Makefile.am (mipsy/33_Makefile.a 1.2 604))
(src/misc/contract.hh (mipsy/34_contract.h 1.1 604))
(src/misc/deref.hh (mipsy/35_deref.hh 1.1 604))
(src/misc/escape.hh (mipsy/36_escape.hh 1.1 604))
(src/misc/has.hh (mipsy/37_has.hh 1.1 604))
(src/misc/Makefile.am (mipsy/33_Makefile.a 1.2 644))
(src/misc/contract.hh (mipsy/34_contract.h 1.1 644))
(src/misc/deref.hh (mipsy/35_deref.hh 1.2 644))
(src/misc/escape.hh (mipsy/36_escape.hh 1.2 644))
(src/misc/has.hh (mipsy/37_has.hh 1.1 644))
(src/misc/select_const.hh (mipsy/38_select_con 1.2 604))
;; ./src/parse/
(src/parse/Makefile.am (mipsy/39_Makefile.a 1.4 604))
(src/parse/asm-scan.hh (mipsy/40_asm-scan.h 1.3 604))
(src/parse/libparse.cc (mipsy/41_libparse.c 1.5 604))
(src/parse/libparse.hh (mipsy/42_libparse.h 1.5 604))
(src/parse/parse-tasks.cc (mipsy/43_parse-task 1.7 604))
(src/parse/parse-tasks.hh (mipsy/44_parse-task 1.5 604))
(src/parse/asm-scan.hh (mipsy/40_asm-scan.h 1.3 644))
(src/parse/libparse.cc (mipsy/41_libparse.c 1.5 644))
(src/parse/libparse.hh (mipsy/42_libparse.h 1.5 644))
(src/parse/parse-tasks.cc (mipsy/43_parse-task 1.7 644))
(src/parse/parse-tasks.hh (mipsy/44_parse-task 1.5 644))
;; ./src/task/
(src/task/Makefile.am (mipsy/45_Makefile.a 1.2 604))
(src/task/task-tasks.cc (mipsy/46_task-tasks 1.3 604))
(src/task/task-tasks.hh (mipsy/47_task-tasks 1.3 604))
(src/task/task.cc (mipsy/48_task.cc 1.4 604))
(src/task/task.hh (mipsy/49_task.hh 1.6 604))
(src/task/task_register.cc (mipsy/50_task_regis 1.7 604))
(src/task/task_register.hh (mipsy/51_task_regis 1.4 604))
(src/task/Makefile.am (mipsy/45_Makefile.a 1.2 644))
(src/task/task-tasks.cc (mipsy/46_task-tasks 1.3 644))
(src/task/task-tasks.hh (mipsy/47_task-tasks 1.3 644))
(src/task/task.cc (mipsy/48_task.cc 1.5 644))
(src/task/task.hh (mipsy/49_task.hh 1.7 604))
(src/task/task_register.cc (mipsy/50_task_regis 1.8 604))
(src/task/task_register.hh (mipsy/51_task_regis 1.5 604))
;; ./src/vm/
(src/vm/Makefile.am (mipsy/b/0_Makefile.a 1.4 604))
(src/vm/cpu.hh (mipsy/b/1_cpu.hh 1.15 604))
(src/vm/cpu.cc (mipsy/b/5_virtual_ma 1.22 604))
(src/vm/memory.hh (mipsy/b/2_memory.hh 1.9 604))
(src/vm/cpu.hh (mipsy/b/1_cpu.hh 1.16 604))
(src/vm/cpu.cc (mipsy/b/5_virtual_ma 1.23 604))
(src/vm/memory.hh (mipsy/b/2_memory.hh 1.10 604))
(src/vm/mmu.hh (mipsy/c/15_mmu.hh 1.3 604))
(src/vm/segment.hh (mipsy/b/3_segment.hh 1.4 604))
(src/vm/table.hh (mipsy/b/4_table.hh 1.4 604))
(src/vm/virtual_machine.hh (mipsy/b/6_virtual_ma 1.15 604))
(src/vm/segment.hh (mipsy/b/3_segment.hh 1.5 644))
(src/vm/table.hh (mipsy/b/4_table.hh 1.5 604))
(src/vm/virtual_machine.hh (mipsy/b/6_virtual_ma 1.16 604))
(src/vm/vm-tasks.cc (mipsy/b/7_vm-tasks.c 1.7 604))
(src/vm/vm-tasks.hh (mipsy/b/8_vm-tasks.h 1.4 604))
;; ./tests/
(tests/Makefile.am (mipsy/b/26_Makefile.a 1.1 604))
(tests/common.mk (mipsy/b/27_common.mk 1.1 604))
(tests/generate-ref.mk (mipsy/b/28_generate-r 1.1 604))
(tests/mipsy-check (mipsy/b/29_mipsy-chec 1.1 705))
(tests/Makefile.am (mipsy/b/26_Makefile.a 1.1 644))
(tests/common.mk (mipsy/b/27_common.mk 1.1 644))
(tests/generate-ref.mk (mipsy/b/28_generate-r 1.1 644))
(tests/mipsy-check (mipsy/b/29_mipsy-chec 1.1 745))
;; ./tests/good/
(tests/good/Makefile.am (mipsy/b/30_Makefile.a 1.2 604))
(tests/good/add-sub.s (mipsy/b/31_add-sub.s 1.2 604))
(tests/good/and-or-nor-xor.s (mipsy/b/32_and-or-nor 1.2 604))
(tests/good/add-sub.s (mipsy/b/31_add-sub.s 1.2 644))
(tests/good/and-or-nor-xor.s (mipsy/b/32_and-or-nor 1.2 644))
(tests/good/check-good (mipsy/c/9_check-good 1.2 705))
(tests/good/exit.s (mipsy/b/33_exit.s 1.2 604))
(tests/good/extended-euclide.s (mipsy/b/34_extended-e 1.2 604))
(tests/good/gtcd.s (mipsy/b/35_gtcd.s 1.2 604))
(tests/good/modular-exponent.s (mipsy/b/36_modular-ex 1.2 604))
(tests/good/neg.s (mipsy/b/37_neg.s 1.2 604))
(tests/good/not.s (mipsy/b/38_not.s 1.2 604))
(tests/good/print.s (mipsy/b/39_print.s 1.2 604))
(tests/good/print_int.s (mipsy/b/40_print_int. 1.2 604))
(tests/good/read_int.in (mipsy/b/41_read_int.i 1.1 604))
(tests/good/read_int.s (mipsy/b/42_read_int.s 1.2 604))
(tests/good/seq-sne.s (mipsy/b/43_seq-sne.s 1.2 604))
(tests/good/shift.s (mipsy/b/44_shift.s 1.2 604))
(tests/good/exit.s (mipsy/b/33_exit.s 1.2 644))
(tests/good/extended-euclide.s (mipsy/b/34_extended-e 1.2 644))
(tests/good/gtcd.s (mipsy/b/35_gtcd.s 1.2 644))
(tests/good/modular-exponent.s (mipsy/b/36_modular-ex 1.2 644))
(tests/good/neg.s (mipsy/b/37_neg.s 1.2 644))
(tests/good/not.s (mipsy/b/38_not.s 1.2 644))
(tests/good/print.s (mipsy/b/39_print.s 1.2 644))
(tests/good/print_int.s (mipsy/b/40_print_int. 1.2 644))
(tests/good/read_int.in (mipsy/b/41_read_int.i 1.1 644))
(tests/good/read_int.s (mipsy/b/42_read_int.s 1.2 644))
(tests/good/seq-sne.s (mipsy/b/43_seq-sne.s 1.2 644))
(tests/good/shift.s (mipsy/b/44_shift.s 1.2 644))
;; ./tests/lexical/
(tests/lexical/Makefile.am (mipsy/b/45_Makefile.a 1.1 604))
(tests/lexical/check-lexical (mipsy/c/10_check-lexi 1.1 705))
(tests/lexical/invalid-string-hexa.s (mipsy/b/46_invalid-st 1.1 604))
(tests/lexical/invalid-string-octal.s (mipsy/b/47_invalid-st 1.1 604))
(tests/lexical/unlimited-regs.s (mipsy/b/48_unlimited- 1.1 604))
(tests/lexical/unrecognized-escape.s (mipsy/b/49_unrecogniz 1.1 604))
(tests/lexical/unterminated-string.s (mipsy/b/50_unterminat 1.1 604))
(tests/lexical/Makefile.am (mipsy/b/45_Makefile.a 1.1 644))
(tests/lexical/check-lexical (mipsy/c/10_check-lexi 1.1 745))
(tests/lexical/invalid-string-hexa.s (mipsy/b/46_invalid-st 1.1 644))
(tests/lexical/invalid-string-octal.s (mipsy/b/47_invalid-st 1.1 644))
(tests/lexical/unlimited-regs.s (mipsy/b/48_unlimited- 1.1 644))
(tests/lexical/unrecognized-escape.s (mipsy/b/49_unrecogniz 1.1 644))
(tests/lexical/unterminated-string.s (mipsy/b/50_unterminat 1.1 644))
;; ./tests/runtime/
(tests/runtime/Makefile.am (mipsy/b/51_Makefile.a 1.1 604))
(tests/runtime/Makefile.am (mipsy/b/51_Makefile.a 1.1 644))
(tests/runtime/check-runtime (mipsy/c/11_check-runt 1.2 705))
(tests/runtime/neg.s (mipsy/c/0_neg.s 1.2 604))
(tests/runtime/no-main.s (mipsy/c/1_no-main.s 1.2 604))
(tests/runtime/neg.s (mipsy/c/0_neg.s 1.2 644))
(tests/runtime/no-main.s (mipsy/c/1_no-main.s 1.2 644))
;; ./tests/solve/
(tests/solve/Makefile.am (mipsy/c/2_Makefile.a 1.1 604))
(tests/solve/check-solve (mipsy/c/12_check-solv 1.1 705))
(tests/solve/undefined-labels.s (mipsy/c/3_undefined- 1.2 604))
(tests/solve/Makefile.am (mipsy/c/2_Makefile.a 1.1 644))
(tests/solve/check-solve (mipsy/c/12_check-solv 1.1 745))
(tests/solve/undefined-labels.s (mipsy/c/3_undefined- 1.2 644))
;; ./tests/syntax/
(tests/syntax/Makefile.am (mipsy/c/4_Makefile.a 1.1 604))
(tests/syntax/Makefile.am (mipsy/c/4_Makefile.a 1.1 644))
(tests/syntax/asciiz-wrong-param.s (mipsy/c/5_asciiz-wro 1.2 604))
(tests/syntax/check-syntax (mipsy/c/13_check-synt 1.1 705))
(tests/syntax/too-many-operands.s (mipsy/c/6_too-many-o 1.2 604))
(tests/syntax/check-syntax (mipsy/c/13_check-synt 1.1 745))
(tests/syntax/too-many-operands.s (mipsy/c/6_too-many-o 1.2 644))
;; ./tests/unlimited/
(tests/unlimited/Makefile.am (mipsy/c/7_Makefile.a 1.2 604))
(tests/unlimited/check-unlimited (mipsy/c/14_check-unli 1.2 705))
(tests/unlimited/simple-exp.s (mipsy/c/8_simple-exp 1.2 604))
(tests/unlimited/simple-exp.s (mipsy/c/8_simple-exp 1.2 644))
)
(Populate-Ignore
......
......@@ -36,23 +36,22 @@ namespace inst
void
DataSection::print(std::ostream& ostr) const
{
if (_size == 0)
if (size_ == 0)
return;
ostr << "\t.data" << std::endl;
int i = 0;
while (i < _size)
while (i < size_)
{
std::map<int, label_list_type>::const_iterator it =
labels.find(i);
if (it != labels.end())
std::map<int, label_list_type>::const_iterator it = labels_.find(i);
if (it != labels_.end())
for (label_list_type::const_iterator l = (*it).second.begin();
l != (*it).second.end(); ++l)
ostr << *(*l) << ':' << std::endl;
ostr << "\t.byte\t0x"
<< std::hex << static_cast<unsigned>(bytes[i++])
<< std::hex << static_cast<unsigned>(bytes_[i++])
<< std::endl;
}
ostr << std::dec;
......
......@@ -38,38 +38,38 @@ namespace inst
{
public:
DataSection():
_size(0)
size_(0)
{
std::memset(bytes, 0, INST_DATA_DATASIZE);
std::memset(bytes_, 0, INST_DATA_DATASIZE);
}
virtual ~DataSection();
public:
int size () const
{
return _size;
return size_;
}
public:
void add_label(Label *label)
{
Section::add_label(label, _size);
Section::add_label(label, size_);
}
public:
void add_space(int space_size)
{
// FIXME: check b in byte range
precondition(_size + space_size < INST_DATA_DATASIZE);
_size += space_size;
precondition(size_ + space_size < INST_DATA_DATASIZE);
size_ += space_size;
}
void add_byte(int b)
{
// FIXME: check b in byte range
precondition(_size < INST_DATA_DATASIZE);
bytes[_size] = b;
++_size;
precondition(size_ < INST_DATA_DATASIZE);
bytes_[size_] = b;
++size_;
}
void add_word(int w)
......@@ -90,8 +90,8 @@ namespace inst
public:
int load_byte(int offset) const
{
precondition ((0 <= offset && offset < _size));
return (int8_t)bytes[offset];
precondition ((0 <= offset && offset < size_));
return (int8_t)bytes_[offset];
}
......@@ -99,8 +99,8 @@ namespace inst
virtual void print(std::ostream& ostr) const;
protected:
int _size;
uint8_t bytes[INST_DATA_DATASIZE];
int size_;
uint8_t bytes_[INST_DATA_DATASIZE];
};
} // namespace inst
......
......@@ -36,7 +36,7 @@ namespace inst
void
Exp::print(std::ostream& ostr) const
{
ostr << immediate;
ostr << immediate_;
}
......@@ -71,7 +71,7 @@ namespace inst
void
IntExp::print(std::ostream& ostr) const
{
ostr << integer;
ostr << integer_;
}
......@@ -107,7 +107,7 @@ namespace inst
void
LabelExp::print(std::ostream& ostr) const
{
ostr << label;
ostr << label_;
}
......@@ -144,15 +144,15 @@ namespace inst
void
OpExp::print(std::ostream& ostr) const
{
ostr << *left;
switch (kind)
ostr << *left_;
switch (kind_)
{
case add: ostr << " + "; break;
case sub: ostr << " - "; break;
case mul: ostr << " * "; break;
case div: ostr << " / "; break;
}
ostr << *right;
ostr << *right_;
}
} // namespace inst
......@@ -33,7 +33,7 @@ namespace inst
{
public:
Exp():
immediate(-2097) // Caracteristic initial value
immediate_(-2097) // Caracteristic initial value
{
}
virtual ~Exp();
......@@ -47,18 +47,18 @@ namespace inst
public:
operator int () const
{
return immediate;
return immediate_;
}
int get_immediate()
{
return immediate;
return immediate_;
}
void set_immediate(int i)
{
immediate = i;
immediate_ = i;
}
protected:
int immediate;
int immediate_;
};
inline std::ostream&
operator<<(std::ostream& ostr, const Exp& e)
......@@ -72,7 +72,7 @@ namespace inst
{
public:
IntExp(int integer):
integer(integer)
integer_(integer)
{
}
virtual ~IntExp();
......@@ -84,14 +84,14 @@ namespace inst
public:
int get_integer() const
{
return integer;
return integer_;
}
public:
virtual void print(std::ostream& ostr) const;
protected:
int integer;
int integer_;
};
class LabelExp:
......@@ -99,7 +99,7 @@ namespace inst
{
public:
LabelExp(Label *label):
label(label)
label_(label)
{
}
virtual ~LabelExp();
......@@ -111,18 +111,18 @@ namespace inst
public:
const Label& get_label() const
{
return *label;
return *label_;
}
Label& get_label