Re: [PATCH][expr.c] PR 65358 Avoid clobbering partial argument during sibcall

2015-05-27 Thread Kyrill Tkachov
Hi Jeff, On 12/05/15 23:04, Jeff Law wrote: On 05/11/2015 03:28 AM, Kyrill Tkachov wrote: The more I think about this, the more I think it's an ugly can of worms and maybe we should just disable sibcalls for partial arguments. I doubt it's a big performance issue in general. We already have

Re: [PATCH][expr.c] PR 65358 Avoid clobbering partial argument during sibcall

2015-05-12 Thread Jeff Law
On 05/11/2015 03:28 AM, Kyrill Tkachov wrote: The more I think about this, the more I think it's an ugly can of worms and maybe we should just disable sibcalls for partial arguments. I doubt it's a big performance issue in general. We already have quite a bit of code in calls.c to detect cases

Re: [PATCH][expr.c] PR 65358 Avoid clobbering partial argument during sibcall

2015-05-11 Thread Kyrill Tkachov
On 01/05/15 19:51, Jeff Law wrote: On 04/28/2015 03:54 AM, Kyrill Tkachov wrote: On 27/04/15 21:13, Jeff Law wrote: On 04/21/2015 11:33 AM, Kyrill Tkachov wrote: On 21/04/15 15:09, Jeff Law wrote: On 04/21/2015 02:30 AM, Kyrill Tkachov wrote: From reading config/stormy16/stormy-abi it s

Re: [PATCH][expr.c] PR 65358 Avoid clobbering partial argument during sibcall

2015-05-06 Thread John David Anglin
On 2015-04-27 9:16 AM, John David Anglin wrote: Hi Dave, Would it be possible for you to test this patch on a 64-bit hppa or at least bootstrap it? https://gcc.gnu.org/ml/gcc-patches/2015-04/msg01288.html I started a build and test with your patch on hppa64-hp-hpux11.11 this morning. The patc

Re: [PATCH][expr.c] PR 65358 Avoid clobbering partial argument during sibcall

2015-05-01 Thread Jeff Law
On 04/28/2015 03:54 AM, Kyrill Tkachov wrote: On 27/04/15 21:13, Jeff Law wrote: On 04/21/2015 11:33 AM, Kyrill Tkachov wrote: On 21/04/15 15:09, Jeff Law wrote: On 04/21/2015 02:30 AM, Kyrill Tkachov wrote: From reading config/stormy16/stormy-abi it seems to me that we don't pass argumen

Re: [PATCH][expr.c] PR 65358 Avoid clobbering partial argument during sibcall

2015-04-30 Thread Kyrill Tkachov
On 28/04/15 10:54, Kyrill Tkachov wrote: On 27/04/15 21:13, Jeff Law wrote: On 04/21/2015 11:33 AM, Kyrill Tkachov wrote: On 21/04/15 15:09, Jeff Law wrote: On 04/21/2015 02:30 AM, Kyrill Tkachov wrote: From reading config/stormy16/stormy-abi it seems to me that we don't pass arguments p

Re: [PATCH][expr.c] PR 65358 Avoid clobbering partial argument during sibcall

2015-04-28 Thread Kyrill Tkachov
On 27/04/15 21:13, Jeff Law wrote: On 04/21/2015 11:33 AM, Kyrill Tkachov wrote: On 21/04/15 15:09, Jeff Law wrote: On 04/21/2015 02:30 AM, Kyrill Tkachov wrote: From reading config/stormy16/stormy-abi it seems to me that we don't pass arguments partially in stormy16, so this code would ne

Re: [PATCH][expr.c] PR 65358 Avoid clobbering partial argument during sibcall

2015-04-27 Thread Jeff Law
On 04/21/2015 11:33 AM, Kyrill Tkachov wrote: On 21/04/15 15:09, Jeff Law wrote: On 04/21/2015 02:30 AM, Kyrill Tkachov wrote: From reading config/stormy16/stormy-abi it seems to me that we don't pass arguments partially in stormy16, so this code would never be called there. That leaves pa a

Re: [PATCH][expr.c] PR 65358 Avoid clobbering partial argument during sibcall

2015-04-27 Thread John David Anglin
On 2015-04-27 6:12 AM, Kyrill Tkachov wrote: On 22/04/15 12:51, Kyrill Tkachov wrote: On 21/04/15 18:33, Kyrill Tkachov wrote: On 21/04/15 15:09, Jeff Law wrote: On 04/21/2015 02:30 AM, Kyrill Tkachov wrote: From reading config/stormy16/stormy-abi it seems to me that we don't pass argume

Re: [PATCH][expr.c] PR 65358 Avoid clobbering partial argument during sibcall

2015-04-27 Thread Kyrill Tkachov
On 22/04/15 12:51, Kyrill Tkachov wrote: On 21/04/15 18:33, Kyrill Tkachov wrote: On 21/04/15 15:09, Jeff Law wrote: On 04/21/2015 02:30 AM, Kyrill Tkachov wrote: From reading config/stormy16/stormy-abi it seems to me that we don't pass arguments partially in stormy16, so this code would

Re: [PATCH][expr.c] PR 65358 Avoid clobbering partial argument during sibcall

2015-04-22 Thread Kyrill Tkachov
On 21/04/15 18:33, Kyrill Tkachov wrote: On 21/04/15 15:09, Jeff Law wrote: On 04/21/2015 02:30 AM, Kyrill Tkachov wrote: From reading config/stormy16/stormy-abi it seems to me that we don't pass arguments partially in stormy16, so this code would never be called there. That leaves pa as th

Re: [PATCH][expr.c] PR 65358 Avoid clobbering partial argument during sibcall

2015-04-21 Thread Kyrill Tkachov
On 21/04/15 15:09, Jeff Law wrote: On 04/21/2015 02:30 AM, Kyrill Tkachov wrote: From reading config/stormy16/stormy-abi it seems to me that we don't pass arguments partially in stormy16, so this code would never be called there. That leaves pa as the potential problematic target. I don't sup

Re: [PATCH][expr.c] PR 65358 Avoid clobbering partial argument during sibcall

2015-04-21 Thread Jeff Law
On 04/21/2015 02:30 AM, Kyrill Tkachov wrote: From reading config/stormy16/stormy-abi it seems to me that we don't pass arguments partially in stormy16, so this code would never be called there. That leaves pa as the potential problematic target. I don't suppose there's an easy way to test on p

Re: [PATCH][expr.c] PR 65358 Avoid clobbering partial argument during sibcall

2015-04-21 Thread Kyrill Tkachov
On 20/04/15 19:02, Jeff Law wrote: On 04/20/2015 02:25 AM, Kyrill Tkachov wrote: Hi Jeff, Hmmm, so what happens if the difference is < 0? I'd be a bit worried about that case for the PA (for example). So how about asserting that the INTVAL is >= 0 prior to returning so that we catch that ca

Re: [PATCH][expr.c] PR 65358 Avoid clobbering partial argument during sibcall

2015-04-20 Thread Jeff Law
On 04/20/2015 02:25 AM, Kyrill Tkachov wrote: Hi Jeff, Hmmm, so what happens if the difference is < 0? I'd be a bit worried about that case for the PA (for example). So how about asserting that the INTVAL is >= 0 prior to returning so that we catch that case if it ever occurs? INTVAL being

Re: [PATCH][expr.c] PR 65358 Avoid clobbering partial argument during sibcall

2015-04-20 Thread Kyrill Tkachov
Hi Jeff, On 17/04/15 18:26, Jeff Law wrote: On 03/19/2015 08:39 AM, Kyrill Tkachov wrote: Hi all, This patch fixes PR 65358. For details look at the excellent write-up by Honggyu in bugzilla. The problem is that we're trying to pass a struct partially on the stack and partially in regs during

Re: [PATCH][expr.c] PR 65358 Avoid clobbering partial argument during sibcall

2015-04-17 Thread Jeff Law
On 03/19/2015 08:39 AM, Kyrill Tkachov wrote: Hi all, This patch fixes PR 65358. For details look at the excellent write-up by Honggyu in bugzilla. The problem is that we're trying to pass a struct partially on the stack and partially in regs during a tail-call optimisation but the struct we're

Re: [PATCH][expr.c] PR 65358 Avoid clobbering partial argument during sibcall

2015-04-13 Thread Jeff Law
On 04/13/2015 08:01 AM, Kyrill Tkachov wrote: Ping. https://gcc.gnu.org/ml/gcc-patches/2015-03/msg01014.html Jeff, could you help review this patch? Or could you point me to someone who can review this? I can't figure out from MAINTAINERS who should be in charge of this part of the compiler. It'

Re: [PATCH][expr.c] PR 65358 Avoid clobbering partial argument during sibcall

2015-04-13 Thread Kyrill Tkachov
Ping. https://gcc.gnu.org/ml/gcc-patches/2015-03/msg01014.html Jeff, could you help review this patch? Or could you point me to someone who can review this? I can't figure out from MAINTAINERS who should be in charge of this part of the compiler. Thanks, Kyrill On 19/03/15 14:39, Kyrill Tkacho

Re: [PATCH][expr.c] PR 65358 Avoid clobbering partial argument during sibcall

2015-03-29 Thread Honggyu Kim
On Thu, Mar 19, 2015 at 02:39:11PM +, Kyrill Tkachov wrote: > Hi all, > > This patch fixes PR 65358. For details look at the excellent write-up > by Honggyu in bugzilla. The problem is that we're trying to pass a struct > partially on the stack and partially in regs during a tail-call optimisa

Re: [PATCH][expr.c] PR 65358 Avoid clobbering partial argument during sibcall

2015-03-27 Thread Kyrill Tkachov
Ping. https://gcc.gnu.org/ml/gcc-patches/2015-03/msg01014.html Thanks, Kyrill On 19/03/15 14:39, Kyrill Tkachov wrote: Hi all, This patch fixes PR 65358. For details look at the excellent write-up by Honggyu in bugzilla. The problem is that we're trying to pass a struct partially on the stack a

[PATCH][expr.c] PR 65358 Avoid clobbering partial argument during sibcall

2015-03-19 Thread Kyrill Tkachov
Hi all, This patch fixes PR 65358. For details look at the excellent write-up by Honggyu in bugzilla. The problem is that we're trying to pass a struct partially on the stack and partially in regs during a tail-call optimisation but the struct we're passing is also a partial incoming arg though t