RFC: Formalization of the Intel assembly syntax (PR53929)

LIU Hao lh_mouse@126.com
Tue Jan 23 09:00:42 GMT 2024


在 2024-01-23 16:38, Jan Beulich 写道:
> Right, but this is very "draft". You can't blindly assume the gas you use
> actually can deal with quotation.

Let's assume that for the time being, but there's something else; see below.


>> .refptr.bx:
>>           .quad   bx
> 
> Sure, this one needs quoting then, too.

The attached patch contains `&& name[0] != '*'` with a reason: In the function `assemble_name_raw` 
in 'gcc/varasm.cc', if `name` starts with a `*`, then its remaining part is output without 
decoration. I have no idea what `*` means; this `.quad bx` thing apparently results from something like

    assemble_name_raw (file, "*bx");

Quoting this would break the i686 DWARF2 code, which may contain an arithmetic expression like

    .long LXXYY-1    # "LXXYY" minus one

If it was quoted like `.long "LXXYY-1"`, it would mean something very different and cause linker errors.


-- 
Best regards,
LIU Hao

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20240123/3f8afeff/attachment-0001.sig>


More information about the Gcc mailing list