Assembly Language Style

Joel Sherrill joel at rtems.org
Wed Aug 7 13:40:38 UTC 2019


On Wed, Aug 7, 2019 at 8:29 AM Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:

> ----- Am 7. Aug 2019 um 15:20 schrieb joel joel at rtems.org:
>
> > Hi
> >
> > Most times I teach a class, I end up walking though initialization of
> some
> > SPARC
> > BSP and thus the SPARC shared start.S. This file is internally
> inconsistent
> > and I
> > didn't remember us having a defined style for assembly language files.
> > Specific
> > issues in this file:
> >
> > + tabs vs spaces to separate label, instructions, and comment
> > + line 376 instruction doesn't align
> >
> > How do we want to format assembly language files?
> >
> > And did I miss any style guidance?
>
> I don't think we have a style guide for assembly language.
>
> I would prefer to use a style similar to the GCC output.
>

That uses a tab for placing the instruction and one between the
mnemonic and arguments.

But there are no comments past the instruction. Tabs there also?

And it looks like tabstop=8 for it to look reasonable.

Is that what you think?

--joel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20190807/e5fda2d6/attachment.html>


More information about the devel mailing list