Re: [patch] arm,rx: don't ICE on naked functions with local vars

2011-07-28 Thread Richard Henderson
On 07/26/2011 12:52 PM, DJ Delorie wrote: This patch tests for at least one user-caused reason for this assertion failing - requiring a local frame in a naked function. For this case at least, it would be better to trigger an error than to ICE. OK? static int bar; void

Re: [patch] arm,rx: don't ICE on naked functions with local vars

2011-07-28 Thread DJ Delorie
Naked is related to TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS - ARM and RX set the latter based on the former, and nobody else uses that target hook. So, naked functions don't have stack slots for args. Without stack slots, args can't be assigned to memory locations - even if they're

Re: [patch] arm,rx: don't ICE on naked functions with local vars

2011-07-28 Thread Richard Henderson
On 07/28/2011 12:38 PM, DJ Delorie wrote: Naked is related to TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS - ARM and RX set the latter based on the former, and nobody else uses that target hook. So, naked functions don't have stack slots for args. Without stack slots, args can't be assigned to

Re: [patch] arm,rx: don't ICE on naked functions with local vars

2011-07-28 Thread DJ Delorie
Fails the same way with a parameter as with a local: int result; void __attribute__((naked)) ISRFunction(int x) { result = subFunction(x); } but I'm certainly open to a better explanation of how a user program can trigger an ICE that way. Hmmm... the only use of

Re: [patch] arm,rx: don't ICE on naked functions with local vars

2011-07-28 Thread Richard Henderson
On 07/28/2011 01:30 PM, DJ Delorie wrote: Fails the same way with a parameter as with a local: int result; void __attribute__((naked)) ISRFunction(int x) { result = subFunction(x); } but I'm certainly open to a better explanation of how a user program can trigger an ICE that way.

Re: [patch] arm,rx: don't ICE on naked functions with local vars

2011-07-28 Thread DJ Delorie
Thanks! Committed.

[patch] arm,rx: don't ICE on naked functions with local vars

2011-07-26 Thread DJ Delorie
This patch tests for at least one user-caused reason for this assertion failing - requiring a local frame in a naked function. For this case at least, it would be better to trigger an error than to ICE. OK? static int bar; void __attribute__((naked)) function(void) { int foo, result;