You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
fstachura
changed the title
Comments in assembler files some architectures are indexed as identifiers
Comments in assembler files for some architectures are indexed as identifiers
Jun 25, 2024
Do you have any idea to address this? The indexer must be able, just from the file content and its filepath, to determine how parsing should be done. That sounds hard, or project specific.
I don't see any good way to detect architecture from the assembler file alone, I think this would have to be fixed in a different way for every project.
Another problem is that most assembler files in Linux codebase are in arch/, however, some are not. See https://elixir.bootlin.com/linux/latest/source/drivers/memory/ti-emif-sram-pm.S
OK, last solution would be to make the general parsing we do be more generic to other assembly language files. For example (^|\s)!\s being the start of a line comment seems pretty safe from a quick grep. Same for ;.
We wouldn't want to have each project definition having to define parsing of assembly files. That's too complex for little benefits.
See for example:
https://elixir.bootlin.com/linux/latest/source/arch/arc/kernel/head.S#L25
https://elixir.bootlin.com/linux/latest/source/arch/sh/kernel/entry-common.S#L8
https://elixir.bootlin.com/linux/latest/source/arch/arm/kernel/entry-common.S#L43 (end of the line, after @)
This is likely due to the fact, that different architectures have different comment syntax in GNU Assembler.
https://en.wikipedia.org/wiki/GNU_Assembler
The text was updated successfully, but these errors were encountered: