diff options
author | Roland Reichwein <mail@reichwein.it> | 2020-11-13 11:27:39 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2020-11-13 11:27:39 +0100 |
commit | 97b8d5bb3c9fd96251e89539d122d2331a2a7925 (patch) | |
tree | d72aca2bb0a2ea3b7d5933c1c68097ed0840002a /asm/intel64/trivials.cpp | |
parent | 387af55e498970975d77291374e2f5be12a040bd (diff) |
Add system tests, implement syscall
Diffstat (limited to 'asm/intel64/trivials.cpp')
-rw-r--r-- | asm/intel64/trivials.cpp | 19 |
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>(); + }) +}; + +} |