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 Add a #define for XLEN, the RISC-V na...



details:   https://anonhg.NetBSD.org/src/rev/b23c5b493d8b
branches:  trunk
changeset: 372287:b23c5b493d8b
user:      simonb <simonb%NetBSD.org@localhost>
date:      Tue Nov 08 13:34:17 2022 +0000

description:
Add a #define for XLEN, the RISC-V native base integer ISA width.

diffstat:

 sys/arch/riscv/include/types.h |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (19 lines):

diff -r 26d24fbfe45c -r b23c5b493d8b sys/arch/riscv/include/types.h
--- a/sys/arch/riscv/include/types.h    Tue Nov 08 13:04:49 2022 +0000
+++ b/sys/arch/riscv/include/types.h    Tue Nov 08 13:34:17 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.14 2022/10/18 07:07:51 skrll Exp $ */
+/* $NetBSD: types.h,v 1.15 2022/11/08 13:34:17 simonb Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -38,6 +38,9 @@
 
 #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) || defined(_STANDALONE)
 
+/* XLEN is the native base integer ISA width */
+#define        XLEN            (sizeof(long) * NBBY)
+
 typedef __uint64_t     paddr_t;
 typedef __uint64_t     psize_t;
 #define        PRIxPADDR       PRIx64



Home | Main Index | Thread Index | Old Index