Another new egcs bootstrap failure on OSF4: ICE final.c:3555

Richard Henderson rth@cygnus.com
Fri Apr 30 23:15:00 GMT 1999


On Sat, Apr 24, 1999 at 09:23:32PM -0400, Kaveh R. Ghazi wrote:
>  > insn-emit.c: In function `gen_call_osf':
>  > insn-emit.c:4103: Internal compiler error at final.c:3555
>  > make[2]: *** [insn-emit.o] Error 1

	(and:DI (plus:DI (subreg:DI (reg:TI $10) 0)
		         (const_int 2))
		(const_int -8))

Ho hum.  I should have thought to fix print_operand_address
with that change to GO_IF_LEGITIMATE_ADDRESS.  Wonder why it
didn't show up on an ev56?  It certainly should have...


r~


        * alpha.h (PRINT_OPERAND_ADDRESS): Break out to ...
        * alpha.c (print_operand_address): here.  Handle subregs.

Index: alpha.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/alpha/alpha.c,v
retrieving revision 1.83
diff -c -p -d -r1.83 alpha.c
*** alpha.c	1999/04/23 16:58:23	1.83
--- alpha.c	1999/04/25 03:48:52
*************** print_operand (file, x, code)
*** 2929,2934 ****
--- 2929,2968 ----
        output_operand_lossage ("invalid %%xn code");
      }
  }
+ 
+ void
+ print_operand_address (file, addr)
+     FILE *file;
+      rtx addr;
+ {
+   rtx basereg = NULL_RTX;
+   HOST_WIDE_INT offset = 0;
+ 
+   if (GET_CODE (addr) == AND)
+     addr = XEXP (addr, 0);
+   if (GET_CODE (addr) == SUBREG)
+     addr = SUBREG_REG (addr);
+ 
+   if (GET_CODE (addr) == REG)
+     basereg = addr;
+   else if (GET_CODE (addr) == CONST_INT)
+     offset = INTVAL (addr);
+   else if (GET_CODE (addr) == PLUS
+            && GET_CODE (XEXP (addr, 1)) == CONST_INT)
+     {
+       offset = INTVAL (XEXP (addr, 1));
+       basereg = XEXP (addr, 0);
+       if (GET_CODE (basereg) == SUBREG)
+ 	basereg = SUBREG_REG (basereg);
+       if (GET_CODE (basereg) != REG)
+ 	abort ();
+     }
+   else
+     abort ();
+ 
+   fprintf (file, HOST_WIDE_INT_PRINT_DEC, offset);
+   fprintf (file, "($%d)", basereg ? REGNO (basereg) : 31);
+ }
  
  /* Emit RTL insns to initialize the variable parts of a trampoline at
     TRAMP. FNADDR is an RTX for the address of the function's pure
Index: alpha.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/alpha/alpha.h,v
retrieving revision 1.66
diff -c -p -d -r1.66 alpha.h
*** alpha.h	1999/04/23 16:58:24	1.66
--- alpha.h	1999/04/25 03:48:52
*************** do {									\
*** 2297,2324 ****
  
  /* Print a memory address as an operand to reference that memory location.  */
  
! #define PRINT_OPERAND_ADDRESS(FILE, ADDR)		\
! { rtx addr = (ADDR);					\
!   int basereg = 31;					\
!   HOST_WIDE_INT offset = 0;				\
! 							\
!   if (GET_CODE (addr) == AND)				\
!     addr = XEXP (addr, 0);				\
! 							\
!   if (GET_CODE (addr) == REG)				\
!     basereg = REGNO (addr);				\
!   else if (GET_CODE (addr) == CONST_INT)		\
!     offset = INTVAL (addr);				\
!   else if (GET_CODE (addr) == PLUS			\
! 	   && GET_CODE (XEXP (addr, 0)) == REG		\
! 	   && GET_CODE (XEXP (addr, 1)) == CONST_INT)	\
!     basereg = REGNO (XEXP (addr, 0)), offset = INTVAL (XEXP (addr, 1)); \
!   else							\
!     abort ();						\
! 							\
!   fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, offset);		\
!   fprintf (FILE, "($%d)", basereg);		\
! }
  /* Define the codes that are matched by predicates in alpha.c.  */
  
  #define PREDICATE_CODES 						\
--- 2297,2305 ----
  
  /* Print a memory address as an operand to reference that memory location.  */
  
! #define PRINT_OPERAND_ADDRESS(FILE, ADDR) \
!   print_operand_address((FILE), (ADDR))
! 
  /* Define the codes that are matched by predicates in alpha.c.  */
  
  #define PREDICATE_CODES 						\
*************** extern int current_file_function_operand
*** 2524,2529 ****
--- 2505,2511 ----
  extern int alpha_sa_size ();
  extern int alpha_adjust_cost ();
  extern void print_operand ();
+ extern void print_operand_address ();
  extern int reg_or_0_operand ();
  extern int reg_or_8bit_operand ();
  extern int mul8_operand ();



More information about the Gcc-bugs mailing list