On Sat, Jan 13, 2018 at 9:30 AM, Jan Hubicka wrote:
>> On Sat, Jan 13, 2018 at 7:56 AM, Jan Hubicka wrote:
>> >> >> +/* Output a funtion with a call and return thunk for indirect branch.
>> >> >> + If BND_P is true, the BND prefix is needed. If REGNO != -1,
> On Sat, Jan 13, 2018 at 7:56 AM, Jan Hubicka wrote:
> >> >> +/* Output a funtion with a call and return thunk for indirect branch.
> >> >> + If BND_P is true, the BND prefix is needed. If REGNO != -1, the
> >> >> + function address is in REGNO. Otherwise, the function
On Sat, Jan 13, 2018 at 7:56 AM, Jan Hubicka wrote:
>> >> +/* Output a funtion with a call and return thunk for indirect branch.
>> >> + If BND_P is true, the BND prefix is needed. If REGNO != -1, the
>> >> + function address is in REGNO. Otherwise, the function address is
> >> +/* Output a funtion with a call and return thunk for indirect branch.
> >> + If BND_P is true, the BND prefix is needed. If REGNO != -1, the
> >> + function address is in REGNO. Otherwise, the function address is
> >> + on the top of stack. */
> >> +
> >> +static void
> >>
On Fri, Jan 12, 2018 at 9:47 AM, Jan Hubicka wrote:
>> gcc/
>>
>> * config/i386/i386-opts.h (indirect_branch): New.
>> * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
>> * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
>> with
> gcc/
>
> * config/i386/i386-opts.h (indirect_branch): New.
> * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
> * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
> with local indirect jump when converting indirect call and jump.
>
Add -mindirect-branch= option to convert indirect call and jump to call
and return thunks. The default is 'keep', which keeps indirect call and
jump unmodified. 'thunk' converts indirect call and jump to call and
return thunk. 'thunk-inline' converts indirect call and jump to inlined
call and