Merge pull request #90 from gizmo98/patch-2
[libretro-ppsspp.git] / Core / Opcode.h
blob6eb01c41fcafaca7d76a0563fbf85a690fdd4acd
1 // Copyright (C) 2013 PPSSPP Project.
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.
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.
12 // A copy of the GPL 2.0 should have been included with the program.
13 // If not, see http://www.gnu.org/licenses/
15 // Official SVN repository and contact information can be found at
16 // http://code.google.com/p/dolphin-emu/
18 #pragma once
20 #include "CommonTypes.h"
22 // Broken out of MemMap.h to avoid a bad include dependency.
24 namespace Memory {
26 struct Opcode {
27 Opcode() {
30 explicit Opcode(u32 v) : encoding(v) {
33 u32 operator & (const u32 &arg) const {
34 return encoding & arg;
37 u32 operator >> (const u32 &arg) const {
38 return encoding >> arg;
41 bool operator == (const u32 &arg) const {
42 return encoding == arg;
45 bool operator != (const u32 &arg) const {
46 return encoding != arg;
49 u32 encoding;