[PATCH 4/4] x86: Add 'V' register operand modifier

H.J. Lu hjl.tools@gmail.com
Sat Jan 13 16:37:00 GMT 2018


On Sat, Jan 13, 2018 at 8:28 AM, Florian Weimer <fw@deneb.enyo.de> wrote:
> * H. J. Lu:
>
>> On Fri, Jan 12, 2018 at 10:00 AM, Jan Hubicka <hubicka@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));
>>>> }
>
>>> Seems reasonable. Purpose of this is to make posible to call thunks
>>> from asm statements, right?
>>
>> Yes.
>
> Can you actually do this in practice?  What about the red zone and CFI
> annotations?

This is used by kernel, which doesn't use red-zone.  David, does it
work for kernel?

-- 
H.J.



More information about the Gcc-patches mailing list