This won't make the list; I'll send a more coherent and less HTML-afflicted 
version later.

The bare 'ax' naming made it painful to instantiate the external thunks for 
32-bit and 64-bot code because we had to put the e/r back again inside the .irp 
reg ax bx... code.

We could probably have lived with that but it would be painful to change now 
that Linux and Xen patches with the current ABI are all lined up. I appreciate 
they weren't in GCC yet so we get little sympathy but these are strange times 
and we had to move fast.

I'd really like *not* to change it now. Having the thunk name actually include 
the name of the register it's using does seem nicer anyway...

On 14 Jan 2018 17:58, "H.J. Lu" <hjl.to...@gmail.com> wrote:

On Sun, Jan 14, 2018 at 8:45 AM, Jakub Jelinek <ja...@redhat.com> wrote:
> On Sun, Jan 14, 2018 at 08:41:54AM -0800, H.J. Lu wrote:
>> They are used in asm statements in kernel:
>>
>> extern void (*func_p) (void);
>>
>> void
>> foo (void)
>> {
>>   asm ("call __x86_indirect_thunk_%V0" : : "a" (func_p));
>
> Well, using it just with a single register classes wouldn't make much sense,
> then you can just use "call __x86_indirect_thunk_rax"
> or "call __x86_indirect_thunk_eax" depending on __x86_64__, you wouldn't
> need to extend anything.
> But supposedly if you use it with "r" or "q" or similar class this will be
> different.
>

I believe "r" is allowed.


--
H.J.




Amazon Web Services UK Limited. Registered in England and Wales with 
registration number 08650665 and which has its registered office at 60 Holborn 
Viaduct, London EC1A 2FD, United Kingdom.

Reply via email to