21 #ifndef __TBB_machine_gcc_ia32_common_H 22 #define __TBB_machine_gcc_ia32_common_H 29 static inline intptr_t __TBB_machine_lg( T x ) {
30 __TBB_ASSERT(x>0,
"The logarithm of a non-positive value is undefined.");
32 __asm__(
"bsr %1,%0" :
"=r"(j) :
"r"(i));
35 #define __TBB_Log2(V) __TBB_machine_lg(V) 47 static inline void __TBB_machine_pause( int32_t delay ) {
48 for (int32_t i = 0; i < delay; i++) {
49 __asm__ __volatile__(
"pause;");
53 #define __TBB_Pause(V) __TBB_machine_pause(V) 56 namespace tbb {
namespace internal {
typedef uint64_t machine_tsc_t; } }
57 static inline tbb::internal::machine_tsc_t __TBB_machine_time_stamp() {
61 tbb::internal::uint32_t hi, lo;
62 __asm__ __volatile__(
"rdtsc" :
"=d"(hi),
"=a"(lo));
63 return (tbb::internal::machine_tsc_t( hi ) << 32) | lo;
66 #define __TBB_time_stamp() __TBB_machine_time_stamp() 69 #ifndef __TBB_CPU_CTL_ENV_PRESENT 70 #define __TBB_CPU_CTL_ENV_PRESENT 1 77 static const int MXCSR_CONTROL_MASK = ~0x3f;
79 bool operator!=(
const cpu_ctl_env& ctl )
const {
return mxcsr != ctl.mxcsr || x87cw != ctl.x87cw; }
81 #if __TBB_ICC_12_0_INL_ASM_FSTCW_BROKEN 83 __asm__ __volatile__ (
86 :
"=m"(loc_ctl.mxcsr),
"=m"(loc_ctl.x87cw)
90 __asm__ __volatile__ (
93 :
"=m"(mxcsr),
"=m"(x87cw)
96 mxcsr &= MXCSR_CONTROL_MASK;
98 void set_env()
const {
99 __asm__ __volatile__ (
102 : :
"m"(mxcsr),
"m"(x87cw)
110 #include "gcc_itsx.h" Definition: _flow_graph_async_msg_impl.h:32
The namespace tbb contains all components of the library.
Definition: parallel_for.h:44
Definition: gcc_ia32_common.h:73