Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64/include Redo previous.
details: https://anonhg.NetBSD.org/src/rev/083978ab3f96
branches: trunk
changeset: 998039:083978ab3f96
user: nakayama <nakayama%NetBSD.org@localhost>
date: Fri Apr 05 23:09:18 2019 +0000
description:
Redo previous.
In the case of store variant, put dummy constraint in output
instead of input.
Suggested by joerg@ in source-changes-d@
diffstat:
sys/arch/sparc64/include/ctlreg.h | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diffs (38 lines):
diff -r 8ef238d79e01 -r 083978ab3f96 sys/arch/sparc64/include/ctlreg.h
--- a/sys/arch/sparc64/include/ctlreg.h Fri Apr 05 23:01:09 2019 +0000
+++ b/sys/arch/sparc64/include/ctlreg.h Fri Apr 05 23:09:18 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ctlreg.h,v 1.65 2019/04/05 12:16:13 nakayama Exp $ */
+/* $NetBSD: ctlreg.h,v 1.66 2019/04/05 23:09:18 nakayama Exp $ */
/*
* Copyright (c) 1996-2002 Eduardo Horvath
@@ -681,10 +681,10 @@
/* 64-bit kernel, non-constant */
#define SPARC64_ST_NONCONST(st, type) \
__asm volatile( \
- "wr %2,%%g0,%%asi; " \
- #st " %0,[%1]%%asi " \
- : : "r" (value), "r" ((__uintptr_t)(loc)), \
- "r" (asi), "m" (*(type *)(__uintptr_t)(loc)))
+ "wr %3,%%g0,%%asi; " \
+ #st " %1,[%2]%%asi " \
+ : "=m" (*(type *)(__uintptr_t)(loc)) \
+ : "r" (value), "r" ((__uintptr_t)(loc)), "r" (asi))
#if defined(__GNUC__) && defined(__OPTIMIZE__)
#define SPARC64_ST_DEF(st, type) \
@@ -692,9 +692,10 @@
{ \
if (__builtin_constant_p(asi)) \
__asm volatile( \
- #st " %0,[%1]%2 " \
- : : "r" (value), "r" ((__uintptr_t)(loc)), \
- "n" (asi), "m" (*(type *)(__uintptr_t)(loc))); \
+ #st " %1,[%2]%3 " \
+ : "=m" (*(type *)(__uintptr_t)(loc)) \
+ : "r" (value), "r" ((__uintptr_t)(loc)), \
+ "n" (asi)); \
else \
SPARC64_ST_NONCONST(st, type); \
}
Home |
Main Index |
Thread Index |
Old Index