Patchwork MIPS: IEEE 754-2008 feature testing escape fixes

login
register
mail settings
Submitter Maciej W. Rozycki
Date Aug. 13, 2013, 1:22 p.m.
Message ID <alpine.DEB.1.10.1308131414060.8514@tp.orcam.me.uk>
Download mbox | patch
Permalink /patch/266797/
State New
Headers show

Comments

Maciej W. Rozycki - Aug. 13, 2013, 1:22 p.m.
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
Richard Sandiford - Aug. 13, 2013, 5:21 p.m.
"Maciej W. Rozycki" <macro@codesourcery.com> writes:
> 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.

OK, thanks.

Richard
Maciej W. Rozycki - Aug. 13, 2013, 9:37 p.m.
On Tue, 13 Aug 2013, Richard Sandiford wrote:

> > 	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.
> 
> OK, thanks.

 Applied, thanks.

  Maciej

Patch

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" } } */