diff options
Diffstat (limited to 'asm/intel64/trivials.cpp')
-rw-r--r-- | asm/intel64/trivials.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
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 <asm/assembler.h> -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<Op>{ + return std::make_shared<Op_lahf>(); + }) && registerOp("nop", [](const Asm::Args& args) -> std::shared_ptr<Op>{ return std::make_shared<Op_nop>(); }) && @@ -17,6 +22,9 @@ bool registered { }) && registerOp("syscall", [](const Asm::Args& args) -> std::shared_ptr<Op>{ return std::make_shared<Op_syscall>(); + }) && + registerOp("ud2", [](const Asm::Args& args) -> std::shared_ptr<Op>{ + return std::make_shared<Op_ud2>(); }) }; |