@@ -297,47 +297,47 @@ pub unsafe fn v128_load(m: *const v128) -> v128 {
297
297
#[ inline]
298
298
#[ cfg_attr( test, assert_instr( v128. load8x8_s) ) ]
299
299
#[ target_feature( enable = "simd128" ) ]
300
- pub unsafe fn i16x8_load8x8 ( m : * const i8 ) -> v128 {
300
+ pub unsafe fn i16x8_load_extend_i8x8 ( m : * const i8 ) -> v128 {
301
301
transmute ( simd_cast :: < _ , i16x8 > ( * ( m as * const i8x8 ) ) )
302
302
}
303
303
304
304
/// Load eight 8-bit integers and zero extend each one to a 16-bit lane
305
305
#[ inline]
306
306
#[ cfg_attr( test, assert_instr( v128. load8x8_u) ) ]
307
307
#[ target_feature( enable = "simd128" ) ]
308
- pub unsafe fn u16x8_load8x8 ( m : * const u8 ) -> v128 {
308
+ pub unsafe fn u16x8_load_extend_u8x8 ( m : * const u8 ) -> v128 {
309
309
transmute ( simd_cast :: < _ , u16x8 > ( * ( m as * const u8x8 ) ) )
310
310
}
311
311
312
312
/// Load four 16-bit integers and sign extend each one to a 32-bit lane
313
313
#[ inline]
314
314
#[ cfg_attr( test, assert_instr( v128. load16x4_s) ) ]
315
315
#[ target_feature( enable = "simd128" ) ]
316
- pub unsafe fn i32x4_load16x4 ( m : * const i16 ) -> v128 {
316
+ pub unsafe fn i32x4_load_extend_i16x4 ( m : * const i16 ) -> v128 {
317
317
transmute ( simd_cast :: < _ , i32x4 > ( * ( m as * const i16x4 ) ) )
318
318
}
319
319
320
320
/// Load four 16-bit integers and zero extend each one to a 32-bit lane
321
321
#[ inline]
322
322
#[ cfg_attr( test, assert_instr( v128. load16x4_u) ) ]
323
323
#[ target_feature( enable = "simd128" ) ]
324
- pub unsafe fn u32x4_load16x4 ( m : * const u16 ) -> v128 {
324
+ pub unsafe fn u32x4_load_extend_u16x4 ( m : * const u16 ) -> v128 {
325
325
transmute ( simd_cast :: < _ , u32x4 > ( * ( m as * const u16x4 ) ) )
326
326
}
327
327
328
328
/// Load two 32-bit integers and sign extend each one to a 64-bit lane
329
329
#[ inline]
330
330
#[ cfg_attr( test, assert_instr( v128. load32x2_s) ) ]
331
331
#[ target_feature( enable = "simd128" ) ]
332
- pub unsafe fn i64x2_load32x2 ( m : * const i32 ) -> v128 {
332
+ pub unsafe fn i64x2_load_extend_i32x2 ( m : * const i32 ) -> v128 {
333
333
transmute ( simd_cast :: < _ , i64x2 > ( * ( m as * const i32x2 ) ) )
334
334
}
335
335
336
336
/// Load two 32-bit integers and zero extend each one to a 64-bit lane
337
337
#[ inline]
338
338
#[ cfg_attr( test, assert_instr( v128. load32x2_u) ) ]
339
339
#[ target_feature( enable = "simd128" ) ]
340
- pub unsafe fn u64x2_load32x2 ( m : * const u32 ) -> v128 {
340
+ pub unsafe fn u64x2_load_extend_u32x2 ( m : * const u32 ) -> v128 {
341
341
transmute ( simd_cast :: < _ , u64x2 > ( * ( m as * const u32x2 ) ) )
342
342
}
343
343
@@ -3220,21 +3220,21 @@ pub mod tests {
3220
3220
fn test_load_extend ( ) {
3221
3221
unsafe {
3222
3222
let arr: [ i8 ; 8 ] = [ -3 , -2 , -1 , 0 , 1 , 2 , 3 , 4 ] ;
3223
- let vec = i16x8_load8x8 ( arr. as_ptr ( ) ) ;
3223
+ let vec = i16x8_load_extend_i8x8 ( arr. as_ptr ( ) ) ;
3224
3224
compare_bytes ( vec, i16x8_const ( -3 , -2 , -1 , 0 , 1 , 2 , 3 , 4 ) ) ;
3225
- let vec = u16x8_load8x8 ( arr. as_ptr ( ) as * const u8 ) ;
3225
+ let vec = u16x8_load_extend_u8x8 ( arr. as_ptr ( ) as * const u8 ) ;
3226
3226
compare_bytes ( vec, i16x8_const ( 253 , 254 , 255 , 0 , 1 , 2 , 3 , 4 ) ) ;
3227
3227
3228
3228
let arr: [ i16 ; 4 ] = [ -1 , 0 , 1 , 2 ] ;
3229
- let vec = i32x4_load16x4 ( arr. as_ptr ( ) ) ;
3229
+ let vec = i32x4_load_extend_i16x4 ( arr. as_ptr ( ) ) ;
3230
3230
compare_bytes ( vec, i32x4_const ( -1 , 0 , 1 , 2 ) ) ;
3231
- let vec = u32x4_load16x4 ( arr. as_ptr ( ) as * const u16 ) ;
3231
+ let vec = u32x4_load_extend_u16x4 ( arr. as_ptr ( ) as * const u16 ) ;
3232
3232
compare_bytes ( vec, i32x4_const ( 65535 , 0 , 1 , 2 ) ) ;
3233
3233
3234
3234
let arr: [ i32 ; 2 ] = [ -1 , 1 ] ;
3235
- let vec = i64x2_load32x2 ( arr. as_ptr ( ) ) ;
3235
+ let vec = i64x2_load_extend_i32x2 ( arr. as_ptr ( ) ) ;
3236
3236
compare_bytes ( vec, i64x2_const ( -1 , 1 ) ) ;
3237
- let vec = u64x2_load32x2 ( arr. as_ptr ( ) as * const u32 ) ;
3237
+ let vec = u64x2_load_extend_u32x2 ( arr. as_ptr ( ) as * const u32 ) ;
3238
3238
compare_bytes ( vec, i64x2_const ( u32:: max_value ( ) . into ( ) , 1 ) ) ;
3239
3239
}
3240
3240
}
0 commit comments