Commit 2d03c8d2 by Nicolas Capens

Remove clobber registers conflicting with input variables.

https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#Clobbers specifies that the clobber list should not overlap with the input or output. Change-Id: I77fc2bfc6209ed325355193758f00fc171c8aebf Reviewed-on: https://swiftshader-review.googlesource.com/8930Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com> Tested-by: 's avatarNicolas Capens <capn@google.com>
parent 39a7bed1
......@@ -139,7 +139,7 @@ void clear(uint16_t *memory, uint16_t element, size_t count)
#if defined(_MSC_VER) && defined(__x86__)
__stosw(memory, element, count);
#elif defined(__GNUC__) && defined(__x86__)
__asm__("rep stosw" : : "D"(memory), "a"(element), "c"(count) : "%edi", "%ecx");
__asm__("rep stosw" : : "D"(memory), "a"(element), "c"(count));
#else
for(size_t i = 0; i < count; i++)
{
......@@ -153,7 +153,7 @@ void clear(uint32_t *memory, uint32_t element, size_t count)
#if defined(_MSC_VER) && defined(__x86__)
__stosd((unsigned long*)memory, element, count);
#elif defined(__GNUC__) && defined(__x86__)
__asm__("rep stosl" : : "D"(memory), "a"(element), "c"(count) : "%edi", "%ecx");
__asm__("rep stosl" : : "D"(memory), "a"(element), "c"(count));
#else
for(size_t i = 0; i < count; i++)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment