<?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>ColdFire/68K Microcontrollers and ProcessorsのトピックRe: Why is moveq better than move.l?</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Why-is-moveq-better-than-move-l/m-p/197974#M8931</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank-you Yevgenit for taking the time to answer these detailed technical questions.&amp;nbsp; I assumed shorter length instructions were better and that the IFP e was a big boost in performance but wanted to make sure I was understanding things correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jul 2009 19:30:45 GMT</pubDate>
    <dc:creator>tupdegrove</dc:creator>
    <dc:date>2009-07-15T19:30:45Z</dc:date>
    <item>
      <title>Why is moveq better than move.l?</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Why-is-moveq-better-than-move-l/m-p/197972#M8929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;(Did some searches but couldn't find answers to these basic questions.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;move.l #$0,d0&lt;/P&gt;&lt;P&gt;moveq #$0,d0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. The Coldfire reference manual lists the execution times for both instructions as one cycle yet I know moveq is quicker.&amp;nbsp; Why is that?&amp;nbsp; I'm assuming it is because the move.l instruction length is 48-bits and moveq is only 16-bits. Would someone be kind enough to explain what is going on here?&lt;/P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;P&gt;2. What is the relation of a one cycle execution time to the number of core clocks?&amp;nbsp; I thought it was one to one but a 16-bit instruction must take more than one clock to make it through the Instruction Fetch Pipeline (IFP) and Operand Execution Pipeline (OEP).&amp;nbsp; Is the key here that the IFP time is not counted due to execution time assumption #1 (OEP loaded with opword &amp;amp; extension words)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. How many clocks does the 48-bit instruction "move.l #$0, d0" really take?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4. I would have expected the time difference between these two instructions to be listed in a table somewhere but couldn't find such a table in the programmer's or device's reference manuals.&amp;nbsp; Did I miss it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tim&lt;BR /&gt;T3li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page&lt;A href="http://freescale.i.lithium.com/i/smilies/16x16_smiley-frustrated.gif"&gt;&lt;IMG alt=":smileyfrustrated:" class="emoticon emoticon-smileyfrustrated" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-frustrated.gif" title="Smiley Frustrated" /&gt;&lt;/A&gt;ection1;} --&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2009 10:01:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Why-is-moveq-better-than-move-l/m-p/197972#M8929</guid>
      <dc:creator>tupdegrove</dc:creator>
      <dc:date>2009-07-10T10:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: Why is moveq better than move.l?</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Why-is-moveq-better-than-move-l/m-p/197973#M8930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; move.l #$0,d0&lt;/P&gt;&lt;P&gt;&amp;gt; moveq #$0,d0&lt;/P&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;gt; 1. The Coldfire reference manual lists the execution times for both instructions as one cycle yet I&lt;/P&gt;&lt;P&gt;&amp;gt; know moveq is quicker.&amp;nbsp; Why is that?&amp;nbsp; I'm assuming it is because the move.l instruction length is&lt;/P&gt;&lt;P&gt;&amp;gt; 48-bits and moveq is only 16-bits. Would someone be kind enough to explain what is going on here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Instruction "move.l #$0,d0" occupies two (16-bit) extension words in the program memory.&lt;/P&gt;&lt;P&gt;Instruction "moveq #$0,d0" doesn't occupies&amp;nbsp;the extension words in the program memory.&lt;/P&gt;&lt;P&gt;Thus, the sustained delay in Instruction Fetch Pipeline (IFP) and (especially)&amp;nbsp;in the program memory is shorter by two (16-bit) words&amp;nbsp;for MOVEQ instruction. In the other words, MOVEQ instruction occupies three times less program memory space, than "move.l #$0,d0" instruction.&lt;/P&gt;&lt;P&gt;The sustained delay in Operand Execution Pipeline (OEP) is the same bor both the instructions.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt; 2. What is the relation of a one cycle execution time to the number of core clocks?&amp;nbsp; I thought it&lt;/P&gt;&lt;P&gt;&amp;gt; was one to one but a 16-bit instruction must take more than one clock to make it through the&lt;/P&gt;&lt;P&gt;&amp;gt; Instruction Fetch Pipeline (IFP) and Operand Execution Pipeline (OEP).&amp;nbsp; Is the key here that the IFP&lt;/P&gt;&lt;P&gt;&amp;gt; time is not counted due to execution time assumption #1 (OEP loaded with opword &amp;amp; extension&lt;/P&gt;&lt;P&gt;&amp;gt; words)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For any instruction, the regular path&amp;nbsp;(system memory -&amp;gt; instruction and data pipilines -&amp;gt; execution unit -&amp;gt; system memory) takes tens or even hundreds of&amp;nbsp;core clocks.&lt;/P&gt;&lt;P&gt;But, due to the pipelining, rate of the excecuted instructions can be as high as&amp;nbsp;one instruction per core clock (in the best case).&lt;/P&gt;&lt;P&gt;Statistically, the instruction, which takes less program memory,&amp;nbsp;is executed faster than the instruction, which takes more program memory. It occurs due to less overhead in the&amp;nbsp;Instruction Fetch Pipeline (IFP) and (especially)&amp;nbsp;in the program memory.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2009 17:39:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Why-is-moveq-better-than-move-l/m-p/197973#M8930</guid>
      <dc:creator>admin</dc:creator>
      <dc:date>2009-07-15T17:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: Why is moveq better than move.l?</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Why-is-moveq-better-than-move-l/m-p/197974#M8931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank-you Yevgenit for taking the time to answer these detailed technical questions.&amp;nbsp; I assumed shorter length instructions were better and that the IFP e was a big boost in performance but wanted to make sure I was understanding things correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2009 19:30:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Why-is-moveq-better-than-move-l/m-p/197974#M8931</guid>
      <dc:creator>tupdegrove</dc:creator>
      <dc:date>2009-07-15T19:30:45Z</dc:date>
    </item>
  </channel>
</rss>

