Skip to content

Commit 24cbf4d

Browse files
committed
Fix more aarch intriniscs
1 parent f33b6f9 commit 24cbf4d

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2282,7 +2282,7 @@ pub unsafe fn vsubq_f32(a: float32x4_t, b: float32x4_t) -> float32x4_t {
22822282
#[target_feature(enable = "neon")]
22832283
#[cfg_attr(target_arch = "arm", target_feature(enable = "v7"))]
22842284
#[cfg_attr(all(test, target_arch = "arm"), assert_instr("uhsub.u8"))]
2285-
#[cfg_attr(all(test, target_arch = "aarch64"), assert_instr("uhsub.u8"))]
2285+
#[cfg_attr(all(test, target_arch = "aarch64"), assert_instr("vhsub.u8"))]
22862286
pub unsafe fn vhsub_u8(a: uint8x8_t, b: uint8x8_t) -> uint8x8_t {
22872287
#[allow(improper_ctypes)]
22882288
extern "C" {
@@ -2298,7 +2298,7 @@ vhsub_u8_(a, b)
22982298
#[target_feature(enable = "neon")]
22992299
#[cfg_attr(target_arch = "arm", target_feature(enable = "v7"))]
23002300
#[cfg_attr(all(test, target_arch = "arm"), assert_instr("uhsub.u8"))]
2301-
#[cfg_attr(all(test, target_arch = "aarch64"), assert_instr("uhsub.u8"))]
2301+
#[cfg_attr(all(test, target_arch = "aarch64"), assert_instr("vhsub.u8"))]
23022302
pub unsafe fn vhsubq_u8(a: uint8x16_t, b: uint8x16_t) -> uint8x16_t {
23032303
#[allow(improper_ctypes)]
23042304
extern "C" {
@@ -2314,7 +2314,7 @@ vhsubq_u8_(a, b)
23142314
#[target_feature(enable = "neon")]
23152315
#[cfg_attr(target_arch = "arm", target_feature(enable = "v7"))]
23162316
#[cfg_attr(all(test, target_arch = "arm"), assert_instr("uhsub.u16"))]
2317-
#[cfg_attr(all(test, target_arch = "aarch64"), assert_instr("uhsub.u16"))]
2317+
#[cfg_attr(all(test, target_arch = "aarch64"), assert_instr("vhsub.u16"))]
23182318
pub unsafe fn vhsub_u16(a: uint16x4_t, b: uint16x4_t) -> uint16x4_t {
23192319
#[allow(improper_ctypes)]
23202320
extern "C" {
@@ -2330,7 +2330,7 @@ vhsub_u16_(a, b)
23302330
#[target_feature(enable = "neon")]
23312331
#[cfg_attr(target_arch = "arm", target_feature(enable = "v7"))]
23322332
#[cfg_attr(all(test, target_arch = "arm"), assert_instr("uhsub.u16"))]
2333-
#[cfg_attr(all(test, target_arch = "aarch64"), assert_instr("uhsub.u16"))]
2333+
#[cfg_attr(all(test, target_arch = "aarch64"), assert_instr("vhsub.u16"))]
23342334
pub unsafe fn vhsubq_u16(a: uint16x8_t, b: uint16x8_t) -> uint16x8_t {
23352335
#[allow(improper_ctypes)]
23362336
extern "C" {
@@ -2346,7 +2346,7 @@ vhsubq_u16_(a, b)
23462346
#[target_feature(enable = "neon")]
23472347
#[cfg_attr(target_arch = "arm", target_feature(enable = "v7"))]
23482348
#[cfg_attr(all(test, target_arch = "arm"), assert_instr("uhsub.u32"))]
2349-
#[cfg_attr(all(test, target_arch = "aarch64"), assert_instr("uhsub.u32"))]
2349+
#[cfg_attr(all(test, target_arch = "aarch64"), assert_instr("vhsub.u32"))]
23502350
pub unsafe fn vhsub_u32(a: uint32x2_t, b: uint32x2_t) -> uint32x2_t {
23512351
#[allow(improper_ctypes)]
23522352
extern "C" {
@@ -2362,7 +2362,7 @@ vhsub_u32_(a, b)
23622362
#[target_feature(enable = "neon")]
23632363
#[cfg_attr(target_arch = "arm", target_feature(enable = "v7"))]
23642364
#[cfg_attr(all(test, target_arch = "arm"), assert_instr("uhsub.u32"))]
2365-
#[cfg_attr(all(test, target_arch = "aarch64"), assert_instr("uhsub.u32"))]
2365+
#[cfg_attr(all(test, target_arch = "aarch64"), assert_instr("vhsub.u32"))]
23662366
pub unsafe fn vhsubq_u32(a: uint32x4_t, b: uint32x4_t) -> uint32x4_t {
23672367
#[allow(improper_ctypes)]
23682368
extern "C" {

crates/core_arch/src/arm/neon/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1330,7 +1330,7 @@ pub unsafe fn vreinterpretq_u8_s8(a: int8x16_t) -> uint8x16_t {
13301330
#[target_feature(enable = "neon")]
13311331
#[cfg_attr(target_arch = "arm", target_feature(enable = "v7"))]
13321332
#[cfg_attr(all(test, target_arch = "arm"), assert_instr("vshr.s8", imm3 = 1))]
1333-
#[cfg_attr(all(test, target_arch = "aarch64"), assert_instr(shr, imm3 = 1))]
1333+
#[cfg_attr(all(test, target_arch = "aarch64"), assert_instr("vshr.u8", imm3 = 1))]
13341334
#[rustc_args_required_const(1)]
13351335
pub unsafe fn vshrq_n_u8(a: uint8x16_t, imm3: i32) -> uint8x16_t {
13361336
if imm3 < 0 || imm3 > 7 {

crates/stdarch-gen/neon.spec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,11 +449,13 @@ b = 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2
449449
validate 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7
450450

451451
arm = uhsub.s
452+
aarch64 = vhsub.s
452453
link-arm = vhsubu._EXT_
453454
link-aarch64 = uhsub._EXT_
454455
generate uint*_t
455456

456457
arm = vhsub.s
458+
aarch64 = vhsub.s
457459
link-arm = vhsubs._EXT_
458460
link-aarch64 = shsub._EXT_
459461
generate int*_t

0 commit comments

Comments
 (0)