Commit 7ad718f1 authored by Benoit Perrot's avatar Benoit Perrot
Browse files

Add mul with immediate pseudo-instruction.

parent 263b6a76
2003-08-20 Benot Perrot <benoit@lrde.epita.fr>
* dev/mipsy.xml: Add mul with immediate pseudo-instruction.
* src/inst/program_builder.cc: Expand it.
2003-08-19 Benot Perrot <benoit@lrde.epita.fr>
* dev/mipsy-scanner-gen.py: Accept a quoted character as an integer
......
......@@ -149,6 +149,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
<register />
<register />
</syntax>
<syntax level="complex">
<register />
<register />
<immediate />
</syntax>
</instruction>
......
......@@ -2,16 +2,16 @@
(Created-By-Prcs-Version 1 3 2)
(Project-Description "")
(Project-Version mipsy 0 51)
(Parent-Version mipsy 0 50)
(Project-Version mipsy 0 52)
(Parent-Version mipsy 0 51)
(Version-Log
"Accept quoted characters.
"Add mul with immediate pseudo-instruction.
")
(New-Version-Log
"")
(Checkin-Time "Tue, 19 Aug 2003 19:43:22 +0200")
(Checkin-Time "Wed, 20 Aug 2003 16:32:31 +0200")
(Checkin-Login benoit)
(Files
......@@ -19,7 +19,7 @@
;; ./
(AUTHORS (mipsy/0_AUTHORS 1.1 644))
(COPYING (mipsy/1_COPYING 1.1 644))
(ChangeLog (mipsy/2_ChangeLog 1.45 644))
(ChangeLog (mipsy/2_ChangeLog 1.46 644))
(Makefile.am (mipsy/3_Makefile.a 1.5 644))
(NEWS (mipsy/b/25_NEWS 1.5 644))
(README (mipsy/4_README 1.2 644))
......@@ -38,7 +38,7 @@
(dev/mipsy-parser-gen.py (mipsy/13_mipsy-pars 1.4 745))
(dev/mipsy-scanner-gen.py (mipsy/14_mipsy-scan 1.6 745))
(dev/mipsy.py (mipsy/16_mipsy.py 1.4 745))
(dev/mipsy.xml (mipsy/17_mipsy.xml 1.10 644))
(dev/mipsy.xml (mipsy/17_mipsy.xml 1.11 644))
;; ./doc/
(doc/Makefile.am (mipsy/b/9_Makefile.a 1.1 644))
......@@ -63,7 +63,7 @@
(src/inst/label.cc (mipsy/b/21_label.cc 1.1 644))
(src/inst/label.hh (mipsy/b/20_label.hh 1.1 644))
(src/inst/program.hh (mipsy/28_program.hh 1.2 644))
(src/inst/program_builder.cc (mipsy/29_program_bu 1.9 644))
(src/inst/program_builder.cc (mipsy/29_program_bu 1.10 644))
(src/inst/program_solver.hh (mipsy/30_program_so 1.6 644))
(src/inst/register.hh (mipsy/31_register.h 1.4 644))
(src/inst/section.hh (mipsy/b/24_section.hh 1.4 604))
......
......@@ -41,6 +41,15 @@ namespace inst
* new Register(Register::general, Cpu::zero), src));
}
void
ProgramBuilder::add_mul(Register& dest, Register& src1, Exp& src2)
{
// Warning: is not implemented in as for mips, check why.
Register& at = * new Register(Register::general, Cpu::at);
_program->text_section ().add_inst(* new Li(at, src2));
_program->text_section ().add_inst(* new Mul(dest, src1, at));
}
void
ProgramBuilder::add_div(Register& dest, Register& src1, Register& src2)
{
......
Markdown is supported
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