rust/compiler
Stuart Cook 19c9b763ba
Rollup merge of #140507 - a4lg:riscv-feature-addition-batch-3, r=Amanieu
rustc_target: RISC-V: feature addition batch 3

This is the last batch (3 of 3) for RISC-V feature enhancements intended for the version 1.88 cycle.

The author's primary criteria are:

1.  The extension is ratified and unprivileged one.
2.  The extension is in the RVA23U64 profile (to be a baseline of the application-class RISC-V software ecosystem in the near future), either mandatory or optional.
3.  Either:
    1.  To be discoverable through a `riscv_hwprobe` system call on (currently unreleased) Linux 6.15 (as of rc4) or
    2.  Helps memory/atomics-related operations more efficient and/or more robust.

This is based on the specifications:

*   [The latest ratified ISA Manuals (version 20240411)](https://lf-riscv.atlassian.net/wiki/spaces/HOME/pages/16154769/RISC-V+Technical+Specifications)
*   [RVA23/RVB23 profiles](https://github.com/riscv/riscv-profiles/releases/tag/rva23-rvb23-ratified)
*   [RISC-V BF16 extensions](https://github.com/riscv/riscv-bfloat16/releases/tag/v183a3dac863d7c18187a739eb52b0c8f0d16854d)

LLVM Definitions:

*   [`Zicbop`](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/RISCV/RISCVFeatures.td#L82-87)
*   [`Zicbom`](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/RISCV/RISCVFeatures.td#L75-L80)
*   [`Zic64b`](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/RISCV/RISCVFeatures.td#L71-L73)
*   [`Ziccamoa`](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/RISCV/RISCVFeatures.td#L97-L99)
*   [`Ziccif`](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/RISCV/RISCVFeatures.td#L101-L103)
*   [`Zicclsm`](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/RISCV/RISCVFeatures.td#L105-L107)
*   [`Ziccrse`](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/RISCV/RISCVFeatures.td#L109-L111)
*   [`Zfbfmin`](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/RISCV/RISCVFeatures.td#L320-L325)
*   [`Zvfbfmin`](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/RISCV/RISCVFeatures.td#L697-L702)
*   [`Zvfbfwma`](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/RISCV/RISCVFeatures.td#L704-L710)

The `Zicbop` extension (mandatory in RVA23U64) adds prefetch hints to prepare for subsequent memory operations (will be executed as no-op if the hardware does not support this extension).

The `Zicbom` extension (mandatory in RVA23U64) adds cache block-management instructions.  The author did not include this in the batch 2 (because of limited use cases compared to the `Zicboz` extension) but added because it will be discoverable from Linux (as of version 6.15-rc4).  Along with `Zicbop`, Rust now supports all CMO extensions.

The `Zic64b` extension (mandatory in RVA23U64) constraints the cache block to be naturally-aligned and exactly 64 bytes.  Along with CMO instructions, it can improve efficiency handling with memory (e.g. efficient memory zeroing using `Zicboz` + `Zic64b`).

The `Zicc*` extensions (mandatory in RVA23U64) add constraints to the main memory properties.  They are normally satisfied in the application environment with regular OSes but profiles like RVA23U64 ensures such properties are satisfied (through those *constraint* extensions).

The `Zfbf*` and `Zvfbf*` extensions (optional in RVA23U64) add instructions to handle BF16 (BFloat16) data.  Although stabilization of FP-related extensions are relatively far due to ABI-related issues, they are included in this batch because they will be discoverable from Linux (as of version 6.15-rc4).

The author also adds the extension implication: `Za64rs` → `Za128rs` (superset) which the author missed to include in #140139.
2025-05-02 22:17:03 +10:00
..
rustc Revert "Use workspace lints for crates in compiler/ #138084" 2025-03-10 18:12:47 +08:00
rustc_abi Initial UnsafePinned/UnsafeUnpin impl [Part 1: Libs] 2025-04-13 01:11:04 -04:00
rustc_arena Introduce Arena::try_alloc_from_iter. 2025-04-19 01:13:18 +00:00
rustc_ast ast: Remove token visiting from AST visitor 2025-04-30 10:36:03 +03:00
rustc_ast_ir Use -Wunused_crate_dependencies for compiler crates. 2025-03-20 08:59:43 +11:00
rustc_ast_lowering Rollup merge of #139046 - nnethercote:hir-Lifetime-better, r=lcnr 2025-05-02 22:16:58 +10:00
rustc_ast_passes Make #![feature(let_chains)] bootstrap conditional in compiler/ 2025-04-23 16:40:30 +02:00
rustc_ast_pretty Rollup merge of #137474 - VlaDexa:shebang-placement, r=wesleywiser 2025-05-02 22:16:57 +10:00
rustc_attr_data_structures Make #![feature(let_chains)] bootstrap conditional in compiler/ 2025-04-23 16:40:30 +02:00
rustc_attr_parsing Simplify LazyAttrTokenStream. 2025-04-30 07:10:56 +10:00
rustc_baked_icu_data Add unreachable_pub to RUSTC_LINT_FLAGS for compiler/ crates. 2025-03-11 13:14:21 +11:00
rustc_borrowck Auto merge of #139965 - amandasystems:marginally-improved-scc-annotations, r=lcnr 2025-05-01 16:04:19 +00:00
rustc_builtin_macros Rollup merge of #140312 - nnethercote:DelimArgs-spacing, r=petrochenkov 2025-04-30 10:18:26 +02:00
rustc_codegen_cranelift Rollup merge of #134232 - bjorn3:naked_asm_improvements, r=wesleywiser 2025-04-30 17:27:57 +02:00
rustc_codegen_gcc Rollup merge of #134232 - bjorn3:naked_asm_improvements, r=wesleywiser 2025-04-30 17:27:57 +02:00
rustc_codegen_llvm Rollup merge of #140460 - heiher:issue-140455, r=Urgau 2025-05-01 22:27:23 +02:00
rustc_codegen_ssa Auto merge of #138522 - osiewicz:shared-generics-respect-visibility, r=bjorn3 2025-05-01 11:57:11 +00:00
rustc_const_eval Clean up "const" situation in format_args!(). 2025-05-01 11:55:23 +02:00
rustc_data_structures Auto merge of #139965 - amandasystems:marginally-improved-scc-annotations, r=lcnr 2025-05-01 16:04:19 +00:00
rustc_driver Remove recursion_limit increases. 2025-04-02 16:25:27 +11:00
rustc_driver_impl Make #![feature(let_chains)] bootstrap conditional in compiler/ 2025-04-23 16:40:30 +02:00
rustc_error_codes Rollup merge of #138703 - pudongair:master, r=workingjubilee 2025-05-01 22:27:19 +02:00
rustc_error_messages update cfgs 2025-04-09 12:29:59 +01:00
rustc_errors Make #![feature(let_chains)] bootstrap conditional in compiler/ 2025-04-23 16:40:30 +02:00
rustc_expand Rollup merge of #140450 - petrochenkov:vistok, r=nnethercote 2025-04-30 17:28:00 +02:00
rustc_feature Rollup merge of #140323 - tgross35:cfg-unstable-float, r=Urgau 2025-04-28 23:29:17 +00:00
rustc_fluent_macro Replace proc_macro::SourceFile by Span::{file, local_file}. 2025-04-11 15:07:08 +02:00
rustc_fs_util Retry if creating temp fails with access denied 2025-04-25 11:28:36 +00:00
rustc_graphviz Remove #![warn(unreachable_pub)] from all compiler/ crates. 2025-03-11 13:14:21 +11:00
rustc_hashes Revert "Use workspace lints for crates in compiler/ #138084" 2025-03-10 18:12:47 +08:00
rustc_hir Handle Path<> better in error messages. 2025-05-02 08:26:39 +10:00
rustc_hir_analysis Rollup merge of #139909 - oli-obk:or-patterns, r=BoxyUwU 2025-04-29 12:28:22 -04:00
rustc_hir_pretty Rollup merge of #140312 - nnethercote:DelimArgs-spacing, r=petrochenkov 2025-04-30 10:18:26 +02:00
rustc_hir_typeck Rollup merge of #140468 - BoxyUwU:normalization_confusings2, r=lcnr 2025-04-30 22:36:41 +02:00
rustc_incremental Replace infallible name_or_empty methods with fallible name methods. 2025-04-17 09:50:52 +10:00
rustc_index Add copy_within to IndexSlice 2025-04-15 10:44:28 -04:00
rustc_index_macros In rustc_mir_tranform, iterate over index newtypes instead of ints 2025-04-12 11:53:07 +00:00
rustc_infer Rollup merge of #140249 - BoxyUwU:remove_weak_alias_terminology, r=oli-obk 2025-04-28 13:30:45 +02:00
rustc_interface Auto merge of #140145 - Zoxc:job-server-proxy, r=SparrowLii 2025-05-01 04:11:52 +00:00
rustc_lexer Replace rustc_lexer/unescape with rustc-literal-escaper crate 2025-04-04 14:44:45 +02:00
rustc_lint Rollup merge of #134034 - bvanjoi:issue-131655, r=petrochenkov 2025-05-02 22:16:57 +10:00
rustc_lint_defs Update lint-docs to default to Rust 2024 2025-04-26 14:08:58 -07:00
rustc_llvm Rollup merge of #140400 - durin42:llvm-21-getguid, r=cuviper 2025-04-29 12:28:24 -04:00
rustc_log Use -Wunused_crate_dependencies for compiler crates. 2025-03-20 08:59:43 +11:00
rustc_macros Rename rustc_query_append! to rustc_with_all_queries! 2025-04-29 20:48:51 +10:00
rustc_metadata Rollup merge of #140086 - ChrisDenton:backoff, r=petrochenkov 2025-04-26 07:13:07 +02:00
rustc_middle Auto merge of #140145 - Zoxc:job-server-proxy, r=SparrowLii 2025-05-01 04:11:52 +00:00
rustc_mir_build Rollup merge of #140022 - dianne:box-deref-pats, r=Nadrieril 2025-04-28 23:29:15 +00:00
rustc_mir_dataflow AsyncDrop implementation using shim codegen of async_drop_in_place::{closure}, scoped async drop added. 2025-04-28 16:23:13 +07:00
rustc_mir_transform Rollup merge of #140458 - azhogin:azhogin/async-drop-fix-dropped-tuple-ice, r=oli-obk 2025-04-30 22:36:39 +02:00
rustc_monomorphize AsyncDrop implementation using shim codegen of async_drop_in_place::{closure}, scoped async drop added. 2025-04-28 16:23:13 +07:00
rustc_next_trait_solver Treat ManuallyDrop as ~const Destruct 2025-04-29 10:39:54 +00:00
rustc_parse Rollup merge of #140494 - ehuss:document-restrictions, r=traviscross,SparrowLii 2025-04-30 22:36:44 +02:00
rustc_parse_format Update rustc-literal-escaper version to 0.0.2 2025-04-04 22:26:10 +02:00
rustc_passes allow #[rustc_std_internal_symbol] in combination with #[naked] 2025-05-01 16:26:26 +02:00
rustc_pattern_analysis Make #![feature(let_chains)] bootstrap conditional in compiler/ 2025-04-23 16:40:30 +02:00
rustc_privacy Rollup merge of #140249 - BoxyUwU:remove_weak_alias_terminology, r=oli-obk 2025-04-28 13:30:45 +02:00
rustc_query_impl Auto merge of #140145 - Zoxc:job-server-proxy, r=SparrowLii 2025-05-01 04:11:52 +00:00
rustc_query_system Add some comments 2025-04-29 12:04:33 +02:00
rustc_resolve Auto merge of #127516 - nnethercote:simplify-LazyAttrTokenStream, r=petrochenkov 2025-04-30 00:09:21 +00:00
rustc_sanitizers Make #![feature(let_chains)] bootstrap conditional in compiler/ 2025-04-23 16:40:30 +02:00
rustc_serialize Zero the buffer passed from write_with 2025-04-25 07:14:27 +02:00
rustc_session Rollup merge of #140323 - tgross35:cfg-unstable-float, r=Urgau 2025-04-28 23:29:17 +00:00
rustc_smir Rollup merge of #139909 - oli-obk:or-patterns, r=BoxyUwU 2025-04-29 12:28:22 -04:00
rustc_span Clean up "const" situation in format_args!(). 2025-05-01 11:55:23 +02:00
rustc_symbol_mangling Rollup merge of #139909 - oli-obk:or-patterns, r=BoxyUwU 2025-04-29 12:28:22 -04:00
rustc_target Rollup merge of #140507 - a4lg:riscv-feature-addition-batch-3, r=Amanieu 2025-05-02 22:17:03 +10:00
rustc_trait_selection Rollup merge of #140468 - BoxyUwU:normalization_confusings2, r=lcnr 2025-04-30 22:36:41 +02:00
rustc_traits Remove weak alias terminology 2025-04-24 11:59:20 +01:00
rustc_transmute transmutability: ensure_sufficient_stack when answering query 2025-04-30 12:06:14 +02:00
rustc_ty_utils Rollup merge of #139909 - oli-obk:or-patterns, r=BoxyUwU 2025-04-29 12:28:22 -04:00
rustc_type_ir canonical no type foldable :< 2025-04-29 23:17:31 +00:00
rustc_type_ir_macros Split TypeFolder and FallibleTypeFolder 2025-04-15 18:30:35 +00:00
stable_mir let rustc_smir host stable_mir for refactoring 2025-04-05 18:23:07 +08:00