|
From: | Richard Henderson |
Subject: | Re: [Qemu-devel] [v2 1/2] cutils: add avx2 instruction optimization |
Date: | Thu, 12 Nov 2015 15:43:29 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 11/10/2015 03:51 AM, Liang Li wrote:
+__asm__(".type can_use_buffer_find_nonzero_offset, \%gnu_indirect_function"); +__asm__(".type buffer_find_nonzero_offset, \%gnu_indirect_function"); + + +void *can_use_buffer_find_nonzero_offset_ifunc(void) \ + __asm__("can_use_buffer_find_nonzero_offset"); + +void *buffer_find_nonzero_offset_ifunc(void) \ + __asm__("buffer_find_nonzero_offset");
Not keen on this. You can use the ifunc attribute instead of inline asm, and the target attribute to enable per-function use of avx2. And if neither are supported, due to compiler limitations, I don't think you should attempt to work around that.
r~
[Prev in Thread] | Current Thread | [Next in Thread] |