Skip to content

Commit efae0dd

Browse files
committed
Tweak 64-bit load/extend names
1 parent 90ea922 commit efae0dd

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

crates/core_arch/src/wasm32/simd128.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -297,47 +297,47 @@ pub unsafe fn v128_load(m: *const v128) -> v128 {
297297
#[inline]
298298
#[cfg_attr(test, assert_instr(v128.load8x8_s))]
299299
#[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 {
301301
transmute(simd_cast::<_, i16x8>(*(m as *const i8x8)))
302302
}
303303

304304
/// Load eight 8-bit integers and zero extend each one to a 16-bit lane
305305
#[inline]
306306
#[cfg_attr(test, assert_instr(v128.load8x8_u))]
307307
#[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 {
309309
transmute(simd_cast::<_, u16x8>(*(m as *const u8x8)))
310310
}
311311

312312
/// Load four 16-bit integers and sign extend each one to a 32-bit lane
313313
#[inline]
314314
#[cfg_attr(test, assert_instr(v128.load16x4_s))]
315315
#[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 {
317317
transmute(simd_cast::<_, i32x4>(*(m as *const i16x4)))
318318
}
319319

320320
/// Load four 16-bit integers and zero extend each one to a 32-bit lane
321321
#[inline]
322322
#[cfg_attr(test, assert_instr(v128.load16x4_u))]
323323
#[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 {
325325
transmute(simd_cast::<_, u32x4>(*(m as *const u16x4)))
326326
}
327327

328328
/// Load two 32-bit integers and sign extend each one to a 64-bit lane
329329
#[inline]
330330
#[cfg_attr(test, assert_instr(v128.load32x2_s))]
331331
#[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 {
333333
transmute(simd_cast::<_, i64x2>(*(m as *const i32x2)))
334334
}
335335

336336
/// Load two 32-bit integers and zero extend each one to a 64-bit lane
337337
#[inline]
338338
#[cfg_attr(test, assert_instr(v128.load32x2_u))]
339339
#[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 {
341341
transmute(simd_cast::<_, u64x2>(*(m as *const u32x2)))
342342
}
343343

@@ -3220,21 +3220,21 @@ pub mod tests {
32203220
fn test_load_extend() {
32213221
unsafe {
32223222
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());
32243224
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);
32263226
compare_bytes(vec, i16x8_const(253, 254, 255, 0, 1, 2, 3, 4));
32273227

32283228
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());
32303230
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);
32323232
compare_bytes(vec, i32x4_const(65535, 0, 1, 2));
32333233

32343234
let arr: [i32; 2] = [-1, 1];
3235-
let vec = i64x2_load32x2(arr.as_ptr());
3235+
let vec = i64x2_load_extend_i32x2(arr.as_ptr());
32363236
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);
32383238
compare_bytes(vec, i64x2_const(u32::max_value().into(), 1));
32393239
}
32403240
}

0 commit comments

Comments
 (0)