public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/35018]  New: [m68k-elf] Gcc ouputs invalid asm when compiling with -O2 or higher
@ 2008-01-29 15:55 nizze86 at hotmail dot com
  2008-01-29 15:57 ` [Bug c/35018] " nizze86 at hotmail dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: nizze86 at hotmail dot com @ 2008-01-29 15:55 UTC (permalink / raw)
  To: gcc-bugs

Using gcc version 4.3.0 20080125 (experimental) (GCC) to crosscompile the
attached file for m68k-elf, I get the following line of asm:

move.l (%a2,%a0.l*4),76(%sp)

which is invalid for the target cpu I have specified. (-mcpu=5249) 

This is my compiler command line:
/rockbox/apps/codecs/Tremor$ /usr/bin/ccache m68k-elf-gcc
-I/home/nils/rockbox/apps -I.. -I. -I/home/nils/rockbox/firmware/include
-I/home/nils/rockbox/firmware/export -I/home/nils/rockbox/firmware/common
-I/home/nils/rockbox/firmware/drivers -I/home/nils/rockbox/gcctest
-I/home/nils/rockbox/apps/recorder -I/home/nils/rockbox/apps/gui -W -Wall
-Wundef -Os -nostdlib -ffreestanding -Wstrict-prototypes -mcpu=5249 -malign-int
-mstrict-align -fomit-frame-pointer
-I/home/nils/rockbox/firmware/target/coldfire/iriver/h300
-I/home/nils/rockbox/firmware/target/coldfire/iriver
-I/home/nils/rockbox/firmware/target/coldfire -O2 -DIRIVER_H300  -DMEM=32
-save-temps  block.c -o /home/nils/rockbox/gcctest/apps/codecs/Tremor/block.o

I used the following switches to configure gcc:

 --target=m68k-elf --prefix=/usr/local/m68k-elf --enable-languages=c
--disable-libssp --with-arch=cf

on my amd64 linux system


-- 
           Summary: [m68k-elf] Gcc ouputs invalid asm when compiling with -
                    O2 or higher
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: nizze86 at hotmail dot com
  GCC host triplet: Linux amd 64
GCC target triplet: m68k-elf


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


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

* [Bug c/35018] [m68k-elf] Gcc ouputs invalid asm when compiling with -O2 or higher
  2008-01-29 15:55 [Bug c/35018] New: [m68k-elf] Gcc ouputs invalid asm when compiling with -O2 or higher nizze86 at hotmail dot com
@ 2008-01-29 15:57 ` nizze86 at hotmail dot com
  2008-01-29 17:40 ` [Bug target/35018] " pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: nizze86 at hotmail dot com @ 2008-01-29 15:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from nizze86 at hotmail dot com  2008-01-29 15:36 -------
Created an attachment (id=15048)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15048&action=view)
Preprocessed sources


-- 


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


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

* [Bug target/35018] [m68k-elf] Gcc ouputs invalid asm when compiling with -O2 or higher
  2008-01-29 15:55 [Bug c/35018] New: [m68k-elf] Gcc ouputs invalid asm when compiling with -O2 or higher nizze86 at hotmail dot com
  2008-01-29 15:57 ` [Bug c/35018] " nizze86 at hotmail dot com
@ 2008-01-29 17:40 ` pinskia at gcc dot gnu dot org
  2008-02-14 17:36 ` schwab at suse dot de
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-01-29 17:40 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
           Severity|major                       |normal


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


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

* [Bug target/35018] [m68k-elf] Gcc ouputs invalid asm when compiling with -O2 or higher
  2008-01-29 15:55 [Bug c/35018] New: [m68k-elf] Gcc ouputs invalid asm when compiling with -O2 or higher nizze86 at hotmail dot com
  2008-01-29 15:57 ` [Bug c/35018] " nizze86 at hotmail dot com
  2008-01-29 17:40 ` [Bug target/35018] " pinskia at gcc dot gnu dot org
@ 2008-02-14 17:36 ` schwab at suse dot de
  2008-10-26 11:27 ` nizze86 at hotmail dot com
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: schwab at suse dot de @ 2008-02-14 17:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from schwab at suse dot de  2008-02-14 17:35 -------
The problem is in the addsi_lshrsi_31 insn:

(define_insn "addsi_lshrsi_31"
  [(set (match_operand:SI 0 "nonimmediate_operand" "=dm")
    (plus:SI (lshiftrt:SI (match_operand:SI 1 "general_operand" "rm")
            (const_int 31))
        (match_dup 1)))]
  ""
{
  operands[2] = operands[0];
  operands[3] = gen_label_rtx();
  if (GET_CODE (operands[0]) == MEM)
    {
      if (GET_CODE (XEXP (operands[0], 0)) == POST_INC)
        operands[0] = gen_rtx_MEM (SImode, XEXP (XEXP (operands[0], 0), 0));
      else if (GET_CODE (XEXP (operands[0], 0)) == PRE_DEC)
        operands[2] = gen_rtx_MEM (SImode, XEXP (XEXP (operands[0], 0), 0));
    }
  output_asm_insn ("move%.l %1,%0", operands);

The constraints are wrong for coldfire.


-- 

schwab at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   GCC host triplet|Linux amd 64                |
   Last reconfirmed|0000-00-00 00:00:00         |2008-02-14 17:35:39
               date|                            |


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


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

* [Bug target/35018] [m68k-elf] Gcc ouputs invalid asm when compiling with -O2 or higher
  2008-01-29 15:55 [Bug c/35018] New: [m68k-elf] Gcc ouputs invalid asm when compiling with -O2 or higher nizze86 at hotmail dot com
                   ` (2 preceding siblings ...)
  2008-02-14 17:36 ` schwab at suse dot de
@ 2008-10-26 11:27 ` nizze86 at hotmail dot com
  2008-10-26 11:30 ` nizze86 at hotmail dot com
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: nizze86 at hotmail dot com @ 2008-10-26 11:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from nizze86 at hotmail dot com  2008-10-26 11:25 -------
Created an attachment (id=16551)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16551&action=view)
Reduced testcase

A reduced testcase derived from the preprocessed sources.


-- 


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


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

* [Bug target/35018] [m68k-elf] Gcc ouputs invalid asm when compiling with -O2 or higher
  2008-01-29 15:55 [Bug c/35018] New: [m68k-elf] Gcc ouputs invalid asm when compiling with -O2 or higher nizze86 at hotmail dot com
                   ` (3 preceding siblings ...)
  2008-10-26 11:27 ` nizze86 at hotmail dot com
@ 2008-10-26 11:30 ` nizze86 at hotmail dot com
  2008-11-24 17:58 ` mkuvyrkov at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: nizze86 at hotmail dot com @ 2008-10-26 11:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from nizze86 at hotmail dot com  2008-10-26 11:28 -------
(In reply to comment #3)
> Created an attachment (id=16551)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16551&action=view) [edit]
> Reduced testcase
> 
> A reduced testcase derived from the preprocessed sources.
> 

compiled with:
m68k-elf-gcc -mcpu=5249 testcase.c -O2 -o testcase.o

using gcc 4.3.1 with configuration:
--target=m68k-elf --prefix=/usr/local/m68k-elf --enable-languages=c
--disable-ibssp --with-arch=cf


-- 

nizze86 at hotmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nizze86 at hotmail dot com


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


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

* [Bug target/35018] [m68k-elf] Gcc ouputs invalid asm when compiling with -O2 or higher
  2008-01-29 15:55 [Bug c/35018] New: [m68k-elf] Gcc ouputs invalid asm when compiling with -O2 or higher nizze86 at hotmail dot com
                   ` (4 preceding siblings ...)
  2008-10-26 11:30 ` nizze86 at hotmail dot com
@ 2008-11-24 17:58 ` mkuvyrkov at gcc dot gnu dot org
  2008-12-29 14:32 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: mkuvyrkov at gcc dot gnu dot org @ 2008-11-24 17:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from mkuvyrkov at gcc dot gnu dot org  2008-11-24 17:56 -------
Subject: Bug 35018

Author: mkuvyrkov
Date: Mon Nov 24 17:55:35 2008
New Revision: 142161

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142161
Log:
        PR target/35018

        * config/m68k/m68k.md (ok_for_coldfire, enabled): New attributes.
        (addsi_lshrsi_31): Add ColdFire-friendly alternatives.

        * gcc.target/m68k/pr35018.c: New.


Added:
    trunk/gcc/testsuite/gcc.target/m68k/pr35018.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/m68k/m68k.md
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug target/35018] [m68k-elf] Gcc ouputs invalid asm when compiling with -O2 or higher
  2008-01-29 15:55 [Bug c/35018] New: [m68k-elf] Gcc ouputs invalid asm when compiling with -O2 or higher nizze86 at hotmail dot com
                   ` (5 preceding siblings ...)
  2008-11-24 17:58 ` mkuvyrkov at gcc dot gnu dot org
@ 2008-12-29 14:32 ` pinskia at gcc dot gnu dot org
  2008-12-29 19:28 ` mkuvyrkov at gcc dot gnu dot org
  2010-02-24 21:40 ` law at redhat dot com
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-12-29 14:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pinskia at gcc dot gnu dot org  2008-12-29 14:30 -------
 Maxim,

if this is fixed, please close this bug.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mkuvyrkov at gcc dot gnu dot
                   |                            |org


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


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

* [Bug target/35018] [m68k-elf] Gcc ouputs invalid asm when compiling with -O2 or higher
  2008-01-29 15:55 [Bug c/35018] New: [m68k-elf] Gcc ouputs invalid asm when compiling with -O2 or higher nizze86 at hotmail dot com
                   ` (6 preceding siblings ...)
  2008-12-29 14:32 ` pinskia at gcc dot gnu dot org
@ 2008-12-29 19:28 ` mkuvyrkov at gcc dot gnu dot org
  2010-02-24 21:40 ` law at redhat dot com
  8 siblings, 0 replies; 10+ messages in thread
From: mkuvyrkov at gcc dot gnu dot org @ 2008-12-29 19:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from mkuvyrkov at gcc dot gnu dot org  2008-12-29 19:27 -------
This is fixed only on trunk; 4.3 still has the bug.  Do you think it's
appropriate to close it anyway?


-- 


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


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

* [Bug target/35018] [m68k-elf] Gcc ouputs invalid asm when compiling with -O2 or higher
  2008-01-29 15:55 [Bug c/35018] New: [m68k-elf] Gcc ouputs invalid asm when compiling with -O2 or higher nizze86 at hotmail dot com
                   ` (7 preceding siblings ...)
  2008-12-29 19:28 ` mkuvyrkov at gcc dot gnu dot org
@ 2010-02-24 21:40 ` law at redhat dot com
  8 siblings, 0 replies; 10+ messages in thread
From: law at redhat dot com @ 2010-02-24 21:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from law at redhat dot com  2010-02-24 21:40 -------
Fixed long ago.  Holding it open because the patch wasnt' backported to an old
branch is rather silly.  


-- 

law at redhat dot com changed:

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


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


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

end of thread, other threads:[~2010-02-24 21:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-29 15:55 [Bug c/35018] New: [m68k-elf] Gcc ouputs invalid asm when compiling with -O2 or higher nizze86 at hotmail dot com
2008-01-29 15:57 ` [Bug c/35018] " nizze86 at hotmail dot com
2008-01-29 17:40 ` [Bug target/35018] " pinskia at gcc dot gnu dot org
2008-02-14 17:36 ` schwab at suse dot de
2008-10-26 11:27 ` nizze86 at hotmail dot com
2008-10-26 11:30 ` nizze86 at hotmail dot com
2008-11-24 17:58 ` mkuvyrkov at gcc dot gnu dot org
2008-12-29 14:32 ` pinskia at gcc dot gnu dot org
2008-12-29 19:28 ` mkuvyrkov at gcc dot gnu dot org
2010-02-24 21:40 ` law at redhat dot com

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