1 #include "../Iinstr.hpp"
3 class Cmovf : public Iinstr {
10 std::string toString();
15 * Name: create_instruction
16 * Purpose: if compiled as shared library, this functions creates the
19 * Returns: pointer to instruction object
21 extern "C" Iinstr* create_instruction() {
25 Iinstr* Cmovf::getNew() {
30 * Name: destroy_instruction
31 * Purpose: if compiled as shared library, this functions destoys the
34 * Parameter: IInstruction - the instruction object to delete
36 extern "C" void destroy_instruction(Iinstr* p) {
40 Cmovf::Cmovf() : m_type(0)
46 void Cmovf::evalInstr()
48 this->m_type = argbits[18];
57 m_rd = this->getRegister(argbits);
60 void Cmovf::execInstr()
62 //cout << "should exec " << this->toString() << endl;
65 val = this->m_cpu->getFlags();
68 val = this->m_cpu->getStack();
70 this->m_cpu->setRegister(this->m_rd, val);
73 std::string Cmovf::toString()
76 op << this->getName();