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]

SUBREGs in memory addresses


Current ia64-linux compilers fail in print_operand while compiling the
kernel.  This happens because there is a SUBREG left during the final
phase; it should have been eliminated earlier.  The paradoxical SUBREG
occurs in a memory address as a result of cse being clever.

This patch fixes it.  Bootstrapped on ia64-linux.


Bernd

	* final.c (cleanup_subreg_operands): The address of a MEM can
	contain SUBREGs.

Index: final.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/final.c,v
retrieving revision 1.157
diff -u -p -r1.157 final.c
--- final.c	2001/02/07 01:04:37	1.157
+++ final.c	2001/02/08 15:02:24
@@ -3119,7 +3119,8 @@ cleanup_subreg_operands (insn)
       if (GET_CODE (recog_data.operand[i]) == SUBREG)
 	recog_data.operand[i] = alter_subreg (recog_data.operand[i]);
       else if (GET_CODE (recog_data.operand[i]) == PLUS
-	       || GET_CODE (recog_data.operand[i]) == MULT)
+	       || GET_CODE (recog_data.operand[i]) == MULT
+	       || GET_CODE (recog_data.operand[i]) == MEM)
 	recog_data.operand[i] = walk_alter_subreg (recog_data.operand[i]);
     }

@@ -3128,7 +3129,8 @@ cleanup_subreg_operands (insn)
       if (GET_CODE (*recog_data.dup_loc[i]) == SUBREG)
 	*recog_data.dup_loc[i] = alter_subreg (*recog_data.dup_loc[i]);
       else if (GET_CODE (*recog_data.dup_loc[i]) == PLUS
-	       || GET_CODE (*recog_data.dup_loc[i]) == MULT)
+	       || GET_CODE (*recog_data.dup_loc[i]) == MULT
+	       || GET_CODE (*recog_data.dup_loc[i]) == MEM)
 	*recog_data.dup_loc[i] = walk_alter_subreg (*recog_data.dup_loc[i]);
     }
 }


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