<div dir="ltr">Hi<div><br></div><div>My somewhat brute force approach is to write a C function that does </div><div>something very similar to what I want to do. In this case, make a to</div><div>the same method. Be sure to make the method extern to your test method</div><div>so GCC doesn't do any magic inlining for you.</div><div><br></div><div>I would recommend compiling at -Os because the code tends to look more</div><div>hand written. </div><div><br></div><div>Then use the generated .S file as a go by. A bit crude but at least you are</div><div>starting with a decent example.</div><div><br></div><div>--joel</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 9, 2020 at 2:01 PM Christian Mauderer <<a href="mailto:list@c-mauderer.de">list@c-mauderer.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 09/01/2020 13:58, Richard.Glossop@L3Harris.com wrote:<br>
> Is anyone aware of an example of calling a ‘C’ function from assembly<br>
> for the LEON3 (SPARC assembly)?<br>
<br>
Maybe something like<br>
<br>
<br>
<a href="https://git.rtems.org/rtems/tree/cpukit/score/cpu/sparc/cpu_asm.S?id=362cf319d44e7e64987f12aa36ea030e6298c586#n610" rel="noreferrer" target="_blank">https://git.rtems.org/rtems/tree/cpukit/score/cpu/sparc/cpu_asm.S?id=362cf319d44e7e64987f12aa36ea030e6298c586#n610</a><br>
<br>
or<br>
<br>
<br>
<a href="https://git.rtems.org/rtems/tree/bsps/sparc/shared/start/start.S?id=362cf319d44e7e64987f12aa36ea030e6298c586#n378" rel="noreferrer" target="_blank">https://git.rtems.org/rtems/tree/bsps/sparc/shared/start/start.S?id=362cf319d44e7e64987f12aa36ea030e6298c586#n378</a><br>
<br>
helps?<br>
<br>
> <br>
> <br>
> <br>
> CONFIDENTIALITY NOTICE: This email and any attachments are for the sole<br>
> use of the intended recipient and may contain material that is<br>
> proprietary, confidential, privileged or otherwise legally protected or<br>
> restricted under applicable government laws. Any review, disclosure,<br>
> distributing or other use without expressed permission of the sender is<br>
> strictly prohibited. If you are not the intended recipient, please<br>
> contact the sender and delete all copies without reading, printing, or<br>
> saving.<br>
> <br>
> <br>
<br>
Note: A confidentiality notice on a public mailing list is a bit pointless.<br>
<br>
Best regards<br>
<br>
Christian<br>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@rtems.org" target="_blank">users@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/users</a><br>
</blockquote></div>