-/* $OpenBSD: usertc.c,v 1.3 2020/08/23 21:38:47 cheloha Exp $ */
+/* $OpenBSD: usertc.c,v 1.4 2021/07/25 22:58:39 jca Exp $ */
/*
* Copyright (c) 2020 Paul Irofti <paul@irofti.net>
*
rdtsc_lfence(void)
{
uint32_t hi, lo;
- asm volatile("lfence; rdtsc" : "=a"(lo), "=d"(hi));
+ __asm volatile("lfence; rdtsc" : "=a"(lo), "=d"(hi));
return ((uint64_t)lo)|(((uint64_t)hi)<<32);
}
-/* $OpenBSD: usertc.c,v 1.2 2020/07/18 08:37:43 visa Exp $ */
+/* $OpenBSD: usertc.c,v 1.3 2021/07/25 22:58:39 jca Exp $ */
/*
* Copyright (c) 2020 Visa Hankala
*
{
uint32_t count;
- __asm__ volatile (
+ __asm volatile (
" .set push\n"
" .set mips64r2\n"
" rdhwr %0, $2\n"