User account creation filtered due to spam.

Bug 13803 - [3.4 Regression] movqi operand constraints too restrictivefor TARGET_COLDFIRE
Summary: [3.4 Regression] movqi operand constraints too restrictivefor TARGET_COLDFIRE
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 3.4.0
: P2 critical
Target Milestone: 3.4.1
Assignee: Bernardo Innocenti
URL:
Keywords: ice-on-valid-code
: 5753 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-01-21 22:21 UTC by Bernardo Innocenti
Modified: 2004-10-30 21:10 UTC (History)
5 users (show)

See Also:
Host:
Target: m68k-*-*
Build:
Known to work: 3.1 4.0.0
Known to fail:
Last reconfirmed: 2004-06-10 00:13:44


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernardo Innocenti 2004-01-21 22:21:26 UTC
Please reopen this bug for 3.4.0. The summary should read
something like "movqi operand constraints too restrictive
for TARGET_COLDFIRE"

This ICE was already present in 3.0.4 (PR c/5753), but
keeps appearing intermittently, probably triggered by
middle-end changes.

The ICE can be triggered on 3.3-branch and it was
apparently latent in mainline until after the 20030107
snapshot.  Both 20030114 and 20030121 consistently show
it.

The problem has also been discussed shortly here:
  http://gcc.gnu.org/ml/gcc/2004-01/msg00458.html

It seems this bug could be fixed by adding a new
insn for TARGET_COLDFIRE with relaxed constraints
and perhaps a longer/slower instruction sequence.


m68k-uclinux-gcc  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing
 -Os  -Wa,--bitwise-or -I/usr/local/src/uclinux-tools/linux-2.6.x/include -m5200
  -msoft-float -fno-builtin -nostdinc -D_LIBC -I../../include -I.
-I/usr/local/lib/gcc/m68k-uclinux/3.4.0/include -DNDEBUG -DL__fpmaxtostr
printf.c -c -o _fpmaxtostr.o
printf.c: In function `_fpmaxtostr':
printf.c:2454: error: insn does not satisfy its constraints:
(insn 1378 536 537 38 (set (reg:QI 8 %a0)
        (mem:QI (plus:SI (reg/f:SI 14 %a6)
                (const_int -209 [0xffffff2f])) [0 mode+0 S1 A8])) 33
{*m68k.md:825} (nil)
    (nil))
printf.c:2454: internal compiler error: in reload_cse_simplify_operands, at
postreload.c:378



This is the offending pattern:

(define_expand "movqi"
  [(set (match_operand:QI 0 "nonimmediate_operand" "")
        (match_operand:QI 1 "general_src_operand" ""))]
  ""
  "")

(define_insn ""
  [(set (match_operand:QI 0 "nonimmediate_operand" "=d,*a,m")
        (match_operand:QI 1 "general_src_operand" "dmSi*a,di*a,dmSi"))]
  "!TARGET_COLDFIRE"
  "* return output_move_qimode (operands);")

(define_insn ""
  [(set (match_operand:QI 0 "nonimmediate_operand" "=d<Q>,dm,d*a")
        (match_operand:QI 1 "general_src_operand" "dmi,d<Q>,di*a"))]
  "TARGET_COLDFIRE"
  "* return output_move_qimode (operands);")
Comment 1 Andrew Pinski 2004-01-21 23:15:23 UTC
Confirmed.
Comment 2 Andrew Pinski 2004-01-21 23:15:49 UTC
*** Bug 5753 has been marked as a duplicate of this bug. ***
Comment 3 Mark Mitchell 2004-02-28 02:59:38 UTC
coldfire is not a primary target so I have changed the target milestone to 3.4.1.
Comment 4 Mark Mitchell 2004-06-09 19:30:20 UTC
Postponed until 3.4.2.
Comment 5 Bernardo Innocenti 2004-06-10 00:13:41 UTC
This patch fixes the bug:

2004-05-05  Peter Barada  <peter@the-baradas.com>
	* gcc/config/m68k/m68k.h(EXTRA_CONSTRAINT): add 'U' for
          register offset addressing.
	* gcc/config/m68k/m68k.md: Add 'U,U' alternative to ColdFire
	  variants of movsi,movhi,movqi insn patterns.

It's already present on mainline and I've been using it in my
local 3.4 tree for some time.

I'd like to backport it to 3.4 before 3.4.1.
Comment 6 Mark Mitchell 2004-06-10 13:33:56 UTC
Subject: Re:  [3.4/3.5 Regression] movqi operand constraints
 too restrictivefor TARGET_COLDFIRE

bernie at develer dot com wrote:

> ------- Additional Comments From bernie at develer dot com  2004-06-10 00:13 -------
> This patch fixes the bug:
> 
> 2004-05-05  Peter Barada  <peter@the-baradas.com>
> 	* gcc/config/m68k/m68k.h(EXTRA_CONSTRAINT): add 'U' for
>           register offset addressing.
> 	* gcc/config/m68k/m68k.md: Add 'U,U' alternative to ColdFire
> 	  variants of movsi,movhi,movqi insn patterns.
> 
> It's already present on mainline and I've been using it in my
> local 3.4 tree for some time.
> 
> I'd like to backport it to 3.4 before 3.4.1.

Backporting this patch for 3.4.1 is fine.  Please proceed!

Comment 7 Bernardo Innocenti 2004-06-10 18:01:49 UTC
Applied to 3_4-branch.