rust/compiler
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
..
rustc Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_abi Update to bitflags 2 in the compiler 2023-12-30 18:17:28 +01:00
rustc_arena rustc_arena: add alloc_str 2023-12-05 17:52:51 -08:00
rustc_ast Update to bitflags 2 in the compiler 2023-12-30 18:17:28 +01:00
rustc_ast_lowering Rollup merge of #119505 - fmease:no-host-param-for-trait-fns, r=fee1-dead 2024-01-03 16:08:30 +01:00
rustc_ast_passes E0379: Provide suggestions 2024-01-02 13:49:48 +01:00
rustc_ast_pretty Auto merge of #119105 - dtolnay:paren, r=WaffleLapkin 2023-12-27 21:27:26 +00:00
rustc_attr Remove Session methods that duplicate DiagCtxt methods. 2023-12-24 08:05:28 +11:00
rustc_baked_icu_data Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
rustc_borrowck is_coroutine -> is_coroutine_or_closure 2023-12-30 15:24:15 +00:00
rustc_builtin_macros Remove more Session methods that duplicate DiagCtxt methods. 2023-12-24 08:17:47 +11:00
rustc_codegen_cranelift Merge commit '6d355f6844323db03bfd608899613e363e701951' into sync_cg_clif-2023-12-31 2023-12-31 13:29:53 +00:00
rustc_codegen_gcc Rollup merge of #119431 - taiki-e:asm-s390x-reg-addr, r=Amanieu 2024-01-04 15:33:59 +01:00
rustc_codegen_llvm Rollup merge of #119431 - taiki-e:asm-s390x-reg-addr, r=Amanieu 2024-01-04 15:33:59 +01:00
rustc_codegen_ssa Rollup merge of #119444 - compiler-errors:closure-or-coroutine, r=oli-obk 2024-01-03 16:08:26 +01:00
rustc_const_eval is_coroutine -> is_coroutine_or_closure 2023-12-30 15:24:15 +00:00
rustc_data_structures Update to bitflags 2 in the compiler 2023-12-30 18:17:28 +01:00
rustc_driver Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
rustc_driver_impl Use Result::flatten in catch_with_exit_code 2023-12-28 21:22:34 +01:00
rustc_error_codes Rollup merge of #119505 - fmease:no-host-param-for-trait-fns, r=fee1-dead 2024-01-03 16:08:30 +01:00
rustc_error_messages Remove rustc_error_messages/messages.ftl. 2023-11-26 08:37:27 +11:00
rustc_errors rustc_lint: Make LintLevelsProvider::current_specs() return &FxIndexMap 2023-12-31 14:35:28 +01:00
rustc_expand Remove Session methods that duplicate DiagCtxt methods. 2023-12-24 08:05:28 +11:00
rustc_feature Update tracking issue of naked_functions 2023-12-31 17:09:46 +00:00
rustc_fluent_macro Add a useful comment. 2023-11-26 08:38:02 +11:00
rustc_fs_util Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_graphviz remove unused pub fn 2023-11-23 14:11:02 +03:00
rustc_hir Rollup merge of #119239 - compiler-errors:yield-coercion, r=davidtwco 2024-01-03 16:08:24 +01:00
rustc_hir_analysis Rollup merge of #119505 - fmease:no-host-param-for-trait-fns, r=fee1-dead 2024-01-03 16:08:30 +01:00
rustc_hir_pretty Make closures carry their own ClosureKind, rather than deducing what it is from movability 2023-12-25 16:29:15 +00:00
rustc_hir_typeck Rollup merge of #119444 - compiler-errors:closure-or-coroutine, r=oli-obk 2024-01-03 16:08:26 +01:00
rustc_incremental Report I/O errors with emit_fatal not emit_err 2024-01-02 07:31:02 -05:00
rustc_index Mention the relevant tracking issue next to my bit_set hack 2023-12-23 00:04:20 +01:00
rustc_index_macros Put backticks around some attributes in doc comments. 2023-11-27 09:37:01 +11:00
rustc_infer Minor improvements in comment for 2024-01-01 13:21:49 +05:30
rustc_interface Report I/O errors with emit_fatal not emit_err 2024-01-02 07:31:02 -05:00
rustc_lexer Rename some unescaping functions. 2023-12-13 14:17:50 +11:00
rustc_lint rustc_lint: Enforce rustc::potential_query_instability lint 2023-12-31 14:50:57 +01:00
rustc_lint_defs Update deadlinks of strict_provenance lints 2024-01-01 20:06:23 +01:00
rustc_llvm Rollup merge of #118941 - krasimirgg:llvm-cov, r=nikic 2023-12-18 17:03:11 +01:00
rustc_log rustc_log: provide a way to init logging based on the values, not names, of the env vars 2023-11-11 15:24:33 +01:00
rustc_macros Add level arg to into_diagnostic. 2023-12-19 09:19:25 +11:00
rustc_metadata Rollup merge of #119510 - saethlin:fatal-io-errors, r=WaffleLapkin,Nilstrieb 2024-01-03 16:08:31 +01:00
rustc_middle Rollup merge of #119476 - fmease:pp-always-const-trait-preds, r=compiler-errors 2024-01-03 16:08:27 +01:00
rustc_mir_build Rollup merge of #119325 - RalfJung:custom-mir, r=compiler-errors 2024-01-04 15:33:58 +01:00
rustc_mir_dataflow Remove movability from TyKind::Coroutine 2023-12-28 16:35:01 +00:00
rustc_mir_transform Rollup merge of #119444 - compiler-errors:closure-or-coroutine, r=oli-obk 2024-01-03 16:08:26 +01:00
rustc_monomorphize is_coroutine -> is_coroutine_or_closure 2023-12-30 15:24:15 +00:00
rustc_next_trait_solver Remove movability from TyKind::Coroutine 2023-12-28 16:35:01 +00:00
rustc_parse Update to bitflags 2 in the compiler 2023-12-30 18:17:28 +01:00
rustc_parse_format Auto merge of #117819 - fmease:rustc_parse_format-stable-rustc, r=Nilstrieb 2023-11-15 14:55:35 +00:00
rustc_passes is_coroutine -> is_coroutine_or_closure 2023-12-30 15:24:15 +00:00
rustc_pattern_analysis Remove movability from TyKind::Coroutine 2023-12-28 16:35:01 +00:00
rustc_privacy Remove Session methods that duplicate DiagCtxt methods. 2023-12-24 08:05:28 +11:00
rustc_query_impl Remove two unused feature gates from rustc_query_impl 2023-12-31 20:51:53 +00:00
rustc_query_system Rollup merge of #119086 - RossSmyth:query_panics, r=compiler-errors 2024-01-03 16:08:23 +01:00
rustc_resolve Update to bitflags 2 in the compiler 2023-12-30 18:17:28 +01:00
rustc_serialize Call FileEncoder::finish in rmeta encoding 2023-11-22 22:49:22 -05:00
rustc_session Update to bitflags 2 in the compiler 2023-12-30 18:17:28 +01:00
rustc_smir Movability doesn't need to be a query anymore 2023-12-28 16:35:01 +00:00
rustc_span Rollup merge of #119325 - RalfJung:custom-mir, r=compiler-errors 2024-01-04 15:33:58 +01:00
rustc_symbol_mangling Update to bitflags 2 in the compiler 2023-12-30 18:17:28 +01:00
rustc_target Rollup merge of #119431 - taiki-e:asm-s390x-reg-addr, r=Amanieu 2024-01-04 15:33:59 +01:00
rustc_trait_selection Movability doesn't need to be a query anymore 2023-12-28 16:35:01 +00:00
rustc_traits add unused NormalizesTo predicate 2023-12-07 17:52:51 +01:00
rustc_transmute Update itertools to 0.11. 2023-11-22 08:13:21 +11:00
rustc_ty_utils Movability doesn't need to be a query anymore 2023-12-28 16:35:01 +00:00
rustc_type_ir Update to bitflags 2 in the compiler 2023-12-30 18:17:28 +01:00
stable_mir Restore movability to SMIR 2023-12-28 16:35:01 +00:00