Index: ChangeLog
from Benoît Perrot <benoit(a)lrde.epita.fr>
Emulate `lui'
* dev/nolimips.xml:
Add `lui' instruction.
* src/vm/cpu.hh, src/vm/cpu.cc:
Emulate `lui'.
2004-09-20 Benoît Perrot <benoit(a)lrde.epita.fr>
Index: src/vm/cpu.hh
--- src/vm/cpu.hh (revision 125)
+++ src/vm/cpu.hh (revision 126)
@@ -195,6 +195,7 @@
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);
Index: src/vm/cpu.cc
--- src/vm/cpu.cc (revision 125)
+++ src/vm/cpu.cc (revision 126)
@@ -365,6 +365,12 @@
// 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)
Index: dev/nolimips.xml
--- dev/nolimips.xml (revision 125)
+++ dev/nolimips.xml (revision 126)
@@ -1026,6 +1026,19 @@
</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">
Show replies by date
Do not forget to launch bootstrap, blabla, same as above.
--
Noe