Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,003 changes: 907 additions & 96 deletions crates/core_arch/src/aarch64/neon/generated.rs

Large diffs are not rendered by default.

10,283 changes: 9,379 additions & 904 deletions crates/core_arch/src/arm_shared/neon/generated.rs

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions crates/core_arch/src/wasm32/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub fn unreachable() -> ! {
#[must_use = "method returns a new number and does not mutate the original value"]
#[unstable(feature = "wasm_numeric_instr", issue = "133908")]
pub fn f32_ceil(a: f32) -> f32 {
unsafe { crate::intrinsics::ceilf32(a) }
crate::intrinsics::ceilf32(a)
}

/// Generates the [`f32.floor`] instruction, returning the largest integer less than or equal to `a`.
Expand All @@ -57,7 +57,7 @@ pub fn f32_ceil(a: f32) -> f32 {
#[must_use = "method returns a new number and does not mutate the original value"]
#[unstable(feature = "wasm_numeric_instr", issue = "133908")]
pub fn f32_floor(a: f32) -> f32 {
unsafe { crate::intrinsics::floorf32(a) }
crate::intrinsics::floorf32(a)
}

/// Generates the [`f32.trunc`] instruction, roundinging to the nearest integer towards zero.
Expand All @@ -71,7 +71,7 @@ pub fn f32_floor(a: f32) -> f32 {
#[must_use = "method returns a new number and does not mutate the original value"]
#[unstable(feature = "wasm_numeric_instr", issue = "133908")]
pub fn f32_trunc(a: f32) -> f32 {
unsafe { crate::intrinsics::truncf32(a) }
crate::intrinsics::truncf32(a)
}

/// Generates the [`f32.nearest`] instruction, roundinging to the nearest integer. Rounds half-way
Expand Down Expand Up @@ -100,7 +100,7 @@ pub fn f32_nearest(a: f32) -> f32 {
#[must_use = "method returns a new number and does not mutate the original value"]
#[unstable(feature = "wasm_numeric_instr", issue = "133908")]
pub fn f32_sqrt(a: f32) -> f32 {
unsafe { crate::intrinsics::sqrtf32(a) }
crate::intrinsics::sqrtf32(a)
}

/// Generates the [`f64.ceil`] instruction, returning the smallest integer greater than or equal to `a`.
Expand All @@ -114,7 +114,7 @@ pub fn f32_sqrt(a: f32) -> f32 {
#[must_use = "method returns a new number and does not mutate the original value"]
#[unstable(feature = "wasm_numeric_instr", issue = "133908")]
pub fn f64_ceil(a: f64) -> f64 {
unsafe { crate::intrinsics::ceilf64(a) }
crate::intrinsics::ceilf64(a)
}

/// Generates the [`f64.floor`] instruction, returning the largest integer less than or equal to `a`.
Expand All @@ -128,7 +128,7 @@ pub fn f64_ceil(a: f64) -> f64 {
#[must_use = "method returns a new number and does not mutate the original value"]
#[unstable(feature = "wasm_numeric_instr", issue = "133908")]
pub fn f64_floor(a: f64) -> f64 {
unsafe { crate::intrinsics::floorf64(a) }
crate::intrinsics::floorf64(a)
}

/// Generates the [`f64.trunc`] instruction, roundinging to the nearest integer towards zero.
Expand All @@ -142,7 +142,7 @@ pub fn f64_floor(a: f64) -> f64 {
#[must_use = "method returns a new number and does not mutate the original value"]
#[unstable(feature = "wasm_numeric_instr", issue = "133908")]
pub fn f64_trunc(a: f64) -> f64 {
unsafe { crate::intrinsics::truncf64(a) }
crate::intrinsics::truncf64(a)
}

/// Generates the [`f64.nearest`] instruction, roundinging to the nearest integer. Rounds half-way
Expand Down Expand Up @@ -171,7 +171,7 @@ pub fn f64_nearest(a: f64) -> f64 {
#[must_use = "method returns a new number and does not mutate the original value"]
#[unstable(feature = "wasm_numeric_instr", issue = "133908")]
pub fn f64_sqrt(a: f64) -> f64 {
unsafe { crate::intrinsics::sqrtf64(a) }
crate::intrinsics::sqrtf64(a)
}

unsafe extern "C-unwind" {
Expand Down
4 changes: 2 additions & 2 deletions crates/intrinsic-test/src/arm/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ pub const AARCH_CONFIGURATIONS: &str = r#"
#![feature(stdarch_neon_f16)]

#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec"))]
use core::arch::aarch64::*;
use core_arch::arch::aarch64::*;

#[cfg(target_arch = "arm")]
use core::arch::arm::*;
use core_arch::arch::arm::*;
"#;
1 change: 1 addition & 0 deletions crates/intrinsic-test/src/common/gen_rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ pub fn write_bin_cargo_toml(
write_cargo_toml_header(w, "intrinsic-test-programs")?;

writeln!(w, "[dependencies]")?;
writeln!(w, "core_arch = {{ path = \"../crates/core_arch\" }}")?;

for i in 0..module_count {
writeln!(w, "mod_{i} = {{ path = \"mod_{i}/\" }}")?;
Expand Down
14 changes: 6 additions & 8 deletions crates/stdarch-gen-arm/spec/neon/aarch64.spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3108,7 +3108,7 @@ intrinsics:
types:
- [f16, 'h_']
compose:
- FnCall: [roundf16, [a], [], true]
- FnCall: [roundf16, [a], []]

- name: "vrndn{neon_type.no}"
doc: "Floating-point round to integral, to nearest with ties to even"
Expand Down Expand Up @@ -3208,7 +3208,7 @@ intrinsics:
types:
- [f16, 'h_']
compose:
- FnCall: [floorf16, [a], [], true]
- FnCall: [floorf16, [a], []]



Expand Down Expand Up @@ -3257,7 +3257,7 @@ intrinsics:
types:
- [f16, 'h_']
compose:
- FnCall: [ceilf16, [a], [], true]
- FnCall: [ceilf16, [a], []]

- name: "vrnd{neon_type.no}"
doc: "Floating-point round to integral, toward zero"
Expand Down Expand Up @@ -3304,7 +3304,7 @@ intrinsics:
types:
- [f16, 'h_']
compose:
- FnCall: [truncf16, [a], [], true]
- FnCall: [truncf16, [a], []]


- name: "vrndi{neon_type.no}"
Expand Down Expand Up @@ -8499,7 +8499,7 @@ intrinsics:
types:
- [f16, 'h_']
compose:
- FnCall: [sqrtf16, [a], [], true]
- FnCall: [sqrtf16, [a], []]

- name: "vrsqrts{type[0]}"
doc: "Floating-point reciprocal square root step"
Expand Down Expand Up @@ -8781,7 +8781,6 @@ intrinsics:
- [float64x1_t, float32x2_t]
- [float32x4_t, float64x2_t]
- [float64x2_t, float32x4_t]
big_endian_inverse: false
compose:
- FnCall: [transmute, [a]]

Expand All @@ -8802,7 +8801,6 @@ intrinsics:
# q
- [float64x2_t, float16x8_t]
- [float16x8_t, float64x2_t]
big_endian_inverse: false
compose:
- FnCall: [transmute, [a]]

Expand Down Expand Up @@ -10464,7 +10462,7 @@ intrinsics:
types:
- ["f16", "h_f16"]
compose:
- FnCall: [fmaf16, [b, c, a], [], true]
- FnCall: [fmaf16, [b, c, a], []]


- name: "vfmah_lane{type[2]}"
Expand Down
4 changes: 0 additions & 4 deletions crates/stdarch-gen-arm/spec/neon/arm_shared.spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8480,7 +8480,6 @@ intrinsics:
- [poly16x8_t, p128]
- [int8x16_t, p128]
- [uint8x16_t, p128]
big_endian_inverse: false
compose:
- FnCall: [transmute, [a]]

Expand Down Expand Up @@ -8718,7 +8717,6 @@ intrinsics:
- [poly8x16_t, float32x4_t]
- [poly16x8_t, float32x4_t]
- [p128, float32x4_t]
big_endian_inverse: false
compose:
- FnCall: [transmute, [a]]

Expand Down Expand Up @@ -8782,7 +8780,6 @@ intrinsics:
- [float16x8_t, uint16x8_t]
- [float16x8_t, uint32x4_t]
- [float16x8_t, uint64x2_t]
big_endian_inverse: false
compose:
- FnCall: [transmute, [a]]

Expand All @@ -8807,7 +8804,6 @@ intrinsics:
- [poly128_t, float16x8_t]
- [float16x8_t, poly128_t]
- [float16x8_t, poly64x2_t]
big_endian_inverse: false
compose:
- FnCall: [transmute, [a]]

Expand Down