title: Loading SSE registers
body: <p>I'm working on homework project for OS development class. One task is to save context of SSE registers upon interrupt. Now, saving and restoring context is easy (fxsave/fxsave). But I have problem with testing. I want to put same sample date into one of registers, but all I get is error interrupt 6. Here is code:</p>
  
  <pre><code>// load some SSE registers
  struct Vec4 {
      int x, y, z, w;
  } vec = { 0, 1, 2, 3 }; 
  
  
  asm volatile (  "movl %0, %%eax"
          : /* no output */
          : "r"( &amp;vec )
          :
          );
  asm volatile ( "movups (%eax), %xmm0" );
  </code></pre>
  
  <p>I searched on internet for solution. All I got is that it might something to do with effective address space. But I don't know what it is.</p>