Re: [PATCH v2] SH FDPIC backend support

2015-10-07 Thread Oleg Endo
On Tue, 2015-10-06 at 19:36 -0400, Rich Felker wrote: > > > > Do you have some alternatives to what's currently in the patch? It's > > difficult to judge without seeing them... > > Perhaps something like the following: > > #ifdef __SH_FDPIC__ > typedef __attribute__((__may_alias__)) uintptr_t s

Re: [PATCH v2] SH FDPIC backend support

2015-10-06 Thread Rich Felker
On Wed, Oct 07, 2015 at 07:22:59AM +0900, Oleg Endo wrote: > On Tue, 2015-10-06 at 12:52 -0400, Rich Felker wrote: > > > > + if (TARGET_FDPIC) > > > > +{ > > > > + rtx a = force_reg (Pmode, plus_constant (Pmode, XEXP (tramp_mem, > > > > 0), 8)); > > > > + emit_move_insn (adjust_addr

Re: [PATCH v2] SH FDPIC backend support

2015-10-06 Thread Oleg Endo
On Tue, 2015-10-06 at 12:52 -0400, Rich Felker wrote: > > > + if (TARGET_FDPIC) > > > +{ > > > + rtx a = force_reg (Pmode, plus_constant (Pmode, XEXP (tramp_mem, > > > 0), 8)); > > > + emit_move_insn (adjust_address (tramp_mem, SImode, 0), a); > > > + emit_move_insn (adjust_add

Re: [PATCH v2] SH FDPIC backend support

2015-10-06 Thread Rich Felker
On Tue, Oct 06, 2015 at 09:39:20PM +0900, Oleg Endo wrote: > On Mon, 2015-10-05 at 23:15 -0400, Rich Felker wrote: > > Attached is the initial version of the patch against trunk. I've fixed > > the functional issues I'm aware of from the previous version: ICE in > > generating the plain-SH2 libgcc-

Re: [PATCH v2] SH FDPIC backend support

2015-10-06 Thread Kaz Kojima
Oleg Endo wrote: > On Mon, 2015-10-05 at 23:15 -0400, Rich Felker wrote: >> - Is the use of self specs (see DRIVER_SELF_SPECS in sh.h) an >> acceptable way to set the default? I brought this up before but >> don't think anyone answered. I find this method more clear and less >> invasive (doe

Re: [PATCH v2] SH FDPIC backend support

2015-10-06 Thread Oleg Endo
On Mon, 2015-10-05 at 23:15 -0400, Rich Felker wrote: > Attached is the initial version of the patch against trunk. I've fixed > the functional issues I'm aware of from the previous version: ICE in > generating the plain-SH2 libgcc-based shifts, missing > sh_legitimate_constant_p changes, and bad a

[PATCH v2] SH FDPIC backend support

2015-10-05 Thread Rich Felker
On Fri, Oct 02, 2015 at 07:36:27AM +0900, Oleg Endo wrote: > On Thu, 2015-10-01 at 17:35 -0400, Rich Felker wrote: > > This is a forward-port of the abandoned SH FDPIC patch from 2010: > > > > https://gcc.gnu.org/ml/gcc-patches/2010-08/msg01536.html > > > > I'm submitting it at this point for ini