Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/riscv/include Use uintptr_t consistently rather tha...



details:   https://anonhg.NetBSD.org/src/rev/bb44fd760ef1
branches:  trunk
changeset: 372308:bb44fd760ef1
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Nov 12 07:05:40 2022 +0000

description:
Use uintptr_t consistently rather than register_t

diffstat:

 sys/arch/riscv/include/sysreg.h |  18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diffs (47 lines):

diff -r a0faa5d9ac55 -r bb44fd760ef1 sys/arch/riscv/include/sysreg.h
--- a/sys/arch/riscv/include/sysreg.h   Sat Nov 12 04:00:57 2022 +0000
+++ b/sys/arch/riscv/include/sysreg.h   Sat Nov 12 07:05:40 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sysreg.h,v 1.22 2022/11/11 01:18:32 simonb Exp $ */
+/* $NetBSD: sysreg.h,v 1.23 2022/11/12 07:05:40 skrll Exp $ */
 
 /*
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -177,18 +177,18 @@
 #define        SR_KERNEL       (SR_SIE | SR_UIE)
 #endif
 
-static inline register_t
+static inline uintptr_t
 riscvreg_status_read(void)
 {
-       register_t __sr;
+       uintptr_t __sr;
        __asm("csrr\t%0, sstatus" : "=r"(__sr));
        return __sr;
 }
 
-static inline register_t
-riscvreg_status_clear(register_t __mask)
+static inline uintptr_t
+riscvreg_status_clear(uintptr_t __mask)
 {
-       register_t __sr;
+       uintptr_t __sr;
        if (__builtin_constant_p(__mask) && __mask < 0x20) {
                __asm("csrrci\t%0, sstatus, %1" : "=r"(__sr) : "i"(__mask));
        } else {
@@ -197,10 +197,10 @@
        return __sr;
 }
 
-static inline register_t
-riscvreg_status_set(register_t __mask)
+static inline uintptr_t
+riscvreg_status_set(uintptr_t __mask)
 {
-       register_t __sr;
+       uintptr_t __sr;
        if (__builtin_constant_p(__mask) && __mask < 0x20) {
                __asm("csrrsi\t%0, sstatus, %1" : "=r"(__sr) : "i"(__mask));
        } else {



Home | Main Index | Thread Index | Old Index