Skip to content

Commit

Permalink
a fix to compiler-optimized code
Browse files Browse the repository at this point in the history
  • Loading branch information
Saeed Maleki committed Aug 3, 2023
1 parent 0808ae7 commit 7966e24
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/fifo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ MSCCLPP_API_CPP Fifo::~Fifo() = default;

MSCCLPP_API_CPP ProxyTrigger Fifo::poll() {
ProxyTrigger trigger;
__m128i xmm0 = _mm_load_si128((__m128i*)&pimpl->triggers.get()[pimpl->hostTail % MSCCLPP_PROXY_FIFO_SIZE]);
_mm_store_si128((__m128i*)&trigger, xmm0);
volatile ProxyTrigger* ptr = &pimpl->triggers.get()[pimpl->hostTail % MSCCLPP_PROXY_FIFO_SIZE];
trigger.fst = ptr->fst;
trigger.snd = ptr->snd;
return trigger;
}

Expand Down

0 comments on commit 7966e24

Please sign in to comment.