Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
d4b47784
Commit
d4b47784
authored
Apr 22, 2005
by
Mark Mitchell
Committed by
Mark Mitchell
Apr 22, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* gcc.dg/arm-vfp1.c: New test.
From-SVN: r98574
parent
2828ee69
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
130 additions
and
0 deletions
+130
-0
gcc/testsuite/ChangeLog
+4
-0
gcc/testsuite/gcc.dg/arm-vfp1.c
+126
-0
No files found.
gcc/testsuite/ChangeLog
View file @
d4b47784
2005
-
04
-
22
Mark
Mitchell
<
mark
@codesourcery
.
com
>
*
gcc
.
dg
/
arm
-
vfp1
.
c
:
New
test
.
2005
-
04
-
22
Alexandre
Oliva
<
aoliva
@redhat
.
com
>
2005
-
04
-
22
Alexandre
Oliva
<
aoliva
@redhat
.
com
>
PR
c
++/
21087
PR
c
++/
21087
...
...
gcc/testsuite/gcc.dg/arm-vfp1.c
0 → 100644
View file @
d4b47784
/* { dg-do compile { target arm*-*-* } } */
/* { dg-options "-O2 -ffast-math -mfpu=vfp -mfloat-abi=softfp" } */
extern
float
fabsf
(
float
);
extern
float
sqrtf
(
float
);
extern
double
fabs
(
double
);
extern
double
sqrt
(
double
);
volatile
float
f1
,
f2
,
f3
;
void
test_sf
()
{
/* abssf2_vfp */
/* { dg-final { scan-assembler "fabss" } } */
f1
=
fabsf
(
f1
);
/* negsf2_vfp */
/* { dg-final { scan-assembler "fnegs" } } */
f1
=
-
f1
;
/* addsf3_vfp */
/* { dg-final { scan-assembler "fadds" } } */
f1
=
f2
+
f3
;
/* subsf3_vfp */
/* { dg-final { scan-assembler "fsubs" } } */
f1
=
f2
-
f3
;
/* divsf3_vfp */
/* { dg-final { scan-assembler "fdivs" } } */
f1
=
f2
/
f3
;
/* mulsf3_vfp */
/* { dg-final { scan-assembler "fmuls" } } */
f1
=
f2
*
f3
;
/* mulsf3negsf_vfp */
/* { dg-final { scan-assembler "fnmuls" } } */
f1
=
-
f2
*
f3
;
/* mulsf3addsf_vfp */
/* { dg-final { scan-assembler "fmacs" } } */
f1
=
f2
*
f3
+
f1
;
/* mulsf3subsf_vfp */
/* { dg-final { scan-assembler "fmscs" } } */
f1
=
f2
*
f3
-
f1
;
/* mulsf3negsfaddsf_vfp */
/* { dg-final { scan-assembler "fnmacs" } } */
f1
=
f2
-
f3
*
f1
;
/* mulsf3negsfsubsf_vfp */
/* { dg-final { scan-assembler "fnmscs" } } */
f1
=
-
f2
*
f3
-
f1
;
/* sqrtsf2_vfp */
/* { dg-final { scan-assembler "fsqrts" } } */
f1
=
sqrtf
(
f1
);
}
volatile
double
d1
,
d2
,
d3
;
void
test_df
()
{
/* absdf2_vfp */
/* { dg-final { scan-assembler "fabsd" } } */
d1
=
fabs
(
d1
);
/* negdf2_vfp */
/* { dg-final { scan-assembler "fnegd" } } */
d1
=
-
d1
;
/* adddf3_vfp */
/* { dg-final { scan-assembler "faddd" } } */
d1
=
d2
+
d3
;
/* subdf3_vfp */
/* { dg-final { scan-assembler "fsubd" } } */
d1
=
d2
-
d3
;
/* divdf3_vfp */
/* { dg-final { scan-assembler "fdivd" } } */
d1
=
d2
/
d3
;
/* muldf3_vfp */
/* { dg-final { scan-assembler "fmuld" } } */
d1
=
d2
*
d3
;
/* muldf3negdf_vfp */
/* { dg-final { scan-assembler "fnmuld" } } */
d1
=
-
d2
*
d3
;
/* muldf3adddf_vfp */
/* { dg-final { scan-assembler "fmacd" } } */
d1
=
d2
*
d3
+
d1
;
/* muldf3subdf_vfp */
/* { dg-final { scan-assembler "fmscd" } } */
d1
=
d2
*
d3
-
d1
;
/* muldf3negdfadddf_vfp */
/* { dg-final { scan-assembler "fnmacd" } } */
d1
=
d2
-
d3
*
d1
;
/* muldf3negdfsubdf_vfp */
/* { dg-final { scan-assembler "fnmscd" } } */
d1
=
-
d2
*
d3
-
d1
;
/* sqrtdf2_vfp */
/* { dg-final { scan-assembler "fsqrtd" } } */
d1
=
sqrt
(
d1
);
}
volatile
int
i1
;
volatile
unsigned
int
u1
;
void
test_convert
()
{
/* extendsfdf2_vfp */
/* { dg-final { scan-assembler "fcvtds" } } */
d1
=
f1
;
/* truncdfsf2_vfp */
/* { dg-final { scan-assembler "fcvtsd" } } */
f1
=
d1
;
/* truncsisf2_vfp */
/* { dg-final { scan-assembler "ftosizs" } } */
i1
=
f1
;
/* truncsidf2_vfp */
/* { dg-final { scan-assembler "ftosizd" } } */
i1
=
d1
;
/* fixuns_truncsfsi2 */
/* { dg-final { scan-assembler "ftouizs" } } */
u1
=
f1
;
/* fixuns_truncdfsi2 */
/* { dg-final { scan-assembler "ftouizd" } } */
u1
=
d1
;
/* floatsisf2_vfp */
/* { dg-final { scan-assembler "fsitos" } } */
f1
=
i1
;
/* floatsidf2_vfp */
/* { dg-final { scan-assembler "fsitod" } } */
d1
=
i1
;
/* floatunssisf2 */
/* { dg-final { scan-assembler "fuitos" } } */
f1
=
u1
;
/* floatunssidf2 */
/* { dg-final { scan-assembler "fuitod" } } */
d1
=
u1
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment