Re: [PATCH] s390: Add -fsplit-stack support

2016-02-15 Thread Marcin Kościelnicki
On 15/02/16 11:21, Andreas Krebbel wrote: On 02/14/2016 05:01 PM, Marcin Kościelnicki wrote: libgcc/ChangeLog: * config.host: Use t-stack and t-stack-s390 for s390*-*-linux. * config/s390/morestack.S: New file. * config/s390/t-stack-s390: New file. * generic-more

Re: [PATCH] s390: Add -fsplit-stack support

2016-02-15 Thread Andreas Krebbel
On 02/14/2016 05:01 PM, Marcin Kościelnicki wrote: > libgcc/ChangeLog: > > * config.host: Use t-stack and t-stack-s390 for s390*-*-linux. > * config/s390/morestack.S: New file. > * config/s390/t-stack-s390: New file. > * generic-morestack.c (__splitstack_find): Add s390-spe

Re: [PATCH] s390: Add -fsplit-stack support

2016-02-10 Thread Marcin Kościelnicki
On 04/02/16 13:44, Marcin Kościelnicki wrote: On 03/02/16 18:27, Ulrich Weigand wrote: Marcin KoÅ›cielnicki wrote: libgcc/ChangeLog: * config.host: Use t-stack and t-stack-s390 for s390*-*-linux. * config/s390/morestack.S: New file. * config/s390/t-stack-s390: New file. * gene

Re: [PATCH] s390: Add -fsplit-stack support

2016-02-05 Thread Ulrich Weigand
Marcin Kościelnicki wrote: > I'll stay with checking for larl - while I can imagine someone adding a > new conditional branch instruction, I don't see a need for another > larl-like instruction. Besides, this way the failure mode for an > unknown instruction would be producing an error, inste

Re: [PATCH] s390: Add -fsplit-stack support

2016-02-05 Thread Marcin Kościelnicki
On 04/02/16 17:27, Ulrich Weigand wrote: Marcin Kościelnicki wrote: Fair enough. Here's what I'm going to implement in gold: - any PLT relocation: call - PC32DBL on a larl: non-call - PC32DBL otherwise: call - any other relocation: non-call Does that sound right? Hmm, I'm wondering about

Re: [PATCH] s390: Add -fsplit-stack support

2016-02-04 Thread Ulrich Weigand
Marcin Kościelnicki wrote: > Fair enough. Here's what I'm going to implement in gold: > > - any PLT relocation: call > - PC32DBL on a larl: non-call > - PC32DBL otherwise: call > - any other relocation: non-call > > Does that sound right? Hmm, I'm wondering about the PC32DBL choices. There a

Re: [PATCH] s390: Add -fsplit-stack support

2016-02-04 Thread Marcin Kościelnicki
On 04/02/16 16:06, Ulrich Weigand wrote: Marcin Kościelnicki wrote: Ugh. I take that back. For -fPIC, the load-address sequence is: larl%r1,f@GOTENT lg %r2,0(%r1) br %r14 This is correct. And (sibling) call sequence is: larl%r1,f

Re: [PATCH] s390: Add -fsplit-stack support

2016-02-04 Thread Ulrich Weigand
Marcin Kościelnicki wrote: > Ugh. I take that back. For -fPIC, the load-address sequence is: > > larl%r1,f@GOTENT > lg %r2,0(%r1) > br %r14 This is correct. > And (sibling) call sequence is: > > larl%r1,f@GOTENT > lg %r1,0(%

Re: [PATCH] s390: Add -fsplit-stack support

2016-02-04 Thread Marcin Kościelnicki
On 03/02/16 18:27, Ulrich Weigand wrote: Marcin Kościelnicki wrote: libgcc/ChangeLog: * config.host: Use t-stack and t-stack-s390 for s390*-*-linux. * config/s390/morestack.S: New file. * config/s390/t-stack-s390: New file. * generic-morestack.c (__splitstack_f

Re: [PATCH] s390: Add -fsplit-stack support

2016-02-03 Thread Marcin Kościelnicki
The second issue I'm still not sure about is the magic nop marker for frameless functions. In an earlier mail you wrote: Both currently supported architectures always emit split-stack code on every function. At least for rs6000 this doesn't appear to be true; in rs6000_expand_split_stack_p

Re: [PATCH] s390: Add -fsplit-stack support

2016-02-03 Thread Ulrich Weigand
Marcin Kościelnicki wrote: > libgcc/ChangeLog: > > * config.host: Use t-stack and t-stack-s390 for s390*-*-linux. > * config/s390/morestack.S: New file. > * config/s390/t-stack-s390: New file. > * generic-morestack.c (__splitstack_find): Add s390-specific code. > > gcc/C

Re: [PATCH] s390: Add -fsplit-stack support

2016-02-03 Thread Ulrich Weigand
Marcin Kościelnicki wrote: > Comment fixed, split_stack_marker gone, reorg gone. Generated code seems > sane, > but testsuite still running. > > I will need to modify the gold patch to handle the "leaf function taking > non-split > stack function address" issue - this will likely require mess

Re: [PATCH] s390: Add -fsplit-stack support

2016-02-02 Thread Marcin Kościelnicki
On 02/02/16 19:33, Ulrich Weigand wrote: Marcin Kościelnicki wrote: Here we go. I've also removed the "see below", since I don't really see anything below... The "see below" refers to this code (which I agree isn't really obvious): if (TARGET_TPF_PROFILING) { /* Generate a B

Re: [PATCH] s390: Add -fsplit-stack support

2016-02-02 Thread Ulrich Weigand
Marcin Kościelnicki wrote: > Here we go. I've also removed the "see below", since I don't really > see anything below... The "see below" refers to this code (which I agree isn't really obvious): if (TARGET_TPF_PROFILING) { /* Generate a BAS instruction to serve as a function

Re: [PATCH] s390: Add -fsplit-stack support

2016-02-02 Thread Andreas Krebbel
On 02/02/2016 03:52 PM, Marcin Kościelnicki wrote: > libgcc/ChangeLog: > > * config.host: Use t-stack and t-stack-s390 for s390*-*-linux. > * config/s390/morestack.S: New file. > * config/s390/t-stack-s390: New file. > * generic-morestack.c (__splitstack_find): Add s390-spe

Re: [PATCH] s390: Add -fsplit-stack support

2016-01-29 Thread Andreas Krebbel
On 01/29/2016 04:43 PM, Marcin Kościelnicki wrote: > The testsuite with -fsplit-stack already hits all of them, and checking > them manually is rather tricky (I don't know if it could be done in > target-independent way at all), but I think it'd be reasonable to make > assembly testcases calling

Re: [PATCH] s390: Add -fsplit-stack support

2016-01-29 Thread Marcin Kościelnicki
On 29/01/16 14:33, Andreas Krebbel wrote: Hi Marcin, sorry for the late feedback. A few comments regarding the split stack implementation: The GNU coding style requires to replace every 8 leading blanks on a line with a tab. There are many lines in your patch violating this. In case you are a

Re: [PATCH] s390: Add -fsplit-stack support

2016-01-29 Thread Andreas Krebbel
Hi Marcin, sorry for the late feedback. A few comments regarding the split stack implementation: The GNU coding style requires to replace every 8 leading blanks on a line with a tab. There are many lines in your patch violating this. In case you are an emacs user `whitespace-cleanup' will fix t