Added
Link Here
|
0 |
- |
1 |
Backport of https://hg.mozilla.org/releases/mozilla-beta/raw-rev/c37c77a20f96 |
|
|
2 |
Only the rust code is present (not the .toml, .json and .lock files) |
3 |
|
4 |
|
5 |
diff --git a/third_party/rust/packed_simd/build.rs b/third_party/rust/packed_simd/build.rs |
6 |
--- third_party/rust/packed_simd/build.rs |
7 |
+++ third_party/rust/packed_simd/build.rs |
8 |
@@ -1,6 +1,11 @@ |
9 |
+use rustc_version::{version, Version}; |
10 |
+ |
11 |
fn main() { |
12 |
let target = std::env::var("TARGET").expect("TARGET environment variable not defined"); |
13 |
if target.contains("neon") { |
14 |
println!("cargo:rustc-cfg=libcore_neon"); |
15 |
} |
16 |
+ if version().unwrap() < Version::parse("1.61.0-alpha").unwrap() { |
17 |
+ println!("cargo:rustc-cfg=aarch64_target_feature"); |
18 |
+ } |
19 |
} |
20 |
diff --git a/third_party/rust/packed_simd/src/api.rs b/third_party/rust/packed_simd/src/api.rs |
21 |
--- third_party/rust/packed_simd/src/api.rs |
22 |
+++ third_party/rust/packed_simd/src/api.rs |
23 |
@@ -1,13 +1,13 @@ |
24 |
//! Implements the Simd<[T; N]> APIs |
25 |
|
26 |
#[macro_use] |
27 |
mod bitmask; |
28 |
-crate mod cast; |
29 |
+pub(crate) mod cast; |
30 |
#[macro_use] |
31 |
mod cmp; |
32 |
#[macro_use] |
33 |
mod default; |
34 |
#[macro_use] |
35 |
mod fmt; |
36 |
#[macro_use] |
37 |
mod from; |
38 |
@@ -32,17 +32,17 @@ mod shuffle1_dyn; |
39 |
#[macro_use] |
40 |
mod slice; |
41 |
#[macro_use] |
42 |
mod swap_bytes; |
43 |
#[macro_use] |
44 |
mod bit_manip; |
45 |
|
46 |
#[cfg(feature = "into_bits")] |
47 |
-crate mod into_bits; |
48 |
+pub(crate) mod into_bits; |
49 |
|
50 |
macro_rules! impl_i { |
51 |
([$elem_ty:ident; $elem_n:expr]: $tuple_id:ident, $mask_ty:ident |
52 |
| $ielem_ty:ident, $ibitmask_ty:ident | $test_tt:tt | $($elem_ids:ident),* |
53 |
| From: $($from_vec_ty:ident),* | $(#[$doc:meta])*) => { |
54 |
impl_minimal_iuf!([$elem_ty; $elem_n]: $tuple_id | $ielem_ty | $test_tt |
55 |
| $($elem_ids),* | $(#[$doc])*); |
56 |
impl_ops_vector_arithmetic!([$elem_ty; $elem_n]: $tuple_id | $test_tt); |
57 |
diff --git a/third_party/rust/packed_simd/src/codegen.rs b/third_party/rust/packed_simd/src/codegen.rs |
58 |
--- third_party/rust/packed_simd/src/codegen.rs |
59 |
+++ third_party/rust/packed_simd/src/codegen.rs |
60 |
@@ -1,24 +1,24 @@ |
61 |
//! Code-generation utilities |
62 |
|
63 |
-crate mod bit_manip; |
64 |
-crate mod llvm; |
65 |
-crate mod math; |
66 |
-crate mod reductions; |
67 |
-crate mod shuffle; |
68 |
-crate mod shuffle1_dyn; |
69 |
-crate mod swap_bytes; |
70 |
+pub(crate) mod bit_manip; |
71 |
+pub(crate) mod llvm; |
72 |
+pub(crate) mod math; |
73 |
+pub(crate) mod reductions; |
74 |
+pub(crate) mod shuffle; |
75 |
+pub(crate) mod shuffle1_dyn; |
76 |
+pub(crate) mod swap_bytes; |
77 |
|
78 |
macro_rules! impl_simd_array { |
79 |
([$elem_ty:ident; $elem_count:expr]: |
80 |
$tuple_id:ident | $($elem_tys:ident),*) => { |
81 |
#[derive(Copy, Clone)] |
82 |
#[repr(simd)] |
83 |
- pub struct $tuple_id($(crate $elem_tys),*); |
84 |
+ pub struct $tuple_id($(pub(crate) $elem_tys),*); |
85 |
//^^^^^^^ leaked through SimdArray |
86 |
|
87 |
impl crate::sealed::Seal for [$elem_ty; $elem_count] {} |
88 |
|
89 |
impl crate::sealed::SimdArray for [$elem_ty; $elem_count] { |
90 |
type Tuple = $tuple_id; |
91 |
type T = $elem_ty; |
92 |
const N: usize = $elem_count; |
93 |
@@ -30,33 +30,33 @@ macro_rules! impl_simd_array { |
94 |
type Element = $elem_ty; |
95 |
const LANES: usize = $elem_count; |
96 |
type LanesType = [u32; $elem_count]; |
97 |
} |
98 |
|
99 |
} |
100 |
} |
101 |
|
102 |
-crate mod pointer_sized_int; |
103 |
+pub(crate) mod pointer_sized_int; |
104 |
|
105 |
-crate mod v16; |
106 |
-crate use self::v16::*; |
107 |
+pub(crate) mod v16; |
108 |
+pub(crate) use self::v16::*; |
109 |
|
110 |
-crate mod v32; |
111 |
-crate use self::v32::*; |
112 |
+pub(crate) mod v32; |
113 |
+pub(crate) use self::v32::*; |
114 |
|
115 |
-crate mod v64; |
116 |
-crate use self::v64::*; |
117 |
+pub(crate) mod v64; |
118 |
+pub(crate) use self::v64::*; |
119 |
|
120 |
-crate mod v128; |
121 |
-crate use self::v128::*; |
122 |
+pub(crate) mod v128; |
123 |
+pub(crate) use self::v128::*; |
124 |
|
125 |
-crate mod v256; |
126 |
-crate use self::v256::*; |
127 |
+pub(crate) mod v256; |
128 |
+pub(crate) use self::v256::*; |
129 |
|
130 |
-crate mod v512; |
131 |
-crate use self::v512::*; |
132 |
+pub(crate) mod v512; |
133 |
+pub(crate) use self::v512::*; |
134 |
|
135 |
-crate mod vSize; |
136 |
-crate use self::vSize::*; |
137 |
+pub(crate) mod vSize; |
138 |
+pub(crate) use self::vSize::*; |
139 |
|
140 |
-crate mod vPtr; |
141 |
-crate use self::vPtr::*; |
142 |
+pub(crate) mod vPtr; |
143 |
+pub(crate) use self::vPtr::*; |
144 |
diff --git a/third_party/rust/packed_simd/src/codegen/bit_manip.rs b/third_party/rust/packed_simd/src/codegen/bit_manip.rs |
145 |
--- third_party/rust/packed_simd/src/codegen/bit_manip.rs |
146 |
+++ third_party/rust/packed_simd/src/codegen/bit_manip.rs |
147 |
@@ -1,12 +1,12 @@ |
148 |
//! LLVM bit manipulation intrinsics. |
149 |
#[rustfmt::skip] |
150 |
|
151 |
-use crate::*; |
152 |
+pub(crate) use crate::*; |
153 |
|
154 |
#[allow(improper_ctypes, dead_code)] |
155 |
extern "C" { |
156 |
#[link_name = "llvm.ctlz.v2i8"] |
157 |
fn ctlz_u8x2(x: u8x2, is_zero_undef: bool) -> u8x2; |
158 |
#[link_name = "llvm.ctlz.v4i8"] |
159 |
fn ctlz_u8x4(x: u8x4, is_zero_undef: bool) -> u8x4; |
160 |
#[link_name = "llvm.ctlz.v8i8"] |
161 |
@@ -142,17 +142,17 @@ extern "C" { |
162 |
#[link_name = "llvm.ctpop.v1i128"] |
163 |
fn ctpop_u128x1(x: u128x1) -> u128x1; |
164 |
#[link_name = "llvm.ctpop.v2i128"] |
165 |
fn ctpop_u128x2(x: u128x2) -> u128x2; |
166 |
#[link_name = "llvm.ctpop.v4i128"] |
167 |
fn ctpop_u128x4(x: u128x4) -> u128x4; |
168 |
} |
169 |
|
170 |
-crate trait BitManip { |
171 |
+pub(crate) trait BitManip { |
172 |
fn ctpop(self) -> Self; |
173 |
fn ctlz(self) -> Self; |
174 |
fn cttz(self) -> Self; |
175 |
} |
176 |
|
177 |
macro_rules! impl_bit_manip { |
178 |
(inner: $ty:ident, $scalar:ty, $uty:ident, |
179 |
$ctpop:ident, $ctlz:ident, $cttz:ident) => { |
180 |
diff --git a/third_party/rust/packed_simd/src/codegen/llvm.rs b/third_party/rust/packed_simd/src/codegen/llvm.rs |
181 |
--- third_party/rust/packed_simd/src/codegen/llvm.rs |
182 |
+++ third_party/rust/packed_simd/src/codegen/llvm.rs |
183 |
@@ -71,58 +71,58 @@ pub unsafe fn __shuffle_vector64<const I |
184 |
where |
185 |
T: Simd, |
186 |
<T as Simd>::Element: Shuffle<[u32; 64], Output = U>, |
187 |
{ |
188 |
simd_shuffle64(x, y, IDX) |
189 |
} |
190 |
|
191 |
extern "platform-intrinsic" { |
192 |
- crate fn simd_eq<T, U>(x: T, y: T) -> U; |
193 |
- crate fn simd_ne<T, U>(x: T, y: T) -> U; |
194 |
- crate fn simd_lt<T, U>(x: T, y: T) -> U; |
195 |
- crate fn simd_le<T, U>(x: T, y: T) -> U; |
196 |
- crate fn simd_gt<T, U>(x: T, y: T) -> U; |
197 |
- crate fn simd_ge<T, U>(x: T, y: T) -> U; |
198 |
+ pub(crate) fn simd_eq<T, U>(x: T, y: T) -> U; |
199 |
+ pub(crate) fn simd_ne<T, U>(x: T, y: T) -> U; |
200 |
+ pub(crate) fn simd_lt<T, U>(x: T, y: T) -> U; |
201 |
+ pub(crate) fn simd_le<T, U>(x: T, y: T) -> U; |
202 |
+ pub(crate) fn simd_gt<T, U>(x: T, y: T) -> U; |
203 |
+ pub(crate) fn simd_ge<T, U>(x: T, y: T) -> U; |
204 |
|
205 |
- crate fn simd_insert<T, U>(x: T, idx: u32, val: U) -> T; |
206 |
- crate fn simd_extract<T, U>(x: T, idx: u32) -> U; |
207 |
+ pub(crate) fn simd_insert<T, U>(x: T, idx: u32, val: U) -> T; |
208 |
+ pub(crate) fn simd_extract<T, U>(x: T, idx: u32) -> U; |
209 |
|
210 |
- crate fn simd_cast<T, U>(x: T) -> U; |
211 |
+ pub(crate) fn simd_cast<T, U>(x: T) -> U; |
212 |
|
213 |
- crate fn simd_add<T>(x: T, y: T) -> T; |
214 |
- crate fn simd_sub<T>(x: T, y: T) -> T; |
215 |
- crate fn simd_mul<T>(x: T, y: T) -> T; |
216 |
- crate fn simd_div<T>(x: T, y: T) -> T; |
217 |
- crate fn simd_rem<T>(x: T, y: T) -> T; |
218 |
- crate fn simd_shl<T>(x: T, y: T) -> T; |
219 |
- crate fn simd_shr<T>(x: T, y: T) -> T; |
220 |
- crate fn simd_and<T>(x: T, y: T) -> T; |
221 |
- crate fn simd_or<T>(x: T, y: T) -> T; |
222 |
- crate fn simd_xor<T>(x: T, y: T) -> T; |
223 |
+ pub(crate) fn simd_add<T>(x: T, y: T) -> T; |
224 |
+ pub(crate) fn simd_sub<T>(x: T, y: T) -> T; |
225 |
+ pub(crate) fn simd_mul<T>(x: T, y: T) -> T; |
226 |
+ pub(crate) fn simd_div<T>(x: T, y: T) -> T; |
227 |
+ pub(crate) fn simd_rem<T>(x: T, y: T) -> T; |
228 |
+ pub(crate) fn simd_shl<T>(x: T, y: T) -> T; |
229 |
+ pub(crate) fn simd_shr<T>(x: T, y: T) -> T; |
230 |
+ pub(crate) fn simd_and<T>(x: T, y: T) -> T; |
231 |
+ pub(crate) fn simd_or<T>(x: T, y: T) -> T; |
232 |
+ pub(crate) fn simd_xor<T>(x: T, y: T) -> T; |
233 |
|
234 |
- crate fn simd_reduce_add_unordered<T, U>(x: T) -> U; |
235 |
- crate fn simd_reduce_mul_unordered<T, U>(x: T) -> U; |
236 |
- crate fn simd_reduce_add_ordered<T, U>(x: T, acc: U) -> U; |
237 |
- crate fn simd_reduce_mul_ordered<T, U>(x: T, acc: U) -> U; |
238 |
- crate fn simd_reduce_min<T, U>(x: T) -> U; |
239 |
- crate fn simd_reduce_max<T, U>(x: T) -> U; |
240 |
- crate fn simd_reduce_min_nanless<T, U>(x: T) -> U; |
241 |
- crate fn simd_reduce_max_nanless<T, U>(x: T) -> U; |
242 |
- crate fn simd_reduce_and<T, U>(x: T) -> U; |
243 |
- crate fn simd_reduce_or<T, U>(x: T) -> U; |
244 |
- crate fn simd_reduce_xor<T, U>(x: T) -> U; |
245 |
- crate fn simd_reduce_all<T>(x: T) -> bool; |
246 |
- crate fn simd_reduce_any<T>(x: T) -> bool; |
247 |
+ pub(crate) fn simd_reduce_add_unordered<T, U>(x: T) -> U; |
248 |
+ pub(crate) fn simd_reduce_mul_unordered<T, U>(x: T) -> U; |
249 |
+ pub(crate) fn simd_reduce_add_ordered<T, U>(x: T, acc: U) -> U; |
250 |
+ pub(crate) fn simd_reduce_mul_ordered<T, U>(x: T, acc: U) -> U; |
251 |
+ pub(crate) fn simd_reduce_min<T, U>(x: T) -> U; |
252 |
+ pub(crate) fn simd_reduce_max<T, U>(x: T) -> U; |
253 |
+ pub(crate) fn simd_reduce_min_nanless<T, U>(x: T) -> U; |
254 |
+ pub(crate) fn simd_reduce_max_nanless<T, U>(x: T) -> U; |
255 |
+ pub(crate) fn simd_reduce_and<T, U>(x: T) -> U; |
256 |
+ pub(crate) fn simd_reduce_or<T, U>(x: T) -> U; |
257 |
+ pub(crate) fn simd_reduce_xor<T, U>(x: T) -> U; |
258 |
+ pub(crate) fn simd_reduce_all<T>(x: T) -> bool; |
259 |
+ pub(crate) fn simd_reduce_any<T>(x: T) -> bool; |
260 |
|
261 |
- crate fn simd_select<M, T>(m: M, a: T, b: T) -> T; |
262 |
+ pub(crate) fn simd_select<M, T>(m: M, a: T, b: T) -> T; |
263 |
|
264 |
- crate fn simd_fmin<T>(a: T, b: T) -> T; |
265 |
- crate fn simd_fmax<T>(a: T, b: T) -> T; |
266 |
+ pub(crate) fn simd_fmin<T>(a: T, b: T) -> T; |
267 |
+ pub(crate) fn simd_fmax<T>(a: T, b: T) -> T; |
268 |
|
269 |
- crate fn simd_fsqrt<T>(a: T) -> T; |
270 |
- crate fn simd_fma<T>(a: T, b: T, c: T) -> T; |
271 |
+ pub(crate) fn simd_fsqrt<T>(a: T) -> T; |
272 |
+ pub(crate) fn simd_fma<T>(a: T, b: T, c: T) -> T; |
273 |
|
274 |
- crate fn simd_gather<T, P, M>(value: T, pointers: P, mask: M) -> T; |
275 |
- crate fn simd_scatter<T, P, M>(value: T, pointers: P, mask: M); |
276 |
+ pub(crate) fn simd_gather<T, P, M>(value: T, pointers: P, mask: M) -> T; |
277 |
+ pub(crate) fn simd_scatter<T, P, M>(value: T, pointers: P, mask: M); |
278 |
|
279 |
- crate fn simd_bitmask<T, U>(value: T) -> U; |
280 |
+ pub(crate) fn simd_bitmask<T, U>(value: T) -> U; |
281 |
} |
282 |
diff --git a/third_party/rust/packed_simd/src/codegen/math.rs b/third_party/rust/packed_simd/src/codegen/math.rs |
283 |
--- third_party/rust/packed_simd/src/codegen/math.rs |
284 |
+++ third_party/rust/packed_simd/src/codegen/math.rs |
285 |
@@ -1,3 +1,3 @@ |
286 |
//! Vertical math operations |
287 |
|
288 |
-crate mod float; |
289 |
+pub(crate) mod float; |
290 |
diff --git a/third_party/rust/packed_simd/src/codegen/math/float.rs b/third_party/rust/packed_simd/src/codegen/math/float.rs |
291 |
--- third_party/rust/packed_simd/src/codegen/math/float.rs |
292 |
+++ third_party/rust/packed_simd/src/codegen/math/float.rs |
293 |
@@ -1,18 +1,18 @@ |
294 |
//! Vertical floating-point math operations. |
295 |
#![allow(clippy::useless_transmute)] |
296 |
|
297 |
#[macro_use] |
298 |
-crate mod macros; |
299 |
-crate mod abs; |
300 |
-crate mod cos; |
301 |
-crate mod cos_pi; |
302 |
-crate mod exp; |
303 |
-crate mod ln; |
304 |
-crate mod mul_add; |
305 |
-crate mod mul_adde; |
306 |
-crate mod powf; |
307 |
-crate mod sin; |
308 |
-crate mod sin_cos_pi; |
309 |
-crate mod sin_pi; |
310 |
-crate mod sqrt; |
311 |
-crate mod sqrte; |
312 |
+pub(crate) mod macros; |
313 |
+pub(crate) mod abs; |
314 |
+pub(crate) mod cos; |
315 |
+pub(crate) mod cos_pi; |
316 |
+pub(crate) mod exp; |
317 |
+pub(crate) mod ln; |
318 |
+pub(crate) mod mul_add; |
319 |
+pub(crate) mod mul_adde; |
320 |
+pub(crate) mod powf; |
321 |
+pub(crate) mod sin; |
322 |
+pub(crate) mod sin_cos_pi; |
323 |
+pub(crate) mod sin_pi; |
324 |
+pub(crate) mod sqrt; |
325 |
+pub(crate) mod sqrte; |
326 |
diff --git a/third_party/rust/packed_simd/src/codegen/math/float/abs.rs b/third_party/rust/packed_simd/src/codegen/math/float/abs.rs |
327 |
--- third_party/rust/packed_simd/src/codegen/math/float/abs.rs |
328 |
+++ third_party/rust/packed_simd/src/codegen/math/float/abs.rs |
329 |
@@ -1,16 +1,16 @@ |
330 |
//! Vertical floating-point `fabs` |
331 |
#![allow(unused)] |
332 |
|
333 |
// FIXME 64-bit 1 elem vectors fabs |
334 |
|
335 |
use crate::*; |
336 |
|
337 |
-crate trait Abs { |
338 |
+pub(crate) trait Abs { |
339 |
fn abs(self) -> Self; |
340 |
} |
341 |
|
342 |
#[allow(improper_ctypes)] |
343 |
extern "C" { |
344 |
#[link_name = "llvm.fabs.v2f32"] |
345 |
fn fabs_v2f32(x: f32x2) -> f32x2; |
346 |
#[link_name = "llvm.fabs.v4f32"] |
347 |
diff --git a/third_party/rust/packed_simd/src/codegen/math/float/cos.rs b/third_party/rust/packed_simd/src/codegen/math/float/cos.rs |
348 |
--- third_party/rust/packed_simd/src/codegen/math/float/cos.rs |
349 |
+++ third_party/rust/packed_simd/src/codegen/math/float/cos.rs |
350 |
@@ -1,16 +1,16 @@ |
351 |
//! Vertical floating-point `cos` |
352 |
#![allow(unused)] |
353 |
|
354 |
// FIXME 64-bit 1 elem vector cos |
355 |
|
356 |
use crate::*; |
357 |
|
358 |
-crate trait Cos { |
359 |
+pub(crate) trait Cos { |
360 |
fn cos(self) -> Self; |
361 |
} |
362 |
|
363 |
#[allow(improper_ctypes)] |
364 |
extern "C" { |
365 |
#[link_name = "llvm.cos.v2f32"] |
366 |
fn cos_v2f32(x: f32x2) -> f32x2; |
367 |
#[link_name = "llvm.cos.v4f32"] |
368 |
diff --git a/third_party/rust/packed_simd/src/codegen/math/float/cos_pi.rs b/third_party/rust/packed_simd/src/codegen/math/float/cos_pi.rs |
369 |
--- third_party/rust/packed_simd/src/codegen/math/float/cos_pi.rs |
370 |
+++ third_party/rust/packed_simd/src/codegen/math/float/cos_pi.rs |
371 |
@@ -1,16 +1,16 @@ |
372 |
//! Vertical floating-point `cos` |
373 |
#![allow(unused)] |
374 |
|
375 |
// FIXME 64-bit 1 elem vectors cos_pi |
376 |
|
377 |
use crate::*; |
378 |
|
379 |
-crate trait CosPi { |
380 |
+pub(crate) trait CosPi { |
381 |
fn cos_pi(self) -> Self; |
382 |
} |
383 |
|
384 |
gen_unary_impl_table!(CosPi, cos_pi); |
385 |
|
386 |
macro_rules! impl_def { |
387 |
($vid:ident, $PI:path) => { |
388 |
impl CosPi for $vid { |
389 |
diff --git a/third_party/rust/packed_simd/src/codegen/math/float/exp.rs b/third_party/rust/packed_simd/src/codegen/math/float/exp.rs |
390 |
--- third_party/rust/packed_simd/src/codegen/math/float/exp.rs |
391 |
+++ third_party/rust/packed_simd/src/codegen/math/float/exp.rs |
392 |
@@ -1,16 +1,16 @@ |
393 |
//! Vertical floating-point `exp` |
394 |
#![allow(unused)] |
395 |
|
396 |
// FIXME 64-bit expgle elem vectors misexpg |
397 |
|
398 |
use crate::*; |
399 |
|
400 |
-crate trait Exp { |
401 |
+pub(crate) trait Exp { |
402 |
fn exp(self) -> Self; |
403 |
} |
404 |
|
405 |
#[allow(improper_ctypes)] |
406 |
extern "C" { |
407 |
#[link_name = "llvm.exp.v2f32"] |
408 |
fn exp_v2f32(x: f32x2) -> f32x2; |
409 |
#[link_name = "llvm.exp.v4f32"] |
410 |
diff --git a/third_party/rust/packed_simd/src/codegen/math/float/ln.rs b/third_party/rust/packed_simd/src/codegen/math/float/ln.rs |
411 |
--- third_party/rust/packed_simd/src/codegen/math/float/ln.rs |
412 |
+++ third_party/rust/packed_simd/src/codegen/math/float/ln.rs |
413 |
@@ -1,16 +1,16 @@ |
414 |
//! Vertical floating-point `ln` |
415 |
#![allow(unused)] |
416 |
|
417 |
// FIXME 64-bit lngle elem vectors mislng |
418 |
|
419 |
use crate::*; |
420 |
|
421 |
-crate trait Ln { |
422 |
+pub(crate) trait Ln { |
423 |
fn ln(self) -> Self; |
424 |
} |
425 |
|
426 |
#[allow(improper_ctypes)] |
427 |
extern "C" { |
428 |
#[link_name = "llvm.log.v2f32"] |
429 |
fn ln_v2f32(x: f32x2) -> f32x2; |
430 |
#[link_name = "llvm.log.v4f32"] |
431 |
diff --git a/third_party/rust/packed_simd/src/codegen/math/float/mul_add.rs b/third_party/rust/packed_simd/src/codegen/math/float/mul_add.rs |
432 |
--- third_party/rust/packed_simd/src/codegen/math/float/mul_add.rs |
433 |
+++ third_party/rust/packed_simd/src/codegen/math/float/mul_add.rs |
434 |
@@ -1,15 +1,15 @@ |
435 |
//! Vertical floating-point `mul_add` |
436 |
#![allow(unused)] |
437 |
use crate::*; |
438 |
|
439 |
// FIXME: 64-bit 1 element mul_add |
440 |
|
441 |
-crate trait MulAdd { |
442 |
+pub(crate) trait MulAdd { |
443 |
fn mul_add(self, y: Self, z: Self) -> Self; |
444 |
} |
445 |
|
446 |
#[cfg(not(target_arch = "s390x"))] |
447 |
#[allow(improper_ctypes)] |
448 |
extern "C" { |
449 |
#[link_name = "llvm.fma.v2f32"] |
450 |
fn fma_v2f32(x: f32x2, y: f32x2, z: f32x2) -> f32x2; |
451 |
diff --git a/third_party/rust/packed_simd/src/codegen/math/float/mul_adde.rs b/third_party/rust/packed_simd/src/codegen/math/float/mul_adde.rs |
452 |
--- third_party/rust/packed_simd/src/codegen/math/float/mul_adde.rs |
453 |
+++ third_party/rust/packed_simd/src/codegen/math/float/mul_adde.rs |
454 |
@@ -1,14 +1,14 @@ |
455 |
//! Approximation for floating-point `mul_add` |
456 |
use crate::*; |
457 |
|
458 |
// FIXME: 64-bit 1 element mul_adde |
459 |
|
460 |
-crate trait MulAddE { |
461 |
+pub(crate) trait MulAddE { |
462 |
fn mul_adde(self, y: Self, z: Self) -> Self; |
463 |
} |
464 |
|
465 |
#[cfg(not(target_arch = "s390x"))] |
466 |
#[allow(improper_ctypes)] |
467 |
extern "C" { |
468 |
#[link_name = "llvm.fmuladd.v2f32"] |
469 |
fn fmuladd_v2f32(x: f32x2, y: f32x2, z: f32x2) -> f32x2; |
470 |
diff --git a/third_party/rust/packed_simd/src/codegen/math/float/powf.rs b/third_party/rust/packed_simd/src/codegen/math/float/powf.rs |
471 |
--- third_party/rust/packed_simd/src/codegen/math/float/powf.rs |
472 |
+++ third_party/rust/packed_simd/src/codegen/math/float/powf.rs |
473 |
@@ -1,16 +1,16 @@ |
474 |
//! Vertical floating-point `powf` |
475 |
#![allow(unused)] |
476 |
|
477 |
// FIXME 64-bit powfgle elem vectors mispowfg |
478 |
|
479 |
use crate::*; |
480 |
|
481 |
-crate trait Powf { |
482 |
+pub(crate) trait Powf { |
483 |
fn powf(self, x: Self) -> Self; |
484 |
} |
485 |
|
486 |
#[allow(improper_ctypes)] |
487 |
extern "C" { |
488 |
#[link_name = "llvm.pow.v2f32"] |
489 |
fn powf_v2f32(x: f32x2, y: f32x2) -> f32x2; |
490 |
#[link_name = "llvm.pow.v4f32"] |
491 |
diff --git a/third_party/rust/packed_simd/src/codegen/math/float/sin.rs b/third_party/rust/packed_simd/src/codegen/math/float/sin.rs |
492 |
--- third_party/rust/packed_simd/src/codegen/math/float/sin.rs |
493 |
+++ third_party/rust/packed_simd/src/codegen/math/float/sin.rs |
494 |
@@ -1,16 +1,16 @@ |
495 |
//! Vertical floating-point `sin` |
496 |
#![allow(unused)] |
497 |
|
498 |
// FIXME 64-bit 1 elem vectors sin |
499 |
|
500 |
use crate::*; |
501 |
|
502 |
-crate trait Sin { |
503 |
+pub(crate) trait Sin { |
504 |
fn sin(self) -> Self; |
505 |
} |
506 |
|
507 |
#[allow(improper_ctypes)] |
508 |
extern "C" { |
509 |
#[link_name = "llvm.sin.v2f32"] |
510 |
fn sin_v2f32(x: f32x2) -> f32x2; |
511 |
#[link_name = "llvm.sin.v4f32"] |
512 |
diff --git a/third_party/rust/packed_simd/src/codegen/math/float/sin_cos_pi.rs b/third_party/rust/packed_simd/src/codegen/math/float/sin_cos_pi.rs |
513 |
--- third_party/rust/packed_simd/src/codegen/math/float/sin_cos_pi.rs |
514 |
+++ third_party/rust/packed_simd/src/codegen/math/float/sin_cos_pi.rs |
515 |
@@ -1,16 +1,16 @@ |
516 |
//! Vertical floating-point `sin_cos` |
517 |
#![allow(unused)] |
518 |
|
519 |
// FIXME 64-bit 1 elem vectors sin_cos |
520 |
|
521 |
use crate::*; |
522 |
|
523 |
-crate trait SinCosPi: Sized { |
524 |
+pub(crate) trait SinCosPi: Sized { |
525 |
type Output; |
526 |
fn sin_cos_pi(self) -> Self::Output; |
527 |
} |
528 |
|
529 |
macro_rules! impl_def { |
530 |
($vid:ident, $PI:path) => { |
531 |
impl SinCosPi for $vid { |
532 |
type Output = (Self, Self); |
533 |
diff --git a/third_party/rust/packed_simd/src/codegen/math/float/sin_pi.rs b/third_party/rust/packed_simd/src/codegen/math/float/sin_pi.rs |
534 |
--- third_party/rust/packed_simd/src/codegen/math/float/sin_pi.rs |
535 |
+++ third_party/rust/packed_simd/src/codegen/math/float/sin_pi.rs |
536 |
@@ -1,16 +1,16 @@ |
537 |
//! Vertical floating-point `sin_pi` |
538 |
#![allow(unused)] |
539 |
|
540 |
// FIXME 64-bit 1 elem vectors sin_pi |
541 |
|
542 |
use crate::*; |
543 |
|
544 |
-crate trait SinPi { |
545 |
+pub(crate) trait SinPi { |
546 |
fn sin_pi(self) -> Self; |
547 |
} |
548 |
|
549 |
gen_unary_impl_table!(SinPi, sin_pi); |
550 |
|
551 |
macro_rules! impl_def { |
552 |
($vid:ident, $PI:path) => { |
553 |
impl SinPi for $vid { |
554 |
diff --git a/third_party/rust/packed_simd/src/codegen/math/float/sqrt.rs b/third_party/rust/packed_simd/src/codegen/math/float/sqrt.rs |
555 |
--- third_party/rust/packed_simd/src/codegen/math/float/sqrt.rs |
556 |
+++ third_party/rust/packed_simd/src/codegen/math/float/sqrt.rs |
557 |
@@ -1,16 +1,16 @@ |
558 |
//! Vertical floating-point `sqrt` |
559 |
#![allow(unused)] |
560 |
|
561 |
// FIXME 64-bit 1 elem vectors sqrt |
562 |
|
563 |
use crate::*; |
564 |
|
565 |
-crate trait Sqrt { |
566 |
+pub(crate) trait Sqrt { |
567 |
fn sqrt(self) -> Self; |
568 |
} |
569 |
|
570 |
#[allow(improper_ctypes)] |
571 |
extern "C" { |
572 |
#[link_name = "llvm.sqrt.v2f32"] |
573 |
fn sqrt_v2f32(x: f32x2) -> f32x2; |
574 |
#[link_name = "llvm.sqrt.v4f32"] |
575 |
diff --git a/third_party/rust/packed_simd/src/codegen/math/float/sqrte.rs b/third_party/rust/packed_simd/src/codegen/math/float/sqrte.rs |
576 |
--- third_party/rust/packed_simd/src/codegen/math/float/sqrte.rs |
577 |
+++ third_party/rust/packed_simd/src/codegen/math/float/sqrte.rs |
578 |
@@ -1,17 +1,17 @@ |
579 |
//! Vertical floating-point `sqrt` |
580 |
#![allow(unused)] |
581 |
|
582 |
// FIXME 64-bit 1 elem vectors sqrte |
583 |
|
584 |
use crate::llvm::simd_fsqrt; |
585 |
use crate::*; |
586 |
|
587 |
-crate trait Sqrte { |
588 |
+pub(crate) trait Sqrte { |
589 |
fn sqrte(self) -> Self; |
590 |
} |
591 |
|
592 |
gen_unary_impl_table!(Sqrte, sqrte); |
593 |
|
594 |
cfg_if! { |
595 |
if #[cfg(all(target_arch = "x86_64", feature = "sleef-sys"))] { |
596 |
use sleef_sys::*; |
597 |
diff --git a/third_party/rust/packed_simd/src/codegen/pointer_sized_int.rs b/third_party/rust/packed_simd/src/codegen/pointer_sized_int.rs |
598 |
--- third_party/rust/packed_simd/src/codegen/pointer_sized_int.rs |
599 |
+++ third_party/rust/packed_simd/src/codegen/pointer_sized_int.rs |
600 |
@@ -1,28 +1,28 @@ |
601 |
//! Provides `isize` and `usize` |
602 |
|
603 |
use cfg_if::cfg_if; |
604 |
|
605 |
cfg_if! { |
606 |
if #[cfg(target_pointer_width = "8")] { |
607 |
- crate type isize_ = i8; |
608 |
- crate type usize_ = u8; |
609 |
+ pub(crate) type isize_ = i8; |
610 |
+ pub(crate) type usize_ = u8; |
611 |
} else if #[cfg(target_pointer_width = "16")] { |
612 |
- crate type isize_ = i16; |
613 |
- crate type usize_ = u16; |
614 |
+ pub(crate) type isize_ = i16; |
615 |
+ pub(crate) type usize_ = u16; |
616 |
} else if #[cfg(target_pointer_width = "32")] { |
617 |
- crate type isize_ = i32; |
618 |
- crate type usize_ = u32; |
619 |
+ pub(crate) type isize_ = i32; |
620 |
+ pub(crate) type usize_ = u32; |
621 |
|
622 |
} else if #[cfg(target_pointer_width = "64")] { |
623 |
- crate type isize_ = i64; |
624 |
- crate type usize_ = u64; |
625 |
+ pub(crate) type isize_ = i64; |
626 |
+ pub(crate) type usize_ = u64; |
627 |
} else if #[cfg(target_pointer_width = "64")] { |
628 |
- crate type isize_ = i64; |
629 |
- crate type usize_ = u64; |
630 |
+ pub(crate) type isize_ = i64; |
631 |
+ pub(crate) type usize_ = u64; |
632 |
} else if #[cfg(target_pointer_width = "128")] { |
633 |
- crate type isize_ = i128; |
634 |
- crate type usize_ = u128; |
635 |
+ pub(crate) type isize_ = i128; |
636 |
+ pub(crate) type usize_ = u128; |
637 |
} else { |
638 |
compile_error!("unsupported target_pointer_width"); |
639 |
} |
640 |
} |
641 |
diff --git a/third_party/rust/packed_simd/src/codegen/reductions.rs b/third_party/rust/packed_simd/src/codegen/reductions.rs |
642 |
--- third_party/rust/packed_simd/src/codegen/reductions.rs |
643 |
+++ third_party/rust/packed_simd/src/codegen/reductions.rs |
644 |
@@ -1,1 +1,1 @@ |
645 |
-crate mod mask; |
646 |
+pub(crate) mod mask; |
647 |
diff --git a/third_party/rust/packed_simd/src/codegen/reductions/mask.rs b/third_party/rust/packed_simd/src/codegen/reductions/mask.rs |
648 |
--- third_party/rust/packed_simd/src/codegen/reductions/mask.rs |
649 |
+++ third_party/rust/packed_simd/src/codegen/reductions/mask.rs |
650 |
@@ -2,21 +2,21 @@ |
651 |
//! |
652 |
//! Works around [LLVM bug 36702]. |
653 |
//! |
654 |
//! [LLVM bug 36702]: https://bugs.llvm.org/show_bug.cgi?id=36702 |
655 |
#![allow(unused_macros)] |
656 |
|
657 |
use crate::*; |
658 |
|
659 |
-crate trait All: crate::marker::Sized { |
660 |
+pub(crate) trait All: crate::marker::Sized { |
661 |
unsafe fn all(self) -> bool; |
662 |
} |
663 |
|
664 |
-crate trait Any: crate::marker::Sized { |
665 |
+pub(crate) trait Any: crate::marker::Sized { |
666 |
unsafe fn any(self) -> bool; |
667 |
} |
668 |
|
669 |
#[macro_use] |
670 |
mod fallback_impl; |
671 |
|
672 |
cfg_if! { |
673 |
if #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] { |
674 |
diff --git a/third_party/rust/packed_simd/src/codegen/swap_bytes.rs b/third_party/rust/packed_simd/src/codegen/swap_bytes.rs |
675 |
--- third_party/rust/packed_simd/src/codegen/swap_bytes.rs |
676 |
+++ third_party/rust/packed_simd/src/codegen/swap_bytes.rs |
677 |
@@ -1,26 +1,26 @@ |
678 |
//! Horizontal swap bytes reductions. |
679 |
|
680 |
// FIXME: investigate using `llvm.bswap` |
681 |
// https://github.com/rust-lang-nursery/packed_simd/issues/19 |
682 |
|
683 |
use crate::*; |
684 |
|
685 |
-crate trait SwapBytes { |
686 |
+pub(crate) trait SwapBytes { |
687 |
fn swap_bytes(self) -> Self; |
688 |
} |
689 |
|
690 |
macro_rules! impl_swap_bytes { |
691 |
(v16: $($id:ident,)+) => { |
692 |
$( |
693 |
impl SwapBytes for $id { |
694 |
#[inline] |
695 |
fn swap_bytes(self) -> Self { |
696 |
- unsafe { shuffle!(self, [1, 0]) } |
697 |
+ shuffle!(self, [1, 0]) |
698 |
} |
699 |
} |
700 |
)+ |
701 |
}; |
702 |
(v32: $($id:ident,)+) => { |
703 |
$( |
704 |
impl SwapBytes for $id { |
705 |
#[inline] |
706 |
diff --git a/third_party/rust/packed_simd/src/codegen/vPtr.rs b/third_party/rust/packed_simd/src/codegen/vPtr.rs |
707 |
--- third_party/rust/packed_simd/src/codegen/vPtr.rs |
708 |
+++ third_party/rust/packed_simd/src/codegen/vPtr.rs |
709 |
@@ -1,16 +1,16 @@ |
710 |
//! Pointer vector types |
711 |
|
712 |
macro_rules! impl_simd_ptr { |
713 |
([$ptr_ty:ty; $elem_count:expr]: $tuple_id:ident | $ty:ident |
714 |
| $($tys:ty),*) => { |
715 |
#[derive(Copy, Clone)] |
716 |
#[repr(simd)] |
717 |
- pub struct $tuple_id<$ty>($(crate $tys),*); |
718 |
+ pub struct $tuple_id<$ty>($(pub(crate) $tys),*); |
719 |
//^^^^^^^ leaked through SimdArray |
720 |
|
721 |
impl<$ty> crate::sealed::Seal for [$ptr_ty; $elem_count] {} |
722 |
impl<$ty> crate::sealed::SimdArray for [$ptr_ty; $elem_count] { |
723 |
type Tuple = $tuple_id<$ptr_ty>; |
724 |
type T = $ptr_ty; |
725 |
const N: usize = $elem_count; |
726 |
type NT = [u32; $elem_count]; |
727 |
diff --git a/third_party/rust/packed_simd/src/lib.rs b/third_party/rust/packed_simd/src/lib.rs |
728 |
--- third_party/rust/packed_simd/src/lib.rs |
729 |
+++ third_party/rust/packed_simd/src/lib.rs |
730 |
@@ -206,14 +206,13 @@ |
731 |
rustc_attrs, |
732 |
platform_intrinsics, |
733 |
stdsimd, |
734 |
- aarch64_target_feature, |
735 |
arm_target_feature, |
736 |
link_llvm_intrinsics, |
737 |
core_intrinsics, |
738 |
stmt_expr_attributes, |
739 |
- crate_visibility_modifier, |
740 |
custom_inner_attributes |
741 |
)] |
742 |
+#![cfg_attr(aarch64_target_feature, feature(aarch64_target_feature))] |
743 |
#![allow(non_camel_case_types, non_snake_case, |
744 |
// FIXME: these types are unsound in C FFI already |
745 |
// See https://github.com/rust-lang/rust/issues/53346 |
746 |
@@ -334,6 +333,6 @@ pub use self::codegen::llvm::{ |
747 |
__shuffle_vector4, __shuffle_vector64, __shuffle_vector8, |
748 |
}; |
749 |
|
750 |
-crate mod llvm { |
751 |
- crate use crate::codegen::llvm::*; |
752 |
+pub(crate) mod llvm { |
753 |
+ pub(crate) use crate::codegen::llvm::*; |
754 |
} |
755 |
diff --git a/third_party/rust/packed_simd/src/testing.rs b/third_party/rust/packed_simd/src/testing.rs |
756 |
--- third_party/rust/packed_simd/src/testing.rs |
757 |
+++ third_party/rust/packed_simd/src/testing.rs |
758 |
@@ -1,8 +1,8 @@ |
759 |
//! Testing macros and other utilities. |
760 |
|
761 |
#[macro_use] |
762 |
mod macros; |
763 |
|
764 |
#[cfg(test)] |
765 |
#[macro_use] |
766 |
-crate mod utils; |
767 |
+pub(crate) mod utils; |
1 |
- Fix packed_simd with the relevant parts of https://hg.mozilla.org/releases/mozilla-beta/raw-rev/c37c77a20f96 |
768 |
- Fix packed_simd with the relevant parts of https://hg.mozilla.org/releases/mozilla-beta/raw-rev/c37c77a20f96 |
2 |
-- |
|
|
3 |
mail/thunderbird/files/patch-rust-1.63 | 767 +++++++++++++++++++++++++ |
769 |
mail/thunderbird/files/patch-rust-1.63 | 767 +++++++++++++++++++++++++ |
4 |
1 file changed, 767 insertions(+) |
770 |
1 file changed, 767 insertions(+) |
5 |
create mode 100644 mail/thunderbird/files/patch-rust-1.63 |
771 |
create mode 100644 mail/thunderbird/files/patch-rust-1.63 |