<?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 Development confirmed that in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/masked-instructions-in-inline-assembler/m-p/954459#M20407</link>
    <description>&lt;P&gt;Development confirmed that the single braces and percent sign must both be doubled in the GNU-style extended syntax so this is just a syntax error.&amp;nbsp;The mask requires double single braces so&amp;nbsp;lines 8-10 in the above reproducer should read:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; __asm__("vaddpd -64(%[src], %%r10), %%zmm0, %%zmm0 {{%%k1}}"&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :: [src]"r"(src) : );&lt;/P&gt;</description>
    <pubDate>Mon, 13 Jan 2014 09:56:08 GMT</pubDate>
    <dc:creator>Kevin_D_Intel</dc:creator>
    <dc:date>2014-01-13T09:56:08Z</dc:date>
    <item>
      <title>masked instructions in inline assembler</title>
      <link>https://community.intel.com/t5/Software-Archive/masked-instructions-in-inline-assembler/m-p/954455#M20403</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;DIV class="post-text" itemprop="description"&gt;
	&lt;P&gt;For testing purposes, I am writing short assembly snippets for Intels Xeon Phi with the icc inline assembler. Now I wanted to use masked vector instructions, but I fail at feeding them to the inline assembler.&lt;/P&gt;

	&lt;P&gt;For Code like this:&lt;/P&gt;

	&lt;PRE&gt;
&lt;CODE&gt;vmovapd  -64(%%r14, %%r10), %%zmm0{%%k1} 
&lt;/CODE&gt;&lt;/PRE&gt;

	&lt;P&gt;I get the error message&lt;/P&gt;

	&lt;PRE&gt;
&lt;CODE&gt;/tmp/icpc5115IWas_.s: Assembler messages:
/tmp/icpc5115IWas_.s:563: Error: junk `%k1' after register
&lt;/CODE&gt;&lt;/PRE&gt;

	&lt;P&gt;I tried a lot of different combinations, but nothing worked. The Compiler version is intel64/13.1up03.&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 10 Jan 2014 09:50:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/masked-instructions-in-inline-assembler/m-p/954455#M20403</guid>
      <dc:creator>Dominik_E_</dc:creator>
      <dc:date>2014-01-10T09:50:40Z</dc:date>
    </item>
    <item>
      <title>The compiler accepts a</title>
      <link>https://community.intel.com/t5/Software-Archive/masked-instructions-in-inline-assembler/m-p/954456#M20404</link>
      <description>&lt;P&gt;The compiler accepts a similar form of inline asm so it seems what you are trying should work.&lt;/P&gt;

&lt;P&gt;#include &amp;lt;immintrin.h&amp;gt;&lt;BR /&gt;
	&amp;nbsp; void foo()&lt;BR /&gt;
	&amp;nbsp; {&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; asm ("vmovapd -64(%r14, %r10), %zmm0{%k1}");&lt;BR /&gt;
	&amp;nbsp; }&lt;/P&gt;

&lt;P&gt;$ icpc -mmic t.cpp&lt;/P&gt;

&lt;P&gt;Do you have a small complete asm source file I could use to reproduce that error?&lt;/P&gt;

&lt;P&gt;I am also checking w/others about this.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2014 12:15:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/masked-instructions-in-inline-assembler/m-p/954456#M20404</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2014-01-10T12:15:20Z</dc:date>
    </item>
    <item>
      <title>Thank you for the reply. I</title>
      <link>https://community.intel.com/t5/Software-Archive/masked-instructions-in-inline-assembler/m-p/954457#M20405</link>
      <description>&lt;P&gt;Thank you for the reply. I was able to verify that your code sample works. The main difference to the code I am using is the use of extended inline assembler. The first sequence works, the second does not:&lt;/P&gt;

&lt;P&gt;[cpp]#include &amp;lt;immintrin.h&amp;gt;&lt;/P&gt;

&lt;P&gt;int main(int argc, char**argv) {&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; double * src = (double*) _mm_malloc( 64, 128 );&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; __asm__("vaddpd -64(%r14, %r10), %zmm0, %zmm0{%k1}");&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; __asm__("vaddpd -64(%[src], %%r10), %%zmm0, %%zmm0{%%k1}"&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :: [src]"r"(src) : );&lt;BR /&gt;
	}[/cpp]&lt;/P&gt;

&lt;P&gt;icpc -mmic asmtest.cpp&lt;/P&gt;

&lt;P&gt;&amp;gt;/tmp/icpcUyuKn1as_.s:42: Error: junk `%k1' after register&lt;/P&gt;

&lt;P&gt;This is probably just a syntax error. The extended assembler necessiates the use of %% instead of %.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2014 14:09:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/masked-instructions-in-inline-assembler/m-p/954457#M20405</guid>
      <dc:creator>Dominik_E_</dc:creator>
      <dc:date>2014-01-10T14:09:43Z</dc:date>
    </item>
    <item>
      <title>Thank you for the reproducer.</title>
      <link>https://community.intel.com/t5/Software-Archive/masked-instructions-in-inline-assembler/m-p/954458#M20406</link>
      <description>&lt;P&gt;Thank you for the reproducer.&amp;nbsp;I will pass it along.&amp;nbsp;I'm thinking this is an assembler defect but I'm still awaiting word from others and I'll let you know what I hear.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2014 17:08:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/masked-instructions-in-inline-assembler/m-p/954458#M20406</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2014-01-10T17:08:52Z</dc:date>
    </item>
    <item>
      <title>Development confirmed that</title>
      <link>https://community.intel.com/t5/Software-Archive/masked-instructions-in-inline-assembler/m-p/954459#M20407</link>
      <description>&lt;P&gt;Development confirmed that the single braces and percent sign must both be doubled in the GNU-style extended syntax so this is just a syntax error.&amp;nbsp;The mask requires double single braces so&amp;nbsp;lines 8-10 in the above reproducer should read:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; __asm__("vaddpd -64(%[src], %%r10), %%zmm0, %%zmm0 {{%%k1}}"&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :: [src]"r"(src) : );&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2014 09:56:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/masked-instructions-in-inline-assembler/m-p/954459#M20407</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2014-01-13T09:56:08Z</dc:date>
    </item>
    <item>
      <title>Thank you very much, I can</title>
      <link>https://community.intel.com/t5/Software-Archive/masked-instructions-in-inline-assembler/m-p/954460#M20408</link>
      <description>&lt;P&gt;Thank you very much, I can confirm that that works.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2014 11:24:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/masked-instructions-in-inline-assembler/m-p/954460#M20408</guid>
      <dc:creator>Dominik_E_</dc:creator>
      <dc:date>2014-01-13T11:24:38Z</dc:date>
    </item>
  </channel>
</rss>

