mirror of
https://github.com/reactos/reactos.git
synced 2025-06-20 07:36:05 +00:00
[UCRT] Fix GCC/Clang build of SSE2/AVX code
On GCC the code using extended ISA cannot be inlined and must either be marked with a function attribute or compiled with the proper target options ('-mavx2' on the command line or '#pragma GCC target("avx2")' inside the code)
This commit is contained in:
parent
51e6ce3aa7
commit
97e20ef342
2 changed files with 25 additions and 1 deletions
|
@ -78,11 +78,13 @@ static __forceinline size_t __cdecl common_strnlen_c(
|
|||
|
||||
#ifdef _CRT_SIMD_SUPPORT_AVAILABLE
|
||||
|
||||
_UCRT_ENABLE_EXTENDED_ISA
|
||||
|
||||
template <strnlen_mode Mode, __crt_simd_isa Isa, typename Element>
|
||||
_Check_return_
|
||||
_When_(maximum_count > _String_length_(string), _Post_satisfies_(return == _String_length_(string)))
|
||||
_When_(maximum_count <= _String_length_(string), _Post_satisfies_(return == maximum_count))
|
||||
static __forceinline size_t __cdecl common_strnlen_simd(
|
||||
static __inline size_t __cdecl common_strnlen_simd(
|
||||
Element const* const string,
|
||||
size_t const maximum_count
|
||||
) throw()
|
||||
|
@ -168,6 +170,8 @@ static __forceinline size_t __cdecl common_strnlen_c(
|
|||
return static_cast<size_t>(it - string);
|
||||
}
|
||||
|
||||
_UCRT_RESTORE_DEFAULT_ISA
|
||||
|
||||
#endif // _CRT_SIMD_SUPPORT_AVAILABLE
|
||||
|
||||
template <strnlen_mode Mode, typename Element>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue