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/8930
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
diff --git a/src/Common/Memory.cpp b/src/Common/Memory.cpp
index 79b27ce..2019cae 100644
--- a/src/Common/Memory.cpp
+++ b/src/Common/Memory.cpp
@@ -139,7 +139,7 @@
#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 @@
#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++)
{