• Home
  • Raw
  • Download

Lines Matching +full:linux +full:- +full:32 +full:- +full:no +full:- +full:asm

1 // ----------------------------------------------------------------------
4 // is actually time since power-on. This is like time() but doesn't
19 // ----------------------------------------------------------------------
59 // https://setisvn.ssl.berkeley.edu/svn/lib/fftw-3.0.1/kernel/cycle.h
61 // This should return the number of cycles since power-on. Thread-safe.
75 // this goes above x86-specific code because old versions of Emscripten in Now()
85 return (high << 32) | low; in Now()
87 // This returns a time-base, which is not always precisely a cycle-count. in Now()
90 asm volatile("mfspr %0, 268" : "=r"(tb)); in Now()
94 asm volatile( in Now()
99 tbl &= -static_cast<int32_t>(tbu0 == tbu1); in Now()
100 // high 32 bits in tbu1; low 32 bits in tbl (tbu0 is no longer needed) in Now()
101 return (static_cast<uint64_t>(tbu1) << 32) | tbl; in Now()
105 asm(".byte 0x83, 0x41, 0x00, 0x00"); in Now()
106 asm("mov %%g1, %0" : "=r"(tick)); in Now()
110 asm("mov %0 = ar.itc" : "=r"(itc)); in Now()
116 // the code is being compiled with a non-ancient compiler. in Now()
119 // See // https://docs.microsoft.com/en-us/cpp/intrinsics/arm64-intrinsics in Now()
127 // Native Client validator on x86/x86-64 allows RDTSC instructions, in Now()
129 // rejects MRC instructions (used in the ARM-specific sequence below), in Now()
131 // architecture-agnostic bytecode, which doesn't provide any in Now()
137 // least for PNaCl modules running on x86 Mac & Linux). in Now()
144 // The frequency is fixed, typically in the range 1-50MHz. It can be in Now()
148 asm volatile("mrs %0, cntvct_el0" : "=r"(virtual_timer_value)); in Now()
158 asm volatile("mrc p15, 0, %0, c9, c14, 0" : "=r"(pmuseren)); in Now()
160 asm volatile("mrc p15, 0, %0, c9, c12, 1" : "=r"(pmcntenset)); in Now()
162 asm volatile("mrc p15, 0, %0, c9, c13, 0" : "=r"(pmccntr)); in Now()
186 asm(" stck %0" : "=m"(tsc) : : "cc"); in Now()
188 asm("stck %0" : "=Q"(tsc) : : "cc"); in Now()
191 #elif defined(__riscv) // RISC-V in Now()
193 #if __riscv_xlen == 32 in Now()
195 // This asm also includes the PowerPC overflow handling strategy, as above. in Now()
197 asm volatile( in Now()
206 return (static_cast<uint64_t>(cycles_hi1) << 32) | cycles_lo; in Now()
209 asm volatile("rdcycle %0" : "=r"(cycles)); in Now()
218 asm volatile("%0 = C15:14" : "=r"(pcycle)); in Now()