unable to find a register to spill...
Jan Hubicka
jh@suse.cz
Thu Apr 18 09:26:00 GMT 2002
>
> Honza,
>
> I just got:
> socket.c: In function `socket_log':
> socket.c:289: unable to find a register to spill in class `AREG'
> socket.c:289: this is the insn:
> (insn 16 14 18 (set (reg/v:SI 64)
> (mem/f:SI (reg/f:DI 16 argp) [5 msgset+0 S4 A32])) 45 {*movsi_1} (nil)
> (expr_list:REG_EQUIV (mem/f:SI (reg/f:DI 16 argp) [5 msgset+0 S4 A32])
> (nil)))
> socket.c:289: confused by earlier errors, bailing out
Hi,
the problem is that eax is allocated, but reload for some purpose insist
on using it by choosint alternative 0 present in the insruction mostly to
get insn_length right. It appears to be enought to add '?' to make reload
use second alternative and results in better code as well.
Bootstrapped/regtested i386 mainline
OK for mainline? (for branch as well? - the same failure is reproducible
with regparm too)
Thu Apr 18 18:23:45 CEST 2002 Jan Hubicka <jh@suse.cz>
* i386.md (movsi_1, movhi_1): Force reload to use more flexible
alternative.
Index: i386.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/i386.md,v
retrieving revision 1.345
diff -c -3 -p -r1.345 i386.md
*** i386.md 18 Apr 2002 14:05:01 -0000 1.345
--- i386.md 18 Apr 2002 16:17:20 -0000
***************
*** 1734,1740 ****
(set_attr "length_immediate" "1")])
(define_insn "*movsi_1"
! [(set (match_operand:SI 0 "nonimmediate_operand" "=*a,r,*a,m,!*y,!rm,!*y,!*Y,!rm,!*Y")
(match_operand:SI 1 "general_operand" "im,rinm,rinm,rin,rm,*y,*y,rm,*Y,*Y"))]
"GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM"
{
--- 1734,1740 ----
(set_attr "length_immediate" "1")])
(define_insn "*movsi_1"
! [(set (match_operand:SI 0 "nonimmediate_operand" "=*?a,r,*?a,m,!*y,!rm,!*y,!*Y,!rm,!*Y")
(match_operand:SI 1 "general_operand" "im,rinm,rinm,rin,rm,*y,*y,rm,*Y,*Y"))]
"GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM"
{
***************
*** 1844,1850 ****
(set_attr "mode" "QI")])
(define_insn "*movhi_1"
! [(set (match_operand:HI 0 "nonimmediate_operand" "=*a,r,r,*a,r,m")
(match_operand:HI 1 "general_operand" "i,r,rn,rm,rm,rn"))]
"GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM"
{
--- 1844,1850 ----
(set_attr "mode" "QI")])
(define_insn "*movhi_1"
! [(set (match_operand:HI 0 "nonimmediate_operand" "=*?a,r,r,*?a,r,m")
(match_operand:HI 1 "general_operand" "i,r,rn,rm,rm,rn"))]
"GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM"
{
More information about the Gcc-patches
mailing list