Skip to content

Commit

Permalink
Rollup merge of #116618 - chriswailes:riscv64-linux-android-vector, r…
Browse files Browse the repository at this point in the history
…=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 authored Oct 14, 2023
2 parents b236d11 + 166c353 commit f29dbe8
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 f29dbe8

Please sign in to comment.