-
Notifications
You must be signed in to change notification settings - Fork 581
stabilize s390x vector registers #2215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
folkertdev
wants to merge
1
commit into
rust-lang:master
Choose a base branch
from
folkertdev:stabilize-s390x-vector-registers
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+6
−2
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -318,6 +318,9 @@ unsafe { core::arch::asm!("/* {} */", in(reg) 5); } | |
| # } | ||
| ``` | ||
|
|
||
| > [!NOTE] | ||
| > If the value's type is smaller than the register, the value of the upper bits is platform-specific. Some targets zero out the upper bits, while others leave them untouched. | ||
|
|
||
| r[asm.operand-type.supported-operands.out] | ||
| * `out(<reg>) <expr>` | ||
| - `<reg>` can refer to a register class or an explicit register. The allocated register name is substituted into the asm template string. | ||
|
|
@@ -626,7 +629,7 @@ Here is the list of currently supported register classes: | |
| | s390x | `reg` | `r[0-10]`, `r[12-14]` | `r` | | ||
| | s390x | `reg_addr` | `r[1-10]`, `r[12-14]` | `a` | | ||
| | s390x | `freg` | `f[0-15]` | `f` | | ||
| | s390x | `vreg` | `v[0-31]` | Only clobbers | | ||
| | s390x | `vreg` | `v[0-31]` | `v` | | ||
|
Comment on lines
-629
to
+632
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. e.g. in https://godbolt.org/z/vxeWTe5KG |
||
| | s390x | `areg` | `a[2-15]` | Only clobbers | | ||
| | PowerPC | `reg` | `r0`, `r[3-12]`, `r[14-28]` | `r` | | ||
| | PowerPC | `reg_nonzero` | `r[3-12]`, `r[14-28]` | `b` | | ||
|
|
@@ -683,7 +686,7 @@ Each register class has constraints on which value types they can be used with. | |
| | LoongArch | `freg` | `d` | `f64` | | ||
| | s390x | `reg`, `reg_addr` | None | `i8`, `i16`, `i32`, `i64` | | ||
| | s390x | `freg` | None | `f32`, `f64` | | ||
| | s390x | `vreg` | N/A | Only clobbers | | ||
| | s390x | `vreg` | `vector` | `i32`, `f32`, `i64`, `f64`, `i128`, <br> `i8x16`, `i16x8`, `i32x4`, `i64x2`, `f32x4`, `f64x2` | | ||
| | s390x | `areg` | N/A | Only clobbers | | ||
| | PowerPC | `spe_acc` | None | Only clobbers | | ||
| | PowerPC/PowerPC64 | `reg` | None | `i8`, `i16`, `i32`, `i64` (PowerPC64 only) | | ||
|
|
@@ -945,6 +948,7 @@ The supported modifiers are a subset of LLVM's (and GCC's) [asm template argumen | |
| | s390x | `reg` | None | `%r0` | None | | ||
| | s390x | `reg_addr` | None | `%r1` | None | | ||
| | s390x | `freg` | None | `%f0` | None | | ||
| | s390x | `vreg` | None | `%v0` | None | | ||
| | PowerPC/PowerPC64 | `reg` | None | `0` | None | | ||
| | PowerPC/PowerPC64 | `reg_nonzero` | None | `3` | None | | ||
| | PowerPC/PowerPC64 | `freg` | None | `0` | None | | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This came up in the stabilization PR. Amanieu mentions that aarch64 zeros the upper bits, while s390x does not touch them.
This might need some re-phrasing, but I think it's useful to include to prevent future confusion.