Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/movsf_2.c

raw
1 /* { dg-do assemble } */
2 /* { dg-options "-O --save-temps" } */
3 /* { dg-final { check-function-bodies "**" "" "" } } */
4
5 /*
6 ** fpr_to_fpr:
7 ** fmov s0, s1
8 ** ret
9 */
10 float
11 fpr_to_fpr (float q0, float q1) [[arm::streaming_compatible]]
12 {
13 return q1;
14 }
15
16 /*
17 ** gpr_to_fpr:
18 ** fmov s0, w0
19 ** ret
20 */
21 float
22 gpr_to_fpr () [[arm::streaming_compatible]]
23 {
24 register float w0 asm ("w0");
25 asm volatile ("" : "=r" (w0));
26 return w0;
27 }
28
29 /*
30 ** zero_to_fpr:
31 ** fmov s0, wzr
32 ** ret
33 */
34 float
35 zero_to_fpr () [[arm::streaming_compatible]]
36 {
37 return 0;
38 }
39
40 /*
41 ** fpr_to_gpr:
42 ** fmov w0, s0
43 ** ret
44 */
45 void
46 fpr_to_gpr (float q0) [[arm::streaming_compatible]]
47 {
48 register float w0 asm ("w0");
49 w0 = q0;
50 asm volatile ("" :: "r" (w0));
51 }