Permalink
Browse files

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.
  • Loading branch information...
1 parent ced2dd9 commit 1fbee92044a82a6fcef312ee866bc288f1197cca @gregory38 gregory38 committed Jan 11, 2017
Showing with 3 additions and 0 deletions.
  1. +3 −0 plugins/GSdx/GSTextureCache.cpp
@@ -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);

0 comments on commit 1fbee92

Please sign in to comment.