Commit 8303533c authored by Benoit Perrot's avatar Benoit Perrot
Browse files

Index: ChangeLog

from  Benoît Perrot  <benoit@lrde.epita.fr>
        * NEWS,
        * dev/inst-builder-gen.py,
        * src/parse/libparse.cc, src/parse/libparse.hh,
        * src/parse/parse-tasks.cc, src/parse/parse-tasks.hh,
        * src/shell/cmd.hh,
        * src/shell/shell.cc, src/shell/shell.hh,
        * tests/good/Makefile.am, tests/good/check-good
        * tests/runtime/check-runtime,
        * tests/unlimited/Makefile.am, tests/unlimited/check-unlimited:
        Rename `--fill-delay-slots' to `--nop-after-branch', which is more
        accurate. Reserve `--fill-delay-slots' for optimal delay slots
        filling.
parent 0ed87a67
2004-05-08 Benot Perrot <benoit@lrde.epita.fr>
* NEWS,
* dev/inst-builder-gen.py,
* src/parse/libparse.cc, src/parse/libparse.hh,
* src/parse/parse-tasks.cc, src/parse/parse-tasks.hh,
* src/shell/cmd.hh,
* src/shell/shell.cc, src/shell/shell.hh,
* tests/good/Makefile.am, tests/good/check-good
* tests/runtime/check-runtime,
* tests/unlimited/Makefile.am, tests/unlimited/check-unlimited:
Rename `--fill-delay-slots' to `--nop-after-branch', which is more
accurate. Reserve `--fill-delay-slots' for optimal delay slots
filling.
2004-05-08 Benot Perrot <benoit@lrde.epita.fr>
* tests/good/fact.s, tests/good/Makefile.am:
......
-*- text -*-
New in 0.6:
* `--fill-delay-slots' was renamed to `--nop-after-branch', which is
more accurate. `--fill-delay-slots' may reappear in the future but
it will then stands for optimal delay slots filling.
* Option engine now supports concatenated short options. The command:
mipsy -Fue file.s
executes `file.s' with disabled delay slots and unlimited registers support.
......
......@@ -49,15 +49,15 @@ namespace inst
class ProgramBuilder
{
public:
ProgramBuilder(bool fill_delay_slot_p = false):
program_(0), fill_delay_slot_p_(fill_delay_slot_p)
ProgramBuilder(bool nop_after_branch_p = false):
program_(0), nop_after_branch_p_(nop_after_branch_p)
{
}
public:
void reset(bool fill_delay_slot_p = false)
void reset(bool nop_after_branch_p = false)
{
fill_delay_slot_p_ = fill_delay_slot_p;
nop_after_branch_p_ = nop_after_branch_p;
program_ = new Program();
}
......@@ -132,7 +132,7 @@ for inst in instructions:
call = "new " + class_id(inst.opcode) + "(" + call + ")"
print " program_->text_section().add_inst (" + call + ");"
if inst.kind == "branch":
print " if (fill_delay_slot_p_)"
print " if (nop_after_branch_p_)"
print " program_->text_section()."
print " add_inst (new Sll(Register(Register::general, " + \
"Cpu::zero), "
......@@ -154,7 +154,7 @@ for inst in instructions:
print """
protected:
Program* program_;
bool fill_delay_slot_p_;
bool nop_after_branch_p_;
};
} // namespace inst
......
......@@ -2,20 +2,30 @@
(Created-By-Prcs-Version 1 3 2)
(Project-Description "")
(Project-Version mipsy 0 95)
(Parent-Version mipsy 0 94)
(Project-Version mipsy 0 96)
(Parent-Version mipsy 0 95)
(Version-Log
"Index: ChangeLog
from Benot Perrot <benoit@lrde.epita.fr>
* tests/good/fact.s, tests/good/Makefile.am:
Add new test.
* NEWS,
* dev/inst-builder-gen.py,
* src/parse/libparse.cc, src/parse/libparse.hh,
* src/parse/parse-tasks.cc, src/parse/parse-tasks.hh,
* src/shell/cmd.hh,
* src/shell/shell.cc, src/shell/shell.hh,
* tests/good/Makefile.am, tests/good/check-good
* tests/runtime/check-runtime,
* tests/unlimited/Makefile.am, tests/unlimited/check-unlimited:
Rename `--fill-delay-slots' to `--nop-after-branch', which is more
accurate. Reserve `--fill-delay-slots' for optimal delay slots
filling.
")
(New-Version-Log
"")
(Checkin-Time "Sat, 08 May 2004 21:23:55 +0200")
(Checkin-Time "Sat, 08 May 2004 21:53:53 +0200")
(Checkin-Login benoit)
(Files
......@@ -23,10 +33,10 @@ from Beno
;; ./
(AUTHORS (mipsy/0_AUTHORS 1.2 644))
(COPYING (mipsy/1_COPYING 1.1 644))
(ChangeLog (mipsy/2_ChangeLog 1.89 604))
(ChangeLog (mipsy/2_ChangeLog 1.90 604))
(INSTALL (mipsy/b/12_INSTALL 1.1 604))
(Makefile.am (mipsy/3_Makefile.a 1.9 604))
(NEWS (mipsy/b/25_NEWS 1.10 604))
(NEWS (mipsy/b/25_NEWS 1.11 604))
(README (mipsy/4_README 1.3 604))
(TODO (mipsy/5_TODO 1.3 604))
(bootstrap (mipsy/b/14_bootstrap 1.3 705))
......@@ -39,7 +49,7 @@ from Beno
;; ./dev/
(dev/doc-inst-set-gen.py (mipsy/c/21_doc-inst-s 1.4 705))
(dev/inst-builder-gen.py (mipsy/15_mipsy-buil 1.13 705))
(dev/inst-builder-gen.py (mipsy/15_mipsy-buil 1.14 705))
(dev/inst-makefile-gen.py (mipsy/b/15_mipsy-mk-i 1.9 705))
(dev/inst-nodes-gen.py (mipsy/12_mipsy-inst 1.11 705))
(dev/inst-solver-gen.py (mipsy/b/13_inst-solve 1.3 755))
......@@ -91,18 +101,18 @@ from Beno
;; ./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 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.6 644))
(src/parse/libparse.cc (mipsy/41_libparse.c 1.6 644))
(src/parse/libparse.hh (mipsy/42_libparse.h 1.6 644))
(src/parse/parse-tasks.cc (mipsy/43_parse-task 1.8 644))
(src/parse/parse-tasks.hh (mipsy/44_parse-task 1.7 644))
;; ./src/shell/
(src/shell/Makefile.am (mipsy/b/17_Makefile.a 1.2 644))
(src/shell/cmd.hh (mipsy/b/18_cmd.hh 1.3 644))
(src/shell/cmd.hh (mipsy/b/18_cmd.hh 1.4 644))
(src/shell/shell-tasks.cc (mipsy/b/19_shell-task 1.1 644))
(src/shell/shell-tasks.hh (mipsy/c/22_shell-task 1.2 644))
(src/shell/shell.cc (mipsy/c/23_shell.cc 1.4 644))
(src/shell/shell.hh (mipsy/c/24_shell.hh 1.3 644))
(src/shell/shell.cc (mipsy/c/23_shell.cc 1.5 644))
(src/shell/shell.hh (mipsy/c/24_shell.hh 1.4 644))
;; ./src/task/
(src/task/Makefile.am (mipsy/45_Makefile.a 1.2 644))
......@@ -133,10 +143,10 @@ from Beno
(tests/mipsy-check (mipsy/b/29_mipsy-chec 1.1 745))
;; ./tests/good/
(tests/good/Makefile.am (mipsy/b/30_Makefile.a 1.3 604))
(tests/good/Makefile.am (mipsy/b/30_Makefile.a 1.4 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/check-good (mipsy/c/9_check-good 1.3 705))
(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/fact.s (mipsy/c/26_fact.s 1.1 644))
......@@ -161,7 +171,7 @@ from Beno
;; ./tests/runtime/
(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/check-runtime (mipsy/c/11_check-runt 1.3 705))
(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))
......@@ -178,8 +188,8 @@ from Beno
(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/Makefile.am (mipsy/c/7_Makefile.a 1.3 604))
(tests/unlimited/check-unlimited (mipsy/c/14_check-unli 1.3 705))
(tests/unlimited/simple-exp.s (mipsy/c/8_simple-exp 1.2 644))
)
......
......@@ -33,7 +33,7 @@ namespace parse
bool unlimited_regs_p = false;
// Fill delay slot of native branch instructions with NOP.
bool fill_delay_slot_p = false;
bool nop_after_branch_p = false;
// Parse a MIPS asm file, return the corresponding abstract syntax.
::inst::Program*
......@@ -41,7 +41,7 @@ namespace parse
{
yy::Parser parser = yy::Parser (trace_parse_p, yy::Location ());
yy::program_builder.reset(fill_delay_slot_p);
yy::program_builder.reset(nop_after_branch_p);
scan_open (fname);
parser.parse ();
......
......@@ -35,7 +35,7 @@ namespace parse
extern bool unlimited_regs_p;
extern bool fill_delay_slot_p;
extern bool nop_after_branch_p;
} // namespace parse
......
......@@ -49,9 +49,9 @@ namespace parse
}
void
fill_delay_slot ()
nop_after_branch ()
{
fill_delay_slot_p = true;
nop_after_branch_p = true;
}
inst::Program* program = 0;
......
......@@ -39,9 +39,9 @@ namespace parse
TASK_DECLARE ("trace-parse", "Trace the parse",
trace_parse, "");
TASK_DECLARE ("F|fill-delay-slot",
"Fill delay slot of native branch instructions with NOP",
fill_delay_slot, "");
TASK_DECLARE ("N|nop-after-branch",
"Fill delay slot of branch instructions with a NOP",
nop_after_branch, "");
TASK_DECLARE ("parse", "Parse a file",
parse, "");
......
......@@ -62,7 +62,7 @@ namespace shell
cmd_undisplay,
cmd_dump,
cmd_mem,
cmd_fill_delay_slot,
cmd_nop_after_branch,
cmd_help
};
......@@ -129,8 +129,8 @@ namespace shell
case cmd_break:
e_break();
break;
case cmd_fill_delay_slot:
e_fill_delay_slot();
case cmd_nop_after_branch:
e_nop_after_branch();
break;
case cmd_null:
break;
......@@ -248,9 +248,9 @@ namespace shell
<< sh_.get_register(*list_args_.begin()) << std::endl;
}
void e_fill_delay_slot()
void e_nop_after_branch()
{
parse::tasks::fill_delay_slot();
parse::tasks::nop_after_branch();
}
void e_mem()
......@@ -290,8 +290,8 @@ namespace shell
<< "\tdump all the register value" << std::endl
<< "mem <addr>" << std::endl
<< "\tprint a the value of a memory region" << std::endl
<< "fill-delay-slot" << std::endl
<< "\tenable Fill delay slot of native branch instructions "
<< "nop-after-branch" << std::endl
<< "\tenable Fill delay slot of branch instructions "
<< "with NOP" << std::endl;
}
......
......@@ -94,7 +94,7 @@ namespace shell
map_token_["print"] = PRINT;
map_token_["p"] = PRINT;
map_token_["undisplay"] = UNDISPLAY;
map_token_["fill-delay-slot"] = FILL_DELAY_SLOT;
map_token_["nop-after-branch"] = NOP_AFTER_BRANCH;
map_token_["help"] = HELP;
map_token_["h"] = HELP;
......@@ -277,8 +277,8 @@ namespace shell
command->push_arg(tmp);
return command;
}
case FILL_DELAY_SLOT:
return new Cmd(Cmd::cmd_fill_delay_slot, *this);
case NOP_AFTER_BRANCH:
return new Cmd(Cmd::cmd_nop_after_branch, *this);
case HELP:
return new Cmd(Cmd::cmd_help, *this);
case TERROR:
......
......@@ -57,7 +57,7 @@ namespace shell
PRINT = 209,
DUMP = 210,
MEM = 211,
FILL_DELAY_SLOT = 212,
NOP_AFTER_BRANCH = 212,
HELP = 213
};
......
......@@ -23,5 +23,5 @@ dist_noinst_DATA = $(ASM_FILES) $(INPUT_FILES)
MODULE=good
include ../common.mk
PSYFLAGS=--fill-delay-slot --execute
PSYFLAGS=--nop-after-branch --execute
include ../generate-ref.mk
#!/bin/sh
MIPSY=$top_builddir/src/mipsy \
PSYFLAGS="--fill-delay-slot --execute" \
PSYFLAGS="--nop-after-branch --execute" \
$top_srcdir/tests/mipsy-check 0 good
#!/bin/sh
MIPSY=$top_builddir/src/mipsy \
PSYFLAGS="--fill-delay-slot --execute" \
PSYFLAGS="--nop-after-branch --execute" \
$top_srcdir/tests/mipsy-check 5 runtime
......@@ -8,5 +8,5 @@ dist_noinst_DATA = $(ASM_FILES)
MODULE=unlimited
include ../common.mk
PSYFLAGS=--unlimited-regs --fill-delay-slot --execute
PSYFLAGS=--unlimited-regs --nop-after-branch --execute
include ../generate-ref.mk
#!/bin/sh
MIPSY=$top_builddir/src/mipsy \
PSYFLAGS="--unlimited-regs --fill-delay-slot --execute" \
PSYFLAGS="--unlimited-regs --nop-after-branch --execute" \
$top_srcdir/tests/mipsy-check 0 unlimited
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment