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;
59 if (current <= max_repetitions)
61 for (int_fast32_t i = 0; i < current; ++i)
74 void pause_processor()
78 #elif defined(__armel__) || defined(__ARMEL__)
79 asm volatile (
"nop" :::
"memory");
80 #elif defined(__arm__) || defined(__aarch64__)
81 __asm__ __volatile__ (
"yield" :::
"memory");
82 #elif defined(__ia64__)
83 __asm__ __volatile__ (
"hint @pause");
84 #elif defined(__powerpc__) || defined(__ppc__) || defined(__PPC__)
85 __asm__ __volatile__ (
"or 27,27,27" :::
"memory");
87 asm volatile (
"nop" :::
"memory");
92 static constexpr int_fast32_t max_repetitions{16};
94 int_fast32_t current{1};