public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Tal Agmon" <Tal.Agmon@nsc.com>
To: gcc-help@gcc.gnu.org
Subject: Re: Using local register variable
Date: Wed, 31 Dec 2003 07:57:00 -0000	[thread overview]
Message-ID: <OF3CE93BF0.9373C039-ONC2256E0D.002B9E8F-C2256E0D.002B608C@nsc.com> (raw)


I meant that a5 was used when I defined a pointer foo and it wasn't used
when I defined int y.





"Tal Agmon" <Tal.Agmon@nsc.com> writes:

> The manual says:
> You can define a local register variable with a specified register like
> this:
> register int *foo asm ("a5");
>
> My question: is foo must be a pointer or can I define for example:
> register int y asm ("a5");

Both are legal.

> I'm asking this because in gcc-3.3.2 I saw (in a very simple program
> with no reason not the preserve a register) that a5 was not
> preserved for y, and when I defined it as in the first example, a5
> WAS preserved for foo.

I don't understand what you mean by "preserve", so I can't comment on
this...
>

--
             Falk









             reply	other threads:[~2003-12-31  7:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-31  7:57 Tal Agmon [this message]
2003-12-31  8:21 ` Falk Hueffner
  -- strict thread matches above, loose matches on Subject: below --
2003-12-30 18:38 Tal Agmon
2003-12-30 17:34 Tal Agmon
2003-12-30 16:25 Tal Agmon
2003-12-30 17:13 ` Falk Hueffner

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=OF3CE93BF0.9373C039-ONC2256E0D.002B9E8F-C2256E0D.002B608C@nsc.com \
    --to=tal.agmon@nsc.com \
    --cc=gcc-help@gcc.gnu.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).