@@ -1776,288 +1776,288 @@ mod tests {
1776
1776
1777
1777
#[ simd_test( enable = "neon" ) ]
1778
1778
unsafe fn test_vand_s8 ( ) {
1779
- let a = i8x8:: new ( 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 ) ;
1780
- let b = i8x8:: new ( 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 ) ;
1781
- let e = i8x8:: new ( 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 ) ;
1779
+ let a = i8x8:: new ( 0xF0 , 0xF1 , 0xF2 , 0xF3 , 0xF4 , 0xF5 , 0xF6 , 0xF7 ) ;
1780
+ let b = i8x8:: new ( 0x0F , 0x1F , 0x2F , 0x3F , 0x4F , 0x5F , 0x6F , 0x7F ) ;
1781
+ let e = i8x8:: new ( 0x00 , 0x11 , 0x22 , 0x33 , 0x44 , 0x55 , 0x66 , 0x77 ) ;
1782
1782
let r: i8x8 = transmute ( vand_s8 ( transmute ( a) , transmute ( b) ) ) ;
1783
1783
assert_eq ! ( r, e) ;
1784
1784
}
1785
1785
1786
1786
#[ simd_test( enable = "neon" ) ]
1787
1787
unsafe fn test_vandq_s8 ( ) {
1788
- let a = i8x16:: new ( 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 ) ;
1789
- let b = i8x16:: new ( 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 ) ;
1790
- let e = i8x16:: new ( 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 ) ;
1788
+ let a = i8x16:: new ( 0xF0 , 0xF1 , 0xF2 , 0xF3 , 0xF4 , 0xF5 , 0xF6 , 0xF7 , 0xF8 , 0xF9 , 0xFA , 0xFB , 0xFC , 0xFD , 0xFE , 0xFF ) ;
1789
+ let b = i8x16:: new ( 0x0F , 0x1F , 0x2F , 0x3F , 0x4F , 0x5F , 0x6F , 0x7F , 0x8F , 0x9F , 0xAF , 0xBF , 0xCF , 0xDF , 0xEF , 0xFF ) ;
1790
+ let e = i8x16:: new ( 0x00 , 0x11 , 0x22 , 0x33 , 0x44 , 0x55 , 0x66 , 0x77 , 0x88 , 0x99 , 0xAA , 0xBB , 0xCC , 0xDD , 0xEE , 0xFF ) ;
1791
1791
let r: i8x16 = transmute ( vandq_s8 ( transmute ( a) , transmute ( b) ) ) ;
1792
1792
assert_eq ! ( r, e) ;
1793
1793
}
1794
1794
1795
1795
#[ simd_test( enable = "neon" ) ]
1796
1796
unsafe fn test_vand_s16 ( ) {
1797
- let a = i16x4:: new ( 20 , 20 , 20 , 20 ) ;
1798
- let b = i16x4:: new ( 21 , 21 , 21 , 21 ) ;
1799
- let e = i16x4:: new ( 20 , 20 , 20 , 20 ) ;
1797
+ let a = i16x4:: new ( 0xF0F1 , 0xF2F3 , 0xF4F5 , 0xF6F7 ) ;
1798
+ let b = i16x4:: new ( 0x0F1F , 0x2F3F , 0x4F5F , 0x6F7F ) ;
1799
+ let e = i16x4:: new ( 0x0011 , 0x2233 , 0x4455 , 0x6677 ) ;
1800
1800
let r: i16x4 = transmute ( vand_s16 ( transmute ( a) , transmute ( b) ) ) ;
1801
1801
assert_eq ! ( r, e) ;
1802
1802
}
1803
1803
1804
1804
#[ simd_test( enable = "neon" ) ]
1805
1805
unsafe fn test_vandq_s16 ( ) {
1806
- let a = i16x8:: new ( 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 ) ;
1807
- let b = i16x8:: new ( 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 ) ;
1808
- let e = i16x8:: new ( 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 ) ;
1806
+ let a = i16x8:: new ( 0xF0F1 , 0xF2F3 , 0xF4F5 , 0xF6F7 , 0xF8F9 , 0xFAFB , 0xFCFD , 0xFEFF ) ;
1807
+ let b = i16x8:: new ( 0x0F1F , 0x2F3F , 0x4F5F , 0x6F7F , 0x8F9F , 0xAFBF , 0xCFDF , 0xEFFF ) ;
1808
+ let e = i16x8:: new ( 0x0011 , 0x2233 , 0x4455 , 0x6677 , 0x8899 , 0xAABB , 0xCCDD , 0xEEFF ) ;
1809
1809
let r: i16x8 = transmute ( vandq_s16 ( transmute ( a) , transmute ( b) ) ) ;
1810
1810
assert_eq ! ( r, e) ;
1811
1811
}
1812
1812
1813
1813
#[ simd_test( enable = "neon" ) ]
1814
1814
unsafe fn test_vand_s32 ( ) {
1815
- let a = i32x2:: new ( 20 , 20 ) ;
1816
- let b = i32x2:: new ( 21 , 21 ) ;
1817
- let e = i32x2:: new ( 20 , 20 ) ;
1815
+ let a = i32x2:: new ( 0xF0F1F2F3 , 0xF4F5F6F7 ) ;
1816
+ let b = i32x2:: new ( 0x0F1F2F3F , 0x4F5F6F7F ) ;
1817
+ let e = i32x2:: new ( 0x00112233 , 0x44556677 ) ;
1818
1818
let r: i32x2 = transmute ( vand_s32 ( transmute ( a) , transmute ( b) ) ) ;
1819
1819
assert_eq ! ( r, e) ;
1820
1820
}
1821
1821
1822
1822
#[ simd_test( enable = "neon" ) ]
1823
1823
unsafe fn test_vandq_s32 ( ) {
1824
- let a = i32x4:: new ( 20 , 20 , 20 , 20 ) ;
1825
- let b = i32x4:: new ( 21 , 21 , 21 , 21 ) ;
1826
- let e = i32x4:: new ( 20 , 20 , 20 , 20 ) ;
1824
+ let a = i32x4:: new ( 0xF0F1F2F3 , 0xF4F5F6F7 , 0xF8F9FAFB , 0xFCFDFEFF ) ;
1825
+ let b = i32x4:: new ( 0x0F1F2F3F , 0x4F5F6F7F , 0x8F9FAFBF , 0xCFDFEFFF ) ;
1826
+ let e = i32x4:: new ( 0x00112233 , 0x44556677 , 0x8899AABB , 0xCCDDEEFF ) ;
1827
1827
let r: i32x4 = transmute ( vandq_s32 ( transmute ( a) , transmute ( b) ) ) ;
1828
1828
assert_eq ! ( r, e) ;
1829
1829
}
1830
1830
1831
1831
#[ simd_test( enable = "neon" ) ]
1832
1832
unsafe fn test_vand_s64 ( ) {
1833
- let a = i64x1:: new ( 20 ) ;
1834
- let b = i64x1:: new ( 21 ) ;
1835
- let e = i64x1:: new ( 20 ) ;
1833
+ let a = i64x1:: new ( 0xF0F1F2F3F4F5F6F7 ) ;
1834
+ let b = i64x1:: new ( 0x0F1F2F3F4F5F6F7F ) ;
1835
+ let e = i64x1:: new ( 0x0011223344556677 ) ;
1836
1836
let r: i64x1 = transmute ( vand_s64 ( transmute ( a) , transmute ( b) ) ) ;
1837
1837
assert_eq ! ( r, e) ;
1838
1838
}
1839
1839
1840
1840
#[ simd_test( enable = "neon" ) ]
1841
1841
unsafe fn test_vandq_s64 ( ) {
1842
- let a = i64x2:: new ( 20 , 20 ) ;
1843
- let b = i64x2:: new ( 21 , 21 ) ;
1844
- let e = i64x2:: new ( 20 , 20 ) ;
1842
+ let a = i64x2:: new ( 0xF0F1F2F3F4F5F6F7 , 0xF8F9FAFBFCFDFEFF ) ;
1843
+ let b = i64x2:: new ( 0x0F1F2F3F4F5F6F7F , 0x8F9FAFBFCFDFEFFF ) ;
1844
+ let e = i64x2:: new ( 0x0011223344556677 , 0x8899AABBCCDDEEFF ) ;
1845
1845
let r: i64x2 = transmute ( vandq_s64 ( transmute ( a) , transmute ( b) ) ) ;
1846
1846
assert_eq ! ( r, e) ;
1847
1847
}
1848
1848
1849
1849
#[ simd_test( enable = "neon" ) ]
1850
1850
unsafe fn test_vand_u8 ( ) {
1851
- let a = u8x8:: new ( 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 ) ;
1852
- let b = u8x8:: new ( 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 ) ;
1853
- let e = u8x8:: new ( 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 ) ;
1851
+ let a = u8x8:: new ( 0xF0 , 0xF1 , 0xF2 , 0xF3 , 0xF4 , 0xF5 , 0xF6 , 0xF7 ) ;
1852
+ let b = u8x8:: new ( 0x0F , 0x1F , 0x2F , 0x3F , 0x4F , 0x5F , 0x6F , 0x7F ) ;
1853
+ let e = u8x8:: new ( 0x00 , 0x11 , 0x22 , 0x33 , 0x44 , 0x55 , 0x66 , 0x77 ) ;
1854
1854
let r: u8x8 = transmute ( vand_u8 ( transmute ( a) , transmute ( b) ) ) ;
1855
1855
assert_eq ! ( r, e) ;
1856
1856
}
1857
1857
1858
1858
#[ simd_test( enable = "neon" ) ]
1859
1859
unsafe fn test_vandq_u8 ( ) {
1860
- let a = u8x16:: new ( 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 ) ;
1861
- let b = u8x16:: new ( 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 ) ;
1862
- let e = u8x16:: new ( 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 ) ;
1860
+ let a = u8x16:: new ( 0xF0 , 0xF1 , 0xF2 , 0xF3 , 0xF4 , 0xF5 , 0xF6 , 0xF7 , 0xF8 , 0xF9 , 0xFA , 0xFB , 0xFC , 0xFD , 0xFE , 0xFF ) ;
1861
+ let b = u8x16:: new ( 0x0F , 0x1F , 0x2F , 0x3F , 0x4F , 0x5F , 0x6F , 0x7F , 0x8F , 0x9F , 0xAF , 0xBF , 0xCF , 0xDF , 0xEF , 0xFF ) ;
1862
+ let e = u8x16:: new ( 0x00 , 0x11 , 0x22 , 0x33 , 0x44 , 0x55 , 0x66 , 0x77 , 0x88 , 0x99 , 0xAA , 0xBB , 0xCC , 0xDD , 0xEE , 0xFF ) ;
1863
1863
let r: u8x16 = transmute ( vandq_u8 ( transmute ( a) , transmute ( b) ) ) ;
1864
1864
assert_eq ! ( r, e) ;
1865
1865
}
1866
1866
1867
1867
#[ simd_test( enable = "neon" ) ]
1868
1868
unsafe fn test_vand_u16 ( ) {
1869
- let a = u16x4:: new ( 20 , 20 , 20 , 20 ) ;
1870
- let b = u16x4:: new ( 21 , 21 , 21 , 21 ) ;
1871
- let e = u16x4:: new ( 20 , 20 , 20 , 20 ) ;
1869
+ let a = u16x4:: new ( 0xF0F1 , 0xF2F3 , 0xF4F5 , 0xF6F7 ) ;
1870
+ let b = u16x4:: new ( 0x0F1F , 0x2FF , 0x4F5F , 0x6F7F ) ;
1871
+ let e = u16x4:: new ( 0x0011 , 0x2233 , 0x4455 , 0x667 ) ;
1872
1872
let r: u16x4 = transmute ( vand_u16 ( transmute ( a) , transmute ( b) ) ) ;
1873
1873
assert_eq ! ( r, e) ;
1874
1874
}
1875
1875
1876
1876
#[ simd_test( enable = "neon" ) ]
1877
1877
unsafe fn test_vandq_u16 ( ) {
1878
- let a = u16x8:: new ( 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 ) ;
1879
- let b = u16x8:: new ( 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 ) ;
1880
- let e = u16x8:: new ( 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 ) ;
1878
+ let a = u16x8:: new ( 0xF0F1 , 0xF2F3 , 0xF4F5 , 0xF6F7 , 0xF8F9 , 0xFAFB , 0xFCFD , 0xFEFF ) ;
1879
+ let b = u16x8:: new ( 0x0F1F , 0x2F3F , 0x4F5F , 0x6F7F , 0x8F9F , 0xAFBF , 0xCFDF , 0xEFFF ) ;
1880
+ let e = u16x8:: new ( 0x0011 , 0x2233 , 0x4455 , 0x6677 , 0x8899 , 0xAABB , 0xCCDD , 0xEEFF ) ;
1881
1881
let r: u16x8 = transmute ( vandq_u16 ( transmute ( a) , transmute ( b) ) ) ;
1882
1882
assert_eq ! ( r, e) ;
1883
1883
}
1884
1884
1885
1885
#[ simd_test( enable = "neon" ) ]
1886
1886
unsafe fn test_vand_u32 ( ) {
1887
- let a = u32x2:: new ( 20 , 20 ) ;
1888
- let b = u32x2:: new ( 21 , 21 ) ;
1889
- let e = u32x2:: new ( 20 , 20 ) ;
1887
+ let a = u32x2:: new ( 0xF0F1F2F3 , 0xF4F5F6F7 ) ;
1888
+ let b = u32x2:: new ( 0x0F1F2F3F , 0x4F5F6F7F ) ;
1889
+ let e = u32x2:: new ( 0x00112233 , 0x44556677 ) ;
1890
1890
let r: u32x2 = transmute ( vand_u32 ( transmute ( a) , transmute ( b) ) ) ;
1891
1891
assert_eq ! ( r, e) ;
1892
1892
}
1893
1893
1894
1894
#[ simd_test( enable = "neon" ) ]
1895
1895
unsafe fn test_vandq_u32 ( ) {
1896
- let a = u32x4:: new ( 20 , 20 , 20 , 20 ) ;
1897
- let b = u32x4:: new ( 21 , 21 , 21 , 21 ) ;
1898
- let e = u32x4:: new ( 20 , 20 , 20 , 20 ) ;
1896
+ let a = u32x4:: new ( 0xF0F1F2F3 , 0xF4F5F6F7 , 0xF8F9FAFB , 0xFCFDFEFF ) ;
1897
+ let b = u32x4:: new ( 0x0F1F2F3F , 0x4F5F6F7F , 0x8F9FAFBF , 0xCFDFEFFF ) ;
1898
+ let e = u32x4:: new ( 0x00112233 , 0x44556677 , 0x8899AABB , 0xCCDDEEFF ) ;
1899
1899
let r: u32x4 = transmute ( vandq_u32 ( transmute ( a) , transmute ( b) ) ) ;
1900
1900
assert_eq ! ( r, e) ;
1901
1901
}
1902
1902
1903
1903
#[ simd_test( enable = "neon" ) ]
1904
1904
unsafe fn test_vand_u64 ( ) {
1905
- let a = u64x1 :: new ( 20 ) ;
1906
- let b = u64x1 :: new ( 21 ) ;
1907
- let e = u64x1 :: new ( 20 ) ;
1905
+ let a = i64x1 :: new ( 0xF0F1F2F3F4F5F6F7 ) ;
1906
+ let b = i64x1 :: new ( 0x0F1F2F3F4F5F6F7F ) ;
1907
+ let e = i64x1 :: new ( 0x0011223344556677 ) ;
1908
1908
let r: u64x1 = transmute ( vand_u64 ( transmute ( a) , transmute ( b) ) ) ;
1909
1909
assert_eq ! ( r, e) ;
1910
1910
}
1911
1911
1912
1912
#[ simd_test( enable = "neon" ) ]
1913
1913
unsafe fn test_vandq_s64 ( ) {
1914
- let a = u64x2 :: new ( 20 , 20 ) ;
1915
- let b = u64x2 :: new ( 21 , 21 ) ;
1916
- let e = u64x2 :: new ( 20 , 20 ) ;
1914
+ let a = i64x2 :: new ( 0xF0F1F2F3F4F5F6F7 , 0xF8F9FAFBFCFDFEFF ) ;
1915
+ let b = i64x2 :: new ( 0x0F1F2F3F4F5F6F7F , 0x8F9FAFBFCFDFEFFF ) ;
1916
+ let e = i64x2 :: new ( 0x0011223344556677 , 0x8899AABBCCDDEEFF ) ;
1917
1917
let r: u64x2 = transmute ( vandq_u64 ( transmute ( a) , transmute ( b) ) ) ;
1918
1918
assert_eq ! ( r, e) ;
1919
1919
}
1920
1920
1921
1921
#[ simd_test( enable = "neon" ) ]
1922
1922
unsafe fn test_vorr_s8 ( ) {
1923
- let a = i8x8:: new ( 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 ) ;
1924
- let b = i8x8:: new ( 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 ) ;
1925
- let e = i8x8:: new ( 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 ) ;
1923
+ let a = i8x8:: new ( 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 ) ;
1924
+ let b = i8x8:: new ( 0x00 , 0x10 , 0x20 , 0x30 , 0x40 , 0x50 , 0x60 , 0x70 ) ;
1925
+ let e = i8x8:: new ( 0x00 , 0x11 , 0x22 , 0x33 , 0x44 , 0x55 , 0x66 , 0x77 ) ;
1926
1926
let r: i8x8 = transmute ( vorr_s8 ( transmute ( a) , transmute ( b) ) ) ;
1927
1927
assert_eq ! ( r, e) ;
1928
1928
}
1929
1929
1930
1930
#[ simd_test( enable = "neon" ) ]
1931
1931
unsafe fn test_vorrq_s8 ( ) {
1932
- let a = i8x16:: new ( 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 ) ;
1933
- let b = i8x16:: new ( 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 ) ;
1934
- let e = i8x16:: new ( 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 ) ;
1932
+ let a = i8x16:: new ( 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 , 0x08 , 0x09 , 0x0A , 0x0B , 0x0C , 0x0D , 0x0E , 0x0F ) ;
1933
+ let b = i8x16:: new ( 0x00 , 0x10 , 0x20 , 0x30 , 0x40 , 0x50 , 0x60 , 0x70 , 0x80 , 0x90 , 0xA0 , 0xB0 , 0xC0 , 0xD0 , 0xE0 , 0xF0 ) ;
1934
+ let e = i8x16:: new ( 0x00 , 0x11 , 0x22 , 0x33 , 0x44 , 0x55 , 0x66 , 0x77 , 0x88 , 0x99 , 0xAA , 0xBB , 0xCC , 0xDD , 0xEE , 0xFF ) ;
1935
1935
let r: i8x16 = transmute ( vorrq_s8 ( transmute ( a) , transmute ( b) ) ) ;
1936
1936
assert_eq ! ( r, e) ;
1937
1937
}
1938
1938
1939
1939
#[ simd_test( enable = "neon" ) ]
1940
1940
unsafe fn test_vorr_s16 ( ) {
1941
- let a = i16x4:: new ( 20 , 20 , 20 , 20 ) ;
1942
- let b = i16x4:: new ( 21 , 21 , 21 , 21 ) ;
1943
- let e = i16x4:: new ( 21 , 21 , 21 , 21 ) ;
1941
+ let a = i16x4:: new ( 0x0001 , 0x0203 , 0x0405 , 0x0607 ) ;
1942
+ let b = i16x4:: new ( 0x0010 , 0x2030 , 0x4050 , 0x6070 ) ;
1943
+ let e = i16x4:: new ( 0x0011 , 0x2233 , 0x4455 , 0x6677 ) ;
1944
1944
let r: i16x4 = transmute ( vorr_s16 ( transmute ( a) , transmute ( b) ) ) ;
1945
1945
assert_eq ! ( r, e) ;
1946
1946
}
1947
1947
1948
1948
#[ simd_test( enable = "neon" ) ]
1949
1949
unsafe fn test_vorrq_s16 ( ) {
1950
- let a = i16x8:: new ( 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 ) ;
1951
- let b = i16x8:: new ( 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 ) ;
1952
- let e = i16x8:: new ( 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 ) ;
1950
+ let a = i16x8:: new ( 0x0001 , 0x0203 , 0x0405 , 0x0607 , 0x0809 , 0x0A0B , 0x0C0D , 0x0E0F ) ;
1951
+ let b = i16x8:: new ( 0x0010 , 0x2030 , 0x4050 , 0x6070 , 0x8090 , 0xA0B0 , 0xC0D0 , 0xE0F0 ) ;
1952
+ let e = i16x8:: new ( 0x0011 , 0x2233 , 0x4455 , 0x6677 , 0x8899 , 0xAABB , 0xCCDD , 0xEEFF ) ;
1953
1953
let r: i16x8 = transmute ( vorrq_s16 ( transmute ( a) , transmute ( b) ) ) ;
1954
1954
assert_eq ! ( r, e) ;
1955
1955
}
1956
1956
1957
1957
#[ simd_test( enable = "neon" ) ]
1958
1958
unsafe fn test_vorr_s32 ( ) {
1959
- let a = i32x2:: new ( 20 , 20 ) ;
1960
- let b = i32x2:: new ( 21 , 21 ) ;
1961
- let e = i32x2:: new ( 21 , 21 ) ;
1959
+ let a = i32x2:: new ( 0x00010203 , 0x04050607 ) ;
1960
+ let b = i32x2:: new ( 0x00102030 , 0x40506070 ) ;
1961
+ let e = i32x2:: new ( 0x00112233 , 0x44556677 ) ;
1962
1962
let r: i32x2 = transmute ( vorr_s32 ( transmute ( a) , transmute ( b) ) ) ;
1963
1963
assert_eq ! ( r, e) ;
1964
1964
}
1965
1965
1966
1966
#[ simd_test( enable = "neon" ) ]
1967
1967
unsafe fn test_vorrq_s32 ( ) {
1968
- let a = i32x4:: new ( 20 , 20 , 20 , 20 ) ;
1969
- let b = i32x4:: new ( 21 , 21 , 21 , 21 ) ;
1970
- let e = i32x4:: new ( 21 , 21 , 21 , 21 ) ;
1968
+ let a = i32x4:: new ( 0x00010203 , 0x04050607 , 0x08090A0B , 0x0C0D0E0F ) ;
1969
+ let b = i32x4:: new ( 0x00102030 , 0x40506070 , 0x8090A0B0 , 0xC0D0E0F0 ) ;
1970
+ let e = i32x4:: new ( 0x00112233 , 0x44556677 , 0x8899AABB , 0xCCDDEEFF ) ;
1971
1971
let r: i32x4 = transmute ( vorrq_s32 ( transmute ( a) , transmute ( b) ) ) ;
1972
1972
assert_eq ! ( r, e) ;
1973
1973
}
1974
1974
1975
1975
#[ simd_test( enable = "neon" ) ]
1976
1976
unsafe fn test_vorr_s64 ( ) {
1977
- let a = i64x1:: new ( 20 ) ;
1978
- let b = i64x1:: new ( 21 ) ;
1979
- let e = i64x1:: new ( 21 ) ;
1977
+ let a = i64x1:: new ( 0x0001020304050607 ) ;
1978
+ let b = i64x1:: new ( 0x0010203040506070 ) ;
1979
+ let e = i64x1:: new ( 0x0011223344556677 ) ;
1980
1980
let r: i64x1 = transmute ( vorr_s64 ( transmute ( a) , transmute ( b) ) ) ;
1981
1981
assert_eq ! ( r, e) ;
1982
1982
}
1983
1983
1984
1984
#[ simd_test( enable = "neon" ) ]
1985
1985
unsafe fn test_vorrq_s64 ( ) {
1986
- let a = i64x2:: new ( 20 , 20 ) ;
1987
- let b = i64x2:: new ( 21 , 21 ) ;
1988
- let e = i64x2:: new ( 21 , 21 ) ;
1986
+ let a = i64x2:: new ( 0x0001020304050607 , 0x08090A0B0C0D0E0F ) ;
1987
+ let b = i64x2:: new ( 0x0010203040506070 , 0x8090A0B0C0D0E0F0 ) ;
1988
+ let e = i64x2:: new ( 0x0011223344556677 , 0x8899AABBCCDDEEFF ) ;
1989
1989
let r: i64x2 = transmute ( vorrq_s64 ( transmute ( a) , transmute ( b) ) ) ;
1990
1990
assert_eq ! ( r, e) ;
1991
1991
}
1992
1992
1993
1993
#[ simd_test( enable = "neon" ) ]
1994
1994
unsafe fn test_vorr_u8 ( ) {
1995
- let a = u8x8:: new ( 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 ) ;
1996
- let b = u8x8:: new ( 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 ) ;
1997
- let e = u8x8:: new ( 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 ) ;
1995
+ let a = u8x8:: new ( 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 ) ;
1996
+ let b = u8x8:: new ( 0x00 , 0x10 , 0x20 , 0x30 , 0x40 , 0x50 , 0x60 , 0x70 ) ;
1997
+ let e = u8x8:: new ( 0x00 , 0x11 , 0x22 , 0x33 , 0x44 , 0x55 , 0x66 , 0x77 ) ;
1998
1998
let r: u8x8 = transmute ( vorr_u8 ( transmute ( a) , transmute ( b) ) ) ;
1999
1999
assert_eq ! ( r, e) ;
2000
2000
}
2001
2001
2002
2002
#[ simd_test( enable = "neon" ) ]
2003
2003
unsafe fn test_vorrq_u8 ( ) {
2004
- let a = u8x16:: new ( 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 ) ;
2005
- let b = u8x16:: new ( 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 ) ;
2006
- let e = u8x16:: new ( 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 ) ;
2004
+ let a = u8x16:: new ( 0x00 , 0x01 , 0x02 , 0x03 , 0x04 , 0x05 , 0x06 , 0x07 , 0x08 , 0x09 , 0x0A , 0x0B , 0x0C , 0x0D , 0x0E , 0x0F ) ;
2005
+ let b = u8x16:: new ( 0x00 , 0x10 , 0x20 , 0x30 , 0x40 , 0x50 , 0x60 , 0x70 , 0x80 , 0x90 , 0xA0 , 0xB0 , 0xC0 , 0xD0 , 0xE0 , 0xF0 ) ;
2006
+ let e = u8x16:: new ( 0x00 , 0x11 , 0x22 , 0x33 , 0x44 , 0x55 , 0x66 , 0x77 , 0x88 , 0x99 , 0xAA , 0xBB , 0xCC , 0xDD , 0xEE , 0xFF ) ;
2007
2007
let r: u8x16 = transmute ( vorrq_u8 ( transmute ( a) , transmute ( b) ) ) ;
2008
2008
assert_eq ! ( r, e) ;
2009
2009
}
2010
2010
2011
2011
#[ simd_test( enable = "neon" ) ]
2012
2012
unsafe fn test_vorr_u16 ( ) {
2013
- let a = u16x4:: new ( 20 , 20 , 20 , 20 ) ;
2014
- let b = u16x4:: new ( 21 , 21 , 21 , 21 ) ;
2015
- let e = u16x4:: new ( 21 , 21 , 21 , 21 ) ;
2013
+ let a = u16x4:: new ( 0x0001 , 0x0203 , 0x0405 , 0x0607 ) ;
2014
+ let b = u16x4:: new ( 0x0010 , 0x2030 , 0x4050 , 0x6070 ) ;
2015
+ let e = u16x4:: new ( 0x0011 , 0x2233 , 0x4455 , 0x6677 ) ;
2016
2016
let r: u16x4 = transmute ( vorr_u16 ( transmute ( a) , transmute ( b) ) ) ;
2017
2017
assert_eq ! ( r, e) ;
2018
2018
}
2019
2019
2020
2020
#[ simd_test( enable = "neon" ) ]
2021
2021
unsafe fn test_vorrq_u16 ( ) {
2022
- let a = u16x8:: new ( 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 ) ;
2023
- let b = u16x8:: new ( 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 ) ;
2024
- let e = u16x8:: new ( 21 , 21 , 21 , 21 , 21 , 21 , 21 , 21 ) ;
2022
+ let a = u16x8:: new ( 0x0001 , 0x0203 , 0x0405 , 0x0607 , 0x0809 , 0x0A0B , 0x0C0D , 0x0E0F ) ;
2023
+ let b = u16x8:: new ( 0x0010 , 0x2030 , 0x4050 , 0x6070 , 0x8090 , 0xA0B0 , 0xC0D0 , 0xE0F0 ) ;
2024
+ let e = u16x8:: new ( 0x0011 , 0x2233 , 0x4455 , 0x6677 , 0x8899 , 0xAABB , 0xCCDD , 0xEEFF ) ;
2025
2025
let r: u16x8 = transmute ( vorrq_u16 ( transmute ( a) , transmute ( b) ) ) ;
2026
2026
assert_eq ! ( r, e) ;
2027
2027
}
2028
2028
2029
2029
#[ simd_test( enable = "neon" ) ]
2030
2030
unsafe fn test_vorr_u32 ( ) {
2031
- let a = u32x2:: new ( 20 , 20 ) ;
2032
- let b = u32x2:: new ( 21 , 21 ) ;
2033
- let e = u32x2:: new ( 21 , 21 ) ;
2031
+ let a = u32x2:: new ( 0x00010203 , 0x04050607 ) ;
2032
+ let b = u32x2:: new ( 0x00102030 , 0x40506070 ) ;
2033
+ let e = u32x2:: new ( 0x00112233 , 0x44556677 ) ;
2034
2034
let r: u32x2 = transmute ( vorr_u32 ( transmute ( a) , transmute ( b) ) ) ;
2035
2035
assert_eq ! ( r, e) ;
2036
2036
}
2037
2037
2038
2038
#[ simd_test( enable = "neon" ) ]
2039
2039
unsafe fn test_vorrq_u32 ( ) {
2040
- let a = u32x4:: new ( 20 , 20 , 20 , 20 ) ;
2041
- let b = u32x4:: new ( 21 , 21 , 21 , 21 ) ;
2042
- let e = u32x4:: new ( 21 , 21 , 21 , 21 ) ;
2040
+ let a = u32x4:: new ( 0x00010203 , 0x04050607 , 0x08090A0B , 0x0C0D0E0F ) ;
2041
+ let b = u32x4:: new ( 0x00102030 , 0x40506070 , 0x8090A0B0 , 0xC0D0E0F0 ) ;
2042
+ let e = u32x4:: new ( 0x00112233 , 0x44556677 , 0x8899AABB , 0xCCDDEEFF ) ;
2043
2043
let r: u32x4 = transmute ( vorrq_u32 ( transmute ( a) , transmute ( b) ) ) ;
2044
2044
assert_eq ! ( r, e) ;
2045
2045
}
2046
2046
2047
2047
#[ simd_test( enable = "neon" ) ]
2048
2048
unsafe fn test_vorr_u64 ( ) {
2049
- let a = u64x1:: new ( 20 ) ;
2050
- let b = u64x1:: new ( 21 ) ;
2051
- let e = u64x1:: new ( 21 ) ;
2049
+ let a = u64x1:: new ( 0x0001020304050607 ) ;
2050
+ let b = u64x1:: new ( 0x0010203040506070 ) ;
2051
+ let e = u64x1:: new ( 0x0011223344556677 ) ;
2052
2052
let r: u64x1 = transmute ( vorr_u64 ( transmute ( a) , transmute ( b) ) ) ;
2053
2053
assert_eq ! ( r, e) ;
2054
2054
}
2055
2055
2056
2056
#[ simd_test( enable = "neon" ) ]
2057
- unsafe fn test_vorrq_s64 ( ) {
2058
- let a = u64x2:: new ( 20 , 20 ) ;
2059
- let b = u64x2:: new ( 21 , 21 ) ;
2060
- let e = u64x2:: new ( 21 , 21 ) ;
2057
+ unsafe fn test_vorrq_u64 ( ) {
2058
+ let a = u64x2:: new ( 0x0001020304050607 , 0x08090A0B0C0D0E0F ) ;
2059
+ let b = u64x2:: new ( 0x0010203040506070 , 0x8090A0B0C0D0E0F0 ) ;
2060
+ let e = u64x2:: new ( 0x0011223344556677 , 0x8899AABBCCDDEEFF ) ;
2061
2061
let r: u64x2 = transmute ( vorrq_u64 ( transmute ( a) , transmute ( b) ) ) ;
2062
2062
assert_eq ! ( r, e) ;
2063
2063
}
0 commit comments