[PATCH] sim: tighten up generated whitespace
Mike Frysinger
vapier@gentoo.org
Tue Nov 1 14:07:45 GMT 2022
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")
)
; Memory support.
--
2.37.3
More information about the Cgen
mailing list