From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
Mathieu Malaterre <malat@debian.org>,
Nick Desaulniers <ndesaulniers@google.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Paul Mackerras <paulus@samba.org>, Joel Stanley <joel@jms.id.au>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH] powerpc/lib/xor_vmx: Relax frame size for clang
Date: Fri, 9 Sep 2022 05:01:56 +0000 [thread overview]
Message-ID: <3e2a3718-9d10-d909-b273-7a86b1d0d0ae@csgroup.eu> (raw)
In-Reply-To: <20220908134800.GM25951@gate.crashing.org>
Le 08/09/2022 à 15:48, Segher Boessenkool a écrit :
> On Thu, Sep 08, 2022 at 06:00:24AM +0000, Christophe Leroy wrote:
>> Looking at it more deeply, I see strange things.
>
> I'll have to see full generated machine code to be able to see strange
> things, there isn't enough information at all here yet. Sorry.
Well, what I call strange is the fact that with GCC the number of bytes
reported by -Wframe-larger-than doesn't match the value the offset used
for the stwu at the start of the function, while it does with clang.
>
> Use private mail if it is too big or uninteresting for the list :-)
>
>> What is that frame size ? I thought it was the number of bytes r1 is
>> decremented at the begining of the function, but it seems not, at least
>> on GCC. It seems GCC substrats 112 bytes while clang doesn't.
>
> That is the vars size + the fixed size + the size of the parameter
> save area + the size of the regs save area, rounded up to a multiple
> of 16. Fixed size is 8 on 32-bit PowerPC ELF. Frame size used by GCC
> here is just the vars size.
Ok, so it means that the stack utilisation is underestimated when using
GCC ? Or is it clang that overestimates it ?
>
>> So it seems that GCC and CLANG don't warn on the same thing, is that
>> expected ? GCC substrats 112 bytes, which is the minimum frame size on a
>> ppc64, but here I'm building a ppc32 kernel, min frame size is 16.
>
> I need to see the generated code to make sense of what is happening
> here. It sounds like it is doing varargs calls or similar expensive
> stack juggling. Or just saving a boatload of registers on the stack.
>
Ok, I'll send it to you. But once again, I don't mind what the code
really look like, I'm just worried that GCC doesn't report the entire
stack usage.
Christophe
next prev parent reply other threads:[~2022-09-09 5:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-21 8:58 Mathieu Malaterre
2022-09-07 17:21 ` Christophe Leroy
2022-09-08 0:27 ` Michael Ellerman
2022-09-08 6:00 ` Christophe Leroy
2022-09-08 13:48 ` Segher Boessenkool
2022-09-09 5:01 ` Christophe Leroy [this message]
2022-09-08 15:07 ` Arnd Bergmann
2022-09-08 22:40 ` Segher Boessenkool
2025-08-27 17:15 ` Christophe Leroy
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=3e2a3718-9d10-d909-b273-7a86b1d0d0ae@csgroup.eu \
--to=christophe.leroy@csgroup.eu \
--cc=joel@jms.id.au \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=malat@debian.org \
--cc=mpe@ellerman.id.au \
--cc=ndesaulniers@google.com \
--cc=paulus@samba.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
all inboxes | Powered by JetHome®