public inbox for gas2@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
To: Alan Modra <alan@spri.levels.unisa.edu.au>
Cc: law@cygnus.com, gcc2@cygnus.com, egcs@cygnus.com, gas2@cygnus.com
Subject: Re: ASM_COMMENT_START and gas divide operator
Date: Thu, 07 May 1998 02:39:00 -0000	[thread overview]
Message-ID: <vyzhg32bet4.fsf@issan.informatik.uni-dortmund.de> (raw)
In-Reply-To: <Pine.LNX.3.96.980507185035.16449A-100000@mullet.Levels.UniSA.Edu.Au>

Alan Modra <alan@spri.levels.unisa.edu.au> writes:

|> On 7 May 1998, Andreas Schwab wrote:

|>> Jeffrey A Law <law@cygnus.com> writes:
|>> 
|>> |>   In message <Pine.LNX.3.96.980501124359.28262A-100000@mullet.Levels.UniSA.Edu.ou write:
|>> |>   > There is a problem with using "/" to start comments, such as those
|>> |>   > emitted by gcc's -fverbose-asm.  If gas needs to support "/" meaning
|>> |>   > the start of a comment anywhere on a line, then the gas division
|>> |>   > operator is killed, sometimes silently.  For instance:
|>> |>   >   asm("pushl $FOO/2")
|>> |>   > is treated as if the programmer wrote
|>> |>   >   asm("pushl $FOO")
|>> |>   > 
|>> |>   > Of course, this is only a problem with hand-coded assembly, but it
|>> |>   > would be nice to fix gas and gcc.  At least on linux, where the only
|>> |>   > assembler used with gcc is gas, we should be able to make the
|>> |>   > following change without causing too many problems.
|>> |>   > 
|>> |>   > 	* config/linux.h (ASM_COMMENT_START): Define as "#"
|>> |>   > 	* config/linux-aout.h (ASM_COMMENT_START): Likewise
|>> |> Thanks.  I've installed this into egcs.
|>> 
|>> This is wrong, it breaks m68k-linux, and perhaps all other non-intel linux
|>> port.  It must be moved to config/i386/linux.h.  There is no such thing as
|>> a universal comment character.

|> OK, you're right.  Just as well I said "without causing too many
|> problems" rather than "no problems" :-)  What about ASM_APP_ON and
|> ASM_APP_OFF defined on the next few lines down?  Do these really
|> belong in config/i386/linux.h too?

No, these are correct.  There are two types of comments, one that start on
column 1 and the other that do not.  ASM_APP_* are only written at the
start of the line, and here # is used as comment universally.  For inline
comments every port has different conventions.  For example, on m68k the #
is used to denote immediate operands, thus it cannot start a comment.

-- 
Andreas Schwab                                      "And now for something
schwab@issan.informatik.uni-dortmund.de              completely different"
schwab@gnu.org

  reply	other threads:[~1998-05-07  2:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-04-30 22:29 Alan Modra
1998-05-06 18:34 ` Jeffrey A Law
1998-05-07  1:53   ` Andreas Schwab
1998-05-07  3:59     ` Alan Modra
1998-05-07  2:39       ` Andreas Schwab [this message]
1998-05-14  0:35 ` Martynas Kunigelis
1998-05-14  9:37   ` Jeffrey A Law
1998-05-14 10:17     ` Craig Burley
1998-05-14 13:08       ` Jeffrey A Law
1998-05-14 15:07         ` Craig Burley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vyzhg32bet4.fsf@issan.informatik.uni-dortmund.de \
    --to=schwab@issan.informatik.uni-dortmund.de \
    --cc=alan@spri.levels.unisa.edu.au \
    --cc=egcs@cygnus.com \
    --cc=gas2@cygnus.com \
    --cc=gcc2@cygnus.com \
    --cc=law@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).