Is what the all-zeroes instruction does considered in machine instruction design?

I remember using a simulated machine with with a minimal instruction set in university. In particular I remember that the instruction that consisted of all zeroes loaded was a LOAD instruction. So, if you made a mistake and began executing empty memory then it would simply keep executing until it ran out of address space.

x86 appears to perform an ADD on empty memory, so similar behaviour to the example above.

All zeros in 6502 on the other hand, corresponds to the BRK instruction which activates a software interrupt so executing empty memory quickly puts the machine in a known state.

My understanding is that 6502 was designed to be written by humans, whereas (at least modern) x86 is designed for compilers to output. Historically, when a machine instruction set is designed, how much attention has been paid to the specific representation each instruction has, given that it can have real effects? I've focused on what the all-zeroes instruction does because I expect that would be the most common instruction to be accidentally executed, but I'd be interested in considerations relating to other instruction representations as well.

• I think it is fair to say that x86 was not designed for compiler output. One can observe that by noting: the small number of registers, the fact that many instructions have constraints on registers (mul puts the result in eax:edx for example), the many memory addressing modes that are not supported uniformly for all instructions. Thus x86 instructions set is extremely irregular, and not very compiler friendly. The more recent instruction (especially MMX and friends) are much more regular and compiler friendly though. – Amaury Pouly Nov 2 '17 at 18:36
• Interestingly, it turns out that the choice of BRK as opcode 0 in 6502 was done to simplify hardware: internally the processor handles an external interrupt by shorting the bits of the next opcode to ground when it starts decoding it, and therefore causing the interrupt handling system to be invoked. The Intel 8080 (and hence Z80) also has a similar design decision involving the bit patterns of the RST instructions, in this case to simplify external circuits producing them rather than a circuit internal to the processor; the 8080's zero instruction however is explicitly designated NOP. – Jules Jan 2 '18 at 9:14