This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] MIPS: IEEE 754-2008 feature testing escape fixes


Hi,

 I have realised a double escape is required in scan-assembler patterns 
for special characters to match literally.  Additionally I've noticed a 
couple escapes missing altogether.  There are no regressions with the 
mips-linux-gnu target and the change below.  OK to apply?

2013-08-13  Maciej W. Rozycki  <macro@codesourcery.com>

	gcc/testsuite/
	* gcc.target/mips/fabs-2008.c: Correct scan-assembler pattern 
	escapes.
	* gcc.target/mips/fabs-legacy.c: Likewise.
	* gcc.target/mips/fabsf-2008.c: Likewise.
	* gcc.target/mips/fabsf-legacy.c: Likewise.
	* gcc.target/mips/fneg-2008.c: Likewise.
	* gcc.target/mips/fneg-legacy.c: Likewise.
	* gcc.target/mips/fnegf-2008.c: Likewise.
	* gcc.target/mips/fnegf-legacy.c: Likewise.
	* gcc.target/mips/nan-2008.c: Likewise.
	* gcc.target/mips/nan-legacy.c: Likewise.
	* gcc.target/mips/nanf-2008.c: Likewise.
	* gcc.target/mips/nanf-legacy.c: Likewise.
	* gcc.target/mips/nans-2008.c: Likewise.
	* gcc.target/mips/nans-legacy.c: Likewise.
	* gcc.target/mips/nansf-2008.c: Likewise.
	* gcc.target/mips/nansf-legacy.c: Likewise.

  Maciej

gcc-mips-nan2008-test-escape-fix.diff
Index: gcc-fsf-trunk-quilt/gcc/testsuite/gcc.target/mips/fabs-2008.c
===================================================================
--- gcc-fsf-trunk-quilt.orig/gcc/testsuite/gcc.target/mips/fabs-2008.c	2013-07-26 19:20:34.000000000 +0100
+++ gcc-fsf-trunk-quilt/gcc/testsuite/gcc.target/mips/fabs-2008.c	2013-08-13 01:02:55.858786822 +0100
@@ -7,4 +7,4 @@ fabs_2008 (double d)
   return __builtin_fabs (d);
 }
 
-/* { dg-final { scan-assembler "\tabs\.d\t" } } */
+/* { dg-final { scan-assembler "\tabs\\.d\t" } } */
Index: gcc-fsf-trunk-quilt/gcc/testsuite/gcc.target/mips/fabs-legacy.c
===================================================================
--- gcc-fsf-trunk-quilt.orig/gcc/testsuite/gcc.target/mips/fabs-legacy.c	2013-07-26 19:20:34.000000000 +0100
+++ gcc-fsf-trunk-quilt/gcc/testsuite/gcc.target/mips/fabs-legacy.c	2013-08-13 01:03:08.368735336 +0100
@@ -7,4 +7,4 @@ fabs_legacy (double d)
   return __builtin_fabs (d);
 }
 
-/* { dg-final { scan-assembler-not "\tabs\.d\t" } } */
+/* { dg-final { scan-assembler-not "\tabs\\.d\t" } } */
Index: gcc-fsf-trunk-quilt/gcc/testsuite/gcc.target/mips/fabsf-2008.c
===================================================================
--- gcc-fsf-trunk-quilt.orig/gcc/testsuite/gcc.target/mips/fabsf-2008.c	2013-07-26 19:20:34.000000000 +0100
+++ gcc-fsf-trunk-quilt/gcc/testsuite/gcc.target/mips/fabsf-2008.c	2013-08-13 01:03:12.867997081 +0100
@@ -7,4 +7,4 @@ fabsf_2008 (float f)
   return __builtin_fabsf (f);
 }
 
-/* { dg-final { scan-assembler "\tabs\.s\t" } } */
+/* { dg-final { scan-assembler "\tabs\\.s\t" } } */
Index: gcc-fsf-trunk-quilt/gcc/testsuite/gcc.target/mips/fabsf-legacy.c
===================================================================
--- gcc-fsf-trunk-quilt.orig/gcc/testsuite/gcc.target/mips/fabsf-legacy.c	2013-07-26 19:20:34.000000000 +0100
+++ gcc-fsf-trunk-quilt/gcc/testsuite/gcc.target/mips/fabsf-legacy.c	2013-08-13 01:03:17.368766249 +0100
@@ -7,4 +7,4 @@ fabsf_legacy (float f)
   return __builtin_fabsf (f);
 }
 
-/* { dg-final { scan-assembler-not "\tabs\.s\t" } } */
+/* { dg-final { scan-assembler-not "\tabs\\.s\t" } } */
Index: gcc-fsf-trunk-quilt/gcc/testsuite/gcc.target/mips/fneg-2008.c
===================================================================
--- gcc-fsf-trunk-quilt.orig/gcc/testsuite/gcc.target/mips/fneg-2008.c	2013-07-26 19:20:34.000000000 +0100
+++ gcc-fsf-trunk-quilt/gcc/testsuite/gcc.target/mips/fneg-2008.c	2013-08-13 01:03:22.868115474 +0100
@@ -7,4 +7,4 @@ fneg_2008 (double d)
   return -d;
 }
 
-/* { dg-final { scan-assembler "\tneg\.d\t" } } */
+/* { dg-final { scan-assembler "\tneg\\.d\t" } } */
Index: gcc-fsf-trunk-quilt/gcc/testsuite/gcc.target/mips/fneg-legacy.c
===================================================================
--- gcc-fsf-trunk-quilt.orig/gcc/testsuite/gcc.target/mips/fneg-legacy.c	2013-07-26 19:20:34.000000000 +0100
+++ gcc-fsf-trunk-quilt/gcc/testsuite/gcc.target/mips/fneg-legacy.c	2013-08-13 01:03:30.868753578 +0100
@@ -7,4 +7,4 @@ fneg_legacy (double d)
   return -d;
 }
 
-/* { dg-final { scan-assembler-not "\tneg\.d\t" } } */
+/* { dg-final { scan-assembler-not "\tneg\\.d\t" } } */
Index: gcc-fsf-trunk-quilt/gcc/testsuite/gcc.target/mips/fnegf-2008.c
===================================================================
--- gcc-fsf-trunk-quilt.orig/gcc/testsuite/gcc.target/mips/fnegf-2008.c	2013-07-26 19:20:34.000000000 +0100
+++ gcc-fsf-trunk-quilt/gcc/testsuite/gcc.target/mips/fnegf-2008.c	2013-08-13 01:03:37.368749309 +0100
@@ -7,4 +7,4 @@ fnegf_2008 (float f)
   return -f;
 }
 
-/* { dg-final { scan-assembler "\tneg\.s\t" } } */
+/* { dg-final { scan-assembler "\tneg\\.s\t" } } */
Index: gcc-fsf-trunk-quilt/gcc/testsuite/gcc.target/mips/fnegf-legacy.c
===================================================================
--- gcc-fsf-trunk-quilt.orig/gcc/testsuite/gcc.target/mips/fnegf-legacy.c	2013-07-26 19:20:34.000000000 +0100
+++ gcc-fsf-trunk-quilt/gcc/testsuite/gcc.target/mips/fnegf-legacy.c	2013-08-13 01:03:41.877996434 +0100
@@ -7,4 +7,4 @@ fnegf_legacy (float f)
   return -f;
 }
 
-/* { dg-final { scan-assembler-not "\tneg\.s\t" } } */
+/* { dg-final { scan-assembler-not "\tneg\\.s\t" } } */
Index: gcc-fsf-trunk-quilt/gcc/testsuite/gcc.target/mips/nan-2008.c
===================================================================
--- gcc-fsf-trunk-quilt.orig/gcc/testsuite/gcc.target/mips/nan-2008.c	2013-08-13 01:00:40.000000000 +0100
+++ gcc-fsf-trunk-quilt/gcc/testsuite/gcc.target/mips/nan-2008.c	2013-08-13 01:04:17.878795666 +0100
@@ -3,5 +3,5 @@
 
 double d = __builtin_nan ("");
 
-/* { dg-final { scan-assembler "\t\.nan\t2008\n" } } */
-/* { dg-final { scan-assembler "\t\.word\t2146959360\n\t.word\t0\n" } } */
+/* { dg-final { scan-assembler "\t\\.nan\t2008\n" } } */
+/* { dg-final { scan-assembler "\t\\.word\t2146959360\n\t\\.word\t0\n" } } */
Index: gcc-fsf-trunk-quilt/gcc/testsuite/gcc.target/mips/nan-legacy.c
===================================================================
--- gcc-fsf-trunk-quilt.orig/gcc/testsuite/gcc.target/mips/nan-legacy.c	2013-08-13 01:00:40.000000000 +0100
+++ gcc-fsf-trunk-quilt/gcc/testsuite/gcc.target/mips/nan-legacy.c	2013-08-13 01:04:31.888761061 +0100
@@ -3,5 +3,5 @@
 
 double d = __builtin_nan ("");
 
-/* { dg-final { scan-assembler "\t\.nan\tlegacy\n" } } */
-/* { dg-final { scan-assembler "\t\.word\t2146959359\n\t.word\t-1\n" } } */
+/* { dg-final { scan-assembler "\t\\.nan\tlegacy\n" } } */
+/* { dg-final { scan-assembler "\t\\.word\t2146959359\n\t\\.word\t-1\n" } } */
Index: gcc-fsf-trunk-quilt/gcc/testsuite/gcc.target/mips/nanf-2008.c
===================================================================
--- gcc-fsf-trunk-quilt.orig/gcc/testsuite/gcc.target/mips/nanf-2008.c	2013-07-27 00:16:54.000000000 +0100
+++ gcc-fsf-trunk-quilt/gcc/testsuite/gcc.target/mips/nanf-2008.c	2013-08-13 01:04:39.388771825 +0100
@@ -3,5 +3,5 @@
 
 float f = __builtin_nanf ("");
 
-/* { dg-final { scan-assembler "\t\.nan\t2008\n" } } */
-/* { dg-final { scan-assembler "\t\.word\t2143289344\n" } } */
+/* { dg-final { scan-assembler "\t\\.nan\t2008\n" } } */
+/* { dg-final { scan-assembler "\t\\.word\t2143289344\n" } } */
Index: gcc-fsf-trunk-quilt/gcc/testsuite/gcc.target/mips/nanf-legacy.c
===================================================================
--- gcc-fsf-trunk-quilt.orig/gcc/testsuite/gcc.target/mips/nanf-legacy.c	2013-07-27 00:16:54.000000000 +0100
+++ gcc-fsf-trunk-quilt/gcc/testsuite/gcc.target/mips/nanf-legacy.c	2013-08-13 01:04:43.388608017 +0100
@@ -3,5 +3,5 @@
 
 float f = __builtin_nanf ("");
 
-/* { dg-final { scan-assembler "\t\.nan\tlegacy\n" } } */
-/* { dg-final { scan-assembler "\t\.word\t2143289343\n" } } */
+/* { dg-final { scan-assembler "\t\\.nan\tlegacy\n" } } */
+/* { dg-final { scan-assembler "\t\\.word\t2143289343\n" } } */
Index: gcc-fsf-trunk-quilt/gcc/testsuite/gcc.target/mips/nans-2008.c
===================================================================
--- gcc-fsf-trunk-quilt.orig/gcc/testsuite/gcc.target/mips/nans-2008.c	2013-08-13 01:00:40.000000000 +0100
+++ gcc-fsf-trunk-quilt/gcc/testsuite/gcc.target/mips/nans-2008.c	2013-08-13 01:04:55.888743658 +0100
@@ -3,5 +3,5 @@
 
 double ds = __builtin_nans ("");
 
-/* { dg-final { scan-assembler "\t\.nan\t2008\n" } } */
-/* { dg-final { scan-assembler "\t\.word\t2146697216\n\t.word\t0\n" } } */
+/* { dg-final { scan-assembler "\t\\.nan\t2008\n" } } */
+/* { dg-final { scan-assembler "\t\\.word\t2146697216\n\t\\.word\t0\n" } } */
Index: gcc-fsf-trunk-quilt/gcc/testsuite/gcc.target/mips/nans-legacy.c
===================================================================
--- gcc-fsf-trunk-quilt.orig/gcc/testsuite/gcc.target/mips/nans-legacy.c	2013-08-13 01:00:40.000000000 +0100
+++ gcc-fsf-trunk-quilt/gcc/testsuite/gcc.target/mips/nans-legacy.c	2013-08-13 01:05:09.398531566 +0100
@@ -3,5 +3,5 @@
 
 double ds = __builtin_nans ("");
 
-/* { dg-final { scan-assembler "\t\.nan\tlegacy\n" } } */
-/* { dg-final { scan-assembler "\t\.word\t2147483647\n\t.word\t-1\n" } } */
+/* { dg-final { scan-assembler "\t\\.nan\tlegacy\n" } } */
+/* { dg-final { scan-assembler "\t\\.word\t2147483647\n\t\\.word\t-1\n" } } */
Index: gcc-fsf-trunk-quilt/gcc/testsuite/gcc.target/mips/nansf-2008.c
===================================================================
--- gcc-fsf-trunk-quilt.orig/gcc/testsuite/gcc.target/mips/nansf-2008.c	2013-07-27 00:16:54.000000000 +0100
+++ gcc-fsf-trunk-quilt/gcc/testsuite/gcc.target/mips/nansf-2008.c	2013-08-13 01:05:14.898790472 +0100
@@ -3,5 +3,5 @@
 
 float fs = __builtin_nansf ("");
 
-/* { dg-final { scan-assembler "\t\.nan\t2008\n" } } */
-/* { dg-final { scan-assembler "\t\.word\t2141192192\n" } } */
+/* { dg-final { scan-assembler "\t\\.nan\t2008\n" } } */
+/* { dg-final { scan-assembler "\t\\.word\t2141192192\n" } } */
Index: gcc-fsf-trunk-quilt/gcc/testsuite/gcc.target/mips/nansf-legacy.c
===================================================================
--- gcc-fsf-trunk-quilt.orig/gcc/testsuite/gcc.target/mips/nansf-legacy.c	2013-07-27 00:16:54.000000000 +0100
+++ gcc-fsf-trunk-quilt/gcc/testsuite/gcc.target/mips/nansf-legacy.c	2013-08-13 01:05:21.398761088 +0100
@@ -3,5 +3,5 @@
 
 float fs = __builtin_nansf ("");
 
-/* { dg-final { scan-assembler "\t\.nan\tlegacy\n" } } */
-/* { dg-final { scan-assembler "\t\.word\t2147483647\n" } } */
+/* { dg-final { scan-assembler "\t\\.nan\tlegacy\n" } } */
+/* { dg-final { scan-assembler "\t\\.word\t2147483647\n" } } */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]