summaryrefslogtreecommitdiffhomepage
path: root/asm/intel64/trivials.h
diff options
context:
space:
mode:
Diffstat (limited to 'asm/intel64/trivials.h')
-rw-r--r--asm/intel64/trivials.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/asm/intel64/trivials.h b/asm/intel64/trivials.h
new file mode 100644
index 0000000..72ea3f8
--- /dev/null
+++ b/asm/intel64/trivials.h
@@ -0,0 +1,24 @@
+// Trivial Operations, without arguments
+
+#pragma once
+
+#include <asm/chunk.h>
+
+// No Operation
+class Op_nop: public OpSimple
+{
+public: Op_nop() : OpSimple({ 0x90 }) {}
+};
+
+// Return from procedure
+class Op_ret: public OpSimple
+{
+public: Op_ret() : OpSimple({ 0xC3 }) {} // near return; TODO: far return is 0xCB
+};
+
+// Syscall
+class Op_syscall: public OpSimple
+{
+public: Op_syscall() : OpSimple({ 0x0F, 0x05 }) {}
+};
+