bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/25750] GNU as has inconsistent behavior when expanding .ma


From: nickc at redhat dot com
Subject: [Bug binutils/25750] GNU as has inconsistent behavior when expanding .macro that takes as input directives with arguments
Date: Tue, 07 Apr 2020 10:25:34 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=25750

--- Comment #7 from Nick Clifton <nickc at redhat dot com> ---
(In reply to Jian Cai from comment #6)
Hi Jian,

> I made an LLVM patch for (https://reviews.llvm.org/D76962), which will make
> clang's integrated assembler to treat .inst and its arguments as one macro
> argument in the above example.

I am not clear on this.  Do you mean that if a macro's argument is the
string ".inst" then it will treat any text that follows on the same line
as being part of the same argument ?  If so, then is this special treatment
reserved only for macro arguments that start with ".inst" ?

> It did not go though upstream review as it
> would create mismatch between clang and gcc, 

[Just to be pedantic, it would be a mismatch between llvm's integrated
assembler and the binutils's stand alone assembler.  Gcc is a separate project
to the binutils].

> so I am curious if gcc is
> interested to have more general support, so that code like the example in
> Comment 4 will work without being rewritten.

I think not.  I am definitely against having macros change their behaviour
based upon the text inside their arguments.  Plus there is a hard built-in
requirement that assembler directives operate on a per-line basis.  If there is
a need to spread the arguments to a directive across multiple lines in the
input text, then the newline should be escaped.  Eg:

  .section sec1 \
     , "ax" , @progbits

Cheers
  Nick

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]