public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/31403] New: Problem while compiling gcc for sh-elf
@ 2007-03-30 17:43 mstein at phenix dot rootshell dot be
2007-03-30 18:15 ` [Bug target/31403] " mstein at phenix dot rootshell dot be
` (6 more replies)
0 siblings, 7 replies; 10+ messages in thread
From: mstein at phenix dot rootshell dot be @ 2007-03-30 17:43 UTC (permalink / raw)
To: gcc-bugs
Hello,
there seems to be a gcc problem with the target 'sh-elf':
/home/mstein/sim/sh-elf/build/./gcc/xgcc -B/home/mstein/sim/sh-elf/build/./gcc/
-nostdinc -B/home/mstein/sim/sh-elf/build/sh-elf/newlib/ -isystem
/home/mstein/sim/sh-elf/build/sh-elf/newlib/targ-include -isystem
/n/07/mstein/combined-trunk/newlib/libc/include
-B/n/07/mstein/cross-local/sh-elf-new/sh-elf/bin/
-B/n/07/mstein/cross-local/sh-elf-new/sh-elf/lib/ -isystem
/n/07/mstein/cross-local/sh-elf-new/sh-elf/include -isystem
/n/07/mstein/cross-local/sh-elf-new/sh-elf/sys-include
-L/home/mstein/sim/sh-elf/build/./ld -DPACKAGE_NAME=\"newlib\"
-DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"1.15.0\"
-DPACKAGE_STRING=\"newlib\ 1.15.0\" -DPACKAGE_BUGREPORT=\"\" -I.
-I/n/07/mstein/combined-trunk/newlib/libc/stdio -O2 -fno-builtin -O2 -g
-O2 -m2a -fshort-enums -DINTEGER_ONLY -c
/n/07/mstein/combined-trunk/newlib/libc/stdio/vfprintf.c -o lib_a-vfiprintf.o
/tmp/cckWXaXf.s: Assembler messages:
/tmp/cckWXaXf.s:456: Error: displacement to defined symbol .L432 overflows
12-bit field
/tmp/cckWXaXf.s:2993: Error: displacement to defined symbol .L407 overflows
12-bit field
/tmp/cckWXaXf.s:3157: Error: displacement to defined symbol .L799 overflows
12-bit field
/tmp/cckWXaXf.s:3606: Error: displacement to defined symbol .L198 overflows
12-bit field
make[8]: *** [lib_a-vfiprintf.o] Error 1
The SVN revision was 123344.
--
Summary: Problem while compiling gcc for sh-elf
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mstein at phenix dot rootshell dot be
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: sh-elf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31403
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/31403] Problem while compiling gcc for sh-elf
2007-03-30 17:43 [Bug target/31403] New: Problem while compiling gcc for sh-elf mstein at phenix dot rootshell dot be
@ 2007-03-30 18:15 ` mstein at phenix dot rootshell dot be
2007-04-20 7:46 ` [Bug target/31403] wrong branch instructions generated with -m2a on sh-elf kkojima at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: mstein at phenix dot rootshell dot be @ 2007-03-30 18:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from mstein at phenix dot rootshell dot be 2007-03-30 19:15 -------
Created an attachment (id=13303)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13303&action=view)
preprocessed source file
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31403
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/31403] wrong branch instructions generated with -m2a on sh-elf
2007-03-30 17:43 [Bug target/31403] New: Problem while compiling gcc for sh-elf mstein at phenix dot rootshell dot be
2007-03-30 18:15 ` [Bug target/31403] " mstein at phenix dot rootshell dot be
@ 2007-04-20 7:46 ` kkojima at gcc dot gnu dot org
2007-04-23 6:59 ` chrbr at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: kkojima at gcc dot gnu dot org @ 2007-04-20 7:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from kkojima at gcc dot gnu dot org 2007-04-20 08:45 -------
A binary search shows that this started to fail from
the revision 123295
* config/sh/sh.md (movsi_ie): Fix memory constraints attribute length.
I'd like to add Christian to the cc list because he must be interested
in this issue. movsi_ie is used also for SH2A and I didn't know that
SH2A has 4-byte move instructions like mov.l reg,@(12-bit_disp,reg').
An easy fix would be the patch below, though I can't test it until
the other bootstrap/regtest cycles end up.
--- ORIG/trunk/gcc/config/sh/sh.md 2007-03-29 08:44:33.000000000 +0900
+++ LOCAL/trunk/gcc/config/sh/sh.md 2007-04-19 20:36:20.000000000 +0900
@@ -4968,7 +4968,36 @@ label:
! move optimized away"
[(set_attr "type"
"pcload_si,move,movi8,move,*,load_si,mac_gp,prget,arith,store,mac_mem,pstore,gp_mac,prset,mem_mac,pload,load,fstore,pcload_si,gp_fpul,fpul_gp,fmove,fmove,fmove,nil")
(set_attr "late_fp_use"
"*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,yes,*,*,yes,*,*,*,*")
- (set_attr "length" "*,*,*,4,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,0")])
+ (set_attr_alternative "length"
+ [(const_int 2)
+ (const_int 2)
+ (const_int 2)
+ (const_int 4)
+ (const_int 2)
+ (if_then_else
+ (ne (symbol_ref "TARGET_SH2A") (const_int 0))
+ (const_int 4) (const_int 2))
+ (const_int 2)
+ (const_int 2)
+ (const_int 2)
+ (if_then_else
+ (ne (symbol_ref "TARGET_SH2A") (const_int 0))
+ (const_int 4) (const_int 2))
+ (const_int 2)
+ (const_int 2)
+ (const_int 2)
+ (const_int 2)
+ (const_int 2)
+ (const_int 2)
+ (const_int 2)
+ (const_int 2)
+ (const_int 2)
+ (const_int 2)
+ (const_int 2)
+ (const_int 2)
+ (const_int 2)
+ (const_int 2)
+ (const_int 0)])])
(define_insn "movsi_i_lowpart"
[(set (strict_low_part (match_operand:SI 0 "general_movdst_operand"
"+r,r,r,r,r,r,r,m,r"))
--
kkojima at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kkojima at gcc dot gnu dot
| |org, christian dot bruel at
| |st dot com
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-04-20 08:45:54
date| |
Summary|Problem while compiling gcc |wrong branch instructions
|for sh-elf |generated with -m2a on sh-
| |elf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31403
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/31403] wrong branch instructions generated with -m2a on sh-elf
2007-03-30 17:43 [Bug target/31403] New: Problem while compiling gcc for sh-elf mstein at phenix dot rootshell dot be
2007-03-30 18:15 ` [Bug target/31403] " mstein at phenix dot rootshell dot be
2007-04-20 7:46 ` [Bug target/31403] wrong branch instructions generated with -m2a on sh-elf kkojima at gcc dot gnu dot org
@ 2007-04-23 6:59 ` chrbr at gcc dot gnu dot org
2007-04-23 8:53 ` kkojima at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: chrbr at gcc dot gnu dot org @ 2007-04-23 6:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from chrbr at gcc dot gnu dot org 2007-04-23 07:59 -------
Hi Kaj,
The same problem seems to transpire from the movsf_ie pattern for the sh2a-fpu
that also have 32 bit memory instructions. So your fix also applies there.
Note that traditional sh memory move instructions can also have a length of 2
so your fix is conservative (but not more than the previous code). Shouldn't
the new 4 bytes instructions be described latter with a new memory constraint ?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31403
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/31403] wrong branch instructions generated with -m2a on sh-elf
2007-03-30 17:43 [Bug target/31403] New: Problem while compiling gcc for sh-elf mstein at phenix dot rootshell dot be
` (2 preceding siblings ...)
2007-04-23 6:59 ` chrbr at gcc dot gnu dot org
@ 2007-04-23 8:53 ` kkojima at gcc dot gnu dot org
2007-04-23 22:43 ` kkojima at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: kkojima at gcc dot gnu dot org @ 2007-04-23 8:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from kkojima at gcc dot gnu dot org 2007-04-23 09:53 -------
> The same problem seems to transpire from the movsf_ie pattern for the sh2a-fpu
> that also have 32 bit memory instructions. So your fix also applies there.
Ah, thanks! I'll add movsf_ie part when I return to this problem.
> Shouldn't the new 4 bytes instructions be described latter with a new memory constraint ?
Maybe, though I'm not sure if it's worth to effort. Of course,
it'd be interesting to collect some numbers with such a change.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31403
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/31403] wrong branch instructions generated with -m2a on sh-elf
2007-03-30 17:43 [Bug target/31403] New: Problem while compiling gcc for sh-elf mstein at phenix dot rootshell dot be
` (3 preceding siblings ...)
2007-04-23 8:53 ` kkojima at gcc dot gnu dot org
@ 2007-04-23 22:43 ` kkojima at gcc dot gnu dot org
2007-04-26 0:30 ` kkojima at gcc dot gnu dot org
2007-04-29 12:41 ` kkojima at gcc dot gnu dot org
6 siblings, 0 replies; 10+ messages in thread
From: kkojima at gcc dot gnu dot org @ 2007-04-23 22:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from kkojima at gcc dot gnu dot org 2007-04-23 23:43 -------
Created an attachment (id=13433)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13433&action=view)
proposed patch
I'm testing this now.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31403
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/31403] wrong branch instructions generated with -m2a on sh-elf
2007-03-30 17:43 [Bug target/31403] New: Problem while compiling gcc for sh-elf mstein at phenix dot rootshell dot be
` (4 preceding siblings ...)
2007-04-23 22:43 ` kkojima at gcc dot gnu dot org
@ 2007-04-26 0:30 ` kkojima at gcc dot gnu dot org
2007-04-29 12:41 ` kkojima at gcc dot gnu dot org
6 siblings, 0 replies; 10+ messages in thread
From: kkojima at gcc dot gnu dot org @ 2007-04-26 0:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from kkojima at gcc dot gnu dot org 2007-04-26 01:30 -------
Subject: Bug 31403
Author: kkojima
Date: Thu Apr 26 01:29:54 2007
New Revision: 124171
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124171
Log:
PR target/31403
* config/sh/sh.md (movsi_ie): Fix length for TARGET_SH2A.
(movsf_ie): Likewise.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/sh/sh.md
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31403
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/31403] wrong branch instructions generated with -m2a on sh-elf
2007-03-30 17:43 [Bug target/31403] New: Problem while compiling gcc for sh-elf mstein at phenix dot rootshell dot be
` (5 preceding siblings ...)
2007-04-26 0:30 ` kkojima at gcc dot gnu dot org
@ 2007-04-29 12:41 ` kkojima at gcc dot gnu dot org
6 siblings, 0 replies; 10+ messages in thread
From: kkojima at gcc dot gnu dot org @ 2007-04-29 12:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from kkojima at gcc dot gnu dot org 2007-04-29 13:41 -------
Fixed.
--
kkojima at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31403
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/31403] wrong branch instructions generated with -m2a on sh-elf
[not found] <bug-31403-4@http.gcc.gnu.org/bugzilla/>
2010-12-14 19:48 ` Stephen.Bartlett at opentv dot com
@ 2010-12-15 0:36 ` kkojima at gcc dot gnu.org
1 sibling, 0 replies; 10+ messages in thread
From: kkojima at gcc dot gnu.org @ 2010-12-15 0:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31403
--- Comment #9 from Kazumoto Kojima <kkojima at gcc dot gnu.org> 2010-12-15 00:36:39 UTC ---
(In reply to comment #8)
> I am getting the same error using gcc 4.4.5 20101112 (Red Hat 4.4.5-2),
> with Fedora 13 on an 64 bit machine/OS.
Which version of gcc do you use for source? gcc 4.4.5 20101112
(Red Hat 4.4.5-2) looks your host compiler.
If you use gcc-4.4.5 as a source for sh-elf cross compiler, it has
the fix in #6. In that case, even you've got the strictly same
error messages in the original report against newlib's vfprintf.c,
it would be a different problem.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/31403] wrong branch instructions generated with -m2a on sh-elf
[not found] <bug-31403-4@http.gcc.gnu.org/bugzilla/>
@ 2010-12-14 19:48 ` Stephen.Bartlett at opentv dot com
2010-12-15 0:36 ` kkojima at gcc dot gnu.org
1 sibling, 0 replies; 10+ messages in thread
From: Stephen.Bartlett at opentv dot com @ 2010-12-14 19:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31403
--- Comment #8 from Stephen.Bartlett at opentv dot com 2010-12-14 19:48:20 UTC ---
I am getting the same error using gcc 4.4.5 20101112 (Red Hat 4.4.5-2),
with Fedora 13 on an 64 bit machine/OS.
Are you aware of a solution, or any limitations using a 64-bit OS ?
Thanks
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2010-12-15 0:36 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-30 17:43 [Bug target/31403] New: Problem while compiling gcc for sh-elf mstein at phenix dot rootshell dot be
2007-03-30 18:15 ` [Bug target/31403] " mstein at phenix dot rootshell dot be
2007-04-20 7:46 ` [Bug target/31403] wrong branch instructions generated with -m2a on sh-elf kkojima at gcc dot gnu dot org
2007-04-23 6:59 ` chrbr at gcc dot gnu dot org
2007-04-23 8:53 ` kkojima at gcc dot gnu dot org
2007-04-23 22:43 ` kkojima at gcc dot gnu dot org
2007-04-26 0:30 ` kkojima at gcc dot gnu dot org
2007-04-29 12:41 ` kkojima at gcc dot gnu dot org
[not found] <bug-31403-4@http.gcc.gnu.org/bugzilla/>
2010-12-14 19:48 ` Stephen.Bartlett at opentv dot com
2010-12-15 0:36 ` kkojima 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).