Skip to content

Emitting Windows x64 unwind codes while assembling a function #311

Answered by wtfsck
alexrp asked this question in Q&A
Discussion options

You must be logged in to vote

You could use labels, then after you've assembled the code, you can get the IP of those labels.

Iced will try to use the shortest instructions. If you must guarantee that some instruction encoding is used, it's probably better to use Instruciton.create(), unless you know there's only one possible encoding that will be used. Eg. if it's 'push rax', iced won't use the longer push r/m instruction, but of course the 1-byte opcode.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by alexrp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants