Question about GCC / GDC / LDC syntax of inline asm advanced
Cecil Ward
cecil at cecilward.com
Thu Jul 6 23:11:08 UTC 2023
In GDC and LDC’s inline asm syntax, the main asm part is
separated from the constraints block by the first colon that
begins the ‘outputs’ section. My question: how does GDC / LDC /
GCC parse the first part, given that there can be umpteen kinds
of assembler language. Is the parsing asm dialect-specific so
that a full parse finds the first significant colon ?
If not and the very first colon (outside double-quoted strings
and comments) ends the first section, which is how I parse it,
then there is a problem, as labels contain colons. And so I have
a bug in my gramma for my kludge asm section parser, see thread
elsewhere.
About labels then, is a label the only place a non
section-terminator colon can occur?
A label doesn’t have a colon before the name, but after it, is
that correct for ATT asm dialect? If so, I could check for a
newline plus optional whitespace required before any colon if it
is to be recognised as a section terminator and the beginning of
the constraints.
More information about the Digitalmars-d
mailing list