summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/mips/movcc-3.c
diff options
context:
space:
mode:
authorupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
committerupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
commit554fd8c5195424bdbcabf5de30fdc183aba391bd (patch)
tree976dc5ab7fddf506dadce60ae936f43f58787092 /gcc/testsuite/gcc.target/mips/movcc-3.c
downloadcbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.bz2
cbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.xz
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository.
Diffstat (limited to 'gcc/testsuite/gcc.target/mips/movcc-3.c')
-rw-r--r--gcc/testsuite/gcc.target/mips/movcc-3.c63
1 files changed, 63 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/mips/movcc-3.c b/gcc/testsuite/gcc.target/mips/movcc-3.c
new file mode 100644
index 000000000..e6481777a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/movcc-3.c
@@ -0,0 +1,63 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 isa>=4 -mhard-float" } */
+/* { dg-final { scan-assembler "movt" } } */
+/* { dg-final { scan-assembler "movf" } } */
+/* { dg-final { scan-assembler "movz.s" } } */
+/* { dg-final { scan-assembler "movn.s" } } */
+/* { dg-final { scan-assembler "movt.s" } } */
+/* { dg-final { scan-assembler "movz.d" } } */
+/* { dg-final { scan-assembler "movn.d" } } */
+/* { dg-final { scan-assembler "movf.d" } } */
+
+void ext_int (int);
+void ext_long (long);
+void ext_float (float);
+void ext_double (double);
+
+NOMIPS16 int
+sub3 (int i, int j, float f)
+{
+ ext_int (f ? i : j);
+}
+
+NOMIPS16 long
+sub6 (long i, long j, float f)
+{
+ ext_long (!f ? i : j);
+}
+
+NOMIPS16 float
+sub7 (float f, float g, int i)
+{
+ ext_float (i ? f : g);
+}
+
+NOMIPS16 float
+sub8 (float f, float g, long l)
+{
+ ext_float (!l ? f : g);
+}
+
+NOMIPS16 float
+sub9 (float f, float g, float h)
+{
+ ext_float (h ? f : g);
+}
+
+NOMIPS16 double
+suba (double f, double g, int i)
+{
+ ext_double (i ? f : g);
+}
+
+NOMIPS16 double
+subb (double f, double g, long l)
+{
+ ext_double (!l ? f : g);
+}
+
+NOMIPS16 double
+subc (double f, double g, double h)
+{
+ ext_double (!h ? f : g);
+}