public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH/committed] sim: sh: trim trailing whitespace in generated code
@ 2023-12-05 13:06 Mike Frysinger
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2023-12-05 13:06 UTC (permalink / raw)
  To: gdb-patches

No functional change here, but makes it a little easier to read the
generated code when editors aren't highlighting all the spurious
trailing whitespace on lines.
---
 sim/sh/gencode.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/sim/sh/gencode.c b/sim/sh/gencode.c
index 5eb7caf25893..fa4f9886cf6d 100644
--- a/sim/sh/gencode.c
+++ b/sim/sh/gencode.c
@@ -2837,7 +2837,7 @@ gensim_caselist (op *p)
       const char *s = p->code;
 
       printf ("  /* %s %s */\n", p->name, p->code);
-      printf ("  case %d:      \n", p->index);
+      printf ("  case %d:\n", p->index);
 
       printf ("    {\n");
       while (*s)
@@ -2881,8 +2881,8 @@ gensim_caselist (op *p)
 	    case 'x':
 	      if (s[1] == 'y')	/* xy */
 		{
-		  printf ("      int n = (iword & 3) ? \n");
-		  printf ("              ((iword >> 9) & 1) + 4 : \n");
+		  printf ("      int n = (iword & 3) ?\n");
+		  printf ("              ((iword >> 9) & 1) + 4 :\n");
 		  printf ("              REG_xy ((iword >> 8) & 3);\n");
 		}
 	      else
@@ -2893,8 +2893,8 @@ gensim_caselist (op *p)
 	    case 'y':
 	      if (s[1] == 'x')	/* yx */
 		{
-		  printf ("      int n = (iword & 0xc) ? \n");
-		  printf ("              ((iword >> 8) & 1) + 6 : \n");
+		  printf ("      int n = (iword & 0xc) ?\n");
+		  printf ("              ((iword >> 8) & 1) + 6 :\n");
 		  printf ("              REG_yx ((iword >> 8) & 3);\n");
 		}
 	      else
@@ -2913,8 +2913,8 @@ gensim_caselist (op *p)
 	    case 'X':
 	      if (s[1] == 'Y')	/* XY */
 		{
-		  printf ("      int m = (iword & 3) ? \n");
-		  printf ("              ((iword >> 7) & 1) + 8 : \n");
+		  printf ("      int m = (iword & 3) ?\n");
+		  printf ("              ((iword >> 7) & 1) + 8 :\n");
 		  printf ("              DSP_xy ((iword >> 6) & 3);\n");
 		}
 	      else
@@ -2924,8 +2924,8 @@ gensim_caselist (op *p)
 	    case 'a':
 	      if (s[1] == 'x')	/* ax */
 		{
-		  printf ("      int m = (iword & 3) ? \n");
-		  printf ("              7 - ((iword >> 6) & 2) : \n");
+		  printf ("      int m = (iword & 3) ?\n");
+		  printf ("              7 - ((iword >> 6) & 2) :\n");
 		  printf ("              DSP_ax ((iword >> 6) & 3);\n");
 		}
 	      else
@@ -2935,8 +2935,8 @@ gensim_caselist (op *p)
 	    case 'Y':
 	      if (s[1] == 'X')	/* YX */
 		{
-		  printf ("      int m = (iword & 0xc) ? \n");
-		  printf ("              ((iword >> 6) & 1) + 10 : \n");
+		  printf ("      int m = (iword & 0xc) ?\n");
+		  printf ("              ((iword >> 6) & 1) + 10 :\n");
 		  printf ("              DSP_yx ((iword >> 6) & 3);\n");
 		}
 	      else
@@ -2946,8 +2946,8 @@ gensim_caselist (op *p)
 	    case 'A':
 	      if (s[1] == 'Y')	/* AY */
 		{
-		  printf ("      int m = (iword & 0xc) ? \n");
-		  printf ("              7 - ((iword >> 5) & 2) : \n");
+		  printf ("      int m = (iword & 0xc) ?\n");
+		  printf ("              7 - ((iword >> 5) & 2) :\n");
 		  printf ("              DSP_ay ((iword >> 6) & 3);\n");
 		}
 	      else
@@ -3270,7 +3270,7 @@ ppi_gensim (void)
       const char *s = p->code;
 
       printf ("  /* %s %s */\n", p->name, p->code);
-      printf ("  case %d:      \n", p->index);
+      printf ("  case %d:\n", p->index);
 
       printf ("    {\n");
       for (shift = 16; *s; )
@@ -3297,7 +3297,7 @@ ppi_gensim (void)
 	      printf ("      if ((((iword >> 8) ^ DSR) & 1) == 0)\n");
 	      printf ("\treturn;\n");
 	      printf ("    }\n");
-	      printf ("  case %d:      \n", p->index + 1);
+	      printf ("  case %d:\n", p->index + 1);
 	      printf ("    {\n");
 	      cond = 1;
 	    case '0':
-- 
2.43.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-12-05 13:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-05 13:06 [PATCH/committed] sim: sh: trim trailing whitespace in generated code Mike Frysinger

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).