riscv/
lib.rs

1// Licensed under the Apache License, Version 2.0 or the MIT License.
2// SPDX-License-Identifier: Apache-2.0 OR MIT
3// Copyright Tock Contributors 2022.
4
5//! Shared support for RISC-V architectures.
6
7#![crate_name = "riscv"]
8#![crate_type = "rlib"]
9#![no_std]
10
11pub mod csr;
12
13// Default to 32 bit if no architecture is specified of if this is being
14// compiled for docs or testing on a different architecture.
15pub const XLEN: usize = if cfg!(target_arch = "riscv64") {
16    64
17} else {
18    32
19};