From 97b8d5bb3c9fd96251e89539d122d2331a2a7925 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Fri, 13 Nov 2020 11:27:39 +0100 Subject: Add system tests, implement syscall --- asm/intel64/trivials.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 asm/intel64/trivials.h (limited to 'asm/intel64/trivials.h') 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 + +// 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 }) {} +}; + -- cgit v1.2.3