Skip to content

Commit

Permalink
CI fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mjp41 committed Aug 1, 2023
1 parent 07da5c3 commit d8189cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -387,10 +387,9 @@ if(NOT SNMALLOC_HEADER_ONLY_LIBRARY)
target_compile_options(${name} PRIVATE
-fomit-frame-pointer -ffunction-sections)

if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
check_cxx_compiler_flag(-mprfchw SUPPORT_PREFETCH_WRITE)
if (SUPPORT_PREFETCH_WRITE)
target_compile_options(${name} PRIVATE -mprfchw)
else()
message(STATUS "Disabling -mprfchw for ${name} on ${CMAKE_SYSTEM_PROCESSOR}")
endif()
# Static TLS model is unsupported on Haiku.
if (NOT CMAKE_SYSTEM_NAME STREQUAL "Haiku")
Expand Down
4 changes: 4 additions & 0 deletions src/snmalloc/aal/aal_x86.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ namespace snmalloc
*/
static inline void prefetch(void* ptr)
{
#if defined(_MSC_VER)
_m_prefetchw(ptr);
#else
_mm_prefetch(reinterpret_cast<const char*>(ptr), _MM_HINT_T0);
#endif
}

/**
Expand Down

0 comments on commit d8189cb

Please sign in to comment.