Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

1.The compiler option '-S' can be used to generate assembly code instead of binary. In the assembly code vectorized instructions begin with the letter ‘v’, SSE vector instructions generally operate on xmm registers, AVX and AVX2 on ymm registers, and AVX512 on zmm registers. AVX, AVX2, and AVX512 instructions are prefixed with 'v'.

Example of compiling a C++ program to generate assembly code instead of binary code:

...

Example of generated vectorized assembly code:

Code Block
languagecpptext
vldmxcsr  64(%rsp)                                      
vaddpd    (%rsp), %zmm0, %zmm1                          
vmovupd   %zmm1, (%rsp)                                 

...