On 12 April 2016 at 14:57, Roland Scheidegger <srol...@vmware.com> wrote: > Am 12.04.2016 um 13:00 schrieb Emil Velikov: >> On 11 April 2016 at 20:05, Matt Turner <matts...@gmail.com> wrote: >>> From: Roland Scheidegger <srol...@vmware.com> >>> >>> The existing code uses SSSE3, and because it isn't compiled in a >>> separate file compiled with that... >> Just a note (not meant to derail things): >> >> One should be able to compile just hunks of the code with sse2/sss3/other. >> Although I'm not sure how portable it is (wrt clang/msvc/etc) >> > > Do you mean within the same file? That would be interesting (albeit I > have my doubts it would be portable). Though for this case it's probably > not really worth bothering... > Something like the following should work.
int sse3_func (void) __attribute__ ((__target__ ("sse3"))); For GCC ('target' section in [1] [2]) and the same for clang [3] (not 100% on this one). No idea about MSVC. Never tried it personally, nor am I advocating that this has to be done here. Just throwing it out there. -Emil [1] https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#Common-Function-Attributes [2] https://gcc.gnu.org/onlinedocs/gcc/x86-Function-Attributes.html#x86-Function-Attributes [3] http://clang.llvm.org/doxygen/emmintrin_8h_source.html _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev