3 ms·
> I assume at least the 1:1 machine code kind doesn't They do, because the machine code sometimes has undefined behaviour. E.g. on the 6502 famously 1/4 of the
by lmm 3y ago
> I assume at least the 1:1 machine code kind doesn't
They do, because the machine code sometimes has undefined behaviour. E.g. on the 6502 famously 1/4 of the instructions are undefined (all of the 0b.....11 ones), and many of them behave differently on different implementations of the processor (up to and including halting it, or placing it in a strange state).
- flohofwoe 3y agoMost of those undocumented instructions are what in C would be called "implementation defined behaviour" and have properly defined results, they might just differ between specific CPU models. There's only a very small number of unstable instructions which have unpredictable results (caused by "cross talk" due to incomplete instruction decoding).
- lmm 3y agoHalting the CPU would also generally have to be modelled as undefined behaviour in the standard.