suppose that xmm0 has 4 floats, how would you sum-up the values into the lowest part of xmm0 ?
pseudo code xmm0\0 = xmm0\0 + xmm0\1 + xmm0\2 + xmm0\3
and likewise if xmm0 had 2 doubles
// Moved from "Coding Questions" to "Assembly Programming" (Kiffi)
sum of xmm register
Re: sum of xmm register
https://www.felixcloutier.com/x86/haddps
Code: Select all
! HADDPS xmm0, xmm0
! HADDPS xmm0, xmm0
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module
Re: sum of xmm register
thanks STARGÅTE
I was hoping for a single instruction

I was hoping for a single instruction