[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#323016: ICE while compiling tin on m68k



Hi,

On Sun, 14 Aug 2005, Marco d'Itri wrote:

> Compiling tin 1.7.10+20050727 on m68k fails.
> 
> gcc -DHAVE_CONFIG_H -I. -I../include -I/usr/include  -DLOCALEDIR=\"/usr/share/locale\" -I../include  -DUSE_CANLOCK  -D_GNU_SOURCE -g -O2  -c ./save.c
> ./save.c: In function 'uudecode_line':
> ./save.c:1053: error: unable to find a register to spill in class 'ADDR_REGS'
> ./save.c:1053: error: this is the insn:
> (insn 22 21 23 0 ./save.c:1031 (set (reg/v:SI 12 %a4 [orig:40 n.152 ] [40])
>         (plus:SI (subreg:SI (mem:QI (reg/v/f:SI 10 %a2 [orig:46 buf ] [46]) [0 S1 A8]) 0)
>             (const_int 32 [0x20]))) 95 {*addsi3_internal} (insn_list:REG_DEP_TRUE 13 (nil))
>     (nil))
> ./save.c:1053: confused by earlier errors, bailing out
> make: *** [save.o] Error 1

The patch below fixes this problem, it's only workaround to keep combine 
from generating this subreg. For 4.1 this should be fixed properly.
Andreas, any better ideas, objections?

bye, Roman

Index: config/m68k/m68k.md
===================================================================
RCS file: /home/roman/src/gcc-cvs/gcc/gcc/config/m68k/m68k.md,v
retrieving revision 1.80.34.1
diff -u -r1.80.34.1 m68k.md
--- config/m68k/m68k.md	26 Jul 2005 04:40:43 -0000	1.80.34.1
+++ config/m68k/m68k.md	16 Sep 2005 20:19:47 -0000
@@ -1844,7 +1848,9 @@
                  (match_operand:SI 2 "general_src_operand" "dIKLT,rJK,a,mSrIKLT,mSrIKLs")))]
 
 
-  "! TARGET_COLDFIRE"
+  "!TARGET_COLDFIRE
+   && (GET_CODE (operands[1]) != SUBREG || GET_CODE (SUBREG_REG (operands[1])) == REG)
+   && (GET_CODE (operands[2]) != SUBREG || GET_CODE (SUBREG_REG (operands[2])) == REG)"
   "* return output_addsi3 (operands);")
 
 (define_insn "*addsi3_5200"



Reply to: