public inbox for gas2@sourceware.org
 help / color / mirror / Atom feed
* ASM_COMMENT_START and gas divide operator
@ 1998-04-30 22:29 Alan Modra
  1998-05-06 18:34 ` Jeffrey A Law
  1998-05-14  0:35 ` Martynas Kunigelis
  0 siblings, 2 replies; 10+ messages in thread
From: Alan Modra @ 1998-04-30 22:29 UTC (permalink / raw)
  To: gcc2, egcs; +Cc: gas2

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

--- gcc/config/linux.h~	Sun Apr  5 03:08:45 1998
+++ gcc/config/linux.h	Fri May  1 10:54:14 1998
@@ -34,6 +34,9 @@
 #define MULTIBYTE_CHARS 1
 #endif
 
+#undef ASM_COMMENT_START
+#define ASM_COMMENT_START "#"
+
 #undef ASM_APP_ON
 #define ASM_APP_ON "#APP\n"
 
--- gcc/config/linux-aout.h~	Sun Dec  7 03:54:04 1997
+++ gcc/config/linux-aout.h	Fri May  1 10:54:14 1998
@@ -36,6 +36,9 @@
 #undef STARTFILE_SPEC
 #define STARTFILE_SPEC  "%{pg:gcrt0.o%s} %{!pg:%{p:gcrt0.o%s} %{!p:crt0.o%s}} %{static:-static}"
 
+#undef ASM_COMMENT_START
+#define ASM_COMMENT_START "#"
+
 #undef ASM_APP_ON
 #define ASM_APP_ON "#APP\n"
 


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~1998-05-14 15:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-04-30 22:29 ASM_COMMENT_START and gas divide operator 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
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

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).