GCC function calling: Parameter passing on stack...

2017-01-23 Thread Steve Silva via gcc
Hi All, I am doing a port of GCC for a small internal processor and I have a question about function parameter passing. I am allocating space for function parameters on the frame (via crtl->outgoing_args_size) and want gcc to use this space via frame pointer manipulation, not stack pointer ma

Re: How to configure a bi-arch PowerPC GCC?

2017-01-23 Thread Segher Boessenkool
Hello again, On Mon, Jan 23, 2017 at 09:19:04AM +0100, Sebastian Huber wrote: > >>I am flexible in terms of the ABI choice for the 64-bit PowerPC. I guess > >>the ABI_ELFv2 is the way to go? > >It certainly is the most modern ABI. It makes some requirements to what > >Power ISA features are requi

Re: Odd gcc-6.3.0 code generation on mips64 platform causing kernel Oops

2017-01-23 Thread Joshua Kinard
On 01/23/2017 11:24, Andrew Haley wrote: > On 23/01/17 16:11, Joshua Kinard wrote: >> So now the question is why stack-probing kills this machine on generic MIPS >> code that its smaller cousin is seemingly unaffected by. I do know that IP27 >> has a different set of memory initialization routines

Re: Odd gcc-6.3.0 code generation on mips64 platform causing kernel Oops

2017-01-23 Thread Andrew Haley
On 23/01/17 16:11, Joshua Kinard wrote: > So now the question is why stack-probing kills this machine on generic MIPS > code that its smaller cousin is seemingly unaffected by. I do know that IP27 > has a different set of memory initialization routines in the MIPS code, so is > it possible that, a

Re: Odd gcc-6.3.0 code generation on mips64 platform causing kernel Oops

2017-01-23 Thread Joshua Kinard
On 01/23/2017 10:34, Andrew Haley wrote: > On 23/01/17 15:26, Joshua Kinard wrote: >> I am not sure what this lone store-doubleword instruction is exactly doing, >> nor >> can I locate where in the gcc MIPS code it is being generated from. > > It's a stack probe, making sure that there is enough

Re: Odd gcc-6.3.0 code generation on mips64 platform causing kernel Oops

2017-01-23 Thread Andrew Haley
On 23/01/17 15:26, Joshua Kinard wrote: > I am not sure what this lone store-doubleword instruction is exactly doing, > nor > can I locate where in the gcc MIPS code it is being generated from. It's a stack probe, making sure that there is enough stack space. Its only purpose is to provide a SE

Re: -fsanitize=thread support on ppc64

2017-01-23 Thread Jakub Jelinek
On Mon, Jan 23, 2017 at 04:10:01PM +0100, Ulrich Weigand wrote: > Bill Schmidt wrote: > > On Jan 23, 2017, at 8:32 AM, Jakub Jelinek wrote: > > > > > > Another question is, it seems upstream has s390{,x}-*-linux* support for > > > asan/ubsan, does that work? In that case we should add it to > >

Odd gcc-6.3.0 code generation on mips64 platform causing kernel Oops

2017-01-23 Thread Joshua Kinard
Hi, I am trying to use gcc-6.3.0 to cross-compile a kernel for an old mips64 platform, an SGI Onyx2 ("IP27"), however, it looks like a large number of functions within the compiled code are getting a common instruction emitted at the top of the function that breaks this particular machine. Doing

Re: -fsanitize=thread support on ppc64

2017-01-23 Thread Ulrich Weigand
Bill Schmidt wrote: > On Jan 23, 2017, at 8:32 AM, Jakub Jelinek wrote: > > > > Another question is, it seems upstream has s390{,x}-*-linux* support for > > asan/ubsan, does that work? In that case we should add it to configure.tgt > > too (similarly to the sparc*-*-linux* entry). > > CCing Uli

Re: -fsanitize=thread support on ppc64

2017-01-23 Thread Bill Schmidt
> On Jan 23, 2017, at 8:47 AM, Jakub Jelinek wrote: > > On Mon, Jan 23, 2017 at 08:45:16AM -0600, Bill Schmidt wrote: >>> 2017-01-23 Jakub Jelinek >>> >>> * configure.tgt: Enable tsan and lsan on powerpc64{,le}-*-linux*. >>> >>> --- libsanitizer/configure.tgt.jj 2016-11-09 15:22:50.00

Re: -fsanitize=thread support on ppc64

2017-01-23 Thread Jakub Jelinek
On Mon, Jan 23, 2017 at 08:45:16AM -0600, Bill Schmidt wrote: > > 2017-01-23 Jakub Jelinek > > > > * configure.tgt: Enable tsan and lsan on powerpc64{,le}-*-linux*. > > > > --- libsanitizer/configure.tgt.jj 2016-11-09 15:22:50.0 +0100 > > +++ libsanitizer/configure.tgt 2017-

Re: -fsanitize=thread support on ppc64

2017-01-23 Thread Bill Schmidt
> On Jan 23, 2017, at 8:32 AM, Jakub Jelinek wrote: > > On Mon, Jan 23, 2017 at 08:22:30AM -0600, Bill Schmidt wrote: >> TSan support was contributed to LLVM by a student working at one of the US >> National Labs a while back. I helped him with some of the PPC assembly >> programming. To my k

Re: -fsanitize=thread support on ppc64

2017-01-23 Thread Bill Schmidt
> On Jan 23, 2017, at 8:32 AM, Jakub Jelinek wrote: > > On Mon, Jan 23, 2017 at 08:22:30AM -0600, Bill Schmidt wrote: >> TSan support was contributed to LLVM by a student working at one of the US >> National Labs a while back. I helped him with some of the PPC assembly >> programming. To my k

Re: -fsanitize=thread support on ppc64

2017-01-23 Thread Jakub Jelinek
On Mon, Jan 23, 2017 at 08:22:30AM -0600, Bill Schmidt wrote: > TSan support was contributed to LLVM by a student working at one of the US > National Labs a while back. I helped him with some of the PPC assembly > programming. To my knowledge this is working, but I haven't tested this with > GCC

Re: -fsanitize=thread support on ppc64

2017-01-23 Thread Bill Schmidt
TSan support was contributed to LLVM by a student working at one of the US National Labs a while back. I helped him with some of the PPC assembly programming. To my knowledge this is working, but I haven't tested this with GCC. Do you think we want to change the configuration for GCC this late

Re: GCC libatomic ABI specification draft

2017-01-23 Thread Michael Matz
Hi, On Fri, 20 Jan 2017, Richard Henderson wrote: > > You can't have a 4-aligned type of size 3. Sizes must be multiples of > > alignment (otherwise arrays don't work). The type of a 3-sized field > > in a packed struct that syntactically might be a 4-aligned type (e.g. > > by using attribut

Re: -fsanitize=thread support on ppc64

2017-01-23 Thread Maxim Ostapenko
Hi, On 23/01/17 14:33, Jakub Jelinek wrote: Hi! I've noticed today there is tsan_rtl_ppc64.S file since the latest merge from upstream. Does that mean tsan is supposed to work on ppc64? Just powerpc64le-*-linux*, or powerpc64-*-linux* too? FWIW LLVM has build bots for both ppc64le-linux and

Successful bootstrap and installation of gcc 6.3.0 on x86_64-pc-linux-gnu

2017-01-23 Thread Ciro Landolfi
Hi, I have successfully bootstrapped and installed a release version of gcc 6.3.0. As I have read at the end of the installation instructions I send you the following information: Output from command 'srcdir/config.guess': x86_64-pc-linux-gnu Output from command 'gcc -v':

-fsanitize=thread support on ppc64

2017-01-23 Thread Jakub Jelinek
Hi! I've noticed today there is tsan_rtl_ppc64.S file since the latest merge from upstream. Does that mean tsan is supposed to work on ppc64? Just powerpc64le-*-linux*, or powerpc64-*-linux* too? If yes, then libsanitizer/configure.tgt should be changed to reflect that change. Jakub

Re: Changing base compiler requirement for bootstrapping GNAT

2017-01-23 Thread Tristan Gingold
> On 19 Jan 2017, at 13:33, Jakub Jelinek wrote: > > On Thu, Jan 19, 2017 at 01:26:32PM +0100, Andreas Schwab wrote: >> On Jan 19 2017, Tristan Gingold wrote: >> >>> Is it ok to require gcc 4.9 (3 years old) or later to build GNAT ? >> >> The newest Ada compiler available for SLE11 is 4.8. >

Re: How to configure a bi-arch PowerPC GCC?

2017-01-23 Thread Sebastian Huber
On 21/01/17 01:46, Segher Boessenkool wrote: On Fri, Jan 20, 2017 at 08:35:14AM +0100, Sebastian Huber wrote: so you seem to have 64-bit ABI_V4? I wonder how well tested that is, you are likely to run into more problems. Either stack_restore_tie or the above code will need a tweak. thanks for