Skip to content

Commit 40d3e0a

Browse files
committed
Revert changes to generated files
1 parent 1187e98 commit 40d3e0a

File tree

2 files changed

+2616
-0
lines changed

2 files changed

+2616
-0
lines changed

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

Lines changed: 368 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,3 +289,371 @@ pub unsafe fn vsub_f64(a: float64x1_t, b: float64x1_t) -> float64x1_t {
289289
pub unsafe fn vsubq_f64(a: float64x2_t, b: float64x2_t) -> float64x2_t {
290290
simd_sub(a, b)
291291
}
292+
293+
#[cfg(test)]
294+
mod test {
295+
use super::*;
296+
use crate::core_arch::simd::*;
297+
use std::mem::transmute;
298+
use stdarch_test::simd_test;
299+
300+
#[simd_test(enable = "neon")]
301+
unsafe fn test_vceq_u64() {
302+
let a: u64x1 = u64x1::new(0x00);
303+
let b: u64x1 = u64x1::new(0x00);
304+
let e: u64x1 = u64x1::new(0xFF_FF_FF_FF_FF_FF_FF_FF);
305+
let r: u64x1 = transmute(vceq_u64(transmute(a), transmute(b)));
306+
assert_eq!(r, e);
307+
308+
let a: u64x1 = u64x1::new(0x00);
309+
let b: u64x1 = u64x1::new(0x00);
310+
let e: u64x1 = u64x1::new(0xFF_FF_FF_FF_FF_FF_FF_FF);
311+
let r: u64x1 = transmute(vceq_u64(transmute(a), transmute(b)));
312+
assert_eq!(r, e);
313+
}
314+
315+
#[simd_test(enable = "neon")]
316+
unsafe fn test_vceqq_u64() {
317+
let a: u64x2 = u64x2::new(0x00, 0x01);
318+
let b: u64x2 = u64x2::new(0x00, 0x01);
319+
let e: u64x2 = u64x2::new(0xFF_FF_FF_FF_FF_FF_FF_FF, 0xFF_FF_FF_FF_FF_FF_FF_FF);
320+
let r: u64x2 = transmute(vceqq_u64(transmute(a), transmute(b)));
321+
assert_eq!(r, e);
322+
323+
let a: u64x2 = u64x2::new(0x00, 0x01);
324+
let b: u64x2 = u64x2::new(0x00, 0x00);
325+
let e: u64x2 = u64x2::new(0xFF_FF_FF_FF_FF_FF_FF_FF, 0);
326+
let r: u64x2 = transmute(vceqq_u64(transmute(a), transmute(b)));
327+
assert_eq!(r, e);
328+
}
329+
330+
#[simd_test(enable = "neon")]
331+
unsafe fn test_vceq_s64() {
332+
let a: i64x1 = i64x1::new(0x00);
333+
let b: i64x1 = i64x1::new(0x00);
334+
let e: u64x1 = u64x1::new(0xFF_FF_FF_FF_FF_FF_FF_FF);
335+
let r: u64x1 = transmute(vceq_s64(transmute(a), transmute(b)));
336+
assert_eq!(r, e);
337+
338+
let a: i64x1 = i64x1::new(0x00);
339+
let b: i64x1 = i64x1::new(0x00);
340+
let e: u64x1 = u64x1::new(0xFF_FF_FF_FF_FF_FF_FF_FF);
341+
let r: u64x1 = transmute(vceq_s64(transmute(a), transmute(b)));
342+
assert_eq!(r, e);
343+
}
344+
345+
#[simd_test(enable = "neon")]
346+
unsafe fn test_vceqq_s64() {
347+
let a: i64x2 = i64x2::new(0x00, 0x01);
348+
let b: i64x2 = i64x2::new(0x00, 0x01);
349+
let e: u64x2 = u64x2::new(0xFF_FF_FF_FF_FF_FF_FF_FF, 0xFF_FF_FF_FF_FF_FF_FF_FF);
350+
let r: u64x2 = transmute(vceqq_s64(transmute(a), transmute(b)));
351+
assert_eq!(r, e);
352+
353+
let a: i64x2 = i64x2::new(0x00, 0x01);
354+
let b: i64x2 = i64x2::new(0x00, 0x00);
355+
let e: u64x2 = u64x2::new(0xFF_FF_FF_FF_FF_FF_FF_FF, 0);
356+
let r: u64x2 = transmute(vceqq_s64(transmute(a), transmute(b)));
357+
assert_eq!(r, e);
358+
}
359+
360+
#[simd_test(enable = "neon")]
361+
unsafe fn test_vceq_p64() {
362+
let a: i64x1 = i64x1::new(0x00);
363+
let b: i64x1 = i64x1::new(0x00);
364+
let e: u64x1 = u64x1::new(0xFF_FF_FF_FF_FF_FF_FF_FF);
365+
let r: u64x1 = transmute(vceq_p64(transmute(a), transmute(b)));
366+
assert_eq!(r, e);
367+
368+
let a: i64x1 = i64x1::new(0x00);
369+
let b: i64x1 = i64x1::new(0x00);
370+
let e: u64x1 = u64x1::new(0xFF_FF_FF_FF_FF_FF_FF_FF);
371+
let r: u64x1 = transmute(vceq_p64(transmute(a), transmute(b)));
372+
assert_eq!(r, e);
373+
}
374+
375+
#[simd_test(enable = "neon")]
376+
unsafe fn test_vceqq_p64() {
377+
let a: i64x2 = i64x2::new(0x00, 0x01);
378+
let b: i64x2 = i64x2::new(0x00, 0x01);
379+
let e: u64x2 = u64x2::new(0xFF_FF_FF_FF_FF_FF_FF_FF, 0xFF_FF_FF_FF_FF_FF_FF_FF);
380+
let r: u64x2 = transmute(vceqq_p64(transmute(a), transmute(b)));
381+
assert_eq!(r, e);
382+
383+
let a: i64x2 = i64x2::new(0x00, 0x01);
384+
let b: i64x2 = i64x2::new(0x00, 0x00);
385+
let e: u64x2 = u64x2::new(0xFF_FF_FF_FF_FF_FF_FF_FF, 0);
386+
let r: u64x2 = transmute(vceqq_p64(transmute(a), transmute(b)));
387+
assert_eq!(r, e);
388+
}
389+
390+
#[simd_test(enable = "neon")]
391+
unsafe fn test_vceq_f64() {
392+
let a: f64 = 1.2;
393+
let b: f64 = 1.2;
394+
let e: u64x1 = u64x1::new(0xFF_FF_FF_FF_FF_FF_FF_FF);
395+
let r: u64x1 = transmute(vceq_f64(transmute(a), transmute(b)));
396+
assert_eq!(r, e);
397+
}
398+
399+
#[simd_test(enable = "neon")]
400+
unsafe fn test_vceqq_f64() {
401+
let a: f64x2 = f64x2::new(1.2, 3.4);
402+
let b: f64x2 = f64x2::new(1.2, 3.4);
403+
let e: u64x2 = u64x2::new(0xFF_FF_FF_FF_FF_FF_FF_FF, 0xFF_FF_FF_FF_FF_FF_FF_FF);
404+
let r: u64x2 = transmute(vceqq_f64(transmute(a), transmute(b)));
405+
assert_eq!(r, e);
406+
}
407+
408+
#[simd_test(enable = "neon")]
409+
unsafe fn test_vcgt_s64() {
410+
let a: i64x1 = i64x1::new(1);
411+
let b: i64x1 = i64x1::new(0);
412+
let e: u64x1 = u64x1::new(0xFF_FF_FF_FF_FF_FF_FF_FF);
413+
let r: u64x1 = transmute(vcgt_s64(transmute(a), transmute(b)));
414+
assert_eq!(r, e);
415+
}
416+
417+
#[simd_test(enable = "neon")]
418+
unsafe fn test_vcgtq_s64() {
419+
let a: i64x2 = i64x2::new(1, 2);
420+
let b: i64x2 = i64x2::new(0, 1);
421+
let e: u64x2 = u64x2::new(0xFF_FF_FF_FF_FF_FF_FF_FF, 0xFF_FF_FF_FF_FF_FF_FF_FF);
422+
let r: u64x2 = transmute(vcgtq_s64(transmute(a), transmute(b)));
423+
assert_eq!(r, e);
424+
}
425+
426+
#[simd_test(enable = "neon")]
427+
unsafe fn test_vcgt_u64() {
428+
let a: u64x1 = u64x1::new(1);
429+
let b: u64x1 = u64x1::new(0);
430+
let e: u64x1 = u64x1::new(0xFF_FF_FF_FF_FF_FF_FF_FF);
431+
let r: u64x1 = transmute(vcgt_u64(transmute(a), transmute(b)));
432+
assert_eq!(r, e);
433+
}
434+
435+
#[simd_test(enable = "neon")]
436+
unsafe fn test_vcgtq_u64() {
437+
let a: u64x2 = u64x2::new(1, 2);
438+
let b: u64x2 = u64x2::new(0, 1);
439+
let e: u64x2 = u64x2::new(0xFF_FF_FF_FF_FF_FF_FF_FF, 0xFF_FF_FF_FF_FF_FF_FF_FF);
440+
let r: u64x2 = transmute(vcgtq_u64(transmute(a), transmute(b)));
441+
assert_eq!(r, e);
442+
}
443+
444+
#[simd_test(enable = "neon")]
445+
unsafe fn test_vcgt_f64() {
446+
let a: f64 = 1.2;
447+
let b: f64 = 0.1;
448+
let e: u64x1 = u64x1::new(0xFF_FF_FF_FF_FF_FF_FF_FF);
449+
let r: u64x1 = transmute(vcgt_f64(transmute(a), transmute(b)));
450+
assert_eq!(r, e);
451+
}
452+
453+
#[simd_test(enable = "neon")]
454+
unsafe fn test_vcgtq_f64() {
455+
let a: f64x2 = f64x2::new(1.2, 2.3);
456+
let b: f64x2 = f64x2::new(0.1, 1.2);
457+
let e: u64x2 = u64x2::new(0xFF_FF_FF_FF_FF_FF_FF_FF, 0xFF_FF_FF_FF_FF_FF_FF_FF);
458+
let r: u64x2 = transmute(vcgtq_f64(transmute(a), transmute(b)));
459+
assert_eq!(r, e);
460+
}
461+
462+
#[simd_test(enable = "neon")]
463+
unsafe fn test_vclt_s64() {
464+
let a: i64x1 = i64x1::new(0);
465+
let b: i64x1 = i64x1::new(1);
466+
let e: u64x1 = u64x1::new(0xFF_FF_FF_FF_FF_FF_FF_FF);
467+
let r: u64x1 = transmute(vclt_s64(transmute(a), transmute(b)));
468+
assert_eq!(r, e);
469+
}
470+
471+
#[simd_test(enable = "neon")]
472+
unsafe fn test_vcltq_s64() {
473+
let a: i64x2 = i64x2::new(0, 1);
474+
let b: i64x2 = i64x2::new(1, 2);
475+
let e: u64x2 = u64x2::new(0xFF_FF_FF_FF_FF_FF_FF_FF, 0xFF_FF_FF_FF_FF_FF_FF_FF);
476+
let r: u64x2 = transmute(vcltq_s64(transmute(a), transmute(b)));
477+
assert_eq!(r, e);
478+
}
479+
480+
#[simd_test(enable = "neon")]
481+
unsafe fn test_vclt_u64() {
482+
let a: u64x1 = u64x1::new(0);
483+
let b: u64x1 = u64x1::new(1);
484+
let e: u64x1 = u64x1::new(0xFF_FF_FF_FF_FF_FF_FF_FF);
485+
let r: u64x1 = transmute(vclt_u64(transmute(a), transmute(b)));
486+
assert_eq!(r, e);
487+
}
488+
489+
#[simd_test(enable = "neon")]
490+
unsafe fn test_vcltq_u64() {
491+
let a: u64x2 = u64x2::new(0, 1);
492+
let b: u64x2 = u64x2::new(1, 2);
493+
let e: u64x2 = u64x2::new(0xFF_FF_FF_FF_FF_FF_FF_FF, 0xFF_FF_FF_FF_FF_FF_FF_FF);
494+
let r: u64x2 = transmute(vcltq_u64(transmute(a), transmute(b)));
495+
assert_eq!(r, e);
496+
}
497+
498+
#[simd_test(enable = "neon")]
499+
unsafe fn test_vclt_f64() {
500+
let a: f64 = 0.1;
501+
let b: f64 = 1.2;
502+
let e: u64x1 = u64x1::new(0xFF_FF_FF_FF_FF_FF_FF_FF);
503+
let r: u64x1 = transmute(vclt_f64(transmute(a), transmute(b)));
504+
assert_eq!(r, e);
505+
}
506+
507+
#[simd_test(enable = "neon")]
508+
unsafe fn test_vcltq_f64() {
509+
let a: f64x2 = f64x2::new(0.1, 1.2);
510+
let b: f64x2 = f64x2::new(1.2, 2.3);
511+
let e: u64x2 = u64x2::new(0xFF_FF_FF_FF_FF_FF_FF_FF, 0xFF_FF_FF_FF_FF_FF_FF_FF);
512+
let r: u64x2 = transmute(vcltq_f64(transmute(a), transmute(b)));
513+
assert_eq!(r, e);
514+
}
515+
516+
#[simd_test(enable = "neon")]
517+
unsafe fn test_vcle_s64() {
518+
let a: i64x1 = i64x1::new(0);
519+
let b: i64x1 = i64x1::new(1);
520+
let e: u64x1 = u64x1::new(0xFF_FF_FF_FF_FF_FF_FF_FF);
521+
let r: u64x1 = transmute(vcle_s64(transmute(a), transmute(b)));
522+
assert_eq!(r, e);
523+
}
524+
525+
#[simd_test(enable = "neon")]
526+
unsafe fn test_vcleq_s64() {
527+
let a: i64x2 = i64x2::new(0, 1);
528+
let b: i64x2 = i64x2::new(1, 2);
529+
let e: u64x2 = u64x2::new(0xFF_FF_FF_FF_FF_FF_FF_FF, 0xFF_FF_FF_FF_FF_FF_FF_FF);
530+
let r: u64x2 = transmute(vcleq_s64(transmute(a), transmute(b)));
531+
assert_eq!(r, e);
532+
}
533+
534+
#[simd_test(enable = "neon")]
535+
unsafe fn test_vcle_u64() {
536+
let a: u64x1 = u64x1::new(0);
537+
let b: u64x1 = u64x1::new(1);
538+
let e: u64x1 = u64x1::new(0xFF_FF_FF_FF_FF_FF_FF_FF);
539+
let r: u64x1 = transmute(vcle_u64(transmute(a), transmute(b)));
540+
assert_eq!(r, e);
541+
}
542+
543+
#[simd_test(enable = "neon")]
544+
unsafe fn test_vcleq_u64() {
545+
let a: u64x2 = u64x2::new(0, 1);
546+
let b: u64x2 = u64x2::new(1, 2);
547+
let e: u64x2 = u64x2::new(0xFF_FF_FF_FF_FF_FF_FF_FF, 0xFF_FF_FF_FF_FF_FF_FF_FF);
548+
let r: u64x2 = transmute(vcleq_u64(transmute(a), transmute(b)));
549+
assert_eq!(r, e);
550+
}
551+
552+
#[simd_test(enable = "neon")]
553+
unsafe fn test_vcle_f64() {
554+
let a: f64 = 0.1;
555+
let b: f64 = 1.2;
556+
let e: u64x1 = u64x1::new(0xFF_FF_FF_FF_FF_FF_FF_FF);
557+
let r: u64x1 = transmute(vcle_f64(transmute(a), transmute(b)));
558+
assert_eq!(r, e);
559+
}
560+
561+
#[simd_test(enable = "neon")]
562+
unsafe fn test_vcleq_f64() {
563+
let a: f64x2 = f64x2::new(0.1, 1.2);
564+
let b: f64x2 = f64x2::new(1.2, 2.3);
565+
let e: u64x2 = u64x2::new(0xFF_FF_FF_FF_FF_FF_FF_FF, 0xFF_FF_FF_FF_FF_FF_FF_FF);
566+
let r: u64x2 = transmute(vcleq_f64(transmute(a), transmute(b)));
567+
assert_eq!(r, e);
568+
}
569+
570+
#[simd_test(enable = "neon")]
571+
unsafe fn test_vcge_s64() {
572+
let a: i64x1 = i64x1::new(1);
573+
let b: i64x1 = i64x1::new(0);
574+
let e: u64x1 = u64x1::new(0xFF_FF_FF_FF_FF_FF_FF_FF);
575+
let r: u64x1 = transmute(vcge_s64(transmute(a), transmute(b)));
576+
assert_eq!(r, e);
577+
}
578+
579+
#[simd_test(enable = "neon")]
580+
unsafe fn test_vcgeq_s64() {
581+
let a: i64x2 = i64x2::new(1, 2);
582+
let b: i64x2 = i64x2::new(0, 1);
583+
let e: u64x2 = u64x2::new(0xFF_FF_FF_FF_FF_FF_FF_FF, 0xFF_FF_FF_FF_FF_FF_FF_FF);
584+
let r: u64x2 = transmute(vcgeq_s64(transmute(a), transmute(b)));
585+
assert_eq!(r, e);
586+
}
587+
588+
#[simd_test(enable = "neon")]
589+
unsafe fn test_vcge_u64() {
590+
let a: u64x1 = u64x1::new(1);
591+
let b: u64x1 = u64x1::new(0);
592+
let e: u64x1 = u64x1::new(0xFF_FF_FF_FF_FF_FF_FF_FF);
593+
let r: u64x1 = transmute(vcge_u64(transmute(a), transmute(b)));
594+
assert_eq!(r, e);
595+
}
596+
597+
#[simd_test(enable = "neon")]
598+
unsafe fn test_vcgeq_u64() {
599+
let a: u64x2 = u64x2::new(1, 2);
600+
let b: u64x2 = u64x2::new(0, 1);
601+
let e: u64x2 = u64x2::new(0xFF_FF_FF_FF_FF_FF_FF_FF, 0xFF_FF_FF_FF_FF_FF_FF_FF);
602+
let r: u64x2 = transmute(vcgeq_u64(transmute(a), transmute(b)));
603+
assert_eq!(r, e);
604+
}
605+
606+
#[simd_test(enable = "neon")]
607+
unsafe fn test_vcge_f64() {
608+
let a: f64 = 1.2;
609+
let b: f64 = 0.1;
610+
let e: u64x1 = u64x1::new(0xFF_FF_FF_FF_FF_FF_FF_FF);
611+
let r: u64x1 = transmute(vcge_f64(transmute(a), transmute(b)));
612+
assert_eq!(r, e);
613+
}
614+
615+
#[simd_test(enable = "neon")]
616+
unsafe fn test_vcgeq_f64() {
617+
let a: f64x2 = f64x2::new(1.2, 2.3);
618+
let b: f64x2 = f64x2::new(0.1, 1.2);
619+
let e: u64x2 = u64x2::new(0xFF_FF_FF_FF_FF_FF_FF_FF, 0xFF_FF_FF_FF_FF_FF_FF_FF);
620+
let r: u64x2 = transmute(vcgeq_f64(transmute(a), transmute(b)));
621+
assert_eq!(r, e);
622+
}
623+
624+
#[simd_test(enable = "neon")]
625+
unsafe fn test_vmul_f64() {
626+
let a: f64 = 1.0;
627+
let b: f64 = 2.0;
628+
let e: f64 = 2.0;
629+
let r: f64 = transmute(vmul_f64(transmute(a), transmute(b)));
630+
assert_eq!(r, e);
631+
}
632+
633+
#[simd_test(enable = "neon")]
634+
unsafe fn test_vmulq_f64() {
635+
let a: f64x2 = f64x2::new(1.0, 2.0);
636+
let b: f64x2 = f64x2::new(2.0, 3.0);
637+
let e: f64x2 = f64x2::new(2.0, 6.0);
638+
let r: f64x2 = transmute(vmulq_f64(transmute(a), transmute(b)));
639+
assert_eq!(r, e);
640+
}
641+
642+
#[simd_test(enable = "neon")]
643+
unsafe fn test_vsub_f64() {
644+
let a: f64 = 1.0;
645+
let b: f64 = 1.0;
646+
let e: f64 = 0.0;
647+
let r: f64 = transmute(vsub_f64(transmute(a), transmute(b)));
648+
assert_eq!(r, e);
649+
}
650+
651+
#[simd_test(enable = "neon")]
652+
unsafe fn test_vsubq_f64() {
653+
let a: f64x2 = f64x2::new(1.0, 4.0);
654+
let b: f64x2 = f64x2::new(1.0, 2.0);
655+
let e: f64x2 = f64x2::new(0.0, 2.0);
656+
let r: f64x2 = transmute(vsubq_f64(transmute(a), transmute(b)));
657+
assert_eq!(r, e);
658+
}
659+
}

0 commit comments

Comments
 (0)