From 031bfef600e7021c8bd72e2e663f368e7386b131 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Wed, 18 Nov 2020 17:55:27 +0100 Subject: Added Asm ops --- asm/intel64/trivials.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'asm/intel64/trivials.cpp') diff --git a/asm/intel64/trivials.cpp b/asm/intel64/trivials.cpp index eb1bbb8..ef537b6 100644 --- a/asm/intel64/trivials.cpp +++ b/asm/intel64/trivials.cpp @@ -2,13 +2,18 @@ #include -Op_nop::Op_nop(): OpSimple({ 0x90 }) {} +Op_lahf::Op_lahf(): OpSimple({ 0x9F }) {} // Load flags to AH +Op_nop::Op_nop(): OpSimple({ 0x90 }) {} // No operation Op_ret::Op_ret(): OpSimple({ 0xC3 }) {} // near return; TODO: far return is 0xCB -Op_syscall::Op_syscall(): OpSimple({ 0x0F, 0x05 }) {} +Op_syscall::Op_syscall(): OpSimple({ 0x0F, 0x05 }) {} // Syscall +Op_ud2::Op_ud2(): OpSimple({ 0x0F, 0x0B }) {} // Undefined Instruction, variant 2: with no operands namespace { bool registered { + registerOp("lahf", [](const Asm::Args& args) -> std::shared_ptr{ + return std::make_shared(); + }) && registerOp("nop", [](const Asm::Args& args) -> std::shared_ptr{ return std::make_shared(); }) && @@ -17,6 +22,9 @@ bool registered { }) && registerOp("syscall", [](const Asm::Args& args) -> std::shared_ptr{ return std::make_shared(); + }) && + registerOp("ud2", [](const Asm::Args& args) -> std::shared_ptr{ + return std::make_shared(); }) }; -- cgit v1.2.3