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) {
#endif
#if defined(__GNUC__) && defined(STOS)
asm("cld;"
asm volatile(
"cld;"
"rep ; " STOS
: /* no output */
: "c" (counter), "a" (value), "D" (dest)
: /* no clobbered list as all inputs are considered clobbered */);
: "+&c" (counter), "+&D" (dest)
: "a" (value)
: "memory", "cc");
#else
for (int i = 0; i < counter; i++) {
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