Re: [PATCH 2/2] [i386] PR82002 Part 2: Correct non-immediate offset/invalid INSN

2017-11-04 Thread Uros Bizjak
On Fri, Nov 3, 2017 at 10:22 PM, Daniel Santos wrote: > On 11/03/2017 02:09 AM, Uros Bizjak wrote: >> On Thu, Nov 2, 2017 at 11:43 PM, Daniel Santos >> wrote: >> >int_registers_saved = (frame.nregs == 0); >sse_registers_saved = (frame.nsseregs == 0); > + save_stub_call_neede

Re: [PATCH 2/2] [i386] PR82002 Part 2: Correct non-immediate offset/invalid INSN

2017-11-03 Thread Daniel Santos
On 11/03/2017 04:22 PM, Daniel Santos wrote: > ... > How does this patch look?  (Also, I've updated comments for > choose_baseaddr.)  Currently re-running tests. > > Thanks, > Daniel > > @@ -13110,10 +13125,26 @@ ix86_expand_prologue (void) >target. */ >if (TARGET_SEH) > m->f

Re: [PATCH 2/2] [i386] PR82002 Part 2: Correct non-immediate offset/invalid INSN

2017-11-03 Thread Daniel Santos
On 11/03/2017 02:09 AM, Uros Bizjak wrote: > On Thu, Nov 2, 2017 at 11:43 PM, Daniel Santos > wrote: > int_registers_saved = (frame.nregs == 0); sse_registers_saved = (frame.nsseregs == 0); + save_stub_call_needed = (m->call_ms2sysv); + gcc_assert (!(!sse_registers_sav

Re: [PATCH 2/2] [i386] PR82002 Part 2: Correct non-immediate offset/invalid INSN

2017-11-03 Thread Uros Bizjak
On Thu, Nov 2, 2017 at 11:43 PM, Daniel Santos wrote: >>>int_registers_saved = (frame.nregs == 0); >>>sse_registers_saved = (frame.nsseregs == 0); >>> + save_stub_call_needed = (m->call_ms2sysv); >>> + gcc_assert (!(!sse_registers_saved && save_stub_call_needed)); >> Oooh, double negati

Re: [PATCH 2/2] [i386] PR82002 Part 2: Correct non-immediate offset/invalid INSN

2017-11-02 Thread Daniel Santos
On 10/31/2017 04:31 AM, Uros Bizjak wrote: > On Tue, Oct 31, 2017 at 3:09 AM, Daniel Santos > wrote: >> When we are realigning the stack pointer, making an ms_abi to sysv_abi >> call and alllocating 2GiB or more on the stack we end up with an invalid >> INSN due to a non-immediate offset. This o

Re: [PATCH 2/2] [i386] PR82002 Part 2: Correct non-immediate offset/invalid INSN

2017-10-31 Thread Uros Bizjak
On Tue, Oct 31, 2017 at 3:09 AM, Daniel Santos wrote: > When we are realigning the stack pointer, making an ms_abi to sysv_abi > call and alllocating 2GiB or more on the stack we end up with an invalid > INSN due to a non-immediate offset. This occurs both with and without > -mcall-ms2sysv-xlogue

Re: [PATCH 2/2] [i386] PR82002 Part 2: Correct non-immediate offset/invalid INSN

2017-10-31 Thread Uros Bizjak
On Tue, Oct 31, 2017 at 4:23 AM, Daniel Santos wrote: > On 10/30/2017 09:09 PM, Daniel Santos wrote: >> 3. Modify choose_baseaddr to take an optional scratch_regno argument >>and never return rtx that cannot be used as an immediate. > > I should amend this, it actually does a gcc_assert, so th

Re: [PATCH 2/2] [i386] PR82002 Part 2: Correct non-immediate offset/invalid INSN

2017-10-30 Thread Daniel Santos
On 10/30/2017 09:09 PM, Daniel Santos wrote: > 3. Modify choose_baseaddr to take an optional scratch_regno argument >and never return rtx that cannot be used as an immediate. I should amend this, it actually does a gcc_assert, so that won't happen if --enable-checking=no, but it would still fa

[PATCH 2/2] [i386] PR82002 Part 2: Correct non-immediate offset/invalid INSN

2017-10-30 Thread Daniel Santos
When we are realigning the stack pointer, making an ms_abi to sysv_abi call and alllocating 2GiB or more on the stack we end up with an invalid INSN due to a non-immediate offset. This occurs both with and without -mcall-ms2sysv-xlogues. Additionally, I've discovered that the stack allocation wit