rust/src
Matthias Krüger 12c102ec53
Rollup merge of #119431 - taiki-e:asm-s390x-reg-addr, r=Amanieu
Support reg_addr register class in s390x inline assembly

In s390x, `r0` cannot be used as an address register (it is evaluated as zero in an address context).

Therefore, currently, in assemblies involving memory accesses, `r0` must be [marked as clobbered](1a1155653a/src/arch/s390x.rs (L58)) or [explicitly used to a non-address](1a1155653a/src/arch/s390x.rs (L135)) or explicitly use an address register to prevent `r0` from being allocated to a register for the address.

This patch adds a register class for allocating general-purpose registers, except `r0`, to make it easier to use address registers. (powerpc already has a register class (reg_nonzero) for a similar purpose.)

This is identical to the `a` constraint in LLVM and GCC:

https://llvm.org/docs/LangRef.html#supported-constraint-code-list
> a: A 32, 64, or 128-bit integer address register (excludes R0, which in an address context evaluates as zero).

https://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html
> a
> Address register (general purpose register except r0)

cc ``@uweigand``

r? ``@Amanieu``
2024-01-04 15:33:59 +01:00
..
bootstrap Auto merge of #119542 - lnicola:sync-from-ra2, r=lnicola 2024-01-04 07:23:39 +00:00
ci Auto merge of #119549 - fmease:rollup-jxvbfes, r=fmease 2024-01-03 18:37:41 +00:00
doc Rollup merge of #119431 - taiki-e:asm-s390x-reg-addr, r=Amanieu 2024-01-04 15:33:59 +01:00
etc Auto merge of #106790 - the8472:rawvec-niche, r=scottmcm 2023-12-20 02:19:10 +00:00
librustdoc use css variable for z-index of the sidebar 2024-01-01 15:42:32 +01:00
llvm-project@606bc11367 Update LLVM submodule 2023-12-20 16:50:43 +03:00
rustdoc-json-types Add is_object_safe information for traits in JSON output 2023-12-23 11:43:31 +01:00
tools Rollup merge of #119325 - RalfJung:custom-mir, r=compiler-errors 2024-01-04 15:33:58 +01:00
README.md Remove stale reference to the test suite location 2023-01-13 11:49:06 +00:00
stage0.json bump stage0 2023-12-22 11:04:31 +01:00
version bump version number to 1.77.0 2023-12-21 10:58:56 +01:00

This directory contains some source code for the Rust project, including:

  • The bootstrapping build system
  • Various submodules for tools, like cargo, tidy, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.