From: Keith Owens <kaos@ocs.com.au>
To: Carl Spalletta <cspalletta@yahoo.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: gcc inline asm - short question
Date: Tue, 19 Mar 2002 10:50:36 +1100 [thread overview]
Message-ID: <18113.1016495436@kao2.melbourne.sgi.com> (raw)
In-Reply-To: Your message of "Mon, 18 Mar 2002 15:27:40 -0800." <20020318232740.39289.qmail@web13305.mail.yahoo.com>
On Mon, 18 Mar 2002 15:27:40 -0800 (PST),
Carl Spalletta <cspalletta@yahoo.com> wrote:
> asm ( assembler template
> : output operands (optional)
> : input operands (optional)
> : list of clobbered registers (optional)
> );
>
> I have read all the docs and I still can't clearly understand when it
>is required to specify a clobberlist - a register or memory that will
>be modified and must be preserved by gcc.
The clobber list is _extra_ clobbers, registers or memory that gcc
cannot deduce from the other parameters. =d" (xloops), "=&a" (d0)
already tells gcc that edx and eax are used, you do not need to
explicitly specify them as clobbers. OTOH, asm ("mov 1, %eax")
requires a clobber because the operands do not mention eax.
next prev parent reply other threads:[~2002-03-18 23:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-18 23:27 gcc inline asm - short question Carl Spalletta
2002-03-18 23:50 ` Keith Owens [this message]
2002-03-19 5:27 ` H. Peter Anvin
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=18113.1016495436@kao2.melbourne.sgi.com \
--to=kaos@ocs.com.au \
--cc=cspalletta@yahoo.com \
--cc=linux-kernel@vger.kernel.org \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox