mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: Denys Vlasenko <vda.linux@googlemail.com>
Cc: musl <musl@lists.openwall.com>
Subject: Re: Draft of improved memset.s for i386
Date: Mon, 23 Feb 2015 22:18:11 -0500	[thread overview]
Message-ID: <20150224031811.GH23507@brightrain.aerifal.cx> (raw)
In-Reply-To: <CAK1hOcO-YYjtPvgJO_DwfE0_t+EwYSxc4T+129Cg2i9sQAYh6A@mail.gmail.com>

On Tue, Feb 24, 2015 at 04:06:06AM +0100, Denys Vlasenko wrote:
> On Tue, Feb 24, 2015 at 4:02 AM, Denys Vlasenko
> <vda.linux@googlemail.com> wrote:
> > On Tue, Feb 24, 2015 at 2:09 AM, Rich Felker <dalias@libc.org> 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.

Rich


  reply	other threads:[~2015-02-24  3:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-24  1:09 Rich Felker
2015-02-24  3:02 ` Denys Vlasenko
2015-02-24  3:06   ` Denys Vlasenko
2015-02-24  3:18     ` Rich Felker [this message]
2015-02-24  5:36       ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150224031811.GH23507@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    --cc=vda.linux@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).