public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@cygnus.com>
To: law@cygnus.com
Cc: Marc Lehmann <pcg@goof.com>, egcs@cygnus.com
Subject: Re: question regarding asm()
Date: Thu, 16 Oct 1997 08:31:00 -0000	[thread overview]
Message-ID: <19971016013930.22185@dot.cygnus.com> (raw)
In-Reply-To: <13876.876974734@hurl.cygnus.com>

On Wed, Oct 15, 1997 at 10:05:34PM -0600, Jeffrey A Law wrote:
>   > >	Clobber just means that GCC cannot make assumptions about the
>   > >register after the call, not before.
>   > 
>   > That's what I expected, but the docs seems to sugest otherwise..
> Why do you think that?

  "The input operands are guaranteed not to use any of the clobbered
   registers, and neither will the output operands' addresses, so you
   can read and write the clobbered registers as many times as you like."

That from 'info gcc "c ext" "extended asm"'.

> However, on some ports, when there aren't enough registers, GCC can't do
> this,

Yeah, well, that's the breaks.

> and in some cases it can't even tell you that it did something
> wrong. This is especially important on machines with weird register
> sets like the x86.

Ouch.

> This is _precisely_ why I've told folks in the past to avoid sucking
> up all the registers for asms -- particularly Linux folk who seem to
> write bigger asms than anyone.

It would be nice, and probably solve some of these problems with the
strange and wonderous asm blocks we write, if you could separately
list regs clobbered at input/output/both.

And while I'm wishing, more than 10 arguments, which is feasable
when all that's needed are memory and immediate constraints. 

And being able to specify immediate inputs to file scope asm blocks
so I can easily write assembly thunks that use offsetof to communicate
with C structs.


r~

  reply	other threads:[~1997-10-16  8:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-10-07 23:14 Marc Lehmann
1997-10-09  9:26 ` dtm
1997-10-15 21:03 ` Jeffrey A Law
1997-10-16  8:31   ` Richard Henderson [this message]
1997-10-16 15:19     ` Jeffrey A Law
1997-10-17  1:22       ` Bernd Schmidt
1997-10-17 12:44         ` Jeffrey A Law
1997-10-17 12:53         ` Michael Meissner
1997-10-20  4:29           ` Bernd Schmidt
  -- strict thread matches above, loose matches on Subject: below --
1997-12-09  7:28 Christian Iseli
1997-10-29  9:17 Christian Iseli
1997-10-29  2:28 Christian Iseli
1997-10-28  8:31 Christian Iseli
1997-10-28 10:25 ` Joern Rennecke
1997-10-29  5:13 ` Bernd Schmidt
     [not found] <9710040128.AA17540@rios1.watson.ibm.com>
1997-10-04  6:04 ` Marc Lehmann
1997-10-03 18:13 Marc Lehmann

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=19971016013930.22185@dot.cygnus.com \
    --to=rth@cygnus.com \
    --cc=egcs@cygnus.com \
    --cc=law@cygnus.com \
    --cc=pcg@goof.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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).