Blazing fast and correct x86/x64 disassembler, assembler, decoder, encoder for Rust, .NET, Java, Python, Lua
BlockEncoder
forward branch encoding perf (Credit: @susitsm)Decoder
now implements Send + Sync
(Credit: @h33p)AssemblerRegister*
ctors are now public (Credit: @HoLLy-HaCKeR)LOADIWKEY
may cause a VM exitFRED
and LKGS
instructionsInstruction
's memory displacement is now 64 bits (was 32 bits). This solves a couple of issues and will make creating RIP
-relative memory operands much easier.
MemoryDisplacement{32,64}
/memory_displacement{32,64}()
(deprecated old 32-bit members: MemoryDisplacement
/memory_displacement()
)EIP
/RIP
relative memory operand, MemoryDisplacement64
/memory_displacement64()
is now the absolute address (used to be an RIP-relative displacement)OpKind.Memory64
is deprecated since it's not used by iced (use OpKind.Memory
instead)MemoryOperand
's displacement argument is now an i64
(used to be an i32
)Decoder::with_ip()
/Decoder.Create()
with an extra ip
argument (Rust/.NET/Python)FastFormatter
perf improvements:
SpecializedFormatter<TraitOptions>
is 2x faster than the old FastFormatter
code. see here
FastFormatter
is now type FastFormatter = SpecializedFormatter<T>
(no breaking changes)try_*()
methods that return a Result<T, E>
Register::values()
(Credit: @tnballo) that returns an iterator that returns all enum values. Same associated method was also added to the other public enums.TryFrom<usize>
Instruction::op_kinds()
which returns all (0-5) OpKind
valuesC0
, C1
, C2
, C3
) to RflagsBits
Instruction.GetFpuStackIncrementInfo()
/ Instruction.fpu_stack_increment_info()
to get the value added to FPU TOP
and whether it's written by the instructionUsedMemory.{try_,}virtual_address()
(Credit: @woodruffw){UsedMemory,Instruction}.TryGetVirtualAddress()
try_*()
methods that return a Result<T, E>
TDX
, Key Locker
, UINTR
, HRESET
, AVX-VNNI
ALTINST
OpCodeInfo
properties: cpl, mode (rm, v86, vmx, etc), tsx, serializing, vm exit and more.FastFormatter
with a masm-like syntax that can be used if formatting speed is more important than being able to re-assemble formatted instructions. It also uses less code (good if you're targeting wasm).Instruction.HasOpKind()
(Credit: @Symbai)AMX
instructions, AMD VMGEXIT
and REX.W GETSEC
REX.W CALL/JMP FAR [mem]
, REX.W LSS/LFS/LGS [mem]
), add UD0
(without a modrm byte). Use the AMD
decoder option, the older AmdBranches
is now obsolete but does the same thing.MPX
ISA in 2019. MPX
instructions are now disabled by default but can be enabled with the MPX
decoder option.Decoder.LastError
property, deprecated InvalidNoMoreBytes
Assembler.db(byte[])
(Credit: @Symbai)try_virtual_address()
(Credit: @Ralith)--{in,ex}clude-cpuid <name>
command line optionsINVLPGB
, TLBSYNC
NegateConditionCode()
/ConditionCode()
now also support LOOPE
/LOOPNE
Jcc
/SETcc
/CMOVcc
/LOOPcc
mnemonics (eg. JE
or JZ
)ShowUselessPrefixes
formatter optionIEnumerable<Instruction>
Decoder.Create(bitness, byte[], options)
overloadSERIALIZE
, XSUSLDTRK
, XRESLDTRK
PSMASH
, PVALIDATE
, RMPADJUST
, RMPUPDATE
PreferST0
formatter option (fadd st,st(3)
vs fadd st(0),st(3)
)Decoder.InvalidNoMoreBytes
which is true
if the decoded instruction is invalid because there are no more bytes left.Assembler
class was added (thanks to @xoofx for adding this feature!) which lets you easily add instructions with a syntax that looks like assembler, eg. c.imul(rcx, __[rdx*8+0x10], -10)
. It supports all instructions and all modes (16/32/64-bit). See the example in the README
for more info.net35
tfm, added netstandard2.1
tfmInstruction.HasSegmentPrefix
propertyEncoder.WriteByte()
OpCodeOperandKind.r{16,32,64}_reg_mem
for movdir64b/enqcmd{s,}
StreamCodeWriter
and StreamCodeReader
VZERO{UPPER,ALL}
don't touch regs 16-31BlockEncoder.TryEncode()
signature got updated with a BlockEncoderResult
Instruction.GetInfo()/GetUsedRegisters()/GetUsedMemory()
were removed, and the docs never recommended using them. Use InstructionInfoFactory
instead.FormatterOperandOptions
is now a struct, used to be a flags enum.Instruction.Create()
methods now throw if the immediate value is invalidStringBuilderFormatterOutput
, use StringOutput
instead (shorter name!)FormatterOutputTextKind
-> FormatterTextKind