Skip to content

Commit

Permalink
Auto merge of rust-lang#116618 - chriswailes:riscv64-linux-android-ve…
Browse files Browse the repository at this point in the history
…ctor, 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
bors committed Oct 13, 2023
2 parents 130ff8c + 899f81f commit 0428798
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 0428798

Please sign in to comment.