How are modern processor instructions exposed to userland?

Sijmen J. Mulder ik at sjmulder.nl
Wed Jun 19 09:32:54 UTC 2019


Mayuresh Kathe <mayuresh at kathe.in> wrote:
> Let's think about the AVX-512 instruction introduced with the latest 
> Intel Core i9 Skylake-X processor.
> I wanted to know how one could use such capabilities via regular C.

Unprivileged instructions (like these) are available to all processes.
C compilers can and do already emit them when targeting a CPU that
supports them (see the "-march" flag).

You can also use instrinsics:

https://en.wikipedia.org/wiki/Intrinsic_function
https://software.intel.com/sites/landingpage/IntrinsicsGuide/

Sijmen


More information about the freebsd-questions mailing list