1 #include "../Iinstr.hpp"
4 class Cldw : public Iinstr {
9 std::string toString();
13 * Name: create_instruction
14 * Purpose: if compiled as shared library, this functions creates the
17 * Returns: pointer to instruction object
19 extern "C" Iinstr* create_instruction() {
24 * Name: destroy_instruction
25 * Purpose: if compiled as shared library, this functions destoys the
28 * Parameter: IInstruction - the instruction object to delete
30 extern "C" void destroy_instruction(Iinstr* p) {
40 void Cldw::evalInstr()
44 dynamic_bitset<> immb = argbits;
46 this->m_imm = this->generate15ImmSign(immb.to_ulong());
49 m_ra = this->getRegister(argbits);
51 m_rd = this->getRegister(argbits);
55 void Cldw::execInstr()
57 cout << "should exec " << this->toString() << endl;
60 std::string Cldw::toString()
63 op << this->getName();
65 op << this->getConditionFlag() << " r" << m_rd << ", " << m_imm << "(r" << m_ra << ")";