Re: [PATCH, rs6000]: mark clobber for registers changed by untpyed_call

2020-02-14 Thread Segher Boessenkool
On Fri, Feb 14, 2020 at 02:58:49PM +0800, Jiufu Guo wrote: > Segher Boessenkool writes: > > > On Sat, Feb 08, 2020 at 10:17:42AM -0600, Segher Boessenkool wrote: > >> And we do not know which of the register will be used for the return, in > >> untyped_call (only untyped-return knows). But we

Re: [PATCH, rs6000]: mark clobber for registers changed by untpyed_call

2020-02-13 Thread Jiufu Guo
Segher Boessenkool writes: > On Sat, Feb 08, 2020 at 10:17:42AM -0600, Segher Boessenkool wrote: >> And we do not know which of the register will be used for the return, in >> untyped_call (only untyped-return knows). But we can add clobbers of all >> registers that *might* be used for the

Re: [PATCH, rs6000]: mark clobber for registers changed by untpyed_call

2020-02-08 Thread Segher Boessenkool
On Sat, Feb 08, 2020 at 10:17:42AM -0600, Segher Boessenkool wrote: > And we do not know which of the register will be used for the return, in > untyped_call (only untyped-return knows). But we can add clobbers of all > registers that *might* be used for the return, we do know that here, see >

Re: [PATCH, rs6000]: mark clobber for registers changed by untpyed_call

2020-02-08 Thread Segher Boessenkool
Hi! On Fri, Feb 07, 2020 at 03:10:05PM +0800, Jiufu Guo wrote: > Segher Boessenkool writes: > > On Thu, Feb 06, 2020 at 10:49:36AM +0800, Jiufu Guo wrote: > >> > ... and nothing in the rtl stream says that those return registers are > >> > actually set by that call. Maybe we should use

Re: [PATCH, rs6000]: mark clobber for registers changed by untpyed_call

2020-02-06 Thread Jiufu Guo
Segher Boessenkool writes: > Hi! > > On Thu, Feb 06, 2020 at 10:49:36AM +0800, Jiufu Guo wrote: >> > emit_call_insn (gen_call (operands[0], const0_rtx, const0_rtx)); >> > >> > for (i = 0; i < XVECLEN (operands[2], 0); i++) >> > { >> > rtx set = XVECEXP (operands[2], 0, i); >> >

Re: [PATCH, rs6000]: mark clobber for registers changed by untpyed_call

2020-02-06 Thread Segher Boessenkool
Hi! On Thu, Feb 06, 2020 at 10:49:36AM +0800, Jiufu Guo wrote: > > emit_call_insn (gen_call (operands[0], const0_rtx, const0_rtx)); > > > > for (i = 0; i < XVECLEN (operands[2], 0); i++) > > { > > rtx set = XVECEXP (operands[2], 0, i); > > emit_move_insn (SET_DEST (set),

Re: [PATCH, rs6000]: mark clobber for registers changed by untpyed_call

2020-02-05 Thread Jiufu Guo
Segher Boessenkool writes: > On Wed, Feb 05, 2020 at 09:53:27PM +0800, Jiufu Guo wrote: >> As PR93047 said, __builtin_apply/__builtin_return does not work well with >> -frename-registers. This is caused by return register(e.g. r3) is used to >> rename another register, before return register is

Re: [PATCH, rs6000]: mark clobber for registers changed by untpyed_call

2020-02-05 Thread Segher Boessenkool
On Wed, Feb 05, 2020 at 09:53:27PM +0800, Jiufu Guo wrote: > As PR93047 said, __builtin_apply/__builtin_return does not work well with > -frename-registers. This is caused by return register(e.g. r3) is used to > rename another register, before return register is stored to stack. > > This patch

[PATCH, rs6000]: mark clobber for registers changed by untpyed_call

2020-02-05 Thread Jiufu Guo
As PR93047 said, __builtin_apply/__builtin_return does not work well with -frename-registers. This is caused by return register(e.g. r3) is used to rename another register, before return register is stored to stack. This patch fix this issue by emitting clobber for those egisters which maybe