Messages in this thread | | | Date | Mon, 20 Oct 2008 14:44:04 +0800 | From | "Jike Song" <> | Subject | Re: [PATCH] x86: add missed clobber for 32-bit memmove |
| |
On Sat, Oct 18, 2008 at 12:35 AM, H. Peter Anvin <hpa@zytor.com> wrote: > Jike Song wrote: >> >> memmove() is implemented by inline assembly. It calls std at first >> and cld at last, but EFLAGS still should be clobbered. > > gcc always treats EFLAGS as clobbered on x86. The "cc" clobber is needed on > some platforms, but is a noop on x86.
No wonder there are inline asms that clobbered eflags/rflags but without declaring them as clobbered. Thanks for your information.
It turns out that I need to read through the gcc x86 back-end as long as I want to be a Linux/x86 developer, right? That sounds discouraging:)
-- Thanks, Jike
| |