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.
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