Re: RFC: [PATCH] PR target/67215: -fno-plt needs improvements for x86

2015-08-19 Thread H.J. Lu
On Mon, Aug 17, 2015 at 10:17:00AM -0700, H.J. Lu wrote: > On Mon, Aug 17, 2015 at 10:08 AM, Alexander Monakov > wrote: > >> >> Perhaps add a comment that GOT slots are 64-bit on x32? > >> >> > >> > > >> > Good idea. I will update my patch. > >> > > >> > >> How about this? > >> > >> > >> diff --

Re: RFC: [PATCH] PR target/67215: -fno-plt needs improvements for x86

2015-08-17 Thread H.J. Lu
On Mon, Aug 17, 2015 at 10:08 AM, Alexander Monakov wrote: >> >> Perhaps add a comment that GOT slots are 64-bit on x32? >> >> >> > >> > Good idea. I will update my patch. >> > >> >> How about this? >> >> >> diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c >> index bf8a21d..216dee6 10

Re: RFC: [PATCH] PR target/67215: -fno-plt needs improvements for x86

2015-08-17 Thread Alexander Monakov
> >> Perhaps add a comment that GOT slots are 64-bit on x32? > >> > > > > Good idea. I will update my patch. > > > > How about this? > > > diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c > index bf8a21d..216dee6 100644 > --- a/gcc/config/i386/i386.c > +++ b/gcc/config/i386/i386.c >

Re: RFC: [PATCH] PR target/67215: -fno-plt needs improvements for x86

2015-08-16 Thread H.J. Lu
On Sun, Aug 16, 2015 at 12:39 PM, H.J. Lu wrote: > On Sun, Aug 16, 2015 at 12:24 PM, Alexander Monakov > wrote: > >>> + if (!TARGET_64BIT >>> + || (ix86_cmodel == CM_LARGE_PIC >>> + && DEFAULT_ABI != MS_ABI)) >>> + { >>> + use_r

Re: RFC: [PATCH] PR target/67215: -fno-plt needs improvements for x86

2015-08-16 Thread H.J. Lu
On Sun, Aug 16, 2015 at 12:24 PM, Alexander Monakov wrote: > On Sun, 16 Aug 2015, H.J. Lu wrote: > >> prepare_call_address in calls.c is the wrong place to handle -fno-plt. >> We shoudn't force function address into register and hope that load >> function address via GOT and indirect call via regi

Re: RFC: [PATCH] PR target/67215: -fno-plt needs improvements for x86

2015-08-16 Thread Alexander Monakov
On Sun, 16 Aug 2015, H.J. Lu wrote: > prepare_call_address in calls.c is the wrong place to handle -fno-plt. > We shoudn't force function address into register and hope that load > function address via GOT and indirect call via register will be folded > into indirect call via GOT, which doesn't al