Re: [PATCH] powerpc/lib/xor_vmx: Relax frame size for clang
From: Segher Boessenkool
Date: Thu Sep 08 2022 - 10:02:11 EST
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.
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.
> 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.
> And CLANG is still using stack a lot more than GCC.
Good to hear! Well, good for GCC, anyway ;-)
Segher