diff --git a/Cargo.lock b/Cargo.lock index b9c192ffd4a48..524c1aaf00e44 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3520,6 +3520,7 @@ dependencies = [ "similar", "tempfile", "wasmparser 0.247.0", + "windows 0.62.2", ] [[package]] diff --git a/compiler/rustc_abi/src/lib.rs b/compiler/rustc_abi/src/lib.rs index 48c0c830325c4..0b8203f955766 100644 --- a/compiler/rustc_abi/src/lib.rs +++ b/compiler/rustc_abi/src/lib.rs @@ -1473,6 +1473,15 @@ impl Float { PpcF128 => "ppcf128", } } + + pub fn is_ieee(self) -> bool { + use Float::*; + + match self { + F16 | F32 | F64 | F128 => true, + F16B | PpcF128 => false, + } + } } /// Numeric primitives. @@ -2460,16 +2469,34 @@ impl LayoutData { /// aggregates are passed via `PassMode::Indirect`, `PassMode::IndirectUnsized` or /// `PassMode::Cast`; more strict checks would otherwise be required. pub fn eq_abi(&self, other: &Self) -> bool { + let LayoutData { + size, + align, + backend_repr, + // We assume aggregates are passed via `Cast` or `Indirect*` so their details either + // do not matter or they are checked by `PassMode::eq_abi`. + fields: _, + variants: _, + // Inhabitedness and niches are not ABI-relevant. + largest_niche: _, + uninhabited: _, + // max_repr_align, unadjusted_abi_align, repr_c are not read directly by codegen + // backends. They are only used to compute `PassMode`. So we can ignore them here, any + // differences they may cause are picked up by the `PassMode` check. + max_repr_align: _, + unadjusted_abi_align: _, + repr_c: _, + // The seed does not affect the ABI. + randomization_seed: _, + } = self; // The one thing that we are not capturing here is that for unsized types, the metadata must // also have the same ABI, and moreover that the same metadata leads to the same size. The // 2nd point is quite hard to check though. - self.size == other.size - && self.is_sized() == other.is_sized() - && self.backend_repr.eq_up_to_validity(&other.backend_repr) - && self.backend_repr.is_bool() == other.backend_repr.is_bool() - && self.align.abi == other.align.abi - && self.max_repr_align == other.max_repr_align - && self.unadjusted_abi_align == other.unadjusted_abi_align + *size == other.size + && *align == other.align + && backend_repr.eq_up_to_validity(&other.backend_repr) + // `is_bool` checks validity and is ABI-relevant, so we need to consider it. + && backend_repr.is_bool() == other.backend_repr.is_bool() } } diff --git a/compiler/rustc_ast_lowering/src/asm.rs b/compiler/rustc_ast_lowering/src/asm.rs index 71bcdb0e27e8f..92b3f77ce4a56 100644 --- a/compiler/rustc_ast_lowering/src/asm.rs +++ b/compiler/rustc_ast_lowering/src/asm.rs @@ -261,24 +261,45 @@ impl<'hir> LoweringContext<'_, 'hir> { if class == asm::InlineAsmRegClass::Err { continue; } - let valid_modifiers = class.valid_modifiers(asm_arch.unwrap()); + let valid_modifiers = + class.valid_modifiers(asm_arch.unwrap(), allow_experimental_reg); if !valid_modifiers.contains(&modifier) { - let sub = if valid_modifiers.is_empty() { - InvalidAsmTemplateModifierRegClassSub::DoesNotSupportModifier { - class_name: class.name(), - } + // First check if the requested modifier is missing from the valid + // values because experimental registers are disabled. + let unstable_modifiers = class.valid_modifiers(asm_arch.unwrap(), true); + if !allow_experimental_reg && unstable_modifiers.contains(&modifier) { + self.tcx.sess.create_feature_err( + InvalidAsmTemplateModifierRegClass { + placeholder_span, + op_span: op_sp, + modifier: modifier.to_string(), + sub: InvalidAsmTemplateModifierRegClassSub::ModifierIsGated { + class_name: class.name(), + feature: sym::asm_experimental_reg, + stable_modifiers: valid_modifiers.to_vec().into(), + all_modifiers: unstable_modifiers.to_vec().into(), + }, + }, + sym::asm_experimental_reg, + ).emit(); } else { - InvalidAsmTemplateModifierRegClassSub::SupportModifier { - class_name: class.name(), - modifiers: valid_modifiers.to_vec().into(), - } - }; - self.dcx().emit_err(InvalidAsmTemplateModifierRegClass { - placeholder_span, - op_span: op_sp, - modifier: modifier.to_string(), - sub, - }); + let sub = if valid_modifiers.is_empty() { + InvalidAsmTemplateModifierRegClassSub::DoesNotSupportModifier { + class_name: class.name(), + } + } else { + InvalidAsmTemplateModifierRegClassSub::SupportModifier { + class_name: class.name(), + modifiers: valid_modifiers.to_vec().into(), + } + }; + self.dcx().emit_err(InvalidAsmTemplateModifierRegClass { + placeholder_span, + op_span: op_sp, + modifier: modifier.to_string(), + sub, + }); + } } } hir::InlineAsmOperand::Const { .. } => { diff --git a/compiler/rustc_ast_lowering/src/diagnostics.rs b/compiler/rustc_ast_lowering/src/diagnostics.rs index 8c298c57040e9..35a787f62858b 100644 --- a/compiler/rustc_ast_lowering/src/diagnostics.rs +++ b/compiler/rustc_ast_lowering/src/diagnostics.rs @@ -266,6 +266,18 @@ pub(crate) enum InvalidAsmTemplateModifierRegClassSub { SupportModifier { class_name: Symbol, modifiers: DiagSymbolList }, #[note("the `{$class_name}` register class does not support template modifiers")] DoesNotSupportModifier { class_name: Symbol }, + + /// Enabling a feature is needed to use the requested modifier. + #[note( + "the `{$class_name}` register class only supports the following template modifiers on stable: {$stable_modifiers}" + )] + #[note("enabling the `{$feature}` feature will allow using: {$all_modifiers}")] + ModifierIsGated { + class_name: Symbol, + feature: Symbol, + stable_modifiers: DiagSymbolList, + all_modifiers: DiagSymbolList, + }, } #[derive(Diagnostic)] diff --git a/compiler/rustc_ast_passes/src/ast_validation.rs b/compiler/rustc_ast_passes/src/ast_validation.rs index 813601a23f007..d9ad335b585e2 100644 --- a/compiler/rustc_ast_passes/src/ast_validation.rs +++ b/compiler/rustc_ast_passes/src/ast_validation.rs @@ -2235,6 +2235,19 @@ impl Visitor<'_> for AstValidator<'_> { Self::check_decl_no_pat(&args.inputs, |span, _, _| { self.dcx().emit_err(diagnostics::PatternParenthesizedArgList { span }); }); + + let mut args = args.inputs.iter().peekable(); + while let Some(arg) = args.next() { + if matches!(arg.ty.kind, TyKind::CVarArgs) { + let sugg_span = arg + .span + .until(args.peek().map(|a| a.span).unwrap_or(arg.span.shrink_to_hi())); + self.dcx().emit_err(diagnostics::PathFoundCVariadicParams { + span: arg.ty.span, + sugg_span, + }); + } + } } visit::walk_path_segment(self, seg); } diff --git a/compiler/rustc_ast_passes/src/diagnostics.rs b/compiler/rustc_ast_passes/src/diagnostics.rs index 70595316845bc..452a22f857455 100644 --- a/compiler/rustc_ast_passes/src/diagnostics.rs +++ b/compiler/rustc_ast_passes/src/diagnostics.rs @@ -699,6 +699,15 @@ pub(crate) struct PatternParenthesizedArgList { pub span: Span, } +#[derive(Diagnostic)] +#[diag("C-variadic parameters aren't allowed in parenthesized argument lists")] +pub(crate) struct PathFoundCVariadicParams { + #[primary_span] + pub span: Span, + #[suggestion("remove the C-variadics", applicability = "machine-applicable", code = "")] + pub sugg_span: Span, +} + #[derive(Diagnostic)] #[diag("only a single explicit lifetime bound is permitted", code = E0226)] pub(crate) struct TraitObjectBound { diff --git a/compiler/rustc_ast_passes/src/feature_gate.rs b/compiler/rustc_ast_passes/src/feature_gate.rs index ed004d9e92a02..bc0604cf96e95 100644 --- a/compiler/rustc_ast_passes/src/feature_gate.rs +++ b/compiler/rustc_ast_passes/src/feature_gate.rs @@ -491,7 +491,7 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) { ); gate_all!( named_fn_trait_parameters, - "named parameters in parenthesized generic argument lists are experimental" + "parameters in parenthesized generic argument lists with names, attributes, or c-variadics are experimental" ); // `associated_const_equality` will be stabilized as part of `gca_min_const_items`. diff --git a/compiler/rustc_attr_ir/src/data_structures.rs b/compiler/rustc_attr_ir/src/data_structures.rs index 4a88cd6190c96..ebc5c20da7f04 100644 --- a/compiler/rustc_attr_ir/src/data_structures.rs +++ b/compiler/rustc_attr_ir/src/data_structures.rs @@ -1514,6 +1514,10 @@ pub enum AttributeKind { limit: Limit, }, + /// Represents `#[rustc_unchecked_type_alias]` + // FIXME(#134963): Temporarily prefixed with `rustc_` to prevent potential name resolution ambiguities. + UncheckedTypeAlias, + /// Represents `#[rustc_unroll]` // FIXME(#159429): temporarily renamed from `#[unroll]` to mitigate nameres ambiguity Unroll(UnrollAttr), diff --git a/compiler/rustc_attr_ir/src/encode_cross_crate.rs b/compiler/rustc_attr_ir/src/encode_cross_crate.rs index ac49e4c17ffa8..c3019b53822bd 100644 --- a/compiler/rustc_attr_ir/src/encode_cross_crate.rs +++ b/compiler/rustc_attr_ir/src/encode_cross_crate.rs @@ -207,6 +207,7 @@ impl AttributeKind { ThreadLocal => No, TrackCaller(..) => Yes, TypeLengthLimit { .. } => No, + UncheckedTypeAlias => Yes, Unroll(..) => No, UnstableFeatureBound(..) => No, UnstableRemoved(..) => Yes, @@ -424,6 +425,7 @@ impl AttributeKind { ThreadLocal => false, TrackCaller(..) => false, TypeLengthLimit { .. } => false, + UncheckedTypeAlias => false, Unroll(..) => false, UnstableFeatureBound(..) => false, UnstableRemoved(..) => false, diff --git a/compiler/rustc_attr_parsing/src/attributes/allow_unstable.rs b/compiler/rustc_attr_parsing/src/attributes/allow_unstable.rs index 4a6e57b12233a..f430c1e181c40 100644 --- a/compiler/rustc_attr_parsing/src/attributes/allow_unstable.rs +++ b/compiler/rustc_attr_parsing/src/attributes/allow_unstable.rs @@ -1,5 +1,7 @@ use std::iter; +use rustc_ast::Const; +use rustc_attr_ir::target::AstTarget; use rustc_feature::AttributeStability; use super::macro_attrs::check_macro_only; @@ -78,6 +80,22 @@ impl CombineAttributeParser for RustcAllowConstFnUnstableParser { ) -> impl IntoIterator { parse_unstable(cx, args, ::PATH[0]) } + + fn finalize_check(cx: &mut FinalizeCheckContext<'_, '_>, attr_span: Span) { + match cx.ast_target { + AstTarget::Fn(_) | AstTarget::Method(_) => { + let fn_sig = + cx.ast_target.get_fn_sig().expect("missing fn signature for AST target"); + if matches!(fn_sig.header.constness, Const::No) { + cx.emit_err(diagnostics::RustcAllowConstFnUnstable { + attr_span, + span: cx.target_span, + }); + } + } + _ => {} + } + } } fn parse_unstable( diff --git a/compiler/rustc_attr_parsing/src/attributes/semantics.rs b/compiler/rustc_attr_parsing/src/attributes/semantics.rs index 6c4cd5ef667c8..7a268b20527b5 100644 --- a/compiler/rustc_attr_parsing/src/attributes/semantics.rs +++ b/compiler/rustc_attr_parsing/src/attributes/semantics.rs @@ -31,3 +31,12 @@ impl NoArgsAttributeParser for AlwaysGcaParser { const STABILITY: AttributeStability = unstable!(gca_min_const_items); const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::AlwaysGca; } + +pub(crate) struct UncheckedTypeAliasParser; +impl NoArgsAttributeParser for UncheckedTypeAliasParser { + const PATH: &[Symbol] = &[sym::rustc_unchecked_type_alias]; + const ALLOWED_TARGETS: AllowedTargets<'_> = + AllowedTargets::AllowList(&[Allow(Target::TyAlias)]); + const STABILITY: AttributeStability = unstable!(marked_unchecked_type_aliases); + const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::UncheckedTypeAlias; +} diff --git a/compiler/rustc_attr_parsing/src/attributes/splat.rs b/compiler/rustc_attr_parsing/src/attributes/splat.rs index 0d1477550d688..435a6fdf5ecbb 100644 --- a/compiler/rustc_attr_parsing/src/attributes/splat.rs +++ b/compiler/rustc_attr_parsing/src/attributes/splat.rs @@ -10,7 +10,6 @@ pub(crate) struct SplatParser; impl NoArgsAttributeParser for SplatParser { const PATH: &[Symbol] = &[sym::rustc_splat]; const ALLOWED_TARGETS: AllowedTargets<'_> = AllowedTargets::AllowList(&[Allow(Target::Param)]); - const STABILITY: AttributeStability = - unstable!(splat, "the `rustc_splat` attribute is experimental"); + const STABILITY: AttributeStability = unstable!(splat); const CREATE: fn(Span) -> AttributeKind = AttributeKind::Splat; } diff --git a/compiler/rustc_attr_parsing/src/context.rs b/compiler/rustc_attr_parsing/src/context.rs index bd2ed165b085b..c9ddfcdae5796 100644 --- a/compiler/rustc_attr_parsing/src/context.rs +++ b/compiler/rustc_attr_parsing/src/context.rs @@ -361,6 +361,7 @@ attribute_parsers!( Single>, Single>, Single>, + Single>, // tidy-alphabetical-end ]; ); diff --git a/compiler/rustc_attr_parsing/src/diagnostics.rs b/compiler/rustc_attr_parsing/src/diagnostics.rs index e8c9847965f7a..27fb67bd35006 100644 --- a/compiler/rustc_attr_parsing/src/diagnostics.rs +++ b/compiler/rustc_attr_parsing/src/diagnostics.rs @@ -120,6 +120,15 @@ pub(crate) struct UnsafeAttrOutsideUnsafeLint { pub suggestion: Option, } +#[derive(Diagnostic)] +#[diag("attribute should be applied to `const fn`")] +pub(crate) struct RustcAllowConstFnUnstable { + #[primary_span] + pub attr_span: Span, + #[label("not a `const fn`")] + pub span: Span, +} + #[derive(Diagnostic)] #[diag( "{$num_suggestions -> diff --git a/compiler/rustc_codegen_gcc/src/builder.rs b/compiler/rustc_codegen_gcc/src/builder.rs index 3fad1dfa8b8d9..2f300b02babb4 100644 --- a/compiler/rustc_codegen_gcc/src/builder.rs +++ b/compiler/rustc_codegen_gcc/src/builder.rs @@ -12,7 +12,7 @@ use rustc_abi::{Align, HasDataLayout, Size, TargetDataLayout, WrappingRange}; use rustc_apfloat::{Float, Round, Status, ieee}; use rustc_codegen_ssa::MemFlags; use rustc_codegen_ssa::common::{ - AtomicRmwBinOp, IntPredicate, RealPredicate, SynchronizationScope, TypeKind, + AtomicRmwBinOp, IntPredicate, RealPredicate, SynchronizationScope, }; use rustc_codegen_ssa::mir::operand::{OperandRef, OperandValue}; use rustc_codegen_ssa::mir::place::PlaceRef; @@ -839,8 +839,8 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> { } #[cfg(feature = "master")] - match self.cx.type_kind(a_type) { - TypeKind::Half => { + match self.cx.float_type(a_type) { + Some(abi::Float::F16) => { let fmodf = self.context.get_builtin_function("fmodf"); let f32_type = self.type_f32(); let a = self.context.new_cast(self.location, a, f32_type); @@ -848,15 +848,15 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> { let result = self.context.new_call(self.location, fmodf, &[a, b]); return self.context.new_cast(self.location, result, a_type); } - TypeKind::Float => { + Some(abi::Float::F32) => { let fmodf = self.context.get_builtin_function("fmodf"); return self.context.new_call(self.location, fmodf, &[a, b]); } - TypeKind::Double => { + Some(abi::Float::F64) => { let fmod = self.context.get_builtin_function("fmod"); return self.context.new_call(self.location, fmod, &[a, b]); } - TypeKind::FP128 => { + Some(abi::Float::F128) => { // FIXME(antoyo): use get_simple_function_f128_2args. let f128_type = self.type_f128(); let fmodf128 = self.context.new_function( @@ -872,7 +872,10 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> { ); return self.context.new_call(self.location, fmodf128, &[a, b]); } - _ => (), + Some(float @ (abi::Float::F16B | abi::Float::PpcF128)) => { + bug!("frem unsupported on {float:?}") + } + None => (), } if let Some(vector_type) = a_type_unqualified.dyncast_vector() { @@ -1598,7 +1601,7 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> { self.context.new_array_access(self.location, array, idx).to_rvalue() } - fn vector_splat(&mut self, _num_elts: usize, _elt: RValue<'gcc>) -> RValue<'gcc> { + fn vector_splat(&mut self, _num_elts: u64, _elt: RValue<'gcc>) -> RValue<'gcc> { unimplemented!(); } @@ -1956,9 +1959,12 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> { dest_ty: Type<'gcc>, ) -> RValue<'gcc> { let src_ty = self.cx.val_ty(val); - let (float_ty, int_ty) = if self.cx.type_kind(src_ty) == TypeKind::Vector { - assert_eq!(self.cx.vector_length(src_ty), self.cx.vector_length(dest_ty)); - (self.cx.element_type(src_ty), self.cx.element_type(dest_ty)) + let (float_ty, int_ty) = if let Some((src_elem, src_len)) = + self.cx.vector_element_type_and_length(src_ty) + && let Some((dest_elem, dest_len)) = self.cx.vector_element_type_and_length(dest_ty) + { + assert_eq!(src_len, dest_len); + (src_elem, dest_elem) } else { (src_ty, dest_ty) }; @@ -1968,8 +1974,8 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> { // Now that LLVM always relies on its own, the code has been moved to GCC, but the comments are // still LLVM-specific. This should be updated, and use better GCC specifics if possible. - let int_width = self.cx.int_width(int_ty); - let float_width = self.cx.float_width(float_ty); + let int_width = self.cx.int_width(int_ty).expect("dest must be an integer"); + let float_type = self.cx.float_type(float_ty).expect("src must be a float"); // LLVM's fpto[su]i returns undef when the input val is infinite, NaN, or does not fit into the // destination integer type after rounding towards zero. This `undef` value can cause UB in // safe code (see issue #10184), so we implement a saturating conversion on top of it: @@ -2042,21 +2048,25 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> { // QED. let float_bits_to_llval = |bx: &mut Self, bits| { - let bits_llval = match float_width { - 16 => bx.cx().const_u16(bits as u16), - 32 => bx.cx().const_u32(bits as u32), - 64 => bx.cx().const_u64(bits as u64), - 128 => bx.cx().const_u128(bits), - n => bug!("unsupported float width {}", n), + let bits_llval = match float_type { + abi::Float::F16 => bx.cx().const_u16(bits as u16), + abi::Float::F32 => bx.cx().const_u32(bits as u32), + abi::Float::F64 => bx.cx().const_u64(bits as u64), + abi::Float::F128 => bx.cx().const_u128(bits), + abi::Float::F16B | abi::Float::PpcF128 => { + bug!("unsupported float width {float_type:?}") + } }; bx.bitcast(bits_llval, float_ty) }; - let (f_min, f_max) = match float_width { - 16 => compute_clamp_bounds_half(signed, int_width), - 32 => compute_clamp_bounds::(signed, int_width), - 64 => compute_clamp_bounds::(signed, int_width), - 128 => compute_clamp_bounds::(signed, int_width), - n => bug!("unsupported float width {}", n), + let (f_min, f_max) = match float_type { + abi::Float::F16 => compute_clamp_bounds_half(signed, int_width), + abi::Float::F32 => compute_clamp_bounds::(signed, int_width), + abi::Float::F64 => compute_clamp_bounds::(signed, int_width), + abi::Float::F128 => compute_clamp_bounds::(signed, int_width), + abi::Float::F16B | abi::Float::PpcF128 => { + bug!("unsupported float width {float_type:?}") + } }; let f_min = float_bits_to_llval(self, f_min); let f_max = float_bits_to_llval(self, f_max); @@ -2068,8 +2078,8 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> { // into each lane of the vector. The algorithm stays the same, we are just using the // same constant across all lanes. let maybe_splat = |bx: &mut Self, val| { - if bx.cx().type_kind(dest_ty) == TypeKind::Vector { - bx.vector_splat(bx.vector_length(dest_ty), val) + if let Some(len) = bx.cx().vector_length(dest_ty) { + bx.vector_splat(len, val) } else { val } diff --git a/compiler/rustc_codegen_gcc/src/int.rs b/compiler/rustc_codegen_gcc/src/int.rs index 5cb4b712b9297..097c248c70baa 100644 --- a/compiler/rustc_codegen_gcc/src/int.rs +++ b/compiler/rustc_codegen_gcc/src/int.rs @@ -5,11 +5,12 @@ use gccjit::{ BinaryOp, CType, ComparisonOp, FunctionType, Location, RValue, ToRValue, Type, UnaryOp, }; -use rustc_abi::{CanonAbi, Endian, ExternAbi}; -use rustc_codegen_ssa::common::{IntPredicate, TypeKind}; +use rustc_abi::{CanonAbi, Endian, ExternAbi, Float}; +use rustc_codegen_ssa::common::IntPredicate; use rustc_codegen_ssa::traits::{BackendTypes, BaseTypeCodegenMethods, BuilderMethods, OverflowOp}; use rustc_middle::ty::Ty; use rustc_middle::ty::layout::HasTypingEnv as _; +use rustc_span::bug; use rustc_target::callconv::{ArgAbi, ArgAttributes, FnAbi, PassMode}; use rustc_type_ir::{Interner, TyKind}; @@ -977,15 +978,17 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> { } debug_assert!(value_type.dyncast_array().is_some()); - let name_suffix = match self.type_kind(dest_typ) { - TypeKind::Half if dest_typ.is_compatible_with(self.type_f16()) => { + let name_suffix = match self.float_type(dest_typ) { + Some(Float::F16) => { let value = self.int_to_float_cast(signed, value, self.float_type); return self.context.new_cast(None, value, dest_typ); } - TypeKind::Float => "tisf", - TypeKind::Double => "tidf", - TypeKind::FP128 => "titf", - kind => panic!("cannot cast a non-native integer to type {:?}", kind), + Some(Float::F32) => "tisf", + Some(Float::F64) => "tidf", + Some(Float::F128) => "titf", + None | Some(Float::F16B | Float::PpcF128) => { + panic!("cannot cast a non-native integer to type {dest_typ:?}") + } }; let sign = if signed { "" } else { "un" }; let func_name = format!("__float{}{}", sign, name_suffix); @@ -1025,16 +1028,18 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> { } debug_assert!(dest_typ.dyncast_array().is_some()); - let (dest_type, param_type) = match self.type_kind(value_type) { - TypeKind::Half => (Some(self.float_type), self.float_type), + let (dest_type, param_type) = match self.float_type(value_type) { + Some(Float::F16) => (Some(self.float_type), self.float_type), _ => (None, value_type), }; - let name_suffix = match self.type_kind(value_type) { + let name_suffix = match self.float_type(value_type) { // Since we will cast Half to a float, we use sfti for both. - TypeKind::Half | TypeKind::Float => "sfti", - TypeKind::Double => "dfti", - TypeKind::FP128 => "tfti", - kind => panic!("cannot cast a {:?} to non-native integer", kind), + Some(Float::F16 | Float::F32) => "sfti", + Some(Float::F64) => "dfti", + Some(Float::F128) => "tfti", + None | Some(Float::F16B | Float::PpcF128) => { + bug!("cannot cast a {value_type:?} to non-native integer") + } }; let sign = if signed { "" } else { "uns" }; let func_name = format!("__fix{}{}", sign, name_suffix); diff --git a/compiler/rustc_codegen_gcc/src/intrinsic/simd.rs b/compiler/rustc_codegen_gcc/src/intrinsic/simd.rs index 5b782d5776129..eaa5c415f9fda 100644 --- a/compiler/rustc_codegen_gcc/src/intrinsic/simd.rs +++ b/compiler/rustc_codegen_gcc/src/intrinsic/simd.rs @@ -5,7 +5,7 @@ use gccjit::{BinaryOp, RValue, ToRValue, Type}; use gccjit::{ComparisonOp, UnaryOp}; use rustc_abi::{Align, Size}; use rustc_codegen_ssa::base::compare_simd_types; -use rustc_codegen_ssa::common::{IntPredicate, TypeKind}; +use rustc_codegen_ssa::common::IntPredicate; #[cfg(feature = "master")] use rustc_codegen_ssa::diagnostics::ExpectedPointerMutability; use rustc_codegen_ssa::diagnostics::InvalidMonomorphization; @@ -191,7 +191,7 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>( } ); require!( - bx.type_kind(bx.element_type(llret_ty)) == TypeKind::Integer, + bx.vector_element_type(llret_ty).is_some_and(|elem| bx.int_width(elem).is_some()), InvalidMonomorphization::ReturnIntegerType { span, name, ret_ty, out_ty } ); @@ -246,7 +246,7 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>( if matches!(name, sym::simd_bswap | sym::simd_bitreverse | sym::simd_ctpop) { require!( - bx.type_kind(bx.element_type(llret_ty)) == TypeKind::Integer, + bx.vector_element_type(llret_ty).is_some_and(|elem| bx.int_width(elem).is_some()), InvalidMonomorphization::UnsupportedOperation { span, name, in_ty, in_elem } ); } @@ -279,7 +279,7 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>( let simd_ctpop = |bx: &mut Builder<'a, 'gcc, 'tcx>, vector: RValue<'gcc>| -> RValue<'gcc> { let mut vector_elements = vec![]; - let elem_ty = bx.element_type(llret_ty); + let elem_ty = bx.vector_element_type(llret_ty).expect("SIMD return type was not a vector"); for i in 0..in_len { let index = bx.context.new_rvalue_from_long(bx.ulong_type, i as i64); let element = bx.extract_element(vector, index).to_rvalue(); diff --git a/compiler/rustc_codegen_gcc/src/type_.rs b/compiler/rustc_codegen_gcc/src/type_.rs index d3e2595ff701a..8cc10a5750079 100644 --- a/compiler/rustc_codegen_gcc/src/type_.rs +++ b/compiler/rustc_codegen_gcc/src/type_.rs @@ -1,12 +1,9 @@ -#[cfg(feature = "master")] -use std::convert::TryInto; use std::mem::discriminant; #[cfg(feature = "master")] use gccjit::{CType, TypeAttribute}; use gccjit::{RValue, Struct, Type}; -use rustc_abi::{AddressSpace, Align, Integer, Size}; -use rustc_codegen_ssa::common::TypeKind; +use rustc_abi::{AddressSpace, Align, Float, Integer, Size}; use rustc_codegen_ssa::traits::{ BaseTypeCodegenMethods, DerivedTypeCodegenMethods, TypeMembershipCodegenMethods, }; @@ -14,7 +11,6 @@ use rustc_middle::ty; use rustc_middle::ty::layout::TyAndLayout; use rustc_span::bug; -use crate::common::TypeReflection; use crate::context::{CodegenCx, new_array_type}; use crate::type_of::LayoutGccExt; @@ -312,66 +308,6 @@ impl<'gcc, 'tcx> BaseTypeCodegenMethods for CodegenCx<'gcc, 'tcx> { self.context.new_function_pointer_type(None, return_type, params, false) } - #[cfg(feature = "master")] - fn type_kind(&self, typ: Type<'gcc>) -> TypeKind { - if self.is_int_type_or_bool(typ) { - TypeKind::Integer - } else if typ.get_pointee().is_some() { - TypeKind::Pointer - } else if typ.is_vector() { - TypeKind::Vector - } else if typ.dyncast_array().is_some() { - TypeKind::Array - } else if typ.is_struct().is_some() { - TypeKind::Struct - } else if typ.dyncast_function_ptr_type().is_some() { - TypeKind::Function - } else if typ.is_compatible_with(self.float_type) { - TypeKind::Float - } else if typ.is_compatible_with(self.double_type) { - TypeKind::Double - } else if typ.is_floating_point() { - match typ.get_size() { - 2 => TypeKind::Half, - 4 => TypeKind::Float, - 8 => TypeKind::Double, - 16 => TypeKind::FP128, - size => unreachable!("Floating-point type of size {}", size), - } - } else if typ == self.type_void() { - TypeKind::Void - } else { - // FIXME(antoyo): support other types. - unimplemented!(); - } - } - - #[cfg(not(feature = "master"))] - fn type_kind(&self, typ: Type<'gcc>) -> TypeKind { - if self.is_int_type_or_bool(typ) { - TypeKind::Integer - } else if typ.is_compatible_with(self.float_type) { - TypeKind::Float - } else if typ.is_compatible_with(self.double_type) { - TypeKind::Double - } else if typ.is_vector() { - TypeKind::Vector - } else if typ.get_pointee().is_some() { - TypeKind::Pointer - } else if typ.dyncast_array().is_some() { - TypeKind::Array - } else if typ.is_struct().is_some() { - TypeKind::Struct - } else if typ.dyncast_function_ptr_type().is_some() { - TypeKind::Function - } else if typ == self.type_void() { - TypeKind::Void - } else { - // FIXME(antoyo): support other types. - unimplemented!(); - } - } - fn type_ptr(&self) -> Type<'gcc> { self.type_ptr_to(self.type_void()) } @@ -380,47 +316,42 @@ impl<'gcc, 'tcx> BaseTypeCodegenMethods for CodegenCx<'gcc, 'tcx> { self.type_ptr_to_ext(self.type_void(), address_space) } - fn element_type(&self, ty: Type<'gcc>) -> Type<'gcc> { - if let Some(typ) = ty.dyncast_array() { - typ - } else if let Some(vector_type) = ty.dyncast_vector() { - vector_type.get_element_type() - } else if let Some(typ) = ty.get_pointee() { - typ - } else { - unreachable!() - } - } - - fn vector_length(&self, _ty: Type<'gcc>) -> usize { - unimplemented!(); + fn vector_element_type_and_length(&self, ty: Type<'gcc>) -> Option<(Type<'gcc>, u64)> { + ty.dyncast_vector() + .map(|vector_type| (vector_type.get_element_type(), vector_type.get_num_units() as u64)) } #[cfg(feature = "master")] - fn float_width(&self, typ: Type<'gcc>) -> usize { + fn float_type(&self, typ: Type<'gcc>) -> Option { if typ.is_floating_point() { - (typ.get_size() * u8::BITS).try_into().unwrap() + match typ.get_size() { + 2 => Some(Float::F16), + 4 => Some(Float::F32), + 8 => Some(Float::F64), + 16 => Some(Float::F128), + _ => panic!("Cannot get width of float type {typ:?}"), + } } else { - panic!("Cannot get width of float type {:?}", typ); + None } } #[cfg(not(feature = "master"))] - fn float_width(&self, typ: Type<'gcc>) -> usize { + fn float_type(&self, typ: Type<'gcc>) -> Option { let f32 = self.context.new_type::(); let f64 = self.context.new_type::(); if typ.is_compatible_with(f32) { - 32 + Some(Float::F32) } else if typ.is_compatible_with(f64) { - 64 + Some(Float::F64) } else { - panic!("Cannot get width of float type {:?}", typ); + None } // FIXME(antoyo): support other sizes. } - fn int_width(&self, typ: Type<'gcc>) -> u64 { - self.gcc_int_width(typ) + fn int_width(&self, typ: Type<'gcc>) -> Option { + if self.is_int_type_or_bool(typ) { Some(self.gcc_int_width(typ)) } else { None } } fn val_ty(&self, value: RValue<'gcc>) -> Type<'gcc> { diff --git a/compiler/rustc_codegen_llvm/src/back/write.rs b/compiler/rustc_codegen_llvm/src/back/write.rs index b5219edf4efa2..56f855b340440 100644 --- a/compiler/rustc_codegen_llvm/src/back/write.rs +++ b/compiler/rustc_codegen_llvm/src/back/write.rs @@ -12,7 +12,6 @@ use rustc_codegen_ssa::back::write::{ TargetMachineFactoryConfig, TargetMachineFactoryFn, }; use rustc_codegen_ssa::base::wants_wasm_eh; -use rustc_codegen_ssa::common::TypeKind; use rustc_codegen_ssa::traits::*; use rustc_codegen_ssa::{CompiledModule, ModuleCodegen, ModuleKind}; use rustc_data_structures::profiling::SelfProfilerRef; @@ -40,7 +39,7 @@ use crate::diagnostics::{ UnsupportedCompression, WithLlvmError, WriteBytecode, }; use crate::llvm::diagnostic::OptimizationDiagnosticKind::*; -use crate::llvm::{self, DiagnosticInfo}; +use crate::llvm::{self, DiagnosticInfo, TypeKind}; use crate::type_::llvm_type_ptr; use crate::{LlvmCodegenBackend, ModuleLlvm, attributes, base, common, llvm_util}; diff --git a/compiler/rustc_codegen_llvm/src/builder.rs b/compiler/rustc_codegen_llvm/src/builder.rs index 930463d251d7d..9e3492d0ca696 100644 --- a/compiler/rustc_codegen_llvm/src/builder.rs +++ b/compiler/rustc_codegen_llvm/src/builder.rs @@ -7,10 +7,10 @@ pub(crate) mod autodiff; pub(crate) mod gpu_offload; use libc::{c_char, c_uint}; -use rustc_abi::{self as abi, Align, CanonAbi, Size, WrappingRange}; +use rustc_abi::{self as abi, Align, CanonAbi, Float, Size, WrappingRange}; use rustc_attr_ir::UnrollAttr; use rustc_codegen_ssa::MemFlags; -use rustc_codegen_ssa::common::{IntPredicate, RealPredicate, SynchronizationScope, TypeKind}; +use rustc_codegen_ssa::common::{IntPredicate, RealPredicate, SynchronizationScope}; use rustc_codegen_ssa::mir::operand::{OperandRef, OperandValue}; use rustc_codegen_ssa::mir::place::PlaceRef; use rustc_codegen_ssa::traits::*; @@ -36,7 +36,7 @@ use crate::common::Funclet; use crate::context::{CodegenCx, FullCx, GenericCx, SCx}; use crate::llvm::{ self, AtomicOrdering, AtomicRmwBinOp, BasicBlock, FromGeneric, GEPNoWrapFlags, Metadata, TRUE, - ToLlvmBool, Type, Value, + ToLlvmBool, Type, TypeKind, Value, }; use crate::type_of::LayoutLlvmExt; @@ -1073,10 +1073,9 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> { // other control flow automatically. if self.sess().target.is_like_wasm { let src_ty = self.cx.val_ty(val); - if self.cx.type_kind(src_ty) != TypeKind::Vector { - let float_width = self.cx.float_width(src_ty); - let int_width = self.cx.int_width(dest_ty); - if matches!((int_width, float_width), (32 | 64, 32 | 64)) { + if let Some(float_type) = self.cx.float_type(src_ty) { + let int_width = self.cx.int_width(dest_ty).expect("dest was not an integer"); + if matches!((int_width, float_type), (32 | 64, Float::F32 | Float::F64)) { return self.call_intrinsic( "llvm.wasm.trunc.unsigned", &[dest_ty, src_ty], @@ -1092,10 +1091,9 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> { // see `fptoui` above for why wasm is different here if self.sess().target.is_like_wasm { let src_ty = self.cx.val_ty(val); - if self.cx.type_kind(src_ty) != TypeKind::Vector { - let float_width = self.cx.float_width(src_ty); - let int_width = self.cx.int_width(dest_ty); - if matches!((int_width, float_width), (32 | 64, 32 | 64)) { + if let Some(float_type) = self.cx.float_type(src_ty) { + let int_width = self.cx.int_width(dest_ty).expect("dest ty was not an integer"); + if matches!((int_width, float_type), (32 | 64, Float::F32 | Float::F64)) { return self.call_intrinsic( "llvm.wasm.trunc.signed", &[dest_ty, src_ty], @@ -1278,12 +1276,12 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> { unsafe { llvm::LLVMBuildExtractElement(self.llbuilder(), vec, idx, UNNAMED) } } - fn vector_splat(&mut self, num_elts: usize, elt: &'ll Value) -> &'ll Value { + fn vector_splat(&mut self, num_elts: u64, elt: &'ll Value) -> &'ll Value { unsafe { let elt_ty = self.cx.val_ty(elt); - let undef = llvm::LLVMGetUndef(self.type_vector(elt_ty, num_elts as u64)); + let undef = llvm::LLVMGetUndef(self.type_vector(elt_ty, num_elts)); let vec = self.insert_element(undef, elt, self.cx.const_i32(0)); - let vec_i32_ty = self.type_vector(self.type_i32(), num_elts as u64); + let vec_i32_ty = self.type_vector(self.type_i32(), num_elts); self.shuffle_vector(vec, undef, self.const_null(vec_i32_ty)) } } diff --git a/compiler/rustc_codegen_llvm/src/builder/autodiff.rs b/compiler/rustc_codegen_llvm/src/builder/autodiff.rs index 58b8cb1124d85..b7f1521c7fe3e 100644 --- a/compiler/rustc_codegen_llvm/src/builder/autodiff.rs +++ b/compiler/rustc_codegen_llvm/src/builder/autodiff.rs @@ -3,7 +3,6 @@ use std::ptr; use rustc_ast::expand::autodiff_attrs::{DiffActivity, DiffMode}; use rustc_ast::expand::typetree::FncTree; use rustc_attr_ir::RustcAutodiff; -use rustc_codegen_ssa::common::TypeKind; use rustc_codegen_ssa::mir::IntrinsicResult; use rustc_codegen_ssa::mir::operand::{OperandRef, OperandValue}; use rustc_codegen_ssa::mir::place::PlaceValue; @@ -18,7 +17,7 @@ use tracing::debug; use crate::builder::{Builder, UNNAMED}; use crate::context::SimpleCx; use crate::declare::declare_simple_fn; -use crate::llvm::{self, TRUE, Type, Value}; +use crate::llvm::{self, TRUE, Type, TypeKind, Value}; pub(crate) fn adjust_activity_to_abi<'tcx>( tcx: TyCtxt<'tcx>, diff --git a/compiler/rustc_codegen_llvm/src/builder/gpu_offload.rs b/compiler/rustc_codegen_llvm/src/builder/gpu_offload.rs index de7b4688f1471..5c6b3e6840b9d 100644 --- a/compiler/rustc_codegen_llvm/src/builder/gpu_offload.rs +++ b/compiler/rustc_codegen_llvm/src/builder/gpu_offload.rs @@ -4,7 +4,6 @@ use bitflags::Flags; use llvm::Linkage::*; use rustc_abi::Align; use rustc_codegen_ssa::MemFlags; -use rustc_codegen_ssa::common::TypeKind; use rustc_codegen_ssa::mir::operand::{OperandRef, OperandValue}; use rustc_codegen_ssa::traits::{BaseTypeCodegenMethods, BuilderMethods, ReturnSlot}; use rustc_middle::ty::offload_meta::{MappingFlags, OffloadMetadata, OffloadSize}; @@ -15,7 +14,7 @@ use crate::builder::Builder; use crate::common::CodegenCx; use crate::context::SimpleCx; use crate::llvm::AttributePlace::Function; -use crate::llvm::{self, Linkage, Type, Value}; +use crate::llvm::{self, Linkage, Type, TypeKind, Value}; // LLVM kernel-independent globals required for offloading pub(crate) struct OffloadGlobals<'ll> { @@ -476,15 +475,14 @@ fn declare_offload_fn<'ll>( } pub(crate) fn scalar_width<'ll>(cx: &SimpleCx<'ll>, ty: &'ll Type) -> u64 { - match cx.type_kind(ty) { - TypeKind::Half - | TypeKind::Float - | TypeKind::Double - | TypeKind::X86_FP80 - | TypeKind::FP128 - | TypeKind::PPC_FP128 => cx.float_width(ty) as u64, - TypeKind::Integer => cx.int_width(ty), - other => bug!("scalar_width was called on a non scalar type {other:?}"), + if let Some(float) = cx.float_type(ty) { + float.size().bits() + } else if let Some(width) = cx.int_width(ty) { + width + } else if cx.type_kind(ty) == TypeKind::Pointer { + bug!("scalar_width doesn't support pointer type {ty:?}") + } else { + bug!("scalar_width was called on a non scalar type {ty:?}") } } diff --git a/compiler/rustc_codegen_llvm/src/common.rs b/compiler/rustc_codegen_llvm/src/common.rs index a7fdf9b2d8a76..30349c8244882 100644 --- a/compiler/rustc_codegen_llvm/src/common.rs +++ b/compiler/rustc_codegen_llvm/src/common.rs @@ -6,7 +6,6 @@ use libc::c_uint; use rustc_abi::Primitive::Pointer; use rustc_abi::{self as abi, ExternAbi, HasDataLayout as _}; use rustc_ast::Mutability; -use rustc_codegen_ssa::common::TypeKind; use rustc_codegen_ssa::traits::*; use rustc_crate_store::DllImport; use rustc_data_structures::stable_hash::{StableHash, StableHasher}; @@ -23,7 +22,7 @@ use crate::consts::{IsInitOrFini, IsStatic, const_alloc_to_llvm}; pub(crate) use crate::context::CodegenCx; use crate::context::{GenericCx, SCx}; use crate::llvm::{ - self, BasicBlock, ConstantInt, FALSE, TRUE, ToLlvmBool, Type, Value, const_ptr_auth, + self, BasicBlock, ConstantInt, FALSE, TRUE, ToLlvmBool, Type, TypeKind, Value, const_ptr_auth, }; pub(crate) fn maybe_sign_fn_ptr<'ll, 'tcx>( diff --git a/compiler/rustc_codegen_llvm/src/intrinsic.rs b/compiler/rustc_codegen_llvm/src/intrinsic.rs index 12319407b456e..2b529aa2c5360 100644 --- a/compiler/rustc_codegen_llvm/src/intrinsic.rs +++ b/compiler/rustc_codegen_llvm/src/intrinsic.rs @@ -9,7 +9,7 @@ use rustc_abi::{ use rustc_attr_ir::find_attr; use rustc_codegen_ssa::RetagInfo; use rustc_codegen_ssa::base::{compare_simd_types, wants_msvc_seh, wants_wasm_eh}; -use rustc_codegen_ssa::common::{IntPredicate, TypeKind}; +use rustc_codegen_ssa::common::IntPredicate; use rustc_codegen_ssa::diagnostics::{ExpectedPointerMutability, InvalidMonomorphization}; use rustc_codegen_ssa::mir::IntrinsicResult; use rustc_codegen_ssa::mir::operand::{OperandRef, OperandValue}; @@ -44,7 +44,7 @@ use crate::diagnostics::{ OffloadWithoutEnable, OffloadWithoutFatLTO, UnknownIntrinsic, }; use crate::intrinsic::ty::typetree::fnc_typetrees; -use crate::llvm::{self, Attribute, AttributePlace, Metadata, Type, Value}; +use crate::llvm::{self, Attribute, AttributePlace, Metadata, Type, TypeKind, Value}; use crate::type_of::LayoutLlvmExt; use crate::va_arg::emit_va_arg; @@ -1080,10 +1080,9 @@ fn can_autocast<'ll>(cx: &CodegenCx<'ll, '_>, rust_ty: &'ll Type, llvm_ty: &'ll }, ) } - TypeKind::Vector => { - let llvm_element_ty = cx.element_type(llvm_ty); - let element_count = cx.vector_length(llvm_ty) as u64; - + _ if let Some((llvm_element_ty, element_count)) = + cx.vector_element_type_and_length(llvm_ty) => + { if llvm_element_ty == cx.type_bf16() { rust_ty == cx.type_vector(cx.type_i16(), element_count) } else if llvm_element_ty == cx.type_i1() { @@ -1094,20 +1093,18 @@ fn can_autocast<'ll>(cx: &CodegenCx<'ll, '_>, rust_ty: &'ll Type, llvm_ty: &'ll } } TypeKind::BFloat => rust_ty == cx.type_i16(), - TypeKind::X86_AMX if cx.type_kind(rust_ty) == TypeKind::Vector => { - let element_ty = cx.element_type(rust_ty); - let element_count = cx.vector_length(rust_ty) as u64; - - let element_size_bits = match cx.type_kind(element_ty) { - TypeKind::Half => 16, - TypeKind::Float => 32, - TypeKind::Double => 64, - TypeKind::FP128 => 128, - TypeKind::Integer => cx.int_width(element_ty), - TypeKind::Pointer => cx.int_width(cx.isize_ty), - _ => bug!( - "Vector element type `{element_ty:?}` not one of integer, float or pointer" - ), + TypeKind::X86_AMX + if let Some((element_ty, element_count)) = + cx.vector_element_type_and_length(rust_ty) => + { + let element_size_bits = if let Some(float) = cx.float_type(element_ty) { + float.size().bits() + } else if let Some(bits) = cx.int_width(element_ty) { + bits + } else if cx.type_kind(element_ty) == TypeKind::Pointer { + cx.data_layout().pointer_size().bits() + } else { + bug!("Vector element type `{element_ty:?}` not one of integer, float or pointer") }; element_size_bits * element_count == 8192 @@ -1140,8 +1137,10 @@ fn autocast<'ll>( ret } // cast from the i1xN vector type to the primitive type - (TypeKind::Vector, TypeKind::Integer) if bx.element_type(src_ty) == bx.type_i1() => { - let vector_length = bx.vector_length(src_ty) as u64; + (TypeKind::Vector, TypeKind::Integer) + if let Some((elem, vector_length)) = bx.vector_element_type_and_length(src_ty) + && elem == bx.type_i1() => + { let int_width = vector_length.next_power_of_two().max(8); let val = if vector_length == int_width { @@ -1162,8 +1161,10 @@ fn autocast<'ll>( bx.bitcast(val, dest_ty) } // cast from the primitive type to the i1xN vector type - (TypeKind::Integer, TypeKind::Vector) if bx.element_type(dest_ty) == bx.type_i1() => { - let vector_length = bx.vector_length(dest_ty) as u64; + (TypeKind::Integer, TypeKind::Vector) + if let Some((elem, vector_length)) = bx.vector_element_type_and_length(dest_ty) + && elem == bx.type_i1() => + { let int_width = vector_length.next_power_of_two().max(8); let intermediate_ty = bx.type_vector(bx.type_i1(), int_width); @@ -2207,7 +2208,7 @@ fn generic_simd_intrinsic<'ll, 'tcx>( } ); require!( - bx.type_kind(bx.element_type(llret_ty)) == TypeKind::Integer, + bx.vector_element_type(llret_ty).is_some_and(|elem| bx.int_width(elem).is_some()), InvalidMonomorphization::ReturnIntegerType { span, name, ret_ty, out_ty } ); diff --git a/compiler/rustc_codegen_llvm/src/llvm/conversions.rs b/compiler/rustc_codegen_llvm/src/llvm/conversions.rs index 3bc790ca7cff4..a66f7f4b55280 100644 --- a/compiler/rustc_codegen_llvm/src/llvm/conversions.rs +++ b/compiler/rustc_codegen_llvm/src/llvm/conversions.rs @@ -1,6 +1,6 @@ //! Conversions from backend-independent data types to/from LLVM FFI types. -use rustc_codegen_ssa::common::{AtomicRmwBinOp, IntPredicate, RealPredicate, TypeKind}; +use rustc_codegen_ssa::common::{AtomicRmwBinOp, IntPredicate, RealPredicate}; use rustc_middle::ty::AtomicOrdering; use rustc_session::config::DebugInfo; use rustc_target::spec::SymbolVisibility; @@ -16,15 +16,6 @@ pub(crate) trait FromGeneric { fn from_generic(other: T) -> Self; } -/// Helper trait for converting LLVM-specific types to backend-independent -/// types, for FFI purposes. -/// -/// FIXME(#147327): These trait/method names were chosen to avoid churn in -/// existing code, but are not great and could probably be made clearer. -pub(crate) trait ToGeneric { - fn to_generic(&self) -> T; -} - impl FromGeneric for llvm::Visibility { fn from_generic(visibility: SymbolVisibility) -> Self { match visibility { @@ -125,29 +116,3 @@ impl FromGeneric for llvm::debuginfo::DebugEmissionKind { } } } - -impl ToGeneric for llvm::TypeKind { - fn to_generic(&self) -> TypeKind { - match self { - Self::Void => TypeKind::Void, - Self::Half => TypeKind::Half, - Self::Float => TypeKind::Float, - Self::Double => TypeKind::Double, - Self::X86_FP80 => TypeKind::X86_FP80, - Self::FP128 => TypeKind::FP128, - Self::PPC_FP128 => TypeKind::PPC_FP128, - Self::Label => TypeKind::Label, - Self::Integer => TypeKind::Integer, - Self::Function => TypeKind::Function, - Self::Struct => TypeKind::Struct, - Self::Array => TypeKind::Array, - Self::Pointer => TypeKind::Pointer, - Self::Vector => TypeKind::Vector, - Self::Metadata => TypeKind::Metadata, - Self::Token => TypeKind::Token, - Self::ScalableVector => TypeKind::ScalableVector, - Self::BFloat => TypeKind::BFloat, - Self::X86_AMX => TypeKind::X86_AMX, - } - } -} diff --git a/compiler/rustc_codegen_llvm/src/type_.rs b/compiler/rustc_codegen_llvm/src/type_.rs index 2143f2b7aec37..0244706033641 100644 --- a/compiler/rustc_codegen_llvm/src/type_.rs +++ b/compiler/rustc_codegen_llvm/src/type_.rs @@ -3,8 +3,7 @@ use std::hash::{Hash, Hasher}; use std::{fmt, ptr}; use libc::c_uint; -use rustc_abi::{AddressSpace, Align, Integer, Reg, Size}; -use rustc_codegen_ssa::common::TypeKind; +use rustc_abi::{AddressSpace, Align, Float, Integer, Reg, Size}; use rustc_codegen_ssa::traits::*; use rustc_data_structures::small_c_str::SmallCStr; use rustc_middle::ty::layout::TyAndLayout; @@ -15,7 +14,7 @@ use rustc_target::callconv::{CastTarget, FnAbi}; use crate::abi::{FnAbiLlvmExt, LlvmType}; use crate::common; use crate::context::{CodegenCx, GenericCx, SCx}; -use crate::llvm::{self, FALSE, TRUE, ToGeneric, ToLlvmBool, Type, Value}; +use crate::llvm::{self, FALSE, TRUE, ToLlvmBool, Type, TypeKind, Value}; use crate::type_of::LayoutLlvmExt; impl PartialEq for Type { @@ -187,6 +186,12 @@ impl<'ll, CX: Borrow>> GenericCx<'ll, CX> { pub(crate) fn type_array(&self, ty: &'ll Type, len: u64) -> &'ll Type { unsafe { llvm::LLVMArrayType2(ty, len) } } + + /// Prefer more specific methods (e.g. `int_width`, `float_type`, `vector_element_type`) when + /// possible. + pub(crate) fn type_kind(&self, ty: &'ll Type) -> TypeKind { + llvm::LLVMGetTypeKind(ty).to_rust() + } } impl<'ll, CX: Borrow>> BaseTypeCodegenMethods for GenericCx<'ll, CX> { @@ -242,10 +247,6 @@ impl<'ll, CX: Borrow>> BaseTypeCodegenMethods for GenericCx<'ll, CX> { unsafe { llvm::LLVMFunctionType(ret, args.as_ptr(), args.len() as c_uint, FALSE) } } - fn type_kind(&self, ty: &'ll Type) -> TypeKind { - llvm::LLVMGetTypeKind(ty).to_rust().to_generic() - } - fn type_ptr(&self) -> &'ll Type { llvm_type_ptr(self.llcx()) } @@ -254,31 +255,33 @@ impl<'ll, CX: Borrow>> BaseTypeCodegenMethods for GenericCx<'ll, CX> { llvm_type_ptr_in_address_space(self.llcx(), address_space) } - fn element_type(&self, ty: &'ll Type) -> &'ll Type { + fn vector_element_type_and_length(&self, ty: Self::Type) -> Option<(Self::Type, u64)> { match self.type_kind(ty) { - TypeKind::Array | TypeKind::Vector => unsafe { llvm::LLVMGetElementType(ty) }, - TypeKind::Pointer => bug!("element_type is not supported for opaque pointers"), - other => bug!("element_type called on unsupported type {other:?}"), + TypeKind::Vector => { + Some(unsafe { (llvm::LLVMGetElementType(ty), llvm::LLVMGetVectorSize(ty).into()) }) + } + _ => None, } } - fn vector_length(&self, ty: &'ll Type) -> usize { - unsafe { llvm::LLVMGetVectorSize(ty) as usize } - } - - fn float_width(&self, ty: &'ll Type) -> usize { + fn float_type(&self, ty: &'ll Type) -> Option { match self.type_kind(ty) { - TypeKind::Half => 16, - TypeKind::Float => 32, - TypeKind::Double => 64, - TypeKind::X86_FP80 => 80, - TypeKind::FP128 | TypeKind::PPC_FP128 => 128, - other => bug!("llvm_float_width called on a non-float type {other:?}"), + TypeKind::BFloat => Some(Float::F16B), + TypeKind::Half => Some(Float::F16), + TypeKind::Float => Some(Float::F32), + TypeKind::Double => Some(Float::F64), + TypeKind::FP128 => Some(Float::F128), + TypeKind::X86_FP80 => bug!("x87_f80 is not supported yet"), + TypeKind::PPC_FP128 => Some(Float::PpcF128), + _ => None, } } - fn int_width(&self, ty: &'ll Type) -> u64 { - unsafe { llvm::LLVMGetIntTypeWidth(ty) as u64 } + fn int_width(&self, ty: &'ll Type) -> Option { + match self.type_kind(ty) { + TypeKind::Integer => Some(unsafe { llvm::LLVMGetIntTypeWidth(ty).into() }), + _ => None, + } } fn val_ty(&self, v: &'ll Value) -> &'ll Type { diff --git a/compiler/rustc_codegen_ssa/src/base.rs b/compiler/rustc_codegen_ssa/src/base.rs index 14e07a9c89395..d41e682583e87 100644 --- a/compiler/rustc_codegen_ssa/src/base.rs +++ b/compiler/rustc_codegen_ssa/src/base.rs @@ -44,7 +44,7 @@ use crate::back::write::{ ComputedLtoType, ModuleConfig, OngoingCodegen, compute_per_cgu_lto_type, start_async_codegen, submit_codegened_module_to_llvm, submit_post_lto_module_to_llvm, submit_pre_lto_module_to_llvm, }; -use crate::common::{self, IntPredicate, RealPredicate, TypeKind}; +use crate::common::{self, IntPredicate, RealPredicate}; use crate::meth::load_vtable; use crate::mir::operand::OperandValue; use crate::mir::place::PlaceRef; @@ -345,14 +345,14 @@ pub(crate) fn build_shift_expr_rhs<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>( rhs = bx.and(rhs, mask); } - if bx.cx().type_kind(rhs_llty) == TypeKind::Vector { - rhs_llty = bx.cx().element_type(rhs_llty) + if let Some(element) = bx.cx().vector_element_type(rhs_llty) { + rhs_llty = element; } - if bx.cx().type_kind(lhs_llty) == TypeKind::Vector { - lhs_llty = bx.cx().element_type(lhs_llty) + if let Some(element) = bx.cx().vector_element_type(lhs_llty) { + lhs_llty = element; } - let rhs_sz = bx.cx().int_width(rhs_llty); - let lhs_sz = bx.cx().int_width(lhs_llty); + let rhs_sz = bx.cx().int_width(rhs_llty).expect("rhs is not an integer"); + let lhs_sz = bx.cx().int_width(lhs_llty).expect("lhs is not an integer"); if lhs_sz < rhs_sz { if is_unchecked { bx.unchecked_utrunc(rhs, lhs_llty) } else { bx.trunc(rhs, lhs_llty) } } else if lhs_sz > rhs_sz { diff --git a/compiler/rustc_codegen_ssa/src/common.rs b/compiler/rustc_codegen_ssa/src/common.rs index 9338a6b3769ed..b5f1fee9407f4 100644 --- a/compiler/rustc_codegen_ssa/src/common.rs +++ b/compiler/rustc_codegen_ssa/src/common.rs @@ -66,29 +66,6 @@ pub enum SynchronizationScope { CrossThread, } -#[derive(Copy, Clone, PartialEq, Debug)] -pub enum TypeKind { - Void, - Half, - Float, - Double, - X86_FP80, - FP128, - PPC_FP128, - Label, - Integer, - Function, - Struct, - Array, - Pointer, - Vector, - Metadata, - Token, - ScalableVector, - BFloat, - X86_AMX, -} - // FIXME(mw): Anything that is produced via DepGraph::with_task() must implement // the StableHash trait. Normally DepGraph::with_task() calls are // hidden behind queries, but CGU creation is a special case in two @@ -130,23 +107,17 @@ pub(crate) fn shift_mask_val<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>( mask_llty: Bx::Type, invert: bool, ) -> Bx::Value { - let kind = bx.type_kind(llty); - match kind { - TypeKind::Integer => { - // i8/u8 can shift by at most 7, i16/u16 by at most 15, etc. - let val = bx.int_width(llty) - 1; - if invert { - bx.const_int(mask_llty, !val as i64) - } else { - bx.const_uint(mask_llty, val) - } - } - TypeKind::Vector => { - let mask = - shift_mask_val(bx, bx.element_type(llty), bx.element_type(mask_llty), invert); - bx.vector_splat(bx.vector_length(mask_llty), mask) - } - _ => bug!("shift_mask_val: expected Integer or Vector, found {:?}", kind), + if let Some(val) = bx.int_width(llty) { + // i8/u8 can shift by at most 7, i16/u16 by at most 15, etc. + let val = val - 1; + if invert { bx.const_int(mask_llty, !val as i64) } else { bx.const_uint(mask_llty, val) } + } else if let Some(element) = bx.vector_element_type(llty) { + let (mask_elem, mask_len) = + bx.vector_element_type_and_length(llty).expect("mask was not a vector"); + let mask = shift_mask_val(bx, element, mask_elem, invert); + bx.vector_splat(mask_len, mask) + } else { + bug!("shift_mask_val: expected Integer or Vector, found {llty:?}") } } diff --git a/compiler/rustc_codegen_ssa/src/mir/rvalue.rs b/compiler/rustc_codegen_ssa/src/mir/rvalue.rs index 622d205d68268..6ddd44e030238 100644 --- a/compiler/rustc_codegen_ssa/src/mir/rvalue.rs +++ b/compiler/rustc_codegen_ssa/src/mir/rvalue.rs @@ -1,4 +1,5 @@ use std::assert_matches; +use std::cmp::Ordering; use itertools::Itertools as _; use rustc_abi::{self as abi, BackendRepr, FIRST_VARIANT}; @@ -14,7 +15,7 @@ use tracing::{debug, instrument}; use super::FunctionCx; use super::operand::{OperandRef, OperandRefBuilder, OperandValue}; use super::place::{PlaceRef, PlaceValue, codegen_tag_value}; -use crate::common::{IntPredicate, TypeKind}; +use crate::common::IntPredicate; use crate::traits::*; use crate::{MemFlags, base}; @@ -464,17 +465,11 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { imm = match (from_scalar.primitive(), to_scalar.primitive()) { (Int(_, is_signed), Int(..)) => bx.intcast(imm, to_backend_ty, is_signed), - (Float(_), Float(_)) => { - let srcsz = bx.cx().float_width(from_backend_ty); - let dstsz = bx.cx().float_width(to_backend_ty); - if dstsz > srcsz { - bx.fpext(imm, to_backend_ty) - } else if srcsz > dstsz { - bx.fptrunc(imm, to_backend_ty) - } else { - imm - } - } + (Float(src), Float(dst)) => match dst.size().cmp(&src.size()) { + Ordering::Greater => bx.fpext(imm, to_backend_ty), + Ordering::Less => bx.fptrunc(imm, to_backend_ty), + Ordering::Equal => imm, + }, (Int(_, is_signed), Float(_)) => { if is_signed { bx.sitofp(imm, to_backend_ty) @@ -1093,9 +1088,8 @@ pub(super) fn transmute_scalar<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>( ) -> Bx::Value { assert_eq!(from_scalar.size(bx.cx()), to_scalar.size(bx.cx())); let imm_ty = bx.cx().val_ty(imm); - assert_ne!( - bx.cx().type_kind(imm_ty), - TypeKind::Vector, + assert!( + bx.cx().vector_element_type(imm_ty).is_none(), "Vector type {imm_ty:?} not allowed in transmute_scalar {from_scalar:?} -> {to_scalar:?}" ); diff --git a/compiler/rustc_codegen_ssa/src/traits/builder.rs b/compiler/rustc_codegen_ssa/src/traits/builder.rs index 203274ccbb9fb..64f5e5f263110 100644 --- a/compiler/rustc_codegen_ssa/src/traits/builder.rs +++ b/compiler/rustc_codegen_ssa/src/traits/builder.rs @@ -1,4 +1,3 @@ -use std::assert_matches; use std::ops::Deref; use rustc_abi::{Align, Scalar, Size, WrappingRange}; @@ -23,7 +22,7 @@ use super::misc::MiscCodegenMethods; use super::type_::{ArgAbiBuilderMethods, BaseTypeCodegenMethods, LayoutTypeCodegenMethods}; use super::{CodegenMethods, StaticBuilderMethods}; use crate::MemFlags; -use crate::common::{AtomicRmwBinOp, IntPredicate, RealPredicate, SynchronizationScope, TypeKind}; +use crate::common::{AtomicRmwBinOp, IntPredicate, RealPredicate, SynchronizationScope}; use crate::mir::operand::{OperandRef, OperandValue}; use crate::mir::place::{PlaceRef, PlaceValue}; @@ -406,18 +405,15 @@ pub trait BuilderMethods<'a, 'tcx>: dest_ty: Self::Type, ) -> Self::Value { let in_ty = self.cx().val_ty(x); - let (float_ty, int_ty) = if self.cx().type_kind(dest_ty) == TypeKind::Vector - && self.cx().type_kind(in_ty) == TypeKind::Vector + let (float_ty, int_ty) = if let Some(dest_ty) = self.cx().vector_element_type(dest_ty) + && let Some(in_ty) = self.cx().vector_element_type(in_ty) { - (self.cx().element_type(in_ty), self.cx().element_type(dest_ty)) + (in_ty, dest_ty) } else { (in_ty, dest_ty) }; - assert_matches!( - self.cx().type_kind(float_ty), - TypeKind::Half | TypeKind::Float | TypeKind::Double | TypeKind::FP128 - ); - assert_eq!(self.cx().type_kind(int_ty), TypeKind::Integer); + assert!(self.cx().float_type(float_ty).is_some_and(|f| f.is_ieee())); + assert!(self.cx().int_width(int_ty).is_some()); if signed { self.fptosi_sat(x, dest_ty) } else { self.fptoui_sat(x, dest_ty) } } @@ -585,7 +581,7 @@ pub trait BuilderMethods<'a, 'tcx>: fn va_arg(&mut self, list: Self::Value, ty: Self::Type) -> Self::Value; fn extract_element(&mut self, vec: Self::Value, idx: Self::Value) -> Self::Value; - fn vector_splat(&mut self, num_elts: usize, elt: Self::Value) -> Self::Value; + fn vector_splat(&mut self, num_elts: u64, elt: Self::Value) -> Self::Value; fn extract_value(&mut self, agg_val: Self::Value, idx: u64) -> Self::Value; fn insert_value(&mut self, agg_val: Self::Value, elt: Self::Value, idx: u64) -> Self::Value; diff --git a/compiler/rustc_codegen_ssa/src/traits/type_.rs b/compiler/rustc_codegen_ssa/src/traits/type_.rs index 11dad80fb3417..549a58cd74ec5 100644 --- a/compiler/rustc_codegen_ssa/src/traits/type_.rs +++ b/compiler/rustc_codegen_ssa/src/traits/type_.rs @@ -6,7 +6,6 @@ use rustc_target::callconv::{ArgAbi, CastTarget, FnAbi}; use super::BackendTypes; use super::misc::MiscCodegenMethods; -use crate::common::TypeKind; use crate::mir::place::PlaceRef; pub trait BaseTypeCodegenMethods: BackendTypes { @@ -25,18 +24,27 @@ pub trait BaseTypeCodegenMethods: BackendTypes { fn type_ppcf128(&self) -> Self::Type; fn type_func(&self, args: &[Self::Type], ret: Self::Type) -> Self::FunctionSignature; - fn type_kind(&self, ty: Self::Type) -> TypeKind; fn type_ptr(&self) -> Self::Type; fn type_ptr_ext(&self, address_space: AddressSpace) -> Self::Type; - fn element_type(&self, ty: Self::Type) -> Self::Type; - /// Returns the number of elements in `self` if it is an LLVM vector type. - fn vector_length(&self, ty: Self::Type) -> usize; + /// Returns the element type of `ty` if it is a vector type, otherwise returns `None`. + fn vector_element_type(&self, ty: Self::Type) -> Option { + self.vector_element_type_and_length(ty).map(|(elem, _)| elem) + } + /// Returns the number of elements in `ty` if it is a vector type, otherwise returns `None`. + fn vector_length(&self, ty: Self::Type) -> Option { + self.vector_element_type_and_length(ty).map(|(_, len)| len) + } + /// Returns the tuple (element_type, length) of `ty` if it is a vector type, otherwise returns + /// `None`. + fn vector_element_type_and_length(&self, ty: Self::Type) -> Option<(Self::Type, u64)>; - fn float_width(&self, ty: Self::Type) -> usize; + /// Retrieves the scalar float type of `ty`. Returns `None` is `ty` is not a float. + fn float_type(&self, ty: Self::Type) -> Option; - /// Retrieves the bit width of the integer type `self`. - fn int_width(&self, ty: Self::Type) -> u64; + /// Retrieves the bit width of the scalar integer type `ty`. Returns `None` is `ty` is not an + /// integer. + fn int_width(&self, ty: Self::Type) -> Option; fn val_ty(&self, v: Self::Value) -> Self::Type; } diff --git a/compiler/rustc_const_eval/src/interpret/call.rs b/compiler/rustc_const_eval/src/interpret/call.rs index 27239ce58a9ea..4627d4cba28f5 100644 --- a/compiler/rustc_const_eval/src/interpret/call.rs +++ b/compiler/rustc_const_eval/src/interpret/call.rs @@ -389,7 +389,10 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { if self.layout_compat(caller_abi.layout, callee_abi.layout)? { // Ensure that our checks imply actual ABI compatibility for this concrete call. // (This can fail e.g. if `#[rustc_nonnull_optimization_guaranteed]` is used incorrectly.) - assert!(caller_abi.eq_abi(callee_abi)); + assert!( + caller_abi.eq_abi(callee_abi), + "these types were deemed ABI-compatible but do not actually have compatible `FnAbi`:\ncaller: {caller_abi:#?}\ncallee: {callee_abi:#?}" + ); interp_ok(true) } else { trace!( diff --git a/compiler/rustc_feature/src/builtin_attrs.rs b/compiler/rustc_feature/src/builtin_attrs.rs index 4b2c1ff13160b..ef508881e9d4c 100644 --- a/compiler/rustc_feature/src/builtin_attrs.rs +++ b/compiler/rustc_feature/src/builtin_attrs.rs @@ -233,6 +233,10 @@ pub static BUILTIN_ATTRIBUTES: &[Symbol] = &[ // - https://github.com/rust-lang/rust/issues/157081 sym::instrument_fn, + // The attribute is part of feature `checked_type_aliases`. Its name is but a placeholder. + // FIXME(#134963): Temporarily prefixed with `rustc_` to prevent potential name resolution ambiguities. + sym::rustc_unchecked_type_alias, + // ========================================================================== // Internal attributes: Stability, deprecation, and unsafe: // ========================================================================== diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs index f6f1a5815a436..468a13ad4fd61 100644 --- a/compiler/rustc_feature/src/unstable.rs +++ b/compiler/rustc_feature/src/unstable.rs @@ -630,6 +630,9 @@ declare_features! ( (unstable, macro_metavar_expr, "1.61.0", Some(83527)), /// Provides a way to concatenate identifiers using metavariable expressions. (unstable, macro_metavar_expr_concat, "1.81.0", Some(124225)), + /// Allows explicitly marking type aliases as unchecked / opting type aliases + /// out of being checked even if `checked_type_aliases` is enabled or they're a TAIT. + (unstable, marked_unchecked_type_aliases, "CURRENT_RUSTC_VERSION", Some(112792)), /// Allows `#[marker]` on certain traits allowing overlapping implementations. (unstable, marker_trait_attr, "1.30.0", Some(29864)), /// Allows additional const parameter types, such as [u8; 10] or user defined types. diff --git a/compiler/rustc_hir_analysis/src/check/wfcheck.rs b/compiler/rustc_hir_analysis/src/check/wfcheck.rs index 110245385c1a7..0e8a6e323086e 100644 --- a/compiler/rustc_hir_analysis/src/check/wfcheck.rs +++ b/compiler/rustc_hir_analysis/src/check/wfcheck.rs @@ -1306,7 +1306,11 @@ pub(super) fn check_const_item<'tcx>( if tcx.is_direct_const(def_id.into()) { if !tcx.features().const_param_ty_unchecked() { wfcx.register_bound( - ObligationCause::new(span, def_id, ObligationCauseCode::ConstParam(item_ty)), + ObligationCause::new( + tcx.ty_span(def_id), + def_id, + ObligationCauseCode::ConstItemTy(item_ty), + ), wfcx.param_env, item_ty, tcx.require_lang_item(LangItem::ConstParamTy, span), diff --git a/compiler/rustc_hir_analysis/src/collect/type_of.rs b/compiler/rustc_hir_analysis/src/collect/type_of.rs index 4beefa905a134..6439a3fb36b4d 100644 --- a/compiler/rustc_hir_analysis/src/collect/type_of.rs +++ b/compiler/rustc_hir_analysis/src/collect/type_of.rs @@ -1,5 +1,6 @@ use core::ops::ControlFlow; +use rustc_attr_ir::find_attr; use rustc_errors::{Applicability, StashKey, Suggestions}; use rustc_hir::def_id::{DefId, LocalDefId}; use rustc_hir::intravisit::Visitor; @@ -570,9 +571,18 @@ fn check_feature_inherent_assoc_ty(tcx: TyCtxt<'_>, span: Span) { pub(crate) fn type_alias_is_checked<'tcx>(tcx: TyCtxt<'tcx>, def_id: LocalDefId) -> bool { use hir::intravisit::Visitor; + + // FIXME(checked_type_aliases, type_alias_impl_trait): + // Should `#[rustc_unchecked_type_alias] type Tait = impl Trait;` + // actually be legal or is it beyond borked? + if find_attr!(tcx, def_id, UncheckedTypeAlias) { + return false; + } + if tcx.features().checked_type_aliases() { return true; } + struct HasTait; impl<'tcx> Visitor<'tcx> for HasTait { type Result = ControlFlow<()>; @@ -584,5 +594,7 @@ pub(crate) fn type_alias_is_checked<'tcx>(tcx: TyCtxt<'tcx>, def_id: LocalDefId) } } } - HasTait.visit_ty_unambig(tcx.hir_expect_item(def_id).expect_ty_alias().2).is_break() + + let (_ident, _generics, ty) = tcx.hir_expect_item(def_id).expect_ty_alias(); + HasTait.visit_ty_unambig(ty).is_break() } diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs index 0f4118467ec45..9aa7b67f39b0d 100644 --- a/compiler/rustc_lint/src/builtin.rs +++ b/compiler/rustc_lint/src/builtin.rs @@ -1272,7 +1272,7 @@ impl TypeAliasBounds { } impl<'tcx> LateLintPass<'tcx> for TypeAliasBounds { - fn check_item(&mut self, cx: &LateContext<'_>, item: &hir::Item<'_>) { + fn check_item(&mut self, cx: &LateContext<'tcx>, item: &hir::Item<'tcx>) { let hir::ItemKind::TyAlias(_, generics, hir_ty) = item.kind else { return }; // There must not be a where clause. @@ -1316,7 +1316,6 @@ impl<'tcx> LateLintPass<'tcx> for TypeAliasBounds { } let mut ty = Some(hir_ty); - let enable_feat_help = cx.tcx.sess.is_nightly_build(); if let [.., label_sp] = *where_spans { cx.emit_span_lint( @@ -1325,10 +1324,11 @@ impl<'tcx> LateLintPass<'tcx> for TypeAliasBounds { BuiltinTypeAliasBounds { in_where_clause: true, label: label_sp, - enable_feat_help, suggestions: vec![(generics.where_clause_span, String::new())], + def_id: item.owner_id.def_id, preds: generics.predicates, ty: ty.take(), + tcx: cx.tcx, }, ); } @@ -1339,10 +1339,11 @@ impl<'tcx> LateLintPass<'tcx> for TypeAliasBounds { BuiltinTypeAliasBounds { in_where_clause: false, label: label_sp, - enable_feat_help, suggestions: inline_sugg, + def_id: item.owner_id.def_id, preds: generics.predicates, ty, + tcx: cx.tcx, }, ); } diff --git a/compiler/rustc_lint/src/diagnostics.rs b/compiler/rustc_lint/src/diagnostics.rs index 6273414e9ccda..0f1d127b9d1b5 100644 --- a/compiler/rustc_lint/src/diagnostics.rs +++ b/compiler/rustc_lint/src/diagnostics.rs @@ -1,6 +1,7 @@ // ignore-tidy-file-filelength use std::num::NonZero; +use rustc_attr_ir::find_attr; use rustc_data_structures::fx::FxIndexMap; use rustc_errors::codes::*; use rustc_errors::formatting::DiagMessageAddArg; @@ -9,7 +10,7 @@ use rustc_errors::{ Subdiagnostic, SuggestionStyle, msg, }; use rustc_hir as hir; -use rustc_hir::def_id::DefId; +use rustc_hir::def_id::{DefId, LocalDefId}; use rustc_hir::intravisit::Visitor; use rustc_macros::{Diagnostic, Subdiagnostic}; use rustc_middle::ty::inhabitedness::InhabitedPredicate; @@ -384,33 +385,47 @@ pub(crate) struct MacroExprFragment2024 { pub suggestion: Span, } -pub(crate) struct BuiltinTypeAliasBounds<'hir> { +pub(crate) struct BuiltinTypeAliasBounds<'tcx> { pub in_where_clause: bool, pub label: Span, - pub enable_feat_help: bool, pub suggestions: Vec<(Span, String)>, - pub preds: &'hir [hir::WherePredicate<'hir>], - pub ty: Option<&'hir hir::Ty<'hir>>, + + pub def_id: LocalDefId, + pub preds: &'tcx [hir::WherePredicate<'tcx>], + pub ty: Option<&'tcx hir::Ty<'tcx>>, + pub tcx: TyCtxt<'tcx>, } impl<'a> Diagnostic<'a> for BuiltinTypeAliasBounds<'_> { fn into_diag(self, dcx: DiagCtxtHandle<'a>, level: Level) -> Diag<'a> { - let mut diag = Diag::new(dcx, level, if self.in_where_clause { - msg!("where clauses on type aliases are not enforced") + // We perform various checks (i.e., query calls & the walk) in here instead of in + // `` to avoid doing throwaway work in case the lint + // ends up getting suppressed. + + let is_marked = find_attr!(self.tcx, self.def_id, UncheckedTypeAlias); + + let kind = if is_marked { "unchecked " } else { "" }; + let msg = if self.in_where_clause { + format!("where clauses on {kind}type aliases are not enforced") } else { - msg!("bounds on generic parameters in type aliases are not enforced") - }) - .with_span_label(self.label, msg!("will not be checked at usage sites of the type alias")) - .with_note(msg!( + format!("bounds on generic parameters in {kind}type aliases are not enforced") + }; + + let mut diag = Diag::new(dcx, level, msg).with_span_label( + self.label, + msg!("will not be checked at usage sites of the type alias"), + ); + + if !is_marked { + diag.note(msg!( "this is a known limitation of the type checker that may be lifted in a future edition. see issue #112792 for more information" )); - if self.enable_feat_help { - diag.help(msg!("add `#![feature(checked_type_aliases)]` to the crate attributes to enable the desired semantics")); + if self.tcx.sess.is_nightly_build() { + diag.help(msg!("add `#![feature(checked_type_aliases)]` to the crate attributes to enable the desired semantics")); + } } - // We perform the walk in here instead of in `` to - // avoid doing throwaway work in case the lint ends up getting suppressed. let mut collector = ShorthandAssocTyCollector { qselves: Vec::new() }; if let Some(ty) = self.ty { collector.visit_ty_unambig(ty); @@ -3251,3 +3266,15 @@ pub(crate) enum RawBorrowViaReferenceSuggestion<'a> { "or, if `GenericTypeVisitable` is derived, check whether all fields implement `GenericTypeVisitable`" )] pub(crate) struct MissingGenericTypeVisitableDeriveDiag; + +#[derive(Diagnostic)] +#[diag("unchecked type alias lacks attribute `#[rustc_unchecked_type_alias]`")] +pub(crate) struct UnmarkedUncheckedTypeAlias { + #[suggestion( + "annotate the type alias with `#[rustc_unchecked_type_alias]`", + code = "{padding}#[rustc_unchecked_type_alias]\n", + applicability = "machine-applicable" + )] + pub sugg: Span, + pub padding: String, +} diff --git a/compiler/rustc_lint/src/lib.rs b/compiler/rustc_lint/src/lib.rs index e144285553188..97c500ba74cee 100644 --- a/compiler/rustc_lint/src/lib.rs +++ b/compiler/rustc_lint/src/lib.rs @@ -79,6 +79,7 @@ mod traits; mod transmute; mod types; mod unit_bindings; +mod unmarked_unchecked_type_aliases; mod unqualified_local_imports; pub mod unused; mod utils; @@ -131,6 +132,7 @@ use traits::*; use transmute::CheckTransmutes; use types::*; use unit_bindings::*; +use unmarked_unchecked_type_aliases::UnmarkedUncheckedTypeAliases; use unqualified_local_imports::*; use unused::must_use::*; use unused::*; @@ -277,6 +279,7 @@ late_lint_methods!( TypeLimits: TypeLimits::new(), UngatedAsyncFnTrackCaller: UngatedAsyncFnTrackCaller, UnitBindings: UnitBindings, + UnmarkedUncheckedTypeAliases: UnmarkedUncheckedTypeAliases, UnqualifiedLocalImports: UnqualifiedLocalImports, // Depends on effective visibilities UnreachablePub: UnreachablePub, diff --git a/compiler/rustc_lint/src/unmarked_unchecked_type_aliases.rs b/compiler/rustc_lint/src/unmarked_unchecked_type_aliases.rs new file mode 100644 index 0000000000000..286e7f9316ce1 --- /dev/null +++ b/compiler/rustc_lint/src/unmarked_unchecked_type_aliases.rs @@ -0,0 +1,67 @@ +use rustc_attr_ir::find_attr; +use rustc_hir as hir; +use rustc_lint_defs::{declare_lint, declare_lint_pass, fcw}; + +use crate::LintContext as _; +use crate::diagnostics::UnmarkedUncheckedTypeAlias; + +declare_lint! { + /// The `unmarked_unchecked_type_aliases` lint suggests annotating unchecked type aliases with + /// attribute `#[rustc_unchecked_type_alias]`. + /// + /// ### Example + /// + #[cfg_attr(bootstrap, doc = "```rust,ignore")] + #[cfg_attr(not(bootstrap), doc = "```rust")] + /// #![feature(marked_unchecked_type_aliases)] + /// #![warn(unmarked_unchecked_type_aliases)] + /// + /// type Alias = [(); panic!()]; + #[cfg_attr(bootstrap, doc = "```")] + #[cfg_attr(not(bootstrap), doc = "```")] + /// + /// {{produces}} + /// + /// ### Explanation + /// + /// + pub UNMARKED_UNCHECKED_TYPE_ALIASES, + Allow, + "suggest adding `#[rustc_unchecked_type_aliases]` to unchecked type aliases", + @feature_gate = marked_unchecked_type_aliases; + @future_incompatible = FutureIncompatibleInfo { + // FIXME(checked_type_aliases): The generated URL obviously points to nothing which is fine + // for now. However, once a proper edition has been assigned to us, actually write a + // chapter in the edition guide. + reason: fcw!(EditionSemanticsChange future "checked-type-aliases"), + }; +} + +declare_lint_pass!(UnmarkedUncheckedTypeAliases => [UNMARKED_UNCHECKED_TYPE_ALIASES]); + +impl<'tcx> crate::LateLintPass<'tcx> for UnmarkedUncheckedTypeAliases { + fn check_item(&mut self, cx: &crate::LateContext<'tcx>, item: &'tcx hir::Item<'tcx>) { + let hir::ItemKind::TyAlias(..) = item.kind else { return }; + + let def_id = item.owner_id.to_def_id(); + + if cx.tcx.type_alias_is_checked(def_id) || find_attr!(cx.tcx, def_id, UncheckedTypeAlias) { + return; + } + + // FIXME(checked_type_aliases): Employ a lot more sophisticated checks to figure out if the + // implicitly unchecked type alias can become a checked type alias without breaking the + // definition site or any usage sites. + + let item_lo = item.span.shrink_to_lo(); + + cx.emit_span_lint( + UNMARKED_UNCHECKED_TYPE_ALIASES, + cx.tcx.def_span(def_id), + UnmarkedUncheckedTypeAlias { + sugg: item_lo, + padding: cx.tcx.sess.source_map().indentation_before(item_lo).unwrap_or_default(), + }, + ); + } +} diff --git a/compiler/rustc_lint_defs/src/lib.rs b/compiler/rustc_lint_defs/src/lib.rs index c477bc9a34619..5e7b417ef68a4 100644 --- a/compiler/rustc_lint_defs/src/lib.rs +++ b/compiler/rustc_lint_defs/src/lib.rs @@ -769,7 +769,7 @@ macro_rules! declare_lint_pass { #[macro_export] macro_rules! fcw { (FutureReleaseError # $issue_number: literal) => { - $crate:: FutureIncompatibilityReason::FutureReleaseError($crate::ReleaseFcw { issue_number: $issue_number }) + $crate::FutureIncompatibilityReason::FutureReleaseError($crate::ReleaseFcw { issue_number: $issue_number }) }; (FutureReleaseSemanticsChange # $issue_number: literal) => { $crate::FutureIncompatibilityReason::FutureReleaseSemanticsChange($crate::ReleaseFcw { @@ -805,13 +805,8 @@ macro_rules! fcw { page_slug: $page_slug, }) }; - (@edition 2024) => { - rustc_span::edition::Edition::Edition2024 - }; - (@edition 2021) => { - rustc_span::edition::Edition::Edition2021 - }; - (@edition 2018) => { - rustc_span::edition::Edition::Edition2018 - }; + (@edition future) => { rustc_span::edition::Edition::EditionFuture }; + (@edition 2024) => { rustc_span::edition::Edition::Edition2024 }; + (@edition 2021) => { rustc_span::edition::Edition::Edition2021 }; + (@edition 2018) => { rustc_span::edition::Edition::Edition2018 }; } diff --git a/compiler/rustc_middle/src/mir/terminator.rs b/compiler/rustc_middle/src/mir/terminator.rs index c4e6a3089ae9b..0151a8272811d 100644 --- a/compiler/rustc_middle/src/mir/terminator.rs +++ b/compiler/rustc_middle/src/mir/terminator.rs @@ -103,7 +103,13 @@ impl SwitchTargets { /// Returns true if all targets (including the fallback target) are distinct. #[inline] pub fn is_distinct(&self) -> bool { - self.targets.iter().collect::>().len() == self.targets.len() + match self.targets.as_slice() { + // ~95% of cases in our benchmark suite are 2 or 3 targets, + // Avoid allocating the HashSet for those. + &[a, b] => a != b, + &[a, b, c] => a != b && a != c && b != c, + targets => targets.iter().collect::>().len() == targets.len(), + } } } diff --git a/compiler/rustc_middle/src/queries.rs b/compiler/rustc_middle/src/queries.rs index 56889f84f38d6..71559378c51d3 100644 --- a/compiler/rustc_middle/src/queries.rs +++ b/compiler/rustc_middle/src/queries.rs @@ -1608,7 +1608,7 @@ rustc_queries! { desc { "finding all vtable entries for trait `{}`", tcx.def_path_str(key.def_id) } } - query first_method_vtable_slot(key: ty::TraitRef<'tcx>) -> usize { + query first_method_vtable_slot(key: ty::TraitRef<'tcx>) -> Option { desc { "finding the slot within the vtable of `{}` for the implementation of `{}`", key.self_ty(), key.print_only_trait_name() } } diff --git a/compiler/rustc_middle/src/traits/mod.rs b/compiler/rustc_middle/src/traits/mod.rs index 7c4c2d5aed157..15a6ac8597aed 100644 --- a/compiler/rustc_middle/src/traits/mod.rs +++ b/compiler/rustc_middle/src/traits/mod.rs @@ -415,6 +415,10 @@ pub enum ObligationCauseCode<'tcx> { /// Requirement for a `const N: Ty` to implement `Ty: ConstParamTy` ConstParam(Ty<'tcx>), + /// Requirement for the type of a const item used in the type system to implement + /// `ConstParamTy`. + ConstItemTy(Ty<'tcx>), + /// Obligations emitted during the normalization of a free type alias. TypeAlias(ObligationCauseCodeHandle<'tcx>, Span, DefId), diff --git a/compiler/rustc_middle/src/ty/context/impl_interner.rs b/compiler/rustc_middle/src/ty/context/impl_interner.rs index e849f3076a9f3..d8fb3ad998cfd 100644 --- a/compiler/rustc_middle/src/ty/context/impl_interner.rs +++ b/compiler/rustc_middle/src/ty/context/impl_interner.rs @@ -160,6 +160,26 @@ impl<'tcx> Interner for TyCtxt<'tcx> { // See trait-system-refactor-initiative#234. } + fn erase_and_anonymize_regions>(self, value: T) -> T { + self.erase_and_anonymize_regions(value) + } + + fn const_eval_resolve_for_typeck( + self, + typing_env: Self::TypingEnv, + ct: ty::AliasConst<'tcx>, + span: Self::Span, + ) -> ty::ConstEvalResult { + use crate::mir::interpret::ErrorHandled; + + match self.const_eval_resolve_for_typeck(typing_env, ct, span) { + Ok(Ok(vt)) => Ok(vt), + Ok(Err(ty)) => Err(ty::ConstEvalErr::NonValtreeable(ty)), + Err(ErrorHandled::Reported(e, _)) => Err(ty::ConstEvalErr::Reported(e.into())), + Err(ErrorHandled::TooGeneric(_)) => Err(ty::ConstEvalErr::TooGeneric), + } + } + fn expand_abstract_consts>>(self, t: T) -> T { self.expand_abstract_consts(t) } @@ -211,6 +231,10 @@ impl<'tcx> Interner for TyCtxt<'tcx> { } } + fn anon_const_kind(self, def_id: DefId) -> ty::AnonConstKind { + self.anon_const_kind(def_id) + } + fn def_span(self, def_id: DefId) -> Span { self.def_span(def_id) } diff --git a/compiler/rustc_middle/src/ty/mod.rs b/compiler/rustc_middle/src/ty/mod.rs index ac28bd4b58ed3..ede53b0bcff0e 100644 --- a/compiler/rustc_middle/src/ty/mod.rs +++ b/compiler/rustc_middle/src/ty/mod.rs @@ -1119,6 +1119,10 @@ impl<'tcx> rustc_type_ir::inherent::TypingEnv> for TypingEnv<'tcx> .unwrap_or_else(|e| panic!("could not compute layout for {ty:?}: {e:?}")) .size } + + fn post_analysis(tcx: TyCtxt<'tcx>, def_id: DefId) -> TypingEnv<'tcx> { + Self::post_analysis(tcx, def_id) + } } impl<'tcx> TypingEnv<'tcx> { diff --git a/compiler/rustc_next_trait_solver/src/delegate.rs b/compiler/rustc_next_trait_solver/src/delegate.rs index 7c4470efa082b..082b79112947b 100644 --- a/compiler/rustc_next_trait_solver/src/delegate.rs +++ b/compiler/rustc_next_trait_solver/src/delegate.rs @@ -56,6 +56,9 @@ pub trait SolverDelegate: Deref + Sized { // FIXME: Uplift the leak check into this crate. fn leak_check(&self, max_input_universe: ty::UniverseIndex) -> Result<(), NoSolution>; + /// FIXME: Only used in `evaluate_const` on `EvalCtxt` to delegate evaluation of GCE consts and + /// should be removed once GCE is gone. + /// /// Evaluate a const, normalizing the type of the resulting value with `normalize_ty`. /// Returns `Ok(None)` if the const is too generic, and `Err(_)` only if `normalize_ty` /// failed. diff --git a/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs b/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs index ba70ebb27540f..16d8289fc9b2d 100644 --- a/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs +++ b/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs @@ -1495,47 +1495,132 @@ where Ok(()) } - // Try to evaluate a const and normalize the type of the resulting value, or return `None` if - // the const is too generic. This doesn't mean the const isn't evaluatable, though, and should - // be treated as an ambiguity rather than no-solution. + // Try to evaluate a const and normalize the type of the resulting value and make a response. pub(super) fn evaluate_const( - &mut self, - param_env: I::ParamEnv, - alias_const: ty::AliasConst, - ) -> Result>, NoSolutionOrRerunNonErased> { - if self.typing_mode().is_erased_not_coherence() { - let resolved = self.deeply_resolve_ignoring_regions(alias_const); - // FIXME: get rid of this once GCE is removed - let is_gce = self.cx().features().generic_const_exprs(); - if resolved.has_opaque_types() || is_gce { - match self.opaque_accesses.rerun_always(RerunReason::EvaluateConst)? {} - } - } - - self.delegate.evaluate_const(param_env, alias_const, |ty| self.normalize(param_env, ty)) - } - - pub(super) fn evaluate_const_and_instantiate_projection_term( &mut self, param_env: I::ParamEnv, projection_term: ty::AliasTerm, expected_term: I::Term, alias_const: ty::AliasConst, ) -> QueryResultOrRerunNonErased { - match self.evaluate_const(param_env, alias_const)? { + let alias_const = self.deeply_resolve_ignoring_regions(alias_const); + let cx = self.cx(); + + // FIXME: get rid of this once GCE is removed + let is_gce = cx.features().generic_const_exprs(); + + if self.typing_mode().is_erased_not_coherence() + && (alias_const.has_opaque_types() || is_gce) + { + match self.opaque_accesses.rerun_always(RerunReason::EvaluateConst)? {} + } + + let evaluated_const = if is_gce { + self.delegate + .evaluate_const(param_env, alias_const, |ty| self.normalize(param_env, ty))? + } else { + // Postpone evaluation of constants that depend on generic parameters or + // inference variables. + // + // We use `TypingMode::PostAnalysis` here which is not *technically* correct + // to be revealing opaque types here as borrowcheck has not run yet. However, + // CTFE itself uses `TypingMode::PostAnalysis` unconditionally even during + // typeck and not doing so has a lot of (undesirable) fallout (#101478, #119821). + // As a result we always use a revealed env when resolving the instance to evaluate. + // + // FIXME: `const_eval_resolve_for_typeck` should probably just modify the env itself + // instead of having this logic here + let evaluation_input = match alias_const.kind { + // Generic params are allowed in `AnonConstKind::RepeatExprCount` for backcompat + // reasons as long as evaluation doesn't rely on them to succeed. + ty::AliasConstKind::Anon { def_id } + if matches!( + cx.anon_const_kind(def_id.into()), + ty::AnonConstKind::RepeatExprCount + ) => + { + if alias_const.has_non_region_infer() { + // Diagnostics will sometimes replace the identity args of anon consts in + // array repeat expr counts with inference variables so we have to handle this + // even though it is not something we should ever actually encounter. + // + // Array repeat expr counts are allowed to syntactically use generic parameters + // but must not actually depend on them in order to evalaute successfully. This means + // that it is actually fine to evalaute them in their own environment rather than with + // the actually provided generic arguments. + cx.delay_bug("AnonConst with infer args but no error reported"); + } + + // The generic args of repeat expr counts under `min_const_generics` are not supposed to + // affect evaluation of the constant as this would make it a "truly" generic const arg. + // To prevent this we discard all the generic arguments and evalaute with identity args + // and in its own environment instead of the current environment we are normalizing in. + let args = GenericArgs::identity_for_item(cx, def_id.into()); + let typing_env = TypingEnv::post_analysis(cx, def_id.into()); + + Ok((typing_env, args)) + } + _ => { + // We are only dealing with "truly" generic/uninferred constants here: + // - GCEConsts have been handled separately + // - Repeat expr count back compat consts have also been handled separately + // So we are free to simply defer evaluation here. + // + // FIXME: This assumes that `args` are normalized which is not necessarily true + // + // Const patterns are converted to type system constants before being + // evaluated. However, we don't care about them here as pattern evaluation + // logic does not go through type system normalization. If it did this would + // be a backwards compatibility problem as we do not enforce "syntactic" non- + // usage of generic parameters like we do here. + if alias_const.args.has_non_region_param() + || alias_const.args.has_non_region_placeholders() + || alias_const.args.has_non_region_infer() + { + Err(ty::ConstEvalErr::TooGeneric) + } else { + // Since there is no generic parameter, we can just drop the environment + // to prevent query cycle. + let typing_env = TypingEnv::fully_monomorphized(); + let args = alias_const.args; + + Ok((typing_env, args)) + } + } + }; + + // FIXME: `def_span` will point at the definition of this const; ideally, we'd point at + // where it gets used as a const generic. + let span = alias_const.kind.def_span(cx); + + let evaluated = evaluation_input.and_then(|(typing_env, args)| { + let alias_const = ty::AliasConst::new(cx, alias_const.kind, args); + let erased_alias_const = cx.erase_and_anonymize_regions(alias_const); + cx.const_eval_resolve_for_typeck(typing_env, erased_alias_const, span) + }); + + match evaluated { + Ok(val) => { + let ty = self.normalize(param_env, alias_const.type_of(cx))?; + Some(Const::new(cx, ty::ConstKind::Value(ValueConst::new(ty, val)))) + } + + Err(ty::ConstEvalErr::Reported(e)) => Some(Const::new_error(cx, e)), + Err(ty::ConstEvalErr::TooGeneric) => None, + Err(ty::ConstEvalErr::NonValtreeable(_)) => { + cx.delay_bug("Type system constant with non valtree'able type evaluated but no error emitted"); + None + } + } + }; + + match evaluated_const { Some(evaluated) => { self.eq(param_env, expected_term, evaluated.into())?; self.evaluate_added_goals_and_make_canonical_response(Certainty::Yes) } - None if self.cx().features().gca_const_items() => { - // HACK(khyperia): calling `deeply_resolve_ignoring_regions` here shouldn't be necessary, - // `try_evaluate_const` calls `deeply_resolve_ignoring_regions` already. However, we want - // to check `has_non_region_infer` against the type with vars resolved (i.e. check - // if there are vars we failed to resolve), so we need to call it again here. - // Perhaps we could split EvaluateConstErr::HasGenericsOrInfers into HasGenerics and - // HasInfers or something, make evaluate_const return that, and make this branch be - // based on that, rather than checking `has_non_region_infer`. - if self.deeply_resolve_ignoring_regions(alias_const).has_non_region_infer() { + None if cx.features().gca_const_items() => { + if alias_const.has_non_region_infer() { self.evaluate_added_goals_and_make_canonical_response(Certainty::AMBIGUOUS) } else { // Evaluation failed because the const was too generic or was an invalid type @@ -1549,7 +1634,7 @@ where // original DefId on the trait itself. self.eq( param_env, - projection_term.to_term(self.cx(), ty::IsRigid::Yes), + projection_term.to_term(cx, ty::IsRigid::Yes), expected_term, )?; self.evaluate_added_goals_and_make_canonical_response(Certainty::Yes) diff --git a/compiler/rustc_next_trait_solver/src/solve/mod.rs b/compiler/rustc_next_trait_solver/src/solve/mod.rs index 3658a4ed34d9c..4225280ea5b93 100644 --- a/compiler/rustc_next_trait_solver/src/solve/mod.rs +++ b/compiler/rustc_next_trait_solver/src/solve/mod.rs @@ -256,20 +256,9 @@ where self.evaluate_added_goals_and_make_canonical_response(Certainty::AMBIGUOUS) } - ty::ConstKind::Alias(ty::IsRigid::No, alias_const) => { - // We never return `NoSolution` here as `evaluate_const` emits an - // error itself when failing to evaluate, so emitting an additional fulfillment - // error in that case is unnecessary noise. This may change in the future once - // evaluation failures are allowed to impact selection, e.g. generic const - // expressions in impl headers or `where`-clauses. - - // FIXME(generic_const_exprs): Implement handling for generic - // const expressions here. - if let Some(_normalized) = self.evaluate_const(param_env, alias_const)? { - self.evaluate_added_goals_and_make_canonical_response(Certainty::Yes) - } else { - self.evaluate_added_goals_and_make_canonical_response(Certainty::AMBIGUOUS) - } + ty::ConstKind::Alias(ty::IsRigid::No, _) => { + self.normalize(param_env, ty::Unnormalized::new(ct))?; + self.evaluate_added_goals_and_make_canonical_response(Certainty::Yes) } // We can freely ICE here as: diff --git a/compiler/rustc_next_trait_solver/src/solve/normalizes_to.rs b/compiler/rustc_next_trait_solver/src/solve/normalizes_to.rs index 49e5744cfe46c..873c44b402315 100644 --- a/compiler/rustc_next_trait_solver/src/solve/normalizes_to.rs +++ b/compiler/rustc_next_trait_solver/src/solve/normalizes_to.rs @@ -459,7 +459,7 @@ where }, target_args, ); - return ecx.evaluate_const_and_instantiate_projection_term( + return ecx.evaluate_const( goal.param_env, goal.predicate.alias, goal.predicate.term, diff --git a/compiler/rustc_next_trait_solver/src/solve/project_goals/anon_const.rs b/compiler/rustc_next_trait_solver/src/solve/project_goals/anon_const.rs index 5c6e9cc2045c2..59d2dbb136b91 100644 --- a/compiler/rustc_next_trait_solver/src/solve/project_goals/anon_const.rs +++ b/compiler/rustc_next_trait_solver/src/solve/project_goals/anon_const.rs @@ -16,7 +16,7 @@ where goal: Goal>, ) -> QueryResultOrRerunNonErased { let alias_const = goal.predicate.projection_term.expect_ct(); - self.evaluate_const_and_instantiate_projection_term( + self.evaluate_const( goal.param_env, goal.predicate.projection_term, goal.predicate.term, diff --git a/compiler/rustc_next_trait_solver/src/solve/project_goals/free_alias.rs b/compiler/rustc_next_trait_solver/src/solve/project_goals/free_alias.rs index dfcc89b91a4f2..f041001fd0632 100644 --- a/compiler/rustc_next_trait_solver/src/solve/project_goals/free_alias.rs +++ b/compiler/rustc_next_trait_solver/src/solve/project_goals/free_alias.rs @@ -46,7 +46,7 @@ where free.into() } ty::AliasTermKind::FreeConst { .. } => { - return self.evaluate_const_and_instantiate_projection_term( + return self.evaluate_const( goal.param_env, free_alias, goal.predicate.term, diff --git a/compiler/rustc_next_trait_solver/src/solve/project_goals/inherent.rs b/compiler/rustc_next_trait_solver/src/solve/project_goals/inherent.rs index 45ece5a0589fb..c0ef3160ac083 100644 --- a/compiler/rustc_next_trait_solver/src/solve/project_goals/inherent.rs +++ b/compiler/rustc_next_trait_solver/src/solve/project_goals/inherent.rs @@ -64,7 +64,7 @@ where // NOTE: we intentionally pass in the `InherentConstImpl` form as the term to // instantiate to upon too-generic CTFE failure, as we ought to consistently compare // identities via `InherentConstImpl` rather than `InherentConstSelf`. - return self.evaluate_const_and_instantiate_projection_term( + return self.evaluate_const( goal.param_env, term, goal.predicate.term, diff --git a/compiler/rustc_parse/src/diagnostics.rs b/compiler/rustc_parse/src/diagnostics.rs index 6331eb6d499e2..ab220cc56a9e0 100644 --- a/compiler/rustc_parse/src/diagnostics.rs +++ b/compiler/rustc_parse/src/diagnostics.rs @@ -2069,14 +2069,6 @@ pub(crate) struct ExpectedFnPathFoundFnKeyword { pub fn_token_span: Span, } -#[derive(Diagnostic)] -#[diag("`Trait(...)` syntax does not support c_variadic parameters")] -pub(crate) struct PathFoundCVariadicParams { - #[primary_span] - #[suggestion("remove the `...`", applicability = "machine-applicable", code = "")] - pub span: Span, -} - #[derive(Diagnostic)] #[diag("path separator must be a double colon")] pub(crate) struct PathSingleColon { diff --git a/compiler/rustc_parse/src/parser/path.rs b/compiler/rustc_parse/src/parser/path.rs index 738b207ad76ce..d41c9dbb2d4eb 100644 --- a/compiler/rustc_parse/src/parser/path.rs +++ b/compiler/rustc_parse/src/parser/path.rs @@ -15,8 +15,8 @@ use super::ty::{AllowPlus, RecoverQPath, RecoverReturnSign}; use super::{Parser, Restrictions, TokenType}; use crate::ast::{PatKind, TyKind}; use crate::diagnostics::{ - self, ConstGenericWithoutBraces, ConstGenericWithoutBracesSugg, PathFoundCVariadicParams, - PathSingleColon, PathTripleColon, + self, ConstGenericWithoutBraces, ConstGenericWithoutBracesSugg, PathSingleColon, + PathTripleColon, }; use crate::exp; use crate::parser::{CommaRecoveryMode, Expr, FnContext, FnParseMode, RecoverColon, RecoverComma}; @@ -412,7 +412,6 @@ impl<'a> Parser<'a> { snapshot = Some(self.create_snapshot_for_diagnostic()); } - let dcx = self.dcx(); let mut first_param = true; let parse_params_result = self.parse_paren_comma_seq(|p| { // Inside parenthesized type arguments, we want types only, not names. @@ -430,7 +429,9 @@ impl<'a> Parser<'a> { .gate(sym::named_fn_trait_parameters, param.pat.span); } if matches!(param.ty.kind, TyKind::CVarArgs) { - dcx.emit_err(PathFoundCVariadicParams { span: param.pat.span }); + self.psess + .gated_spans + .gate(sym::named_fn_trait_parameters, param.ty.span); } if !param.attrs.is_empty() { self.psess diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs index 17b83d38b18c2..79c84b74b7222 100644 --- a/compiler/rustc_passes/src/check_attr.rs +++ b/compiler/rustc_passes/src/check_attr.rs @@ -191,9 +191,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> { AttributeKind::ProcMacroDerive { .. } => { self.check_proc_macro(hir_id, target, ProcMacroKind::Derive) } - AttributeKind::RustcAllowConstFnUnstable(_, first_span) => { - self.check_rustc_allow_const_fn_unstable(hir_id, *first_span, span, target) - } AttributeKind::MayDangle(attr_span) => self.check_may_dangle(hir_id, *attr_span), AttributeKind::Doc(attr) => self.check_doc_attrs(attr, hir_id, target), AttributeKind::EiiImpl(eii_impl) => self.check_eii_impl(eii_impl), @@ -300,6 +297,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> { AttributeKind::RustcAllocator => (), AttributeKind::RustcAllocatorZeroed => (), AttributeKind::RustcAllocatorZeroedVariant { .. } => (), + AttributeKind::RustcAllowConstFnUnstable(..) => (), AttributeKind::RustcAllowIncoherentImpl(..) => (), AttributeKind::RustcAllowLifetimeDependentSpecialization => (), AttributeKind::RustcAsPtr => (), @@ -383,7 +381,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> { AttributeKind::RustcShowSpans(_) => (), AttributeKind::RustcSimdMonomorphizeLaneLimit(..) => (), AttributeKind::RustcSkipDuringMethodDispatch { .. } => (), - AttributeKind::RustcSpecializationTrait => (), AttributeKind::RustcStdInternalSymbol => (), AttributeKind::RustcStrictCoherence(..) => (), @@ -399,6 +396,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> { AttributeKind::ThreadLocal => (), AttributeKind::TrackCaller(_) => (), AttributeKind::TypeLengthLimit { .. } => (), + AttributeKind::UncheckedTypeAlias => (), AttributeKind::Unroll(..) => (), AttributeKind::UnstableFeatureBound(..) => (), AttributeKind::UnstableRemoved(..) => (), @@ -1099,27 +1097,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> { } } - /// Outputs an error for `#[allow_internal_unstable]` which can only be applied to macros. - /// (Allows proc_macro functions) - fn check_rustc_allow_const_fn_unstable( - &self, - hir_id: HirId, - attr_span: Span, - span: Span, - target: Target, - ) { - match target { - Target::Fn | Target::Method(_) => { - if !self.tcx.is_const_fn(hir_id.expect_owner().to_def_id()) { - self.tcx - .dcx() - .emit_err(diagnostics::RustcAllowConstFnUnstable { attr_span, span }); - } - } - _ => {} - } - } - /// A best effort attempt to create an error for a mismatching proc macro signature. /// /// If this best effort goes wrong, it will just emit a worse error later (see #102923) diff --git a/compiler/rustc_passes/src/diagnostics.rs b/compiler/rustc_passes/src/diagnostics.rs index e090fd0669cd8..107a0363343f0 100644 --- a/compiler/rustc_passes/src/diagnostics.rs +++ b/compiler/rustc_passes/src/diagnostics.rs @@ -126,15 +126,6 @@ pub(crate) struct DebugVisualizerUnreadable<'a> { pub error: Error, } -#[derive(Diagnostic)] -#[diag("attribute should be applied to `const fn`")] -pub(crate) struct RustcAllowConstFnUnstable { - #[primary_span] - pub attr_span: Span, - #[label("not a `const fn`")] - pub span: Span, -} - #[derive(Diagnostic)] #[diag("attribute cannot be applied to a `async`, `gen` or `async gen` function")] pub(crate) struct RustcForceInlineCoro { diff --git a/compiler/rustc_span/src/lib.rs b/compiler/rustc_span/src/lib.rs index 8bf11f1ef3009..03dc07870345a 100644 --- a/compiler/rustc_span/src/lib.rs +++ b/compiler/rustc_span/src/lib.rs @@ -17,7 +17,6 @@ // tidy-alphabetical-start #![allow(internal_features)] -#![cfg_attr(target_arch = "loongarch64", feature(stdarch_loongarch))] #![feature(core_io_borrowed_buf)] #![feature(decl_macro)] #![feature(diagnostic_on_unknown)] diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index 026a576ed68ce..eec3dad3802af 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -1295,6 +1295,7 @@ symbols! { manually_drop, map, map_err, + marked_unchecked_type_aliases, marker, marker_trait_attr, masked, @@ -1908,6 +1909,7 @@ symbols! { rustc_test_marker, rustc_then_this_would_need, rustc_trivial_field_reads, + rustc_unchecked_type_alias, // FIXME(#159429): temporary rename to avoid `#[unroll]` nameres ambiguity rustc_unroll, rustdoc, diff --git a/compiler/rustc_target/src/asm/aarch64.rs b/compiler/rustc_target/src/asm/aarch64.rs index 83d249262c104..4136d1a624588 100644 --- a/compiler/rustc_target/src/asm/aarch64.rs +++ b/compiler/rustc_target/src/asm/aarch64.rs @@ -18,10 +18,21 @@ def_reg_class! { } impl AArch64InlineAsmRegClass { - pub fn valid_modifiers(self, _arch: super::InlineAsmArch) -> &'static [char] { + pub fn valid_modifiers( + self, + _arch: super::InlineAsmArch, + allow_experimental_reg: bool, + ) -> &'static [char] { match self { Self::reg => &['w', 'x'], - Self::vreg | Self::vreg_low16 => &['b', 'h', 's', 'd', 'q', 'v', 'z'], + Self::vreg | Self::vreg_low16 => { + if allow_experimental_reg { + &['b', 'h', 's', 'd', 'q', 'v', 'z'] + } else { + &['b', 'h', 's', 'd', 'q', 'v'] + } + } + Self::preg | Self::ffr => &[], } } diff --git a/compiler/rustc_target/src/asm/mod.rs b/compiler/rustc_target/src/asm/mod.rs index 6f9751e807490..500010dc426f4 100644 --- a/compiler/rustc_target/src/asm/mod.rs +++ b/compiler/rustc_target/src/asm/mod.rs @@ -711,13 +711,19 @@ impl InlineAsmRegClass { }) } - /// Returns the list of template modifiers that can be used with this - /// register class. - pub fn valid_modifiers(self, arch: InlineAsmArch) -> &'static [char] { + /// Returns the list of template modifiers that can be used with this register class, as well as + /// whether the `asm_experimental_reg` feature is enabled: there can be template modifiers that + /// apply to currently unstable registers, and we don't want to make these modifiers usable + /// without the feature gate. + pub fn valid_modifiers( + self, + arch: InlineAsmArch, + allow_experimental_reg: bool, + ) -> &'static [char] { match self { Self::X86(r) => r.valid_modifiers(arch), Self::Arm(r) => r.valid_modifiers(arch), - Self::AArch64(r) => r.valid_modifiers(arch), + Self::AArch64(r) => r.valid_modifiers(arch, allow_experimental_reg), Self::Amdgpu(r) => r.valid_modifiers(arch), Self::RiscV(r) => r.valid_modifiers(arch), Self::Nvptx(r) => r.valid_modifiers(arch), diff --git a/compiler/rustc_target/src/callconv/mod.rs b/compiler/rustc_target/src/callconv/mod.rs index bb9dd84962060..635f4e5b0e226 100644 --- a/compiler/rustc_target/src/callconv/mod.rs +++ b/compiler/rustc_target/src/callconv/mod.rs @@ -613,21 +613,9 @@ impl<'a, Ty> ArgAbi<'a, Ty> { where Ty: PartialEq, { - // Ideally we'd just compare the `mode`, but that is not enough -- for some modes LLVM will look - // at the type. - self.layout.eq_abi(&other.layout) && self.mode.eq_abi(&other.mode) && { - // `fn_arg_sanity_check` accepts `PassMode::Direct` for some aggregates. - // That elevates any type difference to an ABI difference since we just use the - // full Rust type as the LLVM argument/return type. - if matches!(self.mode, PassMode::Direct(..)) - && matches!(self.layout.backend_repr, BackendRepr::Memory { .. }) - { - // For aggregates in `Direct` mode to be compatible, the types need to be equal. - self.layout.ty == other.layout.ty - } else { - true - } - } + // Ideally we'd just compare the `mode`, but that is not enough -- for some modes LLVM will + // look at the type. + self.layout.eq_abi(&other.layout) && self.mode.eq_abi(&other.mode) } } diff --git a/compiler/rustc_target/src/callconv/powerpc.rs b/compiler/rustc_target/src/callconv/powerpc.rs index 1748cbf24c28d..6ccc40719c5bb 100644 --- a/compiler/rustc_target/src/callconv/powerpc.rs +++ b/compiler/rustc_target/src/callconv/powerpc.rs @@ -1,17 +1,44 @@ -use rustc_abi::TyAbiInterface; +use rustc_abi::{BackendRepr, Float, Primitive, Reg, RegKind, TyAbiInterface}; +use rustc_span::bug; -use crate::callconv::{ArgAbi, FnAbi}; -use crate::spec::{Env, HasTargetSpec, Os}; +use crate::callconv::{ArgAbi, CastTarget, FnAbi, Uniform}; +use crate::spec::{Env, HasTargetSpec, Os, RustcAbi}; -fn classify_ret(ret: &mut ArgAbi<'_, Ty>) { - if ret.layout.is_aggregate() { +const NUM_ARG_GPRS: u64 = 8; + +/// How to cast `Complex` so that we match the GCC ABI. +fn complex_cast_target(arg: &ArgAbi<'_, Ty>) -> CastTarget { + let size = arg.layout.size; + + if size.bytes() <= 4 { + // Coerce to an integer for `Complex` and `Complex`. + CastTarget::from(Reg { kind: RegKind::Integer, size }) + } else if size.bytes() == 8 { + // Coerce to a single `i64` for `Complex` and `Complex`, which has the correct + // register alignment of 8 bytes. + CastTarget::from(Reg::i64()) + } else { + // Coerce to an array `[N x i32]` for everything wider. An array of i32 gives the correct + // 4-byte register alignment. + CastTarget::from(Uniform::new(Reg::i32(), size)) + } +} + +fn classify_ret<'a, Ty, C>(cx: &C, ret: &mut ArgAbi<'a, Ty>, gprs_in_use: &mut u64) +where + Ty: TyAbiInterface<'a, C> + Copy, +{ + if ret.layout.is_complex_number(cx) { + ret.cast_to(complex_cast_target(ret)); + } else if ret.layout.is_aggregate() { + *gprs_in_use += 1; ret.make_indirect(); } else { ret.extend_integer_width_to(32); } } -fn classify_arg<'a, Ty, C: HasTargetSpec>(cx: &C, arg: &mut ArgAbi<'a, Ty>) +fn classify_arg<'a, Ty, C: HasTargetSpec>(cx: &C, arg: &mut ArgAbi<'a, Ty>, gprs_in_use: &mut u64) where Ty: TyAbiInterface<'a, C> + Copy, { @@ -21,26 +48,105 @@ where && matches!(cx.target_spec().env, Env::Gnu | Env::Musl | Env::Uclibc) && arg.layout.is_repr_c() { + *gprs_in_use += 1; arg.make_indirect_from_ignore(); } return; } - if arg.layout.pass_indirectly_in_non_rustic_abis(cx) || arg.layout.is_aggregate() { + + // The powerpc ABI in GCC hardcodes a special rule for values of size 8. It remarks + // + // > V.4 wants long longs and doubles to be double word aligned. Just + // > testing the mode size is a boneheaded way to do this as it means + // > that other types such as complex int are also double word aligned. + // > However, we're stuck with this because changing the ABI might break + // > existing library interfaces. + // + // LLVM aligns every value that it splits over multiple GPRs, but a `Complex` is only + // aligned when it is cast to an `i64` (i.e. has a size of exactly 8). + + if arg.layout.is_complex_number(cx) { + let cast_target = complex_cast_target(arg); + + // Complex values are only register aligned when the size is exactly 8. + let is_aligned_pair = arg.layout.size.bytes() == 8; + if is_aligned_pair && !gprs_in_use.is_multiple_of(2) { + *gprs_in_use += 1; + } + + let registers_used = arg.layout.size.bytes().div_ceil(4); + if *gprs_in_use + registers_used > NUM_ARG_GPRS { + let pad_i32_count = u8::try_from(NUM_ARG_GPRS.saturating_sub(*gprs_in_use)).unwrap(); + arg.cast_to_and_pad_i32(cast_target, pad_i32_count); + } else { + arg.cast_to(cast_target); + } + + // A value that does not fit uses up the remaining GPRs. + *gprs_in_use += registers_used; + } else if arg.layout.pass_indirectly_in_non_rustic_abis(cx) || arg.layout.is_aggregate() { + *gprs_in_use += 1; arg.make_indirect(); } else { + if backend_repr_uses_gprs(cx, arg) { + // Other types (i64, i128, etc.) are register aligned when >= 8. + let is_aligned_pair = arg.layout.size.bytes() >= 8; + if is_aligned_pair && !gprs_in_use.is_multiple_of(2) { + *gprs_in_use += 1; + } + + *gprs_in_use += arg.layout.size.bytes().div_ceil(4) + } + arg.extend_integer_width_to(32); } } +/// Are GPRs used to pass this argument (assuming it is passed directly)? +fn backend_repr_uses_gprs<'a, Ty, C: HasTargetSpec>(cx: &C, arg: &ArgAbi<'a, Ty>) -> bool { + let is_softfloat = match cx.target_spec().rustc_abi { + Some(RustcAbi::Softfloat) => bug!("there are currently no powerpc softfloat targets"), + Some(RustcAbi::PowerPcSpe) => true, // SPE is like softfloat in terms of ABI + None => false, + Some(other) => bug!("unexpected powerpc abi {other:?}"), + }; + + match arg.layout.backend_repr { + BackendRepr::ScalarPair { .. } | BackendRepr::SimdScalableVector { .. } => { + bug!("unexpected backend_repr for 32-bit powerpc: {:?}", arg.layout.backend_repr) + } + BackendRepr::Memory { .. } => { + bug!("unexpected backend_repr for PassMode::Direct: {:?}", arg.layout.backend_repr) + } + BackendRepr::Scalar(scalar) => match scalar.primitive() { + Primitive::Float(Float::F32 | Float::F64 | Float::F128 | Float::PpcF128) => { + is_softfloat + } + + _ => true, + }, + BackendRepr::SimdVector { .. } => { + // When vector types are legal, they are passed in vector registers. + false + } + } +} + pub(crate) fn compute_abi_info<'a, Ty, C: HasTargetSpec>(cx: &C, fn_abi: &mut FnAbi<'a, Ty>) where Ty: TyAbiInterface<'a, C> + Copy, { + // Keeps track of how many GPRs are in use so far to pass arguments. This is used to exhaust + // the remaining argument registers when a complex value, that doesn't fit fully in the + // remaining registers, is passed via the stack. Subsequent arguments must then also be passed + // via the stack. + let mut gprs_in_use: u64 = 0; + if !fn_abi.ret.is_ignore() { - classify_ret(&mut fn_abi.ret); + classify_ret(cx, &mut fn_abi.ret, &mut gprs_in_use); } for arg in fn_abi.args.iter_mut() { - classify_arg(cx, arg); + classify_arg(cx, arg, &mut gprs_in_use); } } diff --git a/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs b/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs index 634f139107d97..d8d6daa35698b 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs @@ -134,10 +134,23 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { .emit_err(); } - // Report a const-param specific error - if let ObligationCauseCode::ConstParam(ty) = *obligation.cause.code().peel_derives() - { - return self.report_const_param_not_wf(ty, &obligation).emit_err(); + // Report a `ConstParamTy`-specific error + match *obligation.cause.code().peel_derives() { + ObligationCauseCode::ConstParam(ty) => { + return self + .report_const_param_ty_error( + ty, + self.tcx.ty_span(obligation.cause.body_def_id), + &obligation, + ) + .emit_err(); + } + ObligationCauseCode::ConstItemTy(ty) => { + return self + .report_const_param_ty_error(ty, obligation.cause.span, &obligation) + .emit_err(); + } + _ => {} } let bound_predicate = obligation.predicate.kind(); @@ -1465,14 +1478,12 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { true } - fn report_const_param_not_wf( + fn report_const_param_ty_error( &self, ty: Ty<'tcx>, + span: Span, obligation: &PredicateObligation<'tcx>, ) -> Diag<'a> { - let def_id = obligation.cause.body_def_id; - let span = self.tcx.ty_span(def_id); - let mut file = None; let ty_str = self.tcx.short_string(ty, &mut file); let mut diag = match ty.kind() { diff --git a/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs b/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs index a97effe2eb0fd..565078a929c4a 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs @@ -3916,6 +3916,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { | ObligationCauseCode::AscribeUserTypeProvePredicate(..) | ObligationCauseCode::AlwaysApplicableImpl | ObligationCauseCode::ConstParam(_) + | ObligationCauseCode::ConstItemTy(_) | ObligationCauseCode::ReferenceOutlivesReferent(..) | ObligationCauseCode::ObjectTypeBound(..) => {} ObligationCauseCode::BinOp { lhs_hir_id, rhs_hir_id, .. } => { diff --git a/compiler/rustc_trait_selection/src/traits/vtable.rs b/compiler/rustc_trait_selection/src/traits/vtable.rs index a2de3c2962367..71d26a9131618 100644 --- a/compiler/rustc_trait_selection/src/traits/vtable.rs +++ b/compiler/rustc_trait_selection/src/traits/vtable.rs @@ -309,9 +309,14 @@ fn vtable_entries<'tcx>( // Given a `dyn Subtrait: Supertrait` trait ref, find corresponding first slot // for `Supertrait`'s methods in the vtable of `Subtrait`. -pub(crate) fn first_method_vtable_slot<'tcx>(tcx: TyCtxt<'tcx>, key: ty::TraitRef<'tcx>) -> usize { +// +// Returns `None` if and only if an error was already reported elsewhere. +pub(crate) fn first_method_vtable_slot<'tcx>( + tcx: TyCtxt<'tcx>, + key: ty::TraitRef<'tcx>, +) -> Option { debug_assert!(!key.has_non_region_infer() && !key.has_non_region_param()); - tcx.debug_assert_fully_normalized(ty::TypingEnv::fully_monomorphized(), key); + tcx.assert_fully_normalized(ty::TypingEnv::fully_monomorphized(), key); let ty::Dynamic(source, _) = *key.self_ty().kind() else { bug!(); @@ -324,7 +329,7 @@ pub(crate) fn first_method_vtable_slot<'tcx>(tcx: TyCtxt<'tcx>, key: ty::TraitRe if tcx .instantiate_and_check_impossible_clauses((source_principal.def_id, source_principal.args)) { - return 0; + return Some(0); } let target_principal = ty::ExistentialTraitRef::erase_self_ty(tcx, key); @@ -355,7 +360,15 @@ pub(crate) fn first_method_vtable_slot<'tcx>(tcx: TyCtxt<'tcx>, key: ty::TraitRe } }; - prepare_vtable_segments(tcx, source_principal, vtable_segment_callback).unwrap() + let index = prepare_vtable_segments(tcx, source_principal, vtable_segment_callback); + + if index.is_none() { + // FIXME(lsunsi): investigate if tainting the errors where they happened can ensure we + // don't reach this site at all, or allows us to assert the error happened in the none case. + tcx.dcx().span_delayed_bug(DUMMY_SP, "first method vtable slot = none"); + } + + index } /// Given a `dyn Subtrait` and `dyn Supertrait` trait object, find the slot of diff --git a/compiler/rustc_trait_selection/src/traits/wf.rs b/compiler/rustc_trait_selection/src/traits/wf.rs index 41e6797e71d2d..2c103bb167629 100644 --- a/compiler/rustc_trait_selection/src/traits/wf.rs +++ b/compiler/rustc_trait_selection/src/traits/wf.rs @@ -187,6 +187,13 @@ pub fn clause_obligations<'tcx>( wf.add_wf_preds_for_term(ty.into()); } ty::ClauseKind::Projection(t) => { + if !t.projection_term.kind.is_type() { + assert!(matches!( + t.projection_term.kind, + ty::AliasTermKind::ProjectionConst { .. } + )); + wf.require_const_item_ty(t.projection_term.expect_ct()); + } wf.add_wf_preds_for_projection_term(t.projection_term); wf.add_wf_preds_for_term(t.term); } @@ -572,6 +579,33 @@ impl<'a, 'tcx> WfPredicates<'a, 'tcx> { } } + fn require_const_item_ty(&mut self, ct: ty::AliasConst<'tcx>) { + let ty = ct.type_of(self.tcx()).skip_norm_wip(); + + if ct.kind.is_direct_const(self.tcx()) { + // This is already checked in `wfcheck::check_const_item`. + return; + } + + if self.tcx().features().const_param_ty_unchecked() || ty.has_escaping_bound_vars() { + return; + } + + let cause = self.cause(ObligationCauseCode::ConstItemTy(ty)); + let trait_ref = ty::TraitRef::new( + self.tcx(), + self.tcx().require_lang_item(LangItem::ConstParamTy, cause.span), + [ty], + ); + self.out.push(traits::Obligation::with_depth( + self.tcx(), + cause, + self.recursion_depth, + self.param_env, + ty::Binder::dummy(trait_ref), + )); + } + /// Pushes all the predicates needed to validate that `term` is WF into `out`. #[instrument(level = "debug", skip(self))] fn add_wf_preds_for_term(&mut self, term: Term<'tcx>) { @@ -1028,8 +1062,16 @@ impl<'a, 'tcx> TypeVisitor> for WfPredicates<'a, 'tcx> { if !t.has_escaping_bound_vars() { for projection in data.projection_bounds() { + let projection = projection.with_self_ty(tcx, t); + let projection_pred = projection.skip_binder(); + if matches!( + projection_pred.projection_term.kind, + ty::AliasTermKind::ProjectionConst { .. } + ) { + self.require_const_item_ty(projection_pred.projection_term.expect_ct()); + } + let pred_binder = projection - .with_self_ty(tcx, t) .map_bound(|p| { p.term.as_const().map(|ct| { let assoc_const_ty = tcx diff --git a/compiler/rustc_ty_utils/src/instance.rs b/compiler/rustc_ty_utils/src/instance.rs index 0ded7482bb6c4..3e05ad51ad248 100644 --- a/compiler/rustc_ty_utils/src/instance.rs +++ b/compiler/rustc_ty_utils/src/instance.rs @@ -255,15 +255,17 @@ fn resolve_associated_item<'tcx>( // We only resolve totally substituted vtable entries. None } else { - let vtable_base = tcx.first_method_vtable_slot(trait_ref); - let offset = tcx - .own_existential_vtable_entries(trait_id) - .iter() - .copied() - .position(|def_id| def_id == trait_item_id); - offset.map(|offset| Instance { - def: ty::InstanceKind::Virtual(trait_item_id, vtable_base + offset), - args: rcvr_args, + tcx.first_method_vtable_slot(trait_ref).and_then(|vtable_base| { + let offset = tcx + .own_existential_vtable_entries(trait_id) + .iter() + .copied() + .position(|def_id| def_id == trait_item_id); + + offset.map(|offset| Instance { + def: ty::InstanceKind::Virtual(trait_item_id, vtable_base + offset), + args: rcvr_args, + }) }) } } diff --git a/compiler/rustc_type_ir/src/const_kind.rs b/compiler/rustc_type_ir/src/const_kind.rs index c0cd3160b98ba..c28121df6f3ad 100644 --- a/compiler/rustc_type_ir/src/const_kind.rs +++ b/compiler/rustc_type_ir/src/const_kind.rs @@ -204,6 +204,19 @@ impl StableHash for InferConst { } } +pub type ConstEvalResult = Result<::ValTree, ConstEvalErr>; + +/// Errors from CTFE we care about in next-solver. +#[derive_where(Clone, Copy, Debug; I: Interner)] +pub enum ConstEvalErr { + /// Unsupported type encountered while constructing valtree after evaluation. + NonValtreeable(I::Ty), + /// Already reported error. + Reported(I::ErrorGuaranteed), + /// Too generic or otherwise failed CTFE. + TooGeneric, +} + /// This datastructure is used to represent the value of constants used in the type system. /// /// We explicitly choose a different datastructure from the way values are processed within diff --git a/compiler/rustc_type_ir/src/inherent.rs b/compiler/rustc_type_ir/src/inherent.rs index 4fd92194c5d81..c9fef82be7b9e 100644 --- a/compiler/rustc_type_ir/src/inherent.rs +++ b/compiler/rustc_type_ir/src/inherent.rs @@ -759,4 +759,5 @@ pub trait ScalarInt: Copy + Debug + Hash + Eq { pub trait TypingEnv: Copy + Clone + Debug + PartialEq + Eq + Hash { fn fully_monomorphized() -> Self; fn layout_size(self, interner: I, ty: I::Ty) -> Size; + fn post_analysis(interner: I, def_id: I::DefId) -> Self; } diff --git a/compiler/rustc_type_ir/src/interner.rs b/compiler/rustc_type_ir/src/interner.rs index 159c2939875b0..6780c66183aa1 100644 --- a/compiler/rustc_type_ir/src/interner.rs +++ b/compiler/rustc_type_ir/src/interner.rs @@ -293,6 +293,7 @@ pub trait Interner: self, alias: ty::AliasConstKind, ) -> Option>>; + fn anon_const_kind(self, def_id: Self::DefId) -> ty::AnonConstKind; fn def_span(self, def_id: Self::DefId) -> Self::Span; @@ -352,6 +353,15 @@ pub trait Interner: fn renormalize_rigid_aliases(self) -> bool; + fn erase_and_anonymize_regions>(self, value: T) -> T; + + fn const_eval_resolve_for_typeck( + self, + typing_env: Self::TypingEnv, + ct: ty::AliasConst, + span: Self::Span, + ) -> ty::ConstEvalResult; + fn coroutine_hidden_types( self, def_id: Self::CoroutineId, diff --git a/library/core/src/io/io_slice.rs b/library/core/src/io/io_slice.rs index 17f4fc4da940a..f3582dcd32812 100644 --- a/library/core/src/io/io_slice.rs +++ b/library/core/src/io/io_slice.rs @@ -56,8 +56,9 @@ impl<'a> IoSliceMut<'a> { /// /// Panics on Windows if the slice is larger than 4GB. #[stable(feature = "iovec", since = "1.36.0")] + #[rustc_const_unstable(feature = "io_slice_const", issue = "146459")] #[inline] - pub fn new(buf: &'a mut [u8]) -> IoSliceMut<'a> { + pub const fn new(buf: &'a mut [u8]) -> IoSliceMut<'a> { IoSliceMut(repr::IoSliceMut::new(buf)) } @@ -84,8 +85,9 @@ impl<'a> IoSliceMut<'a> { /// assert_eq!(buf.deref(), [1; 5].as_ref()); /// ``` #[stable(feature = "io_slice_advance", since = "1.81.0")] + #[rustc_const_unstable(feature = "io_slice_const", issue = "146459")] #[inline] - pub fn advance(&mut self, n: usize) { + pub const fn advance(&mut self, n: usize) { self.0.advance(n) } @@ -214,9 +216,10 @@ impl<'a> IoSlice<'a> { /// /// Panics on Windows if the slice is larger than 4GB. #[stable(feature = "iovec", since = "1.36.0")] + #[rustc_const_unstable(feature = "io_slice_const", issue = "146459")] #[must_use] #[inline] - pub fn new(buf: &'a [u8]) -> IoSlice<'a> { + pub const fn new(buf: &'a [u8]) -> IoSlice<'a> { IoSlice(repr::IoSlice::new(buf)) } @@ -243,8 +246,9 @@ impl<'a> IoSlice<'a> { /// assert_eq!(buf.deref(), [1; 5].as_ref()); /// ``` #[stable(feature = "io_slice_advance", since = "1.81.0")] + #[rustc_const_unstable(feature = "io_slice_const", issue = "146459")] #[inline] - pub fn advance(&mut self, n: usize) { + pub const fn advance(&mut self, n: usize) { self.0.advance(n) } diff --git a/library/core/src/io/io_slice/repr_generic.rs b/library/core/src/io/io_slice/repr_generic.rs index fdeb4978aedea..aa6f9d2150c47 100644 --- a/library/core/src/io/io_slice/repr_generic.rs +++ b/library/core/src/io/io_slice/repr_generic.rs @@ -5,13 +5,15 @@ pub(crate) struct IoSlice<'a>(&'a [u8]); impl<'a> IoSlice<'a> { #[inline] - pub(crate) fn new(buf: &'a [u8]) -> IoSlice<'a> { + pub(crate) const fn new(buf: &'a [u8]) -> IoSlice<'a> { IoSlice(buf) } #[inline] - pub(crate) fn advance(&mut self, n: usize) { - self.0 = &self.0[n..] + pub(crate) const fn advance(&mut self, n: usize) { + // FIXME(const-hack): Use `&self.0[n..]` once const. + let (_, remaining) = self.0.split_at(n); + self.0 = remaining; } #[inline] @@ -24,19 +26,20 @@ pub(crate) struct IoSliceMut<'a>(&'a mut [u8]); impl<'a> IoSliceMut<'a> { #[inline] - pub(crate) fn new(buf: &'a mut [u8]) -> IoSliceMut<'a> { + pub(crate) const fn new(buf: &'a mut [u8]) -> IoSliceMut<'a> { IoSliceMut(buf) } #[inline] - pub(crate) fn advance(&mut self, n: usize) { - let slice = mem::take(&mut self.0); + pub(crate) const fn advance(&mut self, n: usize) { + // FIXME(const-hack): Use `mem::take` once const. + let slice = mem::replace(&mut self.0, &mut []); let (_, remaining) = slice.split_at_mut(n); self.0 = remaining; } #[inline] - pub(crate) fn as_slice(&self) -> &[u8] { + pub(crate) const fn as_slice(&self) -> &[u8] { self.0 } @@ -46,7 +49,7 @@ impl<'a> IoSliceMut<'a> { } #[inline] - pub(crate) fn as_mut_slice(&mut self) -> &mut [u8] { + pub(crate) const fn as_mut_slice(&mut self) -> &mut [u8] { self.0 } } diff --git a/library/core/src/io/io_slice/repr_iovec.rs b/library/core/src/io/io_slice/repr_iovec.rs index cd8f5d539ecce..4e101ff0a3a74 100644 --- a/library/core/src/io/io_slice/repr_iovec.rs +++ b/library/core/src/io/io_slice/repr_iovec.rs @@ -18,7 +18,7 @@ pub(crate) struct IoSlice<'a> { impl<'a> IoSlice<'a> { #[inline] - pub(crate) fn new(buf: &'a [u8]) -> IoSlice<'a> { + pub(crate) const fn new(buf: &'a [u8]) -> IoSlice<'a> { IoSlice { vec: iovec { iov_base: buf.as_ptr() as *mut u8 as *mut c_void, iov_len: buf.len() }, _p: PhantomData, @@ -26,10 +26,8 @@ impl<'a> IoSlice<'a> { } #[inline] - pub(crate) fn advance(&mut self, n: usize) { - if self.vec.iov_len < n { - panic!("advancing IoSlice beyond its length"); - } + pub(crate) const fn advance(&mut self, n: usize) { + assert!(n <= self.vec.iov_len, "advancing IoSlice beyond its length"); // SAFETY: // * `n <= iov_len` as asserted above. @@ -56,7 +54,7 @@ pub(crate) struct IoSliceMut<'a> { impl<'a> IoSliceMut<'a> { #[inline] - pub(crate) fn new(buf: &'a mut [u8]) -> IoSliceMut<'a> { + pub(crate) const fn new(buf: &'a mut [u8]) -> IoSliceMut<'a> { IoSliceMut { vec: iovec { iov_base: buf.as_mut_ptr() as *mut c_void, iov_len: buf.len() }, _p: PhantomData, @@ -64,10 +62,8 @@ impl<'a> IoSliceMut<'a> { } #[inline] - pub(crate) fn advance(&mut self, n: usize) { - if self.vec.iov_len < n { - panic!("advancing IoSliceMut beyond its length"); - } + pub(crate) const fn advance(&mut self, n: usize) { + assert!(n <= self.vec.iov_len, "advancing IoSliceMut beyond its length"); // SAFETY: // * `n <= iov_len` as asserted above. @@ -79,7 +75,7 @@ impl<'a> IoSliceMut<'a> { } #[inline] - pub(crate) fn as_slice(&self) -> &[u8] { + pub(crate) const fn as_slice(&self) -> &[u8] { // SAFETY: // * `iov_base` and `iov_len` come from a prior decomposition of a valid slice. unsafe { slice::from_raw_parts(self.vec.iov_base as *mut u8, self.vec.iov_len) } @@ -93,7 +89,7 @@ impl<'a> IoSliceMut<'a> { } #[inline] - pub(crate) fn as_mut_slice(&mut self) -> &mut [u8] { + pub(crate) const fn as_mut_slice(&mut self) -> &mut [u8] { // SAFETY: // * `iov_base` and `iov_len` come from a prior decomposition of a valid slice. unsafe { slice::from_raw_parts_mut(self.vec.iov_base as *mut u8, self.vec.iov_len) } diff --git a/library/core/src/io/io_slice/repr_uefi.rs b/library/core/src/io/io_slice/repr_uefi.rs index 3698eea733837..4938ff50fe06a 100644 --- a/library/core/src/io/io_slice/repr_uefi.rs +++ b/library/core/src/io/io_slice/repr_uefi.rs @@ -14,22 +14,22 @@ pub(crate) struct IoSlice<'a> { impl<'a> IoSlice<'a> { #[inline] - pub(crate) fn new(buf: &'a [u8]) -> IoSlice<'a> { - let len = buf.len().try_into().unwrap(); - Self { len, data: buf.as_ptr(), _p: PhantomData } + pub(crate) const fn new(buf: &'a [u8]) -> IoSlice<'a> { + assert!(buf.len() <= u32::MAX as usize, "slice too large for IoSlice"); + IoSlice { len: buf.len() as u32, data: buf.as_ptr(), _p: PhantomData } } #[inline] - pub(crate) fn advance(&mut self, n: usize) { - self.len = u32::try_from(n) - .ok() - .and_then(|n| self.len.checked_sub(n)) - .expect("advancing IoSlice beyond its length"); + pub(crate) const fn advance(&mut self, n: usize) { + assert!(n <= self.len as usize, "advancing IoSlice beyond its length"); // SAFETY: // * `n <= len` as asserted above. // * The allocation pointed to by `data` is valid up to `data + len`. - unsafe { self.data = self.data.add(n) }; + unsafe { + self.len -= n as u32; + self.data = self.data.add(n); + } } #[inline] @@ -49,26 +49,26 @@ pub(crate) struct IoSliceMut<'a> { impl<'a> IoSliceMut<'a> { #[inline] - pub(crate) fn new(buf: &'a mut [u8]) -> IoSliceMut<'a> { - let len = buf.len().try_into().unwrap(); - Self { len, data: buf.as_mut_ptr(), _p: PhantomData } + pub(crate) const fn new(buf: &'a mut [u8]) -> IoSliceMut<'a> { + assert!(buf.len() <= u32::MAX as usize, "slice too large for IoSliceMut"); + IoSliceMut { len: buf.len() as u32, data: buf.as_mut_ptr(), _p: PhantomData } } #[inline] - pub(crate) fn advance(&mut self, n: usize) { - self.len = u32::try_from(n) - .ok() - .and_then(|n| self.len.checked_sub(n)) - .expect("advancing IoSlice beyond its length"); + pub(crate) const fn advance(&mut self, n: usize) { + assert!(n <= self.len as usize, "advancing IoSliceMut beyond its length"); // SAFETY: // * `n <= len` as asserted above. // * The allocation pointed to by `data` is valid up to `data + len`. - unsafe { self.data = self.data.add(n) }; + unsafe { + self.len -= n as u32; + self.data = self.data.add(n); + } } #[inline] - pub(crate) fn as_slice(&self) -> &[u8] { + pub(crate) const fn as_slice(&self) -> &[u8] { // SAFETY: // * `data` and `len` come from a prior decomposition of a valid slice. unsafe { slice::from_raw_parts(self.data, self.len as usize) } @@ -82,7 +82,7 @@ impl<'a> IoSliceMut<'a> { } #[inline] - pub(crate) fn as_mut_slice(&mut self) -> &mut [u8] { + pub(crate) const fn as_mut_slice(&mut self) -> &mut [u8] { // SAFETY: // * `data` and `len` come from a prior decomposition of a valid slice. unsafe { slice::from_raw_parts_mut(self.data, self.len as usize) } diff --git a/library/core/src/io/io_slice/repr_windows.rs b/library/core/src/io/io_slice/repr_windows.rs index 6162d86de8e59..b7bc93316c233 100644 --- a/library/core/src/io/io_slice/repr_windows.rs +++ b/library/core/src/io/io_slice/repr_windows.rs @@ -17,7 +17,7 @@ pub(crate) struct IoSlice<'a> { impl<'a> IoSlice<'a> { #[inline] - pub(crate) fn new(buf: &'a [u8]) -> IoSlice<'a> { + pub(crate) const fn new(buf: &'a [u8]) -> IoSlice<'a> { assert!(buf.len() <= u32::MAX as usize); IoSlice { vec: WSABUF { len: buf.len() as u32, buf: buf.as_ptr() as *mut u8 }, @@ -26,10 +26,8 @@ impl<'a> IoSlice<'a> { } #[inline] - pub(crate) fn advance(&mut self, n: usize) { - if (self.vec.len as usize) < n { - panic!("advancing IoSlice beyond its length"); - } + pub(crate) const fn advance(&mut self, n: usize) { + assert!(n <= self.vec.len as usize, "advancing IoSlice beyond its length"); // SAFETY: // * `n <= len` as asserted above. @@ -56,16 +54,14 @@ pub(crate) struct IoSliceMut<'a> { impl<'a> IoSliceMut<'a> { #[inline] - pub(crate) fn new(buf: &'a mut [u8]) -> IoSliceMut<'a> { + pub(crate) const fn new(buf: &'a mut [u8]) -> IoSliceMut<'a> { assert!(buf.len() <= u32::MAX as usize); IoSliceMut { vec: WSABUF { len: buf.len() as u32, buf: buf.as_mut_ptr() }, _p: PhantomData } } #[inline] - pub(crate) fn advance(&mut self, n: usize) { - if (self.vec.len as usize) < n { - panic!("advancing IoSliceMut beyond its length"); - } + pub(crate) const fn advance(&mut self, n: usize) { + assert!(n <= self.vec.len as usize, "advancing IoSliceMut beyond its length"); // SAFETY: // * `n <= len` as asserted above. @@ -77,7 +73,7 @@ impl<'a> IoSliceMut<'a> { } #[inline] - pub(crate) fn as_slice(&self) -> &[u8] { + pub(crate) const fn as_slice(&self) -> &[u8] { // SAFETY: // * `buf` and `len` come from a prior decomposition of a valid slice. unsafe { slice::from_raw_parts(self.vec.buf, self.vec.len as usize) } @@ -91,7 +87,7 @@ impl<'a> IoSliceMut<'a> { } #[inline] - pub(crate) fn as_mut_slice(&mut self) -> &mut [u8] { + pub(crate) const fn as_mut_slice(&mut self) -> &mut [u8] { // SAFETY: // * `buf` and `len` come from a prior decomposition of a valid slice. unsafe { slice::from_raw_parts_mut(self.vec.buf, self.vec.len as usize) } diff --git a/library/stdarch/.github/workflows/main.yml b/library/stdarch/.github/workflows/main.yml index bf8ad2e293e7f..a27f137d103ea 100644 --- a/library/stdarch/.github/workflows/main.yml +++ b/library/stdarch/.github/workflows/main.yml @@ -15,7 +15,7 @@ jobs: docs: name: Build Documentation - needs: [ style ] + needs: [style] runs-on: ubuntu-latest steps: - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 @@ -27,7 +27,7 @@ jobs: verify: name: Automatic intrinsic verification - needs: [ style ] + needs: [style] runs-on: ubuntu-latest steps: - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 @@ -36,9 +36,10 @@ jobs: - run: cargo test --manifest-path crates/stdarch-verify/Cargo.toml test: - needs: [ style ] + needs: [style] name: Test runs-on: ${{ matrix.target.os }} + continue-on-error: ${{ matrix.target.tuple == 'riscv32gc-unknown-linux-gnu' }} strategy: matrix: profile: @@ -272,7 +273,7 @@ jobs: TARGET: ${{ matrix.target.tuple }} intrinsic-test: - needs: [ style ] + needs: [style] name: Intrinsic Test runs-on: ubuntu-latest strategy: @@ -283,8 +284,8 @@ jobs: - armv7-unknown-linux-gnueabihf - loongarch64-unknown-linux-gnu - x86_64-unknown-linux-gnu - profile: [ dev, release ] - cc: [ clang, gcc ] + profile: [dev, release] + cc: [clang, gcc] include: - target: aarch64_be-unknown-linux-gnu build_std: true @@ -320,7 +321,7 @@ jobs: # Check that the generated files agree with the checked-in versions. check-stdarch-gen: - needs: [ style ] + needs: [style] name: Check stdarch-gen-{arm, loongarch, hexagon} output runs-on: ubuntu-latest env: @@ -348,7 +349,7 @@ jobs: # Below we run some tests where Miri might catch UB, for instance on intrinsics that read from # or write to pointers. miri: - needs: [ style ] + needs: [style] name: Run some tests with miri runs-on: ubuntu-latest steps: diff --git a/library/stdarch/ci/docker/x86_64-unknown-linux-gnu/Dockerfile b/library/stdarch/ci/docker/x86_64-unknown-linux-gnu/Dockerfile index 3a566febd548f..43118ece09e97 100644 --- a/library/stdarch/ci/docker/x86_64-unknown-linux-gnu/Dockerfile +++ b/library/stdarch/ci/docker/x86_64-unknown-linux-gnu/Dockerfile @@ -28,7 +28,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends intel-oneapi-co ENV CLANG_PATH="/llvm/bin/clang" ENV GCC_PATH="gcc" -ENV ICX_PATH="/opt/intel/oneapi/compiler/2026.1/bin/icx" +ENV ICX_PATH="/opt/intel/oneapi/compiler/latest/bin/icx" ENV CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER="/intel-sde/sde64 \ -cpuid-in /checkout/ci/docker/x86_64-unknown-linux-gnu/cpuid.def \ diff --git a/library/stdarch/crates/core_arch/src/loongarch64/lasx/generated.rs b/library/stdarch/crates/core_arch/src/loongarch64/lasx/generated.rs index 70560f8b5a68d..75b79398bf9c7 100644 --- a/library/stdarch/crates/core_arch/src/loongarch64/lasx/generated.rs +++ b/library/stdarch/crates/core_arch/src/loongarch64/lasx/generated.rs @@ -941,36 +941,35 @@ unsafe extern "llvm-intrinsic" { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrar_b(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsrar_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrar_h(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsrar_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrar_w(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsrar_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrar_d(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsrar_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrari_b(a: m256i) -> m256i { static_assert_uimm_bits!(IMM3, 3); unsafe { transmute(__lasx_xvsrari_b(transmute(a), IMM3)) } @@ -978,8 +977,7 @@ pub fn lasx_xvsrari_b(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrari_h(a: m256i) -> m256i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lasx_xvsrari_h(transmute(a), IMM4)) } @@ -987,8 +985,7 @@ pub fn lasx_xvsrari_h(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrari_w(a: m256i) -> m256i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lasx_xvsrari_w(transmute(a), IMM5)) } @@ -996,8 +993,7 @@ pub fn lasx_xvsrari_w(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrari_d(a: m256i) -> m256i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lasx_xvsrari_d(transmute(a), IMM6)) } @@ -1005,36 +1001,35 @@ pub fn lasx_xvsrari_d(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrlr_b(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsrlr_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrlr_h(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsrlr_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrlr_w(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsrlr_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrlr_d(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsrlr_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrlri_b(a: m256i) -> m256i { static_assert_uimm_bits!(IMM3, 3); unsafe { transmute(__lasx_xvsrlri_b(transmute(a), IMM3)) } @@ -1042,8 +1037,7 @@ pub fn lasx_xvsrlri_b(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrlri_h(a: m256i) -> m256i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lasx_xvsrlri_h(transmute(a), IMM4)) } @@ -1051,8 +1045,7 @@ pub fn lasx_xvsrlri_h(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrlri_w(a: m256i) -> m256i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lasx_xvsrlri_w(transmute(a), IMM5)) } @@ -1060,8 +1053,7 @@ pub fn lasx_xvsrlri_w(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrlri_d(a: m256i) -> m256i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lasx_xvsrlri_d(transmute(a), IMM6)) } @@ -1069,8 +1061,7 @@ pub fn lasx_xvsrlri_d(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvbitclri_b(a: m256i) -> m256i { static_assert_uimm_bits!(IMM3, 3); unsafe { transmute(__lasx_xvbitclri_b(transmute(a), IMM3)) } @@ -1078,8 +1069,7 @@ pub fn lasx_xvbitclri_b(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvbitclri_h(a: m256i) -> m256i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lasx_xvbitclri_h(transmute(a), IMM4)) } @@ -1087,8 +1077,7 @@ pub fn lasx_xvbitclri_h(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvbitclri_w(a: m256i) -> m256i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lasx_xvbitclri_w(transmute(a), IMM5)) } @@ -1096,8 +1085,7 @@ pub fn lasx_xvbitclri_w(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvbitclri_d(a: m256i) -> m256i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lasx_xvbitclri_d(transmute(a), IMM6)) } @@ -1105,8 +1093,7 @@ pub fn lasx_xvbitclri_d(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvbitseti_b(a: m256i) -> m256i { static_assert_uimm_bits!(IMM3, 3); unsafe { transmute(__lasx_xvbitseti_b(transmute(a), IMM3)) } @@ -1114,8 +1101,7 @@ pub fn lasx_xvbitseti_b(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvbitseti_h(a: m256i) -> m256i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lasx_xvbitseti_h(transmute(a), IMM4)) } @@ -1123,8 +1109,7 @@ pub fn lasx_xvbitseti_h(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvbitseti_w(a: m256i) -> m256i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lasx_xvbitseti_w(transmute(a), IMM5)) } @@ -1132,8 +1117,7 @@ pub fn lasx_xvbitseti_w(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvbitseti_d(a: m256i) -> m256i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lasx_xvbitseti_d(transmute(a), IMM6)) } @@ -1141,8 +1125,7 @@ pub fn lasx_xvbitseti_d(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvbitrevi_b(a: m256i) -> m256i { static_assert_uimm_bits!(IMM3, 3); unsafe { transmute(__lasx_xvbitrevi_b(transmute(a), IMM3)) } @@ -1150,8 +1133,7 @@ pub fn lasx_xvbitrevi_b(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvbitrevi_h(a: m256i) -> m256i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lasx_xvbitrevi_h(transmute(a), IMM4)) } @@ -1159,8 +1141,7 @@ pub fn lasx_xvbitrevi_h(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvbitrevi_w(a: m256i) -> m256i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lasx_xvbitrevi_w(transmute(a), IMM5)) } @@ -1168,8 +1149,7 @@ pub fn lasx_xvbitrevi_w(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvbitrevi_d(a: m256i) -> m256i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lasx_xvbitrevi_d(transmute(a), IMM6)) } @@ -1177,8 +1157,7 @@ pub fn lasx_xvbitrevi_d(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsubi_bu(a: m256i) -> m256i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lasx_xvsubi_bu(transmute(a), IMM5)) } @@ -1186,8 +1165,7 @@ pub fn lasx_xvsubi_bu(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsubi_hu(a: m256i) -> m256i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lasx_xvsubi_hu(transmute(a), IMM5)) } @@ -1195,8 +1173,7 @@ pub fn lasx_xvsubi_hu(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsubi_wu(a: m256i) -> m256i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lasx_xvsubi_wu(transmute(a), IMM5)) } @@ -1204,8 +1181,7 @@ pub fn lasx_xvsubi_wu(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsubi_du(a: m256i) -> m256i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lasx_xvsubi_du(transmute(a), IMM5)) } @@ -1213,8 +1189,7 @@ pub fn lasx_xvsubi_du(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsat_b(a: m256i) -> m256i { static_assert_uimm_bits!(IMM3, 3); unsafe { transmute(__lasx_xvsat_b(transmute(a), IMM3)) } @@ -1222,8 +1197,7 @@ pub fn lasx_xvsat_b(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsat_h(a: m256i) -> m256i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lasx_xvsat_h(transmute(a), IMM4)) } @@ -1231,8 +1205,7 @@ pub fn lasx_xvsat_h(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsat_w(a: m256i) -> m256i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lasx_xvsat_w(transmute(a), IMM5)) } @@ -1240,8 +1213,7 @@ pub fn lasx_xvsat_w(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsat_d(a: m256i) -> m256i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lasx_xvsat_d(transmute(a), IMM6)) } @@ -1249,8 +1221,7 @@ pub fn lasx_xvsat_d(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsat_bu(a: m256i) -> m256i { static_assert_uimm_bits!(IMM3, 3); unsafe { transmute(__lasx_xvsat_bu(transmute(a), IMM3)) } @@ -1258,8 +1229,7 @@ pub fn lasx_xvsat_bu(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsat_hu(a: m256i) -> m256i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lasx_xvsat_hu(transmute(a), IMM4)) } @@ -1267,8 +1237,7 @@ pub fn lasx_xvsat_hu(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsat_wu(a: m256i) -> m256i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lasx_xvsat_wu(transmute(a), IMM5)) } @@ -1276,8 +1245,7 @@ pub fn lasx_xvsat_wu(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsat_du(a: m256i) -> m256i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lasx_xvsat_du(transmute(a), IMM6)) } @@ -1285,232 +1253,231 @@ pub fn lasx_xvsat_du(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvdiv_b(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvdiv_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvdiv_h(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvdiv_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvdiv_w(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvdiv_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvdiv_d(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvdiv_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvdiv_bu(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvdiv_bu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvdiv_hu(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvdiv_hu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvdiv_wu(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvdiv_wu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvdiv_du(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvdiv_du(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvhaddw_h_b(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvhaddw_h_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvhaddw_w_h(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvhaddw_w_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvhaddw_d_w(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvhaddw_d_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvhaddw_hu_bu(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvhaddw_hu_bu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvhaddw_wu_hu(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvhaddw_wu_hu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvhaddw_du_wu(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvhaddw_du_wu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvhsubw_h_b(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvhsubw_h_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvhsubw_w_h(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvhsubw_w_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvhsubw_d_w(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvhsubw_d_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvhsubw_hu_bu(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvhsubw_hu_bu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvhsubw_wu_hu(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvhsubw_wu_hu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvhsubw_du_wu(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvhsubw_du_wu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmod_b(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvmod_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmod_h(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvmod_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmod_w(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvmod_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmod_d(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvmod_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmod_bu(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvmod_bu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmod_hu(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvmod_hu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmod_wu(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvmod_wu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmod_du(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvmod_du(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvshuf_b(a: m256i, b: m256i, c: m256i) -> m256i { unsafe { transmute(__lasx_xvshuf_b(transmute(a), transmute(b), transmute(c))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvshuf_h(a: m256i, b: m256i, c: m256i) -> m256i { unsafe { transmute(__lasx_xvshuf_h(transmute(a), transmute(b), transmute(c))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvshuf_w(a: m256i, b: m256i, c: m256i) -> m256i { unsafe { transmute(__lasx_xvshuf_w(transmute(a), transmute(b), transmute(c))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvshuf_d(a: m256i, b: m256i, c: m256i) -> m256i { unsafe { transmute(__lasx_xvshuf_d(transmute(a), transmute(b), transmute(c))) } } #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvandi_b(a: m256i) -> m256i { static_assert_uimm_bits!(IMM8, 8); unsafe { transmute(__lasx_xvandi_b(transmute(a), IMM8)) } @@ -1518,8 +1485,7 @@ pub fn lasx_xvandi_b(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvori_b(a: m256i) -> m256i { static_assert_uimm_bits!(IMM8, 8); unsafe { transmute(__lasx_xvori_b(transmute(a), IMM8)) } @@ -1527,8 +1493,7 @@ pub fn lasx_xvori_b(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvnori_b(a: m256i) -> m256i { static_assert_uimm_bits!(IMM8, 8); unsafe { transmute(__lasx_xvnori_b(transmute(a), IMM8)) } @@ -1536,8 +1501,7 @@ pub fn lasx_xvnori_b(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvxori_b(a: m256i) -> m256i { static_assert_uimm_bits!(IMM8, 8); unsafe { transmute(__lasx_xvxori_b(transmute(a), IMM8)) } @@ -1545,15 +1509,14 @@ pub fn lasx_xvxori_b(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvbitsel_v(a: m256i, b: m256i, c: m256i) -> m256i { unsafe { transmute(__lasx_xvbitsel_v(transmute(a), transmute(b), transmute(c))) } } #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvbitseli_b(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM8, 8); unsafe { transmute(__lasx_xvbitseli_b(transmute(a), transmute(b), IMM8)) } @@ -1561,316 +1524,315 @@ pub fn lasx_xvbitseli_b(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvclo_b(a: m256i) -> m256i { unsafe { transmute(__lasx_xvclo_b(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvclo_h(a: m256i) -> m256i { unsafe { transmute(__lasx_xvclo_h(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvclo_w(a: m256i) -> m256i { unsafe { transmute(__lasx_xvclo_w(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvclo_d(a: m256i) -> m256i { unsafe { transmute(__lasx_xvclo_d(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcvt_h_s(a: m256, b: m256) -> m256i { unsafe { transmute(__lasx_xvfcvt_h_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcvt_s_d(a: m256d, b: m256d) -> m256 { unsafe { transmute(__lasx_xvfcvt_s_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfmin_s(a: m256, b: m256) -> m256 { unsafe { transmute(__lasx_xvfmin_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfmin_d(a: m256d, b: m256d) -> m256d { unsafe { transmute(__lasx_xvfmin_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfmina_s(a: m256, b: m256) -> m256 { unsafe { transmute(__lasx_xvfmina_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfmina_d(a: m256d, b: m256d) -> m256d { unsafe { transmute(__lasx_xvfmina_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfmax_s(a: m256, b: m256) -> m256 { unsafe { transmute(__lasx_xvfmax_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfmax_d(a: m256d, b: m256d) -> m256d { unsafe { transmute(__lasx_xvfmax_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfmaxa_s(a: m256, b: m256) -> m256 { unsafe { transmute(__lasx_xvfmaxa_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfmaxa_d(a: m256d, b: m256d) -> m256d { unsafe { transmute(__lasx_xvfmaxa_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfclass_s(a: m256) -> m256i { unsafe { transmute(__lasx_xvfclass_s(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfclass_d(a: m256d) -> m256i { unsafe { transmute(__lasx_xvfclass_d(transmute(a))) } } #[inline] #[target_feature(enable = "lasx,frecipe")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfrecipe_s(a: m256) -> m256 { unsafe { transmute(__lasx_xvfrecipe_s(transmute(a))) } } #[inline] #[target_feature(enable = "lasx,frecipe")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfrecipe_d(a: m256d) -> m256d { unsafe { transmute(__lasx_xvfrecipe_d(transmute(a))) } } #[inline] #[target_feature(enable = "lasx,frecipe")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfrsqrte_s(a: m256) -> m256 { unsafe { transmute(__lasx_xvfrsqrte_s(transmute(a))) } } #[inline] #[target_feature(enable = "lasx,frecipe")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfrsqrte_d(a: m256d) -> m256d { unsafe { transmute(__lasx_xvfrsqrte_d(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfrint_s(a: m256) -> m256 { unsafe { transmute(__lasx_xvfrint_s(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfrint_d(a: m256d) -> m256d { unsafe { transmute(__lasx_xvfrint_d(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvflogb_s(a: m256) -> m256 { unsafe { transmute(__lasx_xvflogb_s(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvflogb_d(a: m256d) -> m256d { unsafe { transmute(__lasx_xvflogb_d(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcvth_s_h(a: m256i) -> m256 { unsafe { transmute(__lasx_xvfcvth_s_h(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcvth_d_s(a: m256) -> m256d { unsafe { transmute(__lasx_xvfcvth_d_s(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcvtl_s_h(a: m256i) -> m256 { unsafe { transmute(__lasx_xvfcvtl_s_h(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcvtl_d_s(a: m256) -> m256d { unsafe { transmute(__lasx_xvfcvtl_d_s(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvftint_w_s(a: m256) -> m256i { unsafe { transmute(__lasx_xvftint_w_s(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvftint_l_d(a: m256d) -> m256i { unsafe { transmute(__lasx_xvftint_l_d(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvftint_wu_s(a: m256) -> m256i { unsafe { transmute(__lasx_xvftint_wu_s(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvftint_lu_d(a: m256d) -> m256i { unsafe { transmute(__lasx_xvftint_lu_d(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvftintrz_w_s(a: m256) -> m256i { unsafe { transmute(__lasx_xvftintrz_w_s(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvftintrz_l_d(a: m256d) -> m256i { unsafe { transmute(__lasx_xvftintrz_l_d(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvftintrz_wu_s(a: m256) -> m256i { unsafe { transmute(__lasx_xvftintrz_wu_s(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvftintrz_lu_d(a: m256d) -> m256i { unsafe { transmute(__lasx_xvftintrz_lu_d(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvffint_s_w(a: m256i) -> m256 { unsafe { transmute(__lasx_xvffint_s_w(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvffint_d_l(a: m256i) -> m256d { unsafe { transmute(__lasx_xvffint_d_l(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvffint_s_wu(a: m256i) -> m256 { unsafe { transmute(__lasx_xvffint_s_wu(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvffint_d_lu(a: m256i) -> m256d { unsafe { transmute(__lasx_xvffint_d_lu(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvreplve_b(a: m256i, b: i32) -> m256i { unsafe { transmute(__lasx_xvreplve_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvreplve_h(a: m256i, b: i32) -> m256i { unsafe { transmute(__lasx_xvreplve_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvreplve_w(a: m256i, b: i32) -> m256i { unsafe { transmute(__lasx_xvreplve_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvreplve_d(a: m256i, b: i32) -> m256i { unsafe { transmute(__lasx_xvreplve_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvpermi_w(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM8, 8); unsafe { transmute(__lasx_xvpermi_w(transmute(a), transmute(b), IMM8)) } @@ -1878,8 +1840,7 @@ pub fn lasx_xvpermi_w(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsllwil_h_b(a: m256i) -> m256i { static_assert_uimm_bits!(IMM3, 3); unsafe { transmute(__lasx_xvsllwil_h_b(transmute(a), IMM3)) } @@ -1887,8 +1848,7 @@ pub fn lasx_xvsllwil_h_b(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsllwil_w_h(a: m256i) -> m256i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lasx_xvsllwil_w_h(transmute(a), IMM4)) } @@ -1896,8 +1856,7 @@ pub fn lasx_xvsllwil_w_h(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsllwil_d_w(a: m256i) -> m256i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lasx_xvsllwil_d_w(transmute(a), IMM5)) } @@ -1905,8 +1864,7 @@ pub fn lasx_xvsllwil_d_w(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsllwil_hu_bu(a: m256i) -> m256i { static_assert_uimm_bits!(IMM3, 3); unsafe { transmute(__lasx_xvsllwil_hu_bu(transmute(a), IMM3)) } @@ -1914,8 +1872,7 @@ pub fn lasx_xvsllwil_hu_bu(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsllwil_wu_hu(a: m256i) -> m256i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lasx_xvsllwil_wu_hu(transmute(a), IMM4)) } @@ -1923,8 +1880,7 @@ pub fn lasx_xvsllwil_wu_hu(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsllwil_du_wu(a: m256i) -> m256i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lasx_xvsllwil_du_wu(transmute(a), IMM5)) } @@ -1932,218 +1888,217 @@ pub fn lasx_xvsllwil_du_wu(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsran_b_h(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsran_b_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsran_h_w(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsran_h_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsran_w_d(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsran_w_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssran_b_h(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvssran_b_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssran_h_w(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvssran_h_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssran_w_d(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvssran_w_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssran_bu_h(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvssran_bu_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssran_hu_w(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvssran_hu_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssran_wu_d(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvssran_wu_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrarn_b_h(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsrarn_b_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrarn_h_w(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsrarn_h_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrarn_w_d(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsrarn_w_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrarn_b_h(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvssrarn_b_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrarn_h_w(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvssrarn_h_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrarn_w_d(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvssrarn_w_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrarn_bu_h(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvssrarn_bu_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrarn_hu_w(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvssrarn_hu_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrarn_wu_d(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvssrarn_wu_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrln_b_h(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsrln_b_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrln_h_w(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsrln_h_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrln_w_d(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsrln_w_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrln_bu_h(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvssrln_bu_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrln_hu_w(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvssrln_hu_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrln_wu_d(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvssrln_wu_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrlrn_b_h(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsrlrn_b_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrlrn_h_w(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsrlrn_h_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrlrn_w_d(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsrlrn_w_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrlrn_bu_h(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvssrlrn_bu_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrlrn_hu_w(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvssrlrn_hu_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrlrn_wu_d(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvssrlrn_wu_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfrstpi_b(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lasx_xvfrstpi_b(transmute(a), transmute(b), IMM5)) } @@ -2151,8 +2106,7 @@ pub fn lasx_xvfrstpi_b(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfrstpi_h(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lasx_xvfrstpi_h(transmute(a), transmute(b), IMM5)) } @@ -2160,22 +2114,21 @@ pub fn lasx_xvfrstpi_h(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfrstp_b(a: m256i, b: m256i, c: m256i) -> m256i { unsafe { transmute(__lasx_xvfrstp_b(transmute(a), transmute(b), transmute(c))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfrstp_h(a: m256i, b: m256i, c: m256i) -> m256i { unsafe { transmute(__lasx_xvfrstp_h(transmute(a), transmute(b), transmute(c))) } } #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvshuf4i_d(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM8, 8); unsafe { transmute(__lasx_xvshuf4i_d(transmute(a), transmute(b), IMM8)) } @@ -2183,8 +2136,7 @@ pub fn lasx_xvshuf4i_d(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvextrins_b(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM8, 8); unsafe { transmute(__lasx_xvextrins_b(transmute(a), transmute(b), IMM8)) } @@ -2192,8 +2144,7 @@ pub fn lasx_xvextrins_b(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvextrins_h(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM8, 8); unsafe { transmute(__lasx_xvextrins_h(transmute(a), transmute(b), IMM8)) } @@ -2201,8 +2152,7 @@ pub fn lasx_xvextrins_h(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvextrins_w(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM8, 8); unsafe { transmute(__lasx_xvextrins_w(transmute(a), transmute(b), IMM8)) } @@ -2210,8 +2160,7 @@ pub fn lasx_xvextrins_w(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvextrins_d(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM8, 8); unsafe { transmute(__lasx_xvextrins_d(transmute(a), transmute(b), IMM8)) } @@ -2219,246 +2168,245 @@ pub fn lasx_xvextrins_d(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmskltz_b(a: m256i) -> m256i { unsafe { transmute(__lasx_xvmskltz_b(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmskltz_h(a: m256i) -> m256i { unsafe { transmute(__lasx_xvmskltz_h(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmskltz_w(a: m256i) -> m256i { unsafe { transmute(__lasx_xvmskltz_w(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmskltz_d(a: m256i) -> m256i { unsafe { transmute(__lasx_xvmskltz_d(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsigncov_b(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsigncov_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsigncov_h(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsigncov_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsigncov_w(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsigncov_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsigncov_d(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsigncov_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvftintrne_w_s(a: m256) -> m256i { unsafe { transmute(__lasx_xvftintrne_w_s(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvftintrne_l_d(a: m256d) -> m256i { unsafe { transmute(__lasx_xvftintrne_l_d(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvftintrp_w_s(a: m256) -> m256i { unsafe { transmute(__lasx_xvftintrp_w_s(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvftintrp_l_d(a: m256d) -> m256i { unsafe { transmute(__lasx_xvftintrp_l_d(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvftintrm_w_s(a: m256) -> m256i { unsafe { transmute(__lasx_xvftintrm_w_s(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvftintrm_l_d(a: m256d) -> m256i { unsafe { transmute(__lasx_xvftintrm_l_d(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvftint_w_d(a: m256d, b: m256d) -> m256i { unsafe { transmute(__lasx_xvftint_w_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvffint_s_l(a: m256i, b: m256i) -> m256 { unsafe { transmute(__lasx_xvffint_s_l(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvftintrz_w_d(a: m256d, b: m256d) -> m256i { unsafe { transmute(__lasx_xvftintrz_w_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvftintrp_w_d(a: m256d, b: m256d) -> m256i { unsafe { transmute(__lasx_xvftintrp_w_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvftintrm_w_d(a: m256d, b: m256d) -> m256i { unsafe { transmute(__lasx_xvftintrm_w_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvftintrne_w_d(a: m256d, b: m256d) -> m256i { unsafe { transmute(__lasx_xvftintrne_w_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvftinth_l_s(a: m256) -> m256i { unsafe { transmute(__lasx_xvftinth_l_s(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvftintl_l_s(a: m256) -> m256i { unsafe { transmute(__lasx_xvftintl_l_s(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvffinth_d_w(a: m256i) -> m256d { unsafe { transmute(__lasx_xvffinth_d_w(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvffintl_d_w(a: m256i) -> m256d { unsafe { transmute(__lasx_xvffintl_d_w(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvftintrzh_l_s(a: m256) -> m256i { unsafe { transmute(__lasx_xvftintrzh_l_s(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvftintrzl_l_s(a: m256) -> m256i { unsafe { transmute(__lasx_xvftintrzl_l_s(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvftintrph_l_s(a: m256) -> m256i { unsafe { transmute(__lasx_xvftintrph_l_s(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvftintrpl_l_s(a: m256) -> m256i { unsafe { transmute(__lasx_xvftintrpl_l_s(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvftintrmh_l_s(a: m256) -> m256i { unsafe { transmute(__lasx_xvftintrmh_l_s(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvftintrml_l_s(a: m256) -> m256i { unsafe { transmute(__lasx_xvftintrml_l_s(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvftintrneh_l_s(a: m256) -> m256i { unsafe { transmute(__lasx_xvftintrneh_l_s(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvftintrnel_l_s(a: m256) -> m256i { unsafe { transmute(__lasx_xvftintrnel_l_s(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfrintrne_s(a: m256) -> m256 { unsafe { transmute(__lasx_xvfrintrne_s(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfrintrne_d(a: m256d) -> m256d { unsafe { transmute(__lasx_xvfrintrne_d(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2, 3)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub unsafe fn lasx_xvstelm_b(a: m256i, mem_addr: *mut i8) { static_assert_simm_bits!(IMM_S8, 8); static_assert_uimm_bits!(IMM4, 4); @@ -2467,8 +2415,7 @@ pub unsafe fn lasx_xvstelm_b(a: m256i, mem_a #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2, 3)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub unsafe fn lasx_xvstelm_h(a: m256i, mem_addr: *mut i8) { static_assert_simm_bits!(IMM_S8, 8); static_assert_uimm_bits!(IMM3, 3); @@ -2477,8 +2424,7 @@ pub unsafe fn lasx_xvstelm_h(a: m256i, mem_a #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2, 3)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub unsafe fn lasx_xvstelm_w(a: m256i, mem_addr: *mut i8) { static_assert_simm_bits!(IMM_S8, 8); static_assert_uimm_bits!(IMM2, 2); @@ -2487,8 +2433,7 @@ pub unsafe fn lasx_xvstelm_w(a: m256i, mem_a #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2, 3)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub unsafe fn lasx_xvstelm_d(a: m256i, mem_addr: *mut i8) { static_assert_simm_bits!(IMM_S8, 8); static_assert_uimm_bits!(IMM1, 1); @@ -2497,8 +2442,7 @@ pub unsafe fn lasx_xvstelm_d(a: m256i, mem_a #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvinsve0_w(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM3, 3); unsafe { transmute(__lasx_xvinsve0_w(transmute(a), transmute(b), IMM3)) } @@ -2506,8 +2450,7 @@ pub fn lasx_xvinsve0_w(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvinsve0_d(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM2, 2); unsafe { transmute(__lasx_xvinsve0_d(transmute(a), transmute(b), IMM2)) } @@ -2515,8 +2458,7 @@ pub fn lasx_xvinsve0_d(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvpickve_w(a: m256i) -> m256i { static_assert_uimm_bits!(IMM3, 3); unsafe { transmute(__lasx_xvpickve_w(transmute(a), IMM3)) } @@ -2524,8 +2466,7 @@ pub fn lasx_xvpickve_w(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvpickve_d(a: m256i) -> m256i { static_assert_uimm_bits!(IMM2, 2); unsafe { transmute(__lasx_xvpickve_d(transmute(a), IMM2)) } @@ -2533,141 +2474,140 @@ pub fn lasx_xvpickve_d(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrlrn_b_h(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvssrlrn_b_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrlrn_h_w(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvssrlrn_h_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrlrn_w_d(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvssrlrn_w_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrln_b_h(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvssrln_b_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrln_h_w(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvssrln_h_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrln_w_d(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvssrln_w_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvextl_qu_du(a: m256i) -> m256i { unsafe { transmute(__lasx_xvextl_qu_du(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_vext2xv_h_b(a: m256i) -> m256i { unsafe { transmute(__lasx_vext2xv_h_b(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_vext2xv_w_h(a: m256i) -> m256i { unsafe { transmute(__lasx_vext2xv_w_h(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_vext2xv_d_w(a: m256i) -> m256i { unsafe { transmute(__lasx_vext2xv_d_w(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_vext2xv_w_b(a: m256i) -> m256i { unsafe { transmute(__lasx_vext2xv_w_b(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_vext2xv_d_h(a: m256i) -> m256i { unsafe { transmute(__lasx_vext2xv_d_h(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_vext2xv_d_b(a: m256i) -> m256i { unsafe { transmute(__lasx_vext2xv_d_b(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_vext2xv_hu_bu(a: m256i) -> m256i { unsafe { transmute(__lasx_vext2xv_hu_bu(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_vext2xv_wu_hu(a: m256i) -> m256i { unsafe { transmute(__lasx_vext2xv_wu_hu(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_vext2xv_du_wu(a: m256i) -> m256i { unsafe { transmute(__lasx_vext2xv_du_wu(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_vext2xv_wu_bu(a: m256i) -> m256i { unsafe { transmute(__lasx_vext2xv_wu_bu(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_vext2xv_du_hu(a: m256i) -> m256i { unsafe { transmute(__lasx_vext2xv_du_hu(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_vext2xv_du_bu(a: m256i) -> m256i { unsafe { transmute(__lasx_vext2xv_du_bu(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvpermi_q(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM8, 8); unsafe { transmute(__lasx_xvpermi_q(transmute(a), transmute(b), IMM8)) } @@ -2675,8 +2615,7 @@ pub fn lasx_xvpermi_q(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvpermi_d(a: m256i) -> m256i { static_assert_uimm_bits!(IMM8, 8); unsafe { transmute(__lasx_xvpermi_d(transmute(a), IMM8)) } @@ -2684,15 +2623,14 @@ pub fn lasx_xvpermi_d(a: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvperm_w(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvperm_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub unsafe fn lasx_xvldrepl_b(mem_addr: *const i8) -> m256i { static_assert_simm_bits!(IMM_S12, 12); transmute(__lasx_xvldrepl_b(mem_addr, IMM_S12)) @@ -2700,8 +2638,7 @@ pub unsafe fn lasx_xvldrepl_b(mem_addr: *const i8) -> m256i #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub unsafe fn lasx_xvldrepl_h(mem_addr: *const i8) -> m256i { static_assert_simm_bits!(IMM_S11, 11); transmute(__lasx_xvldrepl_h(mem_addr, IMM_S11)) @@ -2709,8 +2646,7 @@ pub unsafe fn lasx_xvldrepl_h(mem_addr: *const i8) -> m256i #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub unsafe fn lasx_xvldrepl_w(mem_addr: *const i8) -> m256i { static_assert_simm_bits!(IMM_S10, 10); transmute(__lasx_xvldrepl_w(mem_addr, IMM_S10)) @@ -2718,8 +2654,7 @@ pub unsafe fn lasx_xvldrepl_w(mem_addr: *const i8) -> m256i #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub unsafe fn lasx_xvldrepl_d(mem_addr: *const i8) -> m256i { static_assert_simm_bits!(IMM_S9, 9); transmute(__lasx_xvldrepl_d(mem_addr, IMM_S9)) @@ -2727,455 +2662,455 @@ pub unsafe fn lasx_xvldrepl_d(mem_addr: *const i8) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvaddwev_q_d(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvaddwev_q_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvaddwev_d_w(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvaddwev_d_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvaddwev_w_h(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvaddwev_w_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvaddwev_h_b(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvaddwev_h_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvaddwev_q_du(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvaddwev_q_du(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvaddwev_d_wu(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvaddwev_d_wu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvaddwev_w_hu(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvaddwev_w_hu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvaddwev_h_bu(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvaddwev_h_bu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsubwev_q_d(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsubwev_q_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsubwev_d_w(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsubwev_d_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsubwev_w_h(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsubwev_w_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsubwev_h_b(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsubwev_h_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsubwev_q_du(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsubwev_q_du(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsubwev_d_wu(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsubwev_d_wu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsubwev_w_hu(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsubwev_w_hu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsubwev_h_bu(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsubwev_h_bu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmulwev_q_d(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvmulwev_q_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmulwev_d_w(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvmulwev_d_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmulwev_w_h(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvmulwev_w_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmulwev_h_b(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvmulwev_h_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmulwev_q_du(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvmulwev_q_du(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmulwev_d_wu(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvmulwev_d_wu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmulwev_w_hu(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvmulwev_w_hu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmulwev_h_bu(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvmulwev_h_bu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvaddwod_q_d(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvaddwod_q_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvaddwod_d_w(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvaddwod_d_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvaddwod_w_h(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvaddwod_w_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvaddwod_h_b(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvaddwod_h_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvaddwod_q_du(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvaddwod_q_du(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvaddwod_d_wu(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvaddwod_d_wu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvaddwod_w_hu(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvaddwod_w_hu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvaddwod_h_bu(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvaddwod_h_bu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsubwod_q_d(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsubwod_q_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsubwod_d_w(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsubwod_d_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsubwod_w_h(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsubwod_w_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsubwod_h_b(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsubwod_h_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsubwod_q_du(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsubwod_q_du(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsubwod_d_wu(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsubwod_d_wu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsubwod_w_hu(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsubwod_w_hu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsubwod_h_bu(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsubwod_h_bu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmulwod_q_d(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvmulwod_q_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmulwod_d_w(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvmulwod_d_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmulwod_w_h(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvmulwod_w_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmulwod_h_b(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvmulwod_h_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmulwod_q_du(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvmulwod_q_du(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmulwod_d_wu(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvmulwod_d_wu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmulwod_w_hu(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvmulwod_w_hu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmulwod_h_bu(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvmulwod_h_bu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvaddwev_d_wu_w(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvaddwev_d_wu_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvaddwev_w_hu_h(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvaddwev_w_hu_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvaddwev_h_bu_b(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvaddwev_h_bu_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmulwev_d_wu_w(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvmulwev_d_wu_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmulwev_w_hu_h(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvmulwev_w_hu_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmulwev_h_bu_b(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvmulwev_h_bu_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvaddwod_d_wu_w(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvaddwod_d_wu_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvaddwod_w_hu_h(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvaddwod_w_hu_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvaddwod_h_bu_b(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvaddwod_h_bu_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmulwod_d_wu_w(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvmulwod_d_wu_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmulwod_w_hu_h(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvmulwod_w_hu_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmulwod_h_bu_b(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvmulwod_h_bu_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvhaddw_q_d(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvhaddw_q_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvhaddw_qu_du(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvhaddw_qu_du(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvhsubw_q_d(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvhsubw_q_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvhsubw_qu_du(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvhsubw_qu_du(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmaddwev_q_d(a: m256i, b: m256i, c: m256i) -> m256i { unsafe { transmute(__lasx_xvmaddwev_q_d( @@ -3188,7 +3123,7 @@ pub fn lasx_xvmaddwev_q_d(a: m256i, b: m256i, c: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmaddwev_d_w(a: m256i, b: m256i, c: m256i) -> m256i { unsafe { transmute(__lasx_xvmaddwev_d_w( @@ -3201,7 +3136,7 @@ pub fn lasx_xvmaddwev_d_w(a: m256i, b: m256i, c: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmaddwev_w_h(a: m256i, b: m256i, c: m256i) -> m256i { unsafe { transmute(__lasx_xvmaddwev_w_h( @@ -3214,7 +3149,7 @@ pub fn lasx_xvmaddwev_w_h(a: m256i, b: m256i, c: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmaddwev_h_b(a: m256i, b: m256i, c: m256i) -> m256i { unsafe { transmute(__lasx_xvmaddwev_h_b( @@ -3227,7 +3162,7 @@ pub fn lasx_xvmaddwev_h_b(a: m256i, b: m256i, c: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmaddwev_q_du(a: m256i, b: m256i, c: m256i) -> m256i { unsafe { transmute(__lasx_xvmaddwev_q_du( @@ -3240,7 +3175,7 @@ pub fn lasx_xvmaddwev_q_du(a: m256i, b: m256i, c: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmaddwev_d_wu(a: m256i, b: m256i, c: m256i) -> m256i { unsafe { transmute(__lasx_xvmaddwev_d_wu( @@ -3253,7 +3188,7 @@ pub fn lasx_xvmaddwev_d_wu(a: m256i, b: m256i, c: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmaddwev_w_hu(a: m256i, b: m256i, c: m256i) -> m256i { unsafe { transmute(__lasx_xvmaddwev_w_hu( @@ -3266,7 +3201,7 @@ pub fn lasx_xvmaddwev_w_hu(a: m256i, b: m256i, c: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmaddwev_h_bu(a: m256i, b: m256i, c: m256i) -> m256i { unsafe { transmute(__lasx_xvmaddwev_h_bu( @@ -3279,7 +3214,7 @@ pub fn lasx_xvmaddwev_h_bu(a: m256i, b: m256i, c: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmaddwod_q_d(a: m256i, b: m256i, c: m256i) -> m256i { unsafe { transmute(__lasx_xvmaddwod_q_d( @@ -3292,7 +3227,7 @@ pub fn lasx_xvmaddwod_q_d(a: m256i, b: m256i, c: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmaddwod_d_w(a: m256i, b: m256i, c: m256i) -> m256i { unsafe { transmute(__lasx_xvmaddwod_d_w( @@ -3305,7 +3240,7 @@ pub fn lasx_xvmaddwod_d_w(a: m256i, b: m256i, c: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmaddwod_w_h(a: m256i, b: m256i, c: m256i) -> m256i { unsafe { transmute(__lasx_xvmaddwod_w_h( @@ -3318,7 +3253,7 @@ pub fn lasx_xvmaddwod_w_h(a: m256i, b: m256i, c: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmaddwod_h_b(a: m256i, b: m256i, c: m256i) -> m256i { unsafe { transmute(__lasx_xvmaddwod_h_b( @@ -3331,7 +3266,7 @@ pub fn lasx_xvmaddwod_h_b(a: m256i, b: m256i, c: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmaddwod_q_du(a: m256i, b: m256i, c: m256i) -> m256i { unsafe { transmute(__lasx_xvmaddwod_q_du( @@ -3344,7 +3279,7 @@ pub fn lasx_xvmaddwod_q_du(a: m256i, b: m256i, c: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmaddwod_d_wu(a: m256i, b: m256i, c: m256i) -> m256i { unsafe { transmute(__lasx_xvmaddwod_d_wu( @@ -3357,7 +3292,7 @@ pub fn lasx_xvmaddwod_d_wu(a: m256i, b: m256i, c: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmaddwod_w_hu(a: m256i, b: m256i, c: m256i) -> m256i { unsafe { transmute(__lasx_xvmaddwod_w_hu( @@ -3370,7 +3305,7 @@ pub fn lasx_xvmaddwod_w_hu(a: m256i, b: m256i, c: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmaddwod_h_bu(a: m256i, b: m256i, c: m256i) -> m256i { unsafe { transmute(__lasx_xvmaddwod_h_bu( @@ -3383,7 +3318,7 @@ pub fn lasx_xvmaddwod_h_bu(a: m256i, b: m256i, c: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmaddwev_q_du_d(a: m256i, b: m256i, c: m256i) -> m256i { unsafe { transmute(__lasx_xvmaddwev_q_du_d( @@ -3396,7 +3331,7 @@ pub fn lasx_xvmaddwev_q_du_d(a: m256i, b: m256i, c: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmaddwev_d_wu_w(a: m256i, b: m256i, c: m256i) -> m256i { unsafe { transmute(__lasx_xvmaddwev_d_wu_w( @@ -3409,7 +3344,7 @@ pub fn lasx_xvmaddwev_d_wu_w(a: m256i, b: m256i, c: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmaddwev_w_hu_h(a: m256i, b: m256i, c: m256i) -> m256i { unsafe { transmute(__lasx_xvmaddwev_w_hu_h( @@ -3422,7 +3357,7 @@ pub fn lasx_xvmaddwev_w_hu_h(a: m256i, b: m256i, c: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmaddwev_h_bu_b(a: m256i, b: m256i, c: m256i) -> m256i { unsafe { transmute(__lasx_xvmaddwev_h_bu_b( @@ -3435,7 +3370,7 @@ pub fn lasx_xvmaddwev_h_bu_b(a: m256i, b: m256i, c: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmaddwod_q_du_d(a: m256i, b: m256i, c: m256i) -> m256i { unsafe { transmute(__lasx_xvmaddwod_q_du_d( @@ -3448,7 +3383,7 @@ pub fn lasx_xvmaddwod_q_du_d(a: m256i, b: m256i, c: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmaddwod_d_wu_w(a: m256i, b: m256i, c: m256i) -> m256i { unsafe { transmute(__lasx_xvmaddwod_d_wu_w( @@ -3461,7 +3396,7 @@ pub fn lasx_xvmaddwod_d_wu_w(a: m256i, b: m256i, c: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmaddwod_w_hu_h(a: m256i, b: m256i, c: m256i) -> m256i { unsafe { transmute(__lasx_xvmaddwod_w_hu_h( @@ -3474,7 +3409,7 @@ pub fn lasx_xvmaddwod_w_hu_h(a: m256i, b: m256i, c: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmaddwod_h_bu_b(a: m256i, b: m256i, c: m256i) -> m256i { unsafe { transmute(__lasx_xvmaddwod_h_bu_b( @@ -3487,127 +3422,126 @@ pub fn lasx_xvmaddwod_h_bu_b(a: m256i, b: m256i, c: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvadd_q(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvadd_q(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsub_q(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvsub_q(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvaddwev_q_du_d(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvaddwev_q_du_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvaddwod_q_du_d(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvaddwod_q_du_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmulwev_q_du_d(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvmulwev_q_du_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmulwod_q_du_d(a: m256i, b: m256i) -> m256i { unsafe { transmute(__lasx_xvmulwod_q_du_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmskgez_b(a: m256i) -> m256i { unsafe { transmute(__lasx_xvmskgez_b(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvmsknz_b(a: m256i) -> m256i { unsafe { transmute(__lasx_xvmsknz_b(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvexth_h_b(a: m256i) -> m256i { unsafe { transmute(__lasx_xvexth_h_b(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvexth_w_h(a: m256i) -> m256i { unsafe { transmute(__lasx_xvexth_w_h(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvexth_d_w(a: m256i) -> m256i { unsafe { transmute(__lasx_xvexth_d_w(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvexth_q_d(a: m256i) -> m256i { unsafe { transmute(__lasx_xvexth_q_d(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvexth_hu_bu(a: m256i) -> m256i { unsafe { transmute(__lasx_xvexth_hu_bu(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvexth_wu_hu(a: m256i) -> m256i { unsafe { transmute(__lasx_xvexth_wu_hu(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvexth_du_wu(a: m256i) -> m256i { unsafe { transmute(__lasx_xvexth_du_wu(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvexth_qu_du(a: m256i) -> m256i { unsafe { transmute(__lasx_xvexth_qu_du(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvextl_q_d(a: m256i) -> m256i { unsafe { transmute(__lasx_xvextl_q_d(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrlni_b_h(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lasx_xvsrlni_b_h(transmute(a), transmute(b), IMM4)) } @@ -3615,8 +3549,7 @@ pub fn lasx_xvsrlni_b_h(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrlni_h_w(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lasx_xvsrlni_h_w(transmute(a), transmute(b), IMM5)) } @@ -3624,8 +3557,7 @@ pub fn lasx_xvsrlni_h_w(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrlni_w_d(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lasx_xvsrlni_w_d(transmute(a), transmute(b), IMM6)) } @@ -3633,8 +3565,7 @@ pub fn lasx_xvsrlni_w_d(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrlni_d_q(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM7, 7); unsafe { transmute(__lasx_xvsrlni_d_q(transmute(a), transmute(b), IMM7)) } @@ -3642,8 +3573,7 @@ pub fn lasx_xvsrlni_d_q(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrlrni_b_h(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lasx_xvsrlrni_b_h(transmute(a), transmute(b), IMM4)) } @@ -3651,8 +3581,7 @@ pub fn lasx_xvsrlrni_b_h(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrlrni_h_w(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lasx_xvsrlrni_h_w(transmute(a), transmute(b), IMM5)) } @@ -3660,8 +3589,7 @@ pub fn lasx_xvsrlrni_h_w(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrlrni_w_d(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lasx_xvsrlrni_w_d(transmute(a), transmute(b), IMM6)) } @@ -3669,8 +3597,7 @@ pub fn lasx_xvsrlrni_w_d(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrlrni_d_q(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM7, 7); unsafe { transmute(__lasx_xvsrlrni_d_q(transmute(a), transmute(b), IMM7)) } @@ -3678,8 +3605,7 @@ pub fn lasx_xvsrlrni_d_q(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrlni_b_h(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lasx_xvssrlni_b_h(transmute(a), transmute(b), IMM4)) } @@ -3687,8 +3613,7 @@ pub fn lasx_xvssrlni_b_h(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrlni_h_w(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lasx_xvssrlni_h_w(transmute(a), transmute(b), IMM5)) } @@ -3696,8 +3621,7 @@ pub fn lasx_xvssrlni_h_w(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrlni_w_d(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lasx_xvssrlni_w_d(transmute(a), transmute(b), IMM6)) } @@ -3705,8 +3629,7 @@ pub fn lasx_xvssrlni_w_d(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrlni_d_q(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM7, 7); unsafe { transmute(__lasx_xvssrlni_d_q(transmute(a), transmute(b), IMM7)) } @@ -3714,8 +3637,7 @@ pub fn lasx_xvssrlni_d_q(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrlni_bu_h(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lasx_xvssrlni_bu_h(transmute(a), transmute(b), IMM4)) } @@ -3723,8 +3645,7 @@ pub fn lasx_xvssrlni_bu_h(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrlni_hu_w(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lasx_xvssrlni_hu_w(transmute(a), transmute(b), IMM5)) } @@ -3732,8 +3653,7 @@ pub fn lasx_xvssrlni_hu_w(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrlni_wu_d(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lasx_xvssrlni_wu_d(transmute(a), transmute(b), IMM6)) } @@ -3741,8 +3661,7 @@ pub fn lasx_xvssrlni_wu_d(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrlni_du_q(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM7, 7); unsafe { transmute(__lasx_xvssrlni_du_q(transmute(a), transmute(b), IMM7)) } @@ -3750,8 +3669,7 @@ pub fn lasx_xvssrlni_du_q(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrlrni_b_h(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lasx_xvssrlrni_b_h(transmute(a), transmute(b), IMM4)) } @@ -3759,8 +3677,7 @@ pub fn lasx_xvssrlrni_b_h(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrlrni_h_w(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lasx_xvssrlrni_h_w(transmute(a), transmute(b), IMM5)) } @@ -3768,8 +3685,7 @@ pub fn lasx_xvssrlrni_h_w(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrlrni_w_d(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lasx_xvssrlrni_w_d(transmute(a), transmute(b), IMM6)) } @@ -3777,8 +3693,7 @@ pub fn lasx_xvssrlrni_w_d(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrlrni_d_q(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM7, 7); unsafe { transmute(__lasx_xvssrlrni_d_q(transmute(a), transmute(b), IMM7)) } @@ -3786,8 +3701,7 @@ pub fn lasx_xvssrlrni_d_q(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrlrni_bu_h(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lasx_xvssrlrni_bu_h(transmute(a), transmute(b), IMM4)) } @@ -3795,8 +3709,7 @@ pub fn lasx_xvssrlrni_bu_h(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrlrni_hu_w(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lasx_xvssrlrni_hu_w(transmute(a), transmute(b), IMM5)) } @@ -3804,8 +3717,7 @@ pub fn lasx_xvssrlrni_hu_w(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrlrni_wu_d(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lasx_xvssrlrni_wu_d(transmute(a), transmute(b), IMM6)) } @@ -3813,8 +3725,7 @@ pub fn lasx_xvssrlrni_wu_d(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrlrni_du_q(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM7, 7); unsafe { transmute(__lasx_xvssrlrni_du_q(transmute(a), transmute(b), IMM7)) } @@ -3822,8 +3733,7 @@ pub fn lasx_xvssrlrni_du_q(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrani_b_h(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lasx_xvsrani_b_h(transmute(a), transmute(b), IMM4)) } @@ -3831,8 +3741,7 @@ pub fn lasx_xvsrani_b_h(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrani_h_w(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lasx_xvsrani_h_w(transmute(a), transmute(b), IMM5)) } @@ -3840,8 +3749,7 @@ pub fn lasx_xvsrani_h_w(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrani_w_d(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lasx_xvsrani_w_d(transmute(a), transmute(b), IMM6)) } @@ -3849,8 +3757,7 @@ pub fn lasx_xvsrani_w_d(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrani_d_q(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM7, 7); unsafe { transmute(__lasx_xvsrani_d_q(transmute(a), transmute(b), IMM7)) } @@ -3858,8 +3765,7 @@ pub fn lasx_xvsrani_d_q(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrarni_b_h(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lasx_xvsrarni_b_h(transmute(a), transmute(b), IMM4)) } @@ -3867,8 +3773,7 @@ pub fn lasx_xvsrarni_b_h(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrarni_h_w(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lasx_xvsrarni_h_w(transmute(a), transmute(b), IMM5)) } @@ -3876,8 +3781,7 @@ pub fn lasx_xvsrarni_h_w(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrarni_w_d(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lasx_xvsrarni_w_d(transmute(a), transmute(b), IMM6)) } @@ -3885,8 +3789,7 @@ pub fn lasx_xvsrarni_w_d(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvsrarni_d_q(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM7, 7); unsafe { transmute(__lasx_xvsrarni_d_q(transmute(a), transmute(b), IMM7)) } @@ -3894,8 +3797,7 @@ pub fn lasx_xvsrarni_d_q(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrani_b_h(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lasx_xvssrani_b_h(transmute(a), transmute(b), IMM4)) } @@ -3903,8 +3805,7 @@ pub fn lasx_xvssrani_b_h(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrani_h_w(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lasx_xvssrani_h_w(transmute(a), transmute(b), IMM5)) } @@ -3912,8 +3813,7 @@ pub fn lasx_xvssrani_h_w(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrani_w_d(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lasx_xvssrani_w_d(transmute(a), transmute(b), IMM6)) } @@ -3921,8 +3821,7 @@ pub fn lasx_xvssrani_w_d(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrani_d_q(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM7, 7); unsafe { transmute(__lasx_xvssrani_d_q(transmute(a), transmute(b), IMM7)) } @@ -3930,8 +3829,7 @@ pub fn lasx_xvssrani_d_q(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrani_bu_h(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lasx_xvssrani_bu_h(transmute(a), transmute(b), IMM4)) } @@ -3939,8 +3837,7 @@ pub fn lasx_xvssrani_bu_h(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrani_hu_w(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lasx_xvssrani_hu_w(transmute(a), transmute(b), IMM5)) } @@ -3948,8 +3845,7 @@ pub fn lasx_xvssrani_hu_w(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrani_wu_d(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lasx_xvssrani_wu_d(transmute(a), transmute(b), IMM6)) } @@ -3957,8 +3853,7 @@ pub fn lasx_xvssrani_wu_d(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrani_du_q(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM7, 7); unsafe { transmute(__lasx_xvssrani_du_q(transmute(a), transmute(b), IMM7)) } @@ -3966,8 +3861,7 @@ pub fn lasx_xvssrani_du_q(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrarni_b_h(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lasx_xvssrarni_b_h(transmute(a), transmute(b), IMM4)) } @@ -3975,8 +3869,7 @@ pub fn lasx_xvssrarni_b_h(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrarni_h_w(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lasx_xvssrarni_h_w(transmute(a), transmute(b), IMM5)) } @@ -3984,8 +3877,7 @@ pub fn lasx_xvssrarni_h_w(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrarni_w_d(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lasx_xvssrarni_w_d(transmute(a), transmute(b), IMM6)) } @@ -3993,8 +3885,7 @@ pub fn lasx_xvssrarni_w_d(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrarni_d_q(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM7, 7); unsafe { transmute(__lasx_xvssrarni_d_q(transmute(a), transmute(b), IMM7)) } @@ -4002,8 +3893,7 @@ pub fn lasx_xvssrarni_d_q(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrarni_bu_h(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lasx_xvssrarni_bu_h(transmute(a), transmute(b), IMM4)) } @@ -4011,8 +3901,7 @@ pub fn lasx_xvssrarni_bu_h(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrarni_hu_w(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lasx_xvssrarni_hu_w(transmute(a), transmute(b), IMM5)) } @@ -4020,8 +3909,7 @@ pub fn lasx_xvssrarni_hu_w(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrarni_wu_d(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lasx_xvssrarni_wu_d(transmute(a), transmute(b), IMM6)) } @@ -4029,8 +3917,7 @@ pub fn lasx_xvssrarni_wu_d(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvssrarni_du_q(a: m256i, b: m256i) -> m256i { static_assert_uimm_bits!(IMM7, 7); unsafe { transmute(__lasx_xvssrarni_du_q(transmute(a), transmute(b), IMM7)) } @@ -4038,386 +3925,385 @@ pub fn lasx_xvssrarni_du_q(a: m256i, b: m256i) -> m256i { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xbnz_b(a: m256i) -> i32 { unsafe { transmute(__lasx_xbnz_b(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xbnz_d(a: m256i) -> i32 { unsafe { transmute(__lasx_xbnz_d(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xbnz_h(a: m256i) -> i32 { unsafe { transmute(__lasx_xbnz_h(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xbnz_v(a: m256i) -> i32 { unsafe { transmute(__lasx_xbnz_v(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xbnz_w(a: m256i) -> i32 { unsafe { transmute(__lasx_xbnz_w(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xbz_b(a: m256i) -> i32 { unsafe { transmute(__lasx_xbz_b(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xbz_d(a: m256i) -> i32 { unsafe { transmute(__lasx_xbz_d(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xbz_h(a: m256i) -> i32 { unsafe { transmute(__lasx_xbz_h(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xbz_v(a: m256i) -> i32 { unsafe { transmute(__lasx_xbz_v(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xbz_w(a: m256i) -> i32 { unsafe { transmute(__lasx_xbz_w(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_caf_d(a: m256d, b: m256d) -> m256i { unsafe { transmute(__lasx_xvfcmp_caf_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_caf_s(a: m256, b: m256) -> m256i { unsafe { transmute(__lasx_xvfcmp_caf_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_ceq_d(a: m256d, b: m256d) -> m256i { unsafe { transmute(__lasx_xvfcmp_ceq_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_ceq_s(a: m256, b: m256) -> m256i { unsafe { transmute(__lasx_xvfcmp_ceq_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_cle_d(a: m256d, b: m256d) -> m256i { unsafe { transmute(__lasx_xvfcmp_cle_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_cle_s(a: m256, b: m256) -> m256i { unsafe { transmute(__lasx_xvfcmp_cle_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_clt_d(a: m256d, b: m256d) -> m256i { unsafe { transmute(__lasx_xvfcmp_clt_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_clt_s(a: m256, b: m256) -> m256i { unsafe { transmute(__lasx_xvfcmp_clt_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_cne_d(a: m256d, b: m256d) -> m256i { unsafe { transmute(__lasx_xvfcmp_cne_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_cne_s(a: m256, b: m256) -> m256i { unsafe { transmute(__lasx_xvfcmp_cne_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_cor_d(a: m256d, b: m256d) -> m256i { unsafe { transmute(__lasx_xvfcmp_cor_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_cor_s(a: m256, b: m256) -> m256i { unsafe { transmute(__lasx_xvfcmp_cor_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_cueq_d(a: m256d, b: m256d) -> m256i { unsafe { transmute(__lasx_xvfcmp_cueq_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_cueq_s(a: m256, b: m256) -> m256i { unsafe { transmute(__lasx_xvfcmp_cueq_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_cule_d(a: m256d, b: m256d) -> m256i { unsafe { transmute(__lasx_xvfcmp_cule_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_cule_s(a: m256, b: m256) -> m256i { unsafe { transmute(__lasx_xvfcmp_cule_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_cult_d(a: m256d, b: m256d) -> m256i { unsafe { transmute(__lasx_xvfcmp_cult_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_cult_s(a: m256, b: m256) -> m256i { unsafe { transmute(__lasx_xvfcmp_cult_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_cun_d(a: m256d, b: m256d) -> m256i { unsafe { transmute(__lasx_xvfcmp_cun_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_cune_d(a: m256d, b: m256d) -> m256i { unsafe { transmute(__lasx_xvfcmp_cune_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_cune_s(a: m256, b: m256) -> m256i { unsafe { transmute(__lasx_xvfcmp_cune_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_cun_s(a: m256, b: m256) -> m256i { unsafe { transmute(__lasx_xvfcmp_cun_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_saf_d(a: m256d, b: m256d) -> m256i { unsafe { transmute(__lasx_xvfcmp_saf_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_saf_s(a: m256, b: m256) -> m256i { unsafe { transmute(__lasx_xvfcmp_saf_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_seq_d(a: m256d, b: m256d) -> m256i { unsafe { transmute(__lasx_xvfcmp_seq_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_seq_s(a: m256, b: m256) -> m256i { unsafe { transmute(__lasx_xvfcmp_seq_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_sle_d(a: m256d, b: m256d) -> m256i { unsafe { transmute(__lasx_xvfcmp_sle_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_sle_s(a: m256, b: m256) -> m256i { unsafe { transmute(__lasx_xvfcmp_sle_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_slt_d(a: m256d, b: m256d) -> m256i { unsafe { transmute(__lasx_xvfcmp_slt_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_slt_s(a: m256, b: m256) -> m256i { unsafe { transmute(__lasx_xvfcmp_slt_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_sne_d(a: m256d, b: m256d) -> m256i { unsafe { transmute(__lasx_xvfcmp_sne_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_sne_s(a: m256, b: m256) -> m256i { unsafe { transmute(__lasx_xvfcmp_sne_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_sor_d(a: m256d, b: m256d) -> m256i { unsafe { transmute(__lasx_xvfcmp_sor_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_sor_s(a: m256, b: m256) -> m256i { unsafe { transmute(__lasx_xvfcmp_sor_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_sueq_d(a: m256d, b: m256d) -> m256i { unsafe { transmute(__lasx_xvfcmp_sueq_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_sueq_s(a: m256, b: m256) -> m256i { unsafe { transmute(__lasx_xvfcmp_sueq_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_sule_d(a: m256d, b: m256d) -> m256i { unsafe { transmute(__lasx_xvfcmp_sule_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_sule_s(a: m256, b: m256) -> m256i { unsafe { transmute(__lasx_xvfcmp_sule_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_sult_d(a: m256d, b: m256d) -> m256i { unsafe { transmute(__lasx_xvfcmp_sult_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_sult_s(a: m256, b: m256) -> m256i { unsafe { transmute(__lasx_xvfcmp_sult_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_sun_d(a: m256d, b: m256d) -> m256i { unsafe { transmute(__lasx_xvfcmp_sun_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_sune_d(a: m256d, b: m256d) -> m256i { unsafe { transmute(__lasx_xvfcmp_sune_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_sune_s(a: m256, b: m256) -> m256i { unsafe { transmute(__lasx_xvfcmp_sune_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvfcmp_sun_s(a: m256, b: m256) -> m256i { unsafe { transmute(__lasx_xvfcmp_sun_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvpickve_d_f(a: m256d) -> m256d { static_assert_uimm_bits!(IMM2, 2); unsafe { transmute(__lasx_xvpickve_d_f(transmute(a), IMM2)) } @@ -4425,8 +4311,7 @@ pub fn lasx_xvpickve_d_f(a: m256d) -> m256d { #[inline] #[target_feature(enable = "lasx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_xvpickve_w_f(a: m256) -> m256 { static_assert_uimm_bits!(IMM3, 3); unsafe { transmute(__lasx_xvpickve_w_f(transmute(a), IMM3)) } @@ -4434,126 +4319,126 @@ pub fn lasx_xvpickve_w_f(a: m256) -> m256 { #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_cast_128_s(a: m128) -> m256 { unsafe { transmute(__lasx_cast_128_s(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_cast_128_d(a: m128d) -> m256d { unsafe { transmute(__lasx_cast_128_d(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_cast_128(a: m128i) -> m256i { unsafe { transmute(__lasx_cast_128(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_concat_128_s(a: m128, b: m128) -> m256 { unsafe { transmute(__lasx_concat_128_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_concat_128_d(a: m128d, b: m128d) -> m256d { unsafe { transmute(__lasx_concat_128_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_concat_128(a: m128i, b: m128i) -> m256i { unsafe { transmute(__lasx_concat_128(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_extract_128_lo_s(a: m256) -> m128 { unsafe { transmute(__lasx_extract_128_lo_s(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_extract_128_hi_s(a: m256) -> m128 { unsafe { transmute(__lasx_extract_128_hi_s(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_extract_128_lo_d(a: m256d) -> m128d { unsafe { transmute(__lasx_extract_128_lo_d(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_extract_128_hi_d(a: m256d) -> m128d { unsafe { transmute(__lasx_extract_128_hi_d(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_extract_128_lo(a: m256i) -> m128i { unsafe { transmute(__lasx_extract_128_lo(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_extract_128_hi(a: m256i) -> m128i { unsafe { transmute(__lasx_extract_128_hi(transmute(a))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_insert_128_lo_s(a: m256, b: m128) -> m256 { unsafe { transmute(__lasx_insert_128_lo_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_insert_128_hi_s(a: m256, b: m128) -> m256 { unsafe { transmute(__lasx_insert_128_hi_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_insert_128_lo_d(a: m256d, b: m128d) -> m256d { unsafe { transmute(__lasx_insert_128_lo_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_insert_128_hi_d(a: m256d, b: m128d) -> m256d { unsafe { transmute(__lasx_insert_128_hi_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_insert_128_lo(a: m256i, b: m128i) -> m256i { unsafe { transmute(__lasx_insert_128_lo(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lasx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lasx_insert_128_hi(a: m256i, b: m128i) -> m256i { unsafe { transmute(__lasx_insert_128_hi(transmute(a), transmute(b))) } } diff --git a/library/stdarch/crates/core_arch/src/loongarch64/lasx/mod.rs b/library/stdarch/crates/core_arch/src/loongarch64/lasx/mod.rs index cc449e94924f0..22cdfa025b5d8 100644 --- a/library/stdarch/crates/core_arch/src/loongarch64/lasx/mod.rs +++ b/library/stdarch/crates/core_arch/src/loongarch64/lasx/mod.rs @@ -6,21 +6,21 @@ mod types; #[rustfmt::skip] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub use self::types::*; #[rustfmt::skip] mod generated; #[rustfmt::skip] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub use self::generated::*; #[rustfmt::skip] mod portable; #[rustfmt::skip] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub use self::portable::*; #[rustfmt::skip] diff --git a/library/stdarch/crates/core_arch/src/loongarch64/lasx/types.rs b/library/stdarch/crates/core_arch/src/loongarch64/lasx/types.rs index a8ceede873907..5bbf113c63097 100644 --- a/library/stdarch/crates/core_arch/src/loongarch64/lasx/types.rs +++ b/library/stdarch/crates/core_arch/src/loongarch64/lasx/types.rs @@ -1,5 +1,5 @@ types! { - #![unstable(feature = "stdarch_loongarch", issue = "117427")] + #![stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] /// 256-bit wide integer vector type, LoongArch-specific /// diff --git a/library/stdarch/crates/core_arch/src/loongarch64/lsx/generated.rs b/library/stdarch/crates/core_arch/src/loongarch64/lsx/generated.rs index 601b40467c6b2..d2d065abf665a 100644 --- a/library/stdarch/crates/core_arch/src/loongarch64/lsx/generated.rs +++ b/library/stdarch/crates/core_arch/src/loongarch64/lsx/generated.rs @@ -861,36 +861,35 @@ unsafe extern "llvm-intrinsic" { #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrar_b(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsrar_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrar_h(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsrar_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrar_w(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsrar_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrar_d(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsrar_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrari_b(a: m128i) -> m128i { static_assert_uimm_bits!(IMM3, 3); unsafe { transmute(__lsx_vsrari_b(transmute(a), IMM3)) } @@ -898,8 +897,7 @@ pub fn lsx_vsrari_b(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrari_h(a: m128i) -> m128i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lsx_vsrari_h(transmute(a), IMM4)) } @@ -907,8 +905,7 @@ pub fn lsx_vsrari_h(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrari_w(a: m128i) -> m128i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lsx_vsrari_w(transmute(a), IMM5)) } @@ -916,8 +913,7 @@ pub fn lsx_vsrari_w(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrari_d(a: m128i) -> m128i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lsx_vsrari_d(transmute(a), IMM6)) } @@ -925,36 +921,35 @@ pub fn lsx_vsrari_d(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrlr_b(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsrlr_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrlr_h(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsrlr_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrlr_w(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsrlr_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrlr_d(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsrlr_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrlri_b(a: m128i) -> m128i { static_assert_uimm_bits!(IMM3, 3); unsafe { transmute(__lsx_vsrlri_b(transmute(a), IMM3)) } @@ -962,8 +957,7 @@ pub fn lsx_vsrlri_b(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrlri_h(a: m128i) -> m128i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lsx_vsrlri_h(transmute(a), IMM4)) } @@ -971,8 +965,7 @@ pub fn lsx_vsrlri_h(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrlri_w(a: m128i) -> m128i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lsx_vsrlri_w(transmute(a), IMM5)) } @@ -980,8 +973,7 @@ pub fn lsx_vsrlri_w(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrlri_d(a: m128i) -> m128i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lsx_vsrlri_d(transmute(a), IMM6)) } @@ -989,8 +981,7 @@ pub fn lsx_vsrlri_d(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vbitclri_b(a: m128i) -> m128i { static_assert_uimm_bits!(IMM3, 3); unsafe { transmute(__lsx_vbitclri_b(transmute(a), IMM3)) } @@ -998,8 +989,7 @@ pub fn lsx_vbitclri_b(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vbitclri_h(a: m128i) -> m128i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lsx_vbitclri_h(transmute(a), IMM4)) } @@ -1007,8 +997,7 @@ pub fn lsx_vbitclri_h(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vbitclri_w(a: m128i) -> m128i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lsx_vbitclri_w(transmute(a), IMM5)) } @@ -1016,8 +1005,7 @@ pub fn lsx_vbitclri_w(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vbitclri_d(a: m128i) -> m128i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lsx_vbitclri_d(transmute(a), IMM6)) } @@ -1025,8 +1013,7 @@ pub fn lsx_vbitclri_d(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vbitseti_b(a: m128i) -> m128i { static_assert_uimm_bits!(IMM3, 3); unsafe { transmute(__lsx_vbitseti_b(transmute(a), IMM3)) } @@ -1034,8 +1021,7 @@ pub fn lsx_vbitseti_b(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vbitseti_h(a: m128i) -> m128i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lsx_vbitseti_h(transmute(a), IMM4)) } @@ -1043,8 +1029,7 @@ pub fn lsx_vbitseti_h(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vbitseti_w(a: m128i) -> m128i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lsx_vbitseti_w(transmute(a), IMM5)) } @@ -1052,8 +1037,7 @@ pub fn lsx_vbitseti_w(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vbitseti_d(a: m128i) -> m128i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lsx_vbitseti_d(transmute(a), IMM6)) } @@ -1061,8 +1045,7 @@ pub fn lsx_vbitseti_d(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vbitrevi_b(a: m128i) -> m128i { static_assert_uimm_bits!(IMM3, 3); unsafe { transmute(__lsx_vbitrevi_b(transmute(a), IMM3)) } @@ -1070,8 +1053,7 @@ pub fn lsx_vbitrevi_b(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vbitrevi_h(a: m128i) -> m128i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lsx_vbitrevi_h(transmute(a), IMM4)) } @@ -1079,8 +1061,7 @@ pub fn lsx_vbitrevi_h(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vbitrevi_w(a: m128i) -> m128i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lsx_vbitrevi_w(transmute(a), IMM5)) } @@ -1088,8 +1069,7 @@ pub fn lsx_vbitrevi_w(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vbitrevi_d(a: m128i) -> m128i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lsx_vbitrevi_d(transmute(a), IMM6)) } @@ -1097,8 +1077,7 @@ pub fn lsx_vbitrevi_d(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsubi_bu(a: m128i) -> m128i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lsx_vsubi_bu(transmute(a), IMM5)) } @@ -1106,8 +1085,7 @@ pub fn lsx_vsubi_bu(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsubi_hu(a: m128i) -> m128i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lsx_vsubi_hu(transmute(a), IMM5)) } @@ -1115,8 +1093,7 @@ pub fn lsx_vsubi_hu(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsubi_wu(a: m128i) -> m128i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lsx_vsubi_wu(transmute(a), IMM5)) } @@ -1124,8 +1101,7 @@ pub fn lsx_vsubi_wu(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsubi_du(a: m128i) -> m128i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lsx_vsubi_du(transmute(a), IMM5)) } @@ -1133,8 +1109,7 @@ pub fn lsx_vsubi_du(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsat_b(a: m128i) -> m128i { static_assert_uimm_bits!(IMM3, 3); unsafe { transmute(__lsx_vsat_b(transmute(a), IMM3)) } @@ -1142,8 +1117,7 @@ pub fn lsx_vsat_b(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsat_h(a: m128i) -> m128i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lsx_vsat_h(transmute(a), IMM4)) } @@ -1151,8 +1125,7 @@ pub fn lsx_vsat_h(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsat_w(a: m128i) -> m128i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lsx_vsat_w(transmute(a), IMM5)) } @@ -1160,8 +1133,7 @@ pub fn lsx_vsat_w(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsat_d(a: m128i) -> m128i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lsx_vsat_d(transmute(a), IMM6)) } @@ -1169,8 +1141,7 @@ pub fn lsx_vsat_d(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsat_bu(a: m128i) -> m128i { static_assert_uimm_bits!(IMM3, 3); unsafe { transmute(__lsx_vsat_bu(transmute(a), IMM3)) } @@ -1178,8 +1149,7 @@ pub fn lsx_vsat_bu(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsat_hu(a: m128i) -> m128i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lsx_vsat_hu(transmute(a), IMM4)) } @@ -1187,8 +1157,7 @@ pub fn lsx_vsat_hu(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsat_wu(a: m128i) -> m128i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lsx_vsat_wu(transmute(a), IMM5)) } @@ -1196,8 +1165,7 @@ pub fn lsx_vsat_wu(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsat_du(a: m128i) -> m128i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lsx_vsat_du(transmute(a), IMM6)) } @@ -1205,253 +1173,252 @@ pub fn lsx_vsat_du(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vdiv_b(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vdiv_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vdiv_h(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vdiv_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vdiv_w(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vdiv_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vdiv_d(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vdiv_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vdiv_bu(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vdiv_bu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vdiv_hu(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vdiv_hu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vdiv_wu(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vdiv_wu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vdiv_du(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vdiv_du(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vhaddw_h_b(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vhaddw_h_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vhaddw_w_h(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vhaddw_w_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vhaddw_d_w(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vhaddw_d_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vhaddw_hu_bu(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vhaddw_hu_bu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vhaddw_wu_hu(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vhaddw_wu_hu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vhaddw_du_wu(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vhaddw_du_wu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vhsubw_h_b(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vhsubw_h_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vhsubw_w_h(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vhsubw_w_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vhsubw_d_w(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vhsubw_d_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vhsubw_hu_bu(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vhsubw_hu_bu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vhsubw_wu_hu(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vhsubw_wu_hu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vhsubw_du_wu(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vhsubw_du_wu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmod_b(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vmod_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmod_h(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vmod_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmod_w(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vmod_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmod_d(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vmod_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmod_bu(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vmod_bu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmod_hu(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vmod_hu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmod_wu(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vmod_wu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmod_du(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vmod_du(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vreplve_b(a: m128i, b: i32) -> m128i { unsafe { transmute(__lsx_vreplve_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vreplve_h(a: m128i, b: i32) -> m128i { unsafe { transmute(__lsx_vreplve_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vreplve_w(a: m128i, b: i32) -> m128i { unsafe { transmute(__lsx_vreplve_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vreplve_d(a: m128i, b: i32) -> m128i { unsafe { transmute(__lsx_vreplve_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vshuf_h(a: m128i, b: m128i, c: m128i) -> m128i { unsafe { transmute(__lsx_vshuf_h(transmute(a), transmute(b), transmute(c))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vshuf_w(a: m128i, b: m128i, c: m128i) -> m128i { unsafe { transmute(__lsx_vshuf_w(transmute(a), transmute(b), transmute(c))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vshuf_d(a: m128i, b: m128i, c: m128i) -> m128i { unsafe { transmute(__lsx_vshuf_d(transmute(a), transmute(b), transmute(c))) } } #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vandi_b(a: m128i) -> m128i { static_assert_uimm_bits!(IMM8, 8); unsafe { transmute(__lsx_vandi_b(transmute(a), IMM8)) } @@ -1459,8 +1426,7 @@ pub fn lsx_vandi_b(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vori_b(a: m128i) -> m128i { static_assert_uimm_bits!(IMM8, 8); unsafe { transmute(__lsx_vori_b(transmute(a), IMM8)) } @@ -1468,8 +1434,7 @@ pub fn lsx_vori_b(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vnori_b(a: m128i) -> m128i { static_assert_uimm_bits!(IMM8, 8); unsafe { transmute(__lsx_vnori_b(transmute(a), IMM8)) } @@ -1477,8 +1442,7 @@ pub fn lsx_vnori_b(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vxori_b(a: m128i) -> m128i { static_assert_uimm_bits!(IMM8, 8); unsafe { transmute(__lsx_vxori_b(transmute(a), IMM8)) } @@ -1486,15 +1450,14 @@ pub fn lsx_vxori_b(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vbitsel_v(a: m128i, b: m128i, c: m128i) -> m128i { unsafe { transmute(__lsx_vbitsel_v(transmute(a), transmute(b), transmute(c))) } } #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vbitseli_b(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM8, 8); unsafe { transmute(__lsx_vbitseli_b(transmute(a), transmute(b), IMM8)) } @@ -1502,288 +1465,287 @@ pub fn lsx_vbitseli_b(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vclo_b(a: m128i) -> m128i { unsafe { transmute(__lsx_vclo_b(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vclo_h(a: m128i) -> m128i { unsafe { transmute(__lsx_vclo_h(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vclo_w(a: m128i) -> m128i { unsafe { transmute(__lsx_vclo_w(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vclo_d(a: m128i) -> m128i { unsafe { transmute(__lsx_vclo_d(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcvt_h_s(a: m128, b: m128) -> m128i { unsafe { transmute(__lsx_vfcvt_h_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcvt_s_d(a: m128d, b: m128d) -> m128 { unsafe { transmute(__lsx_vfcvt_s_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfmin_s(a: m128, b: m128) -> m128 { unsafe { transmute(__lsx_vfmin_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfmin_d(a: m128d, b: m128d) -> m128d { unsafe { transmute(__lsx_vfmin_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfmina_s(a: m128, b: m128) -> m128 { unsafe { transmute(__lsx_vfmina_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfmina_d(a: m128d, b: m128d) -> m128d { unsafe { transmute(__lsx_vfmina_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfmax_s(a: m128, b: m128) -> m128 { unsafe { transmute(__lsx_vfmax_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfmax_d(a: m128d, b: m128d) -> m128d { unsafe { transmute(__lsx_vfmax_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfmaxa_s(a: m128, b: m128) -> m128 { unsafe { transmute(__lsx_vfmaxa_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfmaxa_d(a: m128d, b: m128d) -> m128d { unsafe { transmute(__lsx_vfmaxa_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfclass_s(a: m128) -> m128i { unsafe { transmute(__lsx_vfclass_s(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfclass_d(a: m128d) -> m128i { unsafe { transmute(__lsx_vfclass_d(transmute(a))) } } #[inline] #[target_feature(enable = "lsx,frecipe")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfrecipe_s(a: m128) -> m128 { unsafe { transmute(__lsx_vfrecipe_s(transmute(a))) } } #[inline] #[target_feature(enable = "lsx,frecipe")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfrecipe_d(a: m128d) -> m128d { unsafe { transmute(__lsx_vfrecipe_d(transmute(a))) } } #[inline] #[target_feature(enable = "lsx,frecipe")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfrsqrte_s(a: m128) -> m128 { unsafe { transmute(__lsx_vfrsqrte_s(transmute(a))) } } #[inline] #[target_feature(enable = "lsx,frecipe")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfrsqrte_d(a: m128d) -> m128d { unsafe { transmute(__lsx_vfrsqrte_d(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfrint_s(a: m128) -> m128 { unsafe { transmute(__lsx_vfrint_s(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfrint_d(a: m128d) -> m128d { unsafe { transmute(__lsx_vfrint_d(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vflogb_s(a: m128) -> m128 { unsafe { transmute(__lsx_vflogb_s(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vflogb_d(a: m128d) -> m128d { unsafe { transmute(__lsx_vflogb_d(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcvth_s_h(a: m128i) -> m128 { unsafe { transmute(__lsx_vfcvth_s_h(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcvth_d_s(a: m128) -> m128d { unsafe { transmute(__lsx_vfcvth_d_s(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcvtl_s_h(a: m128i) -> m128 { unsafe { transmute(__lsx_vfcvtl_s_h(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcvtl_d_s(a: m128) -> m128d { unsafe { transmute(__lsx_vfcvtl_d_s(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vftint_w_s(a: m128) -> m128i { unsafe { transmute(__lsx_vftint_w_s(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vftint_l_d(a: m128d) -> m128i { unsafe { transmute(__lsx_vftint_l_d(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vftint_wu_s(a: m128) -> m128i { unsafe { transmute(__lsx_vftint_wu_s(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vftint_lu_d(a: m128d) -> m128i { unsafe { transmute(__lsx_vftint_lu_d(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vftintrz_w_s(a: m128) -> m128i { unsafe { transmute(__lsx_vftintrz_w_s(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vftintrz_l_d(a: m128d) -> m128i { unsafe { transmute(__lsx_vftintrz_l_d(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vftintrz_wu_s(a: m128) -> m128i { unsafe { transmute(__lsx_vftintrz_wu_s(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vftintrz_lu_d(a: m128d) -> m128i { unsafe { transmute(__lsx_vftintrz_lu_d(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vffint_s_w(a: m128i) -> m128 { unsafe { transmute(__lsx_vffint_s_w(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vffint_d_l(a: m128i) -> m128d { unsafe { transmute(__lsx_vffint_d_l(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vffint_s_wu(a: m128i) -> m128 { unsafe { transmute(__lsx_vffint_s_wu(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vffint_d_lu(a: m128i) -> m128d { unsafe { transmute(__lsx_vffint_d_lu(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsllwil_h_b(a: m128i) -> m128i { static_assert_uimm_bits!(IMM3, 3); unsafe { transmute(__lsx_vsllwil_h_b(transmute(a), IMM3)) } @@ -1791,8 +1753,7 @@ pub fn lsx_vsllwil_h_b(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsllwil_w_h(a: m128i) -> m128i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lsx_vsllwil_w_h(transmute(a), IMM4)) } @@ -1800,8 +1761,7 @@ pub fn lsx_vsllwil_w_h(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsllwil_d_w(a: m128i) -> m128i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lsx_vsllwil_d_w(transmute(a), IMM5)) } @@ -1809,8 +1769,7 @@ pub fn lsx_vsllwil_d_w(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsllwil_hu_bu(a: m128i) -> m128i { static_assert_uimm_bits!(IMM3, 3); unsafe { transmute(__lsx_vsllwil_hu_bu(transmute(a), IMM3)) } @@ -1818,8 +1777,7 @@ pub fn lsx_vsllwil_hu_bu(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsllwil_wu_hu(a: m128i) -> m128i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lsx_vsllwil_wu_hu(transmute(a), IMM4)) } @@ -1827,8 +1785,7 @@ pub fn lsx_vsllwil_wu_hu(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsllwil_du_wu(a: m128i) -> m128i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lsx_vsllwil_du_wu(transmute(a), IMM5)) } @@ -1836,218 +1793,217 @@ pub fn lsx_vsllwil_du_wu(a: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsran_b_h(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsran_b_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsran_h_w(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsran_h_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsran_w_d(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsran_w_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssran_b_h(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vssran_b_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssran_h_w(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vssran_h_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssran_w_d(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vssran_w_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssran_bu_h(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vssran_bu_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssran_hu_w(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vssran_hu_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssran_wu_d(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vssran_wu_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrarn_b_h(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsrarn_b_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrarn_h_w(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsrarn_h_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrarn_w_d(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsrarn_w_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrarn_b_h(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vssrarn_b_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrarn_h_w(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vssrarn_h_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrarn_w_d(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vssrarn_w_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrarn_bu_h(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vssrarn_bu_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrarn_hu_w(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vssrarn_hu_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrarn_wu_d(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vssrarn_wu_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrln_b_h(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsrln_b_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrln_h_w(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsrln_h_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrln_w_d(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsrln_w_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrln_bu_h(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vssrln_bu_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrln_hu_w(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vssrln_hu_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrln_wu_d(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vssrln_wu_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrlrn_b_h(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsrlrn_b_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrlrn_h_w(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsrlrn_h_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrlrn_w_d(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsrlrn_w_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrlrn_bu_h(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vssrlrn_bu_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrlrn_hu_w(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vssrlrn_hu_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrlrn_wu_d(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vssrlrn_wu_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfrstpi_b(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lsx_vfrstpi_b(transmute(a), transmute(b), IMM5)) } @@ -2055,8 +2011,7 @@ pub fn lsx_vfrstpi_b(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfrstpi_h(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lsx_vfrstpi_h(transmute(a), transmute(b), IMM5)) } @@ -2064,22 +2019,21 @@ pub fn lsx_vfrstpi_h(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfrstp_b(a: m128i, b: m128i, c: m128i) -> m128i { unsafe { transmute(__lsx_vfrstp_b(transmute(a), transmute(b), transmute(c))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfrstp_h(a: m128i, b: m128i, c: m128i) -> m128i { unsafe { transmute(__lsx_vfrstp_h(transmute(a), transmute(b), transmute(c))) } } #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vextrins_b(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM8, 8); unsafe { transmute(__lsx_vextrins_b(transmute(a), transmute(b), IMM8)) } @@ -2087,8 +2041,7 @@ pub fn lsx_vextrins_b(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vextrins_h(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM8, 8); unsafe { transmute(__lsx_vextrins_h(transmute(a), transmute(b), IMM8)) } @@ -2096,8 +2049,7 @@ pub fn lsx_vextrins_h(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vextrins_w(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM8, 8); unsafe { transmute(__lsx_vextrins_w(transmute(a), transmute(b), IMM8)) } @@ -2105,8 +2057,7 @@ pub fn lsx_vextrins_w(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vextrins_d(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM8, 8); unsafe { transmute(__lsx_vextrins_d(transmute(a), transmute(b), IMM8)) } @@ -2114,246 +2065,245 @@ pub fn lsx_vextrins_d(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmskltz_b(a: m128i) -> m128i { unsafe { transmute(__lsx_vmskltz_b(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmskltz_h(a: m128i) -> m128i { unsafe { transmute(__lsx_vmskltz_h(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmskltz_w(a: m128i) -> m128i { unsafe { transmute(__lsx_vmskltz_w(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmskltz_d(a: m128i) -> m128i { unsafe { transmute(__lsx_vmskltz_d(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsigncov_b(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsigncov_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsigncov_h(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsigncov_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsigncov_w(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsigncov_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsigncov_d(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsigncov_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vftintrne_w_s(a: m128) -> m128i { unsafe { transmute(__lsx_vftintrne_w_s(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vftintrne_l_d(a: m128d) -> m128i { unsafe { transmute(__lsx_vftintrne_l_d(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vftintrp_w_s(a: m128) -> m128i { unsafe { transmute(__lsx_vftintrp_w_s(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vftintrp_l_d(a: m128d) -> m128i { unsafe { transmute(__lsx_vftintrp_l_d(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vftintrm_w_s(a: m128) -> m128i { unsafe { transmute(__lsx_vftintrm_w_s(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vftintrm_l_d(a: m128d) -> m128i { unsafe { transmute(__lsx_vftintrm_l_d(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vftint_w_d(a: m128d, b: m128d) -> m128i { unsafe { transmute(__lsx_vftint_w_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vffint_s_l(a: m128i, b: m128i) -> m128 { unsafe { transmute(__lsx_vffint_s_l(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vftintrz_w_d(a: m128d, b: m128d) -> m128i { unsafe { transmute(__lsx_vftintrz_w_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vftintrp_w_d(a: m128d, b: m128d) -> m128i { unsafe { transmute(__lsx_vftintrp_w_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vftintrm_w_d(a: m128d, b: m128d) -> m128i { unsafe { transmute(__lsx_vftintrm_w_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vftintrne_w_d(a: m128d, b: m128d) -> m128i { unsafe { transmute(__lsx_vftintrne_w_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vftintl_l_s(a: m128) -> m128i { unsafe { transmute(__lsx_vftintl_l_s(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vftinth_l_s(a: m128) -> m128i { unsafe { transmute(__lsx_vftinth_l_s(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vffinth_d_w(a: m128i) -> m128d { unsafe { transmute(__lsx_vffinth_d_w(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vffintl_d_w(a: m128i) -> m128d { unsafe { transmute(__lsx_vffintl_d_w(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vftintrzl_l_s(a: m128) -> m128i { unsafe { transmute(__lsx_vftintrzl_l_s(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vftintrzh_l_s(a: m128) -> m128i { unsafe { transmute(__lsx_vftintrzh_l_s(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vftintrpl_l_s(a: m128) -> m128i { unsafe { transmute(__lsx_vftintrpl_l_s(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vftintrph_l_s(a: m128) -> m128i { unsafe { transmute(__lsx_vftintrph_l_s(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vftintrml_l_s(a: m128) -> m128i { unsafe { transmute(__lsx_vftintrml_l_s(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vftintrmh_l_s(a: m128) -> m128i { unsafe { transmute(__lsx_vftintrmh_l_s(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vftintrnel_l_s(a: m128) -> m128i { unsafe { transmute(__lsx_vftintrnel_l_s(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vftintrneh_l_s(a: m128) -> m128i { unsafe { transmute(__lsx_vftintrneh_l_s(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfrintrne_s(a: m128) -> m128 { unsafe { transmute(__lsx_vfrintrne_s(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfrintrne_d(a: m128d) -> m128d { unsafe { transmute(__lsx_vfrintrne_d(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2, 3)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub unsafe fn lsx_vstelm_b(a: m128i, mem_addr: *mut i8) { static_assert_simm_bits!(IMM_S8, 8); static_assert_uimm_bits!(IMM4, 4); @@ -2362,8 +2312,7 @@ pub unsafe fn lsx_vstelm_b(a: m128i, mem_add #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2, 3)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub unsafe fn lsx_vstelm_h(a: m128i, mem_addr: *mut i8) { static_assert_simm_bits!(IMM_S8, 8); static_assert_uimm_bits!(IMM3, 3); @@ -2372,8 +2321,7 @@ pub unsafe fn lsx_vstelm_h(a: m128i, mem_add #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2, 3)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub unsafe fn lsx_vstelm_w(a: m128i, mem_addr: *mut i8) { static_assert_simm_bits!(IMM_S8, 8); static_assert_uimm_bits!(IMM2, 2); @@ -2382,8 +2330,7 @@ pub unsafe fn lsx_vstelm_w(a: m128i, mem_add #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2, 3)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub unsafe fn lsx_vstelm_d(a: m128i, mem_addr: *mut i8) { static_assert_simm_bits!(IMM_S8, 8); static_assert_uimm_bits!(IMM1, 1); @@ -2392,504 +2339,504 @@ pub unsafe fn lsx_vstelm_d(a: m128i, mem_add #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vaddwev_d_w(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vaddwev_d_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vaddwev_w_h(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vaddwev_w_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vaddwev_h_b(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vaddwev_h_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vaddwod_d_w(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vaddwod_d_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vaddwod_w_h(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vaddwod_w_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vaddwod_h_b(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vaddwod_h_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vaddwev_d_wu(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vaddwev_d_wu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vaddwev_w_hu(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vaddwev_w_hu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vaddwev_h_bu(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vaddwev_h_bu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vaddwod_d_wu(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vaddwod_d_wu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vaddwod_w_hu(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vaddwod_w_hu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vaddwod_h_bu(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vaddwod_h_bu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vaddwev_d_wu_w(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vaddwev_d_wu_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vaddwev_w_hu_h(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vaddwev_w_hu_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vaddwev_h_bu_b(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vaddwev_h_bu_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vaddwod_d_wu_w(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vaddwod_d_wu_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vaddwod_w_hu_h(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vaddwod_w_hu_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vaddwod_h_bu_b(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vaddwod_h_bu_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsubwev_d_w(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsubwev_d_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsubwev_w_h(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsubwev_w_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsubwev_h_b(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsubwev_h_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsubwod_d_w(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsubwod_d_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsubwod_w_h(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsubwod_w_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsubwod_h_b(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsubwod_h_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsubwev_d_wu(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsubwev_d_wu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsubwev_w_hu(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsubwev_w_hu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsubwev_h_bu(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsubwev_h_bu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsubwod_d_wu(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsubwod_d_wu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsubwod_w_hu(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsubwod_w_hu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsubwod_h_bu(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsubwod_h_bu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vaddwev_q_d(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vaddwev_q_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vaddwod_q_d(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vaddwod_q_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vaddwev_q_du(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vaddwev_q_du(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vaddwod_q_du(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vaddwod_q_du(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsubwev_q_d(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsubwev_q_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsubwod_q_d(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsubwod_q_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsubwev_q_du(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsubwev_q_du(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsubwod_q_du(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsubwod_q_du(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vaddwev_q_du_d(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vaddwev_q_du_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vaddwod_q_du_d(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vaddwod_q_du_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmulwev_d_w(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vmulwev_d_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmulwev_w_h(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vmulwev_w_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmulwev_h_b(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vmulwev_h_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmulwod_d_w(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vmulwod_d_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmulwod_w_h(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vmulwod_w_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmulwod_h_b(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vmulwod_h_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmulwev_d_wu(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vmulwev_d_wu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmulwev_w_hu(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vmulwev_w_hu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmulwev_h_bu(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vmulwev_h_bu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmulwod_d_wu(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vmulwod_d_wu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmulwod_w_hu(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vmulwod_w_hu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmulwod_h_bu(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vmulwod_h_bu(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmulwev_d_wu_w(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vmulwev_d_wu_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmulwev_w_hu_h(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vmulwev_w_hu_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmulwev_h_bu_b(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vmulwev_h_bu_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmulwod_d_wu_w(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vmulwod_d_wu_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmulwod_w_hu_h(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vmulwod_w_hu_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmulwod_h_bu_b(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vmulwod_h_bu_b(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmulwev_q_d(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vmulwev_q_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmulwod_q_d(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vmulwod_q_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmulwev_q_du(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vmulwev_q_du(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmulwod_q_du(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vmulwod_q_du(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmulwev_q_du_d(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vmulwev_q_du_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmulwod_q_du_d(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vmulwod_q_du_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vhaddw_q_d(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vhaddw_q_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vhaddw_qu_du(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vhaddw_qu_du(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vhsubw_q_d(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vhsubw_q_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vhsubw_qu_du(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vhsubw_qu_du(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmaddwev_d_w(a: m128i, b: m128i, c: m128i) -> m128i { unsafe { transmute(__lsx_vmaddwev_d_w(transmute(a), transmute(b), transmute(c))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmaddwev_w_h(a: m128i, b: m128i, c: m128i) -> m128i { unsafe { transmute(__lsx_vmaddwev_w_h(transmute(a), transmute(b), transmute(c))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmaddwev_h_b(a: m128i, b: m128i, c: m128i) -> m128i { unsafe { transmute(__lsx_vmaddwev_h_b(transmute(a), transmute(b), transmute(c))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmaddwev_d_wu(a: m128i, b: m128i, c: m128i) -> m128i { unsafe { transmute(__lsx_vmaddwev_d_wu( @@ -2902,7 +2849,7 @@ pub fn lsx_vmaddwev_d_wu(a: m128i, b: m128i, c: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmaddwev_w_hu(a: m128i, b: m128i, c: m128i) -> m128i { unsafe { transmute(__lsx_vmaddwev_w_hu( @@ -2915,7 +2862,7 @@ pub fn lsx_vmaddwev_w_hu(a: m128i, b: m128i, c: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmaddwev_h_bu(a: m128i, b: m128i, c: m128i) -> m128i { unsafe { transmute(__lsx_vmaddwev_h_bu( @@ -2928,28 +2875,28 @@ pub fn lsx_vmaddwev_h_bu(a: m128i, b: m128i, c: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmaddwod_d_w(a: m128i, b: m128i, c: m128i) -> m128i { unsafe { transmute(__lsx_vmaddwod_d_w(transmute(a), transmute(b), transmute(c))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmaddwod_w_h(a: m128i, b: m128i, c: m128i) -> m128i { unsafe { transmute(__lsx_vmaddwod_w_h(transmute(a), transmute(b), transmute(c))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmaddwod_h_b(a: m128i, b: m128i, c: m128i) -> m128i { unsafe { transmute(__lsx_vmaddwod_h_b(transmute(a), transmute(b), transmute(c))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmaddwod_d_wu(a: m128i, b: m128i, c: m128i) -> m128i { unsafe { transmute(__lsx_vmaddwod_d_wu( @@ -2962,7 +2909,7 @@ pub fn lsx_vmaddwod_d_wu(a: m128i, b: m128i, c: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmaddwod_w_hu(a: m128i, b: m128i, c: m128i) -> m128i { unsafe { transmute(__lsx_vmaddwod_w_hu( @@ -2975,7 +2922,7 @@ pub fn lsx_vmaddwod_w_hu(a: m128i, b: m128i, c: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmaddwod_h_bu(a: m128i, b: m128i, c: m128i) -> m128i { unsafe { transmute(__lsx_vmaddwod_h_bu( @@ -2988,7 +2935,7 @@ pub fn lsx_vmaddwod_h_bu(a: m128i, b: m128i, c: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmaddwev_d_wu_w(a: m128i, b: m128i, c: m128i) -> m128i { unsafe { transmute(__lsx_vmaddwev_d_wu_w( @@ -3001,7 +2948,7 @@ pub fn lsx_vmaddwev_d_wu_w(a: m128i, b: m128i, c: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmaddwev_w_hu_h(a: m128i, b: m128i, c: m128i) -> m128i { unsafe { transmute(__lsx_vmaddwev_w_hu_h( @@ -3014,7 +2961,7 @@ pub fn lsx_vmaddwev_w_hu_h(a: m128i, b: m128i, c: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmaddwev_h_bu_b(a: m128i, b: m128i, c: m128i) -> m128i { unsafe { transmute(__lsx_vmaddwev_h_bu_b( @@ -3027,7 +2974,7 @@ pub fn lsx_vmaddwev_h_bu_b(a: m128i, b: m128i, c: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmaddwod_d_wu_w(a: m128i, b: m128i, c: m128i) -> m128i { unsafe { transmute(__lsx_vmaddwod_d_wu_w( @@ -3040,7 +2987,7 @@ pub fn lsx_vmaddwod_d_wu_w(a: m128i, b: m128i, c: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmaddwod_w_hu_h(a: m128i, b: m128i, c: m128i) -> m128i { unsafe { transmute(__lsx_vmaddwod_w_hu_h( @@ -3053,7 +3000,7 @@ pub fn lsx_vmaddwod_w_hu_h(a: m128i, b: m128i, c: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmaddwod_h_bu_b(a: m128i, b: m128i, c: m128i) -> m128i { unsafe { transmute(__lsx_vmaddwod_h_bu_b( @@ -3066,21 +3013,21 @@ pub fn lsx_vmaddwod_h_bu_b(a: m128i, b: m128i, c: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmaddwev_q_d(a: m128i, b: m128i, c: m128i) -> m128i { unsafe { transmute(__lsx_vmaddwev_q_d(transmute(a), transmute(b), transmute(c))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmaddwod_q_d(a: m128i, b: m128i, c: m128i) -> m128i { unsafe { transmute(__lsx_vmaddwod_q_d(transmute(a), transmute(b), transmute(c))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmaddwev_q_du(a: m128i, b: m128i, c: m128i) -> m128i { unsafe { transmute(__lsx_vmaddwev_q_du( @@ -3093,7 +3040,7 @@ pub fn lsx_vmaddwev_q_du(a: m128i, b: m128i, c: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmaddwod_q_du(a: m128i, b: m128i, c: m128i) -> m128i { unsafe { transmute(__lsx_vmaddwod_q_du( @@ -3106,7 +3053,7 @@ pub fn lsx_vmaddwod_q_du(a: m128i, b: m128i, c: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmaddwev_q_du_d(a: m128i, b: m128i, c: m128i) -> m128i { unsafe { transmute(__lsx_vmaddwev_q_du_d( @@ -3119,7 +3066,7 @@ pub fn lsx_vmaddwev_q_du_d(a: m128i, b: m128i, c: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmaddwod_q_du_d(a: m128i, b: m128i, c: m128i) -> m128i { unsafe { transmute(__lsx_vmaddwod_q_du_d( @@ -3132,22 +3079,21 @@ pub fn lsx_vmaddwod_q_du_d(a: m128i, b: m128i, c: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vadd_q(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vadd_q(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsub_q(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vsub_q(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub unsafe fn lsx_vldrepl_b(mem_addr: *const i8) -> m128i { static_assert_simm_bits!(IMM_S12, 12); transmute(__lsx_vldrepl_b(mem_addr, IMM_S12)) @@ -3155,8 +3101,7 @@ pub unsafe fn lsx_vldrepl_b(mem_addr: *const i8) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub unsafe fn lsx_vldrepl_h(mem_addr: *const i8) -> m128i { static_assert_simm_bits!(IMM_S11, 11); transmute(__lsx_vldrepl_h(mem_addr, IMM_S11)) @@ -3164,8 +3109,7 @@ pub unsafe fn lsx_vldrepl_h(mem_addr: *const i8) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub unsafe fn lsx_vldrepl_w(mem_addr: *const i8) -> m128i { static_assert_simm_bits!(IMM_S10, 10); transmute(__lsx_vldrepl_w(mem_addr, IMM_S10)) @@ -3173,8 +3117,7 @@ pub unsafe fn lsx_vldrepl_w(mem_addr: *const i8) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(1)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub unsafe fn lsx_vldrepl_d(mem_addr: *const i8) -> m128i { static_assert_simm_bits!(IMM_S9, 9); transmute(__lsx_vldrepl_d(mem_addr, IMM_S9)) @@ -3182,85 +3125,84 @@ pub unsafe fn lsx_vldrepl_d(mem_addr: *const i8) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmskgez_b(a: m128i) -> m128i { unsafe { transmute(__lsx_vmskgez_b(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vmsknz_b(a: m128i) -> m128i { unsafe { transmute(__lsx_vmsknz_b(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vexth_h_b(a: m128i) -> m128i { unsafe { transmute(__lsx_vexth_h_b(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vexth_w_h(a: m128i) -> m128i { unsafe { transmute(__lsx_vexth_w_h(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vexth_d_w(a: m128i) -> m128i { unsafe { transmute(__lsx_vexth_d_w(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vexth_q_d(a: m128i) -> m128i { unsafe { transmute(__lsx_vexth_q_d(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vexth_hu_bu(a: m128i) -> m128i { unsafe { transmute(__lsx_vexth_hu_bu(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vexth_wu_hu(a: m128i) -> m128i { unsafe { transmute(__lsx_vexth_wu_hu(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vexth_du_wu(a: m128i) -> m128i { unsafe { transmute(__lsx_vexth_du_wu(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vexth_qu_du(a: m128i) -> m128i { unsafe { transmute(__lsx_vexth_qu_du(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vextl_q_d(a: m128i) -> m128i { unsafe { transmute(__lsx_vextl_q_d(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrlni_b_h(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lsx_vsrlni_b_h(transmute(a), transmute(b), IMM4)) } @@ -3268,8 +3210,7 @@ pub fn lsx_vsrlni_b_h(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrlni_h_w(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lsx_vsrlni_h_w(transmute(a), transmute(b), IMM5)) } @@ -3277,8 +3218,7 @@ pub fn lsx_vsrlni_h_w(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrlni_w_d(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lsx_vsrlni_w_d(transmute(a), transmute(b), IMM6)) } @@ -3286,8 +3226,7 @@ pub fn lsx_vsrlni_w_d(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrlni_d_q(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM7, 7); unsafe { transmute(__lsx_vsrlni_d_q(transmute(a), transmute(b), IMM7)) } @@ -3295,8 +3234,7 @@ pub fn lsx_vsrlni_d_q(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrlrni_b_h(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lsx_vsrlrni_b_h(transmute(a), transmute(b), IMM4)) } @@ -3304,8 +3242,7 @@ pub fn lsx_vsrlrni_b_h(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrlrni_h_w(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lsx_vsrlrni_h_w(transmute(a), transmute(b), IMM5)) } @@ -3313,8 +3250,7 @@ pub fn lsx_vsrlrni_h_w(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrlrni_w_d(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lsx_vsrlrni_w_d(transmute(a), transmute(b), IMM6)) } @@ -3322,8 +3258,7 @@ pub fn lsx_vsrlrni_w_d(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrlrni_d_q(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM7, 7); unsafe { transmute(__lsx_vsrlrni_d_q(transmute(a), transmute(b), IMM7)) } @@ -3331,8 +3266,7 @@ pub fn lsx_vsrlrni_d_q(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrlni_b_h(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lsx_vssrlni_b_h(transmute(a), transmute(b), IMM4)) } @@ -3340,8 +3274,7 @@ pub fn lsx_vssrlni_b_h(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrlni_h_w(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lsx_vssrlni_h_w(transmute(a), transmute(b), IMM5)) } @@ -3349,8 +3282,7 @@ pub fn lsx_vssrlni_h_w(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrlni_w_d(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lsx_vssrlni_w_d(transmute(a), transmute(b), IMM6)) } @@ -3358,8 +3290,7 @@ pub fn lsx_vssrlni_w_d(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrlni_d_q(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM7, 7); unsafe { transmute(__lsx_vssrlni_d_q(transmute(a), transmute(b), IMM7)) } @@ -3367,8 +3298,7 @@ pub fn lsx_vssrlni_d_q(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrlni_bu_h(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lsx_vssrlni_bu_h(transmute(a), transmute(b), IMM4)) } @@ -3376,8 +3306,7 @@ pub fn lsx_vssrlni_bu_h(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrlni_hu_w(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lsx_vssrlni_hu_w(transmute(a), transmute(b), IMM5)) } @@ -3385,8 +3314,7 @@ pub fn lsx_vssrlni_hu_w(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrlni_wu_d(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lsx_vssrlni_wu_d(transmute(a), transmute(b), IMM6)) } @@ -3394,8 +3322,7 @@ pub fn lsx_vssrlni_wu_d(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrlni_du_q(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM7, 7); unsafe { transmute(__lsx_vssrlni_du_q(transmute(a), transmute(b), IMM7)) } @@ -3403,8 +3330,7 @@ pub fn lsx_vssrlni_du_q(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrlrni_b_h(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lsx_vssrlrni_b_h(transmute(a), transmute(b), IMM4)) } @@ -3412,8 +3338,7 @@ pub fn lsx_vssrlrni_b_h(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrlrni_h_w(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lsx_vssrlrni_h_w(transmute(a), transmute(b), IMM5)) } @@ -3421,8 +3346,7 @@ pub fn lsx_vssrlrni_h_w(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrlrni_w_d(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lsx_vssrlrni_w_d(transmute(a), transmute(b), IMM6)) } @@ -3430,8 +3354,7 @@ pub fn lsx_vssrlrni_w_d(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrlrni_d_q(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM7, 7); unsafe { transmute(__lsx_vssrlrni_d_q(transmute(a), transmute(b), IMM7)) } @@ -3439,8 +3362,7 @@ pub fn lsx_vssrlrni_d_q(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrlrni_bu_h(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lsx_vssrlrni_bu_h(transmute(a), transmute(b), IMM4)) } @@ -3448,8 +3370,7 @@ pub fn lsx_vssrlrni_bu_h(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrlrni_hu_w(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lsx_vssrlrni_hu_w(transmute(a), transmute(b), IMM5)) } @@ -3457,8 +3378,7 @@ pub fn lsx_vssrlrni_hu_w(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrlrni_wu_d(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lsx_vssrlrni_wu_d(transmute(a), transmute(b), IMM6)) } @@ -3466,8 +3386,7 @@ pub fn lsx_vssrlrni_wu_d(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrlrni_du_q(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM7, 7); unsafe { transmute(__lsx_vssrlrni_du_q(transmute(a), transmute(b), IMM7)) } @@ -3475,8 +3394,7 @@ pub fn lsx_vssrlrni_du_q(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrani_b_h(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lsx_vsrani_b_h(transmute(a), transmute(b), IMM4)) } @@ -3484,8 +3402,7 @@ pub fn lsx_vsrani_b_h(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrani_h_w(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lsx_vsrani_h_w(transmute(a), transmute(b), IMM5)) } @@ -3493,8 +3410,7 @@ pub fn lsx_vsrani_h_w(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrani_w_d(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lsx_vsrani_w_d(transmute(a), transmute(b), IMM6)) } @@ -3502,8 +3418,7 @@ pub fn lsx_vsrani_w_d(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrani_d_q(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM7, 7); unsafe { transmute(__lsx_vsrani_d_q(transmute(a), transmute(b), IMM7)) } @@ -3511,8 +3426,7 @@ pub fn lsx_vsrani_d_q(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrarni_b_h(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lsx_vsrarni_b_h(transmute(a), transmute(b), IMM4)) } @@ -3520,8 +3434,7 @@ pub fn lsx_vsrarni_b_h(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrarni_h_w(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lsx_vsrarni_h_w(transmute(a), transmute(b), IMM5)) } @@ -3529,8 +3442,7 @@ pub fn lsx_vsrarni_h_w(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrarni_w_d(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lsx_vsrarni_w_d(transmute(a), transmute(b), IMM6)) } @@ -3538,8 +3450,7 @@ pub fn lsx_vsrarni_w_d(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vsrarni_d_q(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM7, 7); unsafe { transmute(__lsx_vsrarni_d_q(transmute(a), transmute(b), IMM7)) } @@ -3547,8 +3458,7 @@ pub fn lsx_vsrarni_d_q(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrani_b_h(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lsx_vssrani_b_h(transmute(a), transmute(b), IMM4)) } @@ -3556,8 +3466,7 @@ pub fn lsx_vssrani_b_h(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrani_h_w(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lsx_vssrani_h_w(transmute(a), transmute(b), IMM5)) } @@ -3565,8 +3474,7 @@ pub fn lsx_vssrani_h_w(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrani_w_d(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lsx_vssrani_w_d(transmute(a), transmute(b), IMM6)) } @@ -3574,8 +3482,7 @@ pub fn lsx_vssrani_w_d(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrani_d_q(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM7, 7); unsafe { transmute(__lsx_vssrani_d_q(transmute(a), transmute(b), IMM7)) } @@ -3583,8 +3490,7 @@ pub fn lsx_vssrani_d_q(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrani_bu_h(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lsx_vssrani_bu_h(transmute(a), transmute(b), IMM4)) } @@ -3592,8 +3498,7 @@ pub fn lsx_vssrani_bu_h(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrani_hu_w(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lsx_vssrani_hu_w(transmute(a), transmute(b), IMM5)) } @@ -3601,8 +3506,7 @@ pub fn lsx_vssrani_hu_w(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrani_wu_d(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lsx_vssrani_wu_d(transmute(a), transmute(b), IMM6)) } @@ -3610,8 +3514,7 @@ pub fn lsx_vssrani_wu_d(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrani_du_q(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM7, 7); unsafe { transmute(__lsx_vssrani_du_q(transmute(a), transmute(b), IMM7)) } @@ -3619,8 +3522,7 @@ pub fn lsx_vssrani_du_q(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrarni_b_h(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lsx_vssrarni_b_h(transmute(a), transmute(b), IMM4)) } @@ -3628,8 +3530,7 @@ pub fn lsx_vssrarni_b_h(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrarni_h_w(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lsx_vssrarni_h_w(transmute(a), transmute(b), IMM5)) } @@ -3637,8 +3538,7 @@ pub fn lsx_vssrarni_h_w(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrarni_w_d(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lsx_vssrarni_w_d(transmute(a), transmute(b), IMM6)) } @@ -3646,8 +3546,7 @@ pub fn lsx_vssrarni_w_d(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrarni_d_q(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM7, 7); unsafe { transmute(__lsx_vssrarni_d_q(transmute(a), transmute(b), IMM7)) } @@ -3655,8 +3554,7 @@ pub fn lsx_vssrarni_d_q(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrarni_bu_h(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM4, 4); unsafe { transmute(__lsx_vssrarni_bu_h(transmute(a), transmute(b), IMM4)) } @@ -3664,8 +3562,7 @@ pub fn lsx_vssrarni_bu_h(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrarni_hu_w(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM5, 5); unsafe { transmute(__lsx_vssrarni_hu_w(transmute(a), transmute(b), IMM5)) } @@ -3673,8 +3570,7 @@ pub fn lsx_vssrarni_hu_w(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrarni_wu_d(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM6, 6); unsafe { transmute(__lsx_vssrarni_wu_d(transmute(a), transmute(b), IMM6)) } @@ -3682,8 +3578,7 @@ pub fn lsx_vssrarni_wu_d(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrarni_du_q(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM7, 7); unsafe { transmute(__lsx_vssrarni_du_q(transmute(a), transmute(b), IMM7)) } @@ -3691,8 +3586,7 @@ pub fn lsx_vssrarni_du_q(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[rustc_legacy_const_generics(2)] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vpermi_w(a: m128i, b: m128i) -> m128i { static_assert_uimm_bits!(IMM8, 8); unsafe { transmute(__lsx_vpermi_w(transmute(a), transmute(b), IMM8)) } @@ -3700,434 +3594,434 @@ pub fn lsx_vpermi_w(a: m128i, b: m128i) -> m128i { #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrlrn_b_h(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vssrlrn_b_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrlrn_h_w(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vssrlrn_h_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrlrn_w_d(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vssrlrn_w_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrln_b_h(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vssrln_b_h(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrln_h_w(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vssrln_h_w(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vssrln_w_d(a: m128i, b: m128i) -> m128i { unsafe { transmute(__lsx_vssrln_w_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vshuf_b(a: m128i, b: m128i, c: m128i) -> m128i { unsafe { transmute(__lsx_vshuf_b(transmute(a), transmute(b), transmute(c))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vextl_qu_du(a: m128i) -> m128i { unsafe { transmute(__lsx_vextl_qu_du(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_bnz_b(a: m128i) -> i32 { unsafe { transmute(__lsx_bnz_b(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_bnz_d(a: m128i) -> i32 { unsafe { transmute(__lsx_bnz_d(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_bnz_h(a: m128i) -> i32 { unsafe { transmute(__lsx_bnz_h(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_bnz_v(a: m128i) -> i32 { unsafe { transmute(__lsx_bnz_v(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_bnz_w(a: m128i) -> i32 { unsafe { transmute(__lsx_bnz_w(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_bz_b(a: m128i) -> i32 { unsafe { transmute(__lsx_bz_b(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_bz_d(a: m128i) -> i32 { unsafe { transmute(__lsx_bz_d(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_bz_h(a: m128i) -> i32 { unsafe { transmute(__lsx_bz_h(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_bz_v(a: m128i) -> i32 { unsafe { transmute(__lsx_bz_v(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_bz_w(a: m128i) -> i32 { unsafe { transmute(__lsx_bz_w(transmute(a))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_caf_d(a: m128d, b: m128d) -> m128i { unsafe { transmute(__lsx_vfcmp_caf_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_caf_s(a: m128, b: m128) -> m128i { unsafe { transmute(__lsx_vfcmp_caf_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_ceq_d(a: m128d, b: m128d) -> m128i { unsafe { transmute(__lsx_vfcmp_ceq_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_ceq_s(a: m128, b: m128) -> m128i { unsafe { transmute(__lsx_vfcmp_ceq_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_cle_d(a: m128d, b: m128d) -> m128i { unsafe { transmute(__lsx_vfcmp_cle_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_cle_s(a: m128, b: m128) -> m128i { unsafe { transmute(__lsx_vfcmp_cle_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_clt_d(a: m128d, b: m128d) -> m128i { unsafe { transmute(__lsx_vfcmp_clt_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_clt_s(a: m128, b: m128) -> m128i { unsafe { transmute(__lsx_vfcmp_clt_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_cne_d(a: m128d, b: m128d) -> m128i { unsafe { transmute(__lsx_vfcmp_cne_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_cne_s(a: m128, b: m128) -> m128i { unsafe { transmute(__lsx_vfcmp_cne_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_cor_d(a: m128d, b: m128d) -> m128i { unsafe { transmute(__lsx_vfcmp_cor_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_cor_s(a: m128, b: m128) -> m128i { unsafe { transmute(__lsx_vfcmp_cor_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_cueq_d(a: m128d, b: m128d) -> m128i { unsafe { transmute(__lsx_vfcmp_cueq_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_cueq_s(a: m128, b: m128) -> m128i { unsafe { transmute(__lsx_vfcmp_cueq_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_cule_d(a: m128d, b: m128d) -> m128i { unsafe { transmute(__lsx_vfcmp_cule_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_cule_s(a: m128, b: m128) -> m128i { unsafe { transmute(__lsx_vfcmp_cule_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_cult_d(a: m128d, b: m128d) -> m128i { unsafe { transmute(__lsx_vfcmp_cult_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_cult_s(a: m128, b: m128) -> m128i { unsafe { transmute(__lsx_vfcmp_cult_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_cun_d(a: m128d, b: m128d) -> m128i { unsafe { transmute(__lsx_vfcmp_cun_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_cune_d(a: m128d, b: m128d) -> m128i { unsafe { transmute(__lsx_vfcmp_cune_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_cune_s(a: m128, b: m128) -> m128i { unsafe { transmute(__lsx_vfcmp_cune_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_cun_s(a: m128, b: m128) -> m128i { unsafe { transmute(__lsx_vfcmp_cun_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_saf_d(a: m128d, b: m128d) -> m128i { unsafe { transmute(__lsx_vfcmp_saf_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_saf_s(a: m128, b: m128) -> m128i { unsafe { transmute(__lsx_vfcmp_saf_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_seq_d(a: m128d, b: m128d) -> m128i { unsafe { transmute(__lsx_vfcmp_seq_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_seq_s(a: m128, b: m128) -> m128i { unsafe { transmute(__lsx_vfcmp_seq_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_sle_d(a: m128d, b: m128d) -> m128i { unsafe { transmute(__lsx_vfcmp_sle_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_sle_s(a: m128, b: m128) -> m128i { unsafe { transmute(__lsx_vfcmp_sle_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_slt_d(a: m128d, b: m128d) -> m128i { unsafe { transmute(__lsx_vfcmp_slt_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_slt_s(a: m128, b: m128) -> m128i { unsafe { transmute(__lsx_vfcmp_slt_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_sne_d(a: m128d, b: m128d) -> m128i { unsafe { transmute(__lsx_vfcmp_sne_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_sne_s(a: m128, b: m128) -> m128i { unsafe { transmute(__lsx_vfcmp_sne_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_sor_d(a: m128d, b: m128d) -> m128i { unsafe { transmute(__lsx_vfcmp_sor_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_sor_s(a: m128, b: m128) -> m128i { unsafe { transmute(__lsx_vfcmp_sor_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_sueq_d(a: m128d, b: m128d) -> m128i { unsafe { transmute(__lsx_vfcmp_sueq_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_sueq_s(a: m128, b: m128) -> m128i { unsafe { transmute(__lsx_vfcmp_sueq_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_sule_d(a: m128d, b: m128d) -> m128i { unsafe { transmute(__lsx_vfcmp_sule_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_sule_s(a: m128, b: m128) -> m128i { unsafe { transmute(__lsx_vfcmp_sule_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_sult_d(a: m128d, b: m128d) -> m128i { unsafe { transmute(__lsx_vfcmp_sult_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_sult_s(a: m128, b: m128) -> m128i { unsafe { transmute(__lsx_vfcmp_sult_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_sun_d(a: m128d, b: m128d) -> m128i { unsafe { transmute(__lsx_vfcmp_sun_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_sune_d(a: m128d, b: m128d) -> m128i { unsafe { transmute(__lsx_vfcmp_sune_d(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_sune_s(a: m128, b: m128) -> m128i { unsafe { transmute(__lsx_vfcmp_sune_s(transmute(a), transmute(b))) } } #[inline] #[target_feature(enable = "lsx")] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn lsx_vfcmp_sun_s(a: m128, b: m128) -> m128i { unsafe { transmute(__lsx_vfcmp_sun_s(transmute(a), transmute(b))) } } diff --git a/library/stdarch/crates/core_arch/src/loongarch64/lsx/mod.rs b/library/stdarch/crates/core_arch/src/loongarch64/lsx/mod.rs index 0d353746ea859..7ad1009f0245a 100644 --- a/library/stdarch/crates/core_arch/src/loongarch64/lsx/mod.rs +++ b/library/stdarch/crates/core_arch/src/loongarch64/lsx/mod.rs @@ -6,21 +6,21 @@ mod types; #[rustfmt::skip] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub use self::types::*; #[rustfmt::skip] mod generated; #[rustfmt::skip] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub use self::generated::*; #[rustfmt::skip] mod portable; #[rustfmt::skip] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub use self::portable::*; #[rustfmt::skip] diff --git a/library/stdarch/crates/core_arch/src/loongarch64/lsx/types.rs b/library/stdarch/crates/core_arch/src/loongarch64/lsx/types.rs index 4fb6945717470..2d331498f19b9 100644 --- a/library/stdarch/crates/core_arch/src/loongarch64/lsx/types.rs +++ b/library/stdarch/crates/core_arch/src/loongarch64/lsx/types.rs @@ -1,5 +1,5 @@ types! { - #![unstable(feature = "stdarch_loongarch", issue = "117427")] + #![stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] /// 128-bit wide integer vector type, LoongArch-specific /// diff --git a/library/stdarch/crates/core_arch/src/loongarch64/mod.rs b/library/stdarch/crates/core_arch/src/loongarch64/mod.rs index e2489f9cfb250..77c6033a71cc1 100644 --- a/library/stdarch/crates/core_arch/src/loongarch64/mod.rs +++ b/library/stdarch/crates/core_arch/src/loongarch64/mod.rs @@ -4,9 +4,9 @@ mod lasx; mod lsx; mod simd; -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub use self::lasx::*; -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub use self::lsx::*; use crate::arch::asm; @@ -179,7 +179,6 @@ pub unsafe fn asrtgt(a: i64, b: i64) { /// Loads the page table directory entry #[inline(always)] -#[rustc_legacy_const_generics(1)] #[unstable(feature = "stdarch_loongarch", issue = "117427")] pub unsafe fn lddir(a: i64) -> i64 { static_assert_uimm_bits!(IMM8, 8); @@ -188,7 +187,6 @@ pub unsafe fn lddir(a: i64) -> i64 { /// Loads the page table entry #[inline(always)] -#[rustc_legacy_const_generics(1)] #[unstable(feature = "stdarch_loongarch", issue = "117427")] pub unsafe fn ldpte(a: i64) { static_assert_uimm_bits!(IMM8, 8); diff --git a/library/stdarch/crates/core_arch/src/loongarch64/simd.rs b/library/stdarch/crates/core_arch/src/loongarch64/simd.rs index 7ce6071841460..3152864ab864e 100644 --- a/library/stdarch/crates/core_arch/src/loongarch64/simd.rs +++ b/library/stdarch/crates/core_arch/src/loongarch64/simd.rs @@ -308,7 +308,7 @@ macro_rules! impl_vavg { ($ft:literal, $name:ident, $oty:ty, $ity:ty, $wty:ty) => { #[inline] #[target_feature(enable = $ft)] - #[unstable(feature = "stdarch_loongarch", issue = "117427")] + #[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn $name(a: $oty, b: $oty) -> $oty { unsafe { let a: $wty = simd_cast(transmute::<_, $ity>(a)); @@ -324,7 +324,7 @@ macro_rules! impl_vavgr { ($ft:literal, $name:ident, $oty:ty, $ity:ty, $wty:ty) => { #[inline] #[target_feature(enable = $ft)] - #[unstable(feature = "stdarch_loongarch", issue = "117427")] + #[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn $name(a: $oty, b: $oty) -> $oty { unsafe { let a: $wty = simd_cast(transmute::<_, $ity>(a)); @@ -346,7 +346,7 @@ macro_rules! impl_vv { ($ft:literal, $name:ident, $op:ident, $oty:ty, $ity:ty) => { #[inline] #[target_feature(enable = $ft)] - #[unstable(feature = "stdarch_loongarch", issue = "117427")] + #[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn $name(a: $oty) -> $oty { unsafe { let a: $ity = transmute(a); @@ -363,7 +363,7 @@ macro_rules! impl_gv { ($ft:literal, $name:ident, $op:ident, $oty:ty, $ity:ident, $gty:ty) => { #[inline] #[target_feature(enable = $ft)] - #[unstable(feature = "stdarch_loongarch", issue = "117427")] + #[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn $name(a: $gty) -> $oty { unsafe { let r: $ity = $op(a.into()); @@ -379,7 +379,7 @@ macro_rules! impl_ggv { ($ft:literal, $name:ident, $op:ident, $oty:ty, $ity:ident, $gty:ty, $xty:ty, unsafe) => { #[inline] #[target_feature(enable = $ft)] - #[unstable(feature = "stdarch_loongarch", issue = "117427")] + #[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub unsafe fn $name(a: $gty, b: $xty) -> $oty { let r: $ity = $op(a, b); transmute(r) @@ -393,8 +393,7 @@ macro_rules! impl_gsv { ($ft:literal, $name:ident, $op:ident, $oty:ty, $ity:ident, $gty:ty, $ibs:expr, const, unsafe) => { #[inline] #[target_feature(enable = $ft)] - #[rustc_legacy_const_generics(1)] - #[unstable(feature = "stdarch_loongarch", issue = "117427")] + #[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub unsafe fn $name(a: $gty) -> $oty { static_assert_simm_bits!(IMM, $ibs); let r: $ity = $op::(a); @@ -409,8 +408,7 @@ macro_rules! impl_sv { ($ft:literal, $name:ident, $op:ident, $oty:ty, $ity:ident, $ibs:expr) => { #[inline] #[target_feature(enable = $ft)] - #[rustc_legacy_const_generics(0)] - #[unstable(feature = "stdarch_loongarch", issue = "117427")] + #[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn $name() -> $oty { static_assert_simm_bits!(IMM, $ibs); unsafe { @@ -422,8 +420,7 @@ macro_rules! impl_sv { ($ft:literal, $name:ident, $op:ident, $oty:ty, $ity:ident, $ibs:expr, const) => { #[inline] #[target_feature(enable = $ft)] - #[rustc_legacy_const_generics(0)] - #[unstable(feature = "stdarch_loongarch", issue = "117427")] + #[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn $name() -> $oty { static_assert_simm_bits!(IMM, $ibs); unsafe { @@ -440,7 +437,7 @@ macro_rules! impl_vvv { ($ft:literal, $name:ident, $op:ident, $oty:ty, $ity:ty) => { #[inline] #[target_feature(enable = $ft)] - #[unstable(feature = "stdarch_loongarch", issue = "117427")] + #[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn $name(a: $oty, b: $oty) -> $oty { unsafe { let a: $ity = transmute(a); @@ -453,7 +450,7 @@ macro_rules! impl_vvv { ($ft:literal, $name:ident, $op:ident, $oty:ty, $ity:ty, $wty:ty) => { #[inline] #[target_feature(enable = $ft)] - #[unstable(feature = "stdarch_loongarch", issue = "117427")] + #[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn $name(a: $oty, b: $oty) -> $oty { unsafe { let a: $ity = transmute(a); @@ -471,7 +468,7 @@ macro_rules! impl_vgg { ($ft:literal, $name:ident, $op:ident, $oty:ty, $ity:ident, $gty:ty, $xty:ty, unsafe) => { #[inline] #[target_feature(enable = $ft)] - #[unstable(feature = "stdarch_loongarch", issue = "117427")] + #[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub unsafe fn $name(a: $oty, b: $gty, c: $xty) { $op(a, b, c); } @@ -484,8 +481,7 @@ macro_rules! impl_vgs { ($ft:literal, $name:ident, $op:ident, $oty:ty, $ity:ident, $gty:ty, $ibs:expr, const, unsafe) => { #[inline] #[target_feature(enable = $ft)] - #[rustc_legacy_const_generics(2)] - #[unstable(feature = "stdarch_loongarch", issue = "117427")] + #[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub unsafe fn $name(a: $oty, b: $gty) { static_assert_simm_bits!(IMM, $ibs); $op::(a, b); @@ -499,8 +495,7 @@ macro_rules! impl_vuv { ($ft:literal, $name:ident, $op:ident, $oty:ty, $ity:ident) => { #[inline] #[target_feature(enable = $ft)] - #[rustc_legacy_const_generics(1)] - #[unstable(feature = "stdarch_loongarch", issue = "117427")] + #[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn $name(a: $oty) -> $oty { static_assert_uimm_bits!(IMM, (size_of::<<$ity as SimdExt>::Elem>() * 8).ilog2()); unsafe { @@ -514,8 +509,7 @@ macro_rules! impl_vuv { ($ft:literal, $name:ident, $op:ident, $oty:ty, $ity:ident, $ibs:expr) => { #[inline] #[target_feature(enable = $ft)] - #[rustc_legacy_const_generics(1)] - #[unstable(feature = "stdarch_loongarch", issue = "117427")] + #[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn $name(a: $oty) -> $oty { static_assert_uimm_bits!(IMM, $ibs); unsafe { @@ -529,8 +523,7 @@ macro_rules! impl_vuv { ($ft:literal, $name:ident, $op:ident, $oty:ty, $ity:ident, $ibs:expr, const) => { #[inline] #[target_feature(enable = $ft)] - #[rustc_legacy_const_generics(1)] - #[unstable(feature = "stdarch_loongarch", issue = "117427")] + #[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn $name(a: $oty) -> $oty { static_assert_uimm_bits!(IMM, $ibs); unsafe { @@ -548,8 +541,7 @@ macro_rules! impl_vug { ($ft:literal, $name:ident, $op:ident, $oty:ty, $ity:ident, $gty:ty, $ibs:expr) => { #[inline] #[target_feature(enable = $ft)] - #[rustc_legacy_const_generics(1)] - #[unstable(feature = "stdarch_loongarch", issue = "117427")] + #[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn $name(a: $oty) -> $gty { static_assert_uimm_bits!(IMM, $ibs); unsafe { @@ -567,8 +559,7 @@ macro_rules! impl_vsv { ($ft:literal, $name:ident, $op:ident, $oty:ty, $ity:ident, $ibs:expr) => { #[inline] #[target_feature(enable = $ft)] - #[rustc_legacy_const_generics(1)] - #[unstable(feature = "stdarch_loongarch", issue = "117427")] + #[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn $name(a: $oty) -> $oty { static_assert_simm_bits!(IMM, $ibs); unsafe { @@ -587,7 +578,7 @@ macro_rules! impl_vvvv { ($ft:literal, $name:ident, $op:ident, $oty:ty, $ity:ty) => { #[inline] #[target_feature(enable = $ft)] - #[unstable(feature = "stdarch_loongarch", issue = "117427")] + #[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn $name(a: $oty, b: $oty, c: $oty) -> $oty { unsafe { let a: $ity = transmute(a); @@ -606,8 +597,7 @@ macro_rules! impl_vvuv { ($ft:literal, $name:ident, $op:ident, $oty:ty, $ity:ident, $ibs:expr, const) => { #[inline] #[target_feature(enable = $ft)] - #[rustc_legacy_const_generics(2)] - #[unstable(feature = "stdarch_loongarch", issue = "117427")] + #[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn $name(a: $oty, b: $oty) -> $oty { static_assert_uimm_bits!(IMM, $ibs); unsafe { @@ -626,8 +616,7 @@ macro_rules! impl_vugv { ($ft:literal, $name:ident, $op:ident, $oty:ty, $ity:ident, $gty:ty, $ibs:expr) => { #[inline] #[target_feature(enable = $ft)] - #[rustc_legacy_const_generics(2)] - #[unstable(feature = "stdarch_loongarch", issue = "117427")] + #[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] pub fn $name(a: $oty, b: $gty) -> $oty { static_assert_uimm_bits!(IMM, $ibs); unsafe { diff --git a/library/stdarch/crates/core_arch/src/mod.rs b/library/stdarch/crates/core_arch/src/mod.rs index ab787590a274f..4583142cd59cd 100644 --- a/library/stdarch/crates/core_arch/src/mod.rs +++ b/library/stdarch/crates/core_arch/src/mod.rs @@ -308,9 +308,11 @@ pub mod arch { /// See the [module documentation](../index.html) for more details. #[cfg(any(target_arch = "loongarch64", doc))] #[doc(cfg(target_arch = "loongarch64"))] - #[unstable(feature = "stdarch_loongarch", issue = "117427")] + #[stable(feature = "stdarch_loongarch64", since = "CURRENT_RUSTC_VERSION")] pub mod loongarch64 { + #[stable(feature = "stdarch_loongarch64", since = "CURRENT_RUSTC_VERSION")] pub use crate::core_arch::loongarch_shared::*; + #[stable(feature = "stdarch_loongarch64", since = "CURRENT_RUSTC_VERSION")] pub use crate::core_arch::loongarch64::*; } diff --git a/library/stdarch/crates/core_arch/src/x86/avx512f.rs b/library/stdarch/crates/core_arch/src/x86/avx512f.rs index 45ada28b92941..cf171e8a103c0 100644 --- a/library/stdarch/crates/core_arch/src/x86/avx512f.rs +++ b/library/stdarch/crates/core_arch/src/x86/avx512f.rs @@ -1,8 +1,8 @@ use crate::{ arch::asm, core_arch::{simd::*, x86::*}, - intrinsics::simd::*, intrinsics::fma, + intrinsics::simd::*, mem, ptr, }; diff --git a/library/stdarch/crates/core_arch/src/x86/fma.rs b/library/stdarch/crates/core_arch/src/x86/fma.rs index 91df46a5281eb..5942c38120558 100644 --- a/library/stdarch/crates/core_arch/src/x86/fma.rs +++ b/library/stdarch/crates/core_arch/src/x86/fma.rs @@ -19,8 +19,8 @@ //! [wiki_fma]: https://en.wikipedia.org/wiki/Fused_multiply-accumulate use crate::core_arch::x86::*; -use crate::intrinsics::simd::{simd_fma, simd_neg}; use crate::intrinsics::fma; +use crate::intrinsics::simd::{simd_fma, simd_neg}; #[cfg(test)] use stdarch_test::assert_instr; diff --git a/library/stdarch/crates/stdarch-gen-loongarch/src/main.rs b/library/stdarch/crates/stdarch-gen-loongarch/src/main.rs index 511bc5b7cdea0..02ebf6ffe10a5 100644 --- a/library/stdarch/crates/stdarch-gen-loongarch/src/main.rs +++ b/library/stdarch/crates/stdarch-gen-loongarch/src/main.rs @@ -369,7 +369,6 @@ fn gen_bind_body( _ => panic!("unsupported type"), } }; - let mut rustc_legacy_const_generics = ""; let fn_decl = { let fn_output = if out_t.to_lowercase() == "void" { String::new() @@ -410,7 +409,6 @@ fn gen_bind_body( ), _ => panic!("unsupported assembly format: {}", asm_fmts[1]), }; - rustc_legacy_const_generics = "rustc_legacy_const_generics(0)"; } else if para_num == 2 && (in_t[1] == "UQI" || in_t[1] == "USI") { fn_inputs = if asm_fmts[2].starts_with("ui") { format!( @@ -422,7 +420,6 @@ fn gen_bind_body( } else { panic!("unsupported assembly format: {}", asm_fmts[2]); }; - rustc_legacy_const_generics = "rustc_legacy_const_generics(1)"; } else if para_num == 2 && in_t[1] == "QI" { fn_inputs = if asm_fmts[2].starts_with("si") { format!( @@ -434,7 +431,6 @@ fn gen_bind_body( } else { panic!("unsupported assembly format: {}", asm_fmts[2]); }; - rustc_legacy_const_generics = "rustc_legacy_const_generics(1)"; } else if para_num == 2 && in_t[0] == "CVPOINTER" && in_t[1] == "SI" { fn_inputs = if asm_fmts[2].starts_with("si") { format!( @@ -446,7 +442,6 @@ fn gen_bind_body( } else { panic!("unsupported assembly format: {}", asm_fmts[2]); }; - rustc_legacy_const_generics = "rustc_legacy_const_generics(1)"; } else if para_num == 2 && in_t[0] == "CVPOINTER" && in_t[1] == "DI" { fn_inputs = match asm_fmts[2].as_str() { "rk" => format!( @@ -468,7 +463,6 @@ fn gen_bind_body( } else { panic!("unsupported assembly format: {}", asm_fmts[2]) }; - rustc_legacy_const_generics = "rustc_legacy_const_generics(2)"; } else if para_num == 3 && in_t[1] == "CVPOINTER" && in_t[2] == "SI" { fn_inputs = match asm_fmts[2].as_str() { "si12" => format!( @@ -479,7 +473,6 @@ fn gen_bind_body( ), _ => panic!("unsupported assembly format: {}", asm_fmts[2]), }; - rustc_legacy_const_generics = "rustc_legacy_const_generics(2)"; } else if para_num == 3 && in_t[1] == "CVPOINTER" && in_t[2] == "DI" { fn_inputs = match asm_fmts[2].as_str() { "rk" => format!( @@ -505,7 +498,6 @@ fn gen_bind_body( asm_fmts[2], current_name ), }; - rustc_legacy_const_generics = "rustc_legacy_const_generics(2, 3)"; } format!( "pub {}fn {current_name}{fn_inputs} {fn_output}", @@ -612,30 +604,16 @@ fn gen_bind_body( ), } } - let function = if !rustc_legacy_const_generics.is_empty() { - format!( - r#" -#[inline]{target_feature} -#[{rustc_legacy_const_generics}] -#[unstable(feature = "stdarch_loongarch", issue = "117427")] -{fn_decl}{{ - {call_params} -}} -"#, - target_feature = target.to_target_feature_attr(current_name) - ) - } else { - format!( - r#" + let function = format!( + r#" #[inline]{target_feature} -#[unstable(feature = "stdarch_loongarch", issue = "117427")] +#[stable(feature = "stdarch_loongarch_simd", since = "CURRENT_RUSTC_VERSION")] {fn_decl}{{ {call_params} }} "#, - target_feature = target.to_target_feature_attr(current_name) - ) - }; + target_feature = target.to_target_feature_attr(current_name) + ); (link_function, function) } @@ -1661,7 +1639,8 @@ pub fn main() -> Result<(), String> { .join("src") .join("loongarch64") .join(ext_name); - gen_bind(Path::new(&in_file), &in_file_name, ext_name, &out_path).map_err(|e| e.to_string())?; + gen_bind(Path::new(&in_file), &in_file_name, ext_name, &out_path) + .map_err(|e| e.to_string())?; } Ok(()) } diff --git a/library/stdarch/rust-version b/library/stdarch/rust-version index 271b3a644cfb8..e4f77638aebc8 100644 --- a/library/stdarch/rust-version +++ b/library/stdarch/rust-version @@ -1 +1 @@ -260f1acad9d7f70b5b56a636a9dc5a7f76150417 +16d1ffac17ad8b739e32483ac2e65fe7e1804977 diff --git a/src/build_helper/src/lib.rs b/src/build_helper/src/lib.rs index 493ff92fbdbc3..ef52aa58a9904 100644 --- a/src/build_helper/src/lib.rs +++ b/src/build_helper/src/lib.rs @@ -28,7 +28,7 @@ pub const RUSTC_PGO_CRATES: &[&str] = &[ "ctfe-stress-5", "cargo-0.87.1", "token-stream-stress", - "match-stress", + "enum-stress", "tuple-stress", "diesel-2.2.10", "bitmaps-3.2.1", diff --git a/src/ci/docker/host-x86_64/test-x86_64-rust-for-linux/Dockerfile b/src/ci/docker/host-x86_64/test-x86_64-rust-for-linux/Dockerfile index 28a51ca2d6857..7a991512c5d79 100644 --- a/src/ci/docker/host-x86_64/test-x86_64-rust-for-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/test-x86_64-rust-for-linux/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:26.04 ARG DEBIAN_FRONTEND=noninteractive @@ -17,10 +17,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ flex \ bison \ bc \ - clang-15 \ - libclang1-15 \ - llvm-15 \ - lld-15 \ + clang-22 \ + libclang1-22 \ + llvm-22 \ + lld-22 \ libelf-dev \ libedit-dev \ libssl-dev \ @@ -32,7 +32,7 @@ COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh # RfL needs access to cland, lld and llvm tools -ENV PATH="${PATH}:/usr/lib/llvm-15/bin" +ENV PATH="${PATH}:/usr/lib/llvm-22/bin" ENV RUST_CONFIGURE_ARGS="--build=x86_64-unknown-linux-gnu" diff --git a/src/ci/docker/scripts/rfl-build.sh b/src/ci/docker/scripts/rfl-build.sh index 02fa3d1850fb8..29517d4d73f2d 100755 --- a/src/ci/docker/scripts/rfl-build.sh +++ b/src/ci/docker/scripts/rfl-build.sh @@ -2,8 +2,7 @@ set -euo pipefail -# https://github.com/rust-lang/rust/pull/157151 -LINUX_VERSION=40bc55834bc15896f4438b0936c679ef32e20df1 +LINUX_VERSION=v7.3 # Build rustc, rustdoc, cargo, clippy-driver and rustfmt ../x.py build --stage 2 library rustdoc clippy rustfmt @@ -30,7 +29,7 @@ git -C linux checkout FETCH_HEAD # Install bindgen "${BUILD_DIR}"/stage0/bin/cargo install \ --locked \ - --version $(linux/scripts/min-tool-version.sh bindgen) \ + --version 0.73.2 \ --root ${BUILD_DIR}/bindgen \ bindgen-cli diff --git a/src/ci/github-actions/jobs.yml b/src/ci/github-actions/jobs.yml index 3de95a9a86d77..0b98f850ec4fe 100644 --- a/src/ci/github-actions/jobs.yml +++ b/src/ci/github-actions/jobs.yml @@ -19,10 +19,6 @@ runners: os: macos-15 # macOS 15 Arm64 <<: *base-job - - &job-macos-26 - os: macos-26 # macOS 26 Arm64 - <<: *base-job - - &job-windows os: windows-2025 <<: *base-job @@ -611,59 +607,6 @@ auto: MACOSX_STD_DEPLOYMENT_TARGET: 11.0 <<: *job-macos-15 - # EXPERIMENT(#157687): we will try to run `aarch64-apple`-equivalent workload - # on `macos-26` runner images in parallel to evaluate the running times, since - # previous attempts have timed out multiple times. Remove/revert this job if - # this hangs or times out, or if it becomes the slowest Merge CI job, and let - # T-infra know. - - name: test-aarch64-apple-macos-26-1 - doc_url: https://github.com/rust-lang/rust/issues/157687 - env: - # NOTE: keep in sync with `src/ci/docker/scripts/stage_2_test_set1.sh` - SCRIPT: >- - ./x.py --stage 2 test - --host=aarch64-apple-darwin - --target=aarch64-apple-darwin - --skip compiler - --skip src - RUST_CONFIGURE_ARGS: >- - --enable-sanitizers - --enable-profiler - --set rust.jemalloc - DEVELOPER_DIR: /Applications/Xcode_26.2.app/Contents/Developer - # Aarch64 tooling only needs to support macOS 11.0 and up as nothing else - # supports the hardware, so only need to test it there. - MACOSX_DEPLOYMENT_TARGET: 11.0 - MACOSX_STD_DEPLOYMENT_TARGET: 11.0 - <<: *job-macos-26 - - - name: test-aarch64-apple-macos-26-2 - doc_url: https://github.com/rust-lang/rust/issues/157687 - env: - # NOTE: keep in sync with `src/ci/docker/scripts/stage_2_test_set2.sh`, - # union `src/tools/cargo` specifically. - SCRIPT: >- - ./x.py --stage 2 test - --host=aarch64-apple-darwin - --target=aarch64-apple-darwin - --skip tests - --skip library - --skip tidyselftest - && ./x.py --stage 2 test - --host=aarch64-apple-darwin - --target=aarch64-apple-darwin - src/tools/cargo - RUST_CONFIGURE_ARGS: >- - --enable-sanitizers - --enable-profiler - --set rust.jemalloc - DEVELOPER_DIR: /Applications/Xcode_26.2.app/Contents/Developer - # Aarch64 tooling only needs to support macOS 11.0 and up as nothing else - # supports the hardware, so only need to test it there. - MACOSX_DEPLOYMENT_TARGET: 11.0 - MACOSX_STD_DEPLOYMENT_TARGET: 11.0 - <<: *job-macos-26 - ###################### # Windows Builders # ###################### diff --git a/src/tools/lint-docs/src/groups.rs b/src/tools/lint-docs/src/groups.rs index a24fbbc0ceab3..12f20463b5091 100644 --- a/src/tools/lint-docs/src/groups.rs +++ b/src/tools/lint-docs/src/groups.rs @@ -17,6 +17,10 @@ static GROUP_DESCRIPTIONS: &[(&str, &str)] = &[ ("rust-2018-compatibility", "Lints used to transition code from the 2015 edition to 2018"), ("rust-2021-compatibility", "Lints used to transition code from the 2018 edition to 2021"), ("rust-2024-compatibility", "Lints used to transition code from the 2021 edition to 2024"), + ( + "edition-future-compatibility", + "Lints used to transition code from the 2024 edition to future", + ), ( "refining-impl-trait", "Detects refinement of `impl Trait` return types by trait implementations", diff --git a/src/tools/miri/tests/pass/function_calls/abi_compat.rs b/src/tools/miri/tests/pass/function_calls/abi_compat.rs index e78c49457280f..a763c300cc1a6 100644 --- a/src/tools/miri/tests/pass/function_calls/abi_compat.rs +++ b/src/tools/miri/tests/pass/function_calls/abi_compat.rs @@ -6,6 +6,14 @@ use std::{mem, num, ptr}; #[derive(Copy, Clone, Default)] struct Zst; +#[derive(Copy, Clone, Default)] +#[repr(align(1))] +struct ReprAlignZst; + +#[derive(Copy, Clone, Default)] +#[repr(C)] +struct ReprCZst; + #[repr(transparent)] #[derive(Copy, Clone)] struct Wrapper(T); @@ -124,6 +132,8 @@ fn main() { test_abi_compat(main as fn(), id:: as fn(i32) -> i32); // - trivial-ABI types test_abi_compat((), [(); 0]); + test_abi_compat((), Zst); + test_abi_compat((), ReprAlignZst); // Guaranteed null-pointer-layout optimizations: // - Guaranteed Option null-pointer-optimizations (RFC 3391). @@ -157,6 +167,8 @@ fn main() { // with the wrapped field. test_abi_newtype::<()>(); test_abi_newtype::(); + test_abi_newtype::(); + test_abi_newtype::(); test_abi_newtype::(); test_abi_newtype::(); test_abi_newtype::<(u8, u16, f32)>(); @@ -179,5 +191,6 @@ fn main() { let non_capturing_closure = || {}; test_abi_compat(non_capturing_closure.clone(), Wrapper(non_capturing_closure)); + // Check that we take the CFI tag into account. test_abi_cfi_encoding(); } diff --git a/src/tools/run-make-support/Cargo.toml b/src/tools/run-make-support/Cargo.toml index 2f503aaec5f92..6f7861b70f033 100644 --- a/src/tools/run-make-support/Cargo.toml +++ b/src/tools/run-make-support/Cargo.toml @@ -26,5 +26,12 @@ build_helper = { path = "../../build_helper" } # Shared with rustdoc rustdoc-json-types = { path = "../../rustdoc-json-types" } +[target.'cfg(windows)'.dependencies.windows] +version = "0.62" +features = [ + "Win32_Foundation", +] + + [lib] crate-type = ["lib", "dylib"] diff --git a/src/tools/run-make-support/src/command.rs b/src/tools/run-make-support/src/command.rs index 0216ae7a30ddb..9c5c50a09b99d 100644 --- a/src/tools/run-make-support/src/command.rs +++ b/src/tools/run-make-support/src/command.rs @@ -295,6 +295,7 @@ impl Command { /// Represents the result of an executed process. /// The various `assert_` helper methods should preferably be used for /// checking the contents of stdout/stderr. +#[derive(Debug)] pub struct CompletedProcess { output: Output, } diff --git a/src/tools/run-make-support/src/lib.rs b/src/tools/run-make-support/src/lib.rs index 661c3518f64ee..0d6bdf48dd88d 100644 --- a/src/tools/run-make-support/src/lib.rs +++ b/src/tools/run-make-support/src/lib.rs @@ -55,6 +55,8 @@ pub use serde_json; pub use similar; pub use tempfile; pub use wasmparser; +#[cfg(windows)] +pub use windows; // Helpers for building names of output artifacts that are potentially target-specific. pub use crate::artifact_names::{ @@ -101,7 +103,7 @@ pub use crate::path_helpers::{ shallow_find_files, source_root, }; // Convenience helpers for running binaries and other commands. -pub use crate::run::{cmd, run, run_fail, run_with_args}; +pub use crate::run::{cmd, run, run_fail, run_fail_with_args, run_with_args}; // Helpers for scoped test execution where certain properties are attempted to be maintained. pub use crate::scoped_run::{run_in_tmpdir, test_while_readonly}; pub use crate::string::{ diff --git a/src/tools/run-make-support/src/run.rs b/src/tools/run-make-support/src/run.rs index 43f0473ddf4a1..b64fe2f02d2b7 100644 --- a/src/tools/run-make-support/src/run.rs +++ b/src/tools/run-make-support/src/run.rs @@ -80,6 +80,12 @@ pub fn run_fail(name: &str) -> CompletedProcess { run_common(name, None).run_fail() } +/// Run a built binary with one or more argument(s) and make sure it fails. +#[track_caller] +pub fn run_fail_with_args(name: &str, args: &[&str]) -> CompletedProcess { + run_common(name, Some(args)).run_fail() +} + /// Create a new custom [`Command`]. This should be preferred to creating [`std::process::Command`] /// directly. #[track_caller] diff --git a/src/tools/rust-analyzer/crates/stdx/src/tempfile.rs b/src/tools/rust-analyzer/crates/stdx/src/tempfile.rs index 1498f0322bb50..cdb85b40ede1e 100644 --- a/src/tools/rust-analyzer/crates/stdx/src/tempfile.rs +++ b/src/tools/rust-analyzer/crates/stdx/src/tempfile.rs @@ -233,8 +233,10 @@ mod tests { fn named_temp_file_new_creates_file() { let file = NamedTempFile::new("test-").unwrap(); assert!(file.path().exists()); + #[allow(unused)] let path = file.path().as_os_str().to_owned(); drop(file); + #[cfg(any(windows, target_os = "macos"))] // In Linux and BSDs the path depends on the fd and can have race conditions assert!(!fs::exists(path).unwrap()); } } diff --git a/src/tools/rustc-perf b/src/tools/rustc-perf index 208d929efe770..15d95905429e5 160000 --- a/src/tools/rustc-perf +++ b/src/tools/rustc-perf @@ -1 +1 @@ -Subproject commit 208d929efe770996eb02cd3d2712623ea48b7646 +Subproject commit 15d95905429e577d5a710b17c49e04b4451c263b diff --git a/tests/assembly-llvm/asm/aarch64-modifiers.rs b/tests/assembly-llvm/asm/aarch64-modifiers.rs index 66be35de574f6..5c68c25a7b902 100644 --- a/tests/assembly-llvm/asm/aarch64-modifiers.rs +++ b/tests/assembly-llvm/asm/aarch64-modifiers.rs @@ -5,7 +5,7 @@ //@ compile-flags: -Zmerge-functions=disabled //@ needs-llvm-components: aarch64 -#![feature(no_core)] +#![feature(asm_experimental_reg, no_core)] #![crate_type = "rlib"] #![no_core] #![allow(asm_sub_register)] diff --git a/tests/assembly-llvm/x86-vendor-intrinsics.rs b/tests/assembly-llvm/x86-vendor-intrinsics.rs index b600b74c66ecd..4fcd25c8c648a 100644 --- a/tests/assembly-llvm/x86-vendor-intrinsics.rs +++ b/tests/assembly-llvm/x86-vendor-intrinsics.rs @@ -19,3 +19,164 @@ extern "C" fn test_packus_epi16(a: __m128i, b: __m128i) -> __m128i { // CHECK-NEXT: ret _mm_packus_epi16(a, b) } + +// See for context. +// CHECK-LABEL: shlv_u16x16: +#[unsafe(no_mangle)] +#[target_feature(enable = "avx2")] +extern "C" fn shlv_u16x16(a: __m256i, count: __m256i) -> __m256i { + // CHECK: .cfi_startproc + // CHECK-NOT: vpcmp + // CHECK-NOT: vpmin + // CHECK-NOT: vpmax + // CHECK-NOT: vmov + // CHECK: vpsllvd + // CHECK-NOT: vpcmp + // CHECK-NOT: vpmin + // CHECK-NOT: vpmax + // CHECK-NOT: vmov + // CHECK: ret + let low_words = _mm256_set1_epi32(0x0000_ffff); + let low_count = _mm256_and_si256(count, low_words); + let high_count = _mm256_srli_epi32::<16>(count); + + let high_values = _mm256_andnot_si256(low_words, a); + let low_shifted = _mm256_sllv_epi32(a, low_count); + let high_shifted = _mm256_sllv_epi32(high_values, high_count); + let low_shifted = _mm256_and_si256(low_shifted, low_words); + + _mm256_or_si256(low_shifted, high_shifted) +} + +// See for context. +// CHECK-LABEL: shrv_u16x16: +#[unsafe(no_mangle)] +#[target_feature(enable = "avx2")] +extern "C" fn shrv_u16x16(a: __m256i, count: __m256i) -> __m256i { + // CHECK: .cfi_startproc + // CHECK-NOT: vpcmp + // CHECK-NOT: vpmin + // CHECK-NOT: vpmax + // CHECK-NOT: vmov + // CHECK: vpsrlvd + // CHECK-NOT: vpcmp + // CHECK-NOT: vpmin + // CHECK-NOT: vpmax + // CHECK-NOT: vmov + // CHECK: ret + let low_words = _mm256_set1_epi32(0x0000_ffff); + let low_count = _mm256_and_si256(count, low_words); + let high_count = _mm256_srli_epi32::<16>(count); + + let low_values = _mm256_and_si256(a, low_words); + let low_shifted = _mm256_srlv_epi32(low_values, low_count); + let high_shifted = _mm256_srlv_epi32(a, high_count); + let high_shifted = _mm256_andnot_si256(low_words, high_shifted); + + _mm256_or_si256(low_shifted, high_shifted) +} + +// See for context. +// CHECK-LABEL: test_sllv_srlv: +#[unsafe(no_mangle)] +#[target_feature(enable = "avx512bw")] +extern "C" fn test_sllv_srlv(win: __m512i, x: __m512i, v: __m512i) -> __m512i { + // CHECK: .cfi_startproc + // CHECK-NEXT: vpsllvw + // CHECK-NEXT: vporq + // CHECK-NEXT: vpandd + // CHECK-NEXT: vpsrlvw + // CHECK-NEXT: ret + let w = _mm512_or_si512(win, _mm512_sllv_epi16(x, v)); + _mm512_srlv_epi16(w, _mm512_and_si512(w, _mm512_set1_epi16(7))) +} + +// See for context. +// CHECK-LABEL: test_mulhi_loop: +#[no_mangle] +#[target_feature(enable = "sse2")] +extern "C" fn test_mulhi_loop(buf: &mut [__m128i], factor: i16) { + // CHECK: .cfi_startproc + let factor = _mm_set1_epi16(factor); + // CHECK-NOT: pmuludq + // CHECK: pmulhuw + // CHECK-NOT: pmuludq + for i in 0..buf.len() { + buf[i] = _mm_mulhi_epu16(buf[i], factor); + } + // CHECK: ret +} + +// CHECK-LABEL: mul_and_shift: +#[no_mangle] +#[target_feature(enable = "sse2")] +extern "C" fn mul_and_shift(a: __m128i, b: __m128i) -> __m128i { + // CHECK: .cfi_startproc + // CHECK-NEXT: pmulhuw + // CHECK-NEXT: psrlw + // CHECK-NEXT: ret + unsafe { _mm_srli_epi16(_mm_mulhi_epu16(a, b), 1) } +} + +// See for context. +// CHECK-LABEL: test_mulhi: +#[no_mangle] +#[target_feature(enable = "avx2")] +extern "C" fn test_mulhi(a: __m256i) -> __m256i { + // CHECK: .cfi_startproc + // CHECK-NEXT: vpand + // CHECK-NEXT: vpmulhw + // CHECK-NEXT: ret + let a = _mm256_and_si256(a, _mm256_set1_epi16(0x7FFF)); + _mm256_mulhi_epi16(a, _mm256_set1_epi16(1000)) +} + +// See for context. +// CHECK-LABEL: test_avg_epu8: +#[no_mangle] +#[target_feature(enable = "avx2")] +pub unsafe fn test_avg_epu8( + x: __m256i, + ch: __m256i, + ct: __m256i, + dh: __m256i, + dt: __m256i, +) -> Result<__m256i, ()> { + // CHECK: .cfi_startproc + let shr3 = _mm256_srli_epi32::<3>(x); + + // Things get moved around as `h2` is only needed if we don't return `Err`. + // There is an early return path in between the two `_mm256_avg_epu8` calls. + // But we should still see `vpavgb` for both of them. + // CHECK: vpavgb + // CHECK: ret + let h1 = _mm256_avg_epu8(shr3, _mm256_shuffle_epi8(ch, x)); + // CHECK: vpavgb + // CHECK: ret + let h2 = _mm256_avg_epu8(shr3, _mm256_shuffle_epi8(dh, x)); + + let o1 = _mm256_shuffle_epi8(ct, h1); + let o2 = _mm256_shuffle_epi8(dt, h2); + + let c1 = _mm256_adds_epi8(x, o1); + let c2 = _mm256_add_epi8(x, o2); + + if _mm256_movemask_epi8(c1) != 0 { + return Err(()); + } + + Ok(c2) +} + +// See for context. +// CHECK-LABEL: test_movemask_avg_epu8: +#[no_mangle] +#[target_feature(enable = "avx2")] +pub unsafe extern "C" fn test_movemask_avg_epu8(x: __m256i, y: __m256i) -> i32 { + // CHECK: .cfi_startproc + // CHECK-NEXT: vpavgb + // CHECK-NEXT: vpmovmskb + // CHECK-NEXT: vzeroupper + // CHECK-NEXT: ret + _mm256_movemask_epi8(_mm256_avg_epu8(x, y)) +} diff --git a/tests/codegen-llvm/complex-abi.rs b/tests/codegen-llvm/complex-abi.rs index cd0afa1b4dab8..4e9eb3aeca233 100644 --- a/tests/codegen-llvm/complex-abi.rs +++ b/tests/codegen-llvm/complex-abi.rs @@ -75,7 +75,12 @@ //@ [AIX] compile-flags: --target powerpc64-ibm-aix //@ [AIX] needs-llvm-components: powerpc -// NOTE: in clang <= 23 the Complex is passed incorrectly. +// NOTE: for 32-bit powerpc we follow the GCC ABI, not the Clang ABI. +//@ revisions: POWERPC +//@ [POWERPC] compile-flags: --target powerpc-unknown-linux-gnu +//@ [POWERPC] needs-llvm-components: powerpc + +// NOTE: in clang <= 23 Complex is passed incorrectly. // See https://github.com/llvm/llvm-project/issues/212109. //@ revisions: MIPS64 MIPS64EL //@ [MIPS64] compile-flags: --target mips64-unknown-linux-gnuabi64 @@ -89,11 +94,7 @@ //@ [MIPSEL] compile-flags: --target mipsel-unknown-linux-gnu //@ [MIPSEL] needs-llvm-components: mips -// FIXME: the below revisions are deliberately disabled for now. - -// revisions: POWERPC -// [POWERPC] compile-flags: --target powerpc-unknown-linux-gnu -// [POWERPC] needs-llvm-components: powerpc +// FIXME: the revisions below are deliberately disabled for now. // revisions: NVPTX // [NVPTX] compile-flags: --target nvptx64-nvidia-cuda @@ -114,6 +115,10 @@ #![crate_type = "lib"] extern crate minicore; +#[cfg(target_arch = "powerpc")] +use minicore::arch::powerpc::ppcf128; +#[cfg(target_arch = "powerpc64")] +use minicore::arch::powerpc64::ppcf128; use minicore::num::Complex; #[no_mangle] @@ -158,7 +163,7 @@ pub extern "C" fn cplx_f32(x: Complex) -> Complex { // NVPTX: define{{.*}} { float, float } @cplx_f32(ptr {{.*}} byval({ float, float }) {{.*}}) // POWERPC64: define{{.*}} { float, float } @cplx_f32({ float, float } %0) // POWERPC64LE: define{{.*}} { float, float } @cplx_f32({ float, float } %0) - // POWERPC: define{{.*}} void @cplx_f32(ptr {{.*}} sret({ float, float }) {{.*}}, ptr {{.*}} byval({ float, float }) {{.*}}) + // POWERPC: define{{.*}} i64 @cplx_f32(i64 {{.*}}) // RISCV32: define{{.*}} { float, float } @cplx_f32({ float, float } {{.*}}) // RISCV64: define{{.*}} { float, float } @cplx_f32({ float, float } {{.*}}) // S390X: define{{.*}} void @cplx_f32(ptr {{.*}} sret([8 x i8]) {{.*}}, ptr {{.*}}) @@ -194,7 +199,7 @@ pub extern "C" fn cplx_f64(x: Complex) -> Complex { // NVPTX: define{{.*}} { double, double } @cplx_f64(ptr {{.*}} byval({ double, double }) {{.*}}) // POWERPC64: define{{.*}} { double, double } @cplx_f64({ double, double } %0) // POWERPC64LE: define{{.*}} { double, double } @cplx_f64({ double, double } %0) - // POWERPC: define{{.*}} void @cplx_f64(ptr {{.*}} sret({ double, double }) {{.*}}, ptr {{.*}} byval({ double, double }) {{.*}}) + // POWERPC: define{{.*}} [4 x i32] @cplx_f64([4 x i32] {{.*}}) // RISCV32: define{{.*}} { double, double } @cplx_f64({ double, double } {{.*}}) // RISCV64: define{{.*}} { double, double } @cplx_f64({ double, double } {{.*}}) // S390X: define{{.*}} void @cplx_f64(ptr {{.*}} sret([16 x i8]) {{.*}}, ptr {{.*}}) @@ -216,6 +221,7 @@ pub extern "C" fn cplx_f128(x: Complex) -> Complex { // I686: define{{.*}} void @cplx_f128(ptr {{.*}} sret([32 x i8]) {{.*}}, ptr {{.*}} byval([32 x i8]) {{.*}}) // MIPS64: define{{.*}} void @cplx_f128(ptr {{.*}} sret([32 x i8]) {{.*}}, i32 %0, { fp128, fp128 } %1) // MIPS64EL: define{{.*}} void @cplx_f128(ptr {{.*}} sret([32 x i8]) {{.*}}, i32 %0, { fp128, fp128 } %1) + // POWERPC64LE: define{{.*}} { fp128, fp128 } @cplx_f128({ fp128, fp128 } %0) // SPARC: define{{.*}} inreg { fp128, fp128 } @cplx_f128(ptr {{.*}} dereferenceable(32) {{.*}}) // WASM32: define{{.*}} void @cplx_f128(ptr {{.*}} sret([32 x i8]) {{.*}}, ptr {{.*}}) // WASM64: define{{.*}} void @cplx_f128(ptr {{.*}} sret([32 x i8]) {{.*}}, ptr {{.*}}) @@ -223,7 +229,17 @@ pub extern "C" fn cplx_f128(x: Complex) -> Complex { // WINDOWS_GNU: define{{.*}} void @cplx_f128(ptr {{.*}} sret([32 x i8]) {{.*}}, ptr {{.*}}) // X86_64: define{{.*}} void @cplx_f128(ptr {{.*}} sret([32 x i8]) {{.*}}, ptr {{.*}} byval([32 x i8]) {{.*}}) // LOONGARCH64: define{{.*}} void @cplx_f128(ptr {{.*}} sret([32 x i8]) {{.*}}, ptr {{.*}}) - // RISCV64 define{{.*}} void @cplx_f128(ptr {{.*}} sret([32 x i8]) {{.*}}, ptr {{.*}}) + // RISCV64: define{{.*}} void @cplx_f128(ptr {{.*}} sret([32 x i8]) {{.*}}, ptr {{.*}}) + x +} + +#[no_mangle] +#[cfg(any(target_arch = "powerpc", target_arch = "powerpc64"))] +pub extern "C" fn cplx_ppcf128(x: Complex) -> Complex { + // AIX: define{{.*}} { ppc_fp128, ppc_fp128 } @cplx_ppcf128({ ppc_fp128, ppc_fp128 } %0) + // POWERPC64: define{{.*}} { ppc_fp128, ppc_fp128 } @cplx_ppcf128({ ppc_fp128, ppc_fp128 } %0) + // POWERPC64LE: define{{.*}} { ppc_fp128, ppc_fp128 } @cplx_ppcf128({ ppc_fp128, ppc_fp128 } %0) + // POWERPC: define{{.*}} [8 x i32] @cplx_ppcf128([8 x i32] {{.*}}) x } @@ -247,7 +263,7 @@ pub extern "C" fn cplx_i8(x: Complex) -> Complex { // NVPTX: define{{.*}} { i8, i8 } @cplx_i8(ptr {{.*}} byval({ i8, i8 }) {{.*}}) // POWERPC64: define{{.*}} { i8, i8 } @cplx_i8({ i8, i8 } %0) // POWERPC64LE: define{{.*}} { i8, i8 } @cplx_i8({ i8, i8 } %0) - // POWERPC: define{{.*}} void @cplx_i8(ptr {{.*}} sret({ i8, i8 }) {{.*}}, ptr {{.*}} byval({ i8, i8 }) {{.*}}) + // POWERPC: define{{.*}} i16 @cplx_i8(i16 {{.*}}) // RISCV32: define{{.*}} i32 @cplx_i8(i32{{.*}}) // RISCV64: define{{.*}} i64 @cplx_i8(i64{{.*}}) // S390X: define{{.*}} void @cplx_i8(ptr {{.*}} sret([2 x i8]) {{.*}}, ptr {{.*}}) @@ -283,7 +299,7 @@ pub extern "C" fn cplx_i16(x: Complex) -> Complex { // NVPTX: define{{.*}} { i16, i16 } @cplx_i16(ptr {{.*}} byval({ i16, i16 }) {{.*}}) // POWERPC64: define{{.*}} { i16, i16 } @cplx_i16(i16 {{.*}}, i16 {{.*}}) // POWERPC64LE: define{{.*}} { i16, i16 } @cplx_i16(i16 {{.*}}, i16 {{.*}}) - // POWERPC: define{{.*}} void @cplx_i16(ptr {{.*}} sret({ i16, i16 }) {{.*}}, ptr {{.*}} byval({ i16, i16 }) {{.*}}) + // POWERPC: define{{.*}} i32 @cplx_i16(i32 {{.*}}) // RISCV32: define{{.*}} i32 @cplx_i16(i32 {{.*}}) // RISCV64: define{{.*}} i64 @cplx_i16(i64{{.*}}) // S390X: define{{.*}} void @cplx_i16(ptr {{.*}} sret([4 x i8]) {{.*}}, ptr {{.*}}) @@ -319,7 +335,7 @@ pub extern "C" fn cplx_i32(x: Complex) -> Complex { // NVPTX: define{{.*}} { i32, i32 } @cplx_i32(ptr {{.*}} byval({ i32, i32 }) {{.*}}) // POWERPC64: define{{.*}} { i32, i32 } @cplx_i32({ i32, i32 } %0) // POWERPC64LE: define{{.*}} { i32, i32 } @cplx_i32({ i32, i32 } %0) - // POWERPC: define{{.*}} void @cplx_i32(ptr {{.*}} sret({ i32, i32 }) {{.*}}, ptr {{.*}} byval({ i32, i32 }) {{.*}}) + // POWERPC: define{{.*}} i64 @cplx_i32(i64 {{.*}}) // RISCV32: define{{.*}} [2 x i32] @cplx_i32([2 x i32] {{.*}}) // RISCV64: define{{.*}} i64 @cplx_i32(i64 {{.*}}) // S390X: define{{.*}} void @cplx_i32(ptr {{.*}} sret([8 x i8]) {{.*}}, ptr {{.*}}) @@ -355,7 +371,7 @@ pub extern "C" fn cplx_i64(x: Complex) -> Complex { // NVPTX: define{{.*}} { i64, i64 } @cplx_i64(ptr {{.*}} byval({ i64, i64 }) {{.*}}) // POWERPC64: define{{.*}} { i64, i64 } @cplx_i64({ i64, i64 } %0) // POWERPC64LE: define{{.*}} { i64, i64 } @cplx_i64({ i64, i64 } %0) - // POWERPC: define{{.*}} void @cplx_i64(ptr {{.*}} sret({ i64, i64 }) {{.*}}, ptr {{.*}} byval({ i64, i64 }) {{.*}}) + // POWERPC: define{{.*}} [4 x i32] @cplx_i64([4 x i32] {{.*}}) // RISCV32: define{{.*}} void @cplx_i64(ptr {{.*}} sret([16 x i8]) {{.*}}, ptr {{.*}}) // RISCV64: define{{.*}} [2 x i64] @cplx_i64([2 x i64] {{.*}}) // S390X: define{{.*}} void @cplx_i64(ptr {{.*}} sret([16 x i8]) {{.*}}, ptr {{.*}}) @@ -396,7 +412,7 @@ pub extern "C" fn wrapper_cplx_i64( // NVPTX: define{{.*}} { i64, i64 } @wrapper_cplx_i64(ptr {{.*}} byval({ i64, i64 }) {{.*}}) // POWERPC64: define{{.*}} { i64, i64 } @wrapper_cplx_i64({ i64, i64 } %0) // POWERPC64LE: define{{.*}} { i64, i64 } @wrapper_cplx_i64({ i64, i64 } %0) - // POWERPC: define{{.*}} void @wrapper_cplx_i64(ptr {{.*}} sret({ i64, i64 }) {{.*}}, ptr {{.*}} byval({ i64, i64 }) {{.*}}) + // POWERPC: define{{.*}} [4 x i32] @wrapper_cplx_i64([4 x i32] {{.*}}) // RISCV32: define{{.*}} void @wrapper_cplx_i64(ptr {{.*}} sret([16 x i8]) {{.*}}, ptr {{.*}}) // RISCV64: define{{.*}} [2 x i64] @wrapper_cplx_i64([2 x i64] {{.*}}) // S390X: define{{.*}} void @wrapper_cplx_i64(ptr {{.*}} sret([16 x i8]) {{.*}}, ptr {{.*}}) diff --git a/tests/codegen-llvm/powerpc-abi/complex-padding-spe.rs b/tests/codegen-llvm/powerpc-abi/complex-padding-spe.rs new file mode 100644 index 0000000000000..c7d0c85fc2da0 --- /dev/null +++ b/tests/codegen-llvm/powerpc-abi/complex-padding-spe.rs @@ -0,0 +1,47 @@ +// ignore-tidy-file-linelength +//@ add-minicore +//@ compile-flags: -C no-prepopulate-passes -Z codegen-source-order -C opt-level=3 + +//@ revisions: FLT SPE +//@ [FLT] compile-flags: --target powerpc-unknown-linux-gnu +//@ [FLT] needs-llvm-components: powerpc +//@ [SPE] compile-flags: --target powerpc-unknown-linux-gnuspe +//@ [SPE] needs-llvm-components: powerpc + +// Checks that on 32-bit powerpc with SPE a `Complex` is never split between the GPRs and the +// stack. SPE is a softfloat target that passes `f32`, `f64` and `ppcf128` in GPRs, with an `f64` +// in an even-odd GPR pair. + +#![feature(no_core, lang_items)] +#![no_core] +#![expect(improper_ctypes_definitions)] +#![crate_type = "lib"] + +extern crate minicore; +use minicore::arch::powerpc::ppcf128; +use minicore::num::Complex; +use minicore::*; + +type Cld = Complex; + +// FLT: define{{.*}} void @float(float noundef %a, [8 x i32] %0) +// SPE: define{{.*}} void @float(float noundef %a, i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, [8 x i32] %7) +#[unsafe(no_mangle)] +pub extern "C" fn float(a: f32, x: Cld) {} + +// FLT: define{{.*}} void @double(double noundef %a, [8 x i32] %0) +// SPE: define{{.*}} void @double(double noundef %a, i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, [8 x i32] %6) +#[unsafe(no_mangle)] +pub extern "C" fn double(a: f64, x: Cld) {} + +// With SPE the `f64` is in r5..=r6, r4 is skipped. +// +// FLT: define{{.*}} void @double_aligned(float noundef %a, double noundef %b, [8 x i32] %0) +// SPE: define{{.*}} void @double_aligned(float noundef %a, double noundef %b, i32 %0, i32 %1, i32 %2, i32 %3, [8 x i32] %4) +#[unsafe(no_mangle)] +pub extern "C" fn double_aligned(a: f32, b: f64, x: Cld) {} + +// FLT: define{{.*}} void @long_double(ppc_fp128 noundef %a, [8 x i32] %0) +// SPE: define{{.*}} void @long_double(ppc_fp128 noundef %a, i32 %0, i32 %1, i32 %2, i32 %3, [8 x i32] %4) +#[unsafe(no_mangle)] +pub extern "C" fn long_double(a: ppcf128, x: Cld) {} diff --git a/tests/codegen-llvm/powerpc-abi/complex-padding.rs b/tests/codegen-llvm/powerpc-abi/complex-padding.rs new file mode 100644 index 0000000000000..b7d5ef4699a0c --- /dev/null +++ b/tests/codegen-llvm/powerpc-abi/complex-padding.rs @@ -0,0 +1,245 @@ +// ignore-tidy-file-linelength +//@ add-minicore +//@ compile-flags: -C no-prepopulate-passes -Z codegen-source-order -C opt-level=3 + +//@ revisions: POWERPC ALTIVEC VSX +//@ [POWERPC] compile-flags: --target powerpc-unknown-linux-gnu +//@ [POWERPC] needs-llvm-components: powerpc +//@ [ALTIVEC] compile-flags: --target powerpc-unknown-linux-gnu -C target-feature=+altivec +//@ [ALTIVEC] needs-llvm-components: powerpc +//@ [VSX] compile-flags: --target powerpc-unknown-linux-gnu -C target-feature=+vsx +//@ [VSX] needs-llvm-components: powerpc + +// Checks that on 32-bit powerpc a `Complex` is never split between the GPRs and the stack. +// When a complex number only partially fits in the remaining registers, the complex value and +// any subsequent arguments are passed via the stack. +// +// To know whether an argument fits, we need an accurate accounting of how many GPRs are +// already used. This file tests that logic. +// +// The padding arguments are not marked as `noundef`, and usually have names like %0, %1, etc. + +#![feature(no_core, lang_items, f16, f128)] +#![no_core] +#![expect(improper_ctypes_definitions)] +#![crate_type = "lib"] + +extern crate minicore; +use minicore::arch::powerpc::ppcf128; +use minicore::num::Complex; +use minicore::simd::*; +use minicore::*; + +type Cf = Complex; +type Cd = Complex; +type Cld = Complex; + +/// A type big enough to be returned via sret pointer, and hence claim a GPR. +#[repr(C)] +pub struct Big([u32; 8]); + +/// A zero-sized type, which is passed by reference, claiming a GPR. +#[repr(C)] +pub struct Empty {} + +// The complex value fits in the remaining GPRs, no padding needed. + +// CHECK: define{{.*}} void @fits_last(i32 noundef %r3, i32 noundef %r4, i32 noundef %r5, i32 noundef %r6, [4 x i32] %0) +#[unsafe(no_mangle)] +pub extern "C" fn fits_last(r3: i32, r4: i32, r5: i32, r6: i32, r7_r10: Cd) {} + +// The complex value does not fit, so the remaining GPRs are filled with padding. + +// CHECK: define{{.*}} void @pad_three(i32 noundef %r3, i32 noundef %r4, i32 noundef %r5, i32 noundef %r6, i32 noundef %r7, i32 %0, i32 %1, i32 %2, [4 x i32] %3, i32 noundef %stack16) +#[unsafe(no_mangle)] +pub extern "C" fn pad_three(r3: i32, r4: i32, r5: i32, r6: i32, r7: i32, stack0: Cd, stack16: i32) { +} + +// CHECK: define{{.*}} void @pad_second(i32 noundef %r3, [4 x i32] %0, i32 noundef %r8, i32 noundef %r9, i32 %1, [4 x i32] %2, i32 noundef %stack16) +#[unsafe(no_mangle)] +pub extern "C" fn pad_second(r3: i32, r4_r7: Cd, r8: i32, r9: i32, stack0: Cd, stack16: i32) {} + +// Arguments are passed in r3..=r10, and after that on the stack, so no padding is needed here. + +// CHECK: define{{.*}} void @no_gprs_left(i32 noundef %r3, i32 noundef %r4, i32 noundef %r5, i32 noundef %r6, i32 noundef %r7, i32 noundef %r8, i32 noundef %r9, i32 noundef %r10, i32 noundef %stack0, [4 x i32] %0) +#[unsafe(no_mangle)] +pub extern "C" fn no_gprs_left( + r3: i32, + r4: i32, + r5: i32, + r6: i32, + r7: i32, + r8: i32, + r9: i32, + r10: i32, + stack0: i32, + stack4: Cd, +) { +} + +// An 8-byte complex value is cast to i64 so that it uses an even-odd GPR pair. +// Strangely, larger complex values do not need to be aligned. + +// CHECK: define{{.*}} void @complex_cf_aligned(i32 noundef %r3, i64 %0, i32 %1, i32 %2, i32 %3, i32 %4, [8 x i32] %5) +#[unsafe(no_mangle)] +pub extern "C" fn complex_cf_aligned(r3: i32, r5_r6: Cf, x: Cld) {} + +// CHECK: define{{.*}} void @complex_cd_unaligned(i32 noundef %r3, [4 x i32] %0, i32 %1, i32 %2, i32 %3, [8 x i32] %4) +#[unsafe(no_mangle)] +pub extern "C" fn complex_cd_unaligned(r3: i32, r4_r7: Cd, x: Cld) {} + +// A `Cf` that does not fit in r10 is passed on the stack. + +// CHECK: define{{.*}} void @complex_cf_spill(i32 noundef %r3, i32 noundef %r4, i32 noundef %r5, i32 noundef %r6, i32 noundef %r7, i32 noundef %r8, i32 noundef %r9, i64 %0, [8 x i32] %1) +#[unsafe(no_mangle)] +pub extern "C" fn complex_cf_spill( + r3: i32, + r4: i32, + r5: i32, + r6: i32, + r7: i32, + r8: i32, + r9: i32, + stack0: Cf, + x: Cld, +) { +} + +// An `f32` is passed in an FPR, so the `Cf` uses r3..=r4. Then r5..=r10 are padding, with the Cld +// passed via the stack. + +// CHECK: define{{.*}} void @complex_cf_after_float(float noundef %f1, i64 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, [8 x i32] %7) +#[unsafe(no_mangle)] +pub extern "C" fn complex_cf_after_float(f1: f32, r3_r4: Cf, x: Cld) {} + +// Check that the sret pointer uses a GPR. + +// CHECK: define{{.*}} void @sret(ptr {{.*}}sret([32 x i8]){{.*}}, i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, [8 x i32] %7) +#[unsafe(no_mangle)] +pub extern "C" fn sret(x: Cld) -> Big { + loop {} +} + +// A `repr(C)` ZST is passed by reference, and the pointer uses a GPR. + +// CHECK: define{{.*}} void @zst(ptr {{.*}}%_1, i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, [8 x i32] %7) +#[unsafe(no_mangle)] +pub extern "C" fn zst(r3: Empty, x: Cld) {} + +// CHECK: define{{.*}} void @zst_no_gprs_left(i32 noundef %r3, i32 noundef %r4, i32 noundef %r5, i32 noundef %r6, i32 noundef %r7, i32 noundef %r8, i32 noundef %r9, i32 noundef %r10, ptr {{.*}}%_9, [4 x i32] %0) +#[unsafe(no_mangle)] +pub extern "C" fn zst_no_gprs_left( + r3: i32, + r4: i32, + r5: i32, + r6: i32, + r7: i32, + r8: i32, + r9: i32, + r10: i32, + stack0: Empty, + stack4: Cd, +) { +} + +// Integers wider than a GPR (i.e. 32 bits) are split by LLVM, which aligns them to an even-odd GPR pair. + +// CHECK: define{{.*}} void @i64_aligned(i32 noundef %r3, i64 noundef %r5_r6, i32 %0, i32 %1, i32 %2, i32 %3, [8 x i32] %4) +#[unsafe(no_mangle)] +pub extern "C" fn i64_aligned(r3: i32, r5_r6: i64, x: Cld) {} + +// CHECK: define{{.*}} void @i128_aligned(i32 noundef %r3, i128 noundef %r5_r8, i32 %0, i32 %1, [8 x i32] %2) +#[unsafe(no_mangle)] +pub extern "C" fn i128_aligned(r3: i32, r5_r8: i128, x: Cld) {} + +// CHECK: define{{.*}} void @i64_spill(i32 noundef %r3, i32 noundef %r4, i32 noundef %r5, i32 noundef %r6, i32 noundef %r7, i32 noundef %r8, i32 noundef %r9, i64 noundef %stack0, [8 x i32] %0) +#[unsafe(no_mangle)] +pub extern "C" fn i64_spill( + r3: i32, + r4: i32, + r5: i32, + r6: i32, + r7: i32, + r8: i32, + r9: i32, + stack0: i64, + x: Cld, +) { +} + +// Lock in the current LLVM behavior of splitting up `i128` between registers and stack. +// +// Note that neither the ABI specification nor C compilers support `i128` at the moment, +// so the behavior of `i128` may change in the future. + +// CHECK: define{{.*}} void @i128_split(i32 noundef %r3, i32 noundef %r4, i32 noundef %r5, i32 noundef %r6, i32 noundef %r7, i128 noundef %r9_r10_stack0, [8 x i32] %0) +#[unsafe(no_mangle)] +pub extern "C" fn i128_split( + r3: i32, + r4: i32, + r5: i32, + r6: i32, + r7: i32, + r9_r10_stack0: i128, + x: Cld, +) { +} + +// Only `f32`, `f64` and `ppcf128` are passed in FPRs, `f16` uses GPRs (although `f16` might be +// changed to use FPRs in the future), `f128` is only valid with +vsx. + +// CHECK: define{{.*}} void @f16_gpr(half noundef %r3, i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, [8 x i32] %7) +#[unsafe(no_mangle)] +pub extern "C" fn f16_gpr(r3: f16, x: Cld) {} + +// CHECK: define{{.*}} void @f32_fpr(float noundef %f1, [8 x i32] %0) +#[unsafe(no_mangle)] +pub extern "C" fn f32_fpr(f1: f32, x: Cld) {} + +// CHECK: define{{.*}} void @f64_fpr(double noundef %f1, [8 x i32] %0) +#[unsafe(no_mangle)] +pub extern "C" fn f64_fpr(f1: f64, x: Cld) {} + +// CHECK: define{{.*}} void @ppcf128_fpr(ppc_fp128 noundef %f1_f2, [8 x i32] %0) +#[unsafe(no_mangle)] +pub extern "C" fn ppcf128_fpr(f1_f2: ppcf128, x: Cld) {} + +// Legal vector types are passed in vector registers, they never use GPRs. + +#[cfg(target_feature = "altivec")] +mod altivec { + use super::*; + + // ALTIVEC: define{{.*}} void @vec_i8x16(<16 x i8> %v2, [8 x i32] %0) + #[unsafe(no_mangle)] + pub extern "C" fn vec_i8x16(v2: i8x16, x: Cld) {} + + // ALTIVEC: define{{.*}} void @vec_i16x8(<8 x i16> %v2, [8 x i32] %0) + #[unsafe(no_mangle)] + pub extern "C" fn vec_i16x8(v2: i16x8, x: Cld) {} + + // ALTIVEC: define{{.*}} void @vec_i32x4(<4 x i32> %v2, [8 x i32] %0) + #[unsafe(no_mangle)] + pub extern "C" fn vec_i32x4(v2: i32x4, x: Cld) {} + + // ALTIVEC: define{{.*}} void @vec_f64x2(<2 x double> %f1_f2, [8 x i32] %0) + #[unsafe(no_mangle)] + pub extern "C" fn vec_f64x2(f1_f2: f64x2, x: Cld) {} +} + +#[cfg(target_feature = "vsx")] +mod vsx { + use super::*; + + // VSX: define{{.*}} void @vec_i64x2(<2 x i64> %v2, [8 x i32] %0) + #[unsafe(no_mangle)] + pub extern "C" fn vec_i64x2(v2: i64x2, x: Cld) {} + + // VSX: define{{.*}} void @plain_f128(fp128 noundef %v2, [8 x i32] %0) + #[unsafe(no_mangle)] + pub extern "C" fn plain_f128(v2: f128, x: Cld) {} + + // VSX: define{{.*}} void @vec_f128x1(<1 x fp128> %v2, [8 x i32] %0) + #[unsafe(no_mangle)] + pub extern "C" fn vec_f128x1(v2: Simd, x: Cld) {} +} diff --git a/tests/crashes/153368.rs b/tests/crashes/153368.rs deleted file mode 100644 index 53e2aab4680fb..0000000000000 --- a/tests/crashes/153368.rs +++ /dev/null @@ -1,10 +0,0 @@ -//@ known-bug: #153368 -//@ compile-flags: -Znext-solver=globally -trait Foo: Bar + Bar {} -trait Bar { - fn bar(self) -> T; -} - -fn test_infer_version(x: &dyn Foo) { - x.bar() -} diff --git a/tests/mir-opt/pre-codegen/slice_iter.enumerated_loop.runtime-optimized.after.panic-abort.mir b/tests/mir-opt/pre-codegen/slice_iter.enumerated_loop.runtime-optimized.after.panic-abort.mir index b42087b5c822d..40384e1ee7472 100644 --- a/tests/mir-opt/pre-codegen/slice_iter.enumerated_loop.runtime-optimized.after.panic-abort.mir +++ b/tests/mir-opt/pre-codegen/slice_iter.enumerated_loop.runtime-optimized.after.panic-abort.mir @@ -27,69 +27,65 @@ fn enumerated_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () { let mut _31: (usize, &T); scope 19 { let _29: usize; - scope 24 { + scope 22 { } } scope 20 { - scope 21 { - scope 27 (inlined as FromResidual>>::from_residual) { - let mut _21: isize; - let mut _23: bool; - } + scope 25 (inlined as FromResidual>>::from_residual) { + let mut _21: isize; + let mut _23: bool; } } - scope 22 { - scope 23 { - } + scope 21 { } - scope 25 (inlined as Try>::branch) { + scope 23 (inlined as Try>::branch) { let _28: &T; - scope 26 { + scope 24 { } } - scope 28 (inlined as Iterator>::next) { + scope 26 (inlined as Iterator>::next) { let mut _8: std::ptr::NonNull; let _13: std::ptr::NonNull; let _15: std::ptr::NonNull; let mut _18: bool; let mut _24: usize; let _26: &T; - scope 29 { + scope 27 { let _14: *const T; - scope 30 { + scope 28 { let _20: usize; - scope 31 { - scope 34 (inlined #[track_caller] core::num::::unchecked_sub) { - scope 35 (inlined core::ub_checks::check_language_ub) { - scope 36 (inlined core::ub_checks::check_language_ub::runtime) { + scope 29 { + scope 32 (inlined #[track_caller] core::num::::unchecked_sub) { + scope 33 (inlined core::ub_checks::check_language_ub) { + scope 34 (inlined core::ub_checks::check_language_ub::runtime) { } } } - scope 37 (inlined std::ptr::without_provenance_mut::) { + scope 35 (inlined std::ptr::without_provenance_mut::) { } } - scope 32 (inlined std::ptr::const_ptr::::addr) { - scope 33 (inlined std::ptr::const_ptr::::cast::<()>) { + scope 30 (inlined std::ptr::const_ptr::::addr) { + scope 31 (inlined std::ptr::const_ptr::::cast::<()>) { } } - scope 38 (inlined as PartialEq>::eq) { + scope 36 (inlined as PartialEq>::eq) { let mut _16: *mut T; let mut _17: *mut T; - scope 39 (inlined NonNull::::as_ptr) { + scope 37 (inlined NonNull::::as_ptr) { } - scope 40 (inlined NonNull::::as_ptr) { + scope 38 (inlined NonNull::::as_ptr) { } } - scope 41 (inlined NonNull::::add) { + scope 39 (inlined NonNull::::add) { let mut _19: *mut T; - scope 42 (inlined NonNull::::as_ptr) { + scope 40 (inlined NonNull::::as_ptr) { } } - scope 43 (inlined NonNull::::as_ref::<'_>) { + scope 41 (inlined NonNull::::as_ref::<'_>) { let _25: *const T; - scope 44 (inlined NonNull::::as_ptr) { + scope 42 (inlined NonNull::::as_ptr) { } - scope 45 (inlined std::ptr::mut_ptr::::cast_const) { + scope 43 (inlined std::ptr::mut_ptr::::cast_const) { } } } diff --git a/tests/run-make/abort-behavior/main.rs b/tests/run-make/abort-behavior/main.rs new file mode 100644 index 0000000000000..db7401fafbf8a --- /dev/null +++ b/tests/run-make/abort-behavior/main.rs @@ -0,0 +1,10 @@ +#![feature(abort_immediate)] + +fn main() { + let arg = std::env::args().skip(1).next().expect("no argument passed"); + match arg.as_str() { + "abort" => std::process::abort(), + "abort_immediate" => std::process::abort_immediate(), + _ => panic!("unrecognized command {}", arg), + } +} diff --git a/tests/run-make/abort-behavior/rmake.rs b/tests/run-make/abort-behavior/rmake.rs new file mode 100644 index 0000000000000..2d644777fdd45 --- /dev/null +++ b/tests/run-make/abort-behavior/rmake.rs @@ -0,0 +1,63 @@ +//! Check that abort library functions raise the expected signals. + +//@ ignore-cross-compile + +use run_make_support::{bin_name, run_fail_with_args, rustc}; + +#[derive(Debug)] +enum Variant { + Abort, + AbortImmediate, +} + +fn main() { + rustc().input("main.rs").run(); + + check_one(Variant::Abort); + check_one(Variant::AbortImmediate); +} + +fn check_one(variant: Variant) { + println!("checking variant {variant:?}"); + let arg = match variant { + Variant::Abort => "abort", + Variant::AbortImmediate => "abort_immediate", + }; + let bin = &bin_name("main"); + let out = run_fail_with_args(bin, &[arg]); + + let status = out.status(); + println!("output status {status}"); + assert!(!status.success()); + + cfg_select! { + unix => { + use std::assert_matches; + use std::os::unix::process::ExitStatusExt; + + use run_make_support::libc; + + let sig = status.signal().expect("no signal recorded"); + match variant { + Variant::Abort => assert_eq!(sig, libc::SIGABRT), + Variant::AbortImmediate => assert_matches!(sig, libc::SIGILL | libc::SIGTRAP), + }; + } + windows => { + use run_make_support::windows; + use windows::Win32::Foundation::{ + STATUS_ILLEGAL_INSTRUCTION, STATUS_STACK_BUFFER_OVERRUN, + }; + + let code = status.code().unwrap(); + let expected = match variant { + Variant::Abort => STATUS_STACK_BUFFER_OVERRUN.0, + Variant::AbortImmediate => STATUS_ILLEGAL_INSTRUCTION.0, + }; + assert_eq!(code, expected); + } + _ => { + unimplemented!("target may need a new branch") + } + } +} diff --git a/tests/ui/asm/aarch64/bad-reg.stderr b/tests/ui/asm/aarch64/bad-reg.stderr index 8937509763dec..14ffdb3e0059f 100644 --- a/tests/ui/asm/aarch64/bad-reg.stderr +++ b/tests/ui/asm/aarch64/bad-reg.stderr @@ -30,7 +30,7 @@ LL | asm!("{:r}", in(vreg) foo); | | | template modifier | - = note: the `vreg` register class supports the following template modifiers: `b`, `h`, `s`, `d`, `q`, `v`, and `z` + = note: the `vreg` register class supports the following template modifiers: `b`, `h`, `s`, `d`, `q`, and `v` error: invalid asm template modifier `r` for this register class --> $DIR/bad-reg.rs:26:15 @@ -40,7 +40,7 @@ LL | asm!("{:r}", in(vreg_low16) foo); | | | template modifier | - = note: the `vreg_low16` register class supports the following template modifiers: `b`, `h`, `s`, `d`, `q`, `v`, and `z` + = note: the `vreg_low16` register class supports the following template modifiers: `b`, `h`, `s`, `d`, `q`, and `v` error: asm template modifiers are not allowed for `const` arguments --> $DIR/bad-reg.rs:28:15 diff --git a/tests/ui/associated-item/prepare-vtable-segments-none.next.stderr b/tests/ui/associated-item/prepare-vtable-segments-none.next.stderr new file mode 100644 index 0000000000000..e2c1109e68f74 --- /dev/null +++ b/tests/ui/associated-item/prepare-vtable-segments-none.next.stderr @@ -0,0 +1,31 @@ +error[E0425]: cannot find type `T` in this scope + --> $DIR/prepare-vtable-segments-none.rs:7:16 + | +LL | trait Foo: Bar + Bar {} + | ^ not found in this scope + +error[E0161]: cannot move a value of type `dyn Foo` + --> $DIR/prepare-vtable-segments-none.rs:14:5 + | +LL | x.bar() + | ^ the size of `dyn Foo` cannot be statically determined + +error[E0507]: cannot move out of `*x` which is behind a shared reference + --> $DIR/prepare-vtable-segments-none.rs:14:5 + | +LL | x.bar() + | ^ ----- `*x` moved due to this method call + | | + | move occurs because `*x` has type `dyn Foo`, which does not implement the `Copy` trait + | +note: `Bar::bar` takes ownership of the receiver `self`, which moves `*x` + --> $DIR/prepare-vtable-segments-none.rs:10:12 + | +LL | trait Bar { +LL | fn bar(self) -> T; + | ^^^^ + +error: aborting due to 3 previous errors + +Some errors have detailed explanations: E0161, E0425, E0507. +For more information about an error, try `rustc --explain E0161`. diff --git a/tests/ui/associated-item/prepare-vtable-segments-none.old.stderr b/tests/ui/associated-item/prepare-vtable-segments-none.old.stderr new file mode 100644 index 0000000000000..39bfa61a39a14 --- /dev/null +++ b/tests/ui/associated-item/prepare-vtable-segments-none.old.stderr @@ -0,0 +1,9 @@ +error[E0425]: cannot find type `T` in this scope + --> $DIR/prepare-vtable-segments-none.rs:7:16 + | +LL | trait Foo: Bar + Bar {} + | ^ not found in this scope + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0425`. diff --git a/tests/ui/associated-item/prepare-vtable-segments-none.rs b/tests/ui/associated-item/prepare-vtable-segments-none.rs new file mode 100644 index 0000000000000..c906e8ec0d848 --- /dev/null +++ b/tests/ui/associated-item/prepare-vtable-segments-none.rs @@ -0,0 +1,19 @@ +//! Regression test for . + +//@ revisions: old next +//@ ignore-compare-mode-next-solver (explicit revisions) +//@[next] compile-flags: -Znext-solver + +trait Foo: Bar + Bar {} +//~^ ERROR cannot find type `T` in this scope +trait Bar { + fn bar(self) -> T; +} + +fn test_infer_version(x: &dyn Foo) { + x.bar() + //[next]~^ ERROR cannot move a value of type `dyn Foo` + //[next]~| ERROR cannot move out of `*x` which is behind a shared reference +} + +fn main() {} diff --git a/tests/ui/attributes/attrs-on-params.stderr b/tests/ui/attributes/attrs-on-params.stderr index 748f189590a46..7397b0a677310 100644 --- a/tests/ui/attributes/attrs-on-params.stderr +++ b/tests/ui/attributes/attrs-on-params.stderr @@ -21,7 +21,6 @@ LL | #[rustc_splat] a1: u32, = note: see issue #153629 for more information = help: add `#![feature(splat)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - = note: the `rustc_splat` attribute is experimental error[E0658]: the `rustc_splat` attribute is an experimental feature --> $DIR/attrs-on-params.rs:14:11 @@ -32,7 +31,6 @@ LL | #[rustc_splat(invalid)] a4: u32, = note: see issue #153629 for more information = help: add `#![feature(splat)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - = note: the `rustc_splat` attribute is experimental error[E0565]: malformed `rustc_splat` attribute input --> $DIR/attrs-on-params.rs:14:11 @@ -57,7 +55,6 @@ LL | #[rustc_splat] a1: u32, = note: see issue #153629 for more information = help: add `#![feature(splat)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - = note: the `rustc_splat` attribute is experimental error[E0658]: the `rustc_splat` attribute is an experimental feature --> $DIR/attrs-on-params.rs:27:11 @@ -68,7 +65,6 @@ LL | #[rustc_splat] a1: u32, = note: see issue #153629 for more information = help: add `#![feature(splat)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - = note: the `rustc_splat` attribute is experimental error: aborting due to 7 previous errors diff --git a/tests/ui/attributes/malformed-attrs.stderr b/tests/ui/attributes/malformed-attrs.stderr index 09d8408af46c3..8791659658906 100644 --- a/tests/ui/attributes/malformed-attrs.stderr +++ b/tests/ui/attributes/malformed-attrs.stderr @@ -477,6 +477,18 @@ help: must be of the form LL | #[patchable_function_entry(prefix_nops = m, entry_nops = n, section = "section")] | ++++++++++++++++++++++++++++++++++++++++++++++++++++++ +error: attribute should be applied to `const fn` + --> $DIR/malformed-attrs.rs:30:1 + | +LL | #[rustc_allow_const_fn_unstable] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | / fn test() { +LL | | #[coroutine = 63] || {} +... | +LL | | } + | |_- not a `const fn` + error[E0565]: malformed `coroutine` attribute input --> $DIR/malformed-attrs.rs:117:7 | @@ -846,18 +858,6 @@ LL - #[allow_internal_unsafe = 1] LL + #[allow_internal_unsafe] | -error: attribute should be applied to `const fn` - --> $DIR/malformed-attrs.rs:30:1 - | -LL | #[rustc_allow_const_fn_unstable] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -... -LL | / fn test() { -LL | | #[coroutine = 63] || {} -... | -LL | | } - | |_- not a `const fn` - error: valid forms for the attribute are `doc = "doc comment"`, `doc(alias)`, `doc(auto_cfg)`, `doc(cfg)`, `doc(hidden)`, `doc(html_favicon_url)`, `doc(html_logo_url)`, `doc(html_no_source)`, `doc(html_playground_url)`, `doc(html_root_url)`, `doc(inline)`, `doc(issue_tracker_base_url)`, `doc(masked)`, `doc(no_inline)`, `doc(notable_trait)`, and `doc(test)` --> $DIR/malformed-attrs.rs:40:3 | diff --git a/tests/ui/checked-type-aliases/feature-gate-marked-unchecked-type-aliases.rs b/tests/ui/checked-type-aliases/feature-gate-marked-unchecked-type-aliases.rs new file mode 100644 index 0000000000000..e82d2845caf9e --- /dev/null +++ b/tests/ui/checked-type-aliases/feature-gate-marked-unchecked-type-aliases.rs @@ -0,0 +1,5 @@ +#[rustc_unchecked_type_alias] +//~^ ERROR the `rustc_unchecked_type_alias` attribute is an experimental feature +type Alias = (); + +fn main() {} diff --git a/tests/ui/checked-type-aliases/feature-gate-marked-unchecked-type-aliases.stderr b/tests/ui/checked-type-aliases/feature-gate-marked-unchecked-type-aliases.stderr new file mode 100644 index 0000000000000..13ffac2af0357 --- /dev/null +++ b/tests/ui/checked-type-aliases/feature-gate-marked-unchecked-type-aliases.stderr @@ -0,0 +1,13 @@ +error[E0658]: the `rustc_unchecked_type_alias` attribute is an experimental feature + --> $DIR/feature-gate-marked-unchecked-type-aliases.rs:1:3 + | +LL | #[rustc_unchecked_type_alias] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: see issue #112792 for more information + = help: add `#![feature(marked_unchecked_type_aliases)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0658`. diff --git a/tests/ui/checked-type-aliases/lint-unmarked-unchecked-type-aliases.fixed b/tests/ui/checked-type-aliases/lint-unmarked-unchecked-type-aliases.fixed new file mode 100644 index 0000000000000..45150954577ba --- /dev/null +++ b/tests/ui/checked-type-aliases/lint-unmarked-unchecked-type-aliases.fixed @@ -0,0 +1,13 @@ +//@ run-rustfix +//@ check-pass + +#![feature(marked_unchecked_type_aliases)] +#![warn(unmarked_unchecked_type_aliases)] +#![allow(dead_code)] + +#[rustc_unchecked_type_alias] +type Alias = [(); panic!()]; +//~^ WARN unchecked type alias lacks attribute `#[rustc_unchecked_type_alias]` [unmarked_unchecked_type_aliases] +//~| WARN this changes meaning in Rust future + +fn main() {} diff --git a/tests/ui/checked-type-aliases/lint-unmarked-unchecked-type-aliases.rs b/tests/ui/checked-type-aliases/lint-unmarked-unchecked-type-aliases.rs new file mode 100644 index 0000000000000..13959b55ac07b --- /dev/null +++ b/tests/ui/checked-type-aliases/lint-unmarked-unchecked-type-aliases.rs @@ -0,0 +1,12 @@ +//@ run-rustfix +//@ check-pass + +#![feature(marked_unchecked_type_aliases)] +#![warn(unmarked_unchecked_type_aliases)] +#![allow(dead_code)] + +type Alias = [(); panic!()]; +//~^ WARN unchecked type alias lacks attribute `#[rustc_unchecked_type_alias]` [unmarked_unchecked_type_aliases] +//~| WARN this changes meaning in Rust future + +fn main() {} diff --git a/tests/ui/checked-type-aliases/lint-unmarked-unchecked-type-aliases.stderr b/tests/ui/checked-type-aliases/lint-unmarked-unchecked-type-aliases.stderr new file mode 100644 index 0000000000000..d4ab24c9b80b4 --- /dev/null +++ b/tests/ui/checked-type-aliases/lint-unmarked-unchecked-type-aliases.stderr @@ -0,0 +1,21 @@ +warning: unchecked type alias lacks attribute `#[rustc_unchecked_type_alias]` + --> $DIR/lint-unmarked-unchecked-type-aliases.rs:8:1 + | +LL | type Alias = [(); panic!()]; + | ^^^^^^^^^^ + | + = warning: this changes meaning in Rust future + = note: for more information, see +note: the lint level is defined here + --> $DIR/lint-unmarked-unchecked-type-aliases.rs:5:9 + | +LL | #![warn(unmarked_unchecked_type_aliases)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +help: annotate the type alias with `#[rustc_unchecked_type_alias]` + | +LL + #[rustc_unchecked_type_alias] +LL | type Alias = [(); panic!()]; + | + +warning: 1 warning emitted + diff --git a/tests/ui/checked-type-aliases/marked-unchecked-type-aliases.checked-by-default.stderr b/tests/ui/checked-type-aliases/marked-unchecked-type-aliases.checked-by-default.stderr new file mode 100644 index 0000000000000..53bb95372d443 --- /dev/null +++ b/tests/ui/checked-type-aliases/marked-unchecked-type-aliases.checked-by-default.stderr @@ -0,0 +1,15 @@ +warning: bounds on generic parameters in unchecked type aliases are not enforced + --> $DIR/marked-unchecked-type-aliases.rs:8:16 + | +LL | type Alias0 = T; + | ^^^^ will not be checked at usage sites of the type alias + | + = note: `#[warn(type_alias_bounds)]` on by default +help: remove this bound + | +LL - type Alias0 = T; +LL + type Alias0 = T; + | + +warning: 1 warning emitted + diff --git a/tests/ui/checked-type-aliases/marked-unchecked-type-aliases.rs b/tests/ui/checked-type-aliases/marked-unchecked-type-aliases.rs new file mode 100644 index 0000000000000..823a37ad2b7cf --- /dev/null +++ b/tests/ui/checked-type-aliases/marked-unchecked-type-aliases.rs @@ -0,0 +1,15 @@ +//@ revisions: unchecked-by-default checked-by-default +//@ check-pass + +#![feature(marked_unchecked_type_aliases)] +#![cfg_attr(checked_by_default, feature(checked_type_aliases))] + +#[rustc_unchecked_type_alias] +type Alias0 = T; //~ WARN [type_alias_bounds] + +#[rustc_unchecked_type_alias] +type Alias1 = [(); panic!()]; // OK + +fn main() { + let _: Alias0; // OK +} diff --git a/tests/ui/checked-type-aliases/marked-unchecked-type-aliases.unchecked-by-default.stderr b/tests/ui/checked-type-aliases/marked-unchecked-type-aliases.unchecked-by-default.stderr new file mode 100644 index 0000000000000..53bb95372d443 --- /dev/null +++ b/tests/ui/checked-type-aliases/marked-unchecked-type-aliases.unchecked-by-default.stderr @@ -0,0 +1,15 @@ +warning: bounds on generic parameters in unchecked type aliases are not enforced + --> $DIR/marked-unchecked-type-aliases.rs:8:16 + | +LL | type Alias0 = T; + | ^^^^ will not be checked at usage sites of the type alias + | + = note: `#[warn(type_alias_bounds)]` on by default +help: remove this bound + | +LL - type Alias0 = T; +LL + type Alias0 = T; + | + +warning: 1 warning emitted + diff --git a/tests/ui/const-generics/associated-const-bindings/associated-type-bound-issue-161100.rs b/tests/ui/const-generics/associated-const-bindings/associated-type-bound-issue-161100.rs new file mode 100644 index 0000000000000..cef72d2c73209 --- /dev/null +++ b/tests/ui/const-generics/associated-const-bindings/associated-type-bound-issue-161100.rs @@ -0,0 +1,15 @@ +//@ compile-flags: -Znext-solver=globally + +#![feature(gca_const_items, gca_min_const_items)] +#![allow(incomplete_features)] + +trait Trait { + const F: fn(); +} + +trait Nested { + type Out: Trait; + //~^ ERROR using function pointers as const generic parameters is forbidden +} + +fn main() {} diff --git a/tests/ui/const-generics/associated-const-bindings/associated-type-bound-issue-161100.stderr b/tests/ui/const-generics/associated-const-bindings/associated-type-bound-issue-161100.stderr new file mode 100644 index 0000000000000..873bcc26d6ea0 --- /dev/null +++ b/tests/ui/const-generics/associated-const-bindings/associated-type-bound-issue-161100.stderr @@ -0,0 +1,9 @@ +error[E0741]: using function pointers as const generic parameters is forbidden + --> $DIR/associated-type-bound-issue-161100.rs:11:21 + | +LL | type Out: Trait; + | ^^^^^^^^^^^^^ + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0741`. diff --git a/tests/ui/const-generics/associated-const-bindings/direct-const-item-associated-equality-issue-161100.rs b/tests/ui/const-generics/associated-const-bindings/direct-const-item-associated-equality-issue-161100.rs new file mode 100644 index 0000000000000..2ceb32a48a2d8 --- /dev/null +++ b/tests/ui/const-generics/associated-const-bindings/direct-const-item-associated-equality-issue-161100.rs @@ -0,0 +1,15 @@ +//@ compile-flags: -Znext-solver=globally + +#![feature(gca_const_items, gca_min_const_items)] + +struct S; +const C: S = S; + +trait Trait { + const F: S; +} + +fn take(_: impl Trait) {} +//~^ ERROR `S` must implement `ConstParamTy` + +fn main() {} diff --git a/tests/ui/const-generics/associated-const-bindings/direct-const-item-associated-equality-issue-161100.stderr b/tests/ui/const-generics/associated-const-bindings/direct-const-item-associated-equality-issue-161100.stderr new file mode 100644 index 0000000000000..c9a4207afea05 --- /dev/null +++ b/tests/ui/const-generics/associated-const-bindings/direct-const-item-associated-equality-issue-161100.stderr @@ -0,0 +1,15 @@ +error[E0741]: `S` must implement `ConstParamTy` to be used as the type of a const generic parameter + --> $DIR/direct-const-item-associated-equality-issue-161100.rs:12:23 + | +LL | fn take(_: impl Trait) {} + | ^^^^^^^^^^^^^^^^^^^^^ + | +help: add `#[derive(ConstParamTy, PartialEq, Eq)]` to the struct + | +LL + #[derive(ConstParamTy, PartialEq, Eq)] +LL | struct S; + | + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0741`. diff --git a/tests/ui/const-generics/associated-const-bindings/dyn-associated-const-issue-161100.rs b/tests/ui/const-generics/associated-const-bindings/dyn-associated-const-issue-161100.rs new file mode 100644 index 0000000000000..bab34f6b73854 --- /dev/null +++ b/tests/ui/const-generics/associated-const-bindings/dyn-associated-const-issue-161100.rs @@ -0,0 +1,12 @@ +//@ compile-flags: -Znext-solver=globally + +#![feature(gca_const_items, gca_min_const_items)] + +trait Trait { + const F: fn(); +} + +fn take(_: &dyn Trait) {} +//~^ ERROR using function pointers as const generic parameters is forbidden + +fn main() {} diff --git a/tests/ui/const-generics/associated-const-bindings/dyn-associated-const-issue-161100.stderr b/tests/ui/const-generics/associated-const-bindings/dyn-associated-const-issue-161100.stderr new file mode 100644 index 0000000000000..01e043016f96d --- /dev/null +++ b/tests/ui/const-generics/associated-const-bindings/dyn-associated-const-issue-161100.stderr @@ -0,0 +1,9 @@ +error[E0741]: using function pointers as const generic parameters is forbidden + --> $DIR/dyn-associated-const-issue-161100.rs:9:13 + | +LL | fn take(_: &dyn Trait) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0741`. diff --git a/tests/ui/const-generics/associated-const-bindings/fn-ptr-const-param-issue-161100.rs b/tests/ui/const-generics/associated-const-bindings/fn-ptr-const-param-issue-161100.rs new file mode 100644 index 0000000000000..02f8745726212 --- /dev/null +++ b/tests/ui/const-generics/associated-const-bindings/fn-ptr-const-param-issue-161100.rs @@ -0,0 +1,13 @@ +//@ compile-flags: -Znext-solver=globally + +#![feature(gca_const_items)] +#![feature(gca_min_const_items)] + +trait Trait { + const F: fn(); +} + +fn take(_: impl Trait) {} +//~^ ERROR using function pointers as const generic parameters is forbidden + +fn main() {} diff --git a/tests/ui/const-generics/associated-const-bindings/fn-ptr-const-param-issue-161100.stderr b/tests/ui/const-generics/associated-const-bindings/fn-ptr-const-param-issue-161100.stderr new file mode 100644 index 0000000000000..803dbd7a04b84 --- /dev/null +++ b/tests/ui/const-generics/associated-const-bindings/fn-ptr-const-param-issue-161100.stderr @@ -0,0 +1,9 @@ +error[E0741]: using function pointers as const generic parameters is forbidden + --> $DIR/fn-ptr-const-param-issue-161100.rs:10:23 + | +LL | fn take(_: impl Trait) {} + | ^^^^^^^^^^^^^ + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0741`. diff --git a/tests/ui/const-generics/associated-const-bindings/non-const-param-ty-associated-const-equality-issue-161100.rs b/tests/ui/const-generics/associated-const-bindings/non-const-param-ty-associated-const-equality-issue-161100.rs new file mode 100644 index 0000000000000..fd2327595a797 --- /dev/null +++ b/tests/ui/const-generics/associated-const-bindings/non-const-param-ty-associated-const-equality-issue-161100.rs @@ -0,0 +1,18 @@ +//@ compile-flags: -Znext-solver=globally + +#![feature(gca_const_items)] +#![feature(gca_min_const_items)] + +enum Foo { + Unit, + Function(fn()), +} + +trait Trait { + const X: Foo; +} + +fn unit(_: impl Trait) {} +//~^ ERROR `Foo` must implement `ConstParamTy` + +fn main() {} diff --git a/tests/ui/const-generics/associated-const-bindings/non-const-param-ty-associated-const-equality-issue-161100.stderr b/tests/ui/const-generics/associated-const-bindings/non-const-param-ty-associated-const-equality-issue-161100.stderr new file mode 100644 index 0000000000000..62dc2045da0fa --- /dev/null +++ b/tests/ui/const-generics/associated-const-bindings/non-const-param-ty-associated-const-equality-issue-161100.stderr @@ -0,0 +1,15 @@ +error[E0741]: `Foo` must implement `ConstParamTy` to be used as the type of a const generic parameter + --> $DIR/non-const-param-ty-associated-const-equality-issue-161100.rs:15:23 + | +LL | fn unit(_: impl Trait) {} + | ^^^^^^^^^^^^^^^^^ + | +help: add `#[derive(ConstParamTy, PartialEq, Eq)]` to the enum + | +LL + #[derive(ConstParamTy, PartialEq, Eq)] +LL | enum Foo { + | + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0741`. diff --git a/tests/ui/const-generics/associated-const-bindings/where-clause-issue-161100.rs b/tests/ui/const-generics/associated-const-bindings/where-clause-issue-161100.rs new file mode 100644 index 0000000000000..434feedb68f80 --- /dev/null +++ b/tests/ui/const-generics/associated-const-bindings/where-clause-issue-161100.rs @@ -0,0 +1,12 @@ +//@ compile-flags: -Znext-solver=globally + +#![feature(gca_const_items, gca_min_const_items)] + +trait Trait { + const F: fn(); +} + +fn take() where T: Trait {} +//~^ ERROR using function pointers as const generic parameters is forbidden + +fn main() {} diff --git a/tests/ui/const-generics/associated-const-bindings/where-clause-issue-161100.stderr b/tests/ui/const-generics/associated-const-bindings/where-clause-issue-161100.stderr new file mode 100644 index 0000000000000..f5ee2c0bba6b9 --- /dev/null +++ b/tests/ui/const-generics/associated-const-bindings/where-clause-issue-161100.stderr @@ -0,0 +1,9 @@ +error[E0741]: using function pointers as const generic parameters is forbidden + --> $DIR/where-clause-issue-161100.rs:9:29 + | +LL | fn take() where T: Trait {} + | ^^^^^^^^^^^^^ + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0741`. diff --git a/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.rs b/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.rs index 99130689d7ce2..81ff69919cb7a 100644 --- a/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.rs +++ b/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.rs @@ -30,7 +30,6 @@ mod v20 { //~| ERROR: maximum number of nodes exceeded in constant v20::v17::::{constant#0} //~| ERROR: maximum number of nodes exceeded in constant v20::v17::::{constant#0} //~| ERROR: maximum number of nodes exceeded in constant v20::v17::::{constant#0} - //~| ERROR: maximum number of nodes exceeded in constant v20::v17::::{constant#0} //~| ERROR: maximum number of nodes exceeded in constant v20::v17::::{constant#0} pub const fn v21() -> v18 { //~^ ERROR cannot find type `v18` in this scope diff --git a/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.stderr b/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.stderr index cf40269afc3dc..1b97917143888 100644 --- a/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.stderr +++ b/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.stderr @@ -1,5 +1,5 @@ error[E0432]: unresolved import `v20::v13` - --> $DIR/unevaluated-const-ice-119731.rs:42:15 + --> $DIR/unevaluated-const-ice-119731.rs:41:15 | LL | pub use v20::{v13, v17}; | ^^^ no `v13` in `v20` @@ -34,7 +34,7 @@ LL + pub const fn v21() -> v11 {} | error[E0425]: cannot find type `v18` in this scope - --> $DIR/unevaluated-const-ice-119731.rs:35:31 + --> $DIR/unevaluated-const-ice-119731.rs:34:31 | LL | pub const fn v21() -> v18 { | ^^^ not found in this scope @@ -51,7 +51,7 @@ LL + pub const fn v21() -> v11 { | error[E0422]: cannot find struct, variant or union type `v18` in this scope - --> $DIR/unevaluated-const-ice-119731.rs:37:13 + --> $DIR/unevaluated-const-ice-119731.rs:36:13 | LL | v18 { _p: () } | ^^^ not found in this scope @@ -137,14 +137,6 @@ LL | impl v17 { | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error: maximum number of nodes exceeded in constant v20::v17::::{constant#0} - --> $DIR/unevaluated-const-ice-119731.rs:28:37 - | -LL | impl v17 { - | ^^ - | - = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` - error[E0592]: duplicate definitions with name `v21` --> $DIR/unevaluated-const-ice-119731.rs:23:9 | @@ -154,7 +146,7 @@ LL | pub const fn v21() -> v18 {} LL | pub const fn v21() -> v18 { | ------------------------- other definition for `v21` -error: aborting due to 14 previous errors; 2 warnings emitted +error: aborting due to 13 previous errors; 2 warnings emitted Some errors have detailed explanations: E0422, E0425, E0432, E0592. For more information about an error, try `rustc --explain E0422`. diff --git a/tests/ui/consts/too_generic_eval_ice.next.stderr b/tests/ui/consts/too_generic_eval_ice.next.stderr index 01da33241c810..f0e80b7e1bba7 100644 --- a/tests/ui/consts/too_generic_eval_ice.next.stderr +++ b/tests/ui/consts/too_generic_eval_ice.next.stderr @@ -1,8 +1,10 @@ -error[E0284]: type annotations needed: cannot satisfy `the constant `Self::HOST_SIZE` can be evaluated` +error[E0284]: type annotations needed --> $DIR/too_generic_eval_ice.rs:11:13 | LL | [5; Self::HOST_SIZE] == [6; 0] - | ^^^^^^^^^^^^^^^ cannot satisfy `the constant `Self::HOST_SIZE` can be evaluated` + | ^^^^^^^^^^^^^^^ cannot infer the value of the constant `_` + | + = note: cannot satisfy `Foo::crash::{constant#0} == _` error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-asm_experimental_reg.aarch64.stderr b/tests/ui/feature-gates/feature-gate-asm_experimental_reg.aarch64.stderr index f19cb17a04a29..e1ac256ab7a79 100644 --- a/tests/ui/feature-gates/feature-gate-asm_experimental_reg.aarch64.stderr +++ b/tests/ui/feature-gates/feature-gate-asm_experimental_reg.aarch64.stderr @@ -8,6 +8,32 @@ LL | asm!("/* {0} */", in(preg) p); = help: add `#![feature(asm_experimental_reg)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date +error[E0658]: invalid asm template modifier `z` for this register class + --> $DIR/feature-gate-asm_experimental_reg.rs:53:24 + | +LL | unsafe { asm!("mov {1:z}.d, {0:z}.d", in(vreg) x, out(vreg) y) }; + | ^^^^^ template modifier ----------- argument + | + = note: the `vreg` register class only supports the following template modifiers on stable: `b`, `h`, `s`, `d`, `q`, and `v` + = note: enabling the `asm_experimental_reg` feature will allow using: `b`, `h`, `s`, `d`, `q`, `v`, and `z` + = note: see issue #133416 for more information + = help: add `#![feature(asm_experimental_reg)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date + +error[E0658]: invalid asm template modifier `z` for this register class + --> $DIR/feature-gate-asm_experimental_reg.rs:53:33 + | +LL | unsafe { asm!("mov {1:z}.d, {0:z}.d", in(vreg) x, out(vreg) y) }; + | ^^^^^ ---------- argument + | | + | template modifier + | + = note: the `vreg` register class only supports the following template modifiers on stable: `b`, `h`, `s`, `d`, `q`, and `v` + = note: enabling the `asm_experimental_reg` feature will allow using: `b`, `h`, `s`, `d`, `q`, `v`, and `z` + = note: see issue #133416 for more information + = help: add `#![feature(asm_experimental_reg)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date + error[E0658]: type `svint32_t` cannot be used with this register class in stable --> $DIR/feature-gate-asm_experimental_reg.rs:33:32 | @@ -48,6 +74,6 @@ LL | asm!("/* {0} */", in(preg) p); = help: add `#![feature(asm_experimental_reg)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error: aborting due to 5 previous errors +error: aborting due to 7 previous errors For more information about this error, try `rustc --explain E0658`. diff --git a/tests/ui/feature-gates/feature-gate-asm_experimental_reg.loongarch.stderr b/tests/ui/feature-gates/feature-gate-asm_experimental_reg.loongarch.stderr index 0f829dd65cb47..0eee8e9af60af 100644 --- a/tests/ui/feature-gates/feature-gate-asm_experimental_reg.loongarch.stderr +++ b/tests/ui/feature-gates/feature-gate-asm_experimental_reg.loongarch.stderr @@ -1,5 +1,5 @@ error[E0658]: register class `vreg` can only be used as a clobber in stable - --> $DIR/feature-gate-asm_experimental_reg.rs:60:41 + --> $DIR/feature-gate-asm_experimental_reg.rs:69:41 | LL | asm!("xvadd.h {1:u}, {0:u}, {0:u}", out(vreg) y, in(vreg) x); | ^^^^^^^^^^^ @@ -9,7 +9,7 @@ LL | asm!("xvadd.h {1:u}, {0:u}, {0:u}", out(vreg) y, in(vreg) x); = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: register class `vreg` can only be used as a clobber in stable - --> $DIR/feature-gate-asm_experimental_reg.rs:60:54 + --> $DIR/feature-gate-asm_experimental_reg.rs:69:54 | LL | asm!("xvadd.h {1:u}, {0:u}, {0:u}", out(vreg) y, in(vreg) x); | ^^^^^^^^^^ @@ -19,7 +19,7 @@ LL | asm!("xvadd.h {1:u}, {0:u}, {0:u}", out(vreg) y, in(vreg) x); = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: type `i8x16` cannot be used with this register class in stable - --> $DIR/feature-gate-asm_experimental_reg.rs:60:51 + --> $DIR/feature-gate-asm_experimental_reg.rs:69:51 | LL | asm!("xvadd.h {1:u}, {0:u}, {0:u}", out(vreg) y, in(vreg) x); | ^ @@ -29,7 +29,7 @@ LL | asm!("xvadd.h {1:u}, {0:u}, {0:u}", out(vreg) y, in(vreg) x); = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: type `i8x16` cannot be used with this register class in stable - --> $DIR/feature-gate-asm_experimental_reg.rs:60:63 + --> $DIR/feature-gate-asm_experimental_reg.rs:69:63 | LL | asm!("xvadd.h {1:u}, {0:u}, {0:u}", out(vreg) y, in(vreg) x); | ^ diff --git a/tests/ui/feature-gates/feature-gate-asm_experimental_reg.rs b/tests/ui/feature-gates/feature-gate-asm_experimental_reg.rs index c91036366a028..f6c03e246dc46 100644 --- a/tests/ui/feature-gates/feature-gate-asm_experimental_reg.rs +++ b/tests/ui/feature-gates/feature-gate-asm_experimental_reg.rs @@ -47,6 +47,15 @@ unsafe fn predicate(p: svbool_t) { //[aarch64]~| ERROR type `svbool_t` cannot be used with this register class in stable } +#[cfg(aarch64)] +unsafe fn modifier(x: f64) -> f64 { + let y: f64; + unsafe { asm!("mov {1:z}.d, {0:z}.d", in(vreg) x, out(vreg) y) }; + //[aarch64]~^ ERROR invalid asm template modifier `z` for this register class + //[aarch64]~| ERROR invalid asm template modifier `z` for this register class + y +} + #[cfg(loongarch)] #[repr(simd)] pub struct i8x16([i8; 16]); diff --git a/tests/ui/feature-gates/feature-gate-named-fn-trait-parameters.rs b/tests/ui/feature-gates/feature-gate-named-fn-trait-parameters.rs index 23307e798950f..b2643434c1c56 100644 --- a/tests/ui/feature-gates/feature-gate-named-fn-trait-parameters.rs +++ b/tests/ui/feature-gates/feature-gate-named-fn-trait-parameters.rs @@ -1,7 +1,9 @@ fn parse_my_data( data: &str, log: impl Fn(msg: String), - //~^ ERROR named parameters in parenthesized generic argument lists are experimental [E0658] + //~^ ERROR parameters in parenthesized generic argument lists with names, attributes, or c-variadics are experimental [E0658] + attrs: impl Fn(#[cfg(false)] String), + //~^ ERROR parameters in parenthesized generic argument lists with names, attributes, or c-variadics are experimental [E0658] ) { } fn main() {} diff --git a/tests/ui/feature-gates/feature-gate-named-fn-trait-parameters.stderr b/tests/ui/feature-gates/feature-gate-named-fn-trait-parameters.stderr index d50966c9352b0..30a2ff1325dcc 100644 --- a/tests/ui/feature-gates/feature-gate-named-fn-trait-parameters.stderr +++ b/tests/ui/feature-gates/feature-gate-named-fn-trait-parameters.stderr @@ -1,4 +1,4 @@ -error[E0658]: named parameters in parenthesized generic argument lists are experimental +error[E0658]: parameters in parenthesized generic argument lists with names, attributes, or c-variadics are experimental --> $DIR/feature-gate-named-fn-trait-parameters.rs:3:18 | LL | log: impl Fn(msg: String), @@ -8,6 +8,16 @@ LL | log: impl Fn(msg: String), = help: add `#![feature(named_fn_trait_parameters)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error: aborting due to 1 previous error +error[E0658]: parameters in parenthesized generic argument lists with names, attributes, or c-variadics are experimental + --> $DIR/feature-gate-named-fn-trait-parameters.rs:5:20 + | +LL | attrs: impl Fn(#[cfg(false)] String), + | ^^^^^^^^^^^^^ + | + = note: see issue #158499 for more information + = help: add `#![feature(named_fn_trait_parameters)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date + +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0658`. diff --git a/tests/ui/feature-gates/feature-gate-splat.stderr b/tests/ui/feature-gates/feature-gate-splat.stderr index 6fa3ef5c1fb93..307a10713677e 100644 --- a/tests/ui/feature-gates/feature-gate-splat.stderr +++ b/tests/ui/feature-gates/feature-gate-splat.stderr @@ -7,7 +7,6 @@ LL | #[rustc_splat] = note: see issue #153629 for more information = help: add `#![feature(splat)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - = note: the `rustc_splat` attribute is experimental error: aborting due to 1 previous error diff --git a/tests/ui/fn/fn-ptr-pattern.rs b/tests/ui/fn/fn-ptr-pattern.rs index 4260a5095048e..465fa9f9e20b5 100644 --- a/tests/ui/fn/fn-ptr-pattern.rs +++ b/tests/ui/fn/fn-ptr-pattern.rs @@ -43,6 +43,8 @@ fn semantics( restricted_pat6: fn(&true: ()), //~^ ERROR patterns aren't allowed in function pointer types + variadics: extern "C" fn(...), + duplicate_names: fn(x: usize, x: usize), ) { } @@ -72,6 +74,8 @@ fn syntax( restricted_pat4: fn(false: ()), restricted_pat5: fn(&_: ()), restricted_pat6: fn(&true: ()), + + variadics: extern "C" fn(...), ) { } struct Thing { a: bool, b: bool } diff --git a/tests/ui/fn/fn-ptr-pattern.stderr b/tests/ui/fn/fn-ptr-pattern.stderr index 27982d26dbc54..bf99fd06cf184 100644 --- a/tests/ui/fn/fn-ptr-pattern.stderr +++ b/tests/ui/fn/fn-ptr-pattern.stderr @@ -71,7 +71,7 @@ LL | self3: fn(bool, self), | ^^^^ must be the first parameter of an associated function error[E0642]: patterns aren't allowed in function pointer types - --> $DIR/fn-ptr-pattern.rs:52:14 + --> $DIR/fn-ptr-pattern.rs:54:14 | LL | pat1: fn(1..3: bool), | ^^^^ @@ -83,7 +83,7 @@ LL + pat1: fn(_: bool), | error[E0642]: patterns aren't allowed in function pointer types - --> $DIR/fn-ptr-pattern.rs:54:14 + --> $DIR/fn-ptr-pattern.rs:56:14 | LL | pat2: fn((x, y): (bool, bool)), | ^^^^^^ @@ -95,7 +95,7 @@ LL + pat2: fn(_: (bool, bool)), | error[E0642]: patterns aren't allowed in function pointer types - --> $DIR/fn-ptr-pattern.rs:56:14 + --> $DIR/fn-ptr-pattern.rs:58:14 | LL | pat3: fn(Thing { a, b }: Thing), | ^^^^^^^^^^^^^^ @@ -107,7 +107,7 @@ LL + pat3: fn(_: Thing), | error[E0642]: patterns aren't allowed in function pointer types - --> $DIR/fn-ptr-pattern.rs:58:14 + --> $DIR/fn-ptr-pattern.rs:60:14 | LL | pat4: fn(NoThing { a, b }: NoThing), | ^^^^^^^^^^^^^^^^ @@ -119,7 +119,7 @@ LL + pat4: fn(_: NoThing), | error[E0642]: patterns aren't allowed in function pointer types - --> $DIR/fn-ptr-pattern.rs:60:14 + --> $DIR/fn-ptr-pattern.rs:62:14 | LL | pat5: fn((((((x))))): bool), | ^^^^^^^^^^^ @@ -131,13 +131,13 @@ LL + pat5: fn(_: bool), | error: unexpected `self` parameter in function - --> $DIR/fn-ptr-pattern.rs:64:21 + --> $DIR/fn-ptr-pattern.rs:66:21 | LL | self2: fn(self, self), | ^^^^ must be the first parameter of an associated function error: unexpected `self` parameter in function - --> $DIR/fn-ptr-pattern.rs:66:21 + --> $DIR/fn-ptr-pattern.rs:68:21 | LL | self3: fn(bool, self), | ^^^^ must be the first parameter of an associated function @@ -201,7 +201,7 @@ LL | pat4: fn(NoThing { a, b }: NoThing), | ^^^^^^^ not found in this scope | note: similarly named struct `Thing` defined here - --> $DIR/fn-ptr-pattern.rs:77:1 + --> $DIR/fn-ptr-pattern.rs:81:1 | LL | struct Thing { a: bool, b: bool } | ^^^^^^^^^^^^ diff --git a/tests/ui/fn/fn-trait-use-named-params-issue-140169.rs b/tests/ui/fn/fn-trait-use-named-params-issue-140169.rs index f832cdb2d9b12..cc189bfec26eb 100644 --- a/tests/ui/fn/fn-trait-use-named-params-issue-140169.rs +++ b/tests/ui/fn/fn-trait-use-named-params-issue-140169.rs @@ -1,18 +1,19 @@ fn f1(_: fn(a: u8)) {} -fn f2(_: impl Fn(u8, vvvv: u8)) {} //~ ERROR named parameters in parenthesized generic argument lists are experimental -fn f3(_: impl Fn(aaaa: u8, u8)) {} //~ ERROR named parameters in parenthesized generic argument lists are experimental +fn f2(_: impl Fn(u8, vvvv: u8)) {} //~ ERROR parameters in parenthesized generic argument lists with names, attributes, or c-variadics are experimental +fn f3(_: impl Fn(aaaa: u8, u8)) {} //~ ERROR parameters in parenthesized generic argument lists with names, attributes, or c-variadics are experimental fn f4(_: impl Fn(aaaa: u8, vvvv: u8)) {} -//~^ ERROR named parameters in parenthesized generic argument lists are experimental -//~| ERROR named parameters in parenthesized generic argument lists are experimental +//~^ ERROR parameters in parenthesized generic argument lists with names, attributes, or c-variadics are experimental +//~| ERROR parameters in parenthesized generic argument lists with names, attributes, or c-variadics are experimental fn f5(_: impl Fn(u8, ...)) {} -//~^ ERROR `Trait(...)` syntax does not support c_variadic parameters -fn f6(f: impl Fn(#[cfg(false)] u8)) { f() } //~ ERROR named parameters in parenthesized generic argument lists are experimental +//~^ ERROR parameters in parenthesized generic argument lists with names, attributes, or c-variadics are experimental +//~| ERROR C-variadic parameters aren't allowed in parenthesized argument lists +fn f6(f: impl Fn(#[cfg(false)] u8)) { f() } //~ ERROR parameters in parenthesized generic argument lists with names, attributes, or c-variadics are experimental fn f7(_: impl Fn(#[inline] u8)) {} -//~^ ERROR named parameters in parenthesized generic argument lists are experimental +//~^ ERROR parameters in parenthesized generic argument lists with names, attributes, or c-variadics are experimental //~| ERROR the `inline` attribute cannot be used on function params //~| ERROR: allow, cfg, cfg_attr, deny, expect, forbid, and warn are the only allowed built-in attributes in function parameters fn f8(_: impl Fn(u8, #[allow(unused_attributes)] u8)) {} -//~^ ERROR named parameters in parenthesized generic argument lists are experimental +//~^ ERROR parameters in parenthesized generic argument lists with names, attributes, or c-variadics are experimental fn main(){} diff --git a/tests/ui/fn/fn-trait-use-named-params-issue-140169.stderr b/tests/ui/fn/fn-trait-use-named-params-issue-140169.stderr index 99e3b87e2e37c..a494f8adfb7fc 100644 --- a/tests/ui/fn/fn-trait-use-named-params-issue-140169.stderr +++ b/tests/ui/fn/fn-trait-use-named-params-issue-140169.stderr @@ -1,16 +1,16 @@ -error: `Trait(...)` syntax does not support c_variadic parameters +error: C-variadic parameters aren't allowed in parenthesized argument lists --> $DIR/fn-trait-use-named-params-issue-140169.rs:7:22 | LL | fn f5(_: impl Fn(u8, ...)) {} - | ^^^ help: remove the `...` + | ^^^ help: remove the C-variadics error: allow, cfg, cfg_attr, deny, expect, forbid, and warn are the only allowed built-in attributes in function parameters - --> $DIR/fn-trait-use-named-params-issue-140169.rs:10:18 + --> $DIR/fn-trait-use-named-params-issue-140169.rs:11:18 | LL | fn f7(_: impl Fn(#[inline] u8)) {} | ^^^^^^^^^ -error[E0658]: named parameters in parenthesized generic argument lists are experimental +error[E0658]: parameters in parenthesized generic argument lists with names, attributes, or c-variadics are experimental --> $DIR/fn-trait-use-named-params-issue-140169.rs:2:22 | LL | fn f2(_: impl Fn(u8, vvvv: u8)) {} @@ -20,7 +20,7 @@ LL | fn f2(_: impl Fn(u8, vvvv: u8)) {} = help: add `#![feature(named_fn_trait_parameters)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: named parameters in parenthesized generic argument lists are experimental +error[E0658]: parameters in parenthesized generic argument lists with names, attributes, or c-variadics are experimental --> $DIR/fn-trait-use-named-params-issue-140169.rs:3:18 | LL | fn f3(_: impl Fn(aaaa: u8, u8)) {} @@ -30,7 +30,7 @@ LL | fn f3(_: impl Fn(aaaa: u8, u8)) {} = help: add `#![feature(named_fn_trait_parameters)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: named parameters in parenthesized generic argument lists are experimental +error[E0658]: parameters in parenthesized generic argument lists with names, attributes, or c-variadics are experimental --> $DIR/fn-trait-use-named-params-issue-140169.rs:4:18 | LL | fn f4(_: impl Fn(aaaa: u8, vvvv: u8)) {} @@ -40,7 +40,7 @@ LL | fn f4(_: impl Fn(aaaa: u8, vvvv: u8)) {} = help: add `#![feature(named_fn_trait_parameters)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: named parameters in parenthesized generic argument lists are experimental +error[E0658]: parameters in parenthesized generic argument lists with names, attributes, or c-variadics are experimental --> $DIR/fn-trait-use-named-params-issue-140169.rs:4:28 | LL | fn f4(_: impl Fn(aaaa: u8, vvvv: u8)) {} @@ -50,8 +50,18 @@ LL | fn f4(_: impl Fn(aaaa: u8, vvvv: u8)) {} = help: add `#![feature(named_fn_trait_parameters)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: named parameters in parenthesized generic argument lists are experimental - --> $DIR/fn-trait-use-named-params-issue-140169.rs:9:18 +error[E0658]: parameters in parenthesized generic argument lists with names, attributes, or c-variadics are experimental + --> $DIR/fn-trait-use-named-params-issue-140169.rs:7:22 + | +LL | fn f5(_: impl Fn(u8, ...)) {} + | ^^^ + | + = note: see issue #158499 for more information + = help: add `#![feature(named_fn_trait_parameters)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date + +error[E0658]: parameters in parenthesized generic argument lists with names, attributes, or c-variadics are experimental + --> $DIR/fn-trait-use-named-params-issue-140169.rs:10:18 | LL | fn f6(f: impl Fn(#[cfg(false)] u8)) { f() } | ^^^^^^^^^^^^^ @@ -60,8 +70,8 @@ LL | fn f6(f: impl Fn(#[cfg(false)] u8)) { f() } = help: add `#![feature(named_fn_trait_parameters)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: named parameters in parenthesized generic argument lists are experimental - --> $DIR/fn-trait-use-named-params-issue-140169.rs:10:18 +error[E0658]: parameters in parenthesized generic argument lists with names, attributes, or c-variadics are experimental + --> $DIR/fn-trait-use-named-params-issue-140169.rs:11:18 | LL | fn f7(_: impl Fn(#[inline] u8)) {} | ^^^^^^^^^ @@ -70,8 +80,8 @@ LL | fn f7(_: impl Fn(#[inline] u8)) {} = help: add `#![feature(named_fn_trait_parameters)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: named parameters in parenthesized generic argument lists are experimental - --> $DIR/fn-trait-use-named-params-issue-140169.rs:14:22 +error[E0658]: parameters in parenthesized generic argument lists with names, attributes, or c-variadics are experimental + --> $DIR/fn-trait-use-named-params-issue-140169.rs:15:22 | LL | fn f8(_: impl Fn(u8, #[allow(unused_attributes)] u8)) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -81,13 +91,13 @@ LL | fn f8(_: impl Fn(u8, #[allow(unused_attributes)] u8)) {} = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: the `inline` attribute cannot be used on function params - --> $DIR/fn-trait-use-named-params-issue-140169.rs:10:20 + --> $DIR/fn-trait-use-named-params-issue-140169.rs:11:20 | LL | fn f7(_: impl Fn(#[inline] u8)) {} | ^^^^^^ | = help: the `inline` attribute can only be applied to functions -error: aborting due to 10 previous errors +error: aborting due to 11 previous errors For more information about this error, try `rustc --explain E0658`. diff --git a/tests/ui/fn/fn-trait-use-named-params.stderr b/tests/ui/fn/fn-trait-use-named-params.stderr index 6b22fa58c2ffc..0942516aa72d9 100644 --- a/tests/ui/fn/fn-trait-use-named-params.stderr +++ b/tests/ui/fn/fn-trait-use-named-params.stderr @@ -55,7 +55,6 @@ LL | fn f8(_: fn(#[rustc_splat] a: usize)) {} = note: see issue #153629 for more information = help: add `#![feature(splat)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - = note: the `rustc_splat` attribute is experimental error: aborting due to 7 previous errors diff --git a/tests/ui/fn/named-fn-trait-parameters.rs b/tests/ui/fn/named-fn-trait-parameters.rs index 103ce5902048e..fd9ce5559fe01 100644 --- a/tests/ui/fn/named-fn-trait-parameters.rs +++ b/tests/ui/fn/named-fn-trait-parameters.rs @@ -47,6 +47,15 @@ fn semantics( restricted_pat6: impl Fn(&true: ()), //~^ ERROR patterns aren't allowed in parenthesized argument lists + variadics1: impl Fn(a1: ...), + //~^ ERROR C-variadic parameters aren't allowed in parenthesized argument lists + variadics2: impl Fn(a1: ...), + //~^ ERROR C-variadic parameters aren't allowed in parenthesized argument lists + variadics3: impl Fn(a1: usize, a2: ...), + //~^ ERROR C-variadic parameters aren't allowed in parenthesized argument lists + variadics4: impl Fn(a1: ..., a2: usize), + //~^ ERROR C-variadic parameters aren't allowed in parenthesized argument lists + duplicate_names: impl Fn(x: usize, x: usize), ) { } @@ -77,6 +86,8 @@ fn syntax( restricted_pat4: impl Fn(false: ()), restricted_pat5: impl Fn(&_: ()), restricted_pat6: impl Fn(&true: ()), + + variadics: impl Fn(...), ) { } struct Thing { a: bool, b: bool } diff --git a/tests/ui/fn/named-fn-trait-parameters.stderr b/tests/ui/fn/named-fn-trait-parameters.stderr index d675826ff8559..dfdf4cd6c3fb4 100644 --- a/tests/ui/fn/named-fn-trait-parameters.stderr +++ b/tests/ui/fn/named-fn-trait-parameters.stderr @@ -71,7 +71,7 @@ LL | self3: impl Fn(bool, self), | ^^^^ must be the first parameter of an associated function error[E0642]: patterns aren't allowed in parenthesized argument list - --> $DIR/named-fn-trait-parameters.rs:56:19 + --> $DIR/named-fn-trait-parameters.rs:65:19 | LL | pat1: impl Fn(1..3: bool), | ^^^^ @@ -83,7 +83,7 @@ LL + pat1: impl Fn(_: bool), | error[E0642]: patterns aren't allowed in parenthesized argument list - --> $DIR/named-fn-trait-parameters.rs:58:19 + --> $DIR/named-fn-trait-parameters.rs:67:19 | LL | pat2: impl Fn((x, y): (bool, bool)), | ^^^^^^ @@ -95,7 +95,7 @@ LL + pat2: impl Fn(_: (bool, bool)), | error[E0642]: patterns aren't allowed in parenthesized argument list - --> $DIR/named-fn-trait-parameters.rs:60:19 + --> $DIR/named-fn-trait-parameters.rs:69:19 | LL | pat3: impl Fn(Thing { a, b }: Thing), | ^^^^^^^^^^^^^^ @@ -107,7 +107,7 @@ LL + pat3: impl Fn(_: Thing), | error[E0642]: patterns aren't allowed in parenthesized argument list - --> $DIR/named-fn-trait-parameters.rs:62:19 + --> $DIR/named-fn-trait-parameters.rs:71:19 | LL | pat4: impl Fn(NoThing { a, b }: NoThing), | ^^^^^^^^^^^^^^^^ @@ -119,7 +119,7 @@ LL + pat4: impl Fn(_: NoThing), | error[E0642]: patterns aren't allowed in parenthesized argument list - --> $DIR/named-fn-trait-parameters.rs:64:19 + --> $DIR/named-fn-trait-parameters.rs:73:19 | LL | pat5: impl Fn((((((x))))): bool), | ^^^^^^^^^^^ @@ -131,13 +131,13 @@ LL + pat5: impl Fn(_: bool), | error: unexpected `self` parameter in function - --> $DIR/named-fn-trait-parameters.rs:68:26 + --> $DIR/named-fn-trait-parameters.rs:77:26 | LL | self2: impl Fn(self, self), | ^^^^ must be the first parameter of an associated function error: unexpected `self` parameter in function - --> $DIR/named-fn-trait-parameters.rs:70:26 + --> $DIR/named-fn-trait-parameters.rs:79:26 | LL | self3: impl Fn(bool, self), | ^^^^ must be the first parameter of an associated function @@ -194,6 +194,36 @@ error[E0561]: patterns aren't allowed in parenthesized argument lists LL | restricted_pat6: impl Fn(&true: ()), | ^^^^^ +error: C-variadic parameters aren't allowed in parenthesized argument lists + --> $DIR/named-fn-trait-parameters.rs:50:29 + | +LL | variadics1: impl Fn(a1: ...), + | ----^^^ + | | + | help: remove the C-variadics + +error: C-variadic parameters aren't allowed in parenthesized argument lists + --> $DIR/named-fn-trait-parameters.rs:52:29 + | +LL | variadics2: impl Fn(a1: ...), + | ----^^^ + | | + | help: remove the C-variadics + +error: C-variadic parameters aren't allowed in parenthesized argument lists + --> $DIR/named-fn-trait-parameters.rs:54:40 + | +LL | variadics3: impl Fn(a1: usize, a2: ...), + | ----^^^ + | | + | help: remove the C-variadics + +error: C-variadic parameters aren't allowed in parenthesized argument lists + --> $DIR/named-fn-trait-parameters.rs:56:29 + | +LL | variadics4: impl Fn(a1: ..., a2: usize), + | ----^^^-- help: remove the C-variadics + error[E0425]: cannot find type `NoThing` in this scope --> $DIR/named-fn-trait-parameters.rs:23:37 | @@ -201,7 +231,7 @@ LL | pat4: impl Fn(NoThing { a, b }: NoThing), | ^^^^^^^ not found in this scope | note: similarly named struct `Thing` defined here - --> $DIR/named-fn-trait-parameters.rs:82:1 + --> $DIR/named-fn-trait-parameters.rs:93:1 | LL | struct Thing { a: bool, b: bool } | ^^^^^^^^^^^^ @@ -211,7 +241,7 @@ LL - pat4: impl Fn(NoThing { a, b }: NoThing), LL + pat4: impl Fn(NoThing { a, b }: Thing), | -error: aborting due to 23 previous errors +error: aborting due to 27 previous errors Some errors have detailed explanations: E0425, E0561, E0642. For more information about an error, try `rustc --explain E0425`. diff --git a/tests/ui/parser/diagnostics-parenthesized-type-arguments-ice-issue-122345.rs b/tests/ui/parser/diagnostics-parenthesized-type-arguments-ice-issue-122345.rs index 8b2c6f4b5b723..b3d70c1ad3a7a 100644 --- a/tests/ui/parser/diagnostics-parenthesized-type-arguments-ice-issue-122345.rs +++ b/tests/ui/parser/diagnostics-parenthesized-type-arguments-ice-issue-122345.rs @@ -2,7 +2,7 @@ fn main() { unsafe { - dealloc(ptr2, Layout::(x: !)(1, 1)); //~ ERROR named parameters in parenthesized generic argument lists are experimental + dealloc(ptr2, Layout::(x: !)(1, 1)); //~ ERROR parameters in parenthesized generic argument lists with names, attributes, or c-variadics are experimental //~^ ERROR cannot find function `dealloc` in this scope [E0425] //~| ERROR cannot find value `ptr2` in this scope [E0425] //~| ERROR cannot find function, tuple struct or tuple variant `Layout` in this scope [E0425] diff --git a/tests/ui/parser/diagnostics-parenthesized-type-arguments-ice-issue-122345.stderr b/tests/ui/parser/diagnostics-parenthesized-type-arguments-ice-issue-122345.stderr index 4673f9cece98b..8e183378a7462 100644 --- a/tests/ui/parser/diagnostics-parenthesized-type-arguments-ice-issue-122345.stderr +++ b/tests/ui/parser/diagnostics-parenthesized-type-arguments-ice-issue-122345.stderr @@ -1,8 +1,8 @@ error[E0425]: cannot find function `dealloc` in this scope --> $DIR/diagnostics-parenthesized-type-arguments-ice-issue-122345.rs:5:9 | -LL | dealloc(ptr2, Layout::(x: !)(1, 1)); - | ^^^^^^^ not found in this scope +LL | ... dealloc(ptr2, Layout::(x: !)(1, 1)); + | ^^^^^^^ not found in this scope | help: consider importing this function | @@ -12,14 +12,14 @@ LL + use std::alloc::dealloc; error[E0425]: cannot find value `ptr2` in this scope --> $DIR/diagnostics-parenthesized-type-arguments-ice-issue-122345.rs:5:17 | -LL | dealloc(ptr2, Layout::(x: !)(1, 1)); - | ^^^^ not found in this scope +LL | ... dealloc(ptr2, Layout::(x: !)(1, 1)); + | ^^^^ not found in this scope -error[E0658]: named parameters in parenthesized generic argument lists are experimental +error[E0658]: parameters in parenthesized generic argument lists with names, attributes, or c-variadics are experimental --> $DIR/diagnostics-parenthesized-type-arguments-ice-issue-122345.rs:5:32 | -LL | dealloc(ptr2, Layout::(x: !)(1, 1)); - | ^ +LL | ... dealloc(ptr2, Layout::(x: !)(1, 1)); + | ^ | = note: see issue #158499 for more information = help: add `#![feature(named_fn_trait_parameters)]` to the crate attributes to enable @@ -28,8 +28,8 @@ LL | dealloc(ptr2, Layout::(x: !)(1, 1)); error[E0425]: cannot find function, tuple struct or tuple variant `Layout` in this scope --> $DIR/diagnostics-parenthesized-type-arguments-ice-issue-122345.rs:5:23 | -LL | dealloc(ptr2, Layout::(x: !)(1, 1)); - | ^^^^^^ not found in this scope +LL | ... dealloc(ptr2, Layout::(x: !)(1, 1)); + | ^^^^^^ not found in this scope error: aborting due to 4 previous errors diff --git a/tests/ui/threads-sendsync/global-alloc-reentry.rs b/tests/ui/threads-sendsync/global-alloc-reentry.rs index c4641b197a9a4..dd86184767788 100644 --- a/tests/ui/threads-sendsync/global-alloc-reentry.rs +++ b/tests/ui/threads-sendsync/global-alloc-reentry.rs @@ -64,7 +64,7 @@ unsafe impl GlobalAlloc for Alloc { unsafe fn alloc(&self, layout: Layout) -> *mut u8 { #[cfg(unix)] if PTHREAD_ACTIVE.load(Ordering::Relaxed) { - PTHREAD_SUCCEEDED_ALLOC.swap(true, Ordering::Relaxed); + PTHREAD_SUCCEEDED_ALLOC.store(true, Ordering::Relaxed); } let ret = unsafe { System.alloc(layout) }; @@ -75,7 +75,7 @@ unsafe impl GlobalAlloc for Alloc { unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) { #[cfg(unix)] if PTHREAD_ACTIVE.load(Ordering::Relaxed) { - PTHREAD_SUCCEEDED_DEALLOC.swap(true, Ordering::Relaxed); + PTHREAD_SUCCEEDED_DEALLOC.store(true, Ordering::Relaxed); } unsafe { @@ -114,7 +114,9 @@ fn run_pthread() { libc::pthread_join(t, ptr::null_mut()); } - // testing if pthread is allocing and deallocing with the global allocator. + // test if `start` allocates and deallocates with the global_allocator + // test is needed to know if non-Rust spawned threads can use the global allocator + // when a `#[global_allocator]` is set. assert!(PTHREAD_SUCCEEDED_ALLOC.load(Ordering::Relaxed)); assert!(PTHREAD_SUCCEEDED_DEALLOC.load(Ordering::Relaxed)); } diff --git a/tests/ui/traits/next-solver/canonical/const-region-infer-to-static-in-binder.stderr b/tests/ui/traits/next-solver/canonical/const-region-infer-to-static-in-binder.stderr index 07eddd8c87c3d..bb56d43c0cb5a 100644 --- a/tests/ui/traits/next-solver/canonical/const-region-infer-to-static-in-binder.stderr +++ b/tests/ui/traits/next-solver/canonical/const-region-infer-to-static-in-binder.stderr @@ -1,8 +1,10 @@ -error[E0284]: type annotations needed: cannot satisfy `the constant `{ || {} }` can be evaluated` +error[E0284]: type annotations needed --> $DIR/const-region-infer-to-static-in-binder.rs:4:10 | LL | struct X; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot satisfy `the constant `{ || {} }` can be evaluated` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer the value of the constant `_` + | + = note: cannot satisfy `X::{constant#0} == _` error[E0284]: type annotations needed --> $DIR/const-region-infer-to-static-in-binder.rs:4:10