mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
irjit: Switch to XXH3.
This commit is contained in:
parent
15c25be42b
commit
53d9c10b22
3 changed files with 7 additions and 7 deletions
|
@ -41,12 +41,12 @@ bool isInInterval(u32 start, u32 size, u32 value)
|
|||
}
|
||||
|
||||
|
||||
static u32 computeHash(u32 address, u32 size)
|
||||
static HashType computeHash(u32 address, u32 size)
|
||||
{
|
||||
#ifdef _M_X64
|
||||
return XXH64(Memory::GetPointer(address), size, 0xBACD7814BACD7814LL);
|
||||
return XXH3_64bits(Memory::GetPointer(address), size);
|
||||
#else
|
||||
return XXH32(Memory::GetPointer(address), size, 0xBACD7814);
|
||||
return XXH3_64bits(Memory::GetPointer(address), size) & 0xFFFFFFFF;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -481,7 +481,7 @@ u64 IRBlock::CalculateHash() const {
|
|||
buffer[pos++] = instr.encoding;
|
||||
}
|
||||
|
||||
return XXH64(&buffer[0], origSize_, 0x9A5C33B8);
|
||||
return XXH3_64bits(&buffer[0], origSize_);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#include "base/stringutil.h"
|
||||
#include "ext/cityhash/city.h"
|
||||
#include "ext/xxhash.h"
|
||||
#include "i18n/i18n.h"
|
||||
#include "ui/ui.h"
|
||||
#include "util/text/utf8.h"
|
||||
|
@ -62,7 +62,7 @@ void CwCheatScreen::LoadCheatInfo() {
|
|||
// We won't parse this, just using it to detect changes to the file.
|
||||
std::string str;
|
||||
if (readFileToString(true, engine_->CheatFilename().c_str(), str)) {
|
||||
fileCheckHash_ = CityHash64(str.c_str(), str.size());
|
||||
fileCheckHash_ = XXH3_64bits(str.c_str(), str.size());
|
||||
}
|
||||
fileCheckCounter_ = 0;
|
||||
|
||||
|
@ -119,7 +119,7 @@ void CwCheatScreen::update() {
|
|||
// Check if the file has changed. If it has, we'll reload.
|
||||
std::string str;
|
||||
if (readFileToString(true, engine_->CheatFilename().c_str(), str)) {
|
||||
uint64_t newHash = CityHash64(str.c_str(), str.size());
|
||||
uint64_t newHash = XXH3_64bits(str.c_str(), str.size());
|
||||
if (newHash != fileCheckHash_) {
|
||||
// This will update the hash.
|
||||
RecreateViews();
|
||||
|
|
Loading…
Add table
Reference in a new issue