1 /* { dg-do assemble { target { arm*-*-* } } } */
2 /* { dg-require-effective-target arm_v8_neon_ok } */
3 /* { dg-require-effective-target arm_v8_2a_bf16_neon_ok } */
4 /* { dg-additional-options "-march=armv8.2-a -mfloat-abi=softfp -mfpu=neon-fp-armv8" } */
5 /* { dg-additional-options "-O3 --save-temps -std=gnu90" } */
6 /* { dg-final { check-function-bodies "**" "" } } */
10 #pragma GCC push_options
11 #pragma GCC target ("+bf16")
16 ** strh r[0-9]+, \[r[0-9]+\] @ __bf16
17 ** ldrh r[0-9]+, \[sp, #[0-9]+\] @ __bf16
21 bfloat16_t
stacktest1 (bfloat16_t __a
)
23 volatile bfloat16_t b
= __a
;
34 void bfloat_mov_ww (void)
36 register bfloat16_t x
asm ("s15");
37 register bfloat16_t y
asm ("s1");
38 asm volatile ("#foo" : "=t" (x
));
40 asm volatile ("#foo" :: "t" (y
));
50 void bfloat_mov_rw (void)
52 register bfloat16_t x
asm ("r4");
53 register bfloat16_t y
asm ("s1");
54 asm volatile ("#foo" : "=r" (x
));
56 asm volatile ("#foo" :: "t" (y
));
66 void bfloat_mov_wr (void)
68 register bfloat16_t x
asm ("s1");
69 register bfloat16_t y
asm ("r4");
70 asm volatile ("#foo" : "=t" (x
));
72 asm volatile ("#foo" :: "r" (y
));
78 ** mov r4, r5 @ __bf16
82 void bfloat_mov_rr (void)
84 register bfloat16_t x
asm ("r5");
85 register bfloat16_t y
asm ("r4");
86 asm volatile ("#foo" : "=r" (x
));
88 asm volatile ("#foo" :: "r" (y
));
94 ** strh r4, \[.*\] @ __bf16
98 void bfloat_mov_rm (void)
100 register bfloat16_t x
asm ("r4");
101 volatile bfloat16_t y
;
102 asm volatile ("#foo" : "=r" (x
));
104 asm volatile ("#foo" : : : "memory");
110 ** ldrh r4, \[.*\] @ __bf16
114 void bfloat_mov_mr (void)
116 volatile bfloat16_t x
;
117 register bfloat16_t y
asm ("r4");
118 asm volatile ("#foo" : : : "memory");
120 asm volatile ("#foo" :: "r" (y
));
123 #pragma GCC pop_options