mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-16 23:17:29 +00:00
vm.cpp: minor optimization for filling stack guards
Use REP STOSQ on all compilers.
This commit is contained in:
parent
6d37bc62a5
commit
3e1344e4e4
@ -1114,10 +1114,10 @@ namespace vm
|
||||
#ifdef _MSC_VER
|
||||
__stosq(target, data, count);
|
||||
#else
|
||||
for (std::size_t i = 0; i < count; i++)
|
||||
{
|
||||
target[i] = data;
|
||||
}
|
||||
__asm__ ("mov %0, %%rdi; mov %1, %%rax; mov %2, %%rcx; rep stosq;"
|
||||
:
|
||||
: "r" (ptr), "r" (data), "r" (count)
|
||||
: "rdi", "rax", "rcx", "memory");
|
||||
#endif
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user