Skip to content

Commit

Permalink
EE Cache: Make the SIMD path x86 only to support ARM interpreters
Browse files Browse the repository at this point in the history
  • Loading branch information
F0bes committed Jan 3, 2025
1 parent 1feb314 commit 1842fe6
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions pcsx2/vtlb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
#include "fmt/core.h"

#include <bit>
#ifdef _M_X86
#include <immintrin.h>
#endif
#include <map>
#include <unordered_set>
#include <unordered_map>
Expand Down Expand Up @@ -118,12 +120,13 @@ __inline int CheckCache(u32 addr)
return false;
}

size_t i = 0;
const size_t size = cachedTlbs.count;

#ifdef _M_X86
const int stride = 4;

__m128i addr_vec = _mm_set1_epi32(addr);

size_t i = 0;
const __m128i addr_vec = _mm_set1_epi32(addr);

for (; i + stride <= size; i += stride)
{
Expand Down Expand Up @@ -170,7 +173,7 @@ __inline int CheckCache(u32 addr)
return true;
}
}

#endif
for (; i < size; i++)
{
const u32 mask = cachedTlbs.PageMasks[i];
Expand Down

0 comments on commit 1842fe6

Please sign in to comment.