News for hackers. Stuff that matters.
Re:Apple AMX instruction set (M1/M2 matrix coprocessor) by ladyanita22 on Monday September 05, 2022 @11:36AM (#32725468)
Which compiler would be required for this (https://github.com/corsix/amx/blob/main/aarch64.h)?

I understand the limitation is not at the OS side, as nothing can be done there, but at the compiler-side (I mean that the Apple-supplied compiler doesn't compile against the AMX instruction set, so you'd need a compatible one that, I understand, doesn't exist).

Or is it just undocumented and you can actually get it to work with a Standard xcode and macOS installation given the headers provided?

Re:Apple AMX instruction set (M1/M2 matrix coprocessor) by dougall on Monday September 05, 2022 @11:44AM (#32725604)
This header works with standard Xcode/macOS, by taking advantage of inline assembly in a slightly-cursed way (turning register names into numbers and encoding the instruction itself).
Re:Apple AMX instruction set (M1/M2 matrix coprocessor) by corsix on Monday September 05, 2022 @01:39PM (#32726939)
Slightly cursed is how I roll. I would like to know where the trick first originated from though (I found it at https://github.com/yvt/amx-rs/blob/main/src/nativeops.rs#L22 rather than inventing it de novo)
Re:Apple AMX instruction set (M1/M2 matrix coprocessor) by ndesaulniers on Monday September 05, 2022 @05:12PM (#32729539)
This happens often in the Linux kernel to continue to support older assemblers for newer instruction set extensions.

The x86 retbleed mitigation uses .inst to trick the hardware instruction decoder...different instructions are encoded/run than what is speculatively decoded.

Re:Apple AMX instruction set (M1/M2 matrix coprocessor) by dagmx on Monday September 05, 2022 @11:38AM (#32725504)
Compilers wouldn’t target it. You’d get to it via https://developer.apple.com/documentation/accelerate