Changeset 99978 in vbox for trunk/include/iprt
- Timestamp:
- May 25, 2023 11:45:24 AM (23 months ago)
- svn:sync-xref-src-repo-rev:
- 157638
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/asm-arm.h
r98103 r99978 137 137 #endif 138 138 139 140 /** 141 * Gets the content of the CNTFRQ_EL0 register. 142 * 143 * @returns CNTFRQ_EL0 value. 144 */ 145 #if RT_INLINE_ASM_EXTERNAL 146 DECLASM(uint64_t) ASMReadCntFrqEl0(void); 147 #else 148 DECLINLINE(uint64_t) ASMReadCntFrqEl0(void) 149 { 150 # if RT_INLINE_ASM_GNU_STYLE 151 uint64_t u64; 152 # ifdef RT_ARCH_ARM64 153 __asm__ __volatile__("isb\n\t" 154 "mrs %0, CNTFRQ_EL0\n\t" 155 : "=r" (u64)); 156 # else 157 u64 = 0; 158 __asm__ __volatile__("isb\n" 159 "mrc p15, 0, %[uRet], c14, 0, 0\n\t" /* CNTFRQ */ 160 : [uRet] "=r" (u64)); 161 # endif 162 return u64; 163 164 # else 165 # error "Unsupported compiler" 166 # endif 167 } 168 #endif 169 170 139 171 #if 0 /* port to arm64, armv7 and check */ 140 172
Note:
See TracChangeset
for help on using the changeset viewer.