Faster RtlFillMemoryUlong.

This commit is contained in:
Ben Vanik 2015-09-05 14:37:55 -07:00
parent df7a35f196
commit 6c07eb8e5c
2 changed files with 3 additions and 1 deletions

View File

@ -146,6 +146,7 @@ class ParamBase : public Param {
return *this;
}
operator T() const { return value_; }
T value() const { return value_; }
protected:
T value_;

View File

@ -77,8 +77,9 @@ void RtlFillMemoryUlong(lpvoid_t destination, dword_t length, dword_t pattern) {
uint32_t count = length >> 2;
uint32_t* p = destination.as<uint32_t*>();
uint32_t swapped_pattern = xe::byte_swap(pattern.value());
for (uint32_t n = 0; n < count; n++, p++) {
*p = xe::byte_swap((uint32_t)pattern);
*p = swapped_pattern;
}
}
DECLARE_XBOXKRNL_EXPORT(RtlFillMemoryUlong, ExportTag::kImplemented);