Commit 2d0c8233 authored by sgjesse@chromium.org's avatar sgjesse@chromium.org

Proper constraints for inline implementation in assembly.

Review URL: http://codereview.chromium.org/1359002


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4291 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 65e099e2
...@@ -581,11 +581,12 @@ static inline void MemsetPointer(T** dest, T* value, int counter) { ...@@ -581,11 +581,12 @@ static inline void MemsetPointer(T** dest, T* value, int counter) {
#endif #endif
#if defined(__GNUC__) && defined(STOS) #if defined(__GNUC__) && defined(STOS)
asm("cld;" asm volatile(
"cld;"
"rep ; " STOS "rep ; " STOS
: /* no output */ : "+&c" (counter), "+&D" (dest)
: "c" (counter), "a" (value), "D" (dest) : "a" (value)
: /* no clobbered list as all inputs are considered clobbered */); : "memory", "cc");
#else #else
for (int i = 0; i < counter; i++) { for (int i = 0; i < counter; i++) {
dest[i] = value; dest[i] = value;
......
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