3 ms·
This makes no sense to me If I think about asm: function1: (do stuff) jp function1 ret function2: (other stuff) ret main: call
by raverbashing 16d ago
This makes no sense to me
If I think about asm:
function1:
(do stuff)
jp function1
ret
function2:
(other stuff)
ret
main:
call function1
call function2
the 2nd call might happen internally due to branch prediction but in practice it shouldn't and the processor fixes this
Oh yeah and TFA also goes with:
> The funny bit is that C got this right.(...) but C included one more rule: loops whose controlling expression is a constant expression may not be assumed to terminate.
Well, duh! A broken clock is right twice a day it seems
- rcxdude 16d agoWith UB the compiler has no particular requirement to emit the 'ret'. (or, in the example, anything at all for the function)
- deleted 16d ago[deleted]