disasm/sim: changed interface, branch => br, features++
[calu.git] / 3c_disasm / instr / ldi.cpp
index 2c523a1f254afdfb77a35edd7d74ce5a0eb9b606..98e72cae80a54ac0f54d5a9a94bb06b80abea34f 100644 (file)
@@ -7,6 +7,7 @@ class Cldi : public Iinstr {
                void evalInstr();
                void execInstr();
                std::string toString();
+               Iinstr* getNew();
 };
 
 /**
@@ -20,6 +21,10 @@ extern "C" Iinstr* create_instruction() {
     return new Cldi();
 }
 
+Iinstr* Cldi::getNew()
+{
+    return new Cldi();
+}
 /**
  * Name:      destroy_instruction
  * Purpose:   if compiled as shared library, this functions destoys the 
@@ -54,6 +59,7 @@ void Cldi::evalInstr()
 void Cldi::execInstr()
 {
        cout << "should exec " << this->toString() << endl;
+       this->m_cpu->setRegister(this->m_rd, this->m_imm);
 }
 
 std::string Cldi::toString()