From: Martin Perner Date: Tue, 9 Nov 2010 16:42:13 +0000 (+0100) Subject: sim: bugfix in stackop X-Git-Tag: bootrom_v1~168 X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=calu.git;a=commitdiff_plain;h=65e5b2a7af27acfc56664224ebe2421778d484bd sim: bugfix in stackop --- diff --git a/3c_disasm/instr/stackop.cpp b/3c_disasm/instr/stackop.cpp index d4a1a77..1e56cfa 100644 --- a/3c_disasm/instr/stackop.cpp +++ b/3c_disasm/instr/stackop.cpp @@ -77,8 +77,8 @@ void Cstackop::execInstr() switch(this->m_typ) { case 0: - sp += 4; this->m_cpu->setRegister(m_rd, this->m_cpu->getRAM(sp)); + sp += 4; break; case 1: sp += 4; @@ -87,8 +87,8 @@ void Cstackop::execInstr() this->m_cpu->setRegister(m_rd, this->m_cpu->getRAM(sp)); break; case 3: - this->m_cpu->setRAM(sp, this->m_cpu->getRegister(m_rd)); sp -= 4; + this->m_cpu->setRAM(sp, this->m_cpu->getRegister(m_rd)); break; default: cerr << "What have you done? 2 bits that have more than 4 values?!" << endl;