Commit 61d026d1 authored by Benoit Perrot's avatar Benoit Perrot
Browse files

Index: ChangeLog

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

	Emulate `lui'

	* dev/nolimips.xml:
	Add `lui' instruction.
	* src/vm/cpu.hh, src/vm/cpu.cc:
	Emulate `lui'.
parent 7a14e3ed
2004-09-20 Benot Perrot <benoit@lrde.epita.fr>
Emulate `lui'
* dev/nolimips.xml:
Add `lui' instruction.
* src/vm/cpu.hh, src/vm/cpu.cc:
Emulate `lui'.
2004-09-20 Benot Perrot <benoit@lrde.epita.fr>
Li is not a native instruction
......
......@@ -1026,6 +1026,19 @@ dest as a signed value.</description>
</syntax>
</instruction>
<instruction opcode="lui" level="native" kind="load">
<description>Move the constant imm into the upper half word of
dest.</description>
<format>
<attribute type="Register" name="dest"/>
<attribute type="Exp" name="imm"/>
</format>
<syntax>
<token kind="register" />
<token kind="immediate" />
</syntax>
</instruction>
<instruction opcode="li" level="pseudo" kind="load">
<description>Move the constant imm into dest.</description>
<syntax alias="ori">
......
......@@ -365,6 +365,12 @@ namespace vm
// Move instructions
// --------------------------------------------------------------------------
void
Cpu::visit(const inst::Lui& lui)
{
set_register(lui.get_dest (), lui.get_imm () << 16);
}
// Store
void
Cpu::visit(const inst::Sb& sb)
......
......@@ -195,6 +195,7 @@ namespace vm
virtual void visit(const inst::Lb& lb);
virtual void visit(const inst::Lbu& Lbu);
virtual void visit(const inst::Lw& lw);
virtual void visit(const inst::Lui& lui);
virtual void visit(const inst::Sb& sb);
virtual void visit(const inst::Sw& sw);
......
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