summaryrefslogtreecommitdiffhomepage
path: root/asm
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-11-08 16:38:30 +0100
committerRoland Reichwein <mail@reichwein.it>2020-11-08 16:38:30 +0100
commitdb0654fa48ddc07e6bcaaaeddfa301a32806dadc (patch)
treeea611c24a41ea8d9dc1e2116b64b9760f26708e0 /asm
parentdd2a994fbbe946fa751b689e92c85696469e5e5c (diff)
Prepare encoding and linking
Diffstat (limited to 'asm')
-rw-r--r--asm/assembler.h4
-rw-r--r--asm/encode.cpp6
-rw-r--r--asm/encode.h14
3 files changed, 23 insertions, 1 deletions
diff --git a/asm/assembler.h b/asm/assembler.h
index f301d60..832a78e 100644
--- a/asm/assembler.h
+++ b/asm/assembler.h
@@ -1,3 +1,5 @@
+// Helper Functions for assembling
+
#pragma once
#include "chunk.h"
@@ -86,7 +88,7 @@ public:
std::string m_name;
};
-};
+}; // class Args
} // namespace Asm
diff --git a/asm/encode.cpp b/asm/encode.cpp
new file mode 100644
index 0000000..ea50cb7
--- /dev/null
+++ b/asm/encode.cpp
@@ -0,0 +1,6 @@
+#include "encode.h"
+
+void Asm::toMachineCode(const FlowGraph::Graph& graph, Segment& segment)
+{
+}
+
diff --git a/asm/encode.h b/asm/encode.h
new file mode 100644
index 0000000..d9e5674
--- /dev/null
+++ b/asm/encode.h
@@ -0,0 +1,14 @@
+// Convert: Abstract FlowGraph to Machine dependent Code
+
+#pragma once
+
+#include "flowgraph/graph.h"
+#include "segment.h"
+
+namespace Asm {
+
+// in: graph
+// out: segment
+void toMachineCode(const FlowGraph::Graph& graph, Segment& segment);
+
+} // namespace Asm