This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH Re: Bootstrap problem on i386 when configured with CFLAGS=-O in environment


On Sat, Feb 05, 2000 at 11:27:08PM +1030, Alan Modra wrote:
> xgcc: Internal compiler error: program cc1 got fatal signal 11
> make[1]: *** [libgcc2.a] Error 1
> #0  0x81d0eab in ix86_agi_dependant (insn=0x40375280, dep_insn=0x40375200, 
>     insn_type=TYPE_LEA) at /usr/src/egcs/gcc/config/i386/i386.c:5952

Fixed thus.

> 	* config/i386/i386.md (define_split compare:CCNO and): Mask high
> 	bits of negative QI and HI constants with gen_unsigned_lowpart. 

I applied a simpler variant of this.



r~

        * i386.c (ix86_agi_dependant): Handle pro_epilogue_adjust_stack
        as a TYPE_LEA insn.

        * i386.md (widening and peepholes): Mask the constant instead of
        using gen_lowpart.

Index: i386.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/i386.c,v
retrieving revision 1.134
diff -c -p -d -r1.134 i386.c
*** i386.c	2000/02/06 03:40:46	1.134
--- i386.c	2000/02/06 09:43:41
*************** ix86_agi_dependant (insn, dep_insn, insn
*** 5924,5930 ****
    rtx addr;
  
    if (insn_type == TYPE_LEA)
!     addr = SET_SRC (single_set (insn));
    else
      {
        int i;
--- 5924,5940 ----
    rtx addr;
  
    if (insn_type == TYPE_LEA)
!     {
!       addr = PATTERN (insn);
!       if (GET_CODE (addr) == SET)
! 	;
!       else if (GET_CODE (addr) == PARALLEL
! 	       && GET_CODE (XVECEXP (addr, 0, 0)) == SET)
! 	addr = XVECEXP (addr, 0, 0);
!       else
! 	abort ();
!       addr = SET_SRC (addr);
!     }
    else
      {
        int i;
Index: i386.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/i386.md,v
retrieving revision 1.134
diff -c -p -d -r1.134 i386.md
*** i386.md	2000/02/04 21:40:37	1.134
--- i386.md	2000/02/06 09:43:41
***************
*** 8928,8934 ****
  (define_split
    [(set (reg:CCNO 17)
  	(compare:CCNO (and (match_operand 1 "aligned_operand" "")
! 			   (match_operand 2 "immediate_operand" ""))
  		      (const_int 0)))
     (set (match_operand 0 "register_operand" "")
  	(and (match_dup 1) (match_dup 2)))]
--- 8928,8934 ----
  (define_split
    [(set (reg:CCNO 17)
  	(compare:CCNO (and (match_operand 1 "aligned_operand" "")
! 			   (match_operand 2 "const_int_operand" ""))
  		      (const_int 0)))
     (set (match_operand 0 "register_operand" "")
  	(and (match_dup 1) (match_dup 2)))]
***************
*** 8941,8954 ****
  			         (const_int 0)))
  	      (set (match_dup 0)
  		   (and:SI (match_dup 1) (match_dup 2)))])]
!   "operands[0] = gen_lowpart (SImode, operands[0]);
!    operands[1] = gen_lowpart (SImode, operands[1]);
!    operands[2] = gen_lowpart (SImode, operands[2]);")
  
  (define_split
    [(set (reg:CCNO 17)
  	(compare:CCNO (and (match_operand 0 "aligned_operand" "")
! 			   (match_operand 1 "immediate_operand" ""))
  		      (const_int 0)))]
    "! TARGET_PARTIAL_REG_STALL && reload_completed
     && (GET_MODE (operands[0]) == HImode
--- 8941,8955 ----
  			         (const_int 0)))
  	      (set (match_dup 0)
  		   (and:SI (match_dup 1) (match_dup 2)))])]
!   "operands[2]
!      = GEN_INT (INTVAL (operands[2]) & GET_MODE_MASK (GET_MODE (operands[0])));
!    operands[0] = gen_lowpart (SImode, operands[0]);
!    operands[1] = gen_lowpart (SImode, operands[1]);")
  
  (define_split
    [(set (reg:CCNO 17)
  	(compare:CCNO (and (match_operand 0 "aligned_operand" "")
! 			   (match_operand 1 "const_int_operand" ""))
  		      (const_int 0)))]
    "! TARGET_PARTIAL_REG_STALL && reload_completed
     && (GET_MODE (operands[0]) == HImode
***************
*** 8957,8964 ****
    [(set (reg:CCNO 17)
  	(compare:CCNO (and:SI (match_dup 0) (match_dup 1))
  		      (const_int 0)))]
!   "operands[0] = gen_lowpart (SImode, operands[0]);
!    operands[1] = gen_lowpart (SImode, operands[1]);")
  
  (define_split
    [(set (match_operand 0 "register_operand" "")
--- 8958,8966 ----
    [(set (reg:CCNO 17)
  	(compare:CCNO (and:SI (match_dup 0) (match_dup 1))
  		      (const_int 0)))]
!   "operands[1]
!      = GEN_INT (INTVAL (operands[1]) & GET_MODE_MASK (GET_MODE (operands[0])));
!    operands[0] = gen_lowpart (SImode, operands[0]);")
  
  (define_split
    [(set (match_operand 0 "register_operand" "")

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]