<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Wierd instruction: extractps in Intel® ISA Extensions</title>
    <link>https://community.intel.com/t5/Intel-ISA-Extensions/Wierd-instruction-extractps/m-p/769390#M71</link>
    <description>In my assembly program, I use sse instruction in computing .&lt;BR /&gt;&lt;BR /&gt;I need to extract 4 single float value in xmm seperately, to do later computing.&lt;BR /&gt;&lt;BR /&gt;I write like that &lt;BR /&gt; extractps $3, %xmm0,%xmm0&lt;BR /&gt;&lt;BR /&gt;compiler as reported error:Error: suffix or operands invalid for `extractps'&lt;BR /&gt;&lt;BR /&gt;I look up volumen 2 manual ,find I am wrong .&lt;BR /&gt;&lt;BR /&gt;"&lt;BR /&gt;EXTRACTPS reg/m32, xmm2, imm8&lt;BR /&gt;"&lt;BR /&gt;the destnation should be a register of 64bit or 32bit.&lt;BR /&gt;&lt;BR /&gt;But 64bit or 32bit registers are all for integers , like rax,eax.&lt;BR /&gt;How can I do float computing later if I put the result in integer registers ?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 20 Apr 2012 11:33:05 GMT</pubDate>
    <dc:creator>zhangxiuxia</dc:creator>
    <dc:date>2012-04-20T11:33:05Z</dc:date>
    <item>
      <title>Wierd instruction: extractps</title>
      <link>https://community.intel.com/t5/Intel-ISA-Extensions/Wierd-instruction-extractps/m-p/769390#M71</link>
      <description>In my assembly program, I use sse instruction in computing .&lt;BR /&gt;&lt;BR /&gt;I need to extract 4 single float value in xmm seperately, to do later computing.&lt;BR /&gt;&lt;BR /&gt;I write like that &lt;BR /&gt; extractps $3, %xmm0,%xmm0&lt;BR /&gt;&lt;BR /&gt;compiler as reported error:Error: suffix or operands invalid for `extractps'&lt;BR /&gt;&lt;BR /&gt;I look up volumen 2 manual ,find I am wrong .&lt;BR /&gt;&lt;BR /&gt;"&lt;BR /&gt;EXTRACTPS reg/m32, xmm2, imm8&lt;BR /&gt;"&lt;BR /&gt;the destnation should be a register of 64bit or 32bit.&lt;BR /&gt;&lt;BR /&gt;But 64bit or 32bit registers are all for integers , like rax,eax.&lt;BR /&gt;How can I do float computing later if I put the result in integer registers ?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 20 Apr 2012 11:33:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-ISA-Extensions/Wierd-instruction-extractps/m-p/769390#M71</guid>
      <dc:creator>zhangxiuxia</dc:creator>
      <dc:date>2012-04-20T11:33:05Z</dc:date>
    </item>
    <item>
      <title>Wierd instruction: extractps</title>
      <link>https://community.intel.com/t5/Intel-ISA-Extensions/Wierd-instruction-extractps/m-p/769391#M72</link>
      <description>rax, eax are called &lt;B&gt;general-purpose registers &lt;/B&gt;therefore can hold different datatypes.&lt;BR /&gt;&lt;BR /&gt;have a look at 3.4 BASIC PROGRAM EXECUTION REGISTERS,&lt;BR /&gt;from &lt;A href="http://download.intel.com/products/processor/manual/325462.pdf" target="_blank"&gt;http://download.intel.com/products/processor/manual/325462.pdf&lt;/A&gt;</description>
      <pubDate>Fri, 20 Apr 2012 11:47:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-ISA-Extensions/Wierd-instruction-extractps/m-p/769391#M72</guid>
      <dc:creator>Maxym_D_Intel</dc:creator>
      <dc:date>2012-04-20T11:47:37Z</dc:date>
    </item>
    <item>
      <title>Wierd instruction: extractps</title>
      <link>https://community.intel.com/t5/Intel-ISA-Extensions/Wierd-instruction-extractps/m-p/769392#M73</link>
      <description>Yes, you are right. general-purpose register can hold different datatypes. &lt;BR /&gt;&lt;BR /&gt;But if I want to do some computing ,it is difficult. &lt;BR /&gt;&lt;BR /&gt;I have to store the data in eax back to memory , and then load it .&lt;BR /&gt;&lt;BR /&gt;Because , addl on can do integer add.&lt;BR /&gt;addss ,addps, addpd addsd can do float add.&lt;BR /&gt;&lt;BR /&gt;fadd can do float add. but data is stored in fp register stack. &lt;BR /&gt;I have to mov data in eax to fp register stack .&lt;BR /&gt;This is no memory access. &lt;BR /&gt;&lt;BR /&gt;So I can only use fadd in order to reduce memory access times. &lt;BR /&gt;&lt;BR /&gt;Is what I said right ?&lt;BR /&gt;</description>
      <pubDate>Tue, 24 Apr 2012 14:05:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-ISA-Extensions/Wierd-instruction-extractps/m-p/769392#M73</guid>
      <dc:creator>zhangxiuxia</dc:creator>
      <dc:date>2012-04-24T14:05:48Z</dc:date>
    </item>
    <item>
      <title>Wierd instruction: extractps</title>
      <link>https://community.intel.com/t5/Intel-ISA-Extensions/Wierd-instruction-extractps/m-p/769393#M74</link>
      <description>First of all I'll suggest you to use the intrinsics instead of ASM code.&lt;BR /&gt;&lt;BR /&gt;It looks like what you want to do is to use scalar instructions from packed values, you can do that directly for the element 0, for example use _mm_add_ss onsome data output by _mm_add_ps. Toaccess otherelements simply use a shuffle instruction before the scalar instruction, btw shuffle is typically faster than extractps, for example to rotate right an XMM register with 4 x FP32 :&lt;BR /&gt;&lt;BR /&gt;_mm_shuffle_ps(m,m,_MM_SHUFFLE(0,3,2,1))&lt;BR /&gt;&lt;BR /&gt;before: 3.0 | 4.5 | -2.4 | 1.1 &lt;BR /&gt;after: 1.1 | 3.0 | 4.5 | -2.4&lt;BR /&gt;&lt;BR /&gt;doing 3 such rotate right in sequence will allow you to access easily all individual elements &lt;BR /&gt;</description>
      <pubDate>Wed, 25 Apr 2012 14:52:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-ISA-Extensions/Wierd-instruction-extractps/m-p/769393#M74</guid>
      <dc:creator>bronxzv</dc:creator>
      <dc:date>2012-04-25T14:52:27Z</dc:date>
    </item>
  </channel>
</rss>

