dest = dest + source
The addss instruction adds the source value (second operand) to the destination (an XMM register). The source can be an XMM register or a 32 bit memory location. There is also vaddss on CPUs with AVX instructions which allows using 3 XMM registers or 2 XMM registers and a memory location which can simplify coding.
addss xmm0, xmm1 ; add xmm1 to xmm0 ; leave the rest of xmm0 as is addss xmm0, [x] ; add 32 bit variable x to xmm0 ; leave the rest of xmm0 as is addss xmm0, [rdi] ; add 32 bit value [rdi] to xmm0 ; rdi holds the address of a float ; leave the rest of xmm0 as is addss xmm0, [x+4*rcx] ; add 32 bit element of array x to xmm0 ; rcx contains the array index ; leave the rest of xmm0 as is vaddss xmm3, xmm0, xmm15 ; xmm3 = xmm0 + xmm15 ; Note: operates by copying 128 bits from xmm0 to xmm3 ; before adding. This might occasionally be useful. ; The rest of ymm0 is left as is ; using addss would change either xmm0 or xmm15 ; possibly requiring an additional instruction vaddss xmm3, xmm0, [x] ; xmm3 = xmm0 + x