Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does vzeroall zero registers ymm16 to ymm31?

The documentation for vzeroall appears inconsistent. The prose says:

The instruction zeros contents of all XMM or YMM registers.

The pseudocode below that, however, indicates that in 64-bit mode only registers ymm0 through ymm15 are affected:

IF (64-bit mode)
    limit ←15
ELSE
    limit ← 7
FOR i in 0 .. limit:
    simd_reg_file[i][MAXVL-1:0] ← 0

On AVX-512 supporting machines clearing up to ymm15 is not the same as clearing "all" because ymm16 through ymm31 exist.

Is the prose or pseudocode correct?

like image 204
BeeOnRope Avatar asked Jan 24 '20 19:01

BeeOnRope


People also ask

How many AVX registers?

AVX uses sixteen YMM registers to perform a single instruction on multiple pieces of data (see SIMD). Each YMM register can hold and do simultaneous operations (math) on: eight 32-bit single-precision floating point numbers or. four 64-bit double-precision floating point numbers.

What is avx512 used for?

The AVX-512 instruction set increases the size of a CPU's register to enhance its performance. This boost in performance enables CPUs to crunch numbers faster, allowing users to run video/audio compression algorithms at faster speeds.


1 Answers

It seems like it was a description issue, if you will look at the latest SDM you will see that description was changed lately and now it says that VZEROALL does not changing YMM16...YMM31.

Intel latest SDM (Oct 2019)

like image 100
Matt. Stroh Avatar answered Sep 19 '22 08:09

Matt. Stroh