@@ -63,7 +63,7 @@ types! {
63
63
/// ARM-specific 128-bit wide vector of four packed `u32`.
64
64
pub struct uint32x4_t( u32 , u32 , u32 , u32 ) ;
65
65
/// ARM-specific 128-bit wide vector of four packed `f32`.
66
- pub struct float32x4_t( f32 , f32 , f32 , f32 ) ;
66
+ pub struct float32x4_t( pub f32 , pub f32 , pub f32 , pub f32 ) ;
67
67
/// ARM-specific 128-bit wide vector of two packed `i64`.
68
68
pub struct int64x2_t( i64 , i64 ) ;
69
69
/// ARM-specific 128-bit wide vector of two packed `u64`.
@@ -217,6 +217,8 @@ extern "C" {
217
217
d : int8x8_t ,
218
218
e : int8x8_t ,
219
219
) -> int8x8_t ;
220
+ #[ cfg_attr( target_arch = "arm" , link_name = "llvm.arm.neon.vld1.v4f32.p0i8" ) ]
221
+ fn vld1q_v4f32 ( addr : * const u8 , align : u32 ) -> float32x4_t ;
220
222
}
221
223
222
224
/// Absolute value (wrapping).
@@ -1767,6 +1769,16 @@ pub unsafe fn vld1q_u8(addr: *const u8) -> uint8x16_t {
1767
1769
ptr:: read ( addr as * const uint8x16_t )
1768
1770
}
1769
1771
1772
+ /// Load multiple single-element structures to one, two, three, or four registers
1773
+ #[ inline]
1774
+ #[ cfg( target_arch = "arm" ) ]
1775
+ #[ target_feature( enable = "neon" ) ]
1776
+ #[ cfg_attr( target_arch = "arm" , target_feature( enable = "v7" ) ) ]
1777
+ #[ cfg_attr( test, assert_instr( ldr) ) ]
1778
+ pub unsafe fn vld1q_f32 ( addr : * const f32 ) -> float32x4_t {
1779
+ vld1q_v4f32 ( addr as * const u8 , 4 )
1780
+ }
1781
+
1770
1782
#[ cfg( test) ]
1771
1783
mod tests {
1772
1784
use super :: * ;
@@ -1791,6 +1803,15 @@ mod tests {
1791
1803
assert_eq ! ( r, e) ;
1792
1804
}
1793
1805
1806
+ #[ cfg( target_arch = "arm" ) ]
1807
+ #[ simd_test( enable = "neon" ) ]
1808
+ unsafe fn test_vld1q_f32 ( ) {
1809
+ let a = f32x4:: new ( 1. , 2. , 3. , 4. ) ;
1810
+ let e = a;
1811
+ let r: f32x4 = transmute ( vld1q_f32 ( transmute ( & a) ) ) ;
1812
+ assert_eq ! ( r, e) ;
1813
+ }
1814
+
1794
1815
#[ simd_test( enable = "neon" ) ]
1795
1816
unsafe fn test_vget_lane_u8 ( ) {
1796
1817
let v = i8x8:: new ( 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ) ;
0 commit comments