Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 23013e1

Browse files
committed
Enable RISC-V bitmanip extensions for OpenTitan
Ibex in OpenTitan supports the bitmanip extensions in addition to IMC. The ratified set of these are supported upstream in LLVM, but not exposed in any of the default Rust targets. We can manually enable them by adding this flag.
1 parent 13d0043 commit 23013e1

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

boards/cargo/riscv_bitmanip.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
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 2024.
4+
5+
# bitmanip instruction support for RISC-V.
6+
7+
[build]
8+
rustflags = [
9+
# These are the ratified bitmanip extensions supported by LLVM.
10+
"-Ctarget-feature=+zba,+zbb,+zbc,+zbs",
11+
]

boards/opentitan/earlgrey-cw310/.cargo/config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ include = [
66
"../../../cargo/tock_flags.toml",
77
"../../../cargo/unstable_flags.toml",
88
"../../../cargo/riscv_flags.toml",
9+
"../../../cargo/riscv_bitmanip.toml",
910
"../../../cargo/virtual_function_elimination.toml",
1011
"../../../cargo/panic_abort_tests.toml",
1112
]

0 commit comments

Comments
 (0)