summaryrefslogtreecommitdiffhomepage
path: root/asm/intel64/trivials.cpp
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-11-13 11:27:39 +0100
committerRoland Reichwein <mail@reichwein.it>2020-11-13 11:27:39 +0100
commit97b8d5bb3c9fd96251e89539d122d2331a2a7925 (patch)
treed72aca2bb0a2ea3b7d5933c1c68097ed0840002a /asm/intel64/trivials.cpp
parent387af55e498970975d77291374e2f5be12a040bd (diff)
Add system tests, implement syscall
Diffstat (limited to 'asm/intel64/trivials.cpp')
-rw-r--r--asm/intel64/trivials.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/asm/intel64/trivials.cpp b/asm/intel64/trivials.cpp
new file mode 100644
index 0000000..dd89ecd
--- /dev/null
+++ b/asm/intel64/trivials.cpp
@@ -0,0 +1,19 @@
+#include "trivials.h"
+
+#include <asm/assembler.h>
+
+namespace {
+
+bool registered {
+ registerOp("nop", [](Asm::Args& args) -> std::shared_ptr<Op>{
+ return std::make_shared<Op_nop>();
+ }) &&
+ registerOp("ret", [](Asm::Args& args) -> std::shared_ptr<Op>{
+ return std::make_shared<Op_ret>();
+ }) &&
+ registerOp("syscall", [](Asm::Args& args) -> std::shared_ptr<Op>{
+ return std::make_shared<Op_syscall>();
+ })
+};
+
+}