1 /* { dg-do compile } */
2 /* { dg-options "-O2 -mfpu=vfp -mfloat-abi=softfp" } */
3 /* { dg-require-effective-target arm32 } */
4 /* { dg-skip-if "" { *-*-* } { "-mcpu=iwmmxt" "-march=iwmmxt" } { "" } } */
6 extern float fabsf (float);
7 extern float sqrtf (float);
8 extern double fabs (double);
9 extern double sqrt (double);
11 volatile float f1
, f2
, f3
;
15 /* { dg-final { scan-assembler "fabss" } } */
18 /* { dg-final { scan-assembler "fnegs" } } */
21 /* { dg-final { scan-assembler "fadds" } } */
24 /* { dg-final { scan-assembler "fsubs" } } */
27 /* { dg-final { scan-assembler "fdivs" } } */
30 /* { dg-final { scan-assembler "fmuls" } } */
33 /* { dg-final { scan-assembler "fnmuls" } } */
36 /* { dg-final { scan-assembler "fmacs" } } */
39 /* { dg-final { scan-assembler "fmscs" } } */
41 /* mulsf3negsfaddsf_vfp */
42 /* { dg-final { scan-assembler "fnmacs" } } */
44 /* mulsf3negsfsubsf_vfp */
45 /* { dg-final { scan-assembler "fnmscs" } } */
48 /* { dg-final { scan-assembler "fsqrts" } } */
52 volatile double d1
, d2
, d3
;
56 /* { dg-final { scan-assembler "fabsd" } } */
59 /* { dg-final { scan-assembler "fnegd" } } */
62 /* { dg-final { scan-assembler "faddd" } } */
65 /* { dg-final { scan-assembler "fsubd" } } */
68 /* { dg-final { scan-assembler "fdivd" } } */
71 /* { dg-final { scan-assembler "fmuld" } } */
74 /* { dg-final { scan-assembler "fnmuld" } } */
77 /* { dg-final { scan-assembler "fmacd" } } */
80 /* { dg-final { scan-assembler "fmscd" } } */
82 /* muldf3negdfadddf_vfp */
83 /* { dg-final { scan-assembler "fnmacd" } } */
85 /* muldf3negdfsubdf_vfp */
86 /* { dg-final { scan-assembler "fnmscd" } } */
89 /* { dg-final { scan-assembler "fsqrtd" } } */
94 volatile unsigned int u1
;
96 void test_convert () {
98 /* { dg-final { scan-assembler "fcvtds" } } */
101 /* { dg-final { scan-assembler "fcvtsd" } } */
104 /* { dg-final { scan-assembler "ftosizs" } } */
107 /* { dg-final { scan-assembler "ftosizd" } } */
109 /* fixuns_truncsfsi2 */
110 /* { dg-final { scan-assembler "ftouizs" } } */
112 /* fixuns_truncdfsi2 */
113 /* { dg-final { scan-assembler "ftouizd" } } */
116 /* { dg-final { scan-assembler "fsitos" } } */
119 /* { dg-final { scan-assembler "fsitod" } } */
122 /* { dg-final { scan-assembler "fuitos" } } */
125 /* { dg-final { scan-assembler "fuitod" } } */