<div dir="ltr"><div>Peter,</div><div><br></div><div>&gt; If you change the stack pointer in that procedure, of course you either</div><div>&gt; have to check from where you are being called or you must not use that</div><div>&gt; procedure from within the wrong stack.</div><div><br></div><div>Ja thats clear, I was checking if there was more on your mind, Thanks.</div><div><br></div><div>j.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 1, 2015 at 5:38 PM, Peter Matthias <span dir="ltr">&lt;<a href="mailto:PeterMatthias@web.de" target="_blank">PeterMatthias@web.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
Am 29.08.2015 um 21:52 schrieb Jan de Kruyf:<br>
&gt; Peter,<br>
&gt;<br>
&gt;  &gt; If someone wants a stack in fast ram,<br>
&gt;  &gt; allocate same data and let the exported procedures do the change of the<br>
&gt;  &gt; stack pointer. Don&#39;t use exported procedures local.<br>
&gt;<br>
</span>&gt; Do you mean to say: &quot;Don&#39;t use exported procedures locally *because*<br>
<span class="">&gt; they will<br>
&gt; confuse the stack pointer&quot;? (since you advise to let the exported<br>
&gt; procedures do<br>
&gt; the change of the stack pointer.)<br>
&gt; Do I understand that right?<br>
<br>
</span>If you change the stack pointer in that procedure, of course you either<br>
have to check from where you are being called or you must not use that<br>
procedure from within the wrong stack.<br>
<br>
Peter<br>
<span class=""><br>
&gt;<br>
&gt;<br>
&gt; On Sat, Aug 29, 2015 at 9:22 PM, Peter Matthias &lt;<a href="mailto:PeterMatthias@web.de">PeterMatthias@web.de</a><br>
</span><span class="">&gt; &lt;mailto:<a href="mailto:PeterMatthias@web.de">PeterMatthias@web.de</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;     Am 29.08.2015 um 13:40 schrieb John R. Strohm:<br>
</span><span class="">&gt;     &gt; ---<a href="mailto:PeterMatthias@web.de">PeterMatthias@web.de</a> &lt;mailto:<a href="mailto:PeterMatthias@web.de">PeterMatthias@web.de</a>&gt; wrote:<br>
&gt;     &gt;&gt; Until a generalized solution is found I would simply scan for the module<br>
&gt;     &gt;&gt; names in linker that need code and/or data in fast ram and allocate it<br>
&gt;     &gt;&gt; there. A generalized solution would be to mark code/date in a special<br>
&gt;     &gt;&gt; way and let the linker do the allocation automatically.<br>
&gt;     ...<br>
&gt;     &gt; I&#39;d suggest (based on DSP experience) that, if you allow procedures to be marked for fast RAM, you restrict such marking to leaf procedures.<br>
&gt;     &gt;<br>
&gt;     &gt; The alternative is to do a transitive closure on the marked procedure: Any procedure called by a procedure marked to be located in fast RAM must also be located in fast RAM.  This is a good way to use up fast RAM very quickly, if you make one bad call decision.<br>
&gt;<br>
&gt;     Both true. However, marking code on procedure level would be difficult<br>
&gt;     to implement. On module level it&#39;s easy to implement and can be<br>
&gt;     restricted to leaf modules. If someone wants a stack in fast ram,<br>
&gt;     allocate same data and let the exported procedures do the change of the<br>
&gt;     stack pointer. Don&#39;t use exported procedures local.<br>
&gt;<br>
&gt;     &gt; I also agree with the guy who said you want all of the fast RAM allocation information in ONE place, to make it easier to manage it all, which argues against marking individual procedures, and argues in favor of a linker control file.  I&#39;ve had to do this, on a fair-sized embedded DSP project.  It was a headache and it remained an ongoing headache.<br>
&gt;<br>
&gt;     Also true. If you can&#39;t get your code into one fast ram module it gets<br>
&gt;     complicated. If it fits, it should be easy.<br>
&gt;<br>
&gt;     Peter<br>
&gt;<br>
&gt;     --<br>
</span>&gt;     <a href="mailto:Oberon@lists.inf.ethz.ch">Oberon@lists.inf.ethz.ch</a> &lt;mailto:<a href="mailto:Oberon@lists.inf.ethz.ch">Oberon@lists.inf.ethz.ch</a>&gt; mailing<br>
<div class="HOEnZb"><div class="h5">&gt;     list for ETH Oberon and related systems<br>
&gt;     <a href="https://lists.inf.ethz.ch/mailman/listinfo/oberon" rel="noreferrer" target="_blank">https://lists.inf.ethz.ch/mailman/listinfo/oberon</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; <a href="mailto:Oberon@lists.inf.ethz.ch">Oberon@lists.inf.ethz.ch</a> mailing list for ETH Oberon and related systems<br>
&gt; <a href="https://lists.inf.ethz.ch/mailman/listinfo/oberon" rel="noreferrer" target="_blank">https://lists.inf.ethz.ch/mailman/listinfo/oberon</a><br>
&gt;<br>
<br>
--<br>
<a href="mailto:Oberon@lists.inf.ethz.ch">Oberon@lists.inf.ethz.ch</a> mailing list for ETH Oberon and related systems<br>
<a href="https://lists.inf.ethz.ch/mailman/listinfo/oberon" rel="noreferrer" target="_blank">https://lists.inf.ethz.ch/mailman/listinfo/oberon</a><br>
</div></div></blockquote></div><br></div>