Re: [PATCH] i386: Update naked-1.c for PIC

2017-07-31 Thread Uros Bizjak
On Tue, Aug 1, 2017 at 12:48 AM, H.J. Lu wrote: > For ia32 targets, -fPIC may generate > > call __x86.get_pc_thunk.ax > ... > __x86.get_pc_thunk.ax: > movl(%esp), %eax > ret > > We should check "ret" only for non-PIC or non-ia32 targets. I have added -fno-pic t

[PATCH] i386: Update naked-1.c for PIC

2017-07-31 Thread H.J. Lu
For ia32 targets, -fPIC may generate call __x86.get_pc_thunk.ax ... __x86.get_pc_thunk.ax: movl(%esp), %eax ret We should check "ret" only for non-PIC or non-ia32 targets. OK for trunk? H.J. --- * gcc.target/i386/naked-1.c: Check "ret" only for non-PI