diff options
| author | Shawn Hoffman <godisgovernment@gmail.com> | 2021-06-29 10:24:09 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2021-06-29 10:24:09 +0200 |
| commit | 30f9f31a69080edd1fbfcb98de34ff8320b78ee5 (patch) | |
| tree | b4ff2aacfde0c9fdb3d437ffc0f78d76d36b070d /Source/Core | |
| parent | 3b3fb9d4c3761aaf11c25bce6178125a4f5ed7e9 (diff) | |
DiscIO: Add workaround for MSVC ARM64 ICE
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/DiscIO/WIABlob.h | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/Source/Core/DiscIO/WIABlob.h b/Source/Core/DiscIO/WIABlob.h index 8458ac95ee..bcd4c06b48 100644 --- a/Source/Core/DiscIO/WIABlob.h +++ b/Source/Core/DiscIO/WIABlob.h @@ -70,7 +70,7 @@ private: using SHA1 = std::array<u8, 20>; using WiiKey = std::array<u8, 16>; - // See docs/WIA.md for details about the format + // See docs/WiaAndRvz.md for details about the format #pragma pack(push, 1) struct WIAHeader1 @@ -241,25 +241,23 @@ private: struct ReuseID { - bool operator==(const ReuseID& other) const - { - return std::tie(partition_key, data_size, encrypted, value) == - std::tie(other.partition_key, other.data_size, other.encrypted, other.value); - } - bool operator<(const ReuseID& other) const - { - return std::tie(partition_key, data_size, encrypted, value) < - std::tie(other.partition_key, other.data_size, other.encrypted, other.value); - } - bool operator>(const ReuseID& other) const - { - return std::tie(partition_key, data_size, encrypted, value) > - std::tie(other.partition_key, other.data_size, other.encrypted, other.value); - } + // This is a workaround for an ICE in Visual Studio 16.10.0 when making an ARM64 Release build. + // Once the ICE has been fixed upstream, we can move partition_key inside the tie. +#define COMPARE_TIED(op) \ + (partition_key op other.partition_key) && \ + std::tie(data_size, encrypted, value) \ + op std::tie(other.data_size, other.encrypted, other.value) + + bool operator==(const ReuseID& other) const { return COMPARE_TIED(==); } + bool operator<(const ReuseID& other) const { return COMPARE_TIED(<); } + bool operator>(const ReuseID& other) const { return COMPARE_TIED(>); } + bool operator!=(const ReuseID& other) const { return !operator==(other); } bool operator>=(const ReuseID& other) const { return !operator<(other); } bool operator<=(const ReuseID& other) const { return !operator>(other); } +#undef COMPARE_TIED + const WiiKey* partition_key; u64 data_size; bool encrypted; |
