Skip to content

Commit

Permalink
Rollup merge of rust-lang#116618 - chriswailes:riscv64-linux-android-…
Browse files Browse the repository at this point in the history
…vector, r=workingjubilee

Add the V (vector) extension to the riscv64-linux-android target spec

This feature has been enabled and tested internally in the Android project.
  • Loading branch information
matthiaskrgr committed Oct 14, 2023
2 parents 7f6ff13 + 166c353 commit c4cfa5a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_target/src/spec/riscv64_linux_android.rs
Expand Up @@ -9,7 +9,7 @@ pub fn target() -> Target {
options: TargetOptions {
code_model: Some(CodeModel::Medium),
cpu: "generic-rv64".into(),
features: "+m,+a,+f,+d,+c,+Zba,+Zbb,+Zbs".into(),
features: "+m,+a,+f,+d,+c,+zba,+zbb,+zbs,+v".into(),
llvm_abiname: "lp64d".into(),
supported_sanitizers: SanitizerSet::ADDRESS,
max_atomic_width: Some(64),
Expand Down
16 changes: 16 additions & 0 deletions src/doc/rustc/src/platform-support/android.md
Expand Up @@ -45,3 +45,19 @@ The riscv64-linux-android target is supported as a Tier 3 target.

A list of all supported targets can be found
[here](../platform-support.html)

## Architecture Notes

### riscv64-linux-android

Currently the `riscv64-linux-android` target requires the following architecture features/extensions:

* `a` (atomics)
* `d` (double-precision floating-point)
* `c` (compressed instruction set)
* `f` (single-precision floating-point)
* `m` (multiplication and division)
* `v` (vector)
* `Zba` (address calculation instructions)
* `Zbb` (base instructions)
* `Zbs` (single-bit instructions)

0 comments on commit c4cfa5a

Please sign in to comment.