summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuleyman Farajli <suleyman@farajli.net>2025-01-06 23:11:10 +0400
committerSuleyman Farajli <suleyman@farajli.net>2025-01-06 23:11:10 +0400
commit83219921b7bf8563e041dab6f4030dd29e2b0076 (patch)
treef4bdf02ca1bf3b9e6f607c708d99464772592575
parent91c01bb684b41f6be91ab11a02171cb33a79aba3 (diff)
function renamed from `compile` to `generateX86_64`
-rw-r--r--src/main.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.go b/src/main.go
index c725403..e4bae4e 100644
--- a/src/main.go
+++ b/src/main.go
@@ -548,8 +548,8 @@ func mapX86_64linux(op Operation) string{
return buf
}
-func compile(ops[] Operation, w io.Writer) {
- comment_str := ";;"
+func generateX86_64(ops[] Operation, w io.Writer) {
+ assemblerComment := ";;"
var strings[][2] string
var variables[] string
printDumpFunc := false
@@ -566,7 +566,7 @@ func compile(ops[] Operation, w io.Writer) {
continue
}
- fmt.Fprintf(w, "\t%s %s\n", comment_str, ops[i].name)
+ fmt.Fprintf(w, "\t%s %s\n", assemblerComment, ops[i].name)
fmt.Fprintf(w, mapX86_64linux(ops[i]))
}
@@ -617,6 +617,6 @@ func main() {
ops := parse(tokens)
/* FIXME: check for error */
w := bufio.NewWriter(file)
- compile(ops, w)
+ generateX86_64(ops, w)
w.Flush()
}