Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Jun 2019 11:32:49 +0200
From:      "Sijmen J. Mulder" <ik@sjmulder.nl>
To:        mayuresh@kathe.in
Cc:        freebsd-questions@freebsd.org
Subject:   Re: How are modern processor instructions exposed to userland?
Message-ID:  <20190619113249.09852c139fe41b79abca8dcd@sjmulder.nl>
In-Reply-To: <4b320042bd82ffe9b7793b62719d06f0@kathe.in>
References:  <4b320042bd82ffe9b7793b62719d06f0@kathe.in>

next in thread | previous in thread | raw e-mail | index | archive | help
Mayuresh Kathe <mayuresh@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190619113249.09852c139fe41b79abca8dcd>