icedland / iced

Blazing fast and correct x86/x64 disassembler, assembler, decoder, encoder for Rust, .NET, Java, Python, Lua
MIT License
2.83k stars 232 forks source link

You must emit an instruction after emitting a label #571

Closed aelio closed 1 month ago

aelio commented 1 month ago

What is the use case for this check? Can it be made optional at least? I think assembler has no reason to take any care of this. In my scenario I write assembly into standalone blocks and then bring them together without use of iced framework, so jump behind the last instruction is absolutely legal.

wtfsck commented 1 month ago

That's an implementation limitation. You can add the Zero_bytes "instruction" as the last instruction which won't write any bytes to the output.

aelio commented 1 month ago

Okay, thanks