By: Linus Torvalds (torvalds.delete@this.linux-foundation.org), August 20, 2013 4:05 pm
Room: Moderated Discussions
Ricardo B (ricardo.b.delete@this.xxxxxx.xx) on August 20, 2013 3:27 pm wrote:
>
> Incurring the risk of your wrath, I think it would have been a good time to drop
> BCD, x87, MMX, 3d!now, ah/bh/ch/dh and probably some more stuff like that.
The thing you don't seem to understand is that AMD *couldn't* drop those things.
Why? Because you still need the hardware and logic for them for legacy mode. You can't get rid of the high-byte logic, since it's still needed.
So at most, AMD could drop these features from the x86-64 instruction decoding map. But the hardware would have to be there anyway, and the instruction decoders would still have to be there. Remember: x86 long more is sharing all of that with the legacy mode, and it needed to do that for good reasons (that I outlined).
Now, AMD did that opcode map cleanup for the inc/dec instructions, but there the upside was that those took up a lot of opcode space that could be used better for other things. The same just wasn't true of random individual instructions.
Yes, AAD and AAM are totally worthless instructions, and they are in that one-byte opcode space that could have been used for something else. But they are just two ops in that opcode space, and what use for them would you have that would be so important that it would argue for the need of decoding them differently in long mode than in other modes?
AMD did the right thing. Really.
And AMD did drop x87 in the only way that matters - the long mode function call ABI no longer uses it. But no, there's no way in hell the actual hardware support for it could be dropped, exactly because in order to introduce a new architecture, you still want to run all those old programs.
Seriously. The history of computer architecture is absolutely chock-full of people who thought they could introduce a new and cleaner architecture, and drop support for old legacy stuff that "didn't matter". And you still - in 2013 - make that same argument?
Paraphrasing Santayana: "Those who cannot remember the past are f*cking morons".
Linus
>
> Incurring the risk of your wrath, I think it would have been a good time to drop
> BCD, x87, MMX, 3d!now, ah/bh/ch/dh and probably some more stuff like that.
The thing you don't seem to understand is that AMD *couldn't* drop those things.
Why? Because you still need the hardware and logic for them for legacy mode. You can't get rid of the high-byte logic, since it's still needed.
So at most, AMD could drop these features from the x86-64 instruction decoding map. But the hardware would have to be there anyway, and the instruction decoders would still have to be there. Remember: x86 long more is sharing all of that with the legacy mode, and it needed to do that for good reasons (that I outlined).
Now, AMD did that opcode map cleanup for the inc/dec instructions, but there the upside was that those took up a lot of opcode space that could be used better for other things. The same just wasn't true of random individual instructions.
Yes, AAD and AAM are totally worthless instructions, and they are in that one-byte opcode space that could have been used for something else. But they are just two ops in that opcode space, and what use for them would you have that would be so important that it would argue for the need of decoding them differently in long mode than in other modes?
AMD did the right thing. Really.
And AMD did drop x87 in the only way that matters - the long mode function call ABI no longer uses it. But no, there's no way in hell the actual hardware support for it could be dropped, exactly because in order to introduce a new architecture, you still want to run all those old programs.
Seriously. The history of computer architecture is absolutely chock-full of people who thought they could introduce a new and cleaner architecture, and drop support for old legacy stuff that "didn't matter". And you still - in 2013 - make that same argument?
Paraphrasing Santayana: "Those who cannot remember the past are f*cking morons".
Linus