From 65e5b2a7af27acfc56664224ebe2421778d484bd Mon Sep 17 00:00:00 2001 From: Martin Perner Date: Tue, 9 Nov 2010 17:42:13 +0100 Subject: [PATCH] sim: bugfix in stackop --- 3c_disasm/instr/stackop.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.25.1