From: Steinar H. Gunderson Date: Tue, 20 Sep 2016 12:17:36 +0000 (+0200) Subject: Explicitly declare both versions of add_to_frame_fastpath_core, to prevent GCC from... X-Git-Tag: 0.5.2~2 X-Git-Url: https://git.sesse.net/?p=bmusb;a=commitdiff_plain;h=69b4f1db4fc485f28d6265a6adacb9a6baaa095f Explicitly declare both versions of add_to_frame_fastpath_core, to prevent GCC from inlining the wrong version. --- diff --git a/bmusb.cpp b/bmusb.cpp index 080c0bb..86779b4 100644 --- a/bmusb.cpp +++ b/bmusb.cpp @@ -536,6 +536,10 @@ const uint8_t *add_to_frame_fastpath(FrameAllocator::Frame *current_frame, const #else // defined(HAS_MULTIVERSIONING) +__attribute__((target("sse4.1"))) +const uint8_t *add_to_frame_fastpath_core(FrameAllocator::Frame *current_frame, const uint8_t *aligned_start, const uint8_t *limit, const char sync_char); + +__attribute__((target("avx2"))) const uint8_t *add_to_frame_fastpath_core(FrameAllocator::Frame *current_frame, const uint8_t *aligned_start, const uint8_t *limit, const char sync_char); // Does a memcpy and memchr in one to reduce processing time.