| Summary: | [tree-ssa] Bad assembly code produced when compiling glibc | ||
|---|---|---|---|
| Product: | gcc | Reporter: | Brian Booth <bbooth> |
| Component: | rtl-optimization | Assignee: | Not yet assigned to anyone <unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | critical | CC: | gcc-bugs |
| Priority: | P2 | Keywords: | wrong-code |
| Version: | tree-ssa | ||
| Target Milestone: | tree-ssa | ||
| Host: | Target: | x86_64-unknown-linux-gnu | |
| Build: | Known to work: | ||
| Known to fail: | Last reconfirmed: | ||
| Attachments: |
Associated .i file
The assembly code causing the errors. Associated .i file The bad assembly code. |
||
Created attachment 5074 [details]
Associated .i file
Created attachment 5075 [details]
The assembly code causing the errors.
This is not a gcc problem from the source:
".if 1 - \\name\n\t"
Report it to glibc.
Subject: Re: [tree-ssa] Bad assembly code produced
when compiling glibc
On Thu, 2003-11-06 at 15:28, pinskia at gcc dot gnu dot org wrote:
> This is not a gcc problem from the source:
> ".if 1 - \\name\n\t"
> Report it to glibc.
>
Hmm, we don't get this problem with gcc 3.2. Is this something we've
deprecated since then?
Diego.
I take that back, I needed to look into the asm a little more: bpushl .L__X'$0, $0 bmovl .L__X'$0, $0 movl $72, %eax int $0x80 bpopl .L__X'$0, $0 %k2 == $0? Still valid as "C" constraint, I think glibc wanted "c" here instead (and maybe "d" instead of "D"): Specifies constant that can be easily constructed in SSE register without loading it from memory. From the source: "aCD" (0) Created attachment 5088 [details]
Associated .i file
Created attachment 5089 [details]
The bad assembly code.
What about this case...
GCC version:
gcc (GCC) 3.5-tree-ssa 20031107 (merged 20031026)
GCC configure options:
--prefix=/notnfs/bbooth/tree-ssa/x86_64/inst
--srcdir=/notnfs/bbooth/tree-ssa/gcc
--disable-multilib
Command line & compiler/assembler output:
/notnfs/bbooth/tree-ssa/x86_64/inst/libexec/gcc/x86_64-unknown-linux-gnu/3.5-tree-ssa/cc1
-fpreprocessed l10nflist.i -quiet -dumpbase l10nflist.c -mtune=k8 -auxbase-strip
/home/bbooth/tree-ssa/build/x86_64/GLIBC/intl/l10nflist.o -O2 -Wall -Winline
-Wstrict-prototypes -Wwrite-strings -std=gnu99 -version -ftime-report -o l10nflist.s
GNU C version 3.5-tree-ssa 20031107 (merged 20031026) (x86_64-unknown-linux-gnu)
compiled by GNU C version 3.5-tree-ssa 20031107 (merged 20031026).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Execution times (seconds)
garbage collection : 0.02 (12%) usr 0.00 ( 0%) sys 0.02 (11%) wall
callgraph construction: 0.00 ( 0%) usr 0.00 ( 0%) sys 0.01 ( 6%) wall
life analysis : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.01 ( 6%) wall
life info update : 0.01 ( 6%) usr 0.00 ( 0%) sys 0.00 ( 0%) wall
alias analysis : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.02 (11%) wall
register scan : 0.01 ( 6%) usr 0.00 ( 0%) sys 0.00 ( 0%) wall
preprocessing : 0.01 ( 6%) usr 0.00 ( 0%) sys 0.02 (11%) wall
lexical analysis : 0.03 (18%) usr 0.00 ( 0%) sys 0.01 ( 6%) wall
parser : 0.02 (12%) usr 0.00 ( 0%) sys 0.03 (17%) wall
tree CFG construction : 0.01 ( 6%) usr 0.00 ( 0%) sys 0.00 ( 0%) wall
tree CFG cleanup : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.01 ( 6%) wall
tree thread jumps : 0.01 ( 6%) usr 0.00 ( 0%) sys 0.00 ( 0%) wall
expand : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.01 ( 6%) wall
CSE : 0.01 ( 6%) usr 0.00 ( 0%) sys 0.01 ( 6%) wall
loop analysis : 0.01 ( 6%) usr 0.00 ( 0%) sys 0.00 ( 0%) wall
flow analysis : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.01 ( 6%) wall
combiner : 0.01 ( 6%) usr 0.00 ( 0%) sys 0.01 ( 6%) wall
if-conversion : 0.01 ( 6%) usr 0.00 ( 0%) sys 0.00 ( 0%) wall
scheduling 2 : 0.01 ( 6%) usr 0.00 ( 0%) sys 0.00 ( 0%) wall
TOTAL : 0.17 0.01 0.18
as -V -Qy -o /home/bbooth/tree-ssa/build/x86_64/GLIBC/intl/l10nflist.o l10nflist.s
GNU assembler version 2.14.90.0.4 (x86_64-redhat-linux) using BFD version
2.14.90.0.4 20030523
l10nflist.s: Assembler messages:
l10nflist.s:406: Error: Incorrect register `%rax' used with `l' suffix
Either a machine description problem or a miscompiling something generated from the *.md files. Fixed on mainline by http://gcc.gnu.org/ml/gcc-patches/2004-01/msg01612.html |
GCC version: gcc (GCC) 3.5-tree-ssa 20031106 (merged 20031026) GCC configure options: --prefix=/notnfs/bbooth/tree-ssa/i686/inst --srcdir=/notnfs/bbooth/tree-ssa/gcc --disable-multilib Command line & compiler/assembler output: /notnfs/bbooth/tree-ssa/i686/inst/libexec/gcc/i686-pc-linux-gnu/3.5-tree-ssa/cc1 -fpreprocessed sigsuspend.i -quiet -dumpbase sigsuspend.c -mtune=pentiumpro -auxbase-strip /home/bbooth/tree-ssa/build/i686/GLIBC/signal/sigsuspend.o -O2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -version -ftime-report -o sigsuspend.s GNU C version 3.5-tree-ssa 20031106 (merged 20031026) (i686-pc-linux-gnu) compiled by GNU C version 3.5-tree-ssa 20031106 (merged 20031026). GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 Execution times (seconds) lexical analysis : 0.01 (14%) usr 0.00 ( 0%) sys 0.01 (11%) wall parser : 0.02 (29%) usr 0.00 ( 0%) sys 0.02 (22%) wall tree gimplify : 0.01 (14%) usr 0.00 ( 0%) sys 0.01 (11%) wall bypass jumps : 0.01 (14%) usr 0.00 ( 0%) sys 0.01 (11%) wall symout : 0.01 (14%) usr 0.00 ( 0%) sys 0.01 (11%) wall TOTAL : 0.07 0.02 0.09 as -V -Qy -o /home/bbooth/tree-ssa/build/i686/GLIBC/signal/sigsuspend.o sigsuspend.s GNU assembler version 2.14.90.0.4 (i386-redhat-linux) using BFD version 2.14.90.0.4 20030523 sigsuspend.s: Assembler messages: sigsuspend.s:83: Error: non-constant expression in ".if" statement sigsuspend.s:84: Error: non-constant expression in ".if" statement sigsuspend.s:87: Error: non-constant expression in ".if" statement ============== .i file to come.