All of
 help / color / mirror / Atom feed
From: Segher Boessenkool <>
To: Nick Desaulniers <>
Cc: Nathan Chancellor <>,
	Paul Menzel <>,,
Subject: Re: [PATCH] powerpc/vdso: Don't use r30 to avoid breaking Go lang
Date: Fri, 30 Jul 2021 18:55:54 -0500	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Thu, Jul 29, 2021 at 09:25:43AM -0700, Nick Desaulniers wrote:
> On Thu, Jul 29, 2021 at 6:42 AM Paul Menzel <> wrote:
> > Am 29.07.21 um 15:12 schrieb Michael Ellerman:
> > > Note this only works with GCC, clang does not support -ffixed-rN.
> >
> > Maybe the clang/LLVM build support folks (in CC) have an idea.
> Right, we've had issues with these in the past.  Generally, we need to
> teach clang about which registers are valid for `N` so that it can
> diagnose invalid values ASAP.  This has to be done on a per arch basis
> in LLVM to steal the register from the register allocator.  For
> example, this was used previously for aarch64 (but removed from use in
> the kernel) and IIRC is used for m68k (which we're working to get
> builds online for).

In GCC, it is -ffixed-* (note: no "r").  The string is stripped of the
standard prefix for the target (for Power, none), and possibly of one
"%" or "#".  If the string is a recognised register name (or alternative
register name) for the target, that is used.  If not, and it is a
decimal number, then the internal GCC register of that number is used
(these numbers can differ from one GCC release to another, and in fact
we have changed the numbering for Power before -- but 0..31 have always
been the GPRs, and 32..63 have always been the FPRs).

The names for the Power registers are:
  0..31, or alternatively
  0..31, or alternatively
  fr0..fr31, or alternatively
  0..31, or alternatively
  v0..v31, or alternatively
CR fields:
  0..7, or alternatively

(There are more, but changing the default calling convention for those
will not work anyway.  Also, some non-Linux configurations use different


  reply	other threads:[~2021-07-31  0:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-29 13:12 Michael Ellerman
2021-07-29 13:42 ` Paul Menzel
2021-07-29 16:25   ` Nick Desaulniers
2021-07-30 23:55     ` Segher Boessenkool [this message]
2021-08-01 13:14 ` Michael Ellerman
2021-08-02 11:27 ` Michael Ellerman

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:

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

  git send-email \ \ \ \ \ \ \ \
    --subject='Re: [PATCH] powerpc/vdso: Don'\''t use r30 to avoid breaking Go lang' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.