X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=3c_disasm%2Finstr%2Fsub.cpp;h=ce8ca6488f181c5dd476beb1a3562668b13e58ff;hb=1968f329b10681b760faec9369aa893cd2af8d44;hp=d17473512e1b5249e084479f61690b483920d04e;hpb=f7afa120e8de972b9afb88125fb7dc49fcfccbbe;p=calu.git diff --git a/3c_disasm/instr/sub.cpp b/3c_disasm/instr/sub.cpp index d174735..ce8ca64 100644 --- a/3c_disasm/instr/sub.cpp +++ b/3c_disasm/instr/sub.cpp @@ -1,3 +1,24 @@ +/* `Deep Thought', a softcore CPU implemented on a FPGA + + Copyright (C) 2010 Markus Hofstaetter + Copyright (C) 2010 Martin Perner + Copyright (C) 2010 Stefan Rebernig + Copyright (C) 2010 Manfred Schwarz + Copyright (C) 2010 Bernhard Urban + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + #include "../Iinstr.hpp" class Csub : public Iinstr { @@ -64,7 +85,7 @@ void Csub::execInstr() CDatd val = ra - rb; this->m_cpu->setRegister(m_rd, val); if(!this->m_d) { - this->m_cpu->updateFlags(val, ra, rb); + this->m_cpu->updateFlags(val, ra, (~rb)+1); } }