<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>C51/V6.22 OPTIMIZING-PROBLEM</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/14757/c51-v6-22-optimizing-problem</link><description> We currently use the &amp;#181;Vision 1 environment includig C51/V5.xx. 
 
We now want to update to &amp;#181;Vision-2 / C51 V6.22. 
 
Cause we want to be sure the new version works without any problems we are currently testing the new version before using it for our</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: C51/V6.22 OPTIMIZING-PROBLEM</title><link>https://community.arm.com/thread/38369?ContentTypeID=1</link><pubDate>Mon, 11 Feb 2002 14:10:43 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:dc81743e-bc83-4fbd-a2fb-1a6587ee5c43</guid><dc:creator>Andrew Neil</dc:creator><description>&lt;p&gt;&lt;i&gt;&amp;quot;compiled without an error but doesn&amp;#39;t work correctly.&amp;quot;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
What precisely do you mean by, &lt;i&gt;&amp;quot;doesn&amp;#39;t work correctly?&amp;quot;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Have you examined the generated code to see what&amp;#39;s going on, or tried it in the simulator?&lt;br /&gt;
&lt;br /&gt;
Have you checked carefully for situations requiring the &lt;b&gt;volatile&lt;/b&gt; qualifier?&lt;br /&gt;
&lt;br /&gt;
Note that each optimisation level includes all previous levels; so, as it starts to go &lt;i&gt;&amp;quot;wrong&amp;quot;&lt;/i&gt; at level 7, I&amp;#39;d start looking there.&lt;br /&gt;
The manual describes Level 7 thus:&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&amp;quot;&lt;b&gt;Extended Index Access Optimizing:&lt;/b&gt; Uses the DPTR for register variables where appropriate. Pointer and array access are optimized for both execution speed and code size.&amp;quot;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Do you have any code (especially assembler) which might be &lt;i&gt;&amp;quot;confused&amp;quot;&lt;/i&gt; by this use of the DPTR?&lt;br /&gt;
Check the generated assembler.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>