This repository was archived by the owner on Apr 28, 2025. It is now read-only.
File tree 10 files changed +10
-10
lines changed
10 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ pub fn ceil(x: f64) -> f64 {
12
12
// `f64.ceil` native instruction, so we can leverage this for both code size
13
13
// and speed.
14
14
llvm_intrinsically_optimized ! {
15
- #[ cfg( target_arch = "wasm32" ) ] {
15
+ #[ cfg( all ( target_arch = "wasm32" , not ( feature = "stable" ) ) ) ] {
16
16
return unsafe { :: core:: intrinsics:: ceilf64( x) }
17
17
}
18
18
}
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ pub fn ceilf(x: f32) -> f32 {
10
10
// `f32.ceil` native instruction, so we can leverage this for both code size
11
11
// and speed.
12
12
llvm_intrinsically_optimized ! {
13
- #[ cfg( target_arch = "wasm32" ) ] {
13
+ #[ cfg( all ( target_arch = "wasm32" , not ( feature = "stable" ) ) ) ] {
14
14
return unsafe { :: core:: intrinsics:: ceilf32( x) }
15
15
}
16
16
}
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ pub fn fabs(x: f64) -> f64 {
10
10
// `f64.abs` native instruction, so we can leverage this for both code size
11
11
// and speed.
12
12
llvm_intrinsically_optimized ! {
13
- #[ cfg( target_arch = "wasm32" ) ] {
13
+ #[ cfg( all ( target_arch = "wasm32" , not ( feature = "stable" ) ) ) ] {
14
14
return unsafe { :: core:: intrinsics:: fabsf64( x) }
15
15
}
16
16
}
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ pub fn fabsf(x: f32) -> f32 {
8
8
// `f32.abs` native instruction, so we can leverage this for both code size
9
9
// and speed.
10
10
llvm_intrinsically_optimized ! {
11
- #[ cfg( target_arch = "wasm32" ) ] {
11
+ #[ cfg( all ( target_arch = "wasm32" , not ( feature = "stable" ) ) ) ] {
12
12
return unsafe { :: core:: intrinsics:: fabsf32( x) }
13
13
}
14
14
}
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ pub fn floor(x: f64) -> f64 {
12
12
// `f64.floor` native instruction, so we can leverage this for both code size
13
13
// and speed.
14
14
llvm_intrinsically_optimized ! {
15
- #[ cfg( target_arch = "wasm32" ) ] {
15
+ #[ cfg( all ( target_arch = "wasm32" , not ( feature = "stable" ) ) ) ] {
16
16
return unsafe { :: core:: intrinsics:: floorf64( x) }
17
17
}
18
18
}
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ pub fn floorf(x: f32) -> f32 {
10
10
// `f32.floor` native instruction, so we can leverage this for both code size
11
11
// and speed.
12
12
llvm_intrinsically_optimized ! {
13
- #[ cfg( target_arch = "wasm32" ) ] {
13
+ #[ cfg( all ( target_arch = "wasm32" , not ( feature = "stable" ) ) ) ] {
14
14
return unsafe { :: core:: intrinsics:: floorf32( x) }
15
15
}
16
16
}
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ pub fn sqrt(x: f64) -> f64 {
88
88
// `f64.sqrt` native instruction, so we can leverage this for both code size
89
89
// and speed.
90
90
llvm_intrinsically_optimized ! {
91
- #[ cfg( target_arch = "wasm32" ) ] {
91
+ #[ cfg( all ( target_arch = "wasm32" , not ( feature = "stable" ) ) ) ] {
92
92
return if x < 0.0 {
93
93
f64 :: NAN
94
94
} else {
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ pub fn sqrtf(x: f32) -> f32 {
22
22
// `f32.sqrt` native instruction, so we can leverage this for both code size
23
23
// and speed.
24
24
llvm_intrinsically_optimized ! {
25
- #[ cfg( target_arch = "wasm32" ) ] {
25
+ #[ cfg( all ( target_arch = "wasm32" , not ( feature = "stable" ) ) ) ] {
26
26
return if x < 0.0 {
27
27
:: core:: f32 :: NAN
28
28
} else {
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ pub fn trunc(x: f64) -> f64 {
7
7
// `f64.trunc` native instruction, so we can leverage this for both code size
8
8
// and speed.
9
9
llvm_intrinsically_optimized ! {
10
- #[ cfg( target_arch = "wasm32" ) ] {
10
+ #[ cfg( all ( target_arch = "wasm32" , not ( feature = "stable" ) ) ) ] {
11
11
return unsafe { :: core:: intrinsics:: truncf64( x) }
12
12
}
13
13
}
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ pub fn truncf(x: f32) -> f32 {
7
7
// `f32.trunc` native instruction, so we can leverage this for both code size
8
8
// and speed.
9
9
llvm_intrinsically_optimized ! {
10
- #[ cfg( target_arch = "wasm32" ) ] {
10
+ #[ cfg( all ( target_arch = "wasm32" , not ( feature = "stable" ) ) ) ] {
11
11
return unsafe { :: core:: intrinsics:: truncf32( x) }
12
12
}
13
13
}
You can’t perform that action at this time.
0 commit comments