rust/compiler/rustc_codegen_llvm/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 Remove Session methods that duplicate DiagCtxt methods. 2023-12-24 08:05:28 +11:00
coverageinfo coverage: Avoid a query stability hazard in function_coverage_map 2024-01-02 22:57:04 +11:00
debuginfo Remove movability from TyKind::Coroutine 2023-12-28 16:35:01 +00:00
llvm Update to bitflags 2 in the compiler 2023-12-30 18:17:28 +01:00
abi.rs remove redundant imports 2023-12-10 10:56:22 +08:00
allocator.rs Auto merge of #118566 - klensy:cstr-new, r=WaffleLapkin 2023-12-14 11:14:03 +00:00
asm.rs Support reg_addr register class in s390x inline assembly 2024-01-03 18:00:37 +09:00
attributes.rs is_coroutine -> is_coroutine_or_closure 2023-12-30 15:24:15 +00:00
base.rs compiler: replace cstr macro with c str literals in compiler and few other c str replacements 2023-12-03 14:54:09 +03:00
builder.rs Auto merge of #118705 - WaffleLapkin:codegen-atomic-exhange-untuple, r=cjgillot 2023-12-30 07:42:19 +00:00
callee.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
common.rs ctfe interpreter: extend provenance so that it can track whether a pointer is immutable 2023-12-07 17:46:36 +01: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
declare.rs Add unstable -Zdefault-hidden-visibility cmdline flag for rustc. 2023-12-13 21:14:23 +00:00
errors.rs Improve some names. 2023-12-23 13:23:28 +11:00
intrinsic.rs Remove Session methods that duplicate DiagCtxt methods. 2023-12-24 08:05:28 +11:00
lib.rs update cfg(bootstrap)s 2023-12-22 11:14:11 +01:00
llvm_util.rs Remove Session methods that duplicate DiagCtxt methods. 2023-12-24 08:05:28 +11:00
mono_item.rs Remove Session methods that duplicate DiagCtxt methods. 2023-12-24 08:05:28 +11:00
type_.rs remove unused pub fn 2023-11-23 14:11:02 +03:00
type_of.rs Remove movability from TyKind::Coroutine 2023-12-28 16:35:01 +00:00
va_arg.rs cg_llvm: remove pointee types and pointercast/bitcast-of-ptr 2023-07-29 13:18:17 -04:00
value.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00