-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Stabilize s390x inline assembly #131258
base: master
Are you sure you want to change the base?
Stabilize s390x inline assembly #131258
Conversation
LGTM, but stabilization needs a T-lang FCP. |
This comment was marked as resolved.
This comment was marked as resolved.
r? lang for FCP |
Just to confirm: this is mostly a fairly ordinary "packed SIMD" ISA extension, right? The registers at least are not some exotic ambiguously-sized vector like RISCV's V or AArch64's SVE, but instead have some known fixed size? |
Per #131781 (comment): @rustbot labels +I-lang-nominated |
Yes. s390x vector facility is fixed-size (packed) SIMD ISA and each vector register is 128 bits long. |
@rfcbot merge |
Team member @joshtriplett has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns. |
@rfcbot reviewed |
Glad to see the reference PR as well. I feel good about this. I agree with the general point that it would be good to have a group of people actively maintaining this architecture who can look this over and vet it, but that has more to do with the requirements to be Tier 2 than anything specific to this PR. @rfcbot required |
@rfcbot reviewed |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
Also see #113739. |
Not sure what the formal process / requirement for a Tier 2 target maintainer would be - but in any case please feel free to ping me for any s390x related questions. |
☔ The latest upstream changes (presumably #132470) made this pull request unmergeable. Please resolve the merge conflicts. |
0930d7a
to
d85d4db
Compare
☔ The latest upstream changes (presumably #131341) made this pull request unmergeable. Please resolve the merge conflicts. |
d85d4db
to
a32d4bc
Compare
☔ The latest upstream changes (presumably #132472) made this pull request unmergeable. Please resolve the merge conflicts. |
a32d4bc
to
ab62a35
Compare
This stabilizes inline assembly for s390x (SystemZ).
Corresponding reference PR: rust-lang/reference#1643
From the requirements of stabilization mentioned in #93335
Done in #130630.
Done in the PR that added support for clobber_abi.
The followings can be used as input/output:
reg
(r[0-10]
,r[12-14]
): General-purpose registerreg_addr
(r[1-10]
,r[12-14]
): General-purpose register exceptr0
which is evaluated as zero in an address contextThis class is needed because
r0
, which may be allocated when using thereg
class, cannot be used as a register in certain contexts. This is identical to thea
constraint in LLVM and GCC. See Support reg_addr register class in s390x inline assembly #119431 for details.freg
(f[0-15]
): Floating-point registerThe followings are clobber-only:
vreg
(v[0-31]
): Vector registerTechnically
vreg
should be able to accept#[repr(simd)]
types as input/output if the unstablevector
target feature added is enabled, butcore::arch
has no s390x vector type and both#[repr(simd)]
andcore::simd
are unstable. Everything related is unstable, so the fact that this is currently a clobber-only should not be considered a stabilization blocker. (s390x vector facilities support #130869 tracks unstable stuff here)areg
(a[2-15]
): Access registerAll of the above register classes except
reg_addr
are needed forclobber_abi
.The followings cannot be used as operands for inline asm (see also getReservedRegs and SystemZELFRegisters in LLVM):
r11
: frame pointerr15
: stack pointera0
,a1
: Reserved for system usec[0-15]
(control register) Reserved by the kernelAlthough not listed in the above requirements,
preserves_flags
is implemented in #111331.cc @uweigand
r? @Amanieu
@rustbot label +O-SystemZ +A-inline-assembly