Path: blob/master/libmeteor/source/disassembler/argpsr.cpp
2 views
// Meteor - A Nintendo Gameboy Advance emulator1// Copyright (C) 2009-2011 Philippe Daouadi2//3// This program is free software: you can redistribute it and/or modify4// it under the terms of the GNU General Public License as published by5// the Free Software Foundation, either version 3 of the License, or6// (at your option) any later version.7//8// This program is distributed in the hope that it will be useful,9// but WITHOUT ANY WARRANTY; without even the implied warranty of10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the11// GNU General Public License for more details.12//13// You should have received a copy of the GNU General Public License14// along with this program. If not, see <http://www.gnu.org/licenses/>.1516#include "ameteor/disassembler/argpsr.hpp"1718namespace AMeteor19{20namespace Disassembler21{22std::string ArgPsr::GetString () const23{24std::string out;2526if (m_spsr)27out = "SPSR";28else29out = "CPSR";3031if (m_fields <= 0xF)32{33out += '_';34if (m_fields & 0x1)35out += 'c';36if (m_fields & 0x2)37out += 'x';38if (m_fields & 0x4)39out += 's';40if (m_fields & 0x8)41out += 'f';42}4344return out;45}4647Argument* ArgPsr::Clone () const48{49return new ArgPsr(*this);50}51}52}535455