4 ms·
> I really don't understand why Intel and AMD haven't fully implemented this point: just implement the instructions that compilers use, plus the ones needed for
by jcranmer 4y ago
> I really don't understand why Intel and AMD haven't fully implemented this point: just implement the instructions that compilers use, plus the ones needed for bootstrapping and kernels. Put all the "legacy" instructions into user mode library code. It would simplify the silicon, likely reducing bugs.
There are actually very few such instructions. The BCD arithmetic instructions, the BOUND instruction, MPX (which is already removed in current architectures), arguably the entire x87/MMX instruction sets. Removing x87 is hard because it's required for i386 ABI reasons (floats/doubles are returned on the x87 stack in i386, SSE registers in x86-64). MPX is already axed, and the others stick around only for backwards compatibility (not available in x86-64) and are likely already microcoded already.
Note that the compiler already emits REP STOSB instructions as it's the fastest way to do memcpys these days.
- gpderetta 4y agoGreat point on x87 being set in stone in 32bit ABIs. Specifically Windows were 32bit software is still very common!
- gumby 4y agoYou could probably eliminate the entire 32 bit support, real mode and all of 16 bits, segmentation and such and just run it in emulation. Can modern x86 even run 8080 code? I wonder how much that would save though. Surely the register file would be easier to implement? Benefits would come from smaller microcode (less code, fewer bugs) and any hardware needed to support it too.
- dragontamer 4y ago> You could probably eliminate the entire 32 bit support, real mode no such and just run it in emulation. That would literally obsolete every single motherboard on the market, and force those motherboard makers to make a new bootup cycle. And there's still a lot of programs that run in 32-bit Windows by the way. Like, the near entirety of Good ol Games. I still like playing SimCity 2000, Heroes of Might and Magic, and Panzer General. > Can modern x86 run 8080 code? 8080 ? Of course not. There was a clean break to 8086. And then we never dropped compatibility with 8086.
- gumby 4y agoI meant to type 8086 so thanks for answering the question I was trying to ask. I assume most servers don’t need 32 bit mode. Then again people are slowly moving to arm on the server anyway.