Skip to content

Commit

Permalink
Enable RISC-V bitmanip extensions for OpenTitan
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jwnrt committed Nov 18, 2024
1 parent 13d0043 commit 23013e1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions boards/cargo/riscv_bitmanip.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Licensed under the Apache License, Version 2.0 or the MIT License.
# SPDX-License-Identifier: Apache-2.0 OR MIT
# Copyright Tock Contributors 2024.

# bitmanip instruction support for RISC-V.

[build]
rustflags = [
# These are the ratified bitmanip extensions supported by LLVM.
"-Ctarget-feature=+zba,+zbb,+zbc,+zbs",
]
1 change: 1 addition & 0 deletions boards/opentitan/earlgrey-cw310/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ include = [
"../../../cargo/tock_flags.toml",
"../../../cargo/unstable_flags.toml",
"../../../cargo/riscv_flags.toml",
"../../../cargo/riscv_bitmanip.toml",
"../../../cargo/virtual_function_elimination.toml",
"../../../cargo/panic_abort_tests.toml",
]
Expand Down

0 comments on commit 23013e1

Please sign in to comment.