public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/17171] New: Unrecognized comments in generated asm
@ 2004-08-24 15:59 Richard dot Kreckel at Framatome-ANP dot com
  2004-08-24 16:02 ` [Bug target/17171] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Richard dot Kreckel at Framatome-ANP dot com @ 2004-08-24 15:59 UTC (permalink / raw)
  To: gcc-bugs

$ i386-aout-gcc -v
Reading specs from /data/scratch/bugprefix/lib/gcc/i386-aout/3.5.0/specs
Configured with: ../configure --prefix=/data/scratch/bugprefix --disable-nls
--target=i386-aout
Thread model: single
gcc version 3.5.0 20040822 (experimental)
$ cat noop.c
int noop(int x)
{
    return x;
}
$ i386-aout-gcc -c -fverbose-asm noop.c
/tmp/ccPuH6QY.s: Assembler messages:
/tmp/ccPuH6QY.s:18: Error: junk `/' after register
/tmp/ccPuH6QY.s:19: Error: junk `/' after register
/tmp/ccPuH6QY.s:20: Error: junk `/x' after register
$ i386-aout-gcc -S -fverbose-asm noop.c
$ cat noop.s
        .file   "noop.c"
/ GNU C version 3.5.0 20040822 (experimental) (i386-aout)
/       compiled by GNU C version 3.2.
/ GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
/ options passed:  -auxbase -fverbose-asm
/ options enabled:  -falign-loops -fargument-alias -fbranch-count-reg
/ -fcommon -feliminate-unused-debug-types -ffunction-cse -fgcse-las
/ -fgcse-lm -fgcse-sm -fident -fkeep-static-consts -fleading-underscore
/ -floop-optimize2 -fmath-errno -fpcc-struct-return -fpeephole
/ -fsched-interblock -fsched-spec -fsched-stalled-insns-dep -ftree-lim
/ -ftree-loop-optimize -fverbose-asm -fzero-initialized-in-bss -m80387
/ -mhard-float -mno-soft-float -mieee-fp -mfp-ret-in-387 -mno-red-zone
/ -mtune=i386 -march=i386

        .text
.globl _noop
_noop:
        pushl   %ebp    /
        movl    %esp, %ebp      /,
        movl    8(%ebp), %eax   / x, T.0
        leave
        ret
$ i386-aout-as -o noop.o noop.s
noop.s: Assembler messages:
noop.s:18: Error: junk `/' after register
noop.s:19: Error: junk `/' after register
noop.s:20: Error: junk `/x' after register
$ i386-aout-as --version
GNU assembler 2.15
Copyright 2002 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.
This assembler was configured for a target of `i386-aout'.

This is because gas doesn't like the slash as comment introducer.  It
prefers a hashmark.  This problem goes back to at least gcc 3.1.1.  Or is it
rather a binutils bug?

The patch for GCC I suggested last year does still work as of current mainline:
<http://gcc.gnu.org/ml/gcc-patches/2003-09/msg01562.html>.

-- 
           Summary: Unrecognized comments in generated asm
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: Richard dot Kreckel at Framatome-ANP dot com
                CC: gcc-bugs at gcc dot gnu dot org,hjl at lucon dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i386-aout


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17171


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

* [Bug target/17171] Unrecognized comments in generated asm
  2004-08-24 15:59 [Bug target/17171] New: Unrecognized comments in generated asm Richard dot Kreckel at Framatome-ANP dot com
@ 2004-08-24 16:02 ` pinskia at gcc dot gnu dot org
  2004-08-24 16:03 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-24 16:02 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  GCC build triplet|i686-pc-linux-gnu           |
   GCC host triplet|i686-pc-linux-gnu           |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17171


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

* [Bug target/17171] Unrecognized comments in generated asm
  2004-08-24 15:59 [Bug target/17171] New: Unrecognized comments in generated asm Richard dot Kreckel at Framatome-ANP dot com
  2004-08-24 16:02 ` [Bug target/17171] " pinskia at gcc dot gnu dot org
@ 2004-08-24 16:03 ` pinskia at gcc dot gnu dot org
  2004-08-25  7:31 ` Richard dot Kreckel at Framatome-ANP dot com
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-24 16:03 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-08-24 16:03 -------
a.out format tradditionally used / as the comment indicator so ...

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17171


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

* [Bug target/17171] Unrecognized comments in generated asm
  2004-08-24 15:59 [Bug target/17171] New: Unrecognized comments in generated asm Richard dot Kreckel at Framatome-ANP dot com
  2004-08-24 16:02 ` [Bug target/17171] " pinskia at gcc dot gnu dot org
  2004-08-24 16:03 ` pinskia at gcc dot gnu dot org
@ 2004-08-25  7:31 ` Richard dot Kreckel at Framatome-ANP dot com
  2004-08-26  4:42 ` cvs-commit at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Richard dot Kreckel at Framatome-ANP dot com @ 2004-08-25  7:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From Richard dot Kreckel at Framatome-ANP dot com  2004-08-25 07:30 -------
What about coff, then?  I just built a toolchain consisting of binutils 2.15 and
gcc-3.3.3 with target i386-coff and run into exactly the same problem with '/'
not being recognized by the assembler.  (The original patch would also have
fixed that.)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17171


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

* [Bug target/17171] Unrecognized comments in generated asm
  2004-08-24 15:59 [Bug target/17171] New: Unrecognized comments in generated asm Richard dot Kreckel at Framatome-ANP dot com
                   ` (2 preceding siblings ...)
  2004-08-25  7:31 ` Richard dot Kreckel at Framatome-ANP dot com
@ 2004-08-26  4:42 ` cvs-commit at gcc dot gnu dot org
  2004-08-26  4:42 ` wilson at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-08-26  4:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-08-26 04:42 -------
Subject: Bug 17171

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	wilson@gcc.gnu.org	2004-08-26 04:42:06

Modified files:
	gcc            : ChangeLog 
	gcc/config/i386: gas.h 

Log message:
	Patch from Richard B Kreckel.
	PR target/17171
	* config/i386/gas.h (ASM_COMMENT_START): Define to "#".

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5100&r2=2.5101
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/gas.h.diff?cvsroot=gcc&r1=1.23&r2=1.24



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17171


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

* [Bug target/17171] Unrecognized comments in generated asm
  2004-08-24 15:59 [Bug target/17171] New: Unrecognized comments in generated asm Richard dot Kreckel at Framatome-ANP dot com
                   ` (3 preceding siblings ...)
  2004-08-26  4:42 ` cvs-commit at gcc dot gnu dot org
@ 2004-08-26  4:42 ` wilson at gcc dot gnu dot org
  2004-08-26  4:55 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: wilson at gcc dot gnu dot org @ 2004-08-26  4:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From wilson at gcc dot gnu dot org  2004-08-26 04:41 -------
Gas makes a distinction between line comment characters, characters that start a
comment if they are the first character or a line, and comment characters,
characters that start a comment anywhere.  Characters which are part of the
assembly syntax can be line comment characters, but not comment characters.

Depending on the configuration, gas supports either / or \ as a prefix
separator.  That is one of "repe/cmpsb" or "repe\cmpsb" will be accepted.  If /
is the prefix separator, then / can be a line comment character, but not a
comment character.  This is the case for aout/coff/linux/netbsd/freebsd and a
few others.

Thus normal gcc comments that start at the beginning of a line can use / as a
line comment character, but the comments emitted by -fverbose-asm which come at
the end can not.

Regardless of how gas is configured, # is always a comment character.  Thus it
is always safe to use # if the target uses gas.  It probably isn't safe to make
the same assumption for other assemblers, even if -fverbose-asm is broken for them.

I have added the patch to mainline.

This was broken in gcc-3.1, when -fverbose-asm was extended to emit asm operand
info after each asm line.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-08-26 04:42:00
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17171


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

* [Bug target/17171] Unrecognized comments in generated asm
  2004-08-24 15:59 [Bug target/17171] New: Unrecognized comments in generated asm Richard dot Kreckel at Framatome-ANP dot com
                   ` (4 preceding siblings ...)
  2004-08-26  4:42 ` wilson at gcc dot gnu dot org
@ 2004-08-26  4:55 ` pinskia at gcc dot gnu dot org
  2004-08-29 18:05 ` [Bug target/17171] [3.3/3.4 Regression] " mmitchel at gcc dot gnu dot org
  2004-11-09 13:25 ` reichelt at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-26  4:55 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
      Known to fail|                            |3.4.0
      Known to work|                            |3.5.0
   Target Milestone|---                         |3.4.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17171


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

* [Bug target/17171] [3.3/3.4 Regression] Unrecognized comments in generated asm
  2004-08-24 15:59 [Bug target/17171] New: Unrecognized comments in generated asm Richard dot Kreckel at Framatome-ANP dot com
                   ` (5 preceding siblings ...)
  2004-08-26  4:55 ` pinskia at gcc dot gnu dot org
@ 2004-08-29 18:05 ` mmitchel at gcc dot gnu dot org
  2004-11-09 13:25 ` reichelt at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-08-29 18:05 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-08-29 18:05 -------
Fixed in GCC 3.5; will-not-fix in GCC 3.4.x.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17171


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

* [Bug target/17171] [3.3/3.4 Regression] Unrecognized comments in generated asm
  2004-08-24 15:59 [Bug target/17171] New: Unrecognized comments in generated asm Richard dot Kreckel at Framatome-ANP dot com
                   ` (6 preceding siblings ...)
  2004-08-29 18:05 ` [Bug target/17171] [3.3/3.4 Regression] " mmitchel at gcc dot gnu dot org
@ 2004-11-09 13:25 ` reichelt at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-11-09 13:25 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|4.0 3.0                     |4.0.0 3.0
   Target Milestone|3.4.2                       |4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17171


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

end of thread, other threads:[~2004-11-09 13:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-24 15:59 [Bug target/17171] New: Unrecognized comments in generated asm Richard dot Kreckel at Framatome-ANP dot com
2004-08-24 16:02 ` [Bug target/17171] " pinskia at gcc dot gnu dot org
2004-08-24 16:03 ` pinskia at gcc dot gnu dot org
2004-08-25  7:31 ` Richard dot Kreckel at Framatome-ANP dot com
2004-08-26  4:42 ` cvs-commit at gcc dot gnu dot org
2004-08-26  4:42 ` wilson at gcc dot gnu dot org
2004-08-26  4:55 ` pinskia at gcc dot gnu dot org
2004-08-29 18:05 ` [Bug target/17171] [3.3/3.4 Regression] " mmitchel at gcc dot gnu dot org
2004-11-09 13:25 ` reichelt at gcc dot gnu dot org

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