linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Gabriel Paubert <paubert@iram.es>
Cc: Tejun Heo <htejun@gmail.com>,
	linuxppc-dev@lists.ozlabs.org, Christoph Lameter <cl@gentwo.org>
Subject: Re: power and percpu: Could we move the paca into the percpu area?
Date: Fri, 13 Jun 2014 09:16:16 -0500	[thread overview]
Message-ID: <20140613141616.GA7350@gate.crashing.org> (raw)
In-Reply-To: <20140613115553.GA31054@visitor2.iram.es>

> > > So cr5, which is number 73, is never used by gcc. 
> > 
> > Not available for RA is not the same thing at all as not used by GCC.
> > For example, GPR1 and XER[CA] are also fixed regs.
> 
> Indeed, I should have been more clear, it is never explicitly reserved
> by any ABI like GPR1 for the stack pointer nor used implicitly by any pattern
> like the carry (which is also never allocated, but used or clobbered
> by many patterns). However no machine description pattern uses cr5.
> 
> The line "cr5 is not supposed to be used" has always been a mystery
> to me, but gcc has always obeyed this rule. If memory serves it has 
> been in rs6000.h since I got my first PPC board in 1997.

It's been there (in the public repo) since 1992.  The copyrights for
some  of the rest of the port go back to 1990, so the code has most
likely existed at least that far back.

> > But, indeed, it does look like GCC doesn't use it.  It seems to me that
> > some ABI forbade userland (or non-libraries or whatever) from using it.
> > I'll see what I can find out.
> 
> Take what I say with a grain of salt, but I always had the impression that
> it was a remnant from the first port of GCC to Power, which could well have 
> been AIX. This first port might have been done by Richard Kenner.

That is all correct as far as I can see.

Presumably the AIX ABI at that time (AIX2? AIX3?) had cr5 reserved.

Still digging...


Segher

      reply	other threads:[~2014-06-13 14:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-11 19:37 power and percpu: Could we move the paca into the percpu area? Christoph Lameter
2014-06-11 20:22 ` Benjamin Herrenschmidt
2014-06-11 21:03   ` Gabriel Paubert
2014-06-12 12:26     ` Segher Boessenkool
2014-06-12 21:57       ` Benjamin Herrenschmidt
2014-06-12 22:15         ` Segher Boessenkool
2014-06-13 11:55       ` Gabriel Paubert
2014-06-13 14:16         ` Segher Boessenkool [this message]

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=20140613141616.GA7350@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=cl@gentwo.org \
    --cc=htejun@gmail.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paubert@iram.es \
    /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 NNTP newsgroup(s).