]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
mipscop-1.c: Add nomips16 attributes.
authorSandra Loosemore <sandra@codesourcery.com>
Wed, 5 Sep 2007 14:46:25 +0000 (10:46 -0400)
committerSandra Loosemore <sandra@gcc.gnu.org>
Wed, 5 Sep 2007 14:46:25 +0000 (10:46 -0400)
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

29 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/mipscop-1.c
gcc/testsuite/gcc.c-torture/compile/mipscop-2.c
gcc/testsuite/gcc.c-torture/compile/mipscop-3.c
gcc/testsuite/gcc.c-torture/compile/mipscop-4.c
gcc/testsuite/gcc.dg/torture/mips-hilo-1.c
gcc/testsuite/gcc.dg/torture/mips-hilo-2.c
gcc/testsuite/gcc.dg/torture/pr19683-1.c
gcc/testsuite/gcc.target/mips/asm-1.c
gcc/testsuite/gcc.target/mips/branch-1.c
gcc/testsuite/gcc.target/mips/code-readable-1.c
gcc/testsuite/gcc.target/mips/code-readable-2.c
gcc/testsuite/gcc.target/mips/code-readable-3.c
gcc/testsuite/gcc.target/mips/dspr2-MULT.c
gcc/testsuite/gcc.target/mips/dspr2-MULTU.c
gcc/testsuite/gcc.target/mips/ins-1.c
gcc/testsuite/gcc.target/mips/madd-3.c
gcc/testsuite/gcc.target/mips/maddu-3.c
gcc/testsuite/gcc.target/mips/mips32-dsp-run.c
gcc/testsuite/gcc.target/mips/mips32-dspr2-type.c
gcc/testsuite/gcc.target/mips/msub-3.c
gcc/testsuite/gcc.target/mips/msubu-3.c
gcc/testsuite/gcc.target/mips/near-far-3.c
gcc/testsuite/gcc.target/mips/near-far-4.c
gcc/testsuite/gcc.target/mips/smartmips-lwxs.c
gcc/testsuite/gcc.target/mips/smartmips-ror-1.c
gcc/testsuite/gcc.target/mips/smartmips-ror-2.c
gcc/testsuite/gcc.target/mips/smartmips-ror-3.c
gcc/testsuite/gcc.target/mips/smartmips-ror-4.c

index e00d89c5ff2625c9c24d380182bba967ae566763..2bb0865e7d95aba70c74135e66ab399f8210cda7 100644 (file)
@@ -1,3 +1,36 @@
+2007-09-05  Sandra Loosemore  <sandra@codesourcery.com>
+           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>
index 916a571db19a1e6763c8a7a3be4ee86d2e18645b..8a40ba1c6b7e68c36ab6df842d64b832790f4722 100644 (file)
@@ -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
index 96b855ac829264f713566f9ff7f4610df9769534..94df41d65f9a24b4ad7d2c1dfc5b32c9f76a0ff7 100644 (file)
@@ -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
index dd894c49d775ca2443e37bab03b760579c504bc7..cb4bd4d3efb3eb22d26f51414dba5ca27c26dcda 100644 (file)
@@ -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
index dfaa59e00ab67c2a4ff55697d0824b3188fe60b4..263fc5cacc1f58aaff0f9d5762a65556d4c32ab4 100644 (file)
@@ -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
+
index 8f8805139cf26737a988a28e572c45da66fa4f08..b7289666b7c588b4ad8e7902d53573866be2f9c4 100644 (file)
@@ -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
index 3d23a8da3c0c3ea1da45b1bd140b709677b4370b..dbe949307df855e4c5f7a34248928d21dbed17a5 100644 (file)
@@ -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
index 96674811f1e7db69a8283500a15005f1be66e112..05bf174183b7e392fef8ce410fbfc7998bbfb4d7 100644 (file)
@@ -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
index aed5b8cb285cee4808f489e2db2ff41009e98e44..d202d6cbdd45a0e512d6f934b7f8ee4e52fc7692 100644 (file)
@@ -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)
index 6b86dc04c2ce6f091c7b9f546bd7b1ffab1367a2..7caf2986baf20e62892dfc70b1f0e11bb412aae5 100644 (file)
@@ -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" } } */
index 75a34cd49c00fda5a6c803dac4f2180d0ec86408..8add1c7aa8337a12f562c709cada6888f649708a 100644 (file)
@@ -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;
index 17ec4d771987950f1eae230772eb2529e1cc8867..c23254842768a24c5a09b740fa1d3c0c21fba102 100644 (file)
@@ -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;
index edb4214c22f11d83a42a10060cce0a0947a70e63..bea568ccf0afc57cfd9b280ecb2574589bfe43e7 100644 (file)
@@ -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;
index 546e349a0f2c9ca507b5a131531aa885d4466dab..056042e9e3a3045acc0d52cb1acdc82c7833abc0 100644 (file)
@@ -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];
index 3226151c89d4ed42171db900ba93db146fc52228..7532b329799113145a1430c498d6f2528b271063 100644 (file)
@@ -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];
index abce7d55396887754718bb0cb9d7785b34de6d71..2eaf7c4433c6d796d3a4dc4a5e6c63cb81f8556e 100644 (file)
@@ -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;
index 6fc30e57a6b742d04e6aab3f5ba55c7f22a3af54..633dae34b615f23a84c3c14a61b8854428a4475f 100644 (file)
@@ -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;
index d89c450bb680db92f713089d080de696bdf13ecf..a332e9c592e10934fb8ff116ef447971520a7085 100644 (file)
@@ -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;
index a29d756e7911dfaed4a94bdae1d2a42d31760b7e..89f043867cd5069c9a06623ece7e9fc8cec7fa7b 100644 (file)
@@ -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;
index 5552e8b720545ca996fe070149f6471fd9d26806..710937cc411312e1030e157e661408a633b8a57c 100644 (file)
@@ -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;
 }
index 85cfed2febefecb43f8ec69b2dab01a727b8fc35..e24075641dc07ea79a916e552ba2538f14666c9c 100644 (file)
@@ -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;
index 055ba589a95b60c09d27ef6ed3acaeb96a09bc56..1c01f5cd25c18c72128500db5eab1f87fa8805e4 100644 (file)
@@ -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;
index d6902cdfeb0ac227d3d0f518fe609698d9233298..1ce3f1967daef8b939a69dcd00f0e8bdfe2d71e2 100644 (file)
@@ -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" } } */
index 7d156fabdc5260c31903cae3b73bad2265a62d9e..e1725f21f162f02b1d45baf3334e7df14b9586bc 100644 (file)
@@ -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" } } */
index cd9b0b3950f36dcffe9224ec2133700f5a929b71..f51fda1e360a89ff105d0ed08728c32ec7af48a2 100644 (file)
@@ -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];
 }
index 5ad7f3424c89d80dea9af7ba40e193b0cf544b7a..c6a0013b7df5e64d62daa2a9bde7dc1ae474b368 100644 (file)
@@ -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));
 }
index 93d376d537d77ac2e5eb9f92763fc8d9149787ee..2f3da55e8ac833a263407598f68361705bfb2d15 100644 (file)
@@ -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));
 }
index ec1c6e27e59db83b341a37ecea96830449a1580c..6dad55a64446b1c8cc14cc5ed3d88a4492d586df 100644 (file)
@@ -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));
 }
index 2a56210539f0ed5460e1f23271a350bdc7f23928..722dedcdae76e5b17aa276ef470f6da7b8152388 100644 (file)
@@ -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));
 }