1 /* { dg-do compile } */
2 /* { dg-options "-O2 -mfpu=vfp -mfloat-abi=softfp" } */
3 /* { dg-require-effective-target arm_vfp_ok } */
5 extern float fabsf (float);
6 extern float sqrtf (float);
7 extern double fabs (double);
8 extern double sqrt (double);
10 volatile float f1
, f2
, f3
;
14 /* { dg-final { scan-assembler "fabss" } } */
17 /* { dg-final { scan-assembler "fnegs" } } */
20 /* { dg-final { scan-assembler "fadds" } } */
23 /* { dg-final { scan-assembler "fsubs" } } */
26 /* { dg-final { scan-assembler "fdivs" } } */
29 /* { dg-final { scan-assembler "fmuls" } } */
32 /* { dg-final { scan-assembler "fnmuls" } } */
35 /* { dg-final { scan-assembler "fmacs" } } */
38 /* { dg-final { scan-assembler "fmscs" } } */
40 /* mulsf3negsfaddsf_vfp */
41 /* { dg-final { scan-assembler "fnmacs" } } */
43 /* mulsf3negsfsubsf_vfp */
44 /* { dg-final { scan-assembler "fnmscs" } } */
47 /* { dg-final { scan-assembler "fsqrts" } } */
51 volatile double d1
, d2
, d3
;
55 /* { dg-final { scan-assembler "fabsd" } } */
58 /* { dg-final { scan-assembler "fnegd" } } */
61 /* { dg-final { scan-assembler "faddd" } } */
64 /* { dg-final { scan-assembler "fsubd" } } */
67 /* { dg-final { scan-assembler "fdivd" } } */
70 /* { dg-final { scan-assembler "fmuld" } } */
73 /* { dg-final { scan-assembler "fnmuld" } } */
76 /* { dg-final { scan-assembler "fmacd" } } */
79 /* { dg-final { scan-assembler "fmscd" } } */
81 /* muldf3negdfadddf_vfp */
82 /* { dg-final { scan-assembler "fnmacd" } } */
84 /* muldf3negdfsubdf_vfp */
85 /* { dg-final { scan-assembler "fnmscd" } } */
88 /* { dg-final { scan-assembler "fsqrtd" } } */
93 volatile unsigned int u1
;
95 void test_convert () {
97 /* { dg-final { scan-assembler "fcvtds" } } */
100 /* { dg-final { scan-assembler "fcvtsd" } } */
103 /* { dg-final { scan-assembler "ftosizs" } } */
106 /* { dg-final { scan-assembler "ftosizd" } } */
108 /* fixuns_truncsfsi2 */
109 /* { dg-final { scan-assembler "ftouizs" } } */
111 /* fixuns_truncdfsi2 */
112 /* { dg-final { scan-assembler "ftouizd" } } */
115 /* { dg-final { scan-assembler "fsitos" } } */
118 /* { dg-final { scan-assembler "fsitod" } } */
121 /* { dg-final { scan-assembler "fuitos" } } */
124 /* { dg-final { scan-assembler "fuitod" } } */