rust/compiler/rustc_codegen_gcc/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
..
back Rename many DiagCtxt arguments. 2023-12-18 16:06:22 +11:00
intrinsic Remove Session methods that duplicate DiagCtxt methods. 2023-12-24 08:05:28 +11:00
abi.rs Merge commit 'e4fe941b11a55c5005630696e9b6d81c65f7bd04' into subtree-update_cg_gcc_2023-10-25 2023-10-26 17:42:02 -04:00
allocator.rs Add unstable -Zdefault-hidden-visibility cmdline flag for rustc. 2023-12-13 21:14:23 +00:00
archive.rs Rewrite LLVM's archive writer in Rust 2022-11-26 19:35:32 +00:00
asm.rs Support reg_addr register class in s390x inline assembly 2024-01-03 18:00:37 +09:00
attributes.rs Remove Session methods that duplicate DiagCtxt methods. 2023-12-24 08:05:28 +11:00
base.rs Pass TyCtxt by value 2023-11-19 14:04:40 -05:00
builder.rs Change rustc_codegen_ssa's atomic_cmpxchg interface to return a pair of values 2023-12-28 09:40:47 +00:00
callee.rs treat host effect params as erased generics in codegen 2023-09-14 07:34:35 +00:00
common.rs Remove dead codes 2023-12-11 23:24:32 +08:00
consts.rs Remove Session methods that duplicate DiagCtxt methods. 2023-12-24 08:05:28 +11:00
context.rs Remove Session methods that duplicate DiagCtxt methods. 2023-12-24 08:05:28 +11:00
coverageinfo.rs Remove trait CoverageInfoMethods, since non-LLVM backends don't need it 2023-07-05 20:40:40 +10:00
debuginfo.rs Deduplicate inlined function debug info, but create a new lexical scope to child subsequent scopes and variables from colliding 2023-09-01 14:27:21 -07:00
declare.rs Merge commit 'e4fe941b11a55c5005630696e9b6d81c65f7bd04' into subtree-update_cg_gcc_2023-10-25 2023-10-26 17:42:02 -04:00
errors.rs Add level arg to into_diagnostic. 2023-12-19 09:19:25 +11:00
gcc_util.rs Remove Session methods that duplicate DiagCtxt methods. 2023-12-24 08:05:28 +11:00
int.rs Merge commit '2e8386e9fb3506cef991d04f8b3bc78f9a0c2630' into subtree-update_cg_gcc_2023-11-17 2023-11-19 13:42:13 -05:00
lib.rs Remove Session methods that duplicate DiagCtxt methods. 2023-12-24 08:05:28 +11:00
mono_item.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
type_.rs Merge commit 'e4fe941b11a55c5005630696e9b6d81c65f7bd04' into subtree-update_cg_gcc_2023-10-25 2023-10-26 17:42:02 -04:00
type_of.rs Remove movability from TyKind::Coroutine 2023-12-28 16:35:01 +00:00