aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandra Loosemore <sandra@codesourcery.com>2007-09-05 10:46:25 -0400
committerSandra Loosemore <sandra@gcc.gnu.org>2007-09-05 10:46:25 -0400
commit1333282db72d6e6f9904c37ed3a5753a920d4fdb (patch)
tree94e9400dc32974bf40c1ff0178a8c250e78c5a94
parentf9e4a411f9209f967b25b2f038b117db132139a5 (diff)
downloadgcc-1333282db72d6e6f9904c37ed3a5753a920d4fdb.zip
gcc-1333282db72d6e6f9904c37ed3a5753a920d4fdb.tar.gz
gcc-1333282db72d6e6f9904c37ed3a5753a920d4fdb.tar.bz2
mipscop-1.c: Add nomips16 attributes.
2007-09-05 Sandra Loosemore <sandra@codesourcery.com> David Ung <davidu@mips.com> Nigel Stephens <nigel@mips.com> gcc/testsuite/ * gcc.c-torture/compile/mipscop-1.c: Add nomips16 attributes. * gcc.c-torture/compile/mipscop-2.c: Likewise. * gcc.c-torture/compile/mipscop-3.c: Likewise. * gcc.c-torture/compile/mipscop-4.c: Likewise. * gcc.dg/torture/mips-hilo-1.c: Likewise. * gcc.dg/torture/mips-hilo-2.c: Likewise. * gcc.dg/torture/pr19683-1.c: Likewise. * gcc.target/mips/madd-3.c: Likewise. * gcc.target/mips/maddu-3.c: Likewise. * gcc.target/mips/msub-3.c: Likewise. * gcc.target/mips/msubu-3.c: Likewise. * gcc.target/mips/asm-1.c: Likewise. * gcc.target/mips/branch-1.c: Likewise. * gcc.target/mips/ins-1.c: Likewise. * gcc.target/mips/near-far-3.c: Likewise. * gcc.target/mips/near-far-4.c: Likewise. * gcc.target/mips/smartmips-lwxs.c: Likewise. * gcc.target/mips/smartmips-ror-1.c: Likewise. * gcc.target/mips/smartmips-ror-2.c: Likewise. * gcc.target/mips/smartmips-ror-3.c: Likewise. * gcc.target/mips/smartmips-ror-4.c: Likewise. * gcc.target/mips/dspr2-MULT.c: Likewise. * gcc.target/mips/dspr2-MULTU.c: Likewise. * gcc.target/mips/mips32-dsp-run.c: Likewise. * gcc.target/mips/mips32-dspr2-type.c: Likewise. * gcc.target/mips/code-readable-1.c: Add mips16 attributes. * gcc.target/mips/code-readable-2.c: Likewise. * gcc.target/mips/code-readable-3.c: Likewise. Co-Authored-By: David Ung <davidu@mips.com> Co-Authored-By: Nigel Stephens <nigel@mips.com> From-SVN: r128135
-rw-r--r--gcc/testsuite/ChangeLog33
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/mipscop-1.c4
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/mipscop-2.c4
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/mipscop-3.c4
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/mipscop-4.c5
-rw-r--r--gcc/testsuite/gcc.dg/torture/mips-hilo-1.c9
-rw-r--r--gcc/testsuite/gcc.dg/torture/mips-hilo-2.c8
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr19683-1.c12
-rw-r--r--gcc/testsuite/gcc.target/mips/asm-1.c7
-rw-r--r--gcc/testsuite/gcc.target/mips/branch-1.c13
-rw-r--r--gcc/testsuite/gcc.target/mips/code-readable-1.c8
-rw-r--r--gcc/testsuite/gcc.target/mips/code-readable-2.c8
-rw-r--r--gcc/testsuite/gcc.target/mips/code-readable-3.c8
-rw-r--r--gcc/testsuite/gcc.target/mips/dspr2-MULT.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/dspr2-MULTU.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/ins-1.c6
-rw-r--r--gcc/testsuite/gcc.target/mips/madd-3.c8
-rw-r--r--gcc/testsuite/gcc.target/mips/maddu-3.c8
-rw-r--r--gcc/testsuite/gcc.target/mips/mips32-dsp-run.c14
-rw-r--r--gcc/testsuite/gcc.target/mips/mips32-dspr2-type.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/msub-3.c6
-rw-r--r--gcc/testsuite/gcc.target/mips/msubu-3.c6
-rw-r--r--gcc/testsuite/gcc.target/mips/near-far-3.c20
-rw-r--r--gcc/testsuite/gcc.target/mips/near-far-4.c20
-rw-r--r--gcc/testsuite/gcc.target/mips/smartmips-lwxs.c6
-rw-r--r--gcc/testsuite/gcc.target/mips/smartmips-ror-1.c6
-rw-r--r--gcc/testsuite/gcc.target/mips/smartmips-ror-2.c6
-rw-r--r--gcc/testsuite/gcc.target/mips/smartmips-ror-3.c6
-rw-r--r--gcc/testsuite/gcc.target/mips/smartmips-ror-4.c6
29 files changed, 153 insertions, 100 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index e00d89c..2bb0865 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -2,6 +2,39 @@
David Ung <davidu@mips.com>
Nigel Stephens <nigel@mips.com>
+ * gcc.c-torture/compile/mipscop-1.c: Add nomips16 attributes.
+ * gcc.c-torture/compile/mipscop-2.c: Likewise.
+ * gcc.c-torture/compile/mipscop-3.c: Likewise.
+ * gcc.c-torture/compile/mipscop-4.c: Likewise.
+ * gcc.dg/torture/mips-hilo-1.c: Likewise.
+ * gcc.dg/torture/mips-hilo-2.c: Likewise.
+ * gcc.dg/torture/pr19683-1.c: Likewise.
+ * gcc.target/mips/madd-3.c: Likewise.
+ * gcc.target/mips/maddu-3.c: Likewise.
+ * gcc.target/mips/msub-3.c: Likewise.
+ * gcc.target/mips/msubu-3.c: Likewise.
+ * gcc.target/mips/asm-1.c: Likewise.
+ * gcc.target/mips/branch-1.c: Likewise.
+ * gcc.target/mips/ins-1.c: Likewise.
+ * gcc.target/mips/near-far-3.c: Likewise.
+ * gcc.target/mips/near-far-4.c: Likewise.
+ * gcc.target/mips/smartmips-lwxs.c: Likewise.
+ * gcc.target/mips/smartmips-ror-1.c: Likewise.
+ * gcc.target/mips/smartmips-ror-2.c: Likewise.
+ * gcc.target/mips/smartmips-ror-3.c: Likewise.
+ * gcc.target/mips/smartmips-ror-4.c: Likewise.
+ * gcc.target/mips/dspr2-MULT.c: Likewise.
+ * gcc.target/mips/dspr2-MULTU.c: Likewise.
+ * gcc.target/mips/mips32-dsp-run.c: Likewise.
+ * gcc.target/mips/mips32-dspr2-type.c: Likewise.
+ * gcc.target/mips/code-readable-1.c: Add mips16 attributes.
+ * gcc.target/mips/code-readable-2.c: Likewise.
+ * gcc.target/mips/code-readable-3.c: Likewise.
+
+2007-09-05 Sandra Loosemore <sandra@codesourcery.com>
+ David Ung <davidu@mips.com>
+ Nigel Stephens <nigel@mips.com>
+
* gcc.target/mips/mips16-attributes.c: New.
2007-09-05 Paul Thomas <pault@gcc.gnu.org>
diff --git a/gcc/testsuite/gcc.c-torture/compile/mipscop-1.c b/gcc/testsuite/gcc.c-torture/compile/mipscop-1.c
index 916a571..8a40ba1 100644
--- a/gcc/testsuite/gcc.c-torture/compile/mipscop-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/mipscop-1.c
@@ -1,9 +1,8 @@
/* { dg-do compile { target mips*-*-* } } */
-#ifndef __mips16
register unsigned int cp0count asm ("$c0r1");
-int
+int __attribute__ ((nomips16))
main (int argc, char *argv[])
{
unsigned int d;
@@ -11,4 +10,3 @@ main (int argc, char *argv[])
d = cp0count + 3;
printf ("%d\n", d);
}
-#endif
diff --git a/gcc/testsuite/gcc.c-torture/compile/mipscop-2.c b/gcc/testsuite/gcc.c-torture/compile/mipscop-2.c
index 96b855a..94df41d 100644
--- a/gcc/testsuite/gcc.c-torture/compile/mipscop-2.c
+++ b/gcc/testsuite/gcc.c-torture/compile/mipscop-2.c
@@ -1,11 +1,10 @@
/* { dg-do compile { target mips*-*-* } } */
-#ifndef __mips16
register unsigned int c3r1 asm ("$c3r1");
extern unsigned int b, c;
-void
+void __attribute__ ((nomips16))
foo ()
{
unsigned int a, d;
@@ -17,4 +16,3 @@ foo ()
d = c3r1;
printf ("%d\n", d);
}
-#endif
diff --git a/gcc/testsuite/gcc.c-torture/compile/mipscop-3.c b/gcc/testsuite/gcc.c-torture/compile/mipscop-3.c
index dd894c4..cb4bd4d 100644
--- a/gcc/testsuite/gcc.c-torture/compile/mipscop-3.c
+++ b/gcc/testsuite/gcc.c-torture/compile/mipscop-3.c
@@ -1,11 +1,10 @@
/* { dg-do compile { target mips*-*-* } } */
-#ifndef __mips16
register unsigned int c3r1 asm ("$c3r1"), c3r2 asm ("$c3r2");
extern unsigned int b, c;
-void
+void __attribute__ ((nomips16))
foo ()
{
unsigned int a, d;
@@ -17,4 +16,3 @@ foo ()
d = c3r1;
printf ("%d\n", d);
}
-#endif
diff --git a/gcc/testsuite/gcc.c-torture/compile/mipscop-4.c b/gcc/testsuite/gcc.c-torture/compile/mipscop-4.c
index dfaa59e..263fc5c 100644
--- a/gcc/testsuite/gcc.c-torture/compile/mipscop-4.c
+++ b/gcc/testsuite/gcc.c-torture/compile/mipscop-4.c
@@ -1,11 +1,10 @@
/* { dg-do compile { target mips*-*-* } } */
-#ifndef __mips16
register unsigned long c3r1 asm ("$c3r1"), c3r2 asm ("$c3r2");
extern unsigned long b, c;
-void
+void __attribute__ ((nomips16))
foo ()
{
unsigned long a, d;
@@ -17,4 +16,4 @@ foo ()
d = c3r1;
printf ("%d\n", d);
}
-#endif
+
diff --git a/gcc/testsuite/gcc.dg/torture/mips-hilo-1.c b/gcc/testsuite/gcc.dg/torture/mips-hilo-1.c
index 8f88051..b728966 100644
--- a/gcc/testsuite/gcc.dg/torture/mips-hilo-1.c
+++ b/gcc/testsuite/gcc.dg/torture/mips-hilo-1.c
@@ -6,10 +6,8 @@
extern void abort (void);
extern void exit (int);
-#if !defined(__mips16)
-
#define DECLARE(TYPE) \
- TYPE __attribute__ ((noinline)) \
+ TYPE __attribute__ ((noinline)) __attribute__ ((nomips16)) \
f1##TYPE (TYPE x1, TYPE x2, TYPE x3) \
{ \
TYPE t1, t2; \
@@ -19,7 +17,7 @@ extern void exit (int);
return t1 + t2; \
} \
\
- TYPE __attribute__ ((noinline)) \
+ TYPE __attribute__ ((noinline)) __attribute__ ((nomips16)) \
f2##TYPE (TYPE x1, TYPE x2, TYPE x3) \
{ \
TYPE t1, t2; \
@@ -73,6 +71,3 @@ main ()
#endif
exit (0);
}
-#else
-int main () { exit (0); }
-#endif
diff --git a/gcc/testsuite/gcc.dg/torture/mips-hilo-2.c b/gcc/testsuite/gcc.dg/torture/mips-hilo-2.c
index 3d23a8d..dbe9493 100644
--- a/gcc/testsuite/gcc.dg/torture/mips-hilo-2.c
+++ b/gcc/testsuite/gcc.dg/torture/mips-hilo-2.c
@@ -5,10 +5,9 @@
extern void abort (void);
extern void exit (int);
-#if !defined(__mips16)
unsigned int g;
-unsigned long long f (unsigned int x)
+unsigned __attribute__ ((nomips16)) long long f (unsigned int x)
{
union { unsigned long long ll; unsigned int parts[2]; } u;
@@ -17,7 +16,7 @@ unsigned long long f (unsigned int x)
return u.ll;
}
-int main ()
+int __attribute__ ((nomips16)) main ()
{
union { unsigned long long ll; unsigned int parts[2]; } u;
@@ -26,6 +25,3 @@ int main ()
abort ();
exit (0);
}
-#else
-int main () { exit (0); }
-#endif
diff --git a/gcc/testsuite/gcc.dg/torture/pr19683-1.c b/gcc/testsuite/gcc.dg/torture/pr19683-1.c
index 9667481..05bf174 100644
--- a/gcc/testsuite/gcc.dg/torture/pr19683-1.c
+++ b/gcc/testsuite/gcc.dg/torture/pr19683-1.c
@@ -6,7 +6,6 @@
extern void abort (void);
extern void exit (int);
-#ifndef __mips16
#define REPEAT10(X, Y) \
X(Y##0); X(Y##1); X(Y##2); X(Y##3); X(Y##4); \
X(Y##5); X(Y##6); X(Y##7); X(Y##8); X(Y##9)
@@ -17,7 +16,7 @@ extern void exit (int);
union u { unsigned long long ll; unsigned int i[2]; };
-unsigned int
+unsigned int __attribute__ ((nomips16))
foo (volatile unsigned int *ptr)
{
union u u;
@@ -30,7 +29,7 @@ foo (volatile unsigned int *ptr)
return result;
}
-int
+int __attribute__ ((nomips16))
main (void)
{
unsigned int array[] = { 1000 * 1000 * 1000 };
@@ -41,10 +40,3 @@ main (void)
abort ();
exit (0);
}
-#else
-int
-main (void)
-{
- exit (0);
-}
-#endif
diff --git a/gcc/testsuite/gcc.target/mips/asm-1.c b/gcc/testsuite/gcc.target/mips/asm-1.c
index aed5b8c..d202d6c 100644
--- a/gcc/testsuite/gcc.target/mips/asm-1.c
+++ b/gcc/testsuite/gcc.target/mips/asm-1.c
@@ -1,8 +1,11 @@
/* PR target/17565. GCC used to put the asm into the delay slot
of the call. */
/* { dg-do assemble } */
-/* { dg-mips-options "-O -mno-mips16" } */
-int foo (int n)
+/* { dg-mips-options "-O" } */
+
+#define NOMIPS16 __attribute__ ((nomips16))
+
+NOMIPS16 int foo (int n)
{
register int k asm ("$16") = n;
if (k > 0)
diff --git a/gcc/testsuite/gcc.target/mips/branch-1.c b/gcc/testsuite/gcc.target/mips/branch-1.c
index 6b86dc0..7caf298 100644
--- a/gcc/testsuite/gcc.target/mips/branch-1.c
+++ b/gcc/testsuite/gcc.target/mips/branch-1.c
@@ -1,11 +1,14 @@
/* We should implement these "if" statements using an "andi" instruction
followed by a branch on zero. */
-/* { dg-mips-options "-O2 -mno-mips16" } */
+/* { dg-mips-options "-O2" } */
+
+#define NOMIPS16 __attribute__ ((nomips16))
+
void bar (void);
-void f1 (int x) { if (x & 4) bar (); }
-void f2 (int x) { if ((x >> 2) & 1) bar (); }
-void f3 (unsigned int x) { if (x & 0x10) bar (); }
-void f4 (unsigned int x) { if ((x >> 4) & 1) bar (); }
+NOMIPS16 void f1 (int x) { if (x & 4) bar (); }
+NOMIPS16 void f2 (int x) { if ((x >> 2) & 1) bar (); }
+NOMIPS16 void f3 (unsigned int x) { if (x & 0x10) bar (); }
+NOMIPS16 void f4 (unsigned int x) { if ((x >> 4) & 1) bar (); }
/* { dg-final { scan-assembler "\tandi\t.*\tandi\t.*\tandi\t.*\tandi\t" } } */
/* { dg-final { scan-assembler-not "\tsrl\t" } } */
/* { dg-final { scan-assembler-not "\tsra\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/code-readable-1.c b/gcc/testsuite/gcc.target/mips/code-readable-1.c
index 75a34cd..8add1c7 100644
--- a/gcc/testsuite/gcc.target/mips/code-readable-1.c
+++ b/gcc/testsuite/gcc.target/mips/code-readable-1.c
@@ -1,6 +1,8 @@
-/* { dg-mips-options "-mips16 -mcode-readable=yes -mgp32" } */
+/* { dg-mips-options "-mcode-readable=yes -mgp32" } */
-int
+#define MIPS16 __attribute__ ((mips16))
+
+MIPS16 int
foo (int i)
{
switch (i)
@@ -18,7 +20,7 @@ foo (int i)
extern int k[];
-int *
+MIPS16 int *
bar (void)
{
return k;
diff --git a/gcc/testsuite/gcc.target/mips/code-readable-2.c b/gcc/testsuite/gcc.target/mips/code-readable-2.c
index 17ec4d7..c232548 100644
--- a/gcc/testsuite/gcc.target/mips/code-readable-2.c
+++ b/gcc/testsuite/gcc.target/mips/code-readable-2.c
@@ -1,6 +1,8 @@
-/* { dg-mips-options "-mips16 -mcode-readable=pcrel -mgp32" } */
+/* { dg-mips-options "-mcode-readable=pcrel -mgp32" } */
-int
+#define MIPS16 __attribute__ ((mips16))
+
+MIPS16 int
foo (int i)
{
switch (i)
@@ -18,7 +20,7 @@ foo (int i)
extern int k[];
-int *
+MIPS16 int *
bar (void)
{
return k;
diff --git a/gcc/testsuite/gcc.target/mips/code-readable-3.c b/gcc/testsuite/gcc.target/mips/code-readable-3.c
index edb4214..bea568c 100644
--- a/gcc/testsuite/gcc.target/mips/code-readable-3.c
+++ b/gcc/testsuite/gcc.target/mips/code-readable-3.c
@@ -1,6 +1,8 @@
-/* { dg-mips-options "-mips16 -mcode-readable=no -mgp32" } */
+/* { dg-mips-options "-mcode-readable=no -mgp32" } */
-int
+#define MIPS16 __attribute__ ((mips16))
+
+MIPS16 int
foo (int i)
{
switch (i)
@@ -18,7 +20,7 @@ foo (int i)
extern int k[];
-int *
+MIPS16 int *
bar (void)
{
return k;
diff --git a/gcc/testsuite/gcc.target/mips/dspr2-MULT.c b/gcc/testsuite/gcc.target/mips/dspr2-MULT.c
index 546e349..056042e 100644
--- a/gcc/testsuite/gcc.target/mips/dspr2-MULT.c
+++ b/gcc/testsuite/gcc.target/mips/dspr2-MULT.c
@@ -7,11 +7,13 @@
/* { dg-final { scan-assembler "ac2" } } */
/* { dg-final { scan-assembler "ac3" } } */
+#define NOMIPS16 __attribute__ ((nomips16))
+
typedef long long a64;
a64 a[4];
int b[4], c[4];
-void test ()
+NOMIPS16 void test ()
{
a[0] = (a64) b[0] * c[0];
a[1] = (a64) b[1] * c[1];
diff --git a/gcc/testsuite/gcc.target/mips/dspr2-MULTU.c b/gcc/testsuite/gcc.target/mips/dspr2-MULTU.c
index 3226151..7532b32 100644
--- a/gcc/testsuite/gcc.target/mips/dspr2-MULTU.c
+++ b/gcc/testsuite/gcc.target/mips/dspr2-MULTU.c
@@ -7,11 +7,13 @@
/* { dg-final { scan-assembler "ac2" } } */
/* { dg-final { scan-assembler "ac3" } } */
+#define NOMIPS16 __attribute__ ((nomips16))
+
typedef long long a64;
a64 a[4];
unsigned int b[4], c[4];
-void test ()
+NOMIPS16 void test ()
{
a[0] = (a64) b[0] * c[0];
a[1] = (a64) b[1] * c[1];
diff --git a/gcc/testsuite/gcc.target/mips/ins-1.c b/gcc/testsuite/gcc.target/mips/ins-1.c
index abce7d5..2eaf7c4 100644
--- a/gcc/testsuite/gcc.target/mips/ins-1.c
+++ b/gcc/testsuite/gcc.target/mips/ins-1.c
@@ -1,7 +1,9 @@
/* { dg-do compile } */
-/* { dg-mips-options "-O -march=mips32r2 -mno-mips16" } */
+/* { dg-mips-options "-O -march=mips32r2" } */
/* { dg-final { scan-assembler "\tins\t" } } */
+#define NOMIPS16 __attribute__ ((nomips16))
+
struct
{
unsigned int i : 2;
@@ -9,7 +11,7 @@ struct
unsigned int k : 4;
} s;
-void
+NOMIPS16 void
foo (void)
{
s.j = 1;
diff --git a/gcc/testsuite/gcc.target/mips/madd-3.c b/gcc/testsuite/gcc.target/mips/madd-3.c
index 6fc30e5..633dae3 100644
--- a/gcc/testsuite/gcc.target/mips/madd-3.c
+++ b/gcc/testsuite/gcc.target/mips/madd-3.c
@@ -2,19 +2,21 @@
/* { dg-mips-options "-O2 -mips32 -mgp32" } */
/* { dg-final { scan-assembler-times "\tmadd\t" 3 } } */
-long long
+#define NOMIPS16 __attribute__ ((nomips16))
+
+NOMIPS16 long long
f1 (int x, int y, long long z)
{
return (long long) x * y + z;
}
-long long
+NOMIPS16 long long
f2 (int x, int y, long long z)
{
return z + (long long) y * x;
}
-long long
+NOMIPS16 long long
f3 (int x, int y, long long z)
{
long long t = (long long) x * y;
diff --git a/gcc/testsuite/gcc.target/mips/maddu-3.c b/gcc/testsuite/gcc.target/mips/maddu-3.c
index d89c450..a332e9c5 100644
--- a/gcc/testsuite/gcc.target/mips/maddu-3.c
+++ b/gcc/testsuite/gcc.target/mips/maddu-3.c
@@ -2,22 +2,24 @@
/* { dg-mips-options "-O2 -mips32 -mgp32" } */
/* { dg-final { scan-assembler-times "\tmaddu\t" 3 } } */
+#define NOMIPS16 __attribute__ ((nomips16))
+
typedef unsigned int ui;
typedef unsigned long long ull;
-ull
+NOMIPS16 ull
f1 (ui x, ui y, ull z)
{
return (ull) x * y + z;
}
-ull
+NOMIPS16 ull
f2 (ui x, ui y, ull z)
{
return z + (ull) y * x;
}
-ull
+NOMIPS16 ull
f3 (ui x, ui y, ull z)
{
ull t = (ull) x * y;
diff --git a/gcc/testsuite/gcc.target/mips/mips32-dsp-run.c b/gcc/testsuite/gcc.target/mips/mips32-dsp-run.c
index a29d756..89f0438 100644
--- a/gcc/testsuite/gcc.target/mips/mips32-dsp-run.c
+++ b/gcc/testsuite/gcc.target/mips/mips32-dsp-run.c
@@ -2,6 +2,8 @@
/* { dg-do run { target mipsisa32r2*-*-* } } */
/* { dg-mips-options "-march=mips32r2 -mdsp -O2" } */
+#define NOMIPS16 __attribute__ ((nomips16))
+
#include <stdlib.h>
#include <stdio.h>
@@ -12,7 +14,7 @@ typedef int q31;
typedef int i32;
typedef long long a64;
-void test_MIPS_DSP (void);
+NOMIPS16 void test_MIPS_DSP (void);
char array[100];
int little_endian;
@@ -33,27 +35,27 @@ int main ()
exit (0);
}
-v2q15 add_v2q15 (v2q15 a, v2q15 b)
+NOMIPS16 v2q15 add_v2q15 (v2q15 a, v2q15 b)
{
return __builtin_mips_addq_ph (a, b);
}
-v4i8 add_v4i8 (v4i8 a, v4i8 b)
+NOMIPS16 v4i8 add_v4i8 (v4i8 a, v4i8 b)
{
return __builtin_mips_addu_qb (a, b);
}
-v2q15 sub_v2q15 (v2q15 a, v2q15 b)
+NOMIPS16 v2q15 sub_v2q15 (v2q15 a, v2q15 b)
{
return __builtin_mips_subq_ph (a, b);
}
-v4i8 sub_v4i8 (v4i8 a, v4i8 b)
+NOMIPS16 v4i8 sub_v4i8 (v4i8 a, v4i8 b)
{
return __builtin_mips_subu_qb (a, b);
}
-void test_MIPS_DSP ()
+NOMIPS16 void test_MIPS_DSP ()
{
v4i8 v4i8_a,v4i8_b,v4i8_c,v4i8_r,v4i8_s;
v2q15 v2q15_a,v2q15_b,v2q15_c,v2q15_r,v2q15_s;
diff --git a/gcc/testsuite/gcc.target/mips/mips32-dspr2-type.c b/gcc/testsuite/gcc.target/mips/mips32-dspr2-type.c
index 5552e8b..710937c 100644
--- a/gcc/testsuite/gcc.target/mips/mips32-dspr2-type.c
+++ b/gcc/testsuite/gcc.target/mips/mips32-dspr2-type.c
@@ -3,9 +3,11 @@
/* { dg-mips-options "-march=mips32r2 -mdspr2" } */
/* { dg-final { scan-assembler "\tmul.ph\t" } } */
+#define NOMIPS16 __attribute__ ((nomips16))
+
typedef short v2hi __attribute__ ((vector_size(4)));
-v2hi mul_v2hi (v2hi a, v2hi b)
+NOMIPS16 v2hi mul_v2hi (v2hi a, v2hi b)
{
return a * b;
}
diff --git a/gcc/testsuite/gcc.target/mips/msub-3.c b/gcc/testsuite/gcc.target/mips/msub-3.c
index 85cfed2..e240756 100644
--- a/gcc/testsuite/gcc.target/mips/msub-3.c
+++ b/gcc/testsuite/gcc.target/mips/msub-3.c
@@ -2,13 +2,15 @@
/* { dg-mips-options "-O2 -mips32 -mgp32" } */
/* { dg-final { scan-assembler-times "\tmsub\t" 2 } } */
-long long
+#define NOMIPS16 __attribute__ ((nomips16))
+
+NOMIPS16 long long
f1 (int x, int y, long long z)
{
return z - (long long) y * x;
}
-long long
+NOMIPS16 long long
f2 (int x, int y, long long z)
{
long long t = (long long) x * y;
diff --git a/gcc/testsuite/gcc.target/mips/msubu-3.c b/gcc/testsuite/gcc.target/mips/msubu-3.c
index 055ba58..1c01f5c 100644
--- a/gcc/testsuite/gcc.target/mips/msubu-3.c
+++ b/gcc/testsuite/gcc.target/mips/msubu-3.c
@@ -2,16 +2,18 @@
/* { dg-mips-options "-O2 -mips32 -mgp32" } */
/* { dg-final { scan-assembler-times "\tmsubu\t" 2 } } */
+#define NOMIPS16 __attribute__ ((nomips16))
+
typedef unsigned int ui;
typedef unsigned long long ull;
-ull
+NOMIPS16 ull
f1 (ui x, ui y, ull z)
{
return z - (ull) y * x;
}
-ull
+NOMIPS16 ull
f2 (ui x, ui y, ull z)
{
ull t = (ull) x * y;
diff --git a/gcc/testsuite/gcc.target/mips/near-far-3.c b/gcc/testsuite/gcc.target/mips/near-far-3.c
index d6902cd..1ce3f19 100644
--- a/gcc/testsuite/gcc.target/mips/near-far-3.c
+++ b/gcc/testsuite/gcc.target/mips/near-far-3.c
@@ -1,16 +1,18 @@
/* { dg-do compile } */
-/* { dg-mips-options "-mlong-calls -O2 -mno-mips16" } */
+/* { dg-mips-options "-mlong-calls -O2" } */
/* { dg-require-effective-target nonpic } */
-extern int long_call_func () __attribute__((long_call));
-extern int far_func () __attribute__((far));
-extern int near_func () __attribute__((near));
-extern int normal_func ();
+#define NOMIPS16 __attribute__ ((nomips16))
-int test1 () { return long_call_func (); }
-int test2 () { return far_func (); }
-int test3 () { return near_func (); }
-int test4 () { return normal_func (); }
+NOMIPS16 extern int long_call_func () __attribute__((long_call));
+NOMIPS16 extern int far_func () __attribute__((far));
+NOMIPS16 extern int near_func () __attribute__((near));
+NOMIPS16 extern int normal_func ();
+
+NOMIPS16 int test1 () { return long_call_func (); }
+NOMIPS16 int test2 () { return far_func (); }
+NOMIPS16 int test3 () { return near_func (); }
+NOMIPS16 int test4 () { return normal_func (); }
/* { dg-final { scan-assembler-not "\tj\tlong_call_func\n" } } */
/* { dg-final { scan-assembler-not "\tj\tfar_func\n" } } */
diff --git a/gcc/testsuite/gcc.target/mips/near-far-4.c b/gcc/testsuite/gcc.target/mips/near-far-4.c
index 7d156fa..e1725f2 100644
--- a/gcc/testsuite/gcc.target/mips/near-far-4.c
+++ b/gcc/testsuite/gcc.target/mips/near-far-4.c
@@ -1,16 +1,18 @@
/* { dg-do compile } */
-/* { dg-mips-options "-mno-long-calls -O2 -mno-mips16" } */
+/* { dg-mips-options "-mno-long-calls -O2" } */
/* { dg-require-effective-target nonpic } */
-extern int long_call_func () __attribute__((long_call));
-extern int far_func () __attribute__((far));
-extern int near_func () __attribute__((near));
-extern int normal_func ();
+#define NOMIPS16 __attribute__ ((nomips16))
-int test1 () { return long_call_func (); }
-int test2 () { return far_func (); }
-int test3 () { return near_func (); }
-int test4 () { return normal_func (); }
+NOMIPS16 extern int long_call_func () __attribute__((long_call));
+NOMIPS16 extern int far_func () __attribute__((far));
+NOMIPS16 extern int near_func () __attribute__((near));
+NOMIPS16 extern int normal_func ();
+
+NOMIPS16 int test1 () { return long_call_func (); }
+NOMIPS16 int test2 () { return far_func (); }
+NOMIPS16 int test3 () { return near_func (); }
+NOMIPS16 int test4 () { return normal_func (); }
/* { dg-final { scan-assembler-not "\tj\tlong_call_func\n" } } */
/* { dg-final { scan-assembler-not "\tj\tfar_func\n" } } */
diff --git a/gcc/testsuite/gcc.target/mips/smartmips-lwxs.c b/gcc/testsuite/gcc.target/mips/smartmips-lwxs.c
index cd9b0b3..f51fda1 100644
--- a/gcc/testsuite/gcc.target/mips/smartmips-lwxs.c
+++ b/gcc/testsuite/gcc.target/mips/smartmips-lwxs.c
@@ -1,7 +1,9 @@
/* { dg-do compile } */
-/* { dg-mips-options "-O -msmartmips -mno-mips16" } */
+/* { dg-mips-options "-O -msmartmips" } */
-int scaled_indexed_word_load (int a[], int b)
+#define NOMIPS16 __attribute__ ((nomips16))
+
+NOMIPS16 int scaled_indexed_word_load (int a[], int b)
{
return a[b];
}
diff --git a/gcc/testsuite/gcc.target/mips/smartmips-ror-1.c b/gcc/testsuite/gcc.target/mips/smartmips-ror-1.c
index 5ad7f34..c6a0013 100644
--- a/gcc/testsuite/gcc.target/mips/smartmips-ror-1.c
+++ b/gcc/testsuite/gcc.target/mips/smartmips-ror-1.c
@@ -1,7 +1,9 @@
/* { dg-do compile } */
-/* { dg-mips-options "-O -msmartmips -mno-mips16" } */
+/* { dg-mips-options "-O -msmartmips" } */
-int rotate_left (unsigned a, unsigned s)
+#define NOMIPS16 __attribute__ ((nomips16))
+
+NOMIPS16 int rotate_left (unsigned a, unsigned s)
{
return (a << s) | (a >> (32 - s));
}
diff --git a/gcc/testsuite/gcc.target/mips/smartmips-ror-2.c b/gcc/testsuite/gcc.target/mips/smartmips-ror-2.c
index 93d376d..2f3da55 100644
--- a/gcc/testsuite/gcc.target/mips/smartmips-ror-2.c
+++ b/gcc/testsuite/gcc.target/mips/smartmips-ror-2.c
@@ -1,7 +1,9 @@
/* { dg-do compile } */
-/* { dg-mips-options "-O -msmartmips -mno-mips16" } */
+/* { dg-mips-options "-O -msmartmips" } */
-int rotate_right (unsigned a, unsigned s)
+#define NOMIPS16 __attribute__ ((nomips16))
+
+NOMIPS16 int rotate_right (unsigned a, unsigned s)
{
return (a >> s) | (a << (32 - s));
}
diff --git a/gcc/testsuite/gcc.target/mips/smartmips-ror-3.c b/gcc/testsuite/gcc.target/mips/smartmips-ror-3.c
index ec1c6e2..6dad55a 100644
--- a/gcc/testsuite/gcc.target/mips/smartmips-ror-3.c
+++ b/gcc/testsuite/gcc.target/mips/smartmips-ror-3.c
@@ -1,9 +1,11 @@
/* { dg-do compile } */
-/* { dg-mips-options "-O -msmartmips -mno-mips16" } */
+/* { dg-mips-options "-O -msmartmips" } */
+
+#define NOMIPS16 __attribute__ ((nomips16))
#define S 13
-int rotate_left_constant (unsigned a)
+NOMIPS16 int rotate_left_constant (unsigned a)
{
return (a << S) | (a >> (32 - S));
}
diff --git a/gcc/testsuite/gcc.target/mips/smartmips-ror-4.c b/gcc/testsuite/gcc.target/mips/smartmips-ror-4.c
index 2a56210..722dedc 100644
--- a/gcc/testsuite/gcc.target/mips/smartmips-ror-4.c
+++ b/gcc/testsuite/gcc.target/mips/smartmips-ror-4.c
@@ -1,9 +1,11 @@
/* { dg-do compile } */
-/* { dg-mips-options "-O -msmartmips -mno-mips16" } */
+/* { dg-mips-options "-O -msmartmips" } */
+
+#define NOMIPS16 __attribute__ ((nomips16))
#define S 13
-int rotate_right_constant (unsigned a)
+NOMIPS16 int rotate_right_constant (unsigned a)
{
return (a >> S) | (a << (32 - S));
}