News for hackers. Stuff that matters.
Re:Inside the AMD Microcode ROM [video] by snovv_crash on Friday December 28, 2018 @07:35AM (#18776395)
I wonder whether it would be possible to add aftermarket AVX-512 instruction handling? Not for performance necessarily, but for compatibility.
Re:Inside the AMD Microcode ROM [video] by ip26 on Friday December 28, 2018 @12:11PM (#18777971)
We have robust support for alternate code paths based on CPU flags after many years of this kind of thing. Is that really necessary or useful?

Custom microcode handling is a lot more brittle and chip- specific yet nearly equivalent to overloading in software your call to some avx512 op.

Re:Inside the AMD Microcode ROM [video] by raverbashing on Friday December 28, 2018 @12:48PM (#18778215)
You're right, it isn't needed

The "last time" this was done was in the x87 days, where if the math coprocessor wasn't installed you could trap the corresponding interrupt and handle it to emulate the instructions.

Re:Inside the AMD Microcode ROM [video] by bpye on Friday December 28, 2018 @05:33PM (#18780019)
Re:Inside the AMD Microcode ROM [video] by mschuster91 on Friday December 28, 2018 @05:45PM (#18780103)
> The "last time" this was done was in the x87 days, where if the math coprocessor wasn't installed you could trap the corresponding interrupt and handle it to emulate the instructions.

Wasn't Hackintosh (or getting new OS X running on too old hardware) also using this technology to "support" CPUs without the newest SSEx instruction sets?

Re:Inside the AMD Microcode ROM [video] by TazeTSchnitzel on Friday December 28, 2018 @08:12AM (#18776513)
The tricky thing there would be those aren't just new instructions, they extend existing registers and add new ones. Where do you fit the extra bytes?
Re:Inside the AMD Microcode ROM [video] by en4bz on Friday December 28, 2018 @10:40AM (#18777324)
AMD already implements 256bit operations in terms of 2 128bit operations. Seems like going to 4 wouldn't be a stretch, at least for some of the simpler operations. Seems like a subset of operations would be possible.
Re:Inside the AMD Microcode ROM [video] by TazeTSchnitzel on Friday December 28, 2018 @06:38PM (#18780401)
> AMD already implements 256bit operations in terms of 2 128bit operations.

Current Zen has actual 256-bit registers, it just doesn't have the execution units to process the whole register at once. It's not really the same thing.

Re:Inside the AMD Microcode ROM [video] by bayindirh on Friday December 28, 2018 @11:59AM (#18777903)
I think Zen2 implements 256 bit instructions natively [0]. For AVX512, the new instructions [1] rather than the floating point arithmetic will be a problem IMHO. Emulating them with the microcode will be expensive and will provide no performance gains.

[0]: https://en.wikichip.org/wiki/amd/microarchitectures/zen_2

[1]: https://en.wikipedia.org/wiki/AVX-512

Re:Inside the AMD Microcode ROM [video] by ah- on Friday December 28, 2018 @07:42AM (#18776417)
Unlikely, IIRC you only had someting in the order of 32 three-instruction slots of memory.
Re:Inside the AMD Microcode ROM [video] by rzzzt on Friday December 28, 2018 @12:37PM (#18778138)
I guess it would be easier to do that with virtualization. Advertise the capability to the VM, catch illegal instructions, emulate the missing pieces.