Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/include use __asm
details: https://anonhg.NetBSD.org/src/rev/c91e2c387161
branches: trunk
changeset: 999392:c91e2c387161
user: christos <christos%NetBSD.org@localhost>
date: Thu May 30 21:40:40 2019 +0000
description:
use __asm
diffstat:
sys/arch/x86/include/cpufunc.h | 42 +++++++++++++++++++++---------------------
1 files changed, 21 insertions(+), 21 deletions(-)
diffs (185 lines):
diff -r 62d92c74e5c2 -r c91e2c387161 sys/arch/x86/include/cpufunc.h
--- a/sys/arch/x86/include/cpufunc.h Thu May 30 21:33:57 2019 +0000
+++ b/sys/arch/x86/include/cpufunc.h Thu May 30 21:40:40 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpufunc.h,v 1.31 2019/05/29 16:54:41 maxv Exp $ */
+/* $NetBSD: cpufunc.h,v 1.32 2019/05/30 21:40:40 christos Exp $ */
/*
* Copyright (c) 1998, 2007, 2019 The NetBSD Foundation, Inc.
@@ -50,7 +50,7 @@
static inline void
x86_pause(void)
{
- asm volatile ("pause");
+ __asm volatile ("pause");
}
void x86_lfence(void);
@@ -81,7 +81,7 @@
.addr = va
};
- asm volatile (
+ __asm volatile (
"invpcid %[desc],%[op]"
:
: [desc] "m" (desc), [op] "r" (op)
@@ -94,7 +94,7 @@
{
uint32_t low, high;
- asm volatile (
+ __asm volatile (
"rdtsc"
: "=a" (low), "=d" (high)
:
@@ -127,7 +127,7 @@
{
uint16_t val;
- asm volatile (
+ __asm volatile (
"mov %%ss,%[val]"
: [val] "=r" (val)
:
@@ -138,7 +138,7 @@
static inline void
setds(uint16_t val)
{
- asm volatile (
+ __asm volatile (
"mov %[val],%%ds"
:
: [val] "r" (val)
@@ -148,7 +148,7 @@
static inline void
setes(uint16_t val)
{
- asm volatile (
+ __asm volatile (
"mov %[val],%%es"
:
: [val] "r" (val)
@@ -158,7 +158,7 @@
static inline void
setfs(uint16_t val)
{
- asm volatile (
+ __asm volatile (
"mov %[val],%%fs"
:
: [val] "r" (val)
@@ -172,7 +172,7 @@
#define FUNC_CR(crnum) \
static inline void lcr##crnum(register_t val) \
{ \
- asm volatile ( \
+ __asm volatile ( \
"mov %[val],%%cr" #crnum \
: \
: [val] "r" (val) \
@@ -181,7 +181,7 @@
static inline register_t rcr##crnum(void) \
{ \
register_t val; \
- asm volatile ( \
+ __asm volatile ( \
"mov %%cr" #crnum ",%[val]" \
: [val] "=r" (val) \
: \
@@ -211,7 +211,7 @@
#define FUNC_DR(drnum) \
static inline void ldr##drnum(register_t val) \
{ \
- asm volatile ( \
+ __asm volatile ( \
"mov %[val],%%dr" #drnum \
: \
: [val] "r" (val) \
@@ -220,7 +220,7 @@
static inline register_t rdr##drnum(void) \
{ \
register_t val; \
- asm volatile ( \
+ __asm volatile ( \
"mov %%dr" #drnum ",%[val]" \
: [val] "=r" (val) \
: \
@@ -255,13 +255,13 @@
static inline void
fninit(void)
{
- asm volatile ("fninit");
+ __asm volatile ("fninit");
}
static inline void
fnclex(void)
{
- asm volatile ("fnclex");
+ __asm volatile ("fnclex");
}
void fnsave(union savefpu *);
@@ -273,7 +273,7 @@
static inline void
clts(void)
{
- asm volatile ("clts");
+ __asm volatile ("clts");
}
void stts(void);
@@ -289,7 +289,7 @@
{
uint32_t low, high;
- asm volatile (
+ __asm volatile (
"xgetbv"
: "=a" (low), "=d" (high)
: "c" (xcr)
@@ -305,7 +305,7 @@
low = val;
high = val >> 32;
- asm volatile (
+ __asm volatile (
"xsetbv"
:
: "a" (low), "d" (high), "c" (xcr)
@@ -325,13 +325,13 @@
static inline void
x86_disable_intr(void)
{
- asm volatile ("cli");
+ __asm volatile ("cli");
}
static inline void
x86_enable_intr(void)
{
- asm volatile ("sti");
+ __asm volatile ("sti");
}
#endif /* XENPV */
@@ -358,7 +358,7 @@
{
uint32_t low, high;
- asm volatile (
+ __asm volatile (
"rdmsr"
: "=a" (low), "=d" (high)
: "c" (msr)
@@ -377,7 +377,7 @@
low = val;
high = val >> 32;
- asm volatile (
+ __asm volatile (
"wrmsr"
:
: "a" (low), "d" (high), "c" (msr)
Home |
Main Index |
Thread Index |
Old Index