diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2018-11-09 04:45:47 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-09 04:45:47 +0100 |
| commit | 61b9ef33abd886c002490799b52878dfbb09754f (patch) | |
| tree | 9ec81c6dcf7606ec38c12b73da65f3459f9a6731 /Source/Core/Common/BitSet.h | |
| parent | 162e34ad2224081aa48a943ca3fb7e65b23d89aa (diff) | |
| parent | 342067abfa929459d0377c3ad743b36c80dd4005 (diff) | |
Merge pull request #7492 from MerryMage/regcache2
JitRegCache: Refactor register cache
Diffstat (limited to 'Source/Core/Common/BitSet.h')
| -rw-r--r-- | Source/Core/Common/BitSet.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/Core/Common/BitSet.h b/Source/Core/Common/BitSet.h index 4425b6067c..5154735f86 100644 --- a/Source/Core/Common/BitSet.h +++ b/Source/Core/Common/BitSet.h @@ -193,10 +193,14 @@ public: constexpr BitSet operator&(BitSet other) const { return BitSet(m_val & other.m_val); } constexpr BitSet operator^(BitSet other) const { return BitSet(m_val ^ other.m_val); } constexpr BitSet operator~() const { return BitSet(~m_val); } + constexpr BitSet operator<<(IntTy shift) const { return BitSet(m_val << shift); } + constexpr BitSet operator>>(IntTy shift) const { return BitSet(m_val >> shift); } constexpr explicit operator bool() const { return m_val != 0; } BitSet& operator|=(BitSet other) { return *this = *this | other; } BitSet& operator&=(BitSet other) { return *this = *this & other; } BitSet& operator^=(BitSet other) { return *this = *this ^ other; } + BitSet& operator<<=(IntTy shift) { return *this = *this << shift; } + BitSet& operator>>=(IntTy shift) { return *this = *this >> shift; } // Warning: Even though on modern CPUs this is a single fast instruction, // Dolphin's official builds do not currently assume POPCNT support on x86, // so slower explicit bit twiddling is generated. Still should generally |
