Skip to content

Commit 6b6718a

Browse files
authored
Unrolled build for #143642
Rollup merge of #143642 - Kobzol:stdarch-push, r=Amanieu stdarch subtree update Subtree update of `stdarch` to rust-lang/stdarch@b262a9a. Created using https://github.com/rust-lang/josh-sync. r? ```@ghost```
2 parents 2a023bf + a310bdd commit 6b6718a

File tree

31 files changed

+243
-455
lines changed

31 files changed

+243
-455
lines changed

library/stdarch/Cargo.lock

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"
147147
name = "core_arch"
148148
version = "0.1.5"
149149
dependencies = [
150-
"std_detect",
151150
"stdarch-test",
152151
"syscalls",
153152
]

library/stdarch/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,9 @@ This repository contains two main crates:
1616

1717
The `std::simd` component now lives in the
1818
[`packed_simd_2`](https://github.com/rust-lang/packed_simd) crate.
19+
20+
## Synchronizing josh subtree with rustc
21+
22+
This repository is linked to `rust-lang/rust` as a [josh](https://josh-project.github.io/josh/intro.html) subtree. You can use the [rustc-josh-sync](https://github.com/rust-lang/josh-sync) tool to perform synchronization.
23+
24+
You can find a guide on how to perform the synchronization [here](https://rustc-dev-guide.rust-lang.org/external-repos.html#synchronizing-a-josh-subtree).

library/stdarch/crates/core_arch/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ maintenance = { status = "experimental" }
2222

2323
[dev-dependencies]
2424
stdarch-test = { version = "0.*", path = "../stdarch-test" }
25-
std_detect = { version = "0.*", path = "../std_detect" }
2625

2726
[target.'cfg(all(target_arch = "x86_64", target_os = "linux"))'.dev-dependencies]
2827
syscalls = { version = "0.6.18", default-features = false }

library/stdarch/crates/core_arch/src/aarch64/neon/generated.rs

Lines changed: 18 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -7925,7 +7925,7 @@ pub fn vcvth_f16_u64(a: u64) -> f16 {
79257925
#[unstable(feature = "stdarch_neon_f16", issue = "136306")]
79267926
pub fn vcvth_n_f16_s16<const N: i32>(a: i16) -> f16 {
79277927
static_assert!(N >= 1 && N <= 16);
7928-
vcvth_n_f16_s32::<N>(a as i32) as f16
7928+
vcvth_n_f16_s32::<N>(a as i32)
79297929
}
79307930
#[doc = "Fixed-point convert to floating-point"]
79317931
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vcvth_n_f16_s32)"]
@@ -7972,7 +7972,7 @@ pub fn vcvth_n_f16_s64<const N: i32>(a: i64) -> f16 {
79727972
#[unstable(feature = "stdarch_neon_f16", issue = "136306")]
79737973
pub fn vcvth_n_f16_u16<const N: i32>(a: u16) -> f16 {
79747974
static_assert!(N >= 1 && N <= 16);
7975-
vcvth_n_f16_u32::<N>(a as u32) as f16
7975+
vcvth_n_f16_u32::<N>(a as u32)
79767976
}
79777977
#[doc = "Fixed-point convert to floating-point"]
79787978
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vcvth_n_f16_u32)"]
@@ -17158,7 +17158,7 @@ pub fn vqdmlalh_s16(a: i32, b: i16, c: i16) -> i32 {
1715817158
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
1715917159
pub fn vqdmlals_s32(a: i64, b: i32, c: i32) -> i64 {
1716017160
let x: i64 = vqaddd_s64(a, vqdmulls_s32(b, c));
17161-
x as i64
17161+
x
1716217162
}
1716317163
#[doc = "Signed saturating doubling multiply-subtract long"]
1716417164
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vqdmlsl_high_lane_s16)"]
@@ -17324,7 +17324,7 @@ pub fn vqdmlslh_s16(a: i32, b: i16, c: i16) -> i32 {
1732417324
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
1732517325
pub fn vqdmlsls_s32(a: i64, b: i32, c: i32) -> i64 {
1732617326
let x: i64 = vqsubd_s64(a, vqdmulls_s32(b, c));
17327-
x as i64
17327+
x
1732817328
}
1732917329
#[doc = "Vector saturating doubling multiply high by scalar"]
1733017330
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vqdmulh_lane_s16)"]
@@ -19495,10 +19495,7 @@ pub fn vqtbl1q_s8(a: int8x16_t, b: uint8x16_t) -> int8x16_t {
1949519495
#[cfg_attr(test, assert_instr(tbl))]
1949619496
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
1949719497
pub fn vqtbl1_u8(a: uint8x16_t, b: uint8x8_t) -> uint8x8_t {
19498-
unsafe {
19499-
let x = transmute(vqtbl1(transmute(a), b));
19500-
x
19501-
}
19498+
unsafe { transmute(vqtbl1(transmute(a), b)) }
1950219499
}
1950319500
#[doc = "Table look-up"]
1950419501
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vqtbl1q_u8)"]
@@ -19507,10 +19504,7 @@ pub fn vqtbl1_u8(a: uint8x16_t, b: uint8x8_t) -> uint8x8_t {
1950719504
#[cfg_attr(test, assert_instr(tbl))]
1950819505
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
1950919506
pub fn vqtbl1q_u8(a: uint8x16_t, b: uint8x16_t) -> uint8x16_t {
19510-
unsafe {
19511-
let x = transmute(vqtbl1q(transmute(a), b));
19512-
x
19513-
}
19507+
unsafe { transmute(vqtbl1q(transmute(a), b)) }
1951419508
}
1951519509
#[doc = "Table look-up"]
1951619510
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vqtbl1_p8)"]
@@ -19519,10 +19513,7 @@ pub fn vqtbl1q_u8(a: uint8x16_t, b: uint8x16_t) -> uint8x16_t {
1951919513
#[cfg_attr(test, assert_instr(tbl))]
1952019514
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
1952119515
pub fn vqtbl1_p8(a: poly8x16_t, b: uint8x8_t) -> poly8x8_t {
19522-
unsafe {
19523-
let x = transmute(vqtbl1(transmute(a), b));
19524-
x
19525-
}
19516+
unsafe { transmute(vqtbl1(transmute(a), b)) }
1952619517
}
1952719518
#[doc = "Table look-up"]
1952819519
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vqtbl1q_p8)"]
@@ -19531,10 +19522,7 @@ pub fn vqtbl1_p8(a: poly8x16_t, b: uint8x8_t) -> poly8x8_t {
1953119522
#[cfg_attr(test, assert_instr(tbl))]
1953219523
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
1953319524
pub fn vqtbl1q_p8(a: poly8x16_t, b: uint8x16_t) -> poly8x16_t {
19534-
unsafe {
19535-
let x = transmute(vqtbl1q(transmute(a), b));
19536-
x
19537-
}
19525+
unsafe { transmute(vqtbl1q(transmute(a), b)) }
1953819526
}
1953919527
#[doc = "Table look-up"]
1954019528
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vqtbl2)"]
@@ -20397,10 +20385,7 @@ pub fn vqtbx1q_s8(a: int8x16_t, b: int8x16_t, c: uint8x16_t) -> int8x16_t {
2039720385
#[cfg_attr(test, assert_instr(tbx))]
2039820386
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
2039920387
pub fn vqtbx1_u8(a: uint8x8_t, b: uint8x16_t, c: uint8x8_t) -> uint8x8_t {
20400-
unsafe {
20401-
let x = transmute(vqtbx1(transmute(a), transmute(b), c));
20402-
x
20403-
}
20388+
unsafe { transmute(vqtbx1(transmute(a), transmute(b), c)) }
2040420389
}
2040520390
#[doc = "Extended table look-up"]
2040620391
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vqtbx1q_u8)"]
@@ -20409,10 +20394,7 @@ pub fn vqtbx1_u8(a: uint8x8_t, b: uint8x16_t, c: uint8x8_t) -> uint8x8_t {
2040920394
#[cfg_attr(test, assert_instr(tbx))]
2041020395
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
2041120396
pub fn vqtbx1q_u8(a: uint8x16_t, b: uint8x16_t, c: uint8x16_t) -> uint8x16_t {
20412-
unsafe {
20413-
let x = transmute(vqtbx1q(transmute(a), transmute(b), c));
20414-
x
20415-
}
20397+
unsafe { transmute(vqtbx1q(transmute(a), transmute(b), c)) }
2041620398
}
2041720399
#[doc = "Extended table look-up"]
2041820400
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vqtbx1_p8)"]
@@ -20421,10 +20403,7 @@ pub fn vqtbx1q_u8(a: uint8x16_t, b: uint8x16_t, c: uint8x16_t) -> uint8x16_t {
2042120403
#[cfg_attr(test, assert_instr(tbx))]
2042220404
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
2042320405
pub fn vqtbx1_p8(a: poly8x8_t, b: poly8x16_t, c: uint8x8_t) -> poly8x8_t {
20424-
unsafe {
20425-
let x = transmute(vqtbx1(transmute(a), transmute(b), c));
20426-
x
20427-
}
20406+
unsafe { transmute(vqtbx1(transmute(a), transmute(b), c)) }
2042820407
}
2042920408
#[doc = "Extended table look-up"]
2043020409
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vqtbx1q_p8)"]
@@ -20433,10 +20412,7 @@ pub fn vqtbx1_p8(a: poly8x8_t, b: poly8x16_t, c: uint8x8_t) -> poly8x8_t {
2043320412
#[cfg_attr(test, assert_instr(tbx))]
2043420413
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
2043520414
pub fn vqtbx1q_p8(a: poly8x16_t, b: poly8x16_t, c: uint8x16_t) -> poly8x16_t {
20436-
unsafe {
20437-
let x = transmute(vqtbx1q(transmute(a), transmute(b), c));
20438-
x
20439-
}
20415+
unsafe { transmute(vqtbx1q(transmute(a), transmute(b), c)) }
2044020416
}
2044120417
#[doc = "Extended table look-up"]
2044220418
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vqtbx2)"]
@@ -23785,14 +23761,7 @@ pub fn vrndph_f16(a: f16) -> f16 {
2378523761
#[unstable(feature = "stdarch_neon_f16", issue = "136306")]
2378623762
#[cfg_attr(test, assert_instr(frintx))]
2378723763
pub fn vrndx_f16(a: float16x4_t) -> float16x4_t {
23788-
unsafe extern "unadjusted" {
23789-
#[cfg_attr(
23790-
any(target_arch = "aarch64", target_arch = "arm64ec"),
23791-
link_name = "llvm.rint.v4f16"
23792-
)]
23793-
fn _vrndx_f16(a: float16x4_t) -> float16x4_t;
23794-
}
23795-
unsafe { _vrndx_f16(a) }
23764+
unsafe { simd_round_ties_even(a) }
2379623765
}
2379723766
#[doc = "Floating-point round to integral exact, using current rounding mode"]
2379823767
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndxq_f16)"]
@@ -23801,14 +23770,7 @@ pub fn vrndx_f16(a: float16x4_t) -> float16x4_t {
2380123770
#[unstable(feature = "stdarch_neon_f16", issue = "136306")]
2380223771
#[cfg_attr(test, assert_instr(frintx))]
2380323772
pub fn vrndxq_f16(a: float16x8_t) -> float16x8_t {
23804-
unsafe extern "unadjusted" {
23805-
#[cfg_attr(
23806-
any(target_arch = "aarch64", target_arch = "arm64ec"),
23807-
link_name = "llvm.rint.v8f16"
23808-
)]
23809-
fn _vrndxq_f16(a: float16x8_t) -> float16x8_t;
23810-
}
23811-
unsafe { _vrndxq_f16(a) }
23773+
unsafe { simd_round_ties_even(a) }
2381223774
}
2381323775
#[doc = "Floating-point round to integral exact, using current rounding mode"]
2381423776
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndx_f32)"]
@@ -23817,14 +23779,7 @@ pub fn vrndxq_f16(a: float16x8_t) -> float16x8_t {
2381723779
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
2381823780
#[cfg_attr(test, assert_instr(frintx))]
2381923781
pub fn vrndx_f32(a: float32x2_t) -> float32x2_t {
23820-
unsafe extern "unadjusted" {
23821-
#[cfg_attr(
23822-
any(target_arch = "aarch64", target_arch = "arm64ec"),
23823-
link_name = "llvm.rint.v2f32"
23824-
)]
23825-
fn _vrndx_f32(a: float32x2_t) -> float32x2_t;
23826-
}
23827-
unsafe { _vrndx_f32(a) }
23782+
unsafe { simd_round_ties_even(a) }
2382823783
}
2382923784
#[doc = "Floating-point round to integral exact, using current rounding mode"]
2383023785
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndxq_f32)"]
@@ -23833,14 +23788,7 @@ pub fn vrndx_f32(a: float32x2_t) -> float32x2_t {
2383323788
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
2383423789
#[cfg_attr(test, assert_instr(frintx))]
2383523790
pub fn vrndxq_f32(a: float32x4_t) -> float32x4_t {
23836-
unsafe extern "unadjusted" {
23837-
#[cfg_attr(
23838-
any(target_arch = "aarch64", target_arch = "arm64ec"),
23839-
link_name = "llvm.rint.v4f32"
23840-
)]
23841-
fn _vrndxq_f32(a: float32x4_t) -> float32x4_t;
23842-
}
23843-
unsafe { _vrndxq_f32(a) }
23791+
unsafe { simd_round_ties_even(a) }
2384423792
}
2384523793
#[doc = "Floating-point round to integral exact, using current rounding mode"]
2384623794
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndx_f64)"]
@@ -23849,14 +23797,7 @@ pub fn vrndxq_f32(a: float32x4_t) -> float32x4_t {
2384923797
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
2385023798
#[cfg_attr(test, assert_instr(frintx))]
2385123799
pub fn vrndx_f64(a: float64x1_t) -> float64x1_t {
23852-
unsafe extern "unadjusted" {
23853-
#[cfg_attr(
23854-
any(target_arch = "aarch64", target_arch = "arm64ec"),
23855-
link_name = "llvm.rint.v1f64"
23856-
)]
23857-
fn _vrndx_f64(a: float64x1_t) -> float64x1_t;
23858-
}
23859-
unsafe { _vrndx_f64(a) }
23800+
unsafe { simd_round_ties_even(a) }
2386023801
}
2386123802
#[doc = "Floating-point round to integral exact, using current rounding mode"]
2386223803
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndxq_f64)"]
@@ -23865,14 +23806,7 @@ pub fn vrndx_f64(a: float64x1_t) -> float64x1_t {
2386523806
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
2386623807
#[cfg_attr(test, assert_instr(frintx))]
2386723808
pub fn vrndxq_f64(a: float64x2_t) -> float64x2_t {
23868-
unsafe extern "unadjusted" {
23869-
#[cfg_attr(
23870-
any(target_arch = "aarch64", target_arch = "arm64ec"),
23871-
link_name = "llvm.rint.v2f64"
23872-
)]
23873-
fn _vrndxq_f64(a: float64x2_t) -> float64x2_t;
23874-
}
23875-
unsafe { _vrndxq_f64(a) }
23809+
unsafe { simd_round_ties_even(a) }
2387623810
}
2387723811
#[doc = "Floating-point round to integral, using current rounding mode"]
2387823812
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndxh_f16)"]
@@ -24082,7 +24016,6 @@ pub fn vrsqrtes_f32(a: f32) -> f32 {
2408224016
#[doc = "Reciprocal square-root estimate."]
2408324017
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrsqrteh_f16)"]
2408424018
#[inline]
24085-
#[target_feature(enable = "neon,fp16")]
2408624019
#[cfg_attr(test, assert_instr(frsqrte))]
2408724020
#[target_feature(enable = "neon,fp16")]
2408824021
#[unstable(feature = "stdarch_neon_f16", issue = "136306")]

library/stdarch/crates/core_arch/src/arm_shared/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
//! Section 10.1 of ACLE says:
2121
//!
2222
//! - "In the sequence of Arm architectures { v5, v5TE, v6, v6T2, v7 } each architecture includes
23-
//! its predecessor instruction set."
23+
//! its predecessor's instruction set."
2424
//!
2525
//! - "In the sequence of Thumb-only architectures { v6-M, v7-M, v7E-M } each architecture includes
26-
//! its predecessor instruction set."
26+
//! its predecessor's instruction set."
2727
//!
2828
//! From that info and from looking at how LLVM features work (using custom targets) we can identify
2929
//! features that are subsets of others:
@@ -38,7 +38,7 @@
3838
//! *NOTE*: Section 5.4.7 of ACLE says:
3939
//!
4040
//! - "__ARM_FEATURE_DSP is defined to 1 if the DSP (v5E) instructions are supported and the
41-
//! intrinsics defined in Saturating intrinsics are available."
41+
//! intrinsics defined in Saturating intrinsics are available."
4242
//!
4343
//! This does *not* match how LLVM uses the '+dsp' feature; this feature is not set for v5te
4444
//! targets so we have to work around this difference.

0 commit comments

Comments
 (0)