linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Piggin <npiggin@gmail.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v2 0/4] powerpc/64: syscalls in C
Date: Fri, 30 Aug 2019 08:56:18 +1000	[thread overview]
Message-ID: <1567116332.7u11w9bm6k.astroid@bobo.none> (raw)
In-Reply-To: <1567092470.5ojl8q11gz.astroid@bobo.none>

Nicholas Piggin's on August 30, 2019 1:49 am:
>> This doesn't do what you think, or what you want, or what you think you
>> want ;-)
> 
> After reading gcc docs from gcc 4 to 9, I think it does.
> 
> We want this to apply to all functions in the compilaition unit. It's
> fine to use the regs temporarily, and so it's fine for called functions
> in other units to call them (because they will be restored), and we
> don't want them restored for our caller.
> 
>> (And if you make all those regs -ffixed-* you are in for a world of hurt).
> 
> From the look of it, -ffixed would be a little bit stronger in that it
> will never allow the register to be used, wheras the global register
> variable allows it to be allocated and used elsewhere so long as its
> observable value is not affected. The latter is actually preferred 
> because it's fine for the compiler to use the regs if it wants to. It
> does not even have to use r15 register when I reference r15 variable,
> only whatever value it had.

Ah, of course that means all of them need to be inputs to the stmw
asm (which makes sense and is documented in gcc-9 doc, which is when
the compiler was allowed to allocate them for other things.

Thanks,
Nick



      reply	other threads:[~2019-08-29 23:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-27 13:55 [PATCH v2 0/4] powerpc/64: syscalls in C Nicholas Piggin
2019-08-27 13:55 ` [PATCH v2 1/4] powerpc: convert to copy_thread_tls Nicholas Piggin
2019-08-27 13:55 ` [PATCH v2 2/4] powerpc/64: remove support for kernel-mode syscalls Nicholas Piggin
2019-08-27 13:55 ` [PATCH v2 3/4] powerpc/64: system call remove non-volatile GPR save optimisation Nicholas Piggin
2019-08-28  9:02   ` Christophe Leroy
2019-08-28  9:32     ` Nicholas Piggin
2019-08-27 13:55 ` [PATCH v2 4/4] powerpc/64: system call implement the bulk of the logic in C Nicholas Piggin
2019-08-28  6:51   ` Christophe Leroy
2019-08-28  9:41     ` Nicholas Piggin
2019-08-28 15:30   ` Michal Suchánek
2019-08-28 22:19     ` Nicholas Piggin
2019-08-30 18:48   ` kbuild test robot
2019-08-30 20:04     ` Michal Suchánek
2019-09-02 10:20       ` Michael Ellerman
2019-08-28  9:06 ` [PATCH v2 0/4] powerpc/64: syscalls " Christophe Leroy
2019-08-28  9:49   ` Nicholas Piggin
2019-08-28  9:55     ` Christophe Leroy
2019-08-29  9:38       ` Nicholas Piggin
2019-08-29 10:45         ` Nicholas Piggin
2019-08-29 11:51         ` Segher Boessenkool
2019-08-29 15:49           ` Nicholas Piggin
2019-08-29 22:56             ` Nicholas Piggin [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=1567116332.7u11w9bm6k.astroid@bobo.none \
    --to=npiggin@gmail.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=segher@kernel.crashing.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 NNTP newsgroup(s).