Built-In Assembler support for AVX2 and AVX-512

From RAD Studio
Jump to: navigation, search

Go Up to Delphi Compiler


Built-In Assembler modules (CHASM and CHASM64) linked in the Olympus Delphi compiler for Win32 and Win64 support AVX2 and AVX-512 instructions.

Attention: You’d need an AVX-512 compatible CPU (like one of the recent INTEL CPUs) to test this feature. You can find more information at: https://en.wikipedia.org/wiki/Advanced_Vector_Extensions#CPUs_with_AVX-512

New Registers

Registers dcc32 dcc64
XMM16 .. XMM31
Allowed.png
YMM0 .. YMM7
Allowed.png
Allowed.png
YMM8 .. YMM31
Allowed.png
ZMM0 .. ZMM7
Allowed.png
Allowed.png
ZMM8 .. ZMM31
Allowed.png
BND0 .. BND3
Allowed.png
Allowed.png
K0 .. K7
Allowed.png
Allowed.png


New Instruction Prefixes

Instruction Prefix dcc32 dcc64 Intel Syntax
xacquire
Allowed.png
Allowed.png
xrelease
Allowed.png
Allowed.png
<evex>
Allowed.png
Allowed.png
{evex}


New Expression Prefixes

Prefix dcc32 dcc64
oword
Allowed.png
Allowed.png
yword
Allowed.png
Allowed.png
zword
Allowed.png
Allowed.png


Difference between Delphi Syntax and Intel Syntax

Unfortunately, Intel AVX-512 syntax uses curly brackets characters { } which is already used as comment begin/end in Delphi.

So, this implementation uses less-than and greater-than characters < > instead.

Category Delphi Syntax Intel Syntax
Opmask register <k1> ,, <k7> {k1} .. {k7}
Zeroing modifier <z> {z}
Embedded broadcast <1to2> <1to4> <1to8> <1to16> {1to2} {1to4} {1to8} {1to16}
Static rounding-mode <sae> <rn-sae> <rd-sae> <ru-sae> <rz-sae> {sae} {rn-sae} {rd-sae} {ru-sae} {rz-sae}
Force EVEX encoding prefix <evex> {evex}


See Also