public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/wschmidt/heads/builtins3)] rs6000: Some builtin debug modifications
@ 2020-08-28 20:09 William Schmidt
  0 siblings, 0 replies; 8+ messages in thread
From: William Schmidt @ 2020-08-28 20:09 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:72fd4199baf498dd9da7e6428ee46a313b75dfb6

commit 72fd4199baf498dd9da7e6428ee46a313b75dfb6
Author: Bill Schmidt <wschmidt@linux.ibm.com>
Date:   Fri Jul 31 12:40:10 2020 -0500

    rs6000: Some builtin debug modifications
    
    2020-07-31  Bill Schmidt  <wschmidt@linux.ibm.com>
    
            * rs6000-gen-builtins.c (write_init_bif_table): Change form of
            attr_string; add code to dump builtins to stderr under macro
            control.

Diff:
---
 gcc/config/rs6000/rs6000-gen-builtins.c | 28 +++++++++++++++++++++++++---
 1 file changed, 25 insertions(+), 3 deletions(-)

diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6000/rs6000-gen-builtins.c
index d2c029c0fb5..1d83215b32a 100644
--- a/gcc/config/rs6000/rs6000-gen-builtins.c
+++ b/gcc/config/rs6000/rs6000-gen-builtins.c
@@ -2336,13 +2336,13 @@ write_init_bif_table ()
 	{
 	  fprintf (init_file, "      TREE_READONLY (t) = 1;\n");
 	  fprintf (init_file, "      TREE_NOTHROW (t) = 1;\n");
-	  attr_string = ", const";
+	  attr_string = "= const";
 	}
       else if (bifs[i].kind == FNK_PURE)
 	{
 	  fprintf (init_file, "      DECL_PURE_P (t) = 1;\n");
 	  fprintf (init_file, "      TREE_NOTHROW (t) = 1;\n");
-	  attr_string = ", pure";
+	  attr_string = "= pure";
 	}
       else if (bifs[i].kind == FNK_FPMATH)
 	{
@@ -2352,11 +2352,33 @@ write_init_bif_table ()
 	  fprintf (init_file, "          DECL_PURE_P (t) = 1;\n");
 	  fprintf (init_file, "          DECL_IS_NOVOPS (t) = 1;\n");
 	  fprintf (init_file, "        }\n");
-	  attr_string = ", fp, const";
+	  attr_string = "= fp, const";
 	}
       else
 	attr_string = "";
 
+#ifdef BILLDEBUG
+      char *buf = (char *) malloc (strlen (bifs[i].fndecl) + 1);
+      strcpy (buf, bifs[i].fndecl);
+      char *tok = strtok (buf, "_");
+      const char *str = map_token_to_type_node (tok);
+      fprintf (stderr, "%s %s (", str, bifs[i].proto.bifname);
+      tok = strtok (0, "_");
+      assert (tok);
+      assert (!strcmp (tok, "ftype"));
+      tok = strtok (0, "_");
+      while (tok && strcmp (tok, "v"))
+	{
+	  str = map_token_to_type_node (tok);
+	  fprintf (stderr, "%s", str);
+	  tok = strtok (0, "_");
+	  if (tok)
+	    fprintf (stderr, ", ");
+	}
+      fprintf (stderr, "); %s [%4d] %s\n", attr_string, i,
+	       enable_string[bifs[i].stanza]);
+#endif
+
       fprintf (init_file, "      if (TARGET_DEBUG_BUILTIN)\n");
       fprintf (init_file, "        fprintf (stderr, \"rs6000_builtin"
 	       ", code = %4d, \"\n                  \"%s%s\\n\");\n",


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [gcc(refs/users/wschmidt/heads/builtins3)] rs6000: Some builtin debug modifications
@ 2020-10-29 19:52 William Schmidt
  0 siblings, 0 replies; 8+ messages in thread
From: William Schmidt @ 2020-10-29 19:52 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:3e5daa1761db939590abf39266cba15ccc3f2abb

commit 3e5daa1761db939590abf39266cba15ccc3f2abb
Author: Bill Schmidt <wschmidt@linux.ibm.com>
Date:   Fri Jul 31 12:40:10 2020 -0500

    rs6000: Some builtin debug modifications
    
    2020-07-31  Bill Schmidt  <wschmidt@linux.ibm.com>
    
            * rs6000-gen-builtins.c (write_init_bif_table): Change form of
            attr_string; add code to dump builtins to stderr under macro
            control.

Diff:
---
 gcc/config/rs6000/rs6000-gen-builtins.c | 28 +++++++++++++++++++++++++---
 1 file changed, 25 insertions(+), 3 deletions(-)

diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6000/rs6000-gen-builtins.c
index d2c029c0fb5..1d83215b32a 100644
--- a/gcc/config/rs6000/rs6000-gen-builtins.c
+++ b/gcc/config/rs6000/rs6000-gen-builtins.c
@@ -2336,13 +2336,13 @@ write_init_bif_table ()
 	{
 	  fprintf (init_file, "      TREE_READONLY (t) = 1;\n");
 	  fprintf (init_file, "      TREE_NOTHROW (t) = 1;\n");
-	  attr_string = ", const";
+	  attr_string = "= const";
 	}
       else if (bifs[i].kind == FNK_PURE)
 	{
 	  fprintf (init_file, "      DECL_PURE_P (t) = 1;\n");
 	  fprintf (init_file, "      TREE_NOTHROW (t) = 1;\n");
-	  attr_string = ", pure";
+	  attr_string = "= pure";
 	}
       else if (bifs[i].kind == FNK_FPMATH)
 	{
@@ -2352,11 +2352,33 @@ write_init_bif_table ()
 	  fprintf (init_file, "          DECL_PURE_P (t) = 1;\n");
 	  fprintf (init_file, "          DECL_IS_NOVOPS (t) = 1;\n");
 	  fprintf (init_file, "        }\n");
-	  attr_string = ", fp, const";
+	  attr_string = "= fp, const";
 	}
       else
 	attr_string = "";
 
+#ifdef BILLDEBUG
+      char *buf = (char *) malloc (strlen (bifs[i].fndecl) + 1);
+      strcpy (buf, bifs[i].fndecl);
+      char *tok = strtok (buf, "_");
+      const char *str = map_token_to_type_node (tok);
+      fprintf (stderr, "%s %s (", str, bifs[i].proto.bifname);
+      tok = strtok (0, "_");
+      assert (tok);
+      assert (!strcmp (tok, "ftype"));
+      tok = strtok (0, "_");
+      while (tok && strcmp (tok, "v"))
+	{
+	  str = map_token_to_type_node (tok);
+	  fprintf (stderr, "%s", str);
+	  tok = strtok (0, "_");
+	  if (tok)
+	    fprintf (stderr, ", ");
+	}
+      fprintf (stderr, "); %s [%4d] %s\n", attr_string, i,
+	       enable_string[bifs[i].stanza]);
+#endif
+
       fprintf (init_file, "      if (TARGET_DEBUG_BUILTIN)\n");
       fprintf (init_file, "        fprintf (stderr, \"rs6000_builtin"
 	       ", code = %4d, \"\n                  \"%s%s\\n\");\n",


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [gcc(refs/users/wschmidt/heads/builtins3)] rs6000: Some builtin debug modifications
@ 2020-10-27 16:29 William Schmidt
  0 siblings, 0 replies; 8+ messages in thread
From: William Schmidt @ 2020-10-27 16:29 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:f99b550d5f7fed1e17dd38c3faea32cca2117ab2

commit f99b550d5f7fed1e17dd38c3faea32cca2117ab2
Author: Bill Schmidt <wschmidt@linux.ibm.com>
Date:   Fri Jul 31 12:40:10 2020 -0500

    rs6000: Some builtin debug modifications
    
    2020-07-31  Bill Schmidt  <wschmidt@linux.ibm.com>
    
            * rs6000-gen-builtins.c (write_init_bif_table): Change form of
            attr_string; add code to dump builtins to stderr under macro
            control.

Diff:
---
 gcc/config/rs6000/rs6000-gen-builtins.c | 28 +++++++++++++++++++++++++---
 1 file changed, 25 insertions(+), 3 deletions(-)

diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6000/rs6000-gen-builtins.c
index d2c029c0fb5..1d83215b32a 100644
--- a/gcc/config/rs6000/rs6000-gen-builtins.c
+++ b/gcc/config/rs6000/rs6000-gen-builtins.c
@@ -2336,13 +2336,13 @@ write_init_bif_table ()
 	{
 	  fprintf (init_file, "      TREE_READONLY (t) = 1;\n");
 	  fprintf (init_file, "      TREE_NOTHROW (t) = 1;\n");
-	  attr_string = ", const";
+	  attr_string = "= const";
 	}
       else if (bifs[i].kind == FNK_PURE)
 	{
 	  fprintf (init_file, "      DECL_PURE_P (t) = 1;\n");
 	  fprintf (init_file, "      TREE_NOTHROW (t) = 1;\n");
-	  attr_string = ", pure";
+	  attr_string = "= pure";
 	}
       else if (bifs[i].kind == FNK_FPMATH)
 	{
@@ -2352,11 +2352,33 @@ write_init_bif_table ()
 	  fprintf (init_file, "          DECL_PURE_P (t) = 1;\n");
 	  fprintf (init_file, "          DECL_IS_NOVOPS (t) = 1;\n");
 	  fprintf (init_file, "        }\n");
-	  attr_string = ", fp, const";
+	  attr_string = "= fp, const";
 	}
       else
 	attr_string = "";
 
+#ifdef BILLDEBUG
+      char *buf = (char *) malloc (strlen (bifs[i].fndecl) + 1);
+      strcpy (buf, bifs[i].fndecl);
+      char *tok = strtok (buf, "_");
+      const char *str = map_token_to_type_node (tok);
+      fprintf (stderr, "%s %s (", str, bifs[i].proto.bifname);
+      tok = strtok (0, "_");
+      assert (tok);
+      assert (!strcmp (tok, "ftype"));
+      tok = strtok (0, "_");
+      while (tok && strcmp (tok, "v"))
+	{
+	  str = map_token_to_type_node (tok);
+	  fprintf (stderr, "%s", str);
+	  tok = strtok (0, "_");
+	  if (tok)
+	    fprintf (stderr, ", ");
+	}
+      fprintf (stderr, "); %s [%4d] %s\n", attr_string, i,
+	       enable_string[bifs[i].stanza]);
+#endif
+
       fprintf (init_file, "      if (TARGET_DEBUG_BUILTIN)\n");
       fprintf (init_file, "        fprintf (stderr, \"rs6000_builtin"
 	       ", code = %4d, \"\n                  \"%s%s\\n\");\n",


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [gcc(refs/users/wschmidt/heads/builtins3)] rs6000: Some builtin debug modifications
@ 2020-09-16 21:31 William Schmidt
  0 siblings, 0 replies; 8+ messages in thread
From: William Schmidt @ 2020-09-16 21:31 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:10f5864e9c9962683a072edec07a8d6c0545117c

commit 10f5864e9c9962683a072edec07a8d6c0545117c
Author: Bill Schmidt <wschmidt@linux.ibm.com>
Date:   Fri Jul 31 12:40:10 2020 -0500

    rs6000: Some builtin debug modifications
    
    2020-07-31  Bill Schmidt  <wschmidt@linux.ibm.com>
    
            * rs6000-gen-builtins.c (write_init_bif_table): Change form of
            attr_string; add code to dump builtins to stderr under macro
            control.

Diff:
---
 gcc/config/rs6000/rs6000-gen-builtins.c | 28 +++++++++++++++++++++++++---
 1 file changed, 25 insertions(+), 3 deletions(-)

diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6000/rs6000-gen-builtins.c
index d2c029c0fb5..1d83215b32a 100644
--- a/gcc/config/rs6000/rs6000-gen-builtins.c
+++ b/gcc/config/rs6000/rs6000-gen-builtins.c
@@ -2336,13 +2336,13 @@ write_init_bif_table ()
 	{
 	  fprintf (init_file, "      TREE_READONLY (t) = 1;\n");
 	  fprintf (init_file, "      TREE_NOTHROW (t) = 1;\n");
-	  attr_string = ", const";
+	  attr_string = "= const";
 	}
       else if (bifs[i].kind == FNK_PURE)
 	{
 	  fprintf (init_file, "      DECL_PURE_P (t) = 1;\n");
 	  fprintf (init_file, "      TREE_NOTHROW (t) = 1;\n");
-	  attr_string = ", pure";
+	  attr_string = "= pure";
 	}
       else if (bifs[i].kind == FNK_FPMATH)
 	{
@@ -2352,11 +2352,33 @@ write_init_bif_table ()
 	  fprintf (init_file, "          DECL_PURE_P (t) = 1;\n");
 	  fprintf (init_file, "          DECL_IS_NOVOPS (t) = 1;\n");
 	  fprintf (init_file, "        }\n");
-	  attr_string = ", fp, const";
+	  attr_string = "= fp, const";
 	}
       else
 	attr_string = "";
 
+#ifdef BILLDEBUG
+      char *buf = (char *) malloc (strlen (bifs[i].fndecl) + 1);
+      strcpy (buf, bifs[i].fndecl);
+      char *tok = strtok (buf, "_");
+      const char *str = map_token_to_type_node (tok);
+      fprintf (stderr, "%s %s (", str, bifs[i].proto.bifname);
+      tok = strtok (0, "_");
+      assert (tok);
+      assert (!strcmp (tok, "ftype"));
+      tok = strtok (0, "_");
+      while (tok && strcmp (tok, "v"))
+	{
+	  str = map_token_to_type_node (tok);
+	  fprintf (stderr, "%s", str);
+	  tok = strtok (0, "_");
+	  if (tok)
+	    fprintf (stderr, ", ");
+	}
+      fprintf (stderr, "); %s [%4d] %s\n", attr_string, i,
+	       enable_string[bifs[i].stanza]);
+#endif
+
       fprintf (init_file, "      if (TARGET_DEBUG_BUILTIN)\n");
       fprintf (init_file, "        fprintf (stderr, \"rs6000_builtin"
 	       ", code = %4d, \"\n                  \"%s%s\\n\");\n",


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [gcc(refs/users/wschmidt/heads/builtins3)] rs6000: Some builtin debug modifications
@ 2020-09-14 13:59 William Schmidt
  0 siblings, 0 replies; 8+ messages in thread
From: William Schmidt @ 2020-09-14 13:59 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:c478907705c4e6ab5627f16b4850d26ee67bf21a

commit c478907705c4e6ab5627f16b4850d26ee67bf21a
Author: Bill Schmidt <wschmidt@linux.ibm.com>
Date:   Fri Jul 31 12:40:10 2020 -0500

    rs6000: Some builtin debug modifications
    
    2020-07-31  Bill Schmidt  <wschmidt@linux.ibm.com>
    
            * rs6000-gen-builtins.c (write_init_bif_table): Change form of
            attr_string; add code to dump builtins to stderr under macro
            control.

Diff:
---
 gcc/config/rs6000/rs6000-gen-builtins.c | 28 +++++++++++++++++++++++++---
 1 file changed, 25 insertions(+), 3 deletions(-)

diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6000/rs6000-gen-builtins.c
index d2c029c0fb5..1d83215b32a 100644
--- a/gcc/config/rs6000/rs6000-gen-builtins.c
+++ b/gcc/config/rs6000/rs6000-gen-builtins.c
@@ -2336,13 +2336,13 @@ write_init_bif_table ()
 	{
 	  fprintf (init_file, "      TREE_READONLY (t) = 1;\n");
 	  fprintf (init_file, "      TREE_NOTHROW (t) = 1;\n");
-	  attr_string = ", const";
+	  attr_string = "= const";
 	}
       else if (bifs[i].kind == FNK_PURE)
 	{
 	  fprintf (init_file, "      DECL_PURE_P (t) = 1;\n");
 	  fprintf (init_file, "      TREE_NOTHROW (t) = 1;\n");
-	  attr_string = ", pure";
+	  attr_string = "= pure";
 	}
       else if (bifs[i].kind == FNK_FPMATH)
 	{
@@ -2352,11 +2352,33 @@ write_init_bif_table ()
 	  fprintf (init_file, "          DECL_PURE_P (t) = 1;\n");
 	  fprintf (init_file, "          DECL_IS_NOVOPS (t) = 1;\n");
 	  fprintf (init_file, "        }\n");
-	  attr_string = ", fp, const";
+	  attr_string = "= fp, const";
 	}
       else
 	attr_string = "";
 
+#ifdef BILLDEBUG
+      char *buf = (char *) malloc (strlen (bifs[i].fndecl) + 1);
+      strcpy (buf, bifs[i].fndecl);
+      char *tok = strtok (buf, "_");
+      const char *str = map_token_to_type_node (tok);
+      fprintf (stderr, "%s %s (", str, bifs[i].proto.bifname);
+      tok = strtok (0, "_");
+      assert (tok);
+      assert (!strcmp (tok, "ftype"));
+      tok = strtok (0, "_");
+      while (tok && strcmp (tok, "v"))
+	{
+	  str = map_token_to_type_node (tok);
+	  fprintf (stderr, "%s", str);
+	  tok = strtok (0, "_");
+	  if (tok)
+	    fprintf (stderr, ", ");
+	}
+      fprintf (stderr, "); %s [%4d] %s\n", attr_string, i,
+	       enable_string[bifs[i].stanza]);
+#endif
+
       fprintf (init_file, "      if (TARGET_DEBUG_BUILTIN)\n");
       fprintf (init_file, "        fprintf (stderr, \"rs6000_builtin"
 	       ", code = %4d, \"\n                  \"%s%s\\n\");\n",


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [gcc(refs/users/wschmidt/heads/builtins3)] rs6000: Some builtin debug modifications
@ 2020-08-20 16:40 William Schmidt
  0 siblings, 0 replies; 8+ messages in thread
From: William Schmidt @ 2020-08-20 16:40 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:f77feffd83d0fdc952ddb706b1a0f44d98018e5d

commit f77feffd83d0fdc952ddb706b1a0f44d98018e5d
Author: Bill Schmidt <wschmidt@linux.ibm.com>
Date:   Fri Jul 31 12:40:10 2020 -0500

    rs6000: Some builtin debug modifications
    
    2020-07-31  Bill Schmidt  <wschmidt@linux.ibm.com>
    
            * rs6000-gen-builtins.c (write_init_bif_table): Change form of
            attr_string; add code to dump builtins to stderr under macro
            control.

Diff:
---
 gcc/config/rs6000/rs6000-gen-builtins.c | 28 +++++++++++++++++++++++++---
 1 file changed, 25 insertions(+), 3 deletions(-)

diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6000/rs6000-gen-builtins.c
index d2c029c0fb5..1d83215b32a 100644
--- a/gcc/config/rs6000/rs6000-gen-builtins.c
+++ b/gcc/config/rs6000/rs6000-gen-builtins.c
@@ -2336,13 +2336,13 @@ write_init_bif_table ()
 	{
 	  fprintf (init_file, "      TREE_READONLY (t) = 1;\n");
 	  fprintf (init_file, "      TREE_NOTHROW (t) = 1;\n");
-	  attr_string = ", const";
+	  attr_string = "= const";
 	}
       else if (bifs[i].kind == FNK_PURE)
 	{
 	  fprintf (init_file, "      DECL_PURE_P (t) = 1;\n");
 	  fprintf (init_file, "      TREE_NOTHROW (t) = 1;\n");
-	  attr_string = ", pure";
+	  attr_string = "= pure";
 	}
       else if (bifs[i].kind == FNK_FPMATH)
 	{
@@ -2352,11 +2352,33 @@ write_init_bif_table ()
 	  fprintf (init_file, "          DECL_PURE_P (t) = 1;\n");
 	  fprintf (init_file, "          DECL_IS_NOVOPS (t) = 1;\n");
 	  fprintf (init_file, "        }\n");
-	  attr_string = ", fp, const";
+	  attr_string = "= fp, const";
 	}
       else
 	attr_string = "";
 
+#ifdef BILLDEBUG
+      char *buf = (char *) malloc (strlen (bifs[i].fndecl) + 1);
+      strcpy (buf, bifs[i].fndecl);
+      char *tok = strtok (buf, "_");
+      const char *str = map_token_to_type_node (tok);
+      fprintf (stderr, "%s %s (", str, bifs[i].proto.bifname);
+      tok = strtok (0, "_");
+      assert (tok);
+      assert (!strcmp (tok, "ftype"));
+      tok = strtok (0, "_");
+      while (tok && strcmp (tok, "v"))
+	{
+	  str = map_token_to_type_node (tok);
+	  fprintf (stderr, "%s", str);
+	  tok = strtok (0, "_");
+	  if (tok)
+	    fprintf (stderr, ", ");
+	}
+      fprintf (stderr, "); %s [%4d] %s\n", attr_string, i,
+	       enable_string[bifs[i].stanza]);
+#endif
+
       fprintf (init_file, "      if (TARGET_DEBUG_BUILTIN)\n");
       fprintf (init_file, "        fprintf (stderr, \"rs6000_builtin"
 	       ", code = %4d, \"\n                  \"%s%s\\n\");\n",


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [gcc(refs/users/wschmidt/heads/builtins3)] rs6000: Some builtin debug modifications
@ 2020-08-18 18:46 William Schmidt
  0 siblings, 0 replies; 8+ messages in thread
From: William Schmidt @ 2020-08-18 18:46 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:b8e8f16b283bf3d3cee00209a7b59d334ee098dd

commit b8e8f16b283bf3d3cee00209a7b59d334ee098dd
Author: Bill Schmidt <wschmidt@linux.ibm.com>
Date:   Fri Jul 31 12:40:10 2020 -0500

    rs6000: Some builtin debug modifications
    
    2020-07-31  Bill Schmidt  <wschmidt@linux.ibm.com>
    
            * rs6000-gen-builtins.c (write_init_bif_table): Change form of
            attr_string; add code to dump builtins to stderr under macro
            control.

Diff:
---
 gcc/config/rs6000/rs6000-gen-builtins.c | 28 +++++++++++++++++++++++++---
 1 file changed, 25 insertions(+), 3 deletions(-)

diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6000/rs6000-gen-builtins.c
index d2c029c0fb5..1d83215b32a 100644
--- a/gcc/config/rs6000/rs6000-gen-builtins.c
+++ b/gcc/config/rs6000/rs6000-gen-builtins.c
@@ -2336,13 +2336,13 @@ write_init_bif_table ()
 	{
 	  fprintf (init_file, "      TREE_READONLY (t) = 1;\n");
 	  fprintf (init_file, "      TREE_NOTHROW (t) = 1;\n");
-	  attr_string = ", const";
+	  attr_string = "= const";
 	}
       else if (bifs[i].kind == FNK_PURE)
 	{
 	  fprintf (init_file, "      DECL_PURE_P (t) = 1;\n");
 	  fprintf (init_file, "      TREE_NOTHROW (t) = 1;\n");
-	  attr_string = ", pure";
+	  attr_string = "= pure";
 	}
       else if (bifs[i].kind == FNK_FPMATH)
 	{
@@ -2352,11 +2352,33 @@ write_init_bif_table ()
 	  fprintf (init_file, "          DECL_PURE_P (t) = 1;\n");
 	  fprintf (init_file, "          DECL_IS_NOVOPS (t) = 1;\n");
 	  fprintf (init_file, "        }\n");
-	  attr_string = ", fp, const";
+	  attr_string = "= fp, const";
 	}
       else
 	attr_string = "";
 
+#ifdef BILLDEBUG
+      char *buf = (char *) malloc (strlen (bifs[i].fndecl) + 1);
+      strcpy (buf, bifs[i].fndecl);
+      char *tok = strtok (buf, "_");
+      const char *str = map_token_to_type_node (tok);
+      fprintf (stderr, "%s %s (", str, bifs[i].proto.bifname);
+      tok = strtok (0, "_");
+      assert (tok);
+      assert (!strcmp (tok, "ftype"));
+      tok = strtok (0, "_");
+      while (tok && strcmp (tok, "v"))
+	{
+	  str = map_token_to_type_node (tok);
+	  fprintf (stderr, "%s", str);
+	  tok = strtok (0, "_");
+	  if (tok)
+	    fprintf (stderr, ", ");
+	}
+      fprintf (stderr, "); %s [%4d] %s\n", attr_string, i,
+	       enable_string[bifs[i].stanza]);
+#endif
+
       fprintf (init_file, "      if (TARGET_DEBUG_BUILTIN)\n");
       fprintf (init_file, "        fprintf (stderr, \"rs6000_builtin"
 	       ", code = %4d, \"\n                  \"%s%s\\n\");\n",


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [gcc(refs/users/wschmidt/heads/builtins3)] rs6000: Some builtin debug modifications
@ 2020-07-31 18:10 William Schmidt
  0 siblings, 0 replies; 8+ messages in thread
From: William Schmidt @ 2020-07-31 18:10 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:d2c9df361df3286fcaa2432d312b7adf5e41182e

commit d2c9df361df3286fcaa2432d312b7adf5e41182e
Author: Bill Schmidt <wschmidt@linux.ibm.com>
Date:   Fri Jul 31 12:40:10 2020 -0500

    rs6000: Some builtin debug modifications
    
    2020-07-31  Bill Schmidt  <wschmidt@linux.ibm.com>
    
            * rs6000-gen-builtins.c (write_init_bif_table): Change form of
            attr_string; add code to dump builtins to stderr under macro
            control.

Diff:
---
 gcc/config/rs6000/rs6000-gen-builtins.c | 28 +++++++++++++++++++++++++---
 1 file changed, 25 insertions(+), 3 deletions(-)

diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6000/rs6000-gen-builtins.c
index d2c029c0fb5..1d83215b32a 100644
--- a/gcc/config/rs6000/rs6000-gen-builtins.c
+++ b/gcc/config/rs6000/rs6000-gen-builtins.c
@@ -2336,13 +2336,13 @@ write_init_bif_table ()
 	{
 	  fprintf (init_file, "      TREE_READONLY (t) = 1;\n");
 	  fprintf (init_file, "      TREE_NOTHROW (t) = 1;\n");
-	  attr_string = ", const";
+	  attr_string = "= const";
 	}
       else if (bifs[i].kind == FNK_PURE)
 	{
 	  fprintf (init_file, "      DECL_PURE_P (t) = 1;\n");
 	  fprintf (init_file, "      TREE_NOTHROW (t) = 1;\n");
-	  attr_string = ", pure";
+	  attr_string = "= pure";
 	}
       else if (bifs[i].kind == FNK_FPMATH)
 	{
@@ -2352,11 +2352,33 @@ write_init_bif_table ()
 	  fprintf (init_file, "          DECL_PURE_P (t) = 1;\n");
 	  fprintf (init_file, "          DECL_IS_NOVOPS (t) = 1;\n");
 	  fprintf (init_file, "        }\n");
-	  attr_string = ", fp, const";
+	  attr_string = "= fp, const";
 	}
       else
 	attr_string = "";
 
+#ifdef BILLDEBUG
+      char *buf = (char *) malloc (strlen (bifs[i].fndecl) + 1);
+      strcpy (buf, bifs[i].fndecl);
+      char *tok = strtok (buf, "_");
+      const char *str = map_token_to_type_node (tok);
+      fprintf (stderr, "%s %s (", str, bifs[i].proto.bifname);
+      tok = strtok (0, "_");
+      assert (tok);
+      assert (!strcmp (tok, "ftype"));
+      tok = strtok (0, "_");
+      while (tok && strcmp (tok, "v"))
+	{
+	  str = map_token_to_type_node (tok);
+	  fprintf (stderr, "%s", str);
+	  tok = strtok (0, "_");
+	  if (tok)
+	    fprintf (stderr, ", ");
+	}
+      fprintf (stderr, "); %s [%4d] %s\n", attr_string, i,
+	       enable_string[bifs[i].stanza]);
+#endif
+
       fprintf (init_file, "      if (TARGET_DEBUG_BUILTIN)\n");
       fprintf (init_file, "        fprintf (stderr, \"rs6000_builtin"
 	       ", code = %4d, \"\n                  \"%s%s\\n\");\n",


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-10-29 19:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-28 20:09 [gcc(refs/users/wschmidt/heads/builtins3)] rs6000: Some builtin debug modifications William Schmidt
  -- strict thread matches above, loose matches on Subject: below --
2020-10-29 19:52 William Schmidt
2020-10-27 16:29 William Schmidt
2020-09-16 21:31 William Schmidt
2020-09-14 13:59 William Schmidt
2020-08-20 16:40 William Schmidt
2020-08-18 18:46 William Schmidt
2020-07-31 18:10 William Schmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).