diff --git a/Cargo.lock b/Cargo.lock index 5ff455c57f056..ee92c74c60fc1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4662,7 +4662,6 @@ dependencies = [ "rustc_ast_lowering", "rustc_attr_ir", "rustc_attr_parsing", - "rustc_crate_store", "rustc_data_structures", "rustc_errors", "rustc_feature", @@ -4787,6 +4786,7 @@ dependencies = [ "rustc_ast_pretty", "rustc_attr_ir", "rustc_attr_parsing", + "rustc_crate_store", "rustc_data_structures", "rustc_errors", "rustc_expand", @@ -4906,6 +4906,7 @@ dependencies = [ "rustc_data_structures", "rustc_hashes", "rustc_hir", + "rustc_macros", "rustc_middle", "rustc_session", "rustc_span", diff --git a/compiler/rustc_ast/src/ast.rs b/compiler/rustc_ast/src/ast.rs index 833a933ed467a..b3b85655bb261 100644 --- a/compiler/rustc_ast/src/ast.rs +++ b/compiler/rustc_ast/src/ast.rs @@ -40,7 +40,7 @@ use thin_vec::{ThinVec, thin_vec}; use crate::attr::data_structures::CfgEntry; pub use crate::format::*; use crate::token::{self, CommentKind, Delimiter}; -use crate::tokenstream::{DelimSpan, LazyAttrTokenStream, TokenStream, TokenTree}; +use crate::tokenstream::{DelimSpan, LazyTokenStream, TokenStream, TokenTree}; use crate::util::parser::{ExprPrecedence, Fixity}; use crate::visit::{AssocCtxt, BoundKind, LifetimeCtxt}; @@ -1221,7 +1221,7 @@ impl Stmt { /// a trailing semicolon. /// /// This only modifies the parsed AST struct, not the attached - /// `LazyAttrTokenStream`. The parser is responsible for calling + /// `LazyTokenStream`. The parser is responsible for calling /// `ToAttrTokenStream::add_trailing_semi` when there is actually /// a semicolon in the tokenstream. pub fn add_trailing_semicolon(mut self) -> Self { @@ -1281,7 +1281,7 @@ pub struct MacCallStmt { pub mac: Box, pub style: MacStmtStyle, pub attrs: AttrVec, - pub tokens: Option, + pub tokens: Option, } #[derive(Clone, Copy, PartialEq, Encodable, Decodable, Debug, Walkable)] @@ -1308,7 +1308,7 @@ pub struct Local { pub span: Span, pub colon_sp: Option, pub attrs: AttrVec, - pub tokens: Option, + pub tokens: Option, } #[derive(Clone, Encodable, Decodable, Debug, Walkable)] @@ -1409,7 +1409,7 @@ pub struct Expr { pub kind: ExprKind, pub span: Span, pub attrs: AttrVec, - pub tokens: Option, + pub tokens: Option, } impl Expr { @@ -3605,7 +3605,7 @@ impl GeneratedAttr { } } - pub fn token_trees(&self) -> Vec { + pub fn append_token_trees_to(&self, _res: &mut Vec) { unimplemented!( "generated attribute `{}` cannot re-enter the parser at this time", self.descr() @@ -3618,7 +3618,7 @@ pub struct NormalAttr { pub item: AttrItem, // Tokens for the full attribute, e.g. `#[foo]`, `#![bar]`. (Compare this with // `ParseNtResult::Meta`; `expand_cfg_attr_item` is where the two cases interact.) - pub tokens: Option, + pub tokens: Option, } impl NormalAttr { @@ -3889,7 +3889,7 @@ pub struct Item { /// /// Note that the tokens here do not include the outer attributes, but will /// include inner attributes. - pub tokens: Option, + pub tokens: Option, } impl Item { diff --git a/compiler/rustc_ast/src/ast_traits.rs b/compiler/rustc_ast/src/ast_traits.rs index c1514337742ce..f0555a9fb248c 100644 --- a/compiler/rustc_ast/src/ast_traits.rs +++ b/compiler/rustc_ast/src/ast_traits.rs @@ -5,7 +5,7 @@ use std::fmt; use std::marker::PhantomData; -use crate::tokenstream::{LazyAttrTokenStream, WithTokens}; +use crate::tokenstream::{LazyTokenStream, WithTokens}; use crate::{ Arm, AssocItem, AttrItem, AttrKind, AttrVec, Attribute, Block, Crate, Expr, ExprField, FieldDef, ForeignItem, GenericParam, Item, NodeId, Param, Pat, PatField, Path, Stmt, StmtKind, @@ -63,18 +63,18 @@ impl HasNodeId for Box { /// A trait for AST nodes having (or not having) collected tokens. pub trait HasTokens: HasAttrs { - fn tokens(&self) -> Option<&LazyAttrTokenStream>; - fn tokens_mut(&mut self) -> Option<&mut Option>; + fn tokens(&self) -> Option<&LazyTokenStream>; + fn tokens_mut(&mut self) -> Option<&mut Option>; } macro_rules! impl_has_tokens { ($($T:ty),+ $(,)?) => { $( impl HasTokens for $T { - fn tokens(&self) -> Option<&LazyAttrTokenStream> { + fn tokens(&self) -> Option<&LazyTokenStream> { self.tokens.as_ref() } - fn tokens_mut(&mut self) -> Option<&mut Option> { + fn tokens_mut(&mut self) -> Option<&mut Option> { Some(&mut self.tokens) } } @@ -86,10 +86,10 @@ macro_rules! impl_has_tokens_none { ($($T:ty),+ $(,)?) => { $( impl HasTokens for $T { - fn tokens(&self) -> Option<&LazyAttrTokenStream> { + fn tokens(&self) -> Option<&LazyTokenStream> { None } - fn tokens_mut(&mut self) -> Option<&mut Option> { + fn tokens_mut(&mut self) -> Option<&mut Option> { None } } @@ -110,34 +110,34 @@ impl_has_tokens_none!( ); impl HasTokens for WithTokens { - fn tokens(&self) -> Option<&LazyAttrTokenStream> { + fn tokens(&self) -> Option<&LazyTokenStream> { self.tokens.as_ref() } - fn tokens_mut(&mut self) -> Option<&mut Option> { + fn tokens_mut(&mut self) -> Option<&mut Option> { Some(&mut self.tokens) } } impl HasTokens for Option { - fn tokens(&self) -> Option<&LazyAttrTokenStream> { + fn tokens(&self) -> Option<&LazyTokenStream> { self.as_ref().and_then(|inner| inner.tokens()) } - fn tokens_mut(&mut self) -> Option<&mut Option> { + fn tokens_mut(&mut self) -> Option<&mut Option> { self.as_mut().and_then(|inner| inner.tokens_mut()) } } impl HasTokens for Box { - fn tokens(&self) -> Option<&LazyAttrTokenStream> { + fn tokens(&self) -> Option<&LazyTokenStream> { (**self).tokens() } - fn tokens_mut(&mut self) -> Option<&mut Option> { + fn tokens_mut(&mut self) -> Option<&mut Option> { (**self).tokens_mut() } } impl HasTokens for StmtKind { - fn tokens(&self) -> Option<&LazyAttrTokenStream> { + fn tokens(&self) -> Option<&LazyTokenStream> { match self { StmtKind::Let(local) => local.tokens.as_ref(), StmtKind::Item(item) => item.tokens(), @@ -146,7 +146,7 @@ impl HasTokens for StmtKind { StmtKind::MacCall(mac) => mac.tokens.as_ref(), } } - fn tokens_mut(&mut self) -> Option<&mut Option> { + fn tokens_mut(&mut self) -> Option<&mut Option> { match self { StmtKind::Let(local) => Some(&mut local.tokens), StmtKind::Item(item) => item.tokens_mut(), @@ -158,16 +158,16 @@ impl HasTokens for StmtKind { } impl HasTokens for Stmt { - fn tokens(&self) -> Option<&LazyAttrTokenStream> { + fn tokens(&self) -> Option<&LazyTokenStream> { self.kind.tokens() } - fn tokens_mut(&mut self) -> Option<&mut Option> { + fn tokens_mut(&mut self) -> Option<&mut Option> { self.kind.tokens_mut() } } impl HasTokens for Attribute { - fn tokens(&self) -> Option<&LazyAttrTokenStream> { + fn tokens(&self) -> Option<&LazyTokenStream> { match &self.kind { AttrKind::Normal(normal) => normal.tokens.as_ref(), AttrKind::Synthetic(..) | AttrKind::DocComment(..) | AttrKind::Generated(..) => { @@ -175,7 +175,7 @@ impl HasTokens for Attribute { } } } - fn tokens_mut(&mut self) -> Option<&mut Option> { + fn tokens_mut(&mut self) -> Option<&mut Option> { Some(match &mut self.kind { AttrKind::Normal(normal) => &mut normal.tokens, AttrKind::Synthetic(..) | AttrKind::DocComment(..) | AttrKind::Generated(..) => { diff --git a/compiler/rustc_ast/src/attr/mod.rs b/compiler/rustc_ast/src/attr/mod.rs index 754859793bd33..4074b56f76da3 100644 --- a/compiler/rustc_ast/src/attr/mod.rs +++ b/compiler/rustc_ast/src/attr/mod.rs @@ -20,8 +20,7 @@ use crate::token::{ self, CommentKind, Delimiter, DocFragmentKind, InvisibleOrigin, MetaVarKind, Token, }; use crate::tokenstream::{ - AttrTokenStream, AttrTokenTree, DelimSpacing, DelimSpan, LazyAttrTokenStream, Spacing, - TokenStream, TokenStreamIter, TokenTree, + DelimSpacing, DelimSpan, LazyTokenStream, Spacing, TokenStream, TokenStreamIter, TokenTree, }; use crate::util::comments; use crate::util::literal::escape_string_symbol; @@ -306,21 +305,20 @@ impl Attribute { } } - pub fn token_trees(&self) -> Vec { + pub fn append_token_trees_to(&self, res: &mut Vec) { match &self.kind { AttrKind::Normal(normal) => normal .tokens .as_ref() .unwrap_or_else(|| panic!("attribute is missing tokens: {self:?}")) - .to_attr_token_stream() - .to_token_trees(), + .append_token_trees_to(res), // Empty tokens here ensures synthetic attributes are invisible to proc macros. - AttrKind::Synthetic(..) => vec![], - AttrKind::Generated(generated) => generated.token_trees(), - AttrKind::DocComment(comment_kind, data) => vec![TokenTree::token_alone( + AttrKind::Synthetic(..) => {} + AttrKind::Generated(generated) => generated.append_token_trees_to(res), + AttrKind::DocComment(comment_kind, data) => res.push(TokenTree::token_alone( token::DocComment(*comment_kind, self.style, *data), self.span, - )], + )), } } @@ -539,7 +537,7 @@ impl MetaItem { unreachable!() } Some(TokenTree::Token(Token { kind, .. }, _)) if kind.is_delim() => { - panic!("Should be `AttrTokenTree::Delimited`, not delim tokens: {:?}", tt); + panic!("Should be `TokenTree::Delimited`, not delim tokens: {:?}", tt); } _ => return None, }; @@ -750,7 +748,7 @@ pub fn mk_doc_comment( pub fn mk_attr_from_item( g: &AttrIdGenerator, item: AttrItem, - tokens: Option, + tokens: Option, style: AttrStyle, span: Span, ) -> Attribute { @@ -762,28 +760,24 @@ pub fn mk_attr_from_item( } } -fn mk_attr_tokens( - style: AttrStyle, - item_tokens: AttrTokenStream, - span: Span, -) -> LazyAttrTokenStream { +fn mk_attr_tokens(style: AttrStyle, item_tokens: TokenStream, span: Span) -> LazyTokenStream { let mut tokens = match style { AttrStyle::Outer => { - vec![AttrTokenTree::Token(Token::new(token::Pound, span), Spacing::JointHidden)] + vec![TokenTree::Token(Token::new(token::Pound, span), Spacing::JointHidden)] } AttrStyle::Inner => vec![ - AttrTokenTree::Token(Token::new(token::Pound, span), Spacing::Joint), - AttrTokenTree::Token(Token::new(token::Bang, span), Spacing::JointHidden), + TokenTree::Token(Token::new(token::Pound, span), Spacing::Joint), + TokenTree::Token(Token::new(token::Bang, span), Spacing::JointHidden), ], }; - tokens.push(AttrTokenTree::Delimited( + tokens.push(TokenTree::Delimited( DelimSpan::from_single(span), DelimSpacing::new(Spacing::JointHidden, Spacing::Alone), Delimiter::Bracket, item_tokens, )); - LazyAttrTokenStream::new_direct(AttrTokenStream::new(tokens)) + LazyTokenStream::new_direct(TokenStream::new(tokens)) } // `span` is used for the `Attribute` and everything within it (except for any span within @@ -794,7 +788,7 @@ pub fn mk_attr_word(g: &AttrIdGenerator, style: AttrStyle, name: Symbol, span: S let tokens = Some(mk_attr_tokens( style, - AttrTokenStream::new(vec![AttrTokenTree::Token( + TokenStream::new(vec![TokenTree::Token( Token::from_ast_ident(Ident::new(name, span)), Spacing::Alone, )]), @@ -833,13 +827,13 @@ pub fn mk_attr_nested_word( let tokens = Some(mk_attr_tokens( style, - AttrTokenStream::new(vec![ - AttrTokenTree::Token(Token::from_ast_ident(Ident::new(outer, span)), Spacing::Alone), - AttrTokenTree::Delimited( + TokenStream::new(vec![ + TokenTree::Token(Token::from_ast_ident(Ident::new(outer, span)), Spacing::Alone), + TokenTree::Delimited( DelimSpan::from_single(span), DelimSpacing::new(Spacing::JointHidden, Spacing::Alone), Delimiter::Parenthesis, - AttrTokenStream::new(vec![AttrTokenTree::Token( + TokenStream::new(vec![TokenTree::Token( Token::from_ast_ident(Ident::new(inner, span)), Spacing::Alone, )]), @@ -879,10 +873,10 @@ pub fn mk_attr_name_value_str( let tokens = Some(mk_attr_tokens( style, - AttrTokenStream::new(vec![ - AttrTokenTree::Token(Token::from_ast_ident(Ident::new(name, span)), Spacing::Alone), - AttrTokenTree::Token(Token::new(token::Eq, span), Spacing::Alone), - AttrTokenTree::Token( + TokenStream::new(vec![ + TokenTree::Token(Token::from_ast_ident(Ident::new(name, span)), Spacing::Alone), + TokenTree::Token(Token::new(token::Eq, span), Spacing::Alone), + TokenTree::Token( Token::new(token::TokenKind::lit(lit.kind, lit.symbol, lit.suffix), span), Spacing::Alone, ), diff --git a/compiler/rustc_ast/src/tokenstream.rs b/compiler/rustc_ast/src/tokenstream.rs index 164d1cb8fd731..9170cb9319674 100644 --- a/compiler/rustc_ast/src/tokenstream.rs +++ b/compiler/rustc_ast/src/tokenstream.rs @@ -95,7 +95,7 @@ impl TokenTree { #[derive(Clone, Debug)] pub struct WithTokens { pub node: T, - pub tokens: Option, + pub tokens: Option, } impl WithTokens { @@ -108,14 +108,14 @@ impl WithTokens { } } -/// A lazy version of [`AttrTokenStream`], which defers creation of an actual -/// `AttrTokenStream` until it is needed. +/// A lazy version of [`TokenStream`], which defers creation of an actual `TokenStream` until it is +/// needed. #[derive(Clone)] -pub struct LazyAttrTokenStream(Arc); +pub struct LazyTokenStream(Arc); -impl LazyAttrTokenStream { - pub fn new_direct(stream: AttrTokenStream) -> LazyAttrTokenStream { - LazyAttrTokenStream(Arc::new(LazyAttrTokenStreamInner::Direct(stream))) +impl LazyTokenStream { + pub fn new_direct(stream: TokenStream) -> LazyTokenStream { + LazyTokenStream(Arc::new(LazyTokenStreamInner::Direct(stream))) } pub fn new_pending( @@ -124,8 +124,8 @@ impl LazyAttrTokenStream { num_calls: u32, break_last_token: u32, node_replacements: ThinVec, - ) -> LazyAttrTokenStream { - LazyAttrTokenStream(Arc::new(LazyAttrTokenStreamInner::Pending { + ) -> LazyTokenStream { + LazyTokenStream(Arc::new(LazyTokenStreamInner::Pending { start_token, cursor_snapshot, num_calls, @@ -134,32 +134,40 @@ impl LazyAttrTokenStream { })) } - pub fn to_attr_token_stream(&self) -> AttrTokenStream { - self.0.to_attr_token_stream() + pub fn to_token_stream(&self) -> TokenStream { + self.0.to_configured_token_stream(&mut keep_all) + } + + pub fn to_configured_token_stream(&self, configure: &mut ConfigureFn<'_>) -> TokenStream { + self.0.to_configured_token_stream(configure) + } + + pub fn append_token_trees_to(&self, res: &mut Vec) { + self.0.append_token_trees_to(&mut keep_all, res); } } -impl fmt::Debug for LazyAttrTokenStream { +impl fmt::Debug for LazyTokenStream { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "LazyAttrTokenStream({:?})", self.to_attr_token_stream()) + write!(f, "LazyTokenStream({:?})", self.to_token_stream()) } } -impl Encodable for LazyAttrTokenStream { +impl Encodable for LazyTokenStream { fn encode(&self, _s: &mut S) { - panic!("Attempted to encode LazyAttrTokenStream"); + panic!("Attempted to encode LazyTokenStream"); } } -impl Decodable for LazyAttrTokenStream { +impl Decodable for LazyTokenStream { fn decode(_d: &mut D) -> Self { - panic!("Attempted to decode LazyAttrTokenStream"); + panic!("Attempted to decode LazyTokenStream"); } } -impl StableHash for LazyAttrTokenStream { +impl StableHash for LazyTokenStream { fn stable_hash(&self, _hcx: &mut Hcx, _hasher: &mut StableHasher) { - panic!("Attempted to compute stable hash for LazyAttrTokenStream"); + panic!("Attempted to compute stable hash for LazyTokenStream"); } } @@ -180,8 +188,7 @@ pub struct NodeRange(pub Range); /// 1. Replacement. During the parsing of an AST node that may have a /// `#[derive]` attribute, when we parse a nested AST node that has `#[cfg]` /// or `#[cfg_attr]`, we replace the entire inner AST node with -/// `FlatToken::AttrsTarget`. This lets us perform eager cfg-expansion on an -/// `AttrTokenStream`. +/// `FlatToken::AttrsTarget`. This lets us perform eager cfg-expansion. /// /// 2. Deletion. We delete inner attributes from all collected token streams, /// and instead track them through the `attrs` field on the AST node. This @@ -191,7 +198,7 @@ pub struct NodeRange(pub Range); /// /// Each replacement starts off in `ParserReplacement` form but is converted to /// `NodeReplacement` form when it is attached to a single AST node, via -/// `LazyAttrTokenStreamImpl`. +/// `LazyTokenStream`. pub type ParserReplacement = (ParserRange, Option); /// See the comment on `ParserReplacement`. @@ -214,9 +221,9 @@ impl NodeRange { } } -enum LazyAttrTokenStreamInner { +enum LazyTokenStreamInner { // The token stream has already been produced. - Direct(AttrTokenStream), + Direct(TokenStream), // From a value of this type we can reconstruct the `TokenStream` seen by // the `f` callback passed to a call to `Parser::collect_tokens`, by @@ -238,11 +245,31 @@ enum LazyAttrTokenStreamInner { }, } -impl LazyAttrTokenStreamInner { - fn to_attr_token_stream(&self) -> AttrTokenStream { +/// Fn type used to do (or not do) `cfg` expansion. It can modify attributes. The return value +/// indicates if the target should be retained. Any children of discarded targets are skipped. +type ConfigureFn<'a> = dyn FnMut(&mut AttrsTarget) -> bool + 'a; + +/// A `ConfigureFn` that keeps the target, i.e. the node and its tokens. +fn keep_all(_: &mut AttrsTarget) -> bool { + true +} + +impl LazyTokenStreamInner { + fn to_configured_token_stream(&self, configure: &mut ConfigureFn<'_>) -> TokenStream { + match self { + LazyTokenStreamInner::Direct(stream) => stream.clone(), + LazyTokenStreamInner::Pending { .. } => { + let mut res = vec![]; + self.append_token_trees_to(configure, &mut res); + TokenStream::new(res) + } + } + } + + fn append_token_trees_to(&self, configure: &mut ConfigureFn<'_>, res: &mut Vec) { match self { - LazyAttrTokenStreamInner::Direct(stream) => stream.clone(), - LazyAttrTokenStreamInner::Pending { + LazyTokenStreamInner::Direct(stream) => res.extend(stream.iter().cloned()), + LazyTokenStreamInner::Pending { start_token, cursor_snapshot, num_calls, @@ -258,9 +285,8 @@ impl LazyAttrTokenStreamInner { let tokens = iter::once(FlatToken::Token(*start_token)) .chain(iter::repeat_with(|| FlatToken::Token(cursor_snapshot.next_and_bump()))) .take(*num_calls as usize); - if node_replacements.is_empty() { - make_attr_token_stream(tokens, *break_last_token) + append_flat_tokens_as_token_trees_to(tokens, *break_last_token, configure, res); } else { let mut tokens: Vec<_> = tokens.collect(); let mut node_replacements = node_replacements.to_vec(); @@ -314,55 +340,54 @@ impl LazyAttrTokenStreamInner { ), ); } - make_attr_token_stream(tokens.into_iter(), *break_last_token) + append_flat_tokens_as_token_trees_to( + tokens.into_iter(), + *break_last_token, + configure, + res, + ); } } } } } -/// A helper struct used when building an `AttrTokenStream` from -/// a `LazyAttrTokenStream`. Both delimiter and non-delimited tokens +/// A helper struct used when building a `TokenStream` from +/// a `LazyTokenStream`. Both delimiter and non-delimited tokens /// are stored as `FlatToken::Token`. A vector of `FlatToken`s -/// is then 'parsed' to build up an `AttrTokenStream` with nested -/// `AttrTokenTree::Delimited` tokens. +/// is then 'parsed' to build up a `TokenStream` with nested +/// `TokenTree::Delimited` tokens. #[derive(Debug, Clone)] enum FlatToken { - /// A token - this holds both delimiter (e.g. '{' and '}') - /// and non-delimiter tokens + /// A token. Holds both delimiter (e.g. '{' and '}') and non-delimiter tokens. Token((Token, Spacing)), - /// Holds the `AttrsTarget` for an AST node. The `AttrsTarget` is inserted - /// directly into the constructed `AttrTokenStream` as an - /// `AttrTokenTree::AttrsTarget`. + /// Holds the `AttrsTarget` for an AST node. The `AttrsTarget` is expanded directly into the + /// constructed `TokenStream`. AttrsTarget(AttrsTarget), - /// A special 'empty' token that is ignored during the conversion - /// to an `AttrTokenStream`. This is used to simplify the - /// handling of replace ranges. + /// A special 'empty' token that is ignored during the conversion to a `TokenStream`. This is + /// used to simplify the handling of replace ranges. Empty, } -/// An `AttrTokenStream` is similar to a `TokenStream`, but with extra -/// information about the tokens for attribute targets. This is used -/// during expansion to perform early cfg-expansion, and to process attributes -/// during proc-macro invocations. -#[derive(Clone, Debug, Default, Encodable, Decodable)] -pub struct AttrTokenStream(pub Arc>); - -/// Converts a flattened iterator of tokens (including open and close delimiter tokens) into an -/// `AttrTokenStream`, creating an `AttrTokenTree::Delimited` for each matching pair of open and -/// close delims. -fn make_attr_token_stream( +/// Converts a flattened iterator of tokens (including open and close delimiter tokens) into a +/// sequence of `TokenTree` (appended to `res`), creating a `TokenTree::Delimited` for each +/// matching pair of open and close delims. Any `FlatToken::AttrsTarget` element will only be +/// appended if `configure` succeeds, and `configure` can also modify any such element. +fn append_flat_tokens_as_token_trees_to( iter: impl Iterator, break_last_token: u32, -) -> AttrTokenStream { + configure: &mut ConfigureFn<'_>, + res: &mut Vec, +) { #[derive(Debug)] struct FrameData { // This is `None` for the first frame, `Some` for all others. open_delim_sp: Option<(Delimiter, Span, Spacing)>, - inner: Vec, + inner: Vec, } + // The stack always has at least one element. Storing it separately makes for shorter code. - let mut stack_top = FrameData { open_delim_sp: None, inner: vec![] }; + let mut stack_top = FrameData { open_delim_sp: None, inner: mem::take(res) }; let mut stack_rest = vec![]; for flat_token in iter { match flat_token { @@ -374,10 +399,11 @@ fn make_attr_token_stream( )); } else if let Some(delim) = kind.close_delim() { // If there's no matching opening delimiter, the token stream is malformed, - // likely due to a improper delimiter positions in the source code. - // It's not delimiter mismatch, and lexer can not detect it, so we just ignore it here. + // likely due to an improper delimiter position in the source code. It's not + // delimiter mismatch, and lexer can not detect it, so we just ignore it here. let Some(frame) = stack_rest.pop() else { - return AttrTokenStream::new(stack_top.inner); + *res = stack_top.inner; + return; }; let frame_data = mem::replace(&mut stack_top, frame); let (open_delim, open_sp, open_spacing) = frame_data.open_delim_sp.unwrap(); @@ -387,15 +413,22 @@ fn make_attr_token_stream( ); let dspan = DelimSpan::from_pair(open_sp, span); let dspacing = DelimSpacing::new(open_spacing, spacing); - let stream = AttrTokenStream::new(frame_data.inner); - let delimited = AttrTokenTree::Delimited(dspan, dspacing, delim, stream); + let stream = TokenStream::new(frame_data.inner); + let delimited = TokenTree::Delimited(dspan, dspacing, delim, stream); stack_top.inner.push(delimited); } else { - stack_top.inner.push(AttrTokenTree::Token(token, spacing)) + stack_top.inner.push(TokenTree::Token(token, spacing)) } } - FlatToken::AttrsTarget(target) => { - stack_top.inner.push(AttrTokenTree::AttrsTarget(target)) + FlatToken::AttrsTarget(mut target) => { + if configure(&mut target) { + append_attrs_and_stream_as_token_trees_to( + &target.attrs, + &target.tokens, + configure, + &mut stack_top.inner, + ); + } } FlatToken::Empty => {} } @@ -403,7 +436,7 @@ fn make_attr_token_stream( if break_last_token > 0 { let last_token = stack_top.inner.pop().unwrap(); - if let AttrTokenTree::Token(last_token, spacing) = last_token { + if let TokenTree::Token(last_token, spacing) = last_token { let (unglued, _) = last_token.kind.break_two_token_op(break_last_token).unwrap(); // Tokens are always ASCII chars, so we can use byte arithmetic here. @@ -411,65 +444,13 @@ fn make_attr_token_stream( first_span = first_span.with_hi(first_span.lo() + rustc_span::BytePos(break_last_token)); - stack_top.inner.push(AttrTokenTree::Token(Token::new(unglued, first_span), spacing)); + stack_top.inner.push(TokenTree::Token(Token::new(unglued, first_span), spacing)); } else { panic!("Unexpected last token {last_token:?}") } } - AttrTokenStream::new(stack_top.inner) -} -/// A shared empty attr token stream, used to avoid an unnecessary `Arc` allocation for every empty -/// token stream. -static EMPTY_ATTR_TOKEN_STREAM: LazyLock = - LazyLock::new(|| AttrTokenStream(Arc::new(Vec::new()))); - -/// Like `TokenTree`, but for `AttrTokenStream`. -#[derive(Clone, Debug, Encodable, Decodable)] -pub enum AttrTokenTree { - Token(Token, Spacing), - Delimited(DelimSpan, DelimSpacing, Delimiter, AttrTokenStream), - /// Stores the attributes for an attribute target, - /// along with the tokens for that attribute target. - /// See `AttrsTarget` for more information - AttrsTarget(AttrsTarget), -} - -impl AttrTokenStream { - pub fn new(tts: Vec) -> AttrTokenStream { - if tts.is_empty() { - EMPTY_ATTR_TOKEN_STREAM.clone() - } else { - AttrTokenStream(Arc::new(tts)) - } - } - - /// Converts this `AttrTokenStream` to a plain `Vec`. During - /// conversion, any `AttrTokenTree::AttrsTarget` gets "flattened" back to a - /// `TokenStream`, as described in the comment on - /// `attrs_and_tokens_to_token_trees`. - pub fn to_token_trees(&self) -> Vec { - let mut res = Vec::with_capacity(self.0.len()); - for tree in self.0.iter() { - match tree { - AttrTokenTree::Token(inner, spacing) => { - res.push(TokenTree::Token(inner.clone(), *spacing)); - } - AttrTokenTree::Delimited(span, spacing, delim, stream) => { - res.push(TokenTree::Delimited( - *span, - *spacing, - *delim, - TokenStream::new(stream.to_token_trees()), - )) - } - AttrTokenTree::AttrsTarget(target) => { - attrs_and_tokens_to_token_trees(&target.attrs, &target.tokens, &mut res); - } - } - } - res - } + *res = stack_top.inner; } // Converts multiple attributes and the tokens for a target AST node into token trees, and appends @@ -480,9 +461,10 @@ impl AttrTokenStream { // - Simple if only outer attribute are present, e.g. "#[outer1] #[outer2] fn f() { blah(); }" // - Trickier if inner attributes are present, because they must be moved within the AST node's // tokens, e.g. "#[outer] fn f() { #![inner] blah() }" -fn attrs_and_tokens_to_token_trees( +fn append_attrs_and_stream_as_token_trees_to( attrs: &[Attribute], - target_tokens: &LazyAttrTokenStream, + target_tokens: &LazyTokenStream, + configure: &mut ConfigureFn<'_>, res: &mut Vec, ) { let idx = attrs.partition_point(|attr| matches!(attr.style, crate::AttrStyle::Outer)); @@ -490,11 +472,11 @@ fn attrs_and_tokens_to_token_trees( // Add outer attribute tokens. for attr in outer_attrs { - res.extend(attr.token_trees()); + attr.append_token_trees_to(res); } // Add target AST node tokens. - res.extend(target_tokens.to_attr_token_stream().to_token_trees()); + target_tokens.0.append_token_trees_to(configure, res); // Insert inner attribute tokens. if !inner_attrs.is_empty() { @@ -521,7 +503,7 @@ fn attrs_and_tokens_to_token_trees( // Found it: the rightmost, outermost braced group. let mut tts = vec![]; for inner_attr in inner_attrs { - tts.extend(inner_attr.token_trees()); + inner_attr.append_token_trees_to(&mut tts); } tts.extend(stream.0.iter().cloned()); let stream = TokenStream::new(tts); @@ -558,15 +540,15 @@ fn attrs_and_tokens_to_token_trees( /// and a `tokens` field storing the (unparsed) tokens `struct Foo {}` /// /// The `cfg`/`cfg_attr` processing occurs in -/// `StripUnconfigured::configure_tokens`. -#[derive(Clone, Debug, Encodable, Decodable)] +/// `StripUnconfigured::try_configure_tokens`. +#[derive(Clone, Debug)] pub struct AttrsTarget { /// Attributes, both outer and inner. /// These are stored in the original order that they were parsed in. pub attrs: AttrVec, /// The underlying tokens for the attribute target that `attrs` /// are applied to - pub tokens: LazyAttrTokenStream, + pub tokens: LazyTokenStream, } /// Indicates whether a token can join with the following token to form a @@ -670,7 +652,7 @@ impl TokenStream { pub fn from_ast(node: &(impl HasTokens + fmt::Debug)) -> TokenStream { let tokens = node.tokens().unwrap_or_else(|| panic!("missing tokens for node: {:?}", node)); let mut tts = vec![]; - attrs_and_tokens_to_token_trees(node.attrs(), tokens, &mut tts); + append_attrs_and_stream_as_token_trees_to(node.attrs(), tokens, &mut keep_all, &mut tts); TokenStream::new(tts) } @@ -1112,11 +1094,9 @@ mod size_asserts { use super::*; // tidy-alphabetical-start - static_assert_size!(AttrTokenStream, 8); - static_assert_size!(AttrTokenTree, 32); - static_assert_size!(LazyAttrTokenStream, 8); - static_assert_size!(LazyAttrTokenStreamInner, 88); - static_assert_size!(Option, 8); // must be small, used in many AST nodes + static_assert_size!(LazyTokenStream, 8); + static_assert_size!(LazyTokenStreamInner, 88); + static_assert_size!(Option, 8); // must be small, used in many AST nodes static_assert_size!(TokenStream, 8); static_assert_size!(TokenTree, 32); // tidy-alphabetical-end diff --git a/compiler/rustc_ast/src/visit.rs b/compiler/rustc_ast/src/visit.rs index f0e5e54c114c4..2a0ea2b77815b 100644 --- a/compiler/rustc_ast/src/visit.rs +++ b/compiler/rustc_ast/src/visit.rs @@ -445,7 +445,7 @@ macro_rules! common_visitor_and_walkers { crate::token::Delimiter, crate::token::Lit, crate::token::LitKind, - crate::tokenstream::LazyAttrTokenStream, + crate::tokenstream::LazyTokenStream, crate::tokenstream::TokenStream, rustc_data_structures::fx::FxHashMap, rustc_span::ByteSymbol, diff --git a/compiler/rustc_builtin_macros/src/cfg_eval.rs b/compiler/rustc_builtin_macros/src/cfg_eval.rs index 34ddd9427cdde..0aa3a52fdd808 100644 --- a/compiler/rustc_builtin_macros/src/cfg_eval.rs +++ b/compiler/rustc_builtin_macros/src/cfg_eval.rs @@ -100,10 +100,9 @@ impl CfgEval<'_> { let orig_tokens = annotatable.to_tokens(); // Re-parse the tokens, setting the `capture_cfg` flag to save extra information - // to the captured `AttrTokenStream` (specifically, we capture - // `AttrTokenTree::AttrsTarget` for all occurrences of `#[cfg]` and `#[cfg_attr]`) + // for all occurrences of `#[cfg]` and `#[cfg_attr]`. // - // After that we have our re-parsed `AttrTokenStream`, recursively configuring + // After that we have our re-parsed AST nodes, recursively configuring // our attribute target will correctly configure the tokens as well. let mut parser = Parser::new(&self.0.sess.psess, orig_tokens, None); parser.capture_cfg = true; diff --git a/compiler/rustc_builtin_macros/src/deriving/debug.rs b/compiler/rustc_builtin_macros/src/deriving/debug.rs index 0be5f36de980b..f24f3f2df007d 100644 --- a/compiler/rustc_builtin_macros/src/deriving/debug.rs +++ b/compiler/rustc_builtin_macros/src/deriving/debug.rs @@ -75,26 +75,26 @@ fn show_substructure( _ => cx.dcx().span_bug(span, "unexpected substructure in `derive(Debug)`"), }; - let name = cx.expr_str(span, ident.name); + let expr_name = || cx.expr_str(span, ident.name); let fmt = cx.expr_name(span, sym::f); // Fieldless enums have been special-cased earlier if fmt_detail == FmtDebug::Shallow { let fn_path_write_str = cx.std_path(span, &[sym::fmt, sym::Formatter, sym::write_str]); - let expr = cx.expr_call_global(span, fn_path_write_str, thin_vec![fmt, name]); + let expr = cx.expr_call_global(span, fn_path_write_str, thin_vec![fmt, expr_name()]); return BlockOrExpr::new_expr(expr); } // Struct and tuples are similar enough that we use the same code for both, // with some extra pieces for structs due to the field names. - let (is_struct, args_per_field) = match vdata { + let is_struct = match vdata { ast::VariantData::Unit(..) => { // Special fast path for unit variants. assert!(fields.is_empty()); - (false, 0) + false } - ast::VariantData::Tuple(..) => (false, 1), - ast::VariantData::Struct { .. } => (true, 2), + ast::VariantData::Tuple(..) => false, + ast::VariantData::Struct { .. } => true, }; // The number of fields that can be handled without an array. @@ -114,7 +114,7 @@ fn show_substructure( if fields.is_empty() { // Special case for no fields. let fn_path_write_str = cx.std_path(span, &[sym::fmt, sym::Formatter, sym::write_str]); - let expr = cx.expr_call_global(span, fn_path_write_str, thin_vec![fmt, name]); + let expr = cx.expr_call_global(span, fn_path_write_str, thin_vec![fmt, expr_name()]); BlockOrExpr::new_expr(expr) } else if fields.len() <= CUTOFF { // Few enough fields that we can use a specific-length method. @@ -125,14 +125,25 @@ fn show_substructure( }; let fn_path_debug = cx.std_path(span, &[sym::fmt, sym::Formatter, Symbol::intern(&debug)]); - let mut args = ThinVec::with_capacity(2 + fields.len() * args_per_field); - args.extend([fmt, name]); - for (i, field) in fields.into_iter().enumerate() { - if is_struct { - let name = cx.expr_str(field.span, field.name.unwrap().name); - args.push(name); + let mut args = ThinVec::with_capacity(2 + fields.len()); + args.extend([fmt]); + + if is_struct { + let mut names = String::new(); + names.push_str(ident.name.as_str()); + + for field in fields.iter() { + names.push(' '); + names.push_str(field.name.unwrap().name.as_str()); } + let name_expr = cx.expr_str(span, Symbol::intern(&names)); + args.push(name_expr); + } else { + args.push(expr_name()); + }; + + for (i, field) in fields.into_iter().enumerate() { let field = expr_for_field(field, i); args.push(field); } @@ -140,29 +151,28 @@ fn show_substructure( BlockOrExpr::new_expr(expr) } else { // Enough fields that we must use the any-length method. - let mut name_exprs = ThinVec::with_capacity(fields.len()); + let mut names = String::new(); + if is_struct { + names.push_str(ident.name.as_str()); + } let mut value_exprs = ThinVec::with_capacity(fields.len()); for (i, field) in fields.into_iter().enumerate() { if is_struct { - name_exprs.push(cx.expr_str(field.span, field.name.unwrap().name)); + names.push(' '); + names.push_str(field.name.unwrap().name.as_str()); } let field = expr_for_field(field, i); value_exprs.push(field); } - // `let names: &'static _ = &["field1", "field2"];` + // `let names: &'static _ = "StructName field1 field2"` let names_let = is_struct.then(|| { let lt_static = Some(cx.lifetime_static(span)); let ty_static_ref = cx.ty_ref(span, cx.ty_infer(span), lt_static, ast::Mutability::Not); - cx.stmt_let_ty( - span, - false, - sym::names, - Some(ty_static_ref), - cx.expr_array_ref(span, name_exprs), - ) + let names_expr = cx.expr_str(span, Symbol::intern(&names)); + cx.stmt_let_ty(span, false, sym::names, Some(ty_static_ref), names_expr) }); // `let values: &[&dyn Debug] = &[&&self.field1, &&self.field2];` @@ -186,7 +196,7 @@ fn show_substructure( cx.expr_array_ref(span, value_exprs), ); - // `fmt::Formatter::debug_struct_fields_finish(fmt, name, names, values)` or + // `fmt::Formatter::debug_struct_fields_finish(fmt, names, values)` or // `fmt::Formatter::debug_tuple_fields_finish(fmt, name, values)` let sym_debug = if is_struct { sym::debug_struct_fields_finish @@ -195,20 +205,20 @@ fn show_substructure( }; let fn_path_debug_internal = cx.std_path(span, &[sym::fmt, sym::Formatter, sym_debug]); - let mut args = ThinVec::with_capacity(4); - args.push(fmt); - args.push(name); - if is_struct { - args.push(cx.expr_name(span, sym::names)); - } - args.push(cx.expr_name(span, sym::values)); + let args = thin_vec![ + fmt, + if is_struct { cx.expr_name(span, sym::names) } else { expr_name() }, + cx.expr_name(span, sym::values) + ]; + let expr = cx.expr_call_global(span, fn_path_debug_internal, args); - let mut stmts = ThinVec::with_capacity(2); - if is_struct { - stmts.push(names_let.unwrap()); - } - stmts.push(values_let); + let stmts = if is_struct { + thin_vec![names_let.unwrap(), values_let] + } else { + thin_vec![values_let] + }; + BlockOrExpr::new_mixed(stmts, Some(expr)) } } diff --git a/compiler/rustc_data_structures/src/stable_hash.rs b/compiler/rustc_data_structures/src/stable_hash.rs index 91578b9fd4308..57f5901656827 100644 --- a/compiler/rustc_data_structures/src/stable_hash.rs +++ b/compiler/rustc_data_structures/src/stable_hash.rs @@ -1,6 +1,5 @@ use std::hash::{BuildHasher, Hash, Hasher}; use std::marker::PhantomData; -use std::mem; use std::num::NonZero; use rustc_index::bit_set::{self, DenseBitSet}; @@ -533,10 +532,20 @@ where { #[inline] fn stable_hash(&self, hcx: &mut Hcx, hasher: &mut StableHasher) { - mem::discriminant(self).stable_hash(hcx, hasher); + #[derive(StableHash)] + enum Tag { + Ok, + Err, + } match *self { - Ok(ref x) => x.stable_hash(hcx, hasher), - Err(ref x) => x.stable_hash(hcx, hasher), + Ok(ref x) => { + Tag::Ok.stable_hash(hcx, hasher); + x.stable_hash(hcx, hasher); + } + Err(ref x) => { + Tag::Err.stable_hash(hcx, hasher); + x.stable_hash(hcx, hasher); + } } } } @@ -551,12 +560,19 @@ where } } -impl StableHash for ::std::mem::Discriminant { - #[inline] - fn stable_hash(&self, _: &mut Hcx, hasher: &mut StableHasher) { - ::std::hash::Hash::hash(self, hasher); - } -} +/// There is no way to stable-hash a `Discriminant` without leaking unstable +/// details of how the host compiler chooses and hashes discriminants. +/// +/// That would be bad, because stable hashes must be consistent between +/// the stage1 compiler (built with the bootstrap compiler/stdlib) +/// and the stage2 compiler (built with the in-tree compiler/stdlib). +/// +/// See for more context. +/// +/// If you need to manually stable-hash a discriminant, instead derive `StableHash` +/// on a dedicated "tag" enum, and then hash the appropriate tag for each variant. +/// For an example, see the impl of `StableHash for Result`. +impl !StableHash for std::mem::Discriminant {} impl StableHash for ::std::range::RangeInclusive where diff --git a/compiler/rustc_expand/src/config.rs b/compiler/rustc_expand/src/config.rs index 3cab950963102..29aff8d57a62f 100644 --- a/compiler/rustc_expand/src/config.rs +++ b/compiler/rustc_expand/src/config.rs @@ -4,9 +4,7 @@ use std::iter; use rustc_ast::attr::data_structures::CfgEntry; use rustc_ast::token::{Delimiter, Token, TokenKind}; -use rustc_ast::tokenstream::{ - AttrTokenStream, AttrTokenTree, LazyAttrTokenStream, Spacing, TokenTree, WithTokens, -}; +use rustc_ast::tokenstream::{LazyTokenStream, Spacing, TokenStream, TokenTree, WithTokens}; use rustc_ast::{self as ast, AttrStyle, Attribute, HasAttrs, HasTokens, NodeId, SyntheticAttr}; use rustc_attr_ir::target::Target; use rustc_attr_ir::{self as attrs, AttributeKind}; @@ -162,59 +160,16 @@ impl<'a> StripUnconfigured<'a> { fn try_configure_tokens(&self, node: &mut T) { if self.config_tokens { if let Some(Some(tokens)) = node.tokens_mut() { - let attr_stream = tokens.to_attr_token_stream(); - *tokens = LazyAttrTokenStream::new_direct(self.configure_tokens(&attr_stream)); - } - } - } - - /// Performs cfg-expansion on `stream`, producing a new `AttrTokenStream`. - /// This is only used during the invocation of `derive` proc-macros, - /// which require that we cfg-expand their entire input. - /// Normal cfg-expansion operates on parsed AST nodes via the `configure` method - fn configure_tokens(&self, stream: &AttrTokenStream) -> AttrTokenStream { - fn can_skip(stream: &AttrTokenStream) -> bool { - stream.0.iter().all(|tree| match tree { - AttrTokenTree::AttrsTarget(_) => false, - AttrTokenTree::Token(..) => true, - AttrTokenTree::Delimited(.., inner) => can_skip(inner), - }) - } - - if can_skip(stream) { - return stream.clone(); - } - - let trees: Vec<_> = stream - .0 - .iter() - .filter_map(|tree| match tree.clone() { - AttrTokenTree::AttrsTarget(mut target) => { + let stream = tokens.to_configured_token_stream(&mut |target| { // Expand any `cfg_attr` attributes. target.attrs.flat_map_in_place(|attr| self.process_cfg_attr(&attr)); - - if self.in_cfg(&target.attrs) { - target.tokens = LazyAttrTokenStream::new_direct( - self.configure_tokens(&target.tokens.to_attr_token_stream()), - ); - Some(AttrTokenTree::AttrsTarget(target)) - } else { - // Remove the target if there's a `cfg` attribute and - // the condition isn't satisfied. - None - } - } - AttrTokenTree::Delimited(sp, spacing, delim, mut inner) => { - inner = self.configure_tokens(&inner); - Some(AttrTokenTree::Delimited(sp, spacing, delim, inner)) - } - AttrTokenTree::Token(Token { kind, .. }, _) if kind.is_delim() => { - panic!("Should be `AttrTokenTree::Delimited`, not delim tokens: {:?}", tree); - } - AttrTokenTree::Token(token, spacing) => Some(AttrTokenTree::Token(token, spacing)), - }) - .collect(); - AttrTokenStream::new(trees) + // This return value means we remove the target if there's a `cfg` attribute and + // the condition isn't satisfied. + self.in_cfg(&target.attrs) + }); + *tokens = LazyTokenStream::new_direct(stream); + } + } } /// Parse and expand all `cfg_attr` attributes into a list of attributes @@ -302,7 +257,9 @@ impl<'a> StripUnconfigured<'a> { // Convert `#[cfg_attr(pred, attr)]` to `#[attr]`. // Use the `#` from `#[cfg_attr(pred, attr)]` in the result `#[attr]`. - let mut orig_trees = cfg_attr.token_trees().into_iter(); + let mut orig_trees = vec![]; + cfg_attr.append_token_trees_to(&mut orig_trees); + let mut orig_trees = orig_trees.into_iter(); let Some(TokenTree::Token(pound_token @ Token { kind: TokenKind::Pound, .. }, _)) = orig_trees.next() else { @@ -317,11 +274,11 @@ impl<'a> StripUnconfigured<'a> { panic!("Bad tokens for attribute {cfg_attr:?}"); }; vec![ - AttrTokenTree::Token(pound_token, Spacing::Joint), - AttrTokenTree::Token(bang_token, Spacing::JointHidden), + TokenTree::Token(pound_token, Spacing::Joint), + TokenTree::Token(bang_token, Spacing::JointHidden), ] } else { - vec![AttrTokenTree::Token(pound_token, Spacing::JointHidden)] + vec![TokenTree::Token(pound_token, Spacing::JointHidden)] }; // And the same thing for the `[`/`]` delimiters in `#[attr]`. @@ -330,7 +287,7 @@ impl<'a> StripUnconfigured<'a> { else { panic!("Bad tokens for attribute {cfg_attr:?}"); }; - trees.push(AttrTokenTree::Delimited( + trees.push(TokenTree::Delimited( delim_span, delim_spacing, Delimiter::Bracket, @@ -338,11 +295,11 @@ impl<'a> StripUnconfigured<'a> { .tokens .as_ref() .unwrap_or_else(|| panic!("Missing tokens for {:?}", attr_item.node)) - .to_attr_token_stream(), + .to_token_stream(), )); let attr_item_path_span = attr_item.node.path.span; - let attr_tokens = Some(LazyAttrTokenStream::new_direct(AttrTokenStream::new(trees))); + let attr_tokens = Some(LazyTokenStream::new_direct(TokenStream::new(trees))); let attr = ast::attr::mk_attr_from_item( &self.sess.psess.attr_id_generator, attr_item.node, diff --git a/compiler/rustc_hir_typeck/src/coercion.rs b/compiler/rustc_hir_typeck/src/coercion.rs index 973c0bd04e55f..dab6bfcc30c53 100644 --- a/compiler/rustc_hir_typeck/src/coercion.rs +++ b/compiler/rustc_hir_typeck/src/coercion.rs @@ -318,6 +318,13 @@ impl<'f, 'tcx> Coerce<'f, 'tcx> { return reborrow_coerce; } } + ty::Int(_) + | ty::Uint(_) + | ty::Float(_) + | ty::Infer(ty::IntVar(_) | ty::FloatVar(_)) => { + // For now, do nothing. If coercions are ever added for ints/floats then the arms + // handling these types in `check_expr_lit` will need re-evaluation. + } _ => {} } @@ -349,6 +356,14 @@ impl<'f, 'tcx> Coerce<'f, 'tcx> { self.unify(a, b, ForceLeakCheck::No) } } + ty::Int(_) + | ty::Uint(_) + | ty::Float(_) + | ty::Infer(ty::IntVar(_) | ty::FloatVar(_)) => { + // For now, just use unification rules. If coercions are ever added for ints/floats + // then the arms handling these types in `check_expr_lit` will need re-evaluation. + self.unify(a, b, ForceLeakCheck::No) + } _ => { // Otherwise, just use unification rules. self.unify(a, b, ForceLeakCheck::No) diff --git a/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs b/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs index 69ffd02466589..b3d339996b02f 100644 --- a/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs +++ b/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs @@ -1055,6 +1055,10 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { ast::LitKind::Int(i, ast::LitIntType::Unsuffixed) => { let opt_ty = expected.to_option(self).and_then(|ty| match ty.kind() { ty::Int(_) | ty::Uint(_) => Some(ty), + // If we have an expected type that is an `IntVar`, we can just reuse the + // `IntVar` rather than creating a new one and then later unifying them. + // (But we don't want to do this for `ExpectCastableToType`.) + ty::Infer(ty::IntVar(_)) if matches!(expected, ExpectHasType(_)) => Some(ty), // These exist to direct casts like `0x61 as char` to use // the right integer type to cast from, instead of falling back to // i32 due to no further constraints. @@ -1082,6 +1086,8 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { ast::LitKind::Float(_, ast::LitFloatType::Unsuffixed) => { let opt_ty = expected.to_option(self).and_then(|ty| match ty.kind() { ty::Float(_) => Some(ty), + // See the comment on the `ty::Infer(ty::IntVar(_))` case above. + ty::Infer(ty::FloatVar(_)) if matches!(expected, ExpectHasType(_)) => Some(ty), _ => None, }); opt_ty.unwrap_or_else(|| self.next_float_var(lit.span, Some(lint_id))) diff --git a/compiler/rustc_infer/src/infer/canonical/instantiate.rs b/compiler/rustc_infer/src/infer/canonical/instantiate.rs index 2bc7e269efc9d..58d3dbd72ed06 100644 --- a/compiler/rustc_infer/src/infer/canonical/instantiate.rs +++ b/compiler/rustc_infer/src/infer/canonical/instantiate.rs @@ -52,7 +52,7 @@ impl<'tcx, V> Canonical<'tcx, V> { /// Instantiate the values from `var_values` into `value`. `var_values` /// must be values for the set of canonical variables that appear in /// `value`. -pub(super) fn instantiate_value<'tcx, T>( +pub fn instantiate_value<'tcx, T>( tcx: TyCtxt<'tcx>, var_values: &CanonicalVarValues<'tcx>, value: T, diff --git a/compiler/rustc_infer/src/infer/canonical/mod.rs b/compiler/rustc_infer/src/infer/canonical/mod.rs index 55c78036c6d17..626d3f1b62fcf 100644 --- a/compiler/rustc_infer/src/infer/canonical/mod.rs +++ b/compiler/rustc_infer/src/infer/canonical/mod.rs @@ -21,7 +21,7 @@ //! //! [c]: https://rust-lang.github.io/chalk/book/canonical_queries/canonicalization.html -pub use instantiate::CanonicalExt; +pub use instantiate::{CanonicalExt, instantiate_value}; use rustc_index::IndexVec; pub use rustc_middle::infer::canonical::*; use rustc_middle::ty::{self, GenericArg, Ty, TyCtxt, TypeFoldable}; diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs index 73bebb22bc508..978eddc5e143d 100644 --- a/compiler/rustc_interface/src/passes.rs +++ b/compiler/rustc_interface/src/passes.rs @@ -900,6 +900,7 @@ pub static DEFAULT_QUERY_PROVIDERS: LazyLock = LazyLock::new(|| { providers.queries.analysis = analysis; providers.queries.resolver_for_lowering_raw = resolver_for_lowering_raw; providers.queries.stripped_cfg_items = |tcx, _| &tcx.resolutions(()).stripped_cfg_items[..]; + providers.queries.get_lang_items = |tcx, ()| &tcx.resolutions(()).lang_items; providers.queries.resolutions = |tcx, ()| tcx.resolver_for_lowering_raw(()).2; providers.queries.early_lint_checks = early_lint_checks; providers.queries.env_var_os = env_var_os; diff --git a/compiler/rustc_macros/src/stable_hash.rs b/compiler/rustc_macros/src/stable_hash.rs index 07c5a271d1087..ba570dd008e77 100644 --- a/compiler/rustc_macros/src/stable_hash.rs +++ b/compiler/rustc_macros/src/stable_hash.rs @@ -1,5 +1,5 @@ use proc_macro2::Ident; -use quote::quote; +use quote::{ToTokens, quote}; struct Attributes { ignore: bool, @@ -96,9 +96,44 @@ fn stable_hash_derive_with_mode( fn stable_hash_discriminant(s: &mut synstructure::Structure<'_>) -> proc_macro2::TokenStream { match s.ast().data { - syn::Data::Enum(_) => quote! { - ::std::mem::discriminant(self).stable_hash(__hcx, __hasher); - }, + syn::Data::Enum(_) => { + // For stable hashing, use a fake discriminant based on the syntactic + // ordering of enum variants, not the actual runtime discriminant. + // This helps to keep stable hashes consistent between stage1 and stage2. + let n_variants = s.variants().len(); + + // If this enum has no variants (and is therefore uninhabited), + // matching on `self` will cause the compiler to realise that all + // subsequent code is unreachable, triggering unhelpful warnings. + if n_variants == 0 { + return quote! {}; + } + + let mut match_arms = proc_macro2::TokenStream::new(); + + // Use a u8 discriminant, as it's measurably faster than usize. + // If support for larger enums is needed, take care to still use u8 + // when possible, to avoid regressions. + assert!( + n_variants <= 256, + "deriving StableHash for an enum with more than 256 variants is unsupported \ + (was: {n_variants})" + ); + for (discriminant, variant) in (0u8..).zip(s.variants()) { + let pat = variant.pat(); + + quote! { + #pat => #discriminant.stable_hash(__hcx, __hasher), + } + .to_tokens(&mut match_arms); + } + + quote! { + match *self { + #match_arms + } + } + } syn::Data::Struct(_) => quote! {}, syn::Data::Union(_) => panic!("cannot derive on union"), } diff --git a/compiler/rustc_middle/src/infer/canonical.rs b/compiler/rustc_middle/src/infer/canonical.rs index 291a7b8e59f4f..b25848e441b70 100644 --- a/compiler/rustc_middle/src/infer/canonical.rs +++ b/compiler/rustc_middle/src/infer/canonical.rs @@ -34,6 +34,7 @@ use crate::ty::{self, GenericArg, GenericArgsRef, List, Ty, TyCtxt, TypeFlags, T pub type CanonicalQueryInput<'tcx, V> = ir::CanonicalQueryInput, V>; pub type Canonical<'tcx, V> = ir::Canonical, V>; +pub type Canonicalized = ir::Canonicalized; pub type CanonicalVarKind<'tcx> = ir::CanonicalVarKind>; pub type CanonicalVarValues<'tcx> = ir::CanonicalVarValues>; pub type CanonicalVarKinds<'tcx> = &'tcx List>; diff --git a/compiler/rustc_middle/src/middle/resolve.rs b/compiler/rustc_middle/src/middle/resolve.rs index 1c92f0ee2a8b6..54357dd4fff12 100644 --- a/compiler/rustc_middle/src/middle/resolve.rs +++ b/compiler/rustc_middle/src/middle/resolve.rs @@ -3,7 +3,7 @@ use rustc_ast::node_id::NodeMap; use rustc_ast::{self as ast, NodeId}; -use rustc_attr_ir::StrippedCfgItem; +use rustc_attr_ir::{LanguageItems, StrippedCfgItem}; use rustc_data_structures::fx::{FxIndexMap, FxIndexSet}; use rustc_data_structures::steal::Steal; use rustc_data_structures::unord::{UnordMap, UnordSet}; @@ -197,6 +197,7 @@ pub struct ResolverGlobalCtxt { pub delegation_infos: FxIndexMap, pub delegation_inherent_fn_map: FxIndexMap>, + pub lang_items: LanguageItems, } #[derive(Debug)] diff --git a/compiler/rustc_middle/src/queries.rs b/compiler/rustc_middle/src/queries.rs index 56889f84f38d6..90a5e03d3a21f 100644 --- a/compiler/rustc_middle/src/queries.rs +++ b/compiler/rustc_middle/src/queries.rs @@ -2295,7 +2295,6 @@ rustc_queries! { /// Returns the lang items defined in all crates by loading them from metadata of dependencies /// and collecting the ones from the current crate. query get_lang_items(_: ()) -> &'tcx LanguageItems { - arena_cache eval_always desc { "calculating the lang items map" } } diff --git a/compiler/rustc_next_trait_solver/src/canonical/mod.rs b/compiler/rustc_next_trait_solver/src/canonical/mod.rs index 45587d717b418..d59a90e72c2c9 100644 --- a/compiler/rustc_next_trait_solver/src/canonical/mod.rs +++ b/compiler/rustc_next_trait_solver/src/canonical/mod.rs @@ -18,8 +18,8 @@ use rustc_type_ir::relate::{ self, Relate, RelateResult, TypeRelation, VarianceDiagInfo, relate_args_invariantly, }; use rustc_type_ir::{ - self as ty, Canonical, CanonicalVarKind, CanonicalVarValues, Const, InferCtxtLike, Interner, - Region, TypeFoldable, TypingMode, TypingModeEqWrapper, + self as ty, Canonical, CanonicalVarKind, CanonicalVarValues, Canonicalized, Const, + InferCtxtLike, Interner, Region, TypeFoldable, TypingMode, TypingModeEqWrapper, }; use thin_vec::ThinVec; use tracing::instrument; @@ -27,7 +27,8 @@ use tracing::instrument; use crate::delegate::SolverDelegate; use crate::solve::{ CanonicalResponse, Certainty, ExternalConstraintsData, ExternalRegionConstraints, Goal, - NestedNormalizationGoals, QueryInput, Response, VisibleForLeakCheck, inspect, + IsIdentity, NestedNormalizationGoals, QueryInput, Response, VisibleForLeakCheck, + has_no_inference_or_external_constraints, inspect, }; pub mod canonicalizer; @@ -93,7 +94,7 @@ where /// After calling a canonical query, we apply the constraints returned /// by the query using this function. /// -/// This happens in three steps: +/// If a quick early-return check fails, this happens in three steps: /// - we instantiate the bound variables of the query response /// - we unify the `var_values` of the response with the `original_values` /// - we apply the `external_constraints` returned by the query, returning @@ -102,19 +103,39 @@ pub(super) fn instantiate_and_apply_query_response( delegate: &D, original_values: &[I::GenericArg], response: CanonicalResponse, + canonical_goal_var_kinds: I::CanonicalVarKinds, span: I::Span, ) -> (NestedNormalizationGoals, Certainty) where D: SolverDelegate, I: Interner, { + let certainty = response.value.certainty; + + // If the response is an identity, and there are no external constraints, and the response var + // kinds match the canonical goal var kinds, this function is a no-op and we can return early. + if has_no_inference_or_external_constraints(response) + && response.var_kinds == canonical_goal_var_kinds + { + return (NestedNormalizationGoals::empty(), certainty); + } + let instantiation = compute_query_response_instantiation_values(delegate, &original_values, &response, span); - let Response { var_values, external_constraints, certainty } = - delegate.instantiate_canonical(response, instantiation); - - unify_query_var_values(delegate, &original_values, var_values, span); + // We could call `instantiate_canonical` on `response`, but it's more efficient to instantiate + // the fields within `response` separately. That way we can instantiate and unify `var_values` + // in a single step, rather than instantiating first (which creates an intermediate list) and + // then unifying afterwards. + let external_constraints = + delegate.instantiate_value(response.project(|r| r.external_constraints), instantiation); + instantiate_and_unify_query_var_values( + delegate, + &original_values, + response.project(|r| r.var_values), + instantiation, + span, + ); let ExternalConstraintsData { region_constraints, opaque_types, normalization_nested_goals } = &*external_constraints; @@ -474,7 +495,8 @@ where } } -/// Unify the `original_values` with the `var_values` returned by the canonical query.. +/// Instantiate `var_values` as returned by the canonical query and also unify it with +/// `original_values`. /// /// This assumes that this unification will always succeed. This is the case when /// applying a query response right away. However, calling a canonical query, doing any @@ -487,10 +509,11 @@ where /// from the solver we assume that the solver correctly handled aliases and therefore /// always relate them structurally here. #[instrument(level = "trace", skip(delegate))] -fn unify_query_var_values( +fn instantiate_and_unify_query_var_values( delegate: &D, original_values: &[I::GenericArg], - var_values: I::GenericArgs, + var_values: Canonicalized, + instantiation: CanonicalVarValues, span: I::Span, ) where D: SolverDelegate, @@ -499,6 +522,7 @@ fn unify_query_var_values( assert_eq!(original_values.len(), var_values.len()); for (&orig, response) in iter::zip(original_values, var_values.iter()) { + let response = instantiate_generic_arg(delegate, response, instantiation); if orig == response { continue; } @@ -508,6 +532,41 @@ fn unify_query_var_values( } } +fn instantiate_generic_arg( + delegate: &D, + arg: Canonicalized, + instantiation: CanonicalVarValues, +) -> I::GenericArg +where + D: SolverDelegate, + I: Interner, +{ + // Canonical bound vars are very common here. `CanonicalInstantiator::fold_{ty,region,const}`'s + // handling of them is simple, and we replicate that handling here to avoid the cost of the + // surrounding machinery. + fn canonical_bound_var(arg: Canonicalized) -> Option { + match arg.into_uninstantiated().kind() { + ty::GenericArgKind::Type(t) => match t.kind() { + ty::Bound(ty::BoundVarIndexKind::Canonical, bt) => Some(bt.var()), + _ => None, + }, + ty::GenericArgKind::Lifetime(r) => match r.kind() { + ty::ReBound(ty::BoundVarIndexKind::Canonical, br) => Some(br.var()), + _ => None, + }, + ty::GenericArgKind::Const(c) => match c.kind() { + ty::ConstKind::Bound(ty::BoundVarIndexKind::Canonical, bc) => Some(bc.var()), + _ => None, + }, + } + } + + match canonical_bound_var::(arg) { + Some(var) => instantiation[var], + None => delegate.instantiate_value(arg, instantiation), + } +} + fn register_region_constraints( delegate: &D, constraints: impl IntoIterator, VisibleForLeakCheck)>, @@ -586,7 +645,7 @@ pub fn instantiate_canonical_state( where D: SolverDelegate, I: Interner, - T: TypeFoldable, + T: TypeFoldable + Copy, { // In case any fresh inference variables have been created between `state` // and the previous instantiation, extend `orig_values` for it. @@ -608,9 +667,17 @@ where prev_universe, ); - let inspect::State { var_values, data } = delegate.instantiate_canonical(state, instantiation); + // We instantiate the fields within `state` separately. See the corresponding code in + // `instantiate_and_apply_query_response` for an explanation why. + let data = delegate.instantiate_value(state.project(|r| r.data), instantiation); + instantiate_and_unify_query_var_values( + delegate, + orig_values, + state.project(|r| r.var_values), + instantiation, + span, + ); - unify_query_var_values(delegate, orig_values, var_values, span); data } @@ -644,11 +711,12 @@ pub fn response_no_constraints_raw( max_universe, var_kinds, value: Response { + certainty, var_values, + var_values_is_identity: IsIdentity::Yes, // FIXME: maybe we should store the "no response" version in cx, like // we do for cx.types and stuff. external_constraints: cx.mk_external_constraints(ExternalConstraintsData::new(cx)), - certainty, }, } } diff --git a/compiler/rustc_next_trait_solver/src/delegate.rs b/compiler/rustc_next_trait_solver/src/delegate.rs index 630e1dd68e041..7c4470efa082b 100644 --- a/compiler/rustc_next_trait_solver/src/delegate.rs +++ b/compiler/rustc_next_trait_solver/src/delegate.rs @@ -79,6 +79,14 @@ pub trait SolverDelegate: Deref + Sized { &self, ) -> Vec<(ty::RegionConstraint, VisibleForLeakCheck)>; + fn instantiate_value( + &self, + value: ty::Canonicalized, + values: ty::CanonicalVarValues, + ) -> V + where + V: TypeFoldable; + fn instantiate_canonical( &self, canonical: ty::Canonical, 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 54f5a196b4154..ba70ebb27540f 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 @@ -43,9 +43,9 @@ use crate::solve::search_graph::SearchGraph; use crate::solve::ty::may_use_unstable_feature; use crate::solve::{ CanonicalResponse, Certainty, ExternalConstraintsData, FIXPOINT_STEP_LIMIT, Goal, - GoalEvaluation, GoalSource, GoalStalledOn, GoalStalledOnOpaques, HasChanged, MaybeCause, - NestedNormalizationGoals, NoSolution, QueryInput, QueryResult, Response, SucceededInErased, - VisibleForLeakCheck, inspect, + GoalEvaluation, GoalSource, GoalStalledOn, GoalStalledOnOpaques, HasChanged, IsIdentity, + MaybeCause, NestedNormalizationGoals, NoSolution, QueryInput, QueryResult, Response, + SucceededInErased, VisibleForLeakCheck, inspect, }; pub mod fast_path; @@ -883,6 +883,7 @@ where self.delegate, &orig_values, response, + canonical_goal.canonical.var_kinds, self.origin_span, ); @@ -1711,15 +1712,17 @@ where filter_irrelevant_region_constraints(self.delegate, var_values, &mut external_constraints); - let canonical = canonicalize_response( + let mut canonical = canonicalize_response( self.delegate, self.max_input_universe, Response { - var_values, certainty, + var_values, + var_values_is_identity: IsIdentity::No, // updated below, after canonicalization external_constraints: self.cx().mk_external_constraints(external_constraints), }, ); + canonical.value.update_var_values_is_identity(); Ok(canonical) } @@ -2062,6 +2065,7 @@ pub(super) fn evaluate_root_goal_for_proof_tree, delegate, &proof_tree.orig_values, response, + canonical_goal.canonical.var_kinds, origin_span, ); diff --git a/compiler/rustc_next_trait_solver/src/solve/mod.rs b/compiler/rustc_next_trait_solver/src/solve/mod.rs index d944ae765c4f4..3658a4ed34d9c 100644 --- a/compiler/rustc_next_trait_solver/src/solve/mod.rs +++ b/compiler/rustc_next_trait_solver/src/solve/mod.rs @@ -57,7 +57,7 @@ pub enum HasChanged { // FIXME(trait-system-refactor-initiative#117): we don't detect whether a response // ended up pulling down any universes. -fn has_no_inference_or_external_constraints( +pub(crate) fn has_no_inference_or_external_constraints( response: ty::Canonical>, ) -> bool { let ExternalConstraintsData { @@ -65,7 +65,7 @@ fn has_no_inference_or_external_constraints( ref opaque_types, ref normalization_nested_goals, } = *response.value.external_constraints; - response.value.is_identity() + response.value.var_values_is_identity == IsIdentity::Yes && region_constraints.is_empty() && opaque_types.is_empty() && normalization_nested_goals.is_empty() @@ -77,7 +77,7 @@ fn has_only_region_constraints(response: ty::Canonical= IsIdentity::ModuloRegions && opaque_types.is_empty() && normalization_nested_goals.is_empty() } @@ -93,8 +93,9 @@ fn equal_response_modulo_region_constraints( var_kinds: a_var_kinds, value: Response { - var_values: a_var_values, certainty: a_certainty, + var_values: a_var_values, + var_values_is_identity: _, // ignore because it's purely derived from `var_values` external_constraints: a_external_constraints, }, } = a; diff --git a/compiler/rustc_next_trait_solver/src/solve/trait_goals.rs b/compiler/rustc_next_trait_solver/src/solve/trait_goals.rs index 22e68c99d2cb6..38bdaa898c455 100644 --- a/compiler/rustc_next_trait_solver/src/solve/trait_goals.rs +++ b/compiler/rustc_next_trait_solver/src/solve/trait_goals.rs @@ -5,9 +5,9 @@ use rustc_type_ir::fast_reject::DeepRejectCtxt; use rustc_type_ir::inherent::*; use rustc_type_ir::lang_items::SolverTraitLangItem; use rustc_type_ir::solve::{ - AliasBoundKind, CandidatePreferenceMode, CanonicalResponse, ExternalConstraintsData, MaybeInfo, - NoSolutionOrRerunNonErased, OpaqueTypesJank, QueryResultOrRerunNonErased, RerunNonErased, - RerunReason, RerunResultExt, SizedTraitKind, + AliasBoundKind, CandidatePreferenceMode, CanonicalResponse, ExternalConstraintsData, + IsIdentity, MaybeInfo, NoSolutionOrRerunNonErased, OpaqueTypesJank, + QueryResultOrRerunNonErased, RerunNonErased, RerunReason, RerunResultExt, SizedTraitKind, }; use rustc_type_ir::{ self as ty, ClausePolarity, ExistentialPredicate, FieldInfo, Interner, MayBeErased, Movability, @@ -1332,7 +1332,7 @@ where // Proving an auto trait for the hidden type must not constrain inference // variables, as that would leak the hidden type itself. - if !candidate.result.value.is_identity_modulo_regions() { + if candidate.result.value.var_values_is_identity == IsIdentity::No { return self.forced_ambiguity(MaybeInfo::AMBIGUOUS); } diff --git a/compiler/rustc_parse/src/lib.rs b/compiler/rustc_parse/src/lib.rs index edd280743e437..2c79db50a73ef 100644 --- a/compiler/rustc_parse/src/lib.rs +++ b/compiler/rustc_parse/src/lib.rs @@ -325,7 +325,7 @@ fn fake_token_stream_for_file_mod( let mut wrapper_tts = Vec::new(); for attr in item.attrs.iter().filter(|attr| attr.style == ast::AttrStyle::Outer) { - wrapper_tts.extend(attr.token_trees()); + attr.append_token_trees_to(&mut wrapper_tts); } wrapper_tts.extend(lex_token_trees_for_span(psess, item.span)?); let Some(TokenTree::Token(semi, _)) = wrapper_tts.pop() else { diff --git a/compiler/rustc_parse/src/parser/asm.rs b/compiler/rustc_parse/src/parser/asm.rs index 92b0b96fab165..7dde77dd8d44c 100644 --- a/compiler/rustc_parse/src/parser/asm.rs +++ b/compiler/rustc_parse/src/parser/asm.rs @@ -55,11 +55,11 @@ impl ast::HasAttrs for AsmAttrVec { } impl ast::HasTokens for AsmAttrVec { - fn tokens(&self) -> Option<&rustc_ast::tokenstream::LazyAttrTokenStream> { + fn tokens(&self) -> Option<&rustc_ast::tokenstream::LazyTokenStream> { None } - fn tokens_mut(&mut self) -> Option<&mut Option> { + fn tokens_mut(&mut self) -> Option<&mut Option> { None } } diff --git a/compiler/rustc_parse/src/parser/attr.rs b/compiler/rustc_parse/src/parser/attr.rs index 1a53dcb3d8550..3a721ce467980 100644 --- a/compiler/rustc_parse/src/parser/attr.rs +++ b/compiler/rustc_parse/src/parser/attr.rs @@ -393,7 +393,7 @@ impl<'a> Parser<'a> { if let Some(attr) = attr { // If we are currently capturing tokens (i.e. we are within a call to // `Parser::collect_tokens`) record the token positions of this inner attribute, - // for possible later processing in a `LazyAttrTokenStream`. + // for possible later processing in a `LazyTokenStream`. if let Capturing::Yes = self.capture_state.capturing { let end_pos = self.num_bump_calls; let parser_range = ParserRange(start_pos..end_pos); diff --git a/compiler/rustc_parse/src/parser/attr_wrapper.rs b/compiler/rustc_parse/src/parser/attr_wrapper.rs index 99fe984401ef8..c6ef395342330 100644 --- a/compiler/rustc_parse/src/parser/attr_wrapper.rs +++ b/compiler/rustc_parse/src/parser/attr_wrapper.rs @@ -3,7 +3,7 @@ use std::mem; use rustc_ast::token::Token; use rustc_ast::tokenstream::{ - AttrsTarget, LazyAttrTokenStream, NodeRange, ParserRange, Spacing, TokenCursor, + AttrsTarget, LazyTokenStream, NodeRange, ParserRange, Spacing, TokenCursor, }; use rustc_ast::{self as ast, AttrKind, AttrVec, Attribute, HasTokens}; use rustc_data_structures::fx::FxHashSet; @@ -101,7 +101,7 @@ impl<'a> Parser<'a> { } /// Parses code with `f`. If appropriate, it records the tokens (in - /// `LazyAttrTokenStream` form) that were parsed in the result, accessible + /// `LazyTokenStream` form) that were parsed in the result, accessible /// via the `HasTokens` trait. /// /// Why is this done? Various macro cases require an AST node's tokens. @@ -287,7 +287,7 @@ impl<'a> Parser<'a> { // breaking a `>>=` token twice into `>` + `>` + `=`), then extend the range of // captured tokens to include it, because the parser was not actually bumped past it. // (Even if we broke twice, it was still just one token originally, hence the `1`.) - // When the `LazyAttrTokenStream` gets converted into an `AttrTokenStream`, we will + // When the `LazyTokenStream` gets converted into a `TokenStream`, we will // rebreak that final token once or twice. + if self.break_last_token == 0 { 0 } else { 1 }; @@ -318,8 +318,7 @@ impl<'a> Parser<'a> { } else { // Grab any replace ranges that occur *inside* the current AST node. Convert them // from `ParserRange` form to `NodeRange` form. We will perform the actual - // replacement only when we convert the `LazyAttrTokenStream` to an - // `AttrTokenStream`. + // replacement only when we convert the `LazyTokenStream` to a `TokenStream`. self.capture_state.parser_replacements [parser_replacements_start..parser_replacements_end] .iter() @@ -353,7 +352,7 @@ impl<'a> Parser<'a> { // - `attrs`: includes the outer and the inner attr. // - `tokens`: lazy tokens for `g` (with its inner attr deleted). - let tokens = LazyAttrTokenStream::new_pending( + let tokens = LazyTokenStream::new_pending( collect_pos.start_token, collect_pos.cursor_snapshot, num_calls, diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs index 99d5a1fa6f257..fb26ef5e8ace6 100644 --- a/compiler/rustc_parse/src/parser/mod.rs +++ b/compiler/rustc_parse/src/parser/mod.rs @@ -215,7 +215,7 @@ pub struct Parser<'a> { // token. For example, capturing the `Vec` in `Option>` // requires us to unglue the trailing `>>` token. The `break_last_token` // field is used to track these tokens. They get appended to the captured - // stream when we evaluate a `LazyAttrTokenStream`. + // stream when we evaluate a `LazyTokenStream`. // // This value is always 0, 1, or 2. It can only reach 2 when splitting // `>>=` or `<<=`. @@ -260,14 +260,12 @@ struct ClosureSpans { body: Span, } -/// Controls how we capture tokens. Capturing can be expensive, -/// so we try to avoid performing capturing in cases where -/// we will never need an `AttrTokenStream`. +/// Controls how we capture tokens. Capturing can be expensive, so we avoid it when possible. #[derive(Copy, Clone, Debug)] enum Capturing { /// We aren't performing any capturing - this is the default mode. No, - /// We are capturing tokens + /// We are capturing tokens. Yes, } diff --git a/compiler/rustc_passes/Cargo.toml b/compiler/rustc_passes/Cargo.toml index 5e2fa8647671d..827e2b1f1bbc9 100644 --- a/compiler/rustc_passes/Cargo.toml +++ b/compiler/rustc_passes/Cargo.toml @@ -10,7 +10,6 @@ rustc_ast = { path = "../rustc_ast" } rustc_ast_lowering = { path = "../rustc_ast_lowering" } rustc_attr_ir = { path = "../rustc_attr_ir" } rustc_attr_parsing = { path = "../rustc_attr_parsing" } -rustc_crate_store = { path = "../rustc_crate_store" } rustc_data_structures = { path = "../rustc_data_structures" } rustc_errors = { path = "../rustc_errors" } rustc_feature = { path = "../rustc_feature" } diff --git a/compiler/rustc_passes/src/diagnostics.rs b/compiler/rustc_passes/src/diagnostics.rs index e090fd0669cd8..5dc29956ff255 100644 --- a/compiler/rustc_passes/src/diagnostics.rs +++ b/compiler/rustc_passes/src/diagnostics.rs @@ -9,7 +9,6 @@ use rustc_middle::ty::Ty; use rustc_span::{DUMMY_SP, Ident, Span, Symbol}; use crate::check_attr::ProcMacroKind; -use crate::lang_items::Duplicate; #[derive(Diagnostic)] #[diag("`{$no_mangle_attr}` attribute may not be used in combination with `{$export_name_attr}`")] @@ -180,30 +179,6 @@ pub(crate) struct InvalidMayDangle { pub attr_span: Span, } -#[derive(Diagnostic)] -#[diag("`#[panic_handler]` function required, but not found")] -pub(crate) struct MissingPanicHandler; - -#[derive(Diagnostic)] -#[diag("unwinding panics are not supported without std")] -#[help("using nightly cargo, use -Zbuild-std with panic=\"abort\" to avoid unwinding")] -#[note( - "since the core library is usually precompiled with panic=\"unwind\", rebuilding your crate with panic=\"abort\" may not be enough to fix the problem" -)] -pub(crate) struct PanicUnwindWithoutStd; - -#[derive(Diagnostic)] -#[diag("lang item required, but not found: `{$name}`")] -#[note( - "this can occur when a binary crate with `#![no_std]` is compiled for a target where `{$name}` is defined in the standard library" -)] -#[help( - "you may be able to compile for a target that doesn't need `{$name}`, specify a target with `--target` or in `.cargo/config`" -)] -pub(crate) struct MissingLangItem { - pub name: Symbol, -} - #[derive(Diagnostic)] #[diag("duplicate diagnostic item in crate `{$crate_name}`: `{$name}`")] pub(crate) struct DuplicateDiagnosticItemInCrate { @@ -370,112 +345,6 @@ impl<'a> Diagnostic<'a> for NoMainErr { diag } } -pub(crate) struct DuplicateLangItem { - pub local_span: Option, - pub lang_item_name: Symbol, - pub crate_name: Symbol, - pub dependency_of: Option, - pub is_local: bool, - pub path: String, - pub first_defined_span: Option, - pub orig_crate_name: Option, - pub orig_dependency_of: Option, - pub orig_is_local: bool, - pub orig_path: String, - pub(crate) duplicate: Duplicate, -} - -impl Diagnostic<'_> for DuplicateLangItem { - #[track_caller] - fn into_diag(self, dcx: DiagCtxtHandle<'_>, level: Level) -> Diag<'_> { - let mut diag = Diag::new( - dcx, - level, - match self.duplicate { - Duplicate::Plain => msg!("found duplicate lang item `{$lang_item_name}`"), - Duplicate::Crate => { - msg!("duplicate lang item in crate `{$crate_name}`: `{$lang_item_name}`") - } - Duplicate::CrateDepends => msg!( - "duplicate lang item in crate `{$crate_name}` (which `{$dependency_of}` depends on): `{$lang_item_name}`" - ), - }, - ); - diag.code(E0152); - diag.arg("lang_item_name", self.lang_item_name); - diag.arg("crate_name", self.crate_name); - if let Some(dependency_of) = self.dependency_of { - diag.arg("dependency_of", dependency_of); - } - diag.arg("path", self.path); - if let Some(orig_crate_name) = self.orig_crate_name { - diag.arg("orig_crate_name", orig_crate_name); - } - if let Some(orig_dependency_of) = self.orig_dependency_of { - diag.arg("orig_dependency_of", orig_dependency_of); - } - diag.arg("orig_path", self.orig_path); - if let Some(span) = self.local_span { - diag.span(span); - } - if let Some(span) = self.first_defined_span { - diag.span_note(span, msg!("the lang item is first defined here")); - } else { - if self.orig_dependency_of.is_none() { - diag.note(msg!("the lang item is first defined in crate `{$orig_crate_name}`")); - } else { - diag.note(msg!("the lang item is first defined in crate `{$orig_crate_name}` (which `{$orig_dependency_of}` depends on)")); - } - - if self.orig_is_local { - diag.note(msg!("first definition in the local crate (`{$orig_crate_name}`)")); - } else { - diag.note(msg!( - "first definition in `{$orig_crate_name}` loaded from {$orig_path}" - )); - } - - if self.is_local { - diag.note(msg!("second definition in the local crate (`{$crate_name}`)")); - } else { - diag.note(msg!("second definition in `{$crate_name}` loaded from {$path}")); - } - } - diag - } -} - -#[derive(Diagnostic)] -#[diag("`{$name}` lang item must be applied to a {$kind} with {$at_least -> - [true] at least {$num} - *[false] {$num} - } generic {$num -> - [one] argument - *[other] arguments - }", code = E0718)] -pub(crate) struct IncorrectTarget<'a> { - #[primary_span] - pub span: Span, - #[label( - "this {$kind} has {$actual_num} generic {$actual_num -> - [one] argument - *[other] arguments - }" - )] - pub generics_span: Span, - pub name: &'a str, // cannot be symbol because it renders e.g. `r#fn` instead of `fn` - pub kind: &'static str, - pub num: usize, - pub actual_num: usize, - pub at_least: bool, -} - -#[derive(Diagnostic)] -#[diag("lang items are not allowed in stable dylibs")] -pub(crate) struct IncorrectCrateType { - #[primary_span] - pub span: Span, -} #[derive(Diagnostic)] #[diag( diff --git a/compiler/rustc_passes/src/lang_items.rs b/compiler/rustc_passes/src/lang_items.rs deleted file mode 100644 index ab7b0f375e609..0000000000000 --- a/compiler/rustc_passes/src/lang_items.rs +++ /dev/null @@ -1,332 +0,0 @@ -//! Detecting lang items. -//! -//! Language items are items that represent concepts intrinsic to the language -//! itself. Examples are: -//! -//! * Traits that specify "kinds"; e.g., `Sync`, `Send`. -//! * Traits that represent operators; e.g., `Add`, `Sub`, `Index`. -//! * Functions called by the compiler itself. - -use rustc_ast as ast; -use rustc_ast::visit; -use rustc_attr_ir::lang_items::{GenericRequirement, LangItem, LanguageItems}; -use rustc_attr_ir::target::Target; -use rustc_crate_store::ExternCrate; -use rustc_hir::def_id::{DefId, LocalDefId}; -use rustc_middle::middle::resolve::ResolverAstLowering; -use rustc_middle::query::Providers; -use rustc_middle::ty::TyCtxt; -use rustc_span::{Span, Symbol, sym}; - -use crate::diagnostics::{DuplicateLangItem, IncorrectCrateType, IncorrectTarget}; -use crate::weak_lang_items; - -pub(crate) enum Duplicate { - Plain, - Crate, - CrateDepends, -} - -struct LanguageItemCollector<'ast, 'tcx> { - items: LanguageItems, - tcx: TyCtxt<'tcx>, - resolver: &'ast ResolverAstLowering<'tcx>, - parent_item: Option<&'ast ast::Item>, -} - -impl<'ast, 'tcx> LanguageItemCollector<'ast, 'tcx> { - fn new( - tcx: TyCtxt<'tcx>, - resolver: &'ast ResolverAstLowering<'tcx>, - ) -> LanguageItemCollector<'ast, 'tcx> { - LanguageItemCollector { tcx, resolver, items: LanguageItems::new(), parent_item: None } - } - - fn check_for_lang( - &mut self, - actual_target: Target, - def_id: LocalDefId, - attrs: &'ast [ast::Attribute], - item_span: Span, - generics: Option<&'ast ast::Generics>, - ) { - if let Some((name, attr_span)) = extract_ast(attrs) { - match LangItem::from_name(name) { - // Known lang item - Some(lang_item) => { - if actual_target != lang_item.target() { - // `#[panic_handler]` is turned into `#[lang = "panic_impl"]`, but in contrast - // to the actual lang item attr, is applied to `Fn` instead of `ForeignFn`. - if !(lang_item.is_weak() - && actual_target == Target::Fn - && lang_item.target() == Target::ForeignFn - && matches!(lang_item, LangItem::PanicImpl)) - { - self.tcx - .dcx() - .delayed_bug(format!("lang item target is checked in attribute parser: {:?} has {} but expected {}", def_id, actual_target, lang_item.target())); - return; - } - } - // Weak lang items are handled separately - if lang_item.is_weak() && actual_target == Target::ForeignFn { - self.items.missing.push(lang_item); - } else { - // Weak only lang items are always handled here - self.collect_item_extended( - lang_item, - def_id, - item_span, - attr_span, - generics, - actual_target, - ); - } - } - // Unknown lang item. - _ => { - self.tcx.dcx().delayed_bug("unknown lang item"); - } - } - } - } - - fn collect_item(&mut self, lang_item: LangItem, item_def_id: DefId, item_span: Option) { - // Check for duplicates. - if let Some(original_def_id) = self.items.get(lang_item) - && original_def_id != item_def_id - { - let lang_item_name = lang_item.name(); - let crate_name = self.tcx.crate_name(item_def_id.krate); - let mut dependency_of = None; - let is_local = item_def_id.is_local(); - let path = if is_local { - String::new() - } else { - self.tcx - .crate_extern_paths(item_def_id.krate) - .iter() - .map(|p| p.display().to_string()) - .collect::>() - .join(", ") - }; - - let mut orig_crate_name = None; - let mut orig_dependency_of = None; - let orig_is_local = original_def_id.is_local(); - let orig_path = if orig_is_local { - String::new() - } else { - self.tcx - .crate_extern_paths(original_def_id.krate) - .iter() - .map(|p| p.display().to_string()) - .collect::>() - .join(", ") - }; - - if !original_def_id.is_local() { - orig_crate_name = Some(self.tcx.crate_name(original_def_id.krate)); - if let Some(ExternCrate { dependency_of: inner_dependency_of, .. }) = - self.tcx.extern_crate(original_def_id.krate) - { - orig_dependency_of = Some(self.tcx.crate_name(*inner_dependency_of)); - } - } - - let duplicate = if item_span.is_some() { - Duplicate::Plain - } else { - match self.tcx.extern_crate(item_def_id.krate) { - Some(ExternCrate { dependency_of: inner_dependency_of, .. }) => { - dependency_of = Some(self.tcx.crate_name(*inner_dependency_of)); - Duplicate::CrateDepends - } - _ => Duplicate::Crate, - } - }; - - // When there's a duplicate lang item, something went very wrong and there's no value - // in recovering or doing anything. Give the user the one message to let them debug the - // mess they created and then wish them farewell. - self.tcx.dcx().emit_fatal(DuplicateLangItem { - local_span: item_span, - lang_item_name, - crate_name, - dependency_of, - is_local, - path, - first_defined_span: original_def_id.as_local().map(|did| self.tcx.source_span(did)), - orig_crate_name, - orig_dependency_of, - orig_is_local, - orig_path, - duplicate, - }); - } else { - // Matched. - self.items.set(lang_item, item_def_id); - } - } - - // Like collect_item() above, but also checks whether the lang item is declared - // with the right number of generic arguments. - fn collect_item_extended( - &mut self, - lang_item: LangItem, - item_def_id: LocalDefId, - item_span: Span, - attr_span: Span, - generics: Option<&'ast ast::Generics>, - target: Target, - ) { - let name = lang_item.name(); - - if let Some(generics) = generics { - // Now check whether the lang_item has the expected number of generic - // arguments. Generally speaking, binary and indexing operations have - // one (for the RHS/index), unary operations have none, the closure - // traits have one for the argument list, coroutines have one for the - // resume argument, and ordering/equality relations have one for the RHS - // Some other types like Box and various unsizing-related traits - // have minimum requirements. - - // FIXME: This still doesn't count, e.g., elided lifetimes and APITs. - let mut actual_num = generics.params.len(); - if target.is_associated_item() { - actual_num += self - .parent_item - .unwrap() - .opt_generics() - .map_or(0, |generics| generics.params.len()); - } - - let mut at_least = false; - let required = match lang_item.required_generics() { - GenericRequirement::Exact(num) if num != actual_num => Some(num), - GenericRequirement::Minimum(num) if actual_num < num => { - at_least = true; - Some(num) - } - // If the number matches, or there is no requirement, handle it normally - _ => None, - }; - - if let Some(num) = required { - // We are issuing E0718 "incorrect target" here, because while the - // item kind of the target is correct, the target is still wrong - // because of the wrong number of generic arguments. - self.tcx.dcx().emit_err(IncorrectTarget { - span: attr_span, - generics_span: generics.span, - name: name.as_str(), - kind: target.name(), - num, - actual_num, - at_least, - }); - - // return early to not collect the lang item - return; - } - } - - if self.tcx.crate_types().contains(&rustc_structures::CrateType::Sdylib) { - self.tcx.dcx().emit_err(IncorrectCrateType { span: attr_span }); - } - - self.collect_item(lang_item, item_def_id.to_def_id(), Some(item_span)); - } -} - -/// Traverses and collects all the lang items in all crates. -fn get_lang_items(tcx: TyCtxt<'_>, (): ()) -> LanguageItems { - let (resolver, krate) = tcx.resolver_for_lowering(); - let resolver = &*resolver.borrow(); - let krate = &*krate.borrow(); - - // Initialize the collector. - let mut collector = LanguageItemCollector::new(tcx, resolver); - - // Collect lang items in other crates. - for &cnum in tcx.used_crates(()).iter() { - for &(def_id, lang_item) in tcx.defined_lang_items(cnum).iter() { - collector.collect_item(lang_item, def_id, None); - } - } - - // Collect lang items local to this crate. - visit::Visitor::visit_crate(&mut collector, krate); - - // Find all required but not-yet-defined lang items. - weak_lang_items::check_crate(tcx, &mut collector.items); - - // Return all the lang items that were found. - collector.items -} - -impl<'ast, 'tcx> visit::Visitor<'ast> for LanguageItemCollector<'ast, 'tcx> { - fn visit_item(&mut self, i: &'ast ast::Item) { - let target = Target::from_ast_item(i); - - self.check_for_lang( - target, - self.resolver.owners[&i.id].def_id, - &i.attrs, - i.span, - i.opt_generics(), - ); - - let parent_item = self.parent_item.replace(i); - visit::walk_item(self, i); - self.parent_item = parent_item; - } - - fn visit_foreign_item(&mut self, i: &'ast ast::ForeignItem) { - self.check_for_lang( - Target::from_foreign_item_kind(&i.kind), - self.resolver.owners[&i.id].def_id, - &i.attrs, - i.span, - None, - ); - } - - fn visit_variant(&mut self, variant: &'ast ast::Variant) { - self.check_for_lang( - Target::Variant, - self.resolver.owners[&self.parent_item.unwrap().id].node_id_to_def_id[&variant.id], - &variant.attrs, - variant.span, - None, - ); - } - - fn visit_assoc_item(&mut self, i: &'ast ast::AssocItem, ctxt: visit::AssocCtxt) { - let target = Target::from_assoc_item_kind(&i.kind, ctxt); - let generics = i.opt_generics(); - - self.check_for_lang(target, self.resolver.owners[&i.id].def_id, &i.attrs, i.span, generics); - - visit::walk_assoc_item(self, i, ctxt); - } -} - -/// Extracts the first `lang = "$name"` out of a list of attributes. -/// The `#[panic_handler]` attribute is also extracted out when found. -/// -/// This function is used for `ast::Attribute`, for `rustc_attr_ir::Attribute` -/// use `find_attr!(attrs, Lang(lang_item))`. -pub(crate) fn extract_ast(attrs: &[rustc_ast::ast::Attribute]) -> Option<(Symbol, Span)> { - attrs.iter().find_map(|attr| { - Some(match attr { - _ if attr.has_name(sym::lang) => (attr.value_str()?, attr.span), - _ if attr.has_name(sym::panic_handler) => (sym::panic_impl, attr.span), - _ => return None, - }) - }) -} - -pub(crate) fn provide(providers: &mut Providers) { - providers.get_lang_items = get_lang_items; -} diff --git a/compiler/rustc_passes/src/lib.rs b/compiler/rustc_passes/src/lib.rs index 77bd179e8dd80..d37d1bea932fe 100644 --- a/compiler/rustc_passes/src/lib.rs +++ b/compiler/rustc_passes/src/lib.rs @@ -25,13 +25,11 @@ pub mod entry; mod fake_doc_items; pub mod hir_id_validator; pub mod input_stats; -mod lang_items; pub mod layout_test; mod lib_features; mod reachable; pub mod stability; mod upvars; -mod weak_lang_items; pub fn provide(providers: &mut Providers) { canonical_symbols::provide(providers); @@ -40,7 +38,6 @@ pub fn provide(providers: &mut Providers) { debugger_visualizer::provide(providers); diagnostic_items::provide(providers); entry::provide(providers); - lang_items::provide(providers); lib_features::provide(providers); reachable::provide(providers); stability::provide(providers); diff --git a/compiler/rustc_resolve/Cargo.toml b/compiler/rustc_resolve/Cargo.toml index 36db6adc7f920..d28936f8624fd 100644 --- a/compiler/rustc_resolve/Cargo.toml +++ b/compiler/rustc_resolve/Cargo.toml @@ -15,6 +15,7 @@ rustc_ast = { path = "../rustc_ast" } rustc_ast_pretty = { path = "../rustc_ast_pretty" } rustc_attr_ir = { path = "../rustc_attr_ir" } rustc_attr_parsing = { path = "../rustc_attr_parsing" } +rustc_crate_store = { path = "../rustc_crate_store" } rustc_data_structures = { path = "../rustc_data_structures" } rustc_errors = { path = "../rustc_errors" } rustc_expand = { path = "../rustc_expand" } diff --git a/compiler/rustc_resolve/src/diagnostics/mod.rs b/compiler/rustc_resolve/src/diagnostics/mod.rs index 65ef919e9d0c7..3e622b8829b63 100644 --- a/compiler/rustc_resolve/src/diagnostics/mod.rs +++ b/compiler/rustc_resolve/src/diagnostics/mod.rs @@ -8,7 +8,7 @@ use rustc_macros::{Diagnostic, Subdiagnostic}; use rustc_span::{Ident, Span, Spanned, Symbol}; use crate::Res; -use crate::late::PatternSource; +use crate::late::{Duplicate, PatternSource}; pub(crate) mod impls; @@ -1774,3 +1774,134 @@ pub(crate) enum UnusedImportsSugg { num_to_remove: usize, }, } + +pub(crate) struct DuplicateLangItem { + pub local_span: Option, + pub lang_item_name: Symbol, + pub crate_name: Symbol, + pub dependency_of: Option, + pub is_local: bool, + pub path: String, + pub first_defined_span: Option, + pub orig_crate_name: Option, + pub orig_dependency_of: Option, + pub orig_is_local: bool, + pub orig_path: String, + pub(crate) duplicate: Duplicate, +} + +impl Diagnostic<'_> for DuplicateLangItem { + #[track_caller] + fn into_diag(self, dcx: DiagCtxtHandle<'_>, level: Level) -> Diag<'_> { + let mut diag = Diag::new( + dcx, + level, + match self.duplicate { + Duplicate::Plain => msg!("found duplicate lang item `{$lang_item_name}`"), + Duplicate::Crate => { + msg!("duplicate lang item in crate `{$crate_name}`: `{$lang_item_name}`") + } + Duplicate::CrateDepends => msg!( + "duplicate lang item in crate `{$crate_name}` (which `{$dependency_of}` depends on): `{$lang_item_name}`" + ), + }, + ); + diag.code(E0152); + diag.arg("lang_item_name", self.lang_item_name); + diag.arg("crate_name", self.crate_name); + if let Some(dependency_of) = self.dependency_of { + diag.arg("dependency_of", dependency_of); + } + diag.arg("path", self.path); + if let Some(orig_crate_name) = self.orig_crate_name { + diag.arg("orig_crate_name", orig_crate_name); + } + if let Some(orig_dependency_of) = self.orig_dependency_of { + diag.arg("orig_dependency_of", orig_dependency_of); + } + diag.arg("orig_path", self.orig_path); + if let Some(span) = self.local_span { + diag.span(span); + } + if let Some(span) = self.first_defined_span { + diag.span_note(span, msg!("the lang item is first defined here")); + } else { + if self.orig_dependency_of.is_none() { + diag.note(msg!("the lang item is first defined in crate `{$orig_crate_name}`")); + } else { + diag.note(msg!("the lang item is first defined in crate `{$orig_crate_name}` (which `{$orig_dependency_of}` depends on)")); + } + + if self.orig_is_local { + diag.note(msg!("first definition in the local crate (`{$orig_crate_name}`)")); + } else { + diag.note(msg!( + "first definition in `{$orig_crate_name}` loaded from {$orig_path}" + )); + } + + if self.is_local { + diag.note(msg!("second definition in the local crate (`{$crate_name}`)")); + } else { + diag.note(msg!("second definition in `{$crate_name}` loaded from {$path}")); + } + } + diag + } +} + +#[derive(Diagnostic)] +#[diag("`#[panic_handler]` function required, but not found")] +pub(crate) struct MissingPanicHandler; + +#[derive(Diagnostic)] +#[diag("unwinding panics are not supported without std")] +#[help("using nightly cargo, use -Zbuild-std with panic=\"abort\" to avoid unwinding")] +#[note( + "since the core library is usually precompiled with panic=\"unwind\", rebuilding your crate with panic=\"abort\" may not be enough to fix the problem" +)] +pub(crate) struct PanicUnwindWithoutStd; + +#[derive(Diagnostic)] +#[diag("lang items are not allowed in stable dylibs")] +pub(crate) struct IncorrectCrateType { + #[primary_span] + pub span: Span, +} + +#[derive(Diagnostic)] +#[diag("`{$name}` lang item must be applied to a {$kind} with {$at_least -> + [true] at least {$num} + *[false] {$num} + } generic {$num -> + [one] argument + *[other] arguments + }", code = E0718)] +pub(crate) struct IncorrectTarget<'a> { + #[primary_span] + pub span: Span, + #[label( + "this {$kind} has {$actual_num} generic {$actual_num -> + [one] argument + *[other] arguments + }" + )] + pub generics_span: Span, + pub name: &'a str, // cannot be symbol because it renders e.g. `r#fn` instead of `fn` + pub kind: &'static str, + pub num: usize, + pub actual_num: usize, + pub at_least: bool, +} + +#[derive(Diagnostic)] +#[diag("lang item required, but not found: `{$name}`")] +#[note( + "this can occur when a binary crate with `#![no_std]` is compiled for a target where `{$name}` is defined in the standard library" +)] +#[help( + "you may be able to compile for a target that doesn't need `{$name}`, specify a target with `--target` or in `.cargo/config`" +)] +pub(crate) struct MissingLangItem { + pub name: Symbol, +} diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs index bffcf60a920ff..13a8d8b8f25e9 100644 --- a/compiler/rustc_resolve/src/late.rs +++ b/compiler/rustc_resolve/src/late.rs @@ -17,6 +17,7 @@ use rustc_ast::visit::{ AssocCtxt, BoundKind, FnCtxt, FnKind, Visitor, try_visit, visit_opt, walk_list, }; use rustc_ast::*; +use rustc_attr_ir::target::Target; use rustc_data_structures::either::Either; use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexMap}; use rustc_data_structures::unord::{UnordMap, UnordSet}; @@ -50,8 +51,11 @@ use crate::{ }; mod diagnostics; +mod lang_items; +pub(super) mod weak_lang_items; use diagnostics::{ElisionFnParameter, LifetimeElisionCandidate, MissingLifetime}; +pub(super) use lang_items::{Duplicate, collect_item}; #[derive(Copy, Clone, Debug)] struct BindingInfo { @@ -1130,6 +1134,13 @@ impl<'ast, 'ra, 'tcx> Visitor<'ast> for LateResolutionVisitor<'_, 'ast, 'ra, 'tc with_owner(self, foreign_item.id, |this| { this.resolve_doc_links(&foreign_item.attrs, MaybeExported::Ok(foreign_item.id)); let def_kind = this.r.tcx.def_kind(this.r.current_owner.def_id); + this.check_for_lang( + Target::from_foreign_item_kind(&foreign_item.kind), + this.r.current_owner.def_id, + &foreign_item.attrs, + foreign_item.span, + None, + ); match foreign_item.kind { ForeignItemKind::TyAlias(TyAlias { ref generics, .. }) => { this.with_generic_param_rib( @@ -1549,6 +1560,13 @@ impl<'ast, 'ra, 'tcx> Visitor<'ast> for LateResolutionVisitor<'_, 'ast, 'ra, 'tc self.visit_vis(&v.vis); self.visit_ident(&v.ident); self.visit_variant_data(&v.data); + self.check_for_lang( + Target::Variant, + self.r.current_owner.node_id_to_def_id[&v.id], + &v.attrs, + v.span, + None, + ); if let Some(discr) = &v.disr_expr { self.resolve_anon_const(discr, AnonConstKind::EnumDiscriminant); } @@ -2989,6 +3007,15 @@ impl<'a, 'ast, 'ra, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> { debug!("(resolving item) resolving {:?} ({:?})", item.kind.ident(), item.kind); let def_kind = self.r.tcx.def_kind(self.r.current_owner.def_id); + + self.check_for_lang( + Target::from_ast_item(item), + self.r.current_owner.def_id, + &item.attrs, + item.span, + item.opt_generics(), + ); + match &item.kind { ItemKind::TyAlias(TyAlias { generics, .. }) => { self.with_generic_param_rib( @@ -3588,6 +3615,13 @@ impl<'a, 'ast, 'ra, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> { }; self.resolve_doc_links(&item.attrs, MaybeExported::Ok(item.id)); + self.check_for_lang( + Target::from_assoc_item_kind(&item.kind, AssocCtxt::Trait), + self.r.current_owner.def_id, + &item.attrs, + item.span, + item.opt_generics(), + ); match &item.kind { AssocItemKind::Const(ast::ConstItem { generics, ty, body, define_opaque, .. }) => { self.with_generic_param_rib( @@ -3819,6 +3853,16 @@ impl<'a, 'ast, 'ra, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> { self.resolve_doc_links(&item.attrs, MaybeExported::ImplItem(trait_id.ok_or(&item.vis))); let prev = self.diag_metadata.current_impl_item.take(); self.diag_metadata.current_impl_item = Some(&item); + self.check_for_lang( + Target::from_assoc_item_kind( + &item.kind, + AssocCtxt::Impl { of_trait: is_in_trait_impl }, + ), + self.r.current_owner.def_id, + &item.attrs, + item.span, + item.opt_generics(), + ); match &item.kind { AssocItemKind::Const(ast::ConstItem { ident, diff --git a/compiler/rustc_resolve/src/late/lang_items.rs b/compiler/rustc_resolve/src/late/lang_items.rs new file mode 100644 index 0000000000000..b53928df24dc8 --- /dev/null +++ b/compiler/rustc_resolve/src/late/lang_items.rs @@ -0,0 +1,256 @@ +//! Detecting lang items. +//! +//! Language items are items that represent concepts intrinsic to the language +//! itself. Examples are: +//! +//! * Traits that specify "kinds"; e.g., `Sync`, `Send`. +//! * Traits that represent operators; e.g., `Add`, `Sub`, `Index`. +//! * Functions called by the compiler itself. + +use rustc_ast as ast; +use rustc_attr_ir::target::Target; +use rustc_attr_ir::{GenericRequirement, LangItem, LanguageItems}; +use rustc_crate_store::ExternCrate; +use rustc_hir::def_id::{DefId, LocalDefId}; +use rustc_middle::ty::TyCtxt; +use rustc_span::{Span, sym}; +use rustc_structures::CrateType; + +use crate::diagnostics::{DuplicateLangItem, IncorrectCrateType, IncorrectTarget}; +use crate::late::{LateResolutionVisitor, RibKind}; + +pub(crate) enum Duplicate { + Plain, + Crate, + CrateDepends, +} + +impl<'tcx> LateResolutionVisitor<'_, '_, '_, 'tcx> { + pub(super) fn check_for_lang( + &mut self, + actual_target: Target, + def_id: LocalDefId, + attrs: &[ast::Attribute], + item_span: Span, + generics: Option<&ast::Generics>, + ) { + let attrs = attrs.iter().find_map(|attr| { + Some(match attr { + _ if attr.has_name(sym::lang) => (attr.value_str()?, attr.span), + _ if attr.has_name(sym::panic_handler) => (sym::panic_impl, attr.span), + _ => return None, + }) + }); + if let Some((name, attr_span)) = attrs { + match LangItem::from_name(name) { + // Known lang item + Some(lang_item) => { + if actual_target != lang_item.target() { + // `#[panic_handler]` is turned into `#[lang = "panic_impl"]`, but in contrast + // to the actual lang item attr, is applied to `Fn` instead of `ForeignFn`. + if !(lang_item.is_weak() + && actual_target == Target::Fn + && lang_item.target() == Target::ForeignFn + && matches!(lang_item, LangItem::PanicImpl)) + { + self.r.tcx + .dcx() + .delayed_bug(format!("lang item target is checked in attribute parser: {:?} has {} but expected {}", def_id, actual_target, lang_item.target())); + return; + } + } + // Weak lang items are handled separately + if lang_item.is_weak() && actual_target == Target::ForeignFn { + self.r.lang_items.missing.push(lang_item); + } else { + // Weak only lang items are always handled here + self.collect_item_extended( + lang_item, + def_id, + item_span, + attr_span, + generics, + actual_target, + ); + } + } + // Unknown lang item. + _ => { + self.r.tcx.dcx().delayed_bug("unknown lang item"); + } + } + } + } + + // Like collect_item() above, but also checks whether the lang item is declared + // with the right number of generic arguments. + fn collect_item_extended( + &mut self, + lang_item: LangItem, + item_def_id: LocalDefId, + item_span: Span, + attr_span: Span, + generics: Option<&ast::Generics>, + target: Target, + ) { + let name = lang_item.name(); + + if let Some(generics) = generics { + // Now check whether the lang_item has the expected number of generic + // arguments. Generally speaking, binary and indexing operations have + // one (for the RHS/index), unary operations have none, the closure + // traits have one for the argument list, coroutines have one for the + // resume argument, and ordering/equality relations have one for the RHS + // Some other types like Box and various unsizing-related traits + // have minimum requirements. + + // FIXME: This still doesn't count, e.g., elided lifetimes and APITs. + let mut actual_num = generics.params.len(); + if target.is_associated_item() { + for rib in self.ribs.type_ns.iter().rev() { + match rib.kind { + RibKind::Item(_, _) => { + actual_num += rib.bindings.len(); + break; + } + _ => {} + } + } + } + + let mut at_least = false; + let required = match lang_item.required_generics() { + GenericRequirement::Exact(num) if num != actual_num => Some(num), + GenericRequirement::Minimum(num) if actual_num < num => { + at_least = true; + Some(num) + } + // If the number matches, or there is no requirement, handle it normally + _ => None, + }; + + if let Some(num) = required { + // We are issuing E0718 "incorrect target" here, because while the + // item kind of the target is correct, the target is still wrong + // because of the wrong number of generic arguments. + self.r.tcx.dcx().emit_err(IncorrectTarget { + span: attr_span, + generics_span: generics.span, + name: name.as_str(), + kind: target.name(), + num, + actual_num, + at_least, + }); + + // return early to not collect the lang item + return; + } + } + + if self.r.tcx.crate_types().contains(&CrateType::Sdylib) { + self.r.tcx.dcx().emit_err(IncorrectCrateType { span: attr_span }); + } + + collect_item( + self.r.tcx, + &mut self.r.lang_items, + lang_item, + item_def_id.to_def_id(), + Some(item_span), + ); + } +} + +pub(crate) fn collect_item( + tcx: TyCtxt<'_>, + lang_items: &mut LanguageItems, + lang_item: LangItem, + item_def_id: DefId, + item_span: Option, +) { + // Check for duplicates. + if let Some(original_def_id) = lang_items.get(lang_item) + && original_def_id != item_def_id + { + let (item_def_id, original_def_id, item_span) = if let Some(original_def_id) = + original_def_id.as_local() + && !item_def_id.is_local() + { + // The crate-local definitions are loaded before the upstream crate definitions, + // because we only know which crates are being loaded after the resolver is fully done. + // In that case we swap the order of the items to report it meaningfully to the user. + (original_def_id.to_def_id(), item_def_id, Some(tcx.source_span(original_def_id))) + } else { + (item_def_id, original_def_id, item_span) + }; + let lang_item_name = lang_item.name(); + let crate_name = tcx.crate_name(item_def_id.krate); + let mut dependency_of = None; + let is_local = item_def_id.is_local(); + let path = if is_local { + String::new() + } else { + tcx.crate_extern_paths(item_def_id.krate) + .iter() + .map(|p| p.display().to_string()) + .collect::>() + .join(", ") + }; + + let mut orig_crate_name = None; + let mut orig_dependency_of = None; + let orig_is_local = original_def_id.is_local(); + let orig_path = if orig_is_local { + String::new() + } else { + tcx.crate_extern_paths(original_def_id.krate) + .iter() + .map(|p| p.display().to_string()) + .collect::>() + .join(", ") + }; + + if !original_def_id.is_local() { + orig_crate_name = Some(tcx.crate_name(original_def_id.krate)); + if let Some(ExternCrate { dependency_of: inner_dependency_of, .. }) = + tcx.extern_crate(original_def_id.krate) + { + orig_dependency_of = Some(tcx.crate_name(*inner_dependency_of)); + } + } + + let duplicate = if item_span.is_some() { + Duplicate::Plain + } else { + match tcx.extern_crate(item_def_id.krate) { + Some(ExternCrate { dependency_of: inner_dependency_of, .. }) => { + dependency_of = Some(tcx.crate_name(*inner_dependency_of)); + Duplicate::CrateDepends + } + _ => Duplicate::Crate, + } + }; + + // When there's a duplicate lang item, something went very wrong and there's no value + // in recovering or doing anything. Give the user the one message to let them debug the + // mess they created and then wish them farewell. + tcx.dcx().emit_fatal(DuplicateLangItem { + local_span: item_span, + lang_item_name, + crate_name, + dependency_of, + is_local, + path, + first_defined_span: original_def_id.as_local().map(|did| tcx.source_span(did)), + orig_crate_name, + orig_dependency_of, + orig_is_local, + orig_path, + duplicate, + }); + } else { + // Matched. + lang_items.set(lang_item, item_def_id); + } +} diff --git a/compiler/rustc_passes/src/weak_lang_items.rs b/compiler/rustc_resolve/src/late/weak_lang_items.rs similarity index 100% rename from compiler/rustc_passes/src/weak_lang_items.rs rename to compiler/rustc_resolve/src/late/weak_lang_items.rs diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs index 58d6b8005c787..0fc9c31f43e32 100644 --- a/compiler/rustc_resolve/src/lib.rs +++ b/compiler/rustc_resolve/src/lib.rs @@ -42,7 +42,7 @@ use rustc_ast::{ self as ast, AngleBracketedArg, CRATE_NODE_ID, Crate, DUMMY_NODE_ID, Expr, ExprKind, GenericArg, GenericArgs, Generics, NodeId, Path, attr, }; -use rustc_attr_ir::{StrippedCfgItem, find_attr}; +use rustc_attr_ir::{LanguageItems, StrippedCfgItem, find_attr}; use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexMap, FxIndexSet, default}; use rustc_data_structures::intern::Interned; use rustc_data_structures::steal::Steal; @@ -1601,6 +1601,8 @@ pub struct Resolver<'ra, 'tcx> { /// Stores `#[diagnostic::on_unknown]` attributes placed on module declarations. on_unknown_data: FxHashMap = default::fx_hash_map(), features: &'tcx Features, + + lang_items: LanguageItems, } /// This provides memory for the rest of the crate. The `'ra` lifetime that is @@ -1920,6 +1922,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { current_crate_outer_attr_insert_span, disambiguators: Default::default(), features: tcx.features(), + lang_items: LanguageItems::new(), .. }; @@ -1990,6 +1993,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { let confused_type_with_std_module = self.confused_type_with_std_module; let paths_matching_assoc_types = self.paths_matching_assoc_types; let effective_visibilities = self.effective_visibilities; + let lang_items = self.lang_items; let stripped_cfg_items = self .stripped_cfg_items @@ -2026,6 +2030,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { stripped_cfg_items, delegation_infos: self.delegation_infos, delegation_inherent_fn_map: self.delegation_inherent_fn_map, + lang_items, }; let ast_lowering = ResolverAstLowering { partial_res_map: self.partial_res_map, @@ -2119,6 +2124,8 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { self.tcx .sess .time("resolve_postprocess", || self.cstore_mut().postprocess(self.tcx, krate)); + + self.tcx.sess.time("finalize_lang_items", || self.finalize_lang_items()); }); // Don't mutate the cstore or stable crate id map from here on. @@ -2700,6 +2707,16 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { } self.main_def = Some(MainDefinition { res, is_import, span }); } + + fn finalize_lang_items(&mut self) { + // Collect lang items in other crates. + for &cnum in self.tcx.used_crates(()) { + for &(def_id, lang_item) in self.tcx.defined_lang_items(cnum).iter() { + late::collect_item(self.tcx, &mut self.lang_items, lang_item, def_id, None); + } + } + late::weak_lang_items::check_crate(self.tcx, &mut self.lang_items); + } } fn with_owner<'ra, 'tcx, R: AsMut>, T>( diff --git a/compiler/rustc_span/src/lib.rs b/compiler/rustc_span/src/lib.rs index 1e6f938ad2820..a8603678f6b0b 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_symbol_mangling/Cargo.toml b/compiler/rustc_symbol_mangling/Cargo.toml index 1e078015257d7..ffef3e42c1008 100644 --- a/compiler/rustc_symbol_mangling/Cargo.toml +++ b/compiler/rustc_symbol_mangling/Cargo.toml @@ -12,6 +12,7 @@ rustc_attr_ir = { path = "../rustc_attr_ir" } rustc_data_structures = { path = "../rustc_data_structures" } rustc_hashes = { path = "../rustc_hashes" } rustc_hir = { path = "../rustc_hir" } +rustc_macros = { path = "../rustc_macros" } rustc_middle = { path = "../rustc_middle" } rustc_session = { path = "../rustc_session" } rustc_span = { path = "../rustc_span" } diff --git a/compiler/rustc_symbol_mangling/src/legacy.rs b/compiler/rustc_symbol_mangling/src/legacy.rs index b95082d9dbe71..f9f3013ddd6c4 100644 --- a/compiler/rustc_symbol_mangling/src/legacy.rs +++ b/compiler/rustc_symbol_mangling/src/legacy.rs @@ -1,10 +1,11 @@ use std::fmt::{self, Write}; -use std::mem::{self, discriminant}; +use std::mem; use rustc_data_structures::stable_hash::{StableHash, StableHasher}; use rustc_hashes::Hash64; use rustc_hir::def_id::{CrateNum, DefId}; use rustc_hir::definitions::{DefPathData, DisambiguatedDefPathData}; +use rustc_macros::StableHash; use rustc_middle::ty::print::{PrettyPrinter, Print, PrintError, Printer}; use rustc_middle::ty::{ self, GenericArg, GenericArgKind, Instance, ReifyReason, Ty, TyCtxt, TypeVisitableExt, @@ -170,7 +171,22 @@ fn get_symbol_hash<'tcx>( // We want to avoid accidental collision between different types of instances. // Especially, `VTableShim`s and `ReifyShim`s may overlap with their original // instances without this. - discriminant(&instance.def).stable_hash(hcx, &mut hasher); + #[derive(StableHash)] + enum Tag { + Item, + Intrinsic, + LlvmIntrinsic, + Virtual, + Shim, + } + match instance.def { + ty::InstanceKind::Item(_) => Tag::Item, + ty::InstanceKind::Intrinsic(_) => Tag::Intrinsic, + ty::InstanceKind::LlvmIntrinsic(_) => Tag::LlvmIntrinsic, + ty::InstanceKind::Virtual(_, _) => Tag::Virtual, + ty::InstanceKind::Shim(_) => Tag::Shim, + } + .stable_hash(hcx, &mut hasher); }); // 64 bits should be enough to avoid collisions. diff --git a/compiler/rustc_trait_selection/src/solve/delegate.rs b/compiler/rustc_trait_selection/src/solve/delegate.rs index d1064ba03948d..6c248afc27ead 100644 --- a/compiler/rustc_trait_selection/src/solve/delegate.rs +++ b/compiler/rustc_trait_selection/src/solve/delegate.rs @@ -11,7 +11,7 @@ use rustc_hir::def_id::{CRATE_DEF_ID, DefId, LOCAL_CRATE}; use rustc_infer::infer::canonical::query_response::make_query_region_constraints; use rustc_infer::infer::canonical::{ Canonical, CanonicalExt as _, CanonicalQueryInput, CanonicalVarKind, CanonicalVarValues, - QueryRegionConstraint, + Canonicalized, QueryRegionConstraint, instantiate_value, }; use rustc_infer::infer::{InferCtxt, RegionVariableOrigin, SubregionOrigin, TyCtxtInferExt}; use rustc_infer::traits::solve::{ @@ -406,6 +406,13 @@ impl<'tcx> rustc_next_trait_solver::delegate::SolverDelegate for SolverDelegate< constraints } + fn instantiate_value(&self, value: Canonicalized, values: CanonicalVarValues<'tcx>) -> V + where + V: TypeFoldable>, + { + instantiate_value(self.tcx, &values, value.into_uninstantiated()) + } + fn instantiate_canonical( &self, canonical: Canonical<'tcx, V>, diff --git a/compiler/rustc_type_ir/src/canonical.rs b/compiler/rustc_type_ir/src/canonical.rs index fe3d68b0d5593..6cdfe02ae97c0 100644 --- a/compiler/rustc_type_ir/src/canonical.rs +++ b/compiler/rustc_type_ir/src/canonical.rs @@ -1,4 +1,5 @@ use std::fmt; +use std::ops::Index; use arrayvec::ArrayVec; use derive_where::derive_where; @@ -71,6 +72,10 @@ impl Canonical { let Canonical { max_universe, var_kinds, value } = self; Canonical { max_universe, var_kinds, value: map_op(value) } } + + pub fn project(self, f: impl FnOnce(V) -> W) -> Canonicalized { + Canonicalized(f(self.value)) + } } impl fmt::Display for Canonical { @@ -83,6 +88,31 @@ impl fmt::Display for Canonical { } } +/// A projection of a `Canonical`, as produced by `Canonical::project`. Useful as a marker when +/// dealing with fields within a `Canonical`, because it indicates that `T` may contain +/// canonical bound variables that must be instantiated before use. +/// +/// The field is private and the contents can only be accessed directly with `into_uninstantiated`, +/// which is easy to spot. +#[derive(Copy, Clone, Debug)] +pub struct Canonicalized(T); + +impl Canonicalized { + pub fn into_uninstantiated(self) -> T { + self.0 + } +} + +impl Canonicalized { + pub fn len(self) -> usize { + self.0.len() + } + + pub fn iter(self) -> impl Iterator> { + self.0.iter().map(|x| Canonicalized(x)) + } +} + /// Information about a canonical variable that is included with the /// canonical value. This is sufficient information for code to create /// a copy of the canonical value in some other inference context, @@ -267,6 +297,14 @@ impl CanonicalVarValues { } } +impl Index for CanonicalVarValues { + type Output = I::GenericArg; + + fn index(&self, value: ty::BoundVar) -> &I::GenericArg { + &self.var_values.as_slice()[value.as_usize()] + } +} + #[derive_where(Default; I: Interner)] pub struct CanonicalParamEnvCache( pub HashMap>, diff --git a/compiler/rustc_type_ir/src/macros.rs b/compiler/rustc_type_ir/src/macros.rs index 2fdbdec7ceb81..db2e597f8222a 100644 --- a/compiler/rustc_type_ir/src/macros.rs +++ b/compiler/rustc_type_ir/src/macros.rs @@ -79,6 +79,7 @@ TrivialTypeTraversalImpls! { crate::solve::BuiltinImplSource, crate::solve::Certainty, crate::solve::GoalSource, + crate::solve::IsIdentity, crate::solve::VisibleForLeakCheck, rustc_abi::ExternAbi, rustc_ast_ir::Mutability, diff --git a/compiler/rustc_type_ir/src/region_kind.rs b/compiler/rustc_type_ir/src/region_kind.rs index 5c14a5072910a..4b5712f09d234 100644 --- a/compiler/rustc_type_ir/src/region_kind.rs +++ b/compiler/rustc_type_ir/src/region_kind.rs @@ -4,7 +4,7 @@ use derive_where::derive_where; #[cfg(feature = "nightly")] use rustc_data_structures::stable_hash::{StableHash, StableHashCtxt, StableHasher}; #[cfg(feature = "nightly")] -use rustc_macros::{Decodable_NoContext, Encodable_NoContext}; +use rustc_macros::{Decodable_NoContext, Encodable_NoContext, StableHash}; use rustc_type_ir_macros::GenericTypeVisitable; use self::RegionKind::*; @@ -226,22 +226,38 @@ where { #[inline] fn stable_hash(&self, hcx: &mut Hcx, hasher: &mut StableHasher) { - std::mem::discriminant(self).stable_hash(hcx, hasher); + #[derive(StableHash)] + enum Tag { + ReErased, + ReStatic, + ReError, + ReBound, + ReEarlyParam, + ReLateParam, + RePlaceholder, + } + match self { - ReErased | ReStatic | ReError(_) => { - // No variant fields to hash for these ... - } + // No variant fields to hash for these ... + ReErased => Tag::ReErased.stable_hash(hcx, hasher), + ReStatic => Tag::ReStatic.stable_hash(hcx, hasher), + ReError(_) => Tag::ReError.stable_hash(hcx, hasher), + ReBound(d, r) => { + Tag::ReBound.stable_hash(hcx, hasher); d.stable_hash(hcx, hasher); r.stable_hash(hcx, hasher); } ReEarlyParam(r) => { + Tag::ReEarlyParam.stable_hash(hcx, hasher); r.stable_hash(hcx, hasher); } ReLateParam(r) => { + Tag::ReLateParam.stable_hash(hcx, hasher); r.stable_hash(hcx, hasher); } RePlaceholder(r) => { + Tag::RePlaceholder.stable_hash(hcx, hasher); r.stable_hash(hcx, hasher); } ReVar(_) => { diff --git a/compiler/rustc_type_ir/src/solve/mod.rs b/compiler/rustc_type_ir/src/solve/mod.rs index 55fb628e1ee3e..53afc311cc623 100644 --- a/compiler/rustc_type_ir/src/solve/mod.rs +++ b/compiler/rustc_type_ir/src/solve/mod.rs @@ -582,63 +582,68 @@ pub enum FetchEligibleAssocItemResponse { NotFoundBecauseErased, } +/// The variant order here matters for the `PartialOrd`/`Ord` impls. +#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[cfg_attr(feature = "nightly", derive(StableHash_NoContext))] +pub enum IsIdentity { + No, + ModuloRegions, + Yes, +} + #[derive_where(Clone, Copy, Hash, PartialEq, Debug; I: Interner)] #[derive(TypeVisitable_Generic, GenericTypeVisitable, TypeFoldable_Generic)] #[cfg_attr(feature = "nightly", derive(StableHash_NoContext))] pub struct Response { pub certainty: Certainty, pub var_values: I::GenericArgs, + /// Is `var_values` an identity? + pub var_values_is_identity: IsIdentity, /// Additional constraints returned by this query. pub external_constraints: I::ExternalConstraints, } impl Response { - pub fn is_identity(&self) -> bool { - self.var_values.iter().enumerate().all(|(bv, arg)| match arg.kind() { - ty::GenericArgKind::Lifetime(r) => { - matches!(r.kind(), ty::ReBound(ty::BoundVarIndexKind::Canonical, br) if br.var().as_usize() == bv) - } - ty::GenericArgKind::Type(ty) => { - matches!(ty.kind(), ty::Bound(ty::BoundVarIndexKind::Canonical, bt) if bt.var().as_usize() == bv) - } - ty::GenericArgKind::Const(ct) => { - matches!(ct.kind(), ty::ConstKind::Bound(ty::BoundVarIndexKind::Canonical, bc) if bc.var().as_usize() == bv) - } - }) - } + pub fn update_var_values_is_identity(&mut self) { + // We start optimistic and downgrade if necessary along the way. + self.var_values_is_identity = IsIdentity::Yes; - pub fn is_identity_modulo_regions(&self) -> bool { - let mut var = ty::BoundVar::ZERO; + let mut bv = ty::BoundVar::ZERO; for arg in self.var_values.iter() { match arg.kind() { ty::GenericArgKind::Lifetime(r) => { - if matches!(r.kind(), ty::ReBound(ty::BoundVarIndexKind::Canonical, br) if var == br.var()) + if let ty::ReBound(ty::BoundVarIndexKind::Canonical, br) = r.kind() + && bv == br.var() { - var = var + 1; + bv = bv + 1; } else { - // It's ok if this region var isn't an identity variable + // If this region var isn't an identity variable we can't be + // `IsIdentity::Yes`, but we can still be `IsIdentity::ModuloRegions`. + self.var_values_is_identity = IsIdentity::ModuloRegions; } } ty::GenericArgKind::Type(ty) => { - if matches!(ty.kind(), ty::Bound(ty::BoundVarIndexKind::Canonical, bt) if var == bt.var()) + if let ty::Bound(ty::BoundVarIndexKind::Canonical, bt) = ty.kind() + && bv == bt.var() { - var = var + 1; + bv = bv + 1; } else { - return false; + self.var_values_is_identity = IsIdentity::No; + break; } } ty::GenericArgKind::Const(ct) => { - if matches!(ct.kind(), ty::ConstKind::Bound(ty::BoundVarIndexKind::Canonical, bc) if var == bc.var()) + if let ty::ConstKind::Bound(ty::BoundVarIndexKind::Canonical, bc) = ct.kind() + && bv == bc.var() { - var = var + 1; + bv = bv + 1; } else { - return false; + self.var_values_is_identity = IsIdentity::No; + break; } } } } - - true } } diff --git a/compiler/rustc_type_ir/src/ty_kind.rs b/compiler/rustc_type_ir/src/ty_kind.rs index e996f6684515a..77d8ea006972a 100644 --- a/compiler/rustc_type_ir/src/ty_kind.rs +++ b/compiler/rustc_type_ir/src/ty_kind.rs @@ -8,7 +8,7 @@ use rustc_ast_ir::Mutability; #[cfg(feature = "nightly")] use rustc_data_structures::stable_hash::{StableHash, StableHashCtxt, StableHasher}; #[cfg(feature = "nightly")] -use rustc_macros::{Decodable_NoContext, Encodable_NoContext, StableHash_NoContext}; +use rustc_macros::{Decodable_NoContext, Encodable_NoContext, StableHash, StableHash_NoContext}; use rustc_type_ir::data_structures::{NoError, UnifyKey, UnifyValue}; use rustc_type_ir_macros::{ GenericTypeVisitable, Lift_Generic, TypeFoldable_Generic, TypeVisitable_Generic, @@ -857,12 +857,31 @@ impl UnifyKey for FloatVid { impl StableHash for InferTy { fn stable_hash(&self, hcx: &mut Hcx, hasher: &mut StableHasher) { use InferTy::*; - std::mem::discriminant(self).stable_hash(hcx, hasher); + + #[derive(StableHash)] + enum Tag { + FreshTy, + FreshIntTy, + FreshFloatTy, + } + match self { TyVar(_) | IntVar(_) | FloatVar(_) => { panic!("type variables should not be hashed: {self:?}") } - FreshTy(v) | FreshIntTy(v) | FreshFloatTy(v) => v.stable_hash(hcx, hasher), + + FreshTy(v) => { + Tag::FreshTy.stable_hash(hcx, hasher); + v.stable_hash(hcx, hasher); + } + FreshIntTy(v) => { + Tag::FreshIntTy.stable_hash(hcx, hasher); + v.stable_hash(hcx, hasher); + } + FreshFloatTy(v) => { + Tag::FreshFloatTy.stable_hash(hcx, hasher); + v.stable_hash(hcx, hasher); + } } } } diff --git a/library/core/src/fmt/mod.rs b/library/core/src/fmt/mod.rs index a9af7e00b1d5f..51ba40e50ae08 100644 --- a/library/core/src/fmt/mod.rs +++ b/library/core/src/fmt/mod.rs @@ -9,7 +9,7 @@ use crate::marker::{PhantomData, PointeeSized}; use crate::num::imp::fmt as numfmt; use crate::ops::Deref; use crate::ptr::NonNull; -use crate::{iter, mem, result, str}; +use crate::{mem, result, str}; mod builders; #[cfg(not(no_fp_fmt_parse))] @@ -2496,14 +2496,10 @@ impl<'a> Formatter<'a> { /// faster for 1 field. #[doc(hidden)] #[unstable(feature = "fmt_helpers_for_derive", issue = "none")] - pub fn debug_struct_field1_finish<'b>( - &'b mut self, - name: &str, - name1: &str, - value1: &dyn Debug, - ) -> Result { - let mut builder = builders::debug_struct_new(self, name); - builder.field(name1, value1); + pub fn debug_struct_field1_finish<'b>(&'b mut self, names: &str, value1: &dyn Debug) -> Result { + let mut names = names.split(' '); + let mut builder = builders::debug_struct_new(self, names.next().unwrap()); + builder.field(names.next().unwrap(), value1); builder.finish() } @@ -2514,15 +2510,14 @@ impl<'a> Formatter<'a> { #[unstable(feature = "fmt_helpers_for_derive", issue = "none")] pub fn debug_struct_field2_finish<'b>( &'b mut self, - name: &str, - name1: &str, + names: &str, value1: &dyn Debug, - name2: &str, value2: &dyn Debug, ) -> Result { - let mut builder = builders::debug_struct_new(self, name); - builder.field(name1, value1); - builder.field(name2, value2); + let mut names = names.split(' '); + let mut builder = builders::debug_struct_new(self, names.next().unwrap()); + builder.field(names.next().unwrap(), value1); + builder.field(names.next().unwrap(), value2); builder.finish() } @@ -2533,18 +2528,16 @@ impl<'a> Formatter<'a> { #[unstable(feature = "fmt_helpers_for_derive", issue = "none")] pub fn debug_struct_field3_finish<'b>( &'b mut self, - name: &str, - name1: &str, + names: &str, value1: &dyn Debug, - name2: &str, value2: &dyn Debug, - name3: &str, value3: &dyn Debug, ) -> Result { - let mut builder = builders::debug_struct_new(self, name); - builder.field(name1, value1); - builder.field(name2, value2); - builder.field(name3, value3); + let mut names = names.split(' '); + let mut builder = builders::debug_struct_new(self, names.next().unwrap()); + builder.field(names.next().unwrap(), value1); + builder.field(names.next().unwrap(), value2); + builder.field(names.next().unwrap(), value3); builder.finish() } @@ -2555,21 +2548,18 @@ impl<'a> Formatter<'a> { #[unstable(feature = "fmt_helpers_for_derive", issue = "none")] pub fn debug_struct_field4_finish<'b>( &'b mut self, - name: &str, - name1: &str, + names: &str, value1: &dyn Debug, - name2: &str, value2: &dyn Debug, - name3: &str, value3: &dyn Debug, - name4: &str, value4: &dyn Debug, ) -> Result { - let mut builder = builders::debug_struct_new(self, name); - builder.field(name1, value1); - builder.field(name2, value2); - builder.field(name3, value3); - builder.field(name4, value4); + let mut names = names.split(' '); + let mut builder = builders::debug_struct_new(self, names.next().unwrap()); + builder.field(names.next().unwrap(), value1); + builder.field(names.next().unwrap(), value2); + builder.field(names.next().unwrap(), value3); + builder.field(names.next().unwrap(), value4); builder.finish() } @@ -2580,40 +2570,37 @@ impl<'a> Formatter<'a> { #[unstable(feature = "fmt_helpers_for_derive", issue = "none")] pub fn debug_struct_field5_finish<'b>( &'b mut self, - name: &str, - name1: &str, + names: &str, value1: &dyn Debug, - name2: &str, value2: &dyn Debug, - name3: &str, value3: &dyn Debug, - name4: &str, value4: &dyn Debug, - name5: &str, value5: &dyn Debug, ) -> Result { - let mut builder = builders::debug_struct_new(self, name); - builder.field(name1, value1); - builder.field(name2, value2); - builder.field(name3, value3); - builder.field(name4, value4); - builder.field(name5, value5); + let mut names = names.split(' '); + let mut builder = builders::debug_struct_new(self, names.next().unwrap()); + builder.field(names.next().unwrap(), value1); + builder.field(names.next().unwrap(), value2); + builder.field(names.next().unwrap(), value3); + builder.field(names.next().unwrap(), value4); + builder.field(names.next().unwrap(), value5); builder.finish() } /// Shrinks `derive(Debug)` code, for faster compilation and smaller binaries. /// For the cases not covered by `debug_struct_field[12345]_finish`. + /// Field names should be separated by space. #[doc(hidden)] #[unstable(feature = "fmt_helpers_for_derive", issue = "none")] pub fn debug_struct_fields_finish<'b>( &'b mut self, - name: &str, - names: &[&str], + names: &str, values: &[&dyn Debug], ) -> Result { - assert_eq!(names.len(), values.len()); - let mut builder = builders::debug_struct_new(self, name); - for (name, value) in iter::zip(names, values) { + let mut names = names.split(' '); + let mut builder = builders::debug_struct_new(self, names.next().unwrap()); + for value in values.into_iter() { + let name = names.next().unwrap(); builder.field(name, value); } builder.finish() 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/tests/codegen-llvm/remap_path_prefix/main.rs b/tests/codegen-llvm/remap_path_prefix/main.rs index 7d17b3b67cfa2..27ce99e0b590e 100644 --- a/tests/codegen-llvm/remap_path_prefix/main.rs +++ b/tests/codegen-llvm/remap_path_prefix/main.rs @@ -12,7 +12,7 @@ mod aux_mod; include!("aux_mod.rs"); // Here we check that the expansion of the file!() macro is mapped. -// CHECK: @alloc_5761061597a97f66e13ef2ff92712c4b = private unnamed_addr constant [34 x i8] c"/the/src/remap_path_prefix/main.rs" +// CHECK: @alloc_{{([0-9a-f]{32})}} = private unnamed_addr constant [34 x i8] c"/the/src/remap_path_prefix/main.rs" pub static FILE_PATH: &'static str = file!(); fn main() { diff --git a/tests/debuginfo/function-names.rs b/tests/debuginfo/function-names.rs index 38921743130f0..ff30ea6a7040d 100644 --- a/tests/debuginfo/function-names.rs +++ b/tests/debuginfo/function-names.rs @@ -39,7 +39,7 @@ // Const generic parameter //@ gdb-command:info functions -q function_names::const_generic_fn.* //@ gdb-check:[...]static fn function_names::const_generic_fn_bool(); -//@ gdb-check:[...]static fn function_names::const_generic_fn_non_int<{CONST#68cf9e429c783d36}>(); +//@ gdb-check:[...]static fn function_names::const_generic_fn_non_int<{CONST#[...]}>(); //@ gdb-check:[...]static fn function_names::const_generic_fn_signed_int<-7>(); //@ gdb-check:[...]static fn function_names::const_generic_fn_unsigned_int<14>(); diff --git a/tests/ui-fulldeps/auxiliary/parser.rs b/tests/ui-fulldeps/auxiliary/parser.rs index 6ee39e5130f68..09ffa9df1c867 100644 --- a/tests/ui-fulldeps/auxiliary/parser.rs +++ b/tests/ui-fulldeps/auxiliary/parser.rs @@ -11,12 +11,11 @@ use rustc_ast::ast::{AttrKind, Attribute, DUMMY_NODE_ID, Expr}; use rustc_ast::mut_visit::{self, MutVisitor}; use rustc_ast::node_id::NodeId; use rustc_ast::token; -use rustc_ast::tokenstream::{AttrTokenStream, AttrTokenTree, LazyAttrTokenStream}; +use rustc_ast::tokenstream::{DelimSpan, LazyTokenStream, TokenStream, TokenTree}; use rustc_errors::Diag; use rustc_parse::parser::Recovery; use rustc_session::parse::ParseSess; use rustc_span::{AttrId, DUMMY_SP, FileName, Span}; -use std::sync::Arc; pub fn parse_expr(psess: &ParseSess, source_code: &str) -> Option> { let parser = rustc_parse::unwrap_or_emit_fatal(rustc_parse::new_parser_from_source_str( @@ -53,31 +52,32 @@ impl MutVisitor for Normalize { attr.id = AttrId::from_u32(0); if let AttrKind::Normal(normal_attr) = &mut attr.kind { if let Some(tokens) = &mut normal_attr.tokens { - let mut stream = tokens.to_attr_token_stream(); - normalize_attr_token_stream(&mut stream); - *tokens = LazyAttrTokenStream::new_direct(stream); + let stream = normalize_token_stream(&tokens.to_token_stream()); + *tokens = LazyTokenStream::new_direct(stream); } } mut_visit::walk_attribute(self, attr); } } -fn normalize_attr_token_stream(stream: &mut AttrTokenStream) { - Arc::make_mut(&mut stream.0) - .iter_mut() - .for_each(normalize_attr_token_tree); +fn normalize_token_stream(stream: &TokenStream) -> TokenStream { + TokenStream::new(stream.iter().map(normalize_token_tree).collect()) } -fn normalize_attr_token_tree(token: &mut AttrTokenTree) { - match token { - AttrTokenTree::Token(token, _spacing) => { +fn normalize_token_tree(tt: &TokenTree) -> TokenTree { + match tt { + TokenTree::Token(token, spacing) => { + let mut token = *token; Normalize.visit_span(&mut token.span); + TokenTree::Token(token, *spacing) } - AttrTokenTree::Delimited(dspan, _spacing, _delim, stream) => { - normalize_attr_token_stream(stream); - Normalize.visit_span(&mut dspan.open); - Normalize.visit_span(&mut dspan.close); + TokenTree::Delimited(_dspan, spacing, delim, stream) => { + TokenTree::Delimited( + DelimSpan::dummy(), + *spacing, + *delim, + normalize_token_stream(stream), + ) } - AttrTokenTree::AttrsTarget(_) => unimplemented!("AttrTokenTree::AttrsTarget"), } } diff --git a/tests/ui/coercion/coerce-reborrow-multi-arg-fail.stderr b/tests/ui/coercion/coerce-reborrow-multi-arg-fail.stderr index 5dea3f70fdb5f..e118ffc1af7e3 100644 --- a/tests/ui/coercion/coerce-reborrow-multi-arg-fail.stderr +++ b/tests/ui/coercion/coerce-reborrow-multi-arg-fail.stderr @@ -7,8 +7,8 @@ LL | test(&mut 7, &7); | | expected all arguments to be this `&mut {integer}` type because they need to match the type of this parameter | arguments to this function are incorrect | - = note: expected mutable reference `&mut {integer}` - found reference `&{integer}` + = note: expected mutable reference `&mut _` + found reference `&_` note: function defined here --> $DIR/coerce-reborrow-multi-arg-fail.rs:1:4 | @@ -17,6 +17,10 @@ LL | fn test(_a: T, _b: T) {} | | | | | `_b` needs to match the `&mut {integer}` type of this parameter | `_a` and `_b` both reference this parameter `T` +help: consider using `&mut` instead + | +LL | test(&mut 7, &mut 7); + | +++ error: aborting due to 1 previous error diff --git a/tests/ui/derives/debug/derive-debug.rs b/tests/ui/derives/debug/derive-debug.rs index e4e377dd90d13..63ccf8457e8c5 100644 --- a/tests/ui/derives/debug/derive-debug.rs +++ b/tests/ui/derives/debug/derive-debug.rs @@ -9,6 +9,16 @@ struct Tuple(isize, usize); #[derive(Debug)] struct Struct { x: isize, y: usize } +#[derive(Debug)] +struct BigStruct { + a: isize, + best: usize, + c: u64, + d: u32, + estimate: u8, + f: i8 +} + #[derive(Debug)] enum Enum { Nullary, @@ -29,6 +39,8 @@ pub fn main() { t!(Unit, "Unit"); t!(Tuple(1, 2), "Tuple(1, 2)"); t!(Struct { x: 1, y: 2 }, "Struct { x: 1, y: 2 }"); + t!(BigStruct { a: 1, best: 2, c: 3, d: 4, estimate: 5, f: 6 }, + "BigStruct { a: 1, best: 2, c: 3, d: 4, estimate: 5, f: 6 }"); t!(Enum::Nullary, "Nullary"); t!(Enum::Variant(1, 2), "Variant(1, 2)"); t!(Enum::StructVariant { x: 1, y: 2 }, "StructVariant { x: 1, y: 2 }"); diff --git a/tests/ui/derives/deriving-all-codegen.stdout b/tests/ui/derives/deriving-all-codegen.stdout index 94603a91547c1..3d95302659c4d 100644 --- a/tests/ui/derives/deriving-all-codegen.stdout +++ b/tests/ui/derives/deriving-all-codegen.stdout @@ -101,8 +101,8 @@ impl ::core::marker::Copy for Point { } impl ::core::fmt::Debug for Point { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish(f, "Point", "x", - &self.x, "y", &&self.y) + ::core::fmt::Formatter::debug_struct_field2_finish(f, "Point x y", + &self.x, &&self.y) } } #[automatically_derived] @@ -185,8 +185,8 @@ impl ::core::marker::Copy for PackedPoint { } impl ::core::fmt::Debug for PackedPoint { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish(f, "PackedPoint", - "x", &{ self.x }, "y", &&{ self.y }) + ::core::fmt::Formatter::debug_struct_field2_finish(f, + "PackedPoint x y", &{ self.x }, &&{ self.y }) } } #[automatically_derived] @@ -338,8 +338,8 @@ impl ::core::marker::Copy for SingleField { } impl ::core::fmt::Debug for SingleField { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish(f, "SingleField", - "foo", &&self.foo) + ::core::fmt::Formatter::debug_struct_field1_finish(f, + "SingleField foo", &&self.foo) } } #[automatically_derived] @@ -422,13 +422,11 @@ impl ::core::marker::Copy for Big { } impl ::core::fmt::Debug for Big { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { - let names: &'static _ = - &["b1", "b2", "b3", "b4", "b5", "b6", "b7", "b8"]; + let names: &'static _ = "Big b1 b2 b3 b4 b5 b6 b7 b8"; let values: &[&dyn ::core::fmt::Debug] = &[&self.b1, &self.b2, &self.b3, &self.b4, &self.b5, &self.b6, &self.b7, &&self.b8]; - ::core::fmt::Formatter::debug_struct_fields_finish(f, "Big", names, - values) + ::core::fmt::Formatter::debug_struct_fields_finish(f, names, values) } } #[automatically_derived] @@ -751,8 +749,8 @@ impl ::core::fmt::Debug for Generic where T::A: ::core::fmt::Debug { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field3_finish(f, "Generic", "t", - &self.t, "ta", &self.ta, "u", &&self.u) + ::core::fmt::Formatter::debug_struct_field3_finish(f, + "Generic t ta u", &self.t, &self.ta, &&self.u) } } #[automatically_derived] @@ -1040,7 +1038,7 @@ impl ::core::fmt::Debug for Enum1 { match self { Self::Single { x: __self_0 } => ::core::fmt::Formatter::debug_struct_field1_finish(f, - "Single", "x", &__self_0), + "Single x", &__self_0), } } } @@ -1306,8 +1304,8 @@ impl ::core::fmt::Debug for Mixed { ::core::fmt::Formatter::debug_tuple_field1_finish(f, "R", &__self_0), Self::S { d1: __self_0, d2: __self_1 } => - ::core::fmt::Formatter::debug_struct_field2_finish(f, "S", - "d1", __self_0, "d2", &__self_1), + ::core::fmt::Formatter::debug_struct_field2_finish(f, + "S d1 d2", __self_0, &__self_1), } } } diff --git a/tests/ui/lang-items/issue-83471.stderr b/tests/ui/lang-items/issue-83471.stderr index ffc48accdd917..49b3bfe84dc61 100644 --- a/tests/ui/lang-items/issue-83471.stderr +++ b/tests/ui/lang-items/issue-83471.stderr @@ -1,3 +1,12 @@ +error[E0718]: `fn` lang item must be applied to a trait with 1 generic argument + --> $DIR/issue-83471.rs:20:1 + | +LL | #[lang = "fn"] + | ^^^^^^^^^^^^^^ +... +LL | trait Fn { + | - this trait has 0 generic arguments + error[E0573]: cannot find type `export_name` in this scope --> $DIR/issue-83471.rs:24:13 | @@ -16,15 +25,6 @@ LL | fn call(export_name); = note: for more information, see = note: `#[warn(anonymous_parameters)]` (part of `#[warn(rust_2018_compatibility)]`) on by default -error[E0718]: `fn` lang item must be applied to a trait with 1 generic argument - --> $DIR/issue-83471.rs:20:1 - | -LL | #[lang = "fn"] - | ^^^^^^^^^^^^^^ -... -LL | trait Fn { - | - this trait has 0 generic arguments - error[E0658]: lang items are subject to change --> $DIR/issue-83471.rs:8:3 | diff --git a/tests/ui/panic-handler/weak-lang-item.rs b/tests/ui/panic-handler/weak-lang-item.rs index 6c3a5b2b271c2..d43f80cc55d6f 100644 --- a/tests/ui/panic-handler/weak-lang-item.rs +++ b/tests/ui/panic-handler/weak-lang-item.rs @@ -1,6 +1,8 @@ //@ edition:2015 //@ aux-build:weak-lang-items.rs //@ needs-unwind since it affects the error output +//~? ERROR: `#[panic_handler]` function required +//~? ERROR: unwinding panics are not supported without std #![no_std] diff --git a/tests/ui/panic-handler/weak-lang-item.stderr b/tests/ui/panic-handler/weak-lang-item.stderr index d7b453c96e488..5dcb37df68921 100644 --- a/tests/ui/panic-handler/weak-lang-item.stderr +++ b/tests/ui/panic-handler/weak-lang-item.stderr @@ -1,5 +1,5 @@ error[E0259]: the name `core` is defined multiple times - --> $DIR/weak-lang-item.rs:7:1 + --> $DIR/weak-lang-item.rs:9:1 | LL | extern crate core; | ^^^^^^^^^^^^^^^^^^ `core` reimported here @@ -10,6 +10,13 @@ help: you can use `as` to change the binding name of the import LL | extern crate core as other_core; | +++++++++++++ -error: aborting due to 1 previous error +error: `#[panic_handler]` function required, but not found + +error: unwinding panics are not supported without std + | + = help: using nightly cargo, use -Zbuild-std with panic="abort" to avoid unwinding + = note: since the core library is usually precompiled with panic="unwind", rebuilding your crate with panic="abort" may not be enough to fix the problem + +error: aborting due to 3 previous errors For more information about this error, try `rustc --explain E0259`. diff --git a/tests/ui/stats/macro-stats.stderr b/tests/ui/stats/macro-stats.stderr index e4f5a95ac7fad..4806b3ad82c90 100644 --- a/tests/ui/stats/macro-stats.stderr +++ b/tests/ui/stats/macro-stats.stderr @@ -8,8 +8,8 @@ macro-stats q! 1 26 26.0 macro-stats #[derive(Ord)] 1 14 14.0 504 504.0 macro-stats #[derive(Default)] 2 14 7.0 405 202.5 macro-stats #[derive(Eq)] 1 10 10.0 311 311.0 -macro-stats #[derive(Debug)] 1 7 7.0 276 276.0 macro-stats #[derive(PartialEq)] 1 7 7.0 267 267.0 +macro-stats #[derive(Debug)] 1 7 7.0 267 267.0 macro-stats #[derive(PartialOrd)] 1 7 7.0 255 255.0 macro-stats #[derive(Copy)] 1 1 1.0 60 60.0 macro-stats p! 1 3 3.0 32 32.0