Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 23 Feb 2015 22:18:11 -0500
From: Rich Felker <>
To: Denys Vlasenko <>
Cc: musl <>
Subject: Re: Draft of improved memset.s for i386

On Tue, Feb 24, 2015 at 04:06:06AM +0100, Denys Vlasenko wrote:
> On Tue, Feb 24, 2015 at 4:02 AM, Denys Vlasenko
> <> wrote:
> > On Tue, Feb 24, 2015 at 2:09 AM, Rich Felker <> wrote:
> >>   mov %edi,12(%esp)
> >
> > Shouldn't this be "mov 12(%esp),%edi"?
> > It's a load of dst pointer from stack, right?
> Erm... no it is not, 12(%esp) is size param.
> Looks like this insn serves no purpose?
> This will simply trash size param on stack,
> since %edi is not initialized.

The purpose is saving %edi, since %edi is not call-clobbered on the
i386 ABI. I'm just storing it over top of an argument we already
loaded (argument space belongs to the callee per the ABI) instead of
adjusting the stack pointer.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.