<?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>Not use a specified intruction</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/39598/not-use-a-specified-intruction</link><description> 
Hi all. 
I&amp;#39;m using a modified 8051 cpu, and it don&amp;#39;t have some instructions
(in this case MUL). In Keil IDE, when I do some like: foo = bar
&amp;lt;&amp;lt; 1; 
Compiler translate as: MUL AB 
And it produce a reset of the software. 
My question is very simple: how</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Not use a specified intruction</title><link>https://community.arm.com/thread/105735?ContentTypeID=1</link><pubDate>Mon, 13 Feb 2012 11:39:05 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:44286847-92f9-4986-bf54-876b0885bb9c</guid><dc:creator>erik malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;&amp;quot;premature optimisation is a root of all kinds of evil&amp;quot;&lt;/i&gt;&lt;br /&gt;
I like that one&lt;/p&gt;

&lt;p&gt;
maybe tha analogy is &amp;quot;give a man a log and he is warm for a day,
set him on fire and he is warm for the rest of his life&amp;quot;&lt;/p&gt;

&lt;p&gt;
Erik&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Not use a specified intruction</title><link>https://community.arm.com/thread/91426?ContentTypeID=1</link><pubDate>Mon, 13 Feb 2012 10:26:23 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c4add669-bc33-442e-9e07-332fb7bb3d80</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
More likely, an excellent example of a false economy!!&lt;/p&gt;

&lt;p&gt;
And/or an illustration of, &amp;quot;premature optimisation is a root of
all kinds of evil&amp;quot;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Not use a specified intruction</title><link>https://community.arm.com/thread/67253?ContentTypeID=1</link><pubDate>Mon, 13 Feb 2012 09:22:44 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:31aa09a7-96a3-45b2-9e40-19c6d94f56b4</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;&amp;quot;I&amp;#39;m using a modified 8051 cpu, and it don&amp;#39;t have some
instructions (in this case MUL)&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
And you didn&amp;#39;t think to consider, &lt;i&gt;&lt;b&gt;before&lt;/b&gt;&lt;/i&gt; choosing
this CPU, what tools would be able to support that?&lt;/p&gt;

&lt;p&gt;
Perhaps you should reconsider the decision - is the saving of a
few instructions really worth the the pain that it causes...?&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;&amp;quot;how I do to indicate the compiler that not to use that
instruction?&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
You study the compiler &lt;b&gt;manual&lt;/b&gt; very carefully to see if
there is an option to support this derivative - or one that has the
same (or sufficiently similar) limitations.&lt;/p&gt;

&lt;p&gt;
You could contact Keil to see if they would be prepared to add
support - though I think you&amp;#39;d need to make a very compelling case
indeed.&lt;/p&gt;

&lt;p&gt;
You could check other compilers.&lt;/p&gt;

&lt;p&gt;
You could take an open-source compiler such as SDCC and modify it
to your requirements.&lt;/p&gt;

&lt;p&gt;
You just write in assembler.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Not use a specified intruction</title><link>https://community.arm.com/thread/60368?ContentTypeID=1</link><pubDate>Mon, 13 Feb 2012 09:14:58 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:0349b649-8b2b-413a-ba2b-adcd45cf1191</guid><dc:creator>erik malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;I&amp;#39;m using a modified 8051 cpu, and it don&amp;#39;t have some
instructions...how I do to indicate the compiler that not to use that
instruction?&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
you can&amp;#39;t, an excellent example of &amp;quot;the law of unintended
consequences&amp;quot;&lt;/p&gt;

&lt;p&gt;
Erik&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Not use a specified intruction</title><link>https://community.arm.com/thread/79984?ContentTypeID=1</link><pubDate>Mon, 13 Feb 2012 09:03:46 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:5a250798-922a-4c66-be12-fcf0a887fab9</guid><dc:creator>erik malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
in ancient times when embedded was done with a minicomputer
(visualize a chip weighing 40 pounds) there was, at least, one brand
where the &amp;quot;economy model&amp;quot; missed some instructions the &amp;quot;full model&amp;quot;
had. In tbe &amp;quot;economy model&amp;quot; the unsupported instructions trapped to
an ISR where you installed a piece of company provided software that
emulated the missing instructions. I recall another case where we
handled some atomicity issues by replacing a call with an invalid
instruction, the trap disabled all interrupts for the time &amp;quot;the code
called&amp;quot; processed.&lt;/p&gt;

&lt;p&gt;
Erik&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Not use a specified intruction</title><link>https://community.arm.com/thread/60366?ContentTypeID=1</link><pubDate>Mon, 13 Feb 2012 08:57:23 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:55109912-663a-4e0e-8d77-63ac19a09308</guid><dc:creator>Mike Kleshov</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;My question is very simple: how I do to indicate the compiler
that not to use that instruction?&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
As far as I know, you cannot do this with C51.&lt;/p&gt;

&lt;p&gt;
You can try to take an open-source compiler (SDCC) and modify it
to suit your needs.&lt;/p&gt;

&lt;p&gt;
&lt;a href="http://sdcc.sf.net"&gt;http://sdcc.sf.net&lt;/a&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Not use a specified intruction</title><link>https://community.arm.com/thread/60367?ContentTypeID=1</link><pubDate>Mon, 13 Feb 2012 08:44:54 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:584843fb-677a-4d43-b7c6-111ed13c1ffa</guid><dc:creator>erik malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;I&amp;#39;m using a modified 8051 cpu, and it don&amp;#39;t have some
instructions&lt;/i&gt;&lt;br /&gt;
the least, such a thingy should have would be a trap for unsupported
instructions that would allow you to emulate them soft.&lt;/p&gt;

&lt;p&gt;
Erik&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Not use a specified intruction</title><link>https://community.arm.com/thread/67250?ContentTypeID=1</link><pubDate>Mon, 13 Feb 2012 08:43:51 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:544c830b-0c13-4c38-ac8a-d0d25cfe4c40</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
The full 8051 (complete with peripherials) was implemented with a
minimum of transistors. It hurts to hear about a 8051 that doesn&amp;#39;t
even have a full core. I leave it to someone else to figure out if
there even is support for that.&lt;/p&gt;

&lt;p&gt;
Does the C51 compatibility list contain any other 8051 chip with
MUL removed? If not, then there would be zero reason for Keil to
include such a setting in their compiler. And if that&amp;#39;s the case,
then you would either have to settle for assembler programming, or
download and modify SDCC or some other compiler that is available
complete with source code.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>