cpufunc.h (4854ae249cbf792a8c57e987775c2537d3f1d36b) | cpufunc.h (0e727642322453c79ff3e96ccf91b0b790c76f46) |
---|---|
1/*- 2 * Copyright (c) 2003 Peter Wemm. 3 * Copyright (c) 1993 The Regents of the University of California. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 308 unchanged lines hidden (view full) --- 317rdtsc(void) 318{ 319 uint32_t low, high; 320 321 __asm __volatile("rdtsc" : "=a" (low), "=d" (high)); 322 return (low | ((uint64_t)high << 32)); 323} 324 | 1/*- 2 * Copyright (c) 2003 Peter Wemm. 3 * Copyright (c) 1993 The Regents of the University of California. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 308 unchanged lines hidden (view full) --- 317rdtsc(void) 318{ 319 uint32_t low, high; 320 321 __asm __volatile("rdtsc" : "=a" (low), "=d" (high)); 322 return (low | ((uint64_t)high << 32)); 323} 324 |
325static __inline uint32_t 326rdtsc32(void) 327{ 328 uint32_t rv; 329 330 __asm __volatile("rdtsc" : "=a" (rv) : : "edx"); 331 return (rv); 332} 333 |
|
325static __inline void 326wbinvd(void) 327{ 328 __asm __volatile("wbinvd"); 329} 330 331static __inline void 332write_rflags(u_long rf) --- 403 unchanged lines hidden --- | 334static __inline void 335wbinvd(void) 336{ 337 __asm __volatile("wbinvd"); 338} 339 340static __inline void 341write_rflags(u_long rf) --- 403 unchanged lines hidden --- |