55//@ [arm64ec] compile-flags: --target arm64ec-pc-windows-msvc
66//@ [arm64ec] needs-llvm-components: aarch64
77
8- #![ feature( no_core, lang_items, rustc_attrs, repr_simd, asm_experimental_arch) ]
8+ #![ feature( no_core, lang_items, rustc_attrs, repr_simd, asm_experimental_arch, f16 ) ]
99#![ crate_type = "rlib" ]
1010#![ no_core]
1111#![ allow( asm_sub_register, non_camel_case_types) ]
@@ -39,6 +39,10 @@ pub struct i32x2(i32, i32);
3939#[ repr( simd) ]
4040pub struct i64x1 ( i64 ) ;
4141#[ repr( simd) ]
42+ pub struct f16x4 ( f16 , f16 , f16 , f16 ) ;
43+ #[ repr( simd) ]
44+ pub struct f16x8 ( f16 , f16 , f16 , f16 , f16 , f16 , f16 , f16 ) ;
45+ #[ repr( simd) ]
4246pub struct f32x2 ( f32 , f32 ) ;
4347#[ repr( simd) ]
4448pub struct f64x1 ( f64 ) ;
@@ -57,6 +61,7 @@ pub struct f64x2(f64, f64);
5761
5862impl Copy for i8 { }
5963impl Copy for i16 { }
64+ impl Copy for f16 { }
6065impl Copy for i32 { }
6166impl Copy for f32 { }
6267impl Copy for i64 { }
@@ -67,11 +72,13 @@ impl Copy for i16x4 {}
6772impl Copy for i32x2 { }
6873impl Copy for i64x1 { }
6974impl Copy for f32x2 { }
75+ impl Copy for f16x4 { }
7076impl Copy for f64x1 { }
7177impl Copy for i8x16 { }
7278impl Copy for i16x8 { }
7379impl Copy for i32x4 { }
7480impl Copy for i64x2 { }
81+ impl Copy for f16x8 { }
7582impl Copy for f32x4 { }
7683impl Copy for f64x2 { }
7784
@@ -165,6 +172,12 @@ check!(reg_i16 i16 reg "mov" "");
165172// CHECK: //NO_APP
166173check ! ( reg_i32 i32 reg "mov" "" ) ;
167174
175+ // CHECK-LABEL: reg_f16:
176+ // CHECK: @APP
177+ // CHECK: mov {{[a-z0-9]+}}, {{[a-z0-9]+}}
178+ // CHECK: @NO_APP
179+ check ! ( reg_f16 f16 reg "mov" ) ;
180+
168181// CHECK-LABEL: {{("#)?}}reg_f32{{"?}}
169182// CHECK: //APP
170183// CHECK: mov x{{[0-9]+}}, x{{[0-9]+}}
@@ -255,6 +268,20 @@ check!(vreg_i32x2 i32x2 vreg "fmov" "s");
255268// CHECK: //NO_APP
256269check ! ( vreg_i64x1 i64x1 vreg "fmov" "s" ) ;
257270
271+ // neon-LABEL: vreg_f16x4:
272+ // neon: @APP
273+ // neon: vmov.f64 d{{[0-9]+}}, d{{[0-9]+}}
274+ // neon: @NO_APP
275+ #[ cfg( neon) ]
276+ check ! ( vreg_f16x4 f16x4 vreg "vmov.f64" ) ;
277+
278+ // neon-LABEL: vreg_f16x8:
279+ // neon: @APP
280+ // neon: vorr q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
281+ // neon: @NO_APP
282+ #[ cfg( neon) ]
283+ check ! ( vreg_f16x8 f16x8 vreg "vmov" ) ;
284+
258285// CHECK-LABEL: {{("#)?}}vreg_f32x2{{"?}}
259286// CHECK: //APP
260287// CHECK: fmov s{{[0-9]+}}, s{{[0-9]+}}
0 commit comments