Example Assembly
Joel Sherrill
joel at rtems.org
Thu Jan 9 23:28:37 UTC 2020
Hi
My somewhat brute force approach is to write a C function that does
something very similar to what I want to do. In this case, make a to
the same method. Be sure to make the method extern to your test method
so GCC doesn't do any magic inlining for you.
I would recommend compiling at -Os because the code tends to look more
hand written.
Then use the generated .S file as a go by. A bit crude but at least you are
starting with a decent example.
--joel
On Thu, Jan 9, 2020 at 2:01 PM Christian Mauderer <list at c-mauderer.de>
wrote:
> On 09/01/2020 13:58, Richard.Glossop at L3Harris.com wrote:
> > Is anyone aware of an example of calling a ‘C’ function from assembly
> > for the LEON3 (SPARC assembly)?
>
> Maybe something like
>
>
>
> https://git.rtems.org/rtems/tree/cpukit/score/cpu/sparc/cpu_asm.S?id=362cf319d44e7e64987f12aa36ea030e6298c586#n610
>
> or
>
>
>
> https://git.rtems.org/rtems/tree/bsps/sparc/shared/start/start.S?id=362cf319d44e7e64987f12aa36ea030e6298c586#n378
>
> helps?
>
> >
> >
> >
> > CONFIDENTIALITY NOTICE: This email and any attachments are for the sole
> > use of the intended recipient and may contain material that is
> > proprietary, confidential, privileged or otherwise legally protected or
> > restricted under applicable government laws. Any review, disclosure,
> > distributing or other use without expressed permission of the sender is
> > strictly prohibited. If you are not the intended recipient, please
> > contact the sender and delete all copies without reading, printing, or
> > saving.
> >
> >
>
> Note: A confidentiality notice on a public mailing list is a bit pointless.
>
> Best regards
>
> Christian
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20200109/f21353cf/attachment.html>
More information about the users
mailing list