Module Name: src
Committed By: simonb
Date: Tue Nov 8 13:34:18 UTC 2022
Modified Files:
src/sys/arch/riscv/include: types.h
Log Message:
Add a #define for XLEN, the RISC-V native base integer ISA width.
To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/riscv/include/types.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/riscv/include/types.h
diff -u src/sys/arch/riscv/include/types.h:1.14 src/sys/arch/riscv/include/types.h:1.15
--- src/sys/arch/riscv/include/types.h:1.14 Tue Oct 18 07:07:51 2022
+++ src/sys/arch/riscv/include/types.h Tue Nov 8 13:34:17 2022
@@ -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