gsdx tc: add a comment for a potential "ASM" optimization

I'm not sure it worth it yet. But a generic function would be nice for
future.
This commit is contained in:
Gregory Hainaut 2017-01-11 20:13:53 +01:00
parent ced2dd9200
commit 1fbee92044
1 changed files with 3 additions and 0 deletions

View File

@ -1989,6 +1989,9 @@ void GSTextureCache::SourceMap::Add(Source* s, const GIFRegTEX0& TEX0, GSOffset*
while(_BitScanForward(&j, p))
{
// 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.
// Or BLSR (AKA Reset Lowest Set Bit). No dependency but require BMI1 (basically a recent CPU)
p ^= 1 << j;
m[j].push_front(s);