<?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 about partial register stalls in Intel® ISA Extensions</title>
    <link>https://community.intel.com/t5/Intel-ISA-Extensions/about-partial-register-stalls/m-p/866309#M2259</link>
    <description>Is there a partial register stall in the following code when executing the last instruction?&lt;BR /&gt;&lt;BR /&gt;xor eax, eax&lt;BR /&gt;mov ah, byte ptr [edx]&lt;BR /&gt;mov al, byte ptr [edx+1]&lt;BR /&gt;add ecx, eax&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Sat, 04 Apr 2009 07:45:35 GMT</pubDate>
    <dc:creator>hurricanezhb</dc:creator>
    <dc:date>2009-04-04T07:45:35Z</dc:date>
    <item>
      <title>about partial register stalls</title>
      <link>https://community.intel.com/t5/Intel-ISA-Extensions/about-partial-register-stalls/m-p/866309#M2259</link>
      <description>Is there a partial register stall in the following code when executing the last instruction?&lt;BR /&gt;&lt;BR /&gt;xor eax, eax&lt;BR /&gt;mov ah, byte ptr [edx]&lt;BR /&gt;mov al, byte ptr [edx+1]&lt;BR /&gt;add ecx, eax&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 04 Apr 2009 07:45:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-ISA-Extensions/about-partial-register-stalls/m-p/866309#M2259</guid>
      <dc:creator>hurricanezhb</dc:creator>
      <dc:date>2009-04-04T07:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: about partial register stalls</title>
      <link>https://community.intel.com/t5/Intel-ISA-Extensions/about-partial-register-stalls/m-p/866310#M2260</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;It is partial register access, but Intel micro-architecture does not have partial register stall issue as bad as original P6 had for a long time already, FrontEnd just issues sync uop to collect value of eax before uop for the last instruction as if code had one more instruction.&lt;/DIV&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;-Max&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Sun, 05 Apr 2009 01:01:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-ISA-Extensions/about-partial-register-stalls/m-p/866310#M2260</guid>
      <dc:creator>Max_L</dc:creator>
      <dc:date>2009-04-05T01:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: about partial register stalls</title>
      <link>https://community.intel.com/t5/Intel-ISA-Extensions/about-partial-register-stalls/m-p/866311#M2261</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;I should add though that we encourage you to avoid coding with writing to AH/BH/CH/DH registers followed by read of any other part of same register or in general avoiding any kind of write the part then read the full register is the most efficient coding.&lt;/DIV&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Use MOVZX (or MOVSX) instruction if you need to convert 8- or 16-bit unsigned (or signed) value to 32/64-bit one.&lt;/DIV&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Use explicit shifts if you need to combine data in a one register:&lt;/DIV&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;movzx eax, byte ptr [esi+A]&lt;/DIV&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;movzx ebx, byte ptr [esi+B]&lt;/DIV&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;shl eax, 8&lt;/DIV&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;or  eax, ebx&lt;/DIV&gt;
-Max&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Sun, 05 Apr 2009 18:59:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-ISA-Extensions/about-partial-register-stalls/m-p/866311#M2261</guid>
      <dc:creator>Max_L</dc:creator>
      <dc:date>2009-04-05T18:59:19Z</dc:date>
    </item>
    <item>
      <title>Re: about partial register stalls</title>
      <link>https://community.intel.com/t5/Intel-ISA-Extensions/about-partial-register-stalls/m-p/866312#M2262</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/311419"&gt;hurricanezhb&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;Is there a partial register stall in the following code when executing the last instruction?&lt;BR /&gt;&lt;BR /&gt;xor eax, eax&lt;BR /&gt;mov ah, byte ptr [edx]&lt;BR /&gt;mov al,  byte ptr [edx+1]&lt;BR /&gt;add ecx, eax&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
Above has partial register stalls. Partial register stall is a problem that occurs when we write to part of a 32-bit register and&lt;BR /&gt;later read from the whole register or a bigger part of it. &lt;BR /&gt;&lt;BR /&gt;Any use of the high 8-bit registers AH, BH, CH, DH should be avoided because it can cause false dependences and less efficient code. Prevent false dependences by writing to a full register rather than a partial register.&lt;BR /&gt;&lt;BR /&gt;One should be aware of partial stalls whenever there is a mix different data sizes (8, 16, and 32 bits).&lt;BR /&gt;&lt;BR /&gt;We don't get a stall when reading a partial register after writing to the full register, or a bigger part of it as -&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt; mov eax, [mem32]&lt;BR /&gt; add bl, al   ; No stall&lt;BR /&gt; add bh, ah ; No stall&lt;BR /&gt; mov cx, ax  ; No stall&lt;BR /&gt; mov dx, bx ; Stall&lt;BR /&gt;&lt;BR /&gt;The easiest way to avoid partial register stalls is to always use full registers and use MOVZX or MOVSX when reading from smaller memory operands. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;~BR&lt;BR /&gt;Mukkaysh Srivastav&lt;BR /&gt;</description>
      <pubDate>Mon, 27 Apr 2009 10:13:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-ISA-Extensions/about-partial-register-stalls/m-p/866312#M2262</guid>
      <dc:creator>srimks</dc:creator>
      <dc:date>2009-04-27T10:13:15Z</dc:date>
    </item>
  </channel>
</rss>

