[Bug target/31403] wrong branch instructions generated with -m2a on sh-elf

2010-12-14 Thread kkojima at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31403

--- Comment #9 from Kazumoto Kojima  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.


[Bug target/31403] wrong branch instructions generated with -m2a on sh-elf

2010-12-14 Thread Stephen.Bartlett at opentv dot com
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


[Bug target/31403] wrong branch instructions generated with -m2a on sh-elf

2007-04-29 Thread kkojima at gcc dot gnu dot org


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



[Bug target/31403] wrong branch instructions generated with -m2a on sh-elf

2007-04-25 Thread kkojima at gcc dot gnu dot org


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



[Bug target/31403] wrong branch instructions generated with -m2a on sh-elf

2007-04-23 Thread kkojima at gcc dot gnu dot org


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



[Bug target/31403] wrong branch instructions generated with -m2a on sh-elf

2007-04-23 Thread kkojima at gcc dot gnu dot org


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



[Bug target/31403] wrong branch instructions generated with -m2a on sh-elf

2007-04-22 Thread chrbr at gcc dot gnu dot org


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



[Bug target/31403] wrong branch instructions generated with -m2a on sh-elf

2007-04-20 Thread kkojima at gcc dot gnu dot org


--- 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.0 +0900
+++ LOCAL/trunk/gcc/config/sh/sh.md 2007-04-19 20:36:20.0 +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|-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