<?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>LPCXpresso IDE中的主题 Re: Using MULS instruction in Cortex M0</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/Using-MULS-instruction-in-Cortex-M0/m-p/553990#M13026</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by fastmapper on Sat Dec 31 10:35:36 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I have had no problem using the MULS instruction.&amp;nbsp; Here is a code sequence that I have used successfully for a LPC1227:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .syntax unified&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; muls r5, r3&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We could help you more if you could provide a short code sequence that fails along with the associated build settings (including the target device).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 00:43:12 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T00:43:12Z</dc:date>
    <item>
      <title>Using MULS instruction in Cortex M0</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Using-MULS-instruction-in-Cortex-M0/m-p/553989#M13025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mahna on Sat Dec 31 08:43:51 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;When I use MULS instruction in inline assembly, the compiler flags an error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When I put&amp;nbsp; ".syntax unified" directive, the error is as follows :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Error: Thumb-2 MUL must not set flags&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How to use multiply instruction in inline assembly ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:43:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Using-MULS-instruction-in-Cortex-M0/m-p/553989#M13025</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: Using MULS instruction in Cortex M0</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Using-MULS-instruction-in-Cortex-M0/m-p/553990#M13026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by fastmapper on Sat Dec 31 10:35:36 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I have had no problem using the MULS instruction.&amp;nbsp; Here is a code sequence that I have used successfully for a LPC1227:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .syntax unified&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; muls r5, r3&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We could help you more if you could provide a short code sequence that fails along with the associated build settings (including the target device).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:43:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Using-MULS-instruction-in-Cortex-M0/m-p/553990#M13026</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: Using MULS instruction in Cortex M0</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Using-MULS-instruction-in-Cortex-M0/m-p/553991#M13027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by OA santana on Tue Feb 28 05:49:21 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;My solution. I know it is not an inline command but it might help you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;/************************* some code ************************* /&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;/**&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; * @param r0=a&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; * @param r1=b&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; * @param r2=c&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; * @retval r0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;*/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;__ASM volatile int16_t somemath (int16_t a,int16_t b,int16_t c) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]muls r0,r1,r0 &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;adds r0, r2,r0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;BX lr[/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;int main () {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]&amp;nbsp; int16_t tmp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; tmp =&amp;nbsp; somemath (10,3,4);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; if (tmp != 34) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* error */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; } else {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; /*expected value. */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; }[/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;return(0);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;/************************* end code ************************* /&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Information that might be of your interest : &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Procedure Call Standard for the ARM® Architecture &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(Document number: ARM IHI 0042D, current through ABI release 2.08)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope that helped you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:43:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Using-MULS-instruction-in-Cortex-M0/m-p/553991#M13027</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:43:13Z</dc:date>
    </item>
  </channel>
</rss>

