Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/aarch64/include Sprinkle __volatile on asm instruct...
details: https://anonhg.NetBSD.org/src/rev/9f1adb6db9f9
branches: trunk
changeset: 321204:9f1adb6db9f9
user: skrll <skrll%NetBSD.org@localhost>
date: Tue Mar 06 08:20:22 2018 +0000
description:
Sprinkle __volatile on asm instructions
diffstat:
sys/arch/aarch64/include/armreg.h | 42 +++++++++++++++++++-------------------
1 files changed, 21 insertions(+), 21 deletions(-)
diffs (66 lines):
diff -r d45942d63981 -r 9f1adb6db9f9 sys/arch/aarch64/include/armreg.h
--- a/sys/arch/aarch64/include/armreg.h Tue Mar 06 08:14:17 2018 +0000
+++ b/sys/arch/aarch64/include/armreg.h Tue Mar 06 08:20:22 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: armreg.h,v 1.6 2018/03/06 08:14:17 skrll Exp $ */
+/* $NetBSD: armreg.h,v 1.7 2018/03/06 08:20:22 skrll Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -36,36 +36,36 @@
#include <sys/types.h>
-#define AARCH64REG_READ_INLINE2(regname, regdesc) \
-static uint64_t inline \
-reg_##regname##_read(void) \
-{ \
- uint64_t __rv; \
- __asm("mrs %0, " #regdesc : "=r"(__rv)); \
- return __rv; \
+#define AARCH64REG_READ_INLINE2(regname, regdesc) \
+static uint64_t inline \
+reg_##regname##_read(void) \
+{ \
+ uint64_t __rv; \
+ __asm __volatile("mrs %0, " #regdesc : "=r"(__rv)); \
+ return __rv; \
}
-#define AARCH64REG_WRITE_INLINE2(regname, regdesc) \
-static void inline \
-reg_##regname##_write(uint64_t __val) \
-{ \
- __asm("msr " #regdesc ", %0" :: "r"(__val)); \
+#define AARCH64REG_WRITE_INLINE2(regname, regdesc) \
+static void inline \
+reg_##regname##_write(uint64_t __val) \
+{ \
+ __asm __volatile("msr " #regdesc ", %0" :: "r"(__val)); \
}
-#define AARCH64REG_WRITEIMM_INLINE2(regname, regdesc) \
-static void inline \
-reg_##regname##_write(uint64_t __val) \
-{ \
- __asm("msr " #regdesc ", %0" :: "n"(__val)); \
+#define AARCH64REG_WRITEIMM_INLINE2(regname, regdesc) \
+static void inline \
+reg_##regname##_write(uint64_t __val) \
+{ \
+ __asm __volatile("msr " #regdesc ", %0" :: "n"(__val)); \
}
-#define AARCH64REG_READ_INLINE(regname) \
+#define AARCH64REG_READ_INLINE(regname) \
AARCH64REG_READ_INLINE2(regname, regname)
-#define AARCH64REG_WRITE_INLINE(regname) \
+#define AARCH64REG_WRITE_INLINE(regname) \
AARCH64REG_WRITE_INLINE2(regname, regname)
-#define AARCH64REG_WRITEIMM_INLINE(regname) \
+#define AARCH64REG_WRITEIMM_INLINE(regname) \
AARCH64REG_WRITEIMM_INLINE2(regname, regname)
/*
* System registers available at EL0 (user)
Home |
Main Index |
Thread Index |
Old Index