title: Add a constant value to a xmm register in x86
body: <p>How would I add <code>1</code> or <code>2</code> to the register <code>xmm0</code> (double)?</p>
  
  <p>I can do it like this, but sure there must be an easier way:</p>
  
  <pre>
  movsd xmm0, [ecx]
  
  xor eax, eax
  inc eax
  cvtsi2sd xmm1, eax
  addsd xmm0, xmm1
  
  movsd [ecx], xmm0
  </pre>
  
  <p>Also would it be possible to do this with the floating point x87 instructions?</p>
  
  <p>This doesn't work for me:</p>
  
  <pre>
  fld dword ptr [ecx]
  fld1
  faddp
  fstp dword ptr [ecx]
  </pre>