18 #include <xmmintrin.h>
23 namespace seqan3::detail
42 constexpr spin_delay() noexcept = default;
43 constexpr spin_delay(spin_delay const &) noexcept = default;
44 constexpr spin_delay(spin_delay &&) noexcept = default;
45 constexpr spin_delay & operator=(spin_delay const &) noexcept = default;
46 constexpr spin_delay & operator=(spin_delay &&) noexcept = default;
47 ~spin_delay() noexcept = default;
60 if (current <= max_repetitions)
62 for (int_fast32_t i = 0; i < current; ++i)
75 void pause_processor()
79 #elif defined(__armel__) || defined(__ARMEL__)
80 asm volatile (
"nop" :::
"memory");
81 #elif defined(__arm__) || defined(__aarch64__)
82 __asm__ __volatile__ (
"yield" :::
"memory");
83 #elif defined(__ia64__)
84 __asm__ __volatile__ (
"hint @pause");
85 #elif defined(__powerpc__) || defined(__ppc__) || defined(__PPC__)
86 __asm__ __volatile__ (
"or 27,27,27" :::
"memory");
88 asm volatile (
"nop" :::
"memory");
93 static constexpr int_fast32_t max_repetitions{16};
95 int_fast32_t current{1};