* [PATCH] sim: tighten up generated whitespace
@ 2022-11-01 14:07 Mike Frysinger
0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2022-11-01 14:07 UTC (permalink / raw)
To: cgen
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-11-01 15:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-01 14:07 [PATCH] sim: tighten up generated whitespace 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).