3 ms·
That's a shame because you could get an essentially one-instruction program loop: jmp loop CE shows this happens on opt-level=1 which is neat. Of
by unlinked_dll 7y ago
That's a shame because you could get an essentially one-instruction program
loop:
jmp loop
CE shows this happens on opt-level=1 which is neat. Of the weird breakages this takes the case!
https://godbolt.org/z/LyERew https://godbolt.org/z/LyERew
- nneonneo 7y agoThe posted program is one instruction too! main: ud2 (ud2 is a permanently illegal instruction on x86)
- CUViper 7y agoEven that `ud2` is only there because rustc sets the `TrapUnreachable` flag for LLVM. In older versions you would get nothing at all, so calling main would fall through to whatever was next in memory.