summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/mips
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-06-02 12:39:39 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-06-02 12:39:39 +0000
commit2fb581a932680f7c9031a388d83fd9461ae5aff7 (patch)
tree3fc3c7221a155722969c9d76ed30e1b1127f4ad2 /gcc/testsuite/gcc.target/mips
parentc643c550aace860f7d2ab17015f684444cb88c53 (diff)
downloadgcc-2fb581a932680f7c9031a388d83fd9461ae5aff7.tar.gz
2008-06-02 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r136272 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@136278 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.target/mips')
-rw-r--r--gcc/testsuite/gcc.target/mips/fpr-moves-7.c38
-rw-r--r--gcc/testsuite/gcc.target/mips/fpr-moves-8.c38
2 files changed, 76 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/mips/fpr-moves-7.c b/gcc/testsuite/gcc.target/mips/fpr-moves-7.c
new file mode 100644
index 00000000000..4736edd24ee
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/fpr-moves-7.c
@@ -0,0 +1,38 @@
+/* { dg-do compile { target mips16_attribute } } */
+/* { dg-mips-options "-mabi=64 -msoft-float -O2 -EL" } */
+/* { dg-add-options mips16_attribute } */
+
+extern long double g[16];
+extern unsigned char gstuff[0x10000];
+
+NOMIPS16 long double
+foo (long double i1, long double i2, long double i3, long double i4,
+ long double *x, unsigned char *lstuff)
+{
+ g[0] = i1;
+ g[1] = i2;
+ g[2] = i3;
+ g[3] = i4;
+ x[0] = x[4];
+ x[1] = 0;
+ x[2] = 1.0;
+ x[3] = g[4];
+ x[4] = *(long double *) (lstuff + 0x7fff);
+ return *(long double *) (gstuff + 0x7fff);
+}
+
+MIPS16 long double
+bar (long double i1, long double i2, long double i3, long double i4,
+ long double *x, unsigned char *lstuff)
+{
+ g[0] = i1;
+ g[1] = i2;
+ g[2] = i3;
+ g[3] = i4;
+ x[0] = x[4];
+ x[1] = 0;
+ x[2] = 1.0;
+ x[3] = g[4];
+ x[4] = *(long double *) (lstuff + 0x7fff);
+ return *(long double *) (gstuff + 0x7fff);
+}
diff --git a/gcc/testsuite/gcc.target/mips/fpr-moves-8.c b/gcc/testsuite/gcc.target/mips/fpr-moves-8.c
new file mode 100644
index 00000000000..ade9e5e9c0a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/fpr-moves-8.c
@@ -0,0 +1,38 @@
+/* { dg-do compile { target mips16_attribute } } */
+/* { dg-mips-options "-mabi=64 -msoft-float -O2 -EB" } */
+/* { dg-add-options mips16_attribute } */
+
+extern long double g[16];
+extern unsigned char gstuff[0x10000];
+
+NOMIPS16 long double
+foo (long double i1, long double i2, long double i3, long double i4,
+ long double *x, unsigned char *lstuff)
+{
+ g[0] = i1;
+ g[1] = i2;
+ g[2] = i3;
+ g[3] = i4;
+ x[0] = x[4];
+ x[1] = 0;
+ x[2] = 1.0;
+ x[3] = g[4];
+ x[4] = *(long double *) (lstuff + 0x7fff);
+ return *(long double *) (gstuff + 0x7fff);
+}
+
+MIPS16 long double
+bar (long double i1, long double i2, long double i3, long double i4,
+ long double *x, unsigned char *lstuff)
+{
+ g[0] = i1;
+ g[1] = i2;
+ g[2] = i3;
+ g[3] = i4;
+ x[0] = x[4];
+ x[1] = 0;
+ x[2] = 1.0;
+ x[3] = g[4];
+ x[4] = *(long double *) (lstuff + 0x7fff);
+ return *(long double *) (gstuff + 0x7fff);
+}