Skip to content

Commit 21e1e41

Browse files
committed
pick changes from rust-lang/rust#146683
1 parent 2d00a34 commit 21e1e41

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10306,7 +10306,7 @@ pub fn vfmad_lane_f64<const LANE: i32>(a: f64, b: f64, c: float64x1_t) -> f64 {
1030610306
#[unstable(feature = "stdarch_neon_f16", issue = "136306")]
1030710307
#[cfg(not(target_arch = "arm64ec"))]
1030810308
pub fn vfmah_f16(a: f16, b: f16, c: f16) -> f16 {
10309-
unsafe { fmaf16(b, c, a) }
10309+
fmaf16(b, c, a)
1031010310
}
1031110311
#[doc = "Floating-point fused multiply-add to accumulator"]
1031210312
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vfmah_lane_f16)"]
@@ -23259,7 +23259,7 @@ pub fn vrndaq_f64(a: float64x2_t) -> float64x2_t {
2325923259
#[cfg(not(target_arch = "arm64ec"))]
2326023260
#[cfg_attr(test, assert_instr(frinta))]
2326123261
pub fn vrndah_f16(a: f16) -> f16 {
23262-
unsafe { roundf16(a) }
23262+
roundf16(a)
2326323263
}
2326423264
#[doc = "Floating-point round to integral, to nearest with ties to away"]
2326523265
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndh_f16)"]
@@ -23269,7 +23269,7 @@ pub fn vrndah_f16(a: f16) -> f16 {
2326923269
#[cfg(not(target_arch = "arm64ec"))]
2327023270
#[cfg_attr(test, assert_instr(frintz))]
2327123271
pub fn vrndh_f16(a: f16) -> f16 {
23272-
unsafe { truncf16(a) }
23272+
truncf16(a)
2327323273
}
2327423274
#[doc = "Floating-point round to integral, using current rounding mode"]
2327523275
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndi_f16)"]
@@ -23450,7 +23450,7 @@ pub fn vrndmq_f64(a: float64x2_t) -> float64x2_t {
2345023450
#[cfg(not(target_arch = "arm64ec"))]
2345123451
#[cfg_attr(test, assert_instr(frintm))]
2345223452
pub fn vrndmh_f16(a: f16) -> f16 {
23453-
unsafe { floorf16(a) }
23453+
floorf16(a)
2345423454
}
2345523455
#[doc = "Floating-point round to integral, to nearest with ties to even"]
2345623456
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndn_f64)"]
@@ -23581,7 +23581,7 @@ pub fn vrndpq_f64(a: float64x2_t) -> float64x2_t {
2358123581
#[cfg(not(target_arch = "arm64ec"))]
2358223582
#[cfg_attr(test, assert_instr(frintp))]
2358323583
pub fn vrndph_f16(a: f16) -> f16 {
23584-
unsafe { ceilf16(a) }
23584+
ceilf16(a)
2358523585
}
2358623586
#[doc = "Floating-point round to integral exact, using current rounding mode"]
2358723587
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndx_f16)"]
@@ -25079,7 +25079,7 @@ pub fn vsqrtq_f64(a: float64x2_t) -> float64x2_t {
2507925079
#[cfg(not(target_arch = "arm64ec"))]
2508025080
#[cfg_attr(test, assert_instr(fsqrt))]
2508125081
pub fn vsqrth_f16(a: f16) -> f16 {
25082-
unsafe { sqrtf16(a) }
25082+
sqrtf16(a)
2508325083
}
2508425084
#[doc = "Shift Right and Insert (immediate)"]
2508525085
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vsri_n_s8)"]

crates/core_arch/src/wasm32/mod.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub fn unreachable() -> ! {
4343
#[must_use = "method returns a new number and does not mutate the original value"]
4444
#[unstable(feature = "wasm_numeric_instr", issue = "133908")]
4545
pub fn f32_ceil(a: f32) -> f32 {
46-
unsafe { crate::intrinsics::ceilf32(a) }
46+
crate::intrinsics::ceilf32(a)
4747
}
4848

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

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

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

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

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

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

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

177177
unsafe extern "C-unwind" {

crates/stdarch-gen-arm/spec/neon/aarch64.spec.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3108,7 +3108,7 @@ intrinsics:
31083108
types:
31093109
- [f16, 'h_']
31103110
compose:
3111-
- FnCall: [roundf16, [a], [], true]
3111+
- FnCall: [roundf16, [a], []]
31123112

31133113
- name: "vrndn{neon_type.no}"
31143114
doc: "Floating-point round to integral, to nearest with ties to even"
@@ -3208,7 +3208,7 @@ intrinsics:
32083208
types:
32093209
- [f16, 'h_']
32103210
compose:
3211-
- FnCall: [floorf16, [a], [], true]
3211+
- FnCall: [floorf16, [a], []]
32123212

32133213

32143214

@@ -3257,7 +3257,7 @@ intrinsics:
32573257
types:
32583258
- [f16, 'h_']
32593259
compose:
3260-
- FnCall: [ceilf16, [a], [], true]
3260+
- FnCall: [ceilf16, [a], []]
32613261

32623262
- name: "vrnd{neon_type.no}"
32633263
doc: "Floating-point round to integral, toward zero"
@@ -3304,7 +3304,7 @@ intrinsics:
33043304
types:
33053305
- [f16, 'h_']
33063306
compose:
3307-
- FnCall: [truncf16, [a], [], true]
3307+
- FnCall: [truncf16, [a], []]
33083308

33093309

33103310
- name: "vrndi{neon_type.no}"
@@ -8499,7 +8499,7 @@ intrinsics:
84998499
types:
85008500
- [f16, 'h_']
85018501
compose:
8502-
- FnCall: [sqrtf16, [a], [], true]
8502+
- FnCall: [sqrtf16, [a], []]
85038503

85048504
- name: "vrsqrts{type[0]}"
85058505
doc: "Floating-point reciprocal square root step"
@@ -10462,7 +10462,7 @@ intrinsics:
1046210462
types:
1046310463
- ["f16", "h_f16"]
1046410464
compose:
10465-
- FnCall: [fmaf16, [b, c, a], [], true]
10465+
- FnCall: [fmaf16, [b, c, a], []]
1046610466

1046710467

1046810468
- name: "vfmah_lane{type[2]}"

0 commit comments

Comments
 (0)