SSE4.1 detection

This commit is contained in:
Nekotekina 2014-07-15 01:32:32 +04:00
commit 51b54a4d6b
3 changed files with 13 additions and 6 deletions

View file

@ -19,6 +19,13 @@ SPURecompilerCore::SPURecompilerCore(SPUThread& cpu)
, first(true) , first(true)
{ {
memset(entry, 0, sizeof(entry)); memset(entry, 0, sizeof(entry));
X86CpuInfo inf;
X86CpuUtil::detect(&inf);
if (!inf.hasFeature(kX86CpuFeatureSse41))
{
LOG_ERROR(SPU, "SPU Recompiler requires SSE4.1 instruction set support");
Emu.Pause();
}
} }
SPURecompilerCore::~SPURecompilerCore() SPURecompilerCore::~SPURecompilerCore()

View file

@ -44,7 +44,7 @@ int UTF16stoUTF8s(mem16_ptr_t utf16, mem64_t utf16_len, mem8_ptr_t utf8, mem64_t
if (!utf16.IsGood() || !utf16_len.IsGood() || !utf8_len.IsGood()) if (!utf16.IsGood() || !utf16_len.IsGood() || !utf8_len.IsGood())
return SRCIllegal; return SRCIllegal;
std::u16string wstr =(char16_t*)Memory.VirtualToRealAddr(utf16); std::u16string wstr =(char16_t*)Memory.VirtualToRealAddr(utf16.GetAddr());
wstr.resize(utf16_len.GetValue()); // TODO: Is this really the role of utf16_len in this function? wstr.resize(utf16_len.GetValue()); // TODO: Is this really the role of utf16_len in this function?
#ifdef _MSC_VER #ifdef _MSC_VER
std::wstring_convert<std::codecvt_utf8_utf16<char16_t>,char16_t> convert; std::wstring_convert<std::codecvt_utf8_utf16<char16_t>,char16_t> convert;

View file

@ -361,7 +361,7 @@ int cellSurMixerCreate(const mem_ptr_t<CellSurMixerConfig> config)
break; break;
} }
if (mixcount > (port.tag + 14)) // preemptive buffer filling (probably hack) if (mixcount > (port.tag + 0)) // adding positive value (1-15): preemptive buffer filling (hack)
{ {
std::this_thread::sleep_for(std::chrono::milliseconds(1)); std::this_thread::sleep_for(std::chrono::milliseconds(1));
continue; continue;