rust/compiler
Trevor Gross acaa6cee07
Rollup merge of #130877 - taiki-e:riscv-atomic, r=Amanieu
rustc_target: Add RISC-V atomic-related features

This adds the following three target features to unstable riscv_target_feature.

- `zaamo` (Zaamo Extension 1.0.0): Atomic Memory Operations (`amo*.{w,d}{,.aq,.rl,.aqrl}`)
  ([definition in LLVM](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/RISCV/RISCVFeatures.td#L229-L231), [available since LLVM 19](8be079cddd))
- `zabha` (Zabha Extension 1.0.0): Byte and Halfword Atomic Memory Operations (`amo*.{b,h}{,.aq,.rl,.aqrl}`)
  ([definition in LLVM](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/RISCV/RISCVFeatures.td#L238-L240), [available since LLVM 19](6b7444964a))
- `zalrsc` (Zalrsc Extension 1.0.0): Load-Reserved/Store-Conditional Instructions (`lr.{w,d}{,.aq,.rl,.aqrl}` and `sc.{w,d}{,.aq,.rl,.aqrl}`)
  ([definition in LLVM](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/RISCV/RISCVFeatures.td#L261-L263), [available since LLVM 19](8be079cddd))

(Zacas Extension is not included here because it is still marked as experimental in LLVM 19 70e7d26e56 and will become non-experimental in LLVM 20 614aeda93b)

`a` implies `zaamo` and `zalrsc`, and `zabha` implies `zaamo`:

- After Zaamo and Zalrsc Extensions are frozen, riscv-isa-manual says "The A extension comprises instructions provided by the Zaamo and Zalrsc extensions" (e87412e621), and [`a` implies `zaamo` and `zalrsc` in GCC](08693e29ec/gcc/config/riscv/arch-canonicalize (L44)). However, in LLVM, [`a` does not define them as implying `zaamo` and `zalrsc`](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/RISCV/RISCVFeatures.td#L206).
- Zabha and Zaamo are in a similar situation, [riscv-isa-manual](https://github.com/riscv/riscv-isa-manual/blob/main/src/zabha.adoc) says "The Zabha extension depends upon the Zaamo standard extension", and [`zabha` implies `zaamo` in GCC](08693e29ec/gcc/config/riscv/arch-canonicalize (L45-L46)), but [does not in LLVM (but enabling `zabha` without `zaamo` or `a` is not allowed)](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/TargetParser/RISCVISAInfo.cpp#L776-L778).

r? `@Amanieu`

`@rustbot` label +O-riscv +A-target-feature
2024-09-30 19:18:49 -04:00
..
rustc disable size asserts in the compiler when randomizing layouts 2024-08-31 23:56:45 +02:00
rustc_abi Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_arena Remove unnecessary lifetimes from Arena. 2024-09-13 15:33:19 +10:00
rustc_ast Pin memchr to 2.5.0 in the library rather than rustc_ast 2024-09-24 18:09:43 +02:00
rustc_ast_ir Add warn(unreachable_pub) to several crates. 2024-08-16 08:46:13 +10:00
rustc_ast_lowering Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_ast_passes Ban combination of GCE and new solver 2024-09-24 10:53:32 -04:00
rustc_ast_pretty Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_attr rustdoc: inherit parent's stability where applicable 2024-09-24 20:18:36 +02:00
rustc_baked_icu_data Don't add warn(unreachable_pub) to rustc_baked_icu. 2024-08-16 08:46:52 +10:00
rustc_borrowck borrowck: use subtyping instead of equality for ptr-to-ptr casts 2024-09-27 21:04:32 +02:00
rustc_builtin_macros Reject leading unsafe in cfg!(...) and --check-cfg. 2024-09-30 12:15:08 +02:00
rustc_codegen_cranelift fix cranelift CI 2024-09-29 07:32:08 +02:00
rustc_codegen_gcc Fmt 2024-09-27 22:09:18 +02:00
rustc_codegen_llvm Rollup merge of #130877 - taiki-e:riscv-atomic, r=Amanieu 2024-09-30 19:18:49 -04:00
rustc_codegen_ssa Rollup merge of #130960 - cuviper:cdylib-soname, r=petrochenkov 2024-09-28 15:11:22 +02:00
rustc_const_eval cleanup: don't .into() identical types 2024-09-29 12:18:11 +02:00
rustc_data_structures Auto merge of #130874 - klensy:bumpme, r=jieyouxu 2024-09-28 05:15:29 +00:00
rustc_driver
rustc_driver_impl bump few deps 2024-09-27 09:23:05 +03:00
rustc_error_codes Rollup merge of #130826 - fmease:compiler-mv-obj-safe-dyn-compat, r=compiler-errors 2024-09-27 21:35:08 +02:00
rustc_error_messages Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_errors bump few deps 2024-09-27 09:23:05 +03:00
rustc_expand cleanup: don't manually unwrap_or_default() 2024-09-29 12:51:28 +02:00
rustc_feature Rollup merge of #130826 - fmease:compiler-mv-obj-safe-dyn-compat, r=compiler-errors 2024-09-27 21:35:08 +02:00
rustc_fluent_macro Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_fs_util Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_graphviz Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_hir Rollup merge of #130714 - compiler-errors:try-structurally-resolve-const, r=BoxyUwU 2024-09-23 06:45:36 +02:00
rustc_hir_analysis Rollup merge of #131038 - onkoe:fix/adt_const_params_leak_118179, r=compiler-errors 2024-09-30 18:25:14 +02:00
rustc_hir_pretty Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_hir_typeck cleanup: don't manually unwrap_or_default() 2024-09-29 12:51:28 +02:00
rustc_incremental Dogfood feature(file_buffered) 2024-09-24 14:25:16 -07:00
rustc_index Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_index_macros
rustc_infer Get rid of a_is_expected from ToTrace 2024-09-27 15:43:18 -04:00
rustc_interface Rollup merge of #131057 - Urgau:cfg-erronous-unsafe, r=jieyouxu 2024-09-30 14:33:46 +02:00
rustc_lexer Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_lint Rollup merge of #131035 - dingxiangfei2009:tweak-if-let-rescope-lint, r=jieyouxu 2024-09-30 18:25:14 +02:00
rustc_lint_defs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_llvm Pass Module Analysis Manager to Standard Instrumentations 2024-09-25 22:57:32 +03:00
rustc_log Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_macros Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_metadata Implement RFC3137 trim-paths sysroot changes 2024-09-27 13:27:54 +02:00
rustc_middle Auto merge of #129499 - fee1-dead-contrib:supereffects, r=compiler-errors 2024-09-30 00:30:09 +00:00
rustc_mir_build tweak Const::identity_unevaluated name and docs 2024-09-28 21:28:08 +02:00
rustc_mir_dataflow Dogfood feature(file_buffered) 2024-09-24 14:25:16 -07:00
rustc_mir_transform Rollup merge of #130990 - RalfJung:mir-const-normalize, r=compiler-errors 2024-09-29 20:17:37 +02:00
rustc_monomorphize Rollup merge of #130826 - fmease:compiler-mv-obj-safe-dyn-compat, r=compiler-errors 2024-09-27 21:35:08 +02:00
rustc_next_trait_solver Rollup merge of #130866 - compiler-errors:dyn-instantiate-binder, r=lcnr 2024-09-28 09:35:09 +02:00
rustc_parse Rollup merge of #130551 - nnethercote:fix-break-last-token, r=petrochenkov 2024-09-23 07:54:44 -07:00
rustc_parse_format Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_passes Check vtable projections for validity in miri 2024-09-23 19:38:26 -04:00
rustc_pattern_analysis cleanup: don't clone types that are Copy 2024-09-29 13:31:30 +02:00
rustc_privacy Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_query_impl Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_query_system Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_resolve cleanup: don't clone types that are Copy 2024-09-29 13:31:30 +02:00
rustc_sanitizers Compiler: Rename "object safe" to "dyn compatible" 2024-09-25 13:26:48 +02:00
rustc_serialize Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_session Auto merge of #130874 - klensy:bumpme, r=jieyouxu 2024-09-28 05:15:29 +00:00
rustc_smir Rollup merge of #130826 - fmease:compiler-mv-obj-safe-dyn-compat, r=compiler-errors 2024-09-27 21:35:08 +02:00
rustc_span add unqualified_local_imports lint 2024-09-23 11:57:28 +02:00
rustc_symbol_mangling Rollup merge of #130344 - Jaic1:fix-116306, r=BoxyUwU 2024-09-23 06:45:33 +02:00
rustc_target rustc_target: Add RISC-V atomic-related features 2024-09-28 11:26:09 +09:00
rustc_trait_selection Rollup merge of #130866 - compiler-errors:dyn-instantiate-binder, r=lcnr 2024-09-28 09:35:09 +02:00
rustc_traits Compiler: Rename "object safe" to "dyn compatible" 2024-09-25 13:26:48 +02:00
rustc_transmute Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_ty_utils Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_type_ir Auto merge of #129499 - fee1-dead-contrib:supereffects, r=compiler-errors 2024-09-30 00:30:09 +00:00
rustc_type_ir_macros Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
stable_mir Auto merge of #130946 - matthiaskrgr:rollup-ia4mf0y, r=matthiaskrgr 2024-09-27 21:23:29 +00:00