OSDN Git Service

* gcc.target/mips/octeon-exts-2.c: Compile it with -meb.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / mips / fpr-moves-8.c
1 /* { dg-do compile { target mips16_attribute } } */
2 /* { dg-mips-options "-mabi=64 -msoft-float -O2 -EB" } */
3 /* { dg-add-options mips16_attribute } */
4
5 extern long double g[16];
6 extern unsigned char gstuff[0x10000];
7
8 NOMIPS16 long double
9 foo (long double i1, long double i2, long double i3, long double i4,
10      long double *x, unsigned char *lstuff)
11 {
12   g[0] = i1;
13   g[1] = i2;
14   g[2] = i3;
15   g[3] = i4;
16   x[0] = x[4];
17   x[1] = 0;
18   x[2] = 1.0;
19   x[3] = g[4];
20   x[4] = *(long double *) (lstuff + 0x7fff);
21   return *(long double *) (gstuff + 0x7fff);
22 }
23
24 MIPS16 long double
25 bar (long double i1, long double i2, long double i3, long double i4,
26      long double *x, unsigned char *lstuff)
27 {
28   g[0] = i1;
29   g[1] = i2;
30   g[2] = i3;
31   g[3] = i4;
32   x[0] = x[4];
33   x[1] = 0;
34   x[2] = 1.0;
35   x[3] = g[4];
36   x[4] = *(long double *) (lstuff + 0x7fff);
37   return *(long double *) (gstuff + 0x7fff);
38 }