From 69b4f1db4fc485f28d6265a6adacb9a6baaa095f Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Tue, 20 Sep 2016 14:17:36 +0200 Subject: [PATCH] Explicitly declare both versions of add_to_frame_fastpath_core, to prevent GCC from inlining the wrong version. --- bmusb.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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. -- 2.39.2