On Fri, Jan 12, 2018 at 10:00 AM, Jan Hubicka <hubi...@ucw.cz> wrote:
>> Add 'V', a special modifier which prints the name of the full integer
>> register without '%'.  For
>>
>> extern void (*func_p) (void);
>>
>> void
>> foo (void)
>> {
>>   asm ("call __x86_indirect_thunk_%V0" : : "a" (func_p));
>> }
>>
>> it generates:
>>
>> foo:
>>       movq    func_p(%rip), %rax
>>       call    __x86_indirect_thunk_rax
>>       ret
>>
>> gcc/
>>
>>       * config/i386/i386.c (print_reg): Print the name of the full
>>       integer register without '%'.
>>       (ix86_print_operand): Handle 'V'.
>>        * doc/extend.texi: Document 'V' modifier.
>
> Seems reasonable. Purpose of this is to make posible to call thunks
> from asm statements, right?
>

Yes.

-- 
H.J.

Reply via email to