CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
hrydgard

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: hrydgard/ppsspp
Path: blob/master/Core/Opcode.h
Views: 1401
1
// Copyright (C) 2013 PPSSPP Project.
2
3
// This program is free software: you can redistribute it and/or modify
4
// it under the terms of the GNU General Public License as published by
5
// the Free Software Foundation, version 2.0 or later versions.
6
7
// This program is distributed in the hope that it will be useful,
8
// but WITHOUT ANY WARRANTY; without even the implied warranty of
9
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
// GNU General Public License 2.0 for more details.
11
12
// A copy of the GPL 2.0 should have been included with the program.
13
// If not, see http://www.gnu.org/licenses/
14
15
// Official SVN repository and contact information can be found at
16
// http://code.google.com/p/dolphin-emu/
17
18
#pragma once
19
20
#include "Common/CommonTypes.h"
21
22
// Broken out of MemMap.h to avoid a bad include dependency.
23
24
namespace Memory {
25
26
struct Opcode {
27
Opcode() {
28
}
29
30
explicit Opcode(u32 v) : encoding(v) {
31
}
32
33
u32 operator & (const u32 &arg) const {
34
return encoding & arg;
35
}
36
37
u32 operator >> (const u32 &arg) const {
38
return encoding >> arg;
39
}
40
41
bool operator == (const u32 &arg) const {
42
return encoding == arg;
43
}
44
45
bool operator != (const u32 &arg) const {
46
return encoding != arg;
47
}
48
49
u32 encoding;
50
};
51
52
}
53
54