public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: cgen@sourceware.org
Subject: [PATCH] sim: tighten up generated whitespace
Date: Tue,  1 Nov 2022 19:52:45 +0545	[thread overview]
Message-ID: <20221101140745.11137-1-vapier@gentoo.org> (raw)

The current files generate extra newlines in places.  Tighten
it up to match the current code as it exits in the sim tree.
---
 sim-cpu.scm | 3 +--
 sim.scm     | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/sim-cpu.scm b/sim-cpu.scm
index 6c848da39273..275a9002c749 100644
--- a/sim-cpu.scm
+++ b/sim-cpu.scm
@@ -316,7 +316,7 @@ typedef struct trace_record {
 
 (define (/gen-cpu-record-results)
   (string-list
-   "\
+   "
 /* Record trace results for INSN.  */
 
 void
@@ -919,7 +919,6 @@ SEM_FN_NAME (@prefix@,init_idesc_table) (SIM_CPU *current_cpu)
 
 #include \"sim-main.h\"
 #include \"cgen-ops.h\"
-
 "
    /gen-cpu-reg-access-defns
    ; This code isn't ready yet.
diff --git a/sim.scm b/sim.scm
index 9678a84f8ca2..c7fe822767c3 100644
--- a/sim.scm
+++ b/sim.scm
@@ -682,7 +682,7 @@
 
 (define (gen-reg-access-defn hw prefix type scalar? get-code set-code)
   (string-append
-   "/* Get the value of " (obj:str-name hw) ".  */\n\n"
+   "\n/* Get the value of " (obj:str-name hw) ".  */\n\n"
    type "\n"
    (gen-reg-getter-fn hw prefix)
    " (SIM_CPU *current_cpu"
@@ -698,7 +698,7 @@
    type " newval)\n"
    "{\n"
    set-code
-   "}\n\n")
+   "}\n")
 )
 \f
 ; Memory support.
-- 
2.37.3


                 reply	other threads:[~2022-11-01 15:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221101140745.11137-1-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=cgen@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).