Question about GCC / GDC / LDC syntax of inline asm advanced

Iain Buclaw ibuclaw at gdcproject.org
Fri Jul 7 19:51:45 UTC 2023


On Friday, 7 July 2023 at 19:45:19 UTC, Iain Buclaw wrote:
> On Friday, 7 July 2023 at 15:25:32 UTC, Cecil Ward wrote:
>> On Friday, 7 July 2023 at 12:18:47 UTC, Cecil Ward wrote:
>>> On Friday, 7 July 2023 at 11:39:44 UTC, Iain Buclaw wrote:
>>>> [...]
>>>
>>> Many thanks Iain. I am not doing a full parse so I shall 
>>> simply have to warn the user that the ternary operator must 
>>> be resolved at ctfe before I get the resulting string, and 
>>> otherwise I have to forbid it, because for me, aside from 
>>> detecting labels, I am treating colon as a section 
>>> terminator. My kludge. But I don’t have months to spend.
>>
>> Iain, what’s the lex syntax for a label in the asm ? is it 
>> always alphanum+ ‘:’ - something like that?
>
> Where is the label being referenced/defined from?
>
> Within the asm insn string? [GNU As documents it 
> as](https://sourceware.org/binutils/docs/as/Symbol-Names.html):
>
>     [A-Za-z._][0-9A-Za-z._]+
>

Saying that, I'm pretty sure GNU As accepts Unicode in symbol 
names, as I have encountered reports of testsuite failures on 
Solaris 10/11 that involved Oracle's assembler and Unicode in D 
function names (gcc and gccgo rather encode the unicode 
characters in a symbol name so IIRC).


More information about the Digitalmars-d mailing list