Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/libmeteor/include/ameteor/disassembler/argmulregisters.hpp
2 views
1
// Meteor - A Nintendo Gameboy Advance emulator
2
// Copyright (C) 2009-2011 Philippe Daouadi
3
//
4
// This program is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation, either version 3 of the License, or
7
// (at your option) any later version.
8
//
9
// This program is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
// GNU General Public License for more details.
13
//
14
// You should have received a copy of the GNU General Public License
15
// along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17
#ifndef __ARG_MUL_REGISTERS_H__
18
#define __ARG_MUL_REGISTERS_H__
19
20
#include "argument.hpp"
21
22
#include <stdint.h>
23
#include <vector>
24
25
namespace AMeteor
26
{
27
namespace Disassembler
28
{
29
enum SpecialRegister
30
{
31
SPREG_NONE = 0,
32
SPREG_LR = 1,
33
SPREG_PC = 2
34
};
35
36
class ArgMulRegisters : public Argument
37
{
38
public :
39
ArgMulRegisters (bool forceuser) :
40
m_lastreg(SPREG_NONE),
41
m_forceuser(forceuser)
42
{ }
43
44
Argument* Clone () const;
45
46
void AddRegister(uint8_t reg)
47
{
48
m_regs.push_back(reg);
49
}
50
void AddLastRegister(SpecialRegister reg)
51
{
52
m_lastreg = reg;
53
}
54
55
std::string GetString () const;
56
57
private :
58
typedef std::vector<uint8_t> Registers;
59
60
Registers m_regs;
61
SpecialRegister m_lastreg;
62
bool m_forceuser;
63
};
64
}
65
}
66
67
#endif
68
69