lkml.org 
[lkml]   [2008]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] x86: add missed clobber for 32-bit memmove
Date
memmove() is implemented by inline assembly. It calls std at first
and cld at last, but EFLAGS still should be clobbered.

Signed-off-by: Jike Song <albcamus@gmail.com>
---
arch/x86/lib/memcpy_32.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/lib/memcpy_32.c b/arch/x86/lib/memcpy_32.c
index 5415a9d..99a8240 100644
--- a/arch/x86/lib/memcpy_32.c
+++ b/arch/x86/lib/memcpy_32.c
@@ -36,7 +36,7 @@ void *memmove(void *dest, const void *src, size_t n)
:"0" (n),
"1" (n-1+src),
"2" (n-1+dest)
- :"memory");
+ :"cc", "memory");
}
return dest;
}
--
1.6.0.1


\
 
 \ /
  Last update: 2008-10-17 15:19    [W:0.291 / U:1.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site