libstdc++: Remove unnecessary 'static' from __is_specialization_of
[official-gcc.git] / gcc / testsuite / gcc.target / arm / bfloat16_scalar_2_2.c
blob93ec059819ad169400648903b86ed1ccc6e521e8
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 "**" "" } } */
8 #include <arm_bf16.h>
10 #pragma GCC push_options
11 #pragma GCC target ("+bf16")
14 **stacktest1:
15 ** ...
16 ** strh r[0-9]+, \[r[0-9]+\] @ __bf16
17 ** ldrh r[0-9]+, \[sp, #[0-9]+\] @ __bf16
18 ** ...
19 ** bx lr
21 bfloat16_t stacktest1 (bfloat16_t __a)
23 volatile bfloat16_t b = __a;
24 return b;
28 **bfloat_mov_ww:
29 ** ...
30 ** vmov.f32 s1, s15
31 ** ...
32 ** bx lr
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));
39 y = x;
40 asm volatile ("#foo" :: "t" (y));
44 **bfloat_mov_rw:
45 ** ...
46 ** vmov s1, r4
47 ** ...
48 ** bx lr
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));
55 y = x;
56 asm volatile ("#foo" :: "t" (y));
60 **bfloat_mov_wr:
61 ** ...
62 ** vmov r4, s1
63 ** ...
64 ** bx lr
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));
71 y = x;
72 asm volatile ("#foo" :: "r" (y));
76 **bfloat_mov_rr:
77 ** ...
78 ** mov r4, r5 @ __bf16
79 ** ...
80 ** bx lr
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));
87 y = x;
88 asm volatile ("#foo" :: "r" (y));
92 **bfloat_mov_rm:
93 ** ...
94 ** strh r4, \[.*\] @ __bf16
95 ** ...
96 ** bx lr
98 void bfloat_mov_rm (void)
100 register bfloat16_t x asm ("r4");
101 volatile bfloat16_t y;
102 asm volatile ("#foo" : "=r" (x));
103 y = x;
104 asm volatile ("#foo" : : : "memory");
108 **bfloat_mov_mr:
109 ** ...
110 ** ldrh r4, \[.*\] @ __bf16
111 ** ...
112 ** bx lr
114 void bfloat_mov_mr (void)
116 volatile bfloat16_t x;
117 register bfloat16_t y asm ("r4");
118 asm volatile ("#foo" : : : "memory");
119 y = x;
120 asm volatile ("#foo" :: "r" (y));
123 #pragma GCC pop_options