mirror of https://github.com/PCSX2/pcsx2.git
gsdx tc: avoid any pitfall with 1 << 31
Based on Turtleli feedback "1 << 31 is undefined in C++11, but defined in C++14"
This commit is contained in:
parent
87cf7b6d30
commit
f9c2025149
|
@ -2008,7 +2008,7 @@ void GSTextureCache::SourceMap::Add(Source* s, const GIFRegTEX0& TEX0, GSOffset*
|
||||||
// FIXME: this statement could be optimized to a single ASM instruction (instead of 4)
|
// FIXME: this statement could be optimized to a single ASM instruction (instead of 4)
|
||||||
// Either BTR (AKA bit test and reset). Depends on the previous instruction.
|
// Either BTR (AKA bit test and reset). Depends on the previous instruction.
|
||||||
// Or BLSR (AKA Reset Lowest Set Bit). No dependency but require BMI1 (basically a recent CPU)
|
// Or BLSR (AKA Reset Lowest Set Bit). No dependency but require BMI1 (basically a recent CPU)
|
||||||
p ^= 1 << j;
|
p ^= 1U << j;
|
||||||
|
|
||||||
m[j].push_front(s);
|
m[j].push_front(s);
|
||||||
e[j] = m[j].begin();
|
e[j] = m[j].begin();
|
||||||
|
@ -2110,7 +2110,7 @@ void GSTextureCache::SourceMap::RemoveAt(Source* s)
|
||||||
// FIXME: this statement could be optimized to a single ASM instruction (instead of 4)
|
// FIXME: this statement could be optimized to a single ASM instruction (instead of 4)
|
||||||
// Either BTR (AKA bit test and reset). Depends on the previous instruction.
|
// Either BTR (AKA bit test and reset). Depends on the previous instruction.
|
||||||
// Or BLSR (AKA Reset Lowest Set Bit). No dependency but require BMI1 (basically a recent CPU)
|
// Or BLSR (AKA Reset Lowest Set Bit). No dependency but require BMI1 (basically a recent CPU)
|
||||||
p ^= 1 << j;
|
p ^= 1U << j;
|
||||||
|
|
||||||
m[j].erase(e[j]);
|
m[j].erase(e[j]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue