public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/51552] New: bfin generates bad assembly
@ 2011-12-14 19:21 joel at gcc dot gnu.org
2011-12-17 3:29 ` [Bug target/51552] " jiez at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: joel at gcc dot gnu.org @ 2011-12-14 19:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51552
Bug #: 51552
Summary: bfin generates bad assembly
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: joel@gcc.gnu.org
Created attachment 26085
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26085
Preprocessed test case
xgcc (GCC) 4.7.0 20111214 (experimental) [trunk revision 182330]
Target: bfin-rtems4.11 compiling newlib
/home2/joel/build/b-bfin-gcc/./gcc/xgcc -B/home2/joel/build/b-bfin-gcc/./gcc/
-nostdinc -B/home2/joel/build/b-bfin-gcc/bfin-rtems4.11/newlib/ -isystem
/home2/joel/build/b-bfin-gcc/bfin-rtems4.11/newlib/targ-include -isystem
/users/joel/test-gcc/gcc-svn/newlib/libc/include
-B/users/joel/test-gcc/install-svn/bfin-rtems4.11/bin/
-B/users/joel/test-gcc/install-svn/bfin-rtems4.11/lib/ -isystem
/users/joel/test-gcc/install-svn/bfin-rtems4.11/include -isystem
/users/joel/test-gcc/install-svn/bfin-rtems4.11/sys-include
-DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\"
-DPACKAGE_VERSION=\"1.19.0\" -DPACKAGE_STRING=\"newlib\ 1.19.0\"
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I.
-I/users/joel/test-gcc/gcc-svn/newlib/libc/string -D_COMPILING_NEWLIB
-DMALLOC_PROVIDED -DEXIT_PROVIDED -DSIGNAL_PROVIDED
-DREENTRANT_SYSCALLS_PROVIDED -DHAVE_NANOSLEEP -DHAVE_BLKSIZE -DHAVE_FCNTL
-DHAVE_ASSERT_FUNC -D_NO_GETLOGIN -D_NO_GETPWENT -D_NO_GETUT -D_NO_GETPASS
-D_NO_SIGSET -D_NO_WORDEXP -D_NO_POPEN -Wall -fno-builtin -g -O2 -c -o
lib_a-strsignal.o `test -f 'strsignal.c' || echo
'/users/joel/test-gcc/gcc-svn/newlib/libc/string/'`strsignal.c
/tmp/cctEZ5VY.s: Assembler messages:
/tmp/cctEZ5VY.s:24: Error: syntax error. Input text was .LCFI1.
/tmp/cctEZ5VY.s:24: Error:
Cutting this down, it appears to be the -g flag:
[joel@rtbf64a string]$ /home2/joel/build/b-bfin-gcc/./gcc/xgcc
-B/home2/joel/build/b-bfin-gcc/./gcc/ -O2 -c -fno-builtin j.c
[joel@rtbf64a string]$ /home2/joel/build/b-bfin-gcc/./gcc/xgcc
-B/home2/joel/build/b-bfin-gcc/./gcc/ -O2 -c -g -fno-builtin j.c
/tmp/ccwaXpNe.s: Assembler messages:
/tmp/ccwaXpNe.s:24: Error: syntax error. Input text was .LCFI1.
/tmp/ccwaXpNe.s:24: Error:
The bad asm generated is here:
.LCFI0:
R2 = ROT R0 BY 0 ||
.LCFI1:
R7 = [P2] ||
nop;
I am guessing there should have been a semi-colon and maybe a nop before
.LCFI1.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/51552] bfin generates bad assembly
2011-12-14 19:21 [Bug target/51552] New: bfin generates bad assembly joel at gcc dot gnu.org
@ 2011-12-17 3:29 ` jiez at gcc dot gnu.org
2011-12-21 5:09 ` jiez at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jiez at gcc dot gnu.org @ 2011-12-17 3:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51552
Jie Zhang <jiez at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011-12-17
CC| |jiez at gcc dot gnu.org
Ever Confirmed|0 |1
--- Comment #1 from Jie Zhang <jiez at gcc dot gnu.org> 2011-12-17 03:06:37 UTC ---
This was caused by r177218 for PR target/49864.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/51552] bfin generates bad assembly
2011-12-14 19:21 [Bug target/51552] New: bfin generates bad assembly joel at gcc dot gnu.org
2011-12-17 3:29 ` [Bug target/51552] " jiez at gcc dot gnu.org
@ 2011-12-21 5:09 ` jiez at gcc dot gnu.org
2011-12-21 18:12 ` rth at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jiez at gcc dot gnu.org @ 2011-12-21 5:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51552
--- Comment #2 from Jie Zhang <jiez at gcc dot gnu.org> 2011-12-21 04:35:19 UTC ---
(gdb) p insn
$23 = (rtx) 0x7ffff701b180
(gdb) pr
(parallel [
(unspec [
(const_int -4 [0xfffffffffffffffc])
] 5)
(set/f (mem:SI (plus:SI (reg/f:SI 14 SP)
(const_int -4 [0xfffffffffffffffc])) [0 S4 A32])
(reg:SI 7 R7))
(set/f (reg/f:SI 14 SP)
(plus:SI (reg/f:SI 14 SP)
(const_int -4 [0xfffffffffffffffc])))
Before that commit, dwarf2out_frame_debug_expr (insn) will set any_cfis_emitted
in dwarf2out_frame_debug, which will cause dwarf2out_flush_queued_reg_saves to
emit the CFI. But after that commit, dwarf2out_frame_debug_expr (insn) will not
set any_cfis_emitted.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/51552] bfin generates bad assembly
2011-12-14 19:21 [Bug target/51552] New: bfin generates bad assembly joel at gcc dot gnu.org
2011-12-17 3:29 ` [Bug target/51552] " jiez at gcc dot gnu.org
2011-12-21 5:09 ` jiez at gcc dot gnu.org
@ 2011-12-21 18:12 ` rth at gcc dot gnu.org
2011-12-21 18:15 ` rth at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rth at gcc dot gnu.org @ 2011-12-21 18:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51552
Richard Henderson <rth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rth at gcc dot gnu.org
--- Comment #3 from Richard Henderson <rth at gcc dot gnu.org> 2011-12-21 17:51:30 UTC ---
Well, honestly the largest problem is that the bfin backend is
emitting bundles in a way that can't be split, but in separate insns.
The ia64 backend handles this case by supporting "debug labels"
in the assembler, which are understood not to break the bundle.
As far as the middle-end is concerned, it's doing absolutely nothing
wrong. I'll see what I can do to restore the kinda-sorta working state
that we had before, but you really ought to fix the backend to not
lie to the middle-end.
Consider implementing debug labels in the assembler. Or failing
that, pack your insn bundles into sequences, or something.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/51552] bfin generates bad assembly
2011-12-14 19:21 [Bug target/51552] New: bfin generates bad assembly joel at gcc dot gnu.org
` (2 preceding siblings ...)
2011-12-21 18:12 ` rth at gcc dot gnu.org
@ 2011-12-21 18:15 ` rth at gcc dot gnu.org
2011-12-21 20:29 ` rth at gcc dot gnu.org
2011-12-21 20:44 ` rth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rth at gcc dot gnu.org @ 2011-12-21 18:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51552
Richard Henderson <rth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |rth at gcc dot gnu.org
|gnu.org |
--- Comment #4 from Richard Henderson <rth at gcc dot gnu.org> 2011-12-21 18:12:39 UTC ---
Mine. The only thing I'll concede is that this is a debug size
regression from 4.6, as there's an unnecessary advance between
the two cfi opcodes.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/51552] bfin generates bad assembly
2011-12-14 19:21 [Bug target/51552] New: bfin generates bad assembly joel at gcc dot gnu.org
` (3 preceding siblings ...)
2011-12-21 18:15 ` rth at gcc dot gnu.org
@ 2011-12-21 20:29 ` rth at gcc dot gnu.org
2011-12-21 20:44 ` rth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rth at gcc dot gnu.org @ 2011-12-21 20:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51552
--- Comment #5 from Richard Henderson <rth at gcc dot gnu.org> 2011-12-21 20:21:14 UTC ---
Author: rth
Date: Wed Dec 21 20:21:00 2011
New Revision: 182604
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182604
Log:
PR target/51552
* dwarf2cfi.c (dwarf2out_frame_debug): Move any_cfis_emitted code...
(scan_trace): ... here.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/dwarf2cfi.c
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/51552] bfin generates bad assembly
2011-12-14 19:21 [Bug target/51552] New: bfin generates bad assembly joel at gcc dot gnu.org
` (4 preceding siblings ...)
2011-12-21 20:29 ` rth at gcc dot gnu.org
@ 2011-12-21 20:44 ` rth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rth at gcc dot gnu.org @ 2011-12-21 20:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51552
Richard Henderson <rth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.7.0
--- Comment #6 from Richard Henderson <rth at gcc dot gnu.org> 2011-12-21 20:35:52 UTC ---
http://gcc.gnu.org/ml/gcc-patches/2011-12/msg01577.html
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-12-21 20:36 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-14 19:21 [Bug target/51552] New: bfin generates bad assembly joel at gcc dot gnu.org
2011-12-17 3:29 ` [Bug target/51552] " jiez at gcc dot gnu.org
2011-12-21 5:09 ` jiez at gcc dot gnu.org
2011-12-21 18:12 ` rth at gcc dot gnu.org
2011-12-21 18:15 ` rth at gcc dot gnu.org
2011-12-21 20:29 ` rth at gcc dot gnu.org
2011-12-21 20:44 ` rth at gcc dot gnu.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).