mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 07:00:20 +02:00
Merge pull request #5884 from Plagman/plagman/lookup_opt_mr
DiskCache: Lookup optimizations
This commit is contained in:
104 files changed
+166
-136
No files matched your search
@@ -190,24 +190,33 @@ namespace DiskCache {
|
||||
const auto* FOZHeader = reinterpret_cast<const MesaFOZ::foz_payload_header*>(IndexDataStart + ReadOffset);
|
||||
ReadOffset += sizeof(MesaFOZ::foz_payload_header);
|
||||
|
||||
if (FOZHeader->payload_size != sizeof(MesaFOZ::mesa_index_db_file_entry) || ReadOffset + FOZHeader->payload_size > IndexDataSize) {
|
||||
uint32_t IndexBlobSize = sizeof(MesaFOZ::mesa_index_db_file_entry) + sizeof(IndexExtraBlob);
|
||||
|
||||
if (FOZHeader->payload_size != IndexBlobSize || ReadOffset + FOZHeader->payload_size > IndexDataSize) {
|
||||
break;
|
||||
}
|
||||
const auto* IndexBlobPayload = reinterpret_cast<const MesaFOZ::mesa_index_db_file_entry*>(IndexDataStart + ReadOffset);
|
||||
ReadOffset += FOZHeader->payload_size;
|
||||
const auto* IndexBlobCommon = reinterpret_cast<const MesaFOZ::mesa_index_db_file_entry*>(IndexDataStart + ReadOffset);
|
||||
ReadOffset += sizeof(MesaFOZ::mesa_index_db_file_entry);
|
||||
const auto* IndexBlobExtra = reinterpret_cast<const IndexExtraBlob*>(IndexDataStart + ReadOffset);
|
||||
ReadOffset += sizeof(IndexExtraBlob);
|
||||
|
||||
// skip corrupt (carefully) so we don't have to figure that out in the hot path later
|
||||
if (IndexBlobPayload->cache_db_file_offset > (uint64_t)CacheFOZSize ||
|
||||
IndexBlobPayload->size > (uint64_t)CacheFOZSize - IndexBlobPayload->cache_db_file_offset) {
|
||||
if (IndexBlobCommon->cache_db_file_offset > (uint64_t)CacheFOZSize ||
|
||||
IndexBlobCommon->size > (uint64_t)CacheFOZSize - IndexBlobCommon->cache_db_file_offset) {
|
||||
continue;
|
||||
}
|
||||
if (IndexBlobExtra->GuestSize + sizeof(BlobFixedHeader) > IndexBlobCommon->size) {
|
||||
continue;
|
||||
}
|
||||
if (FOZKey->bytes[39] != 0xFF) {
|
||||
uint64_t Key;
|
||||
std::from_chars(reinterpret_cast<const char*>(FOZKey->bytes), reinterpret_cast<const char*>(&FOZKey->bytes[16]), Key, 16);
|
||||
if (IndexBlobPayload->hash != Key) {
|
||||
if (IndexBlobCommon->hash != Key) {
|
||||
continue;
|
||||
}
|
||||
CacheIndex.insert({IndexBlobPayload->hash, {this, IndexBlobPayload->cache_db_file_offset, IndexBlobPayload->size}});
|
||||
CacheIndex.insert(
|
||||
{IndexBlobCommon->hash,
|
||||
{this, IndexBlobCommon->cache_db_file_offset, IndexBlobCommon->size, IndexBlobExtra->GuestSize, IndexBlobExtra->GuestHash}});
|
||||
} else {
|
||||
FoundMetadata = true;
|
||||
}
|
||||
@@ -228,7 +237,8 @@ namespace DiskCache {
|
||||
}
|
||||
}
|
||||
|
||||
bool IndexedDB::StoreCacheBlob(const MesaFOZ::foz_payload_key& Key, std::span<const uint8_t> Blob, Index& Index, std::mutex& IndexMutex) {
|
||||
bool IndexedDB::StoreCacheBlob(const MesaFOZ::foz_payload_key& Key, std::span<const uint8_t> Blob, Index& Index, std::mutex& IndexMutex,
|
||||
IndexExtraBlob IndexBlob) {
|
||||
if (ReadOnly) {
|
||||
// shouldn't happen
|
||||
return false;
|
||||
@@ -267,7 +277,10 @@ namespace DiskCache {
|
||||
.last_access_time = 0, // todo..
|
||||
.cache_db_file_offset = BlobOffset};
|
||||
|
||||
std::span<const uint8_t> IndexBlobChunks[] = {{(const uint8_t*)&IndexEntry, sizeof(IndexEntry)}};
|
||||
std::span<const uint8_t> IndexBlobChunks[] = {
|
||||
{(const uint8_t*)&IndexEntry, sizeof(IndexEntry)},
|
||||
{(const uint8_t*)&IndexBlob, sizeof(IndexBlob)},
|
||||
};
|
||||
uint64_t UnusedIndexBlobOffset = 0;
|
||||
if (!IndexFOZ.WriteBlob(Key, IndexBlobChunks, UnusedIndexBlobOffset)) {
|
||||
CacheFOZ.Unlock();
|
||||
@@ -284,7 +297,7 @@ namespace DiskCache {
|
||||
}
|
||||
|
||||
std::lock_guard Guard(IndexMutex);
|
||||
Index[Hash] = {this, BlobOffset, (uint32_t)Blob.size()};
|
||||
Index[Hash] = {this, BlobOffset, (uint32_t)Blob.size(), IndexBlob.GuestSize, IndexBlob.GuestHash};
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -360,7 +373,7 @@ namespace DiskCache {
|
||||
// we just opened a fresh cache, add a metadata blob
|
||||
MesaFOZ::foz_payload_key MetadataKey;
|
||||
memset(MetadataKey.bytes, 0xFF, sizeof(MetadataKey));
|
||||
RWCacheDB->StoreCacheBlob(MetadataKey, {BucketBytes.data(), BucketBytes.size()}, Index, IndexLock);
|
||||
RWCacheDB->StoreCacheBlob(MetadataKey, {BucketBytes.data(), BucketBytes.size()}, Index, IndexLock, {});
|
||||
Index.clear();
|
||||
}
|
||||
|
||||
@@ -414,18 +427,7 @@ namespace DiskCache {
|
||||
// we can't hold onto the iterator, the map may shift while we don't hold the lock
|
||||
Entry = It->second;
|
||||
}
|
||||
// found a key hash match, could still be a miss, read the blob and verify more
|
||||
CodeHitData HitData;
|
||||
HitData.Blob.resize(Entry.Size);
|
||||
if (!Entry.DB->ReadCacheBlob(Entry.Offset, HitData.Blob)) {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
if (Entry.Size < sizeof(BlobFixedHeader)) {
|
||||
return std::nullopt;
|
||||
}
|
||||
BlobFixedHeader Header;
|
||||
memcpy(&Header, HitData.Blob.data(), sizeof(Header));
|
||||
// found a key hash match, could still be a miss, check guest hash
|
||||
|
||||
// do we have enough room in our live code to even hash GuestSize worth?
|
||||
auto RangeInfo = CTX->SyscallHandler->QueryGuestExecutableRange(Thread, GuestRIP);
|
||||
@@ -433,22 +435,39 @@ namespace DiskCache {
|
||||
return std::nullopt;
|
||||
}
|
||||
uint64_t Available = RangeInfo.Base + RangeInfo.Size - GuestRIP;
|
||||
if (Available < Header.GuestSize) {
|
||||
if (Available < Entry.GuestSize) {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
XXH128_hash_t LiveGuestHash = XXH3_128bits(reinterpret_cast<void*>(GuestRIP), Header.GuestSize);
|
||||
if (std::memcmp(&LiveGuestHash, &Header.GuestHash, sizeof(Header.GuestHash)) != 0) {
|
||||
XXH128_hash_t LiveGuestHash = XXH3_128bits(reinterpret_cast<void*>(GuestRIP), Entry.GuestSize);
|
||||
if (!XXH128_isEqual(LiveGuestHash, Entry.GuestHash)) {
|
||||
// LogMan::Msg::IFmt("hash mismatch! length {:d}", Header.GuestSize);
|
||||
return std::nullopt;
|
||||
}
|
||||
// LogMan::Msg::IFmt("hash ok! length {:d}", Header.GuestSize);
|
||||
|
||||
// this seems to be a full hit, lastly, check the entry is big enough to have everything (except maybe GuestCode)
|
||||
// this seems to be a full hit, pull from disk and check the entry is big enough to have everything (except GuestCode)
|
||||
CodeHitData HitData;
|
||||
uint32_t EntrySizeWithoutGuestCode = Entry.Size - Entry.GuestSize;
|
||||
HitData.Blob.resize(EntrySizeWithoutGuestCode);
|
||||
if (!Entry.DB->ReadCacheBlob(Entry.Offset, HitData.Blob)) {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
if (EntrySizeWithoutGuestCode < sizeof(BlobFixedHeader)) {
|
||||
return std::nullopt;
|
||||
}
|
||||
BlobFixedHeader Header;
|
||||
memcpy(&Header, HitData.Blob.data(), sizeof(Header));
|
||||
|
||||
uint32_t SizeNeeded = sizeof(Header) + Header.HostSize + Header.EntryPointCount * (sizeof(uint64_t) + sizeof(uint32_t));
|
||||
SizeNeeded += Header.SmallRelocCount * sizeof(BlobSmallRelocation) + Header.ThunkRelocCount * sizeof(BlobThunkRelocation) +
|
||||
Header.TouchedGuestPagesCount * sizeof(uint64_t);
|
||||
if (Entry.Size < SizeNeeded) {
|
||||
if (EntrySizeWithoutGuestCode != SizeNeeded) {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
if (Entry.GuestSize != Header.GuestSize || !XXH128_isEqual(Header.GuestHash, Entry.GuestHash)) {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
@@ -482,13 +501,15 @@ namespace DiskCache {
|
||||
IndexedDB* DB;
|
||||
MesaFOZ::foz_payload_key Key;
|
||||
fextl::vector<uint8_t> Blob;
|
||||
CacheStoreWorkItem(DiskCache* Self, IndexedDB* DB, const MesaFOZ::foz_payload_key& Key, fextl::vector<uint8_t>&& Blob)
|
||||
IndexExtraBlob IndexBlob;
|
||||
CacheStoreWorkItem(DiskCache* Self, IndexedDB* DB, const MesaFOZ::foz_payload_key& Key, fextl::vector<uint8_t>&& Blob, IndexExtraBlob IndexBlob)
|
||||
: Self(Self)
|
||||
, DB(DB)
|
||||
, Key(Key)
|
||||
, Blob(std::move(Blob)) {}
|
||||
, Blob(std::move(Blob))
|
||||
, IndexBlob(IndexBlob) {}
|
||||
void Run() override {
|
||||
DB->StoreCacheBlob(Key, Blob, Self->Index, Self->IndexLock);
|
||||
DB->StoreCacheBlob(Key, Blob, Self->Index, Self->IndexLock, IndexBlob);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -632,8 +653,9 @@ namespace DiskCache {
|
||||
|
||||
memcpy(BlobData + GuestCodeOffset, GuestCode.data(), GuestCode.size());
|
||||
|
||||
IndexExtraBlob IndexBlob {Header.GuestHash, Header.GuestSize};
|
||||
// hand the rest off to the writer thread
|
||||
Writer->QueueWork(fextl::make_unique<CacheStoreWorkItem>(this, RWCacheDB.get(), Key, std::move(Blob)));
|
||||
Writer->QueueWork(fextl::make_unique<CacheStoreWorkItem>(this, RWCacheDB.get(), Key, std::move(Blob), IndexBlob));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -50,6 +50,13 @@ namespace DiskCache {
|
||||
IndexedDB* DB;
|
||||
uint64_t Offset;
|
||||
uint32_t Size;
|
||||
uint32_t GuestSize;
|
||||
XXH128_hash_t GuestHash;
|
||||
};
|
||||
|
||||
struct __attribute__((packed)) IndexExtraBlob {
|
||||
XXH128_hash_t GuestHash;
|
||||
uint32_t GuestSize;
|
||||
};
|
||||
|
||||
struct __attribute__((packed)) BlobFixedHeader {
|
||||
@@ -142,7 +149,8 @@ namespace DiskCache {
|
||||
bool Open(const fextl::string& CacheDBName, bool ReadOnly);
|
||||
void PopulateIndex(Index& CacheIndex, bool& FoundMetadata);
|
||||
bool ReadCacheBlob(uint64_t Offset, std::span<uint8_t> OutBlob);
|
||||
bool StoreCacheBlob(const MesaFOZ::foz_payload_key& Key, std::span<const uint8_t> Blob, Index& CacheIndex, std::mutex& IndexMutex);
|
||||
bool StoreCacheBlob(const MesaFOZ::foz_payload_key& Key, std::span<const uint8_t> Blob, Index& CacheIndex, std::mutex& IndexMutex,
|
||||
IndexExtraBlob IndexBlob);
|
||||
|
||||
private:
|
||||
// stores run on the Writer, so returning quick isn't as important
|
||||
@@ -197,7 +205,7 @@ namespace DiskCache {
|
||||
|
||||
// TODO: This header is in global installed header path, but uses internal headers.
|
||||
// Migrate this once that is fixed.
|
||||
static constexpr uint16_t FormatVersion = 3;
|
||||
static constexpr uint16_t FormatVersion = 4;
|
||||
FEX_DEFAULT_VISIBILITY uint16_t GetFormatVersion();
|
||||
|
||||
} // namespace DiskCache
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"SVE128",
|
||||
"SVE256"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"roundss xmm0, xmm1, 00000000b": {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"AFP"
|
||||
],
|
||||
"DisabledHostFeatures": [],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"cvtpi2ps xmm0, [rax]": {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"DisabledHostFeatures": [
|
||||
"RPRES"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"cvtsi2ss xmm0, eax": {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"AFP"
|
||||
],
|
||||
"DisabledHostFeatures": [],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"cvtsi2sd xmm0, eax": {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"SVE128",
|
||||
"SVE256"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"cvtpi2ps xmm0, [rax]": {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"SVE256",
|
||||
"RPRES"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"cvtsi2ss xmm0, eax": {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"SVE128",
|
||||
"SVE256"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"cvtsi2sd xmm0, eax": {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"DisabledHostFeatures": [
|
||||
"RPRES"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"vsqrtss xmm0, xmm1, xmm2": {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"AFP"
|
||||
],
|
||||
"DisabledHostFeatures": [],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"vroundss xmm0, xmm1, 00000000b": {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"SVE256",
|
||||
"SVE128"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"vfmaddsubps xmm0, xmm1, xmm2, xmm3": {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"SVE256",
|
||||
"SVE128"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"vmovups xmm0, xmm0": {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"SVE256",
|
||||
"SVE128"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"vaddsubpd xmm0, xmm1, xmm2": {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"FLAGM2",
|
||||
"SVE256"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"vmovntps [rax], xmm0": {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"SVE128",
|
||||
"SVE256"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"vucomiss xmm0, xmm1": {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"SVE128",
|
||||
"SVE256"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"vpshufb xmm0, xmm1, xmm2": {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"SVE256",
|
||||
"SVE128"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"vfmadd132ss xmm0, xmm1, xmm2": {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"FLAGM2",
|
||||
"SVE256"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"vmovntdqa xmm0, [rax]": {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"SVE256",
|
||||
"SVEBITPERM"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"vtestps xmm0, xmm1": {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"SVE256",
|
||||
"SVE128"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"vpermq ymm0, ymm1, 1": {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"AFP",
|
||||
"SVE256"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"vblendvps xmm0, xmm1, xmm2, xmm3": {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"SVE256",
|
||||
"SVE128"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"vpsrlw xmm0, xmm1, 0": {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"FLAGM",
|
||||
"FLAGM2"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"lock add byte [rax], cl": {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"SVE256",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"sha1nexte xmm0, xmm1": {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"SVE256",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"sha1nexte xmm0, xmm1": {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"SVE256",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"pclmulqdq xmm0, xmm1, 00000b": {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"AFP",
|
||||
"RPRES"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Comment": [
|
||||
"These 3DNow! instructions are optimal assuming that FEX doesn't SRA MMX registers",
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"RPRES",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Comment": [
|
||||
"Instructions that explicitly push against the limits of ARM's loadstore instructions"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"RPRES",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Comment": [
|
||||
"Instructions that explicitly push against the limits of ARM's loadstore instructions"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"RPRES",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Comment": [
|
||||
"These are instruction combinations that could be more optimal if FEX optimized for them"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"RPRES",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Comment": [
|
||||
"These are instruction combinations that could be more optimal if FEX optimized for them"
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"SVE256",
|
||||
"RPRES"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Comment": [
|
||||
"These are instruction combinations that could be more optimal if FEX optimized for them"
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"RPRES",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Comment": [
|
||||
"These are instruction combinations that could be more optimal if FEX optimized for them"
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"RPRES",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Comment": [
|
||||
"These are instruction combinations that could be more optimal if FEX optimized for them"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"RPRES",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Comment": [],
|
||||
"Instructions": {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"SVE256",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"lock add byte [rax], cl": {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"SVE256",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"Chained add": {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"SVE256",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"ptest xmm0, xmm1": {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"SVE256",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"The Witcher 3": {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"SVE256",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"Sonic Mania movie player": {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"SVE128",
|
||||
"SVE256"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"FMOD scalar loop": {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"SVE256",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"The Sims 1 hot block": {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"SVE256",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"add bl, cl": {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"SVE256",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"add al, 1": {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"SVE256",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"push es": {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"RPRES",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"ucomiss xmm0, xmm1": {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"SVE256",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"sgdt [rax]": {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"SVE256",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"xgetbv": {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"AFP",
|
||||
"FCMA"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"ucomisd xmm0, xmm1": {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"AFP",
|
||||
"CSSC"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"popcnt ax, bx": {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"RPRES",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"popcnt ax, bx": {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"RPRES",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"vucomiss xmm0, xmm1": {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"AFP",
|
||||
"SVEBITPERM"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"vtestps xmm0, xmm1": {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"DisabledHostFeatures": [
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"blsr eax, ebx": {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"SVE256",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"Block1": {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"SVE256",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"Block1": {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"SVE256",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"Block1": {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"SVE256",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"Block1": {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"CSSC",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"fadd dword [rax]": {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"SVE256",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"Block1": {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"SVE256",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"Block1": {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"SVE256",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"Block1": {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"SVE256",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"Block1": {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"SVE256",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"fadd dword [rax]": {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"FLAGM2",
|
||||
"CRYPTO"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"pshufb mm0, mm1": {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"AFP",
|
||||
"CRYPTO"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Comment": [
|
||||
"SSE4.2 string instructions are skipped here.",
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"SVE256",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"dpps xmm0, xmm1, 00000000b": {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"FLAGM",
|
||||
"FLAGM2"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"rep movsb": {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"FLAGM2",
|
||||
"MOPS"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"add bl, cl": {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"FLAGM",
|
||||
"FLAGM2"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Comment": [
|
||||
"Instructions in this table that are marked optimal don't have their flag calculation part of this assumption",
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"FlagM",
|
||||
"FlagM2"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"push es": {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"SVE128",
|
||||
"SVE256"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"pfrcpv mm0, mm1": {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"SVE128",
|
||||
"SVE256"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"rsqrtps xmm0, xmm1": {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"SVE128",
|
||||
"SVE256"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"rsqrtss xmm0, xmm1": {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"AFP"
|
||||
],
|
||||
"DisabledHostFeatures": [],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"vrsqrtps xmm0, xmm1": {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"SVE128",
|
||||
"SVE256"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {}
|
||||
}
|
||||
@@ -33,7 +33,7 @@
|
||||
" - 1b: ECX = MSB",
|
||||
"[7] - Reserved"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"pcmpestrm xmm0, xmm1, 0_0_00_00_00b": {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"FLAGM",
|
||||
"FLAGM2"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Comment": [
|
||||
"MMX instructions are defined as optimal without SRA being used for these instructions.",
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"FLAGM",
|
||||
"FLAGM2"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"sgdt [rax]": {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"FLAGM",
|
||||
"FLAGM2"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"xgetbv": {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"SVE256",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"push fs": {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"FLAGM",
|
||||
"FLAGM2"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"movupd xmm0, xmm0": {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"SVE256",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"addsubpd xmm0, xmm1": {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"SVE256",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"psrlw xmm0, xmm1": {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"AFP"
|
||||
],
|
||||
"DisabledHostFeatures": [],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"pmulhuw xmm0, xmm1": {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"FRINTTS",
|
||||
"CSSC"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"movss xmm0, xmm1": {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"FCMA",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"movsd xmm0, xmm1": {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"SVE256",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"addsubps xmm0, xmm1": {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"FCMA",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"cvtpd2dq xmm0, xmm1": {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"FLAGM",
|
||||
"FLAGM2"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"cvttss2si eax, xmm0": {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"SVE256",
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"movmskps eax, xmm0": {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"FLAGM2",
|
||||
"FRINTTS"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"vmovups xmm0, xmm0": {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"FCMA"
|
||||
],
|
||||
"DisabledHostFeatures": [],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"vaddsubpd xmm0, xmm1, xmm2": {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"FLAGM",
|
||||
"FLAGM2"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"vcvttss2si eax, xmm0": {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"FLAGM2",
|
||||
"SVEBITPERM"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"vpshufb xmm0, xmm1, xmm2": {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"FLAGM",
|
||||
"FLAGM2"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"pext eax, ebx, ecx": {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"DisabledHostFeatures": [
|
||||
"AFP"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"vpermq ymm0, ymm1, 1": {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"FLAGM",
|
||||
"FLAGM2"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"vpsrlw xmm0, xmm1, 0": {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"FLAGM2",
|
||||
"RPRES"
|
||||
],
|
||||
"BinaryCacheVersion": 3
|
||||
"BinaryCacheVersion": 4
|
||||
},
|
||||
"Instructions": {
|
||||
"fstp tword [rax]": {
|
||||
|
||||
Loaded 100 of 104 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user