public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Last alignment change for MEM tracking
@ 2001-11-13 15:03 Richard Kenner
  2001-11-13 15:03 ` John David Anglin
  0 siblings, 1 reply; 21+ messages in thread
From: Richard Kenner @ 2001-11-13 15:03 UTC (permalink / raw)
  To: dave; +Cc: gcc-patches

    More fallout:

    ../../gcc/config/pa/pa.c:1212: warning: passing arg 1 of `alter_subreg' from incompatible pointer type
    ../../gcc/config/pa/pa.c:1229: warning: passing arg 1 of `alter_subreg' from incompatible pointer type

Actually, these were fallout from Jan's change, but I'm committing the
following to fix both those and the ones below.

Fri Nov 16 15:22:35 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* config/pa/pa.c: Reflect changes in calling sequences of alter_reg and
	emit_cmp_insn.

*** pa.c	2001/11/11 17:45:02	1.137
--- pa.c	2001/11/16 20:14:58
*************** emit_move_sequence (operands, mode, scra
*** 1210,1214 ****
  				 reg_equiv_mem [REGNO (SUBREG_REG (operand0))],
  				 SUBREG_BYTE (operand0));
!       operand0 = alter_subreg (temp);
      }
  
--- 1210,1214 ----
  				 reg_equiv_mem [REGNO (SUBREG_REG (operand0))],
  				 SUBREG_BYTE (operand0));
!       operand0 = alter_subreg (&temp);
      }
  
*************** emit_move_sequence (operands, mode, scra
*** 1227,1231 ****
  				 reg_equiv_mem [REGNO (SUBREG_REG (operand1))],
  				 SUBREG_BYTE (operand1));
!       operand1 = alter_subreg (temp);
      }
  
--- 1227,1231 ----
  				 reg_equiv_mem [REGNO (SUBREG_REG (operand1))],
  				 SUBREG_BYTE (operand1));
!       operand1 = alter_subreg (&temp);
      }
  
*************** return_addr_rtx (count, frameaddr)
*** 3552,3573 ****
       -24[frameaddr].  */
  
!   emit_cmp_insn (gen_rtx_MEM (SImode, ins),
! 		 GEN_INT (0x4bc23fd1),
! 		 NE, NULL_RTX, SImode, 1, 0);
    emit_jump_insn (gen_bne (label));
  
    emit_cmp_insn (gen_rtx_MEM (SImode, plus_constant (ins, 4)),
! 		 GEN_INT (0x004010a1),
! 		 NE, NULL_RTX, SImode, 1, 0);
    emit_jump_insn (gen_bne (label));
  
    emit_cmp_insn (gen_rtx_MEM (SImode, plus_constant (ins, 8)),
! 		 GEN_INT (0x00011820),
! 		 NE, NULL_RTX, SImode, 1, 0);
    emit_jump_insn (gen_bne (label));
  
    emit_cmp_insn (gen_rtx_MEM (SImode, plus_constant (ins, 12)),
! 		 GEN_INT (0xe0400002),
! 		 NE, NULL_RTX, SImode, 1, 0);
  
    /* If there is no export stub then just use the value saved from
--- 3552,3569 ----
       -24[frameaddr].  */
  
!   emit_cmp_insn (gen_rtx_MEM (SImode, ins), GEN_INT (0x4bc23fd1), NE,
! 		 NULL_RTX, SImode, 1);
    emit_jump_insn (gen_bne (label));
  
    emit_cmp_insn (gen_rtx_MEM (SImode, plus_constant (ins, 4)),
! 		 GEN_INT (0x004010a1), NE, NULL_RTX, SImode, 1);
    emit_jump_insn (gen_bne (label));
  
    emit_cmp_insn (gen_rtx_MEM (SImode, plus_constant (ins, 8)),
! 		 GEN_INT (0x00011820), NE, NULL_RTX, SImode, 1);
    emit_jump_insn (gen_bne (label));
  
    emit_cmp_insn (gen_rtx_MEM (SImode, plus_constant (ins, 12)),
! 		 GEN_INT (0xe0400002), NE, NULL_RTX, SImode, 1);
  
    /* If there is no export stub then just use the value saved from

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Last alignment change for MEM tracking
  2001-11-13 15:03 Last alignment change for MEM tracking Richard Kenner
@ 2001-11-13 15:03 ` John David Anglin
  0 siblings, 0 replies; 21+ messages in thread
From: John David Anglin @ 2001-11-13 15:03 UTC (permalink / raw)
  To: Richard Kenner; +Cc: gcc-patches

>     More fallout:
> 
>     ../../gcc/config/pa/pa.c:1212: warning: passing arg 1 of `alter_subreg' from incompatible pointer type
>     ../../gcc/config/pa/pa.c:1229: warning: passing arg 1 of `alter_subreg' from incompatible pointer type
> 
> Actually, these were fallout from Jan's change, but I'm committing the
> following to fix both those and the ones below.

Yes, I just was in the process of doing a build with an identical fix.

This is the first time that I have tried to build ada on hppa1.1-hp-hpux10.20.
I installed gnat-3.12p-hppa1.1-hp-hpux10.20 but hit this in stage1:

gcc -c -g   -mdisable-indexing -W -Wall -gnatpg -gnata -I- -I. -I../../../gcc/ada ../../../gcc/ada/ada.ads
fatal error: run-time library configuration error
cannot locate "Zero_Cost_Exceptions" in file "system.ads" (entity not in package)
compilation abandoned

Can I just add the definition for "Zero_Cost_Exceptions" to "system.ads" in
the gcc directory from the installed system.ads?

   Zero_Cost_Exceptions : constant Boolean := False;

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Last alignment change for MEM tracking
  2001-11-13 15:03 Richard Kenner
@ 2001-11-13 15:03 ` Bryce McKinlay
  2001-11-13 15:03   ` Bryce McKinlay
  2001-11-13 15:03 ` Stan Shebs
  1 sibling, 1 reply; 21+ messages in thread
From: Bryce McKinlay @ 2001-11-13 15:03 UTC (permalink / raw)
  To: Richard Kenner; +Cc: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 317 bytes --]

Richard Kenner wrote:

>I'm doing the checkin for the missing pieces now.  I had them in my sources,
>but an editing error somehow kept them out of the commit I did.
>

A couple of occurances in .md files got missed. I'm checking in the 
following as obvious.

Still got the i686 bootstrap failure.

regards

Bryce.


[-- Attachment #2: gcc.patch --]
[-- Type: text/plain, Size: 1352 bytes --]

2001-11-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>

	* config/s390/s390.md: Remove ALIGN arg from emit_cmp_and_jump_insns 
	call.
	* config/i386/i386.md: Likewise.

Index: config/s390/s390.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/s390/s390.md,v
retrieving revision 1.6
diff -u -r1.6 s390.md
--- s390.md	2001/10/26 18:29:51	1.6
+++ s390.md	2001/11/16 02:59:44
@@ -5212,7 +5212,7 @@
    emit_move_insn (index, operands[0]);
    emit_insn (gen_subsi3 (index, index, operands[1]));
    emit_cmp_and_jump_insns (index, operands[2], GTU, NULL_RTX, SImode, 1,
-                            0, operands[4]);
+                            operands[4]);
 
    if (Pmode != SImode)
      index = convert_to_mode (Pmode, index, 1);
Index: config/i386/i386.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.md,v
retrieving revision 1.312
diff -u -r1.312 i386.md
--- i386.md	2001/11/04 02:51:23	1.312
+++ i386.md	2001/11/16 03:00:17
@@ -13792,7 +13792,7 @@
 
       emit_move_insn (out, const0_rtx);
 
-      emit_cmp_and_jump_insns (in, const0_rtx, EQ, 0, SImode, 1, 0, label);
+      emit_cmp_and_jump_insns (in, const0_rtx, EQ, 0, SImode, 1, label);
 
       emit_move_insn (hi, out);
       emit_insn (gen_subsi3 (out, out, in));

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Last alignment change for MEM tracking
  2001-11-13 15:03 ` Stan Shebs
@ 2001-11-13 15:03   ` Bryce McKinlay
  0 siblings, 0 replies; 21+ messages in thread
From: Bryce McKinlay @ 2001-11-13 15:03 UTC (permalink / raw)
  To: Stan Shebs; +Cc: Richard Kenner, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 1383 bytes --]

Stan Shebs wrote:

>Richard Kenner wrote:
>
>>This large change completes (modulo bugs) the alignment changes that were
>>the driving force behind the MEM tracking changes.  It removes the ALIGN
>>parameter from many more functions and uses the value from the MEM instead.
>>
>>[...]
>>
>>Tested on alphaev56-dec-osf4.0c.
>>
>
>Really?  I just updated my sources, and have had to tweak function
>calls with extra arguments in builtins.c, doloop.c, and expmed.c
>so far, no end in sight.
>

Yep. This patch fixes all the "too many argument" cases for i686, but 
there are more in the other target directories. Richard, do you want me 
to check this in?

Note that I still get an i686 bootstrap failure with the patch applied:

./xgcc -B./ -B/home/bryce/gcc/i686-pc-linux-gnu/bin/ -isystem 
/home/bryce/gcc/i686-pc-linux-gnu/include -isystem 
/home/bryce/gcc/i686-pc-linux-gnu/sys-include  -DIN_GCC    -W -Wall 
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem 
./include  -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/config 
-I../../gcc/../include  -g0 \
  -finhibit-size-directive -fno-inline-functions \
  -fno-exceptions -fno-omit-frame-pointer  \
  -c ../../gcc/crtstuff.c -DCRT_BEGIN -o crtbegin.o
../../gcc/crtstuff.c: In function `__do_global_dtors_aux':
../../gcc/crtstuff.c:252: Internal compiler error in emit_block_move, at 
expr.c:1644

regards

Bryce.


[-- Attachment #2: gcc.patch --]
[-- Type: text/plain, Size: 12349 bytes --]

Index: builtins.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/builtins.c,v
retrieving revision 1.127
diff -u -r1.127 builtins.c
--- builtins.c	2001/11/03 15:33:45	1.127
+++ builtins.c	2001/11/16 02:07:30
@@ -1462,7 +1462,7 @@
       /* Test the result; if it is NaN, set errno=EDOM because
 	 the argument was not in the domain.  */
       emit_cmp_and_jump_insns (target, target, EQ, 0, GET_MODE (target),
-			       0, 0, lab1);
+			       0, lab1);
 
 #ifdef TARGET_EDOM
 	{
Index: doloop.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doloop.c,v
retrieving revision 1.11
diff -u -r1.11 doloop.c
--- doloop.c	2001/10/09 06:02:50	1.11
+++ doloop.c	2001/11/16 02:07:31
@@ -628,7 +628,7 @@
 	  limit = abs_inc * (loop_info->unroll_number - 1);
 	  emit_cmp_and_jump_insns (extra, GEN_INT (limit),
 				   limit == 0 ? EQ : LEU, NULL_RTX,
-				   GET_MODE (extra), 0, 0, label);
+				   GET_MODE (extra), 0, label);
 	  JUMP_LABEL (get_last_insn ()) = label;
 	  LABEL_NUSES (label)++;
 
@@ -671,8 +671,7 @@
 	  label = gen_label_rtx();
 	  emit_cmp_and_jump_insns (copy_rtx (initial_value),
 				   copy_rtx (loop_info->comparison_value),
-				   comparison_code, NULL_RTX, mode, 0, 0,
-				   label);
+				   comparison_code, NULL_RTX, mode, 0, label);
 	  JUMP_LABEL (get_last_insn ()) = label;
 	  LABEL_NUSES (label)++;
 	  emit_move_insn (iterations, const1_rtx);
Index: expmed.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/expmed.c,v
retrieving revision 1.95
diff -u -r1.95 expmed.c
--- expmed.c	2001/11/11 11:02:25	1.95
+++ expmed.c	2001/11/16 02:07:32
@@ -4329,7 +4329,7 @@
       last = get_last_insn ();
 
       comparison
-	= compare_from_rtx (op0, op1, code, unsignedp, mode, NULL_RTX, 0);
+	= compare_from_rtx (op0, op1, code, unsignedp, mode, NULL_RTX);
       if (GET_CODE (comparison) == CONST_INT)
 	return (comparison == const0_rtx ? const0_rtx
 		: normalizep == 1 ? const1_rtx
@@ -4629,7 +4629,7 @@
 
   emit_move_insn (target, const1_rtx);
   label = gen_label_rtx ();
-  do_compare_rtx_and_jump (op0, op1, code, unsignedp, mode, NULL_RTX, 0,
+  do_compare_rtx_and_jump (op0, op1, code, unsignedp, mode, NULL_RTX,
 			   NULL_RTX, label);
 
   emit_move_insn (target, const0_rtx);
@@ -4705,6 +4705,6 @@
     }
   else
     {
-      emit_cmp_and_jump_insns (arg1, arg2, op, NULL_RTX, mode, 0, 0, label);
+      emit_cmp_and_jump_insns (arg1, arg2, op, NULL_RTX, mode, 0, label);
     }
 }
Index: stmt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/stmt.c,v
retrieving revision 1.227
diff -u -r1.227 stmt.c
--- stmt.c	2001/11/15 10:28:49	1.227
+++ stmt.c	2001/11/16 02:07:34
@@ -2198,7 +2198,6 @@
 				   expand_expr (TYPE_SIZE (last_expr_type),
 						NULL_RTX, VOIDmode, 0),
 				   BLKmode, 0,
-				   TYPE_ALIGN (last_expr_type) / BITS_PER_UNIT,
 				   lab);
 	  emit_label (lab);
 	}
@@ -5656,8 +5655,7 @@
       enum machine_mode mode = GET_MODE (op1);
       if (mode == VOIDmode)
 	mode = GET_MODE (op2);
-      emit_cmp_and_jump_insns (op1, op2, EQ, NULL_RTX, mode, unsignedp,
-			       0, label);
+      emit_cmp_and_jump_insns (op1, op2, EQ, NULL_RTX, mode, unsignedp, label);
     }
 }
 \f
@@ -6101,7 +6099,7 @@
 					expand_expr (node->high, NULL_RTX,
 						     VOIDmode, 0),
 					unsignedp),
-				       GT, NULL_RTX, mode, unsignedp, 0,
+				       GT, NULL_RTX, mode, unsignedp,
 				       label_rtx (node->right->code_label));
 	      emit_case_nodes (index, node->left, default_label, index_type);
 	    }
@@ -6114,7 +6112,7 @@
 					expand_expr (node->high, NULL_RTX,
 						     VOIDmode, 0),
 					unsignedp),
-				       LT, NULL_RTX, mode, unsignedp, 0,
+				       LT, NULL_RTX, mode, unsignedp,
 				       label_rtx (node->left->code_label));
 	      emit_case_nodes (index, node->right, default_label, index_type);
 	    }
@@ -6133,7 +6131,7 @@
 					expand_expr (node->high, NULL_RTX,
 						     VOIDmode, 0),
 					unsignedp),
-				       GT, NULL_RTX, mode, unsignedp, 0,
+				       GT, NULL_RTX, mode, unsignedp,
 				       label_rtx (test_label));
 
 	      /* Value must be on the left.
@@ -6168,7 +6166,7 @@
 					    expand_expr (node->high, NULL_RTX,
 							 VOIDmode, 0),
 					    unsignedp),
-					   LT, NULL_RTX, mode, unsignedp, 0,
+					   LT, NULL_RTX, mode, unsignedp,
 					   default_label);
 		}
 
@@ -6201,7 +6199,7 @@
 					    expand_expr (node->high, NULL_RTX,
 							 VOIDmode, 0),
 					    unsignedp),
-					   GT, NULL_RTX, mode, unsignedp, 0,
+					   GT, NULL_RTX, mode, unsignedp,
 					   default_label);
 		}
 
@@ -6244,7 +6242,7 @@
 				      expand_expr (node->high, NULL_RTX,
 						   VOIDmode, 0),
 				      unsignedp),
-				     GT, NULL_RTX, mode, unsignedp, 0,
+				     GT, NULL_RTX, mode, unsignedp,
 				     label_rtx (node->right->code_label));
 	  else
 	    {
@@ -6258,7 +6256,7 @@
 					expand_expr (node->high, NULL_RTX,
 						     VOIDmode, 0),
 					unsignedp),
-				       GT, NULL_RTX, mode, unsignedp, 0,
+				       GT, NULL_RTX, mode, unsignedp,
 				       label_rtx (test_label));
 	    }
 
@@ -6270,7 +6268,7 @@
 				    expand_expr (node->low, NULL_RTX,
 						 VOIDmode, 0),
 				    unsignedp),
-				   GE, NULL_RTX, mode, unsignedp, 0,
+				   GE, NULL_RTX, mode, unsignedp,
 				   label_rtx (node->code_label));
 
 	  /* Handle the left-hand subtree.  */
@@ -6301,7 +6299,7 @@
 					expand_expr (node->low, NULL_RTX,
 						     VOIDmode, 0),
 					unsignedp),
-				       LT, NULL_RTX, mode, unsignedp, 0,
+				       LT, NULL_RTX, mode, unsignedp,
 				       default_label);
 	    }
 
@@ -6313,7 +6311,7 @@
 				    expand_expr (node->high, NULL_RTX,
 						 VOIDmode, 0),
 				    unsignedp),
-				   LE, NULL_RTX, mode, unsignedp, 0,
+				   LE, NULL_RTX, mode, unsignedp,
 				   label_rtx (node->code_label));
 
 	  emit_case_nodes (index, node->right, default_label, index_type);
@@ -6331,7 +6329,7 @@
 					expand_expr (node->high, NULL_RTX,
 						     VOIDmode, 0),
 					unsignedp),
-				       GT, NULL_RTX, mode, unsignedp, 0,
+				       GT, NULL_RTX, mode, unsignedp,
 				       default_label);
 	    }
 
@@ -6343,7 +6341,7 @@
 				    expand_expr (node->low, NULL_RTX,
 						 VOIDmode, 0),
 				    unsignedp),
-				   GE, NULL_RTX, mode, unsignedp, 0,
+				   GE, NULL_RTX, mode, unsignedp,
 				   label_rtx (node->code_label));
 
 	  emit_case_nodes (index, node->left, default_label, index_type);
@@ -6365,7 +6363,7 @@
 					expand_expr (node->high, NULL_RTX,
 						     VOIDmode, 0),
 					unsignedp),
-				       GT, NULL_RTX, mode, unsignedp, 0,
+				       GT, NULL_RTX, mode, unsignedp,
 				       default_label);
 	    }
 
@@ -6377,7 +6375,7 @@
 					expand_expr (node->low, NULL_RTX,
 						     VOIDmode, 0),
 					unsignedp),
-				       LT, NULL_RTX, mode, unsignedp, 0,
+				       LT, NULL_RTX, mode, unsignedp,
 				       default_label);
 	    }
 	  else if (!low_bound && !high_bound)
@@ -6399,7 +6397,7 @@
 				       NULL_RTX, mode, 0);
 				
 	      emit_cmp_and_jump_insns (new_index, new_bound, GT, NULL_RTX,
-				       mode, 1, 0, default_label);
+				       mode, 1, default_label);
 	    }
 
 	  emit_jump (label_rtx (node->code_label));
Index: unroll.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/unroll.c,v
retrieving revision 1.144
diff -u -r1.144 unroll.c
--- unroll.c	2001/11/04 08:12:09	1.144
+++ unroll.c	2001/11/16 02:07:36
@@ -962,7 +962,7 @@
 	    {
 	      emit_cmp_and_jump_insns (initial_value, final_value,
 				       neg_inc ? LE : GE,
-				       NULL_RTX, mode, 0, 0, labels[1]);
+				       NULL_RTX, mode, 0, labels[1]);
 	      predict_insn_def (get_last_insn (), PRED_LOOP_CONDITION, NOT_TAKEN);
 	      JUMP_LABEL (get_last_insn ()) = labels[1];
 	      LABEL_NUSES (labels[1])++;
@@ -1005,7 +1005,7 @@
 		}
 
 	      emit_cmp_and_jump_insns (diff, GEN_INT (abs_inc * cmp_const),
-				       cmp_code, NULL_RTX, mode, 0, 0,
+				       cmp_code, NULL_RTX, mode, 0,
 				       labels[i]);
 	      JUMP_LABEL (get_last_insn ()) = labels[i];
 	      LABEL_NUSES (labels[i])++;
@@ -1039,7 +1039,7 @@
 		}
 
 	      emit_cmp_and_jump_insns (diff, GEN_INT (cmp_const), cmp_code,
-				       NULL_RTX, mode, 0, 0, labels[0]);
+				       NULL_RTX, mode, 0, labels[0]);
 	      JUMP_LABEL (get_last_insn ()) = labels[0];
 	      LABEL_NUSES (labels[0])++;
 	    }
Index: config/i386/i386.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
retrieving revision 1.335
diff -u -r1.335 i386.c
--- i386.c	2001/11/15 17:55:26	1.335
+++ i386.c	2001/11/16 02:07:44
@@ -2444,7 +2444,7 @@
 				   (gpr, NULL_RTX, SImode, EXPAND_NORMAL),
 				   GEN_INT ((REGPARM_MAX - needed_intregs +
 					     1) * 8), GE, const1_rtx, SImode,
-				   1, 1, lab_false);
+				   1, lab_false);
 	}
       if (needed_sseregs)
 	{
@@ -2453,7 +2453,7 @@
 				   GEN_INT ((SSE_REGPARM_MAX -
 					     needed_sseregs + 1) * 16 +
 					    REGPARM_MAX * 8), GE, const1_rtx,
-				   SImode, 1, 1, lab_false);
+				   SImode, 1, lab_false);
 	}
 
       /* Compute index to start of area used for integer regs.  */
@@ -8971,7 +8971,7 @@
   else
     emit_insn (gen_andsi3 (tmpcount, variable, GEN_INT (value)));
   emit_cmp_and_jump_insns (tmpcount, const0_rtx, EQ, 0, GET_MODE (variable),
-			   1, 0, label);
+			   1, label);
   return label;
 }
 
@@ -9138,7 +9138,7 @@
 	{
 	  label = gen_label_rtx ();
 	  emit_cmp_and_jump_insns (countreg, GEN_INT (UNITS_PER_WORD - 1),
-				   LEU, 0, counter_mode, 1, 0, label);
+				   LEU, 0, counter_mode, 1, label);
 	}
       if (align <= 1)
 	{
@@ -9334,7 +9334,7 @@
 	{
 	  label = gen_label_rtx ();
 	  emit_cmp_and_jump_insns (countreg, GEN_INT (UNITS_PER_WORD - 1),
-				   LEU, 0, counter_mode, 1, 0, label);
+				   LEU, 0, counter_mode, 1, label);
 	}
       if (align <= 1)
 	{
@@ -9540,11 +9540,11 @@
 				    NULL_RTX, 0, OPTAB_WIDEN);
 
 	  emit_cmp_and_jump_insns (align_rtx, const0_rtx, EQ, NULL,
-				   Pmode, 1, 0, align_4_label);
+				   Pmode, 1, align_4_label);
 	  emit_cmp_and_jump_insns (align_rtx, GEN_INT (2), EQ, NULL,
-				   Pmode, 1, 0, align_2_label);
+				   Pmode, 1, align_2_label);
 	  emit_cmp_and_jump_insns (align_rtx, GEN_INT (2), GTU, NULL,
-				   Pmode, 1, 0, align_3_label);
+				   Pmode, 1, align_3_label);
 	}
       else
         {
@@ -9555,7 +9555,7 @@
 				    NULL_RTX, 0, OPTAB_WIDEN);
 
 	  emit_cmp_and_jump_insns (align_rtx, const0_rtx, EQ, NULL,
-				   Pmode, 1, 0, align_4_label);
+				   Pmode, 1, align_4_label);
         }
 
       mem = gen_rtx_MEM (QImode, out);
@@ -9564,7 +9564,7 @@
 
       /* Compare the first n unaligned byte on a byte per byte basis.  */
       emit_cmp_and_jump_insns (mem, const0_rtx, EQ, NULL,
-			       QImode, 1, 0, end_0_label);
+			       QImode, 1, end_0_label);
 
       /* Increment the address.  */
       if (TARGET_64BIT)
@@ -9578,7 +9578,7 @@
 	  emit_label (align_2_label);
 
 	  emit_cmp_and_jump_insns (mem, const0_rtx, EQ, NULL,
-				   QImode, 1, 0, end_0_label);
+				   QImode, 1, end_0_label);
 
 	  if (TARGET_64BIT)
 	    emit_insn (gen_adddi3 (out, out, const1_rtx));
@@ -9589,7 +9589,7 @@
 	}
 
       emit_cmp_and_jump_insns (mem, const0_rtx, EQ, NULL,
-			       QImode, 1, 0, end_0_label);
+			       QImode, 1, end_0_label);
 
       if (TARGET_64BIT)
 	emit_insn (gen_adddi3 (out, out, const1_rtx));
@@ -9619,7 +9619,7 @@
 			 GEN_INT (trunc_int_for_mode
 				  (0x80808080, SImode))));
   emit_cmp_and_jump_insns (tmpreg, const0_rtx, EQ, 0,
-			   SImode, 1, 0, align_4_label);
+			   SImode, 1, align_4_label);
 
   if (TARGET_CMOVE)
     {
Index: config/i386/i386.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.md,v
retrieving revision 1.312
diff -u -r1.312 i386.md
--- i386.md	2001/11/04 02:51:23	1.312
+++ i386.md	2001/11/16 02:07:47
@@ -13792,7 +13792,7 @@
 
       emit_move_insn (out, const0_rtx);
 
-      emit_cmp_and_jump_insns (in, const0_rtx, EQ, 0, SImode, 1, 0, label);
+      emit_cmp_and_jump_insns (in, const0_rtx, EQ, 0, SImode, 1, label);
 
       emit_move_insn (hi, out);
       emit_insn (gen_subsi3 (out, out, in));

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Last alignment change for MEM tracking
  2001-11-13 15:03 Richard Kenner
  2001-11-13 15:03 ` Bryce McKinlay
@ 2001-11-13 15:03 ` Stan Shebs
  1 sibling, 0 replies; 21+ messages in thread
From: Stan Shebs @ 2001-11-13 15:03 UTC (permalink / raw)
  To: Richard Kenner; +Cc: bryce, gcc-patches

Richard Kenner wrote:
> 
> I'm doing the checkin for the missing pieces now.  I had them in my sources,
> but an editing error somehow kept them out of the commit I did.

Better, but I still needed the fix below (which I just committed) just
to get the compilation.

> That crash in emit_block_move is not one I see on Alpha, but that
> doesn't prove much, of course.

I'm getting an emit_block_move crash too, with an "x" argument that
is a mem:QI, pretty strange-looking for a block move. :-)  Dale
assures me we really want mem tracking, so I'll persevere.

Stan

2001-11-15  Stan Shebs  <shebs@apple.com>

        * expr.c (expand_expr, case COMPONENT_REF): Fix variable ref.

Index: expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/expr.c,v
retrieving revision 1.377
diff -c -3 -p -r1.377 expr.c
*** expr.c      2001/11/15 23:44:54     1.377
--- expr.c      2001/11/16 04:37:46
*************** expand_expr (exp, target, tmode, modifie
*** 7117,7123 ****
            /* If the field isn't aligned enough to fetch as a memref,
               fetch it as a bit field.  */
            || (mode1 != BLKmode
!               && SLOW_UNALIGNED_ACCESS (mode1, MEM_ALIGN (op))
                && ((TYPE_ALIGN (TREE_TYPE (tem))
                     < GET_MODE_ALIGNMENT (mode))
                    || (bitpos % GET_MODE_ALIGNMENT (mode) != 0)))
--- 7117,7123 ----
            /* If the field isn't aligned enough to fetch as a memref,
               fetch it as a bit field.  */
            || (mode1 != BLKmode
!               && SLOW_UNALIGNED_ACCESS (mode1, MEM_ALIGN (op0))
                && ((TYPE_ALIGN (TREE_TYPE (tem))
                     < GET_MODE_ALIGNMENT (mode))
                    || (bitpos % GET_MODE_ALIGNMENT (mode) != 0)))

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Last alignment change for MEM tracking
@ 2001-11-13 15:03 Richard Kenner
  0 siblings, 0 replies; 21+ messages in thread
From: Richard Kenner @ 2001-11-13 15:03 UTC (permalink / raw)
  To: bryce; +Cc: gcc-patches

    FYI, #ifdef'ing out this block fixes the problem. My bootstrap with c++ 
    and java looks like its going to complete.

    #if 0
      /* If OP0 is not aligned as least as much as the type requires,
         we need to make a temporary, copy OP0 to it, and take the
         address of the temporary.  */

Hmm..  it's hard to see how this block could be hit in C code.  And,
of course, it should work even if it was hit.

Can you send me the .i file that triggers this?

Thanks.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Last alignment change for MEM tracking
@ 2001-11-13 15:03 Richard Kenner
  0 siblings, 0 replies; 21+ messages in thread
From: Richard Kenner @ 2001-11-13 15:03 UTC (permalink / raw)
  To: a.tobler; +Cc: gcc-patches

    On sparc there are some items left:

Thanks.  I put these in.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Last alignment change for MEM tracking
  2001-11-13 15:03 Richard Kenner
  2001-11-13 15:03 ` Stan Shebs
@ 2001-11-13 15:03 ` Andreas Tobler
  1 sibling, 0 replies; 21+ messages in thread
From: Andreas Tobler @ 2001-11-13 15:03 UTC (permalink / raw)
  To: Richard Kenner; +Cc: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 219 bytes --]



Richard Kenner wrote:

> Thu Nov 15 17:57:48 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

>         (emit_cmp_insn): No longer take ALIGN parm; all callers changed.

On sparc there are some items left:

Andreas

[-- Attachment #2: Document --]
[-- Type: application/octet-stream, Size: 1327 bytes --]

--- gcc/gcc/config/sparc/sparc.c.orig	Fri Nov 16 08:37:23 2001
+++ gcc/gcc/config/sparc/sparc.c	Fri Nov 16 08:34:12 2001
@@ -5270,23 +5270,23 @@
     {
     default:
       emit_cmp_insn (result, const0_rtx, NE,
-		     NULL_RTX, mode, 0, 0);
+		     NULL_RTX, mode, 0 );
       break;
     case ORDERED:
     case UNORDERED:
       emit_cmp_insn (result, GEN_INT(3),
 		     (comparison == UNORDERED) ? EQ : NE,
-		     NULL_RTX, mode, 0, 0);
+		     NULL_RTX, mode, 0 );
       break;
     case UNGT:
     case UNGE:
       emit_cmp_insn (result, const1_rtx,
 		     (comparison == UNGT) ? GT : NE,
-		     NULL_RTX, mode, 0, 0);
+		     NULL_RTX, mode, 0);
       break;
     case UNLE:
       emit_cmp_insn (result, const2_rtx, NE,
-		     NULL_RTX, mode, 0, 0);
+		     NULL_RTX, mode, 0);
       break;
     case UNLT:
       tem = gen_reg_rtx (mode);
@@ -5295,7 +5295,7 @@
       else
 	emit_insn (gen_anddi3 (tem, result, const1_rtx));
       emit_cmp_insn (tem, const0_rtx, NE,
-		     NULL_RTX, mode, 0, 0);
+		     NULL_RTX, mode, 0);
       break;
     case UNEQ:
     case LTGT:
@@ -5311,7 +5311,7 @@
 	emit_insn (gen_anddi3 (tem2, tem, const2_rtx));
       emit_cmp_insn (tem2, const0_rtx,
 		     (comparison == UNEQ) ? EQ : NE,
-		     NULL_RTX, mode, 0, 0);
+		     NULL_RTX, mode, 0);
       break;
     }
 }

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Last alignment change for MEM tracking
       [not found] <no.id>
@ 2001-11-13 15:03 ` John David Anglin
  0 siblings, 0 replies; 21+ messages in thread
From: John David Anglin @ 2001-11-13 15:03 UTC (permalink / raw)
  To: John David Anglin; +Cc: kenner, gcc-patches

> Can I just add the definition for "Zero_Cost_Exceptions" to "system.ads" in
> the gcc directory from the installed system.ads?
> 
>    Zero_Cost_Exceptions : constant Boolean := False;

This gets me a little further:

gcc -c -g   -mdisable-indexing -W -Wall -gnatpg -gnata -I- -I. -I../../../gcc/ad
a ../../../gcc/ada/atree.adb
atree.adb:36:01: warning: unrecognized pragma "Style_Checks"
make[3]: *** [atree.o] Error 1

Do I need to update the installed ada to 3.13p first?  This looks more like
an error than a warning.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Last alignment change for MEM tracking
@ 2001-11-13 15:03 Richard Kenner
  2001-11-13 15:03 ` Graham Stott
  0 siblings, 1 reply; 21+ messages in thread
From: Richard Kenner @ 2001-11-13 15:03 UTC (permalink / raw)
  To: bryce; +Cc: gcc-patches

    A couple of occurances in .md files got missed. I'm checking in the 
    following as obvious.

Thanks.  I thought I grepped config/*/*, but I guess I did
config/*/*.c.  Sorry.

    Still got the i686 bootstrap failure.

Can you send me the .i file?

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Last alignment change for MEM tracking
@ 2001-11-13 15:03 David Edelsohn
  0 siblings, 0 replies; 21+ messages in thread
From: David Edelsohn @ 2001-11-13 15:03 UTC (permalink / raw)
  To: Richard Kenner; +Cc: gcc-patches, Stan Shebs

	Are things suppose to be working now?  I find that I still need
the following patch to rs6000.c to avoid "too many arguments" error.

David

Index: rs6000.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.236
diff -c -p -r1.236 rs6000.c
*** rs6000.c	2001/11/16 01:06:37	1.236
--- rs6000.c	2001/11/19 23:12:32
*************** rs6000_emit_move (dest, source, mode)
*** 1935,1940 ****
--- 1935,1941 ----
  	operands[1] = force_const_mem (mode, operands[1]);
        break;
  
+     case TFmode:
      case DFmode:
      case SFmode:
        if (CONSTANT_P (operands[1]) 
*************** rs6000_emit_eh_toc_restore (stacksize)
*** 6594,6600 ****
    emit_label (loop_start);
    
    do_compare_rtx_and_jump (opcode, tocompare, NE, 1,
! 			   SImode, NULL_RTX, 0, NULL_RTX,
  			   no_toc_restore_needed);
    
    mem = gen_rtx_MEM (Pmode, 
--- 6595,6601 ----
    emit_label (loop_start);
    
    do_compare_rtx_and_jump (opcode, tocompare, NE, 1,
! 			   SImode, NULL_RTX, NULL_RTX,
  			   no_toc_restore_needed);
    
    mem = gen_rtx_MEM (Pmode, 
*************** rs6000_emit_eh_toc_restore (stacksize)
*** 6604,6610 ****
  
    emit_label (no_toc_restore_needed);
    do_compare_rtx_and_jump (top_of_stack, bottom_of_stack, EQ, 1,
! 			   Pmode, NULL_RTX, 0, NULL_RTX,
  			   loop_exit);
  
    mem = gen_rtx_MEM (Pmode, bottom_of_stack);
--- 6605,6611 ----
  
    emit_label (no_toc_restore_needed);
    do_compare_rtx_and_jump (top_of_stack, bottom_of_stack, EQ, 1,
! 			   Pmode, NULL_RTX, NULL_RTX,
  			   loop_exit);
  
    mem = gen_rtx_MEM (Pmode, bottom_of_stack);

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Last alignment change for MEM tracking
  2001-11-13 15:03 ` Bryce McKinlay
@ 2001-11-13 15:03   ` Bryce McKinlay
  0 siblings, 0 replies; 21+ messages in thread
From: Bryce McKinlay @ 2001-11-13 15:03 UTC (permalink / raw)
  To: Richard Kenner; +Cc: gcc-patches

Bryce McKinlay wrote:

> Still got the i686 bootstrap failure.


FYI, #ifdef'ing out this block fixes the problem. My bootstrap with c++ 
and java looks like its going to complete.

#if 0
      /* If OP0 is not aligned as least as much as the type requires,
         we need to make a temporary, copy OP0 to it, and take the
         address of the temporary.  */
      if (expr_align (TREE_OPERAND (exp, 0)) > MEM_ALIGN (op0))
        {
          tree inner_type = TREE_TYPE (TREE_OPERAND (exp, 0));
          rtx new
        = assign_stack_temp_for_type
          (TYPE_MODE (inner_type),
           MEM_SIZE (op0) ? INTVAL (MEM_SIZE (op0))
           : int_size_in_bytes (TREE_TYPE (inner_type)),
           1, build_qualified_type (inner_type,
                        (TYPE_QUALS (inner_type)
                         | TYPE_QUAL_CONST)));

          emit_block_move (new, op0, expr_size (TREE_OPERAND (exp, 0)));
          op0 = new;
        }
#endif


Bryce.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Last alignment change for MEM tracking
@ 2001-11-13 15:03 Richard Kenner
  2001-11-13 15:03 ` Bryce McKinlay
  2001-11-13 15:03 ` Stan Shebs
  0 siblings, 2 replies; 21+ messages in thread
From: Richard Kenner @ 2001-11-13 15:03 UTC (permalink / raw)
  To: bryce; +Cc: gcc-patches

I'm doing the checkin for the missing pieces now.  I had them in my sources,
but an editing error somehow kept them out of the commit I did.

That crash in emit_block_move is not one I see on Alpha, but that
doesn't prove much, of course.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Last alignment change for MEM tracking
@ 2001-11-13 15:03 Richard Kenner
  0 siblings, 0 replies; 21+ messages in thread
From: Richard Kenner @ 2001-11-13 15:03 UTC (permalink / raw)
  To: dave; +Cc: gcc-patches

    Do I need to update the installed ada to 3.13p first?  

Yes.  Normally you need the no earlier than the previous version to compile
GNAT, but 3.13 will work to compile 3.15.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Last alignment change for MEM tracking
@ 2001-11-13 15:03 Richard Kenner
  0 siblings, 0 replies; 21+ messages in thread
From: Richard Kenner @ 2001-11-13 15:03 UTC (permalink / raw)
  To: shebs; +Cc: gcc-patches

    Really?  I just updated my sources, and have had to tweak function
    calls with extra arguments in builtins.c, doloop.c, and expmed.c
    so far, no end in sight.  This is regular code too, not conditionalized
    for Darwin or anything like that.  So I don't see how you could have
    gotten through a first-stage build, let alone a bootstrap, which seems
    like a reasonable expectation for a change of this scale.

Looks like some hunks somehow didn't get included.  Let me run another
diff and pick them up.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Last alignment change for MEM tracking
  2001-11-13 15:03 Richard Kenner
@ 2001-11-13 15:03 ` Stan Shebs
  2001-11-13 15:03   ` Bryce McKinlay
  2001-11-13 15:03 ` Andreas Tobler
  1 sibling, 1 reply; 21+ messages in thread
From: Stan Shebs @ 2001-11-13 15:03 UTC (permalink / raw)
  To: Richard Kenner; +Cc: gcc-patches

Richard Kenner wrote:
> 
> This large change completes (modulo bugs) the alignment changes that were
> the driving force behind the MEM tracking changes.  It removes the ALIGN
> parameter from many more functions and uses the value from the MEM instead.
> 
> [...]
> 
> Tested on alphaev56-dec-osf4.0c.

Really?  I just updated my sources, and have had to tweak function
calls with extra arguments in builtins.c, doloop.c, and expmed.c
so far, no end in sight.  This is regular code too, not conditionalized
for Darwin or anything like that.  So I don't see how you could have
gotten through a first-stage build, let alone a bootstrap, which seems
like a reasonable expectation for a change of this scale.

I guess I'll go back to working on Apple's GCC until this change
is finished.

Stan

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Last alignment change for MEM tracking
  2001-11-13 15:03 Richard Kenner
@ 2001-11-13 15:03 ` Graham Stott
  0 siblings, 0 replies; 21+ messages in thread
From: Graham Stott @ 2001-11-13 15:03 UTC (permalink / raw)
  To: Richard Kenner; +Cc: bryce, gcc-patches

Richard,

Richard Kenner wrote:
> 
>     A couple of occurances in .md files got missed. I'm checking in the
>     following as obvious.
> 
> Thanks.  I thought I grepped config/*/*, but I guess I did
> config/*/*.c.  Sorry.
> 
>     Still got the i686 bootstrap failure.
> 
> Can you send me the .i file?

One problem I've noticed in optabs.c is the calls to gen_cmpstrxx are
passing the wrong argument type for the 5th paramater which requires
a (rtx) but is being passed an (unsigned int).

Unfortunately this still doesn't get us back to bootstrap land on x86.

Graham

ChangeLog

	* optabs.c (prepare_cmp_insn): Correct lossage in last change
	OPALIGN type.

Index: optabs.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/optabs.c,v
retrieving revision 1.117
diff -c -p -r1.117 optabs.c
*** optabs.c    2001/11/15 23:44:57     1.117
--- optabs.c    2001/11/16 12:03:46
*************** prepare_cmp_insn (px, py, pcomparison, s
*** 3101,3108 ****
      {
        rtx result;
        enum machine_mode result_mode;
!       unsigned int opalign ATTRIBUTE_UNUSED
!       = (MIN (MEM_ALIGN (x), MEM_ALIGN (y)) / BITS_PER_UNIT);

        emit_queue ();
        x = protect_from_queue (x, 0);
--- 3101,3108 ----
      {
        rtx result;
        enum machine_mode result_mode;
!       rtx opalign ATTRIBUTE_UNUSED
!       = GEN_INT (MIN (MEM_ALIGN (x), MEM_ALIGN (y)) / BITS_PER_UNIT);

        emit_queue ();
        x = protect_from_queue (x, 0);

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Last alignment change for MEM tracking
@ 2001-11-13 15:03 Richard Kenner
  0 siblings, 0 replies; 21+ messages in thread
From: Richard Kenner @ 2001-11-13 15:03 UTC (permalink / raw)
  To: grahams; +Cc: gcc-patches

    One problem I've noticed in optabs.c is the calls to gen_cmpstrxx are
    passing the wrong argument type for the 5th paramater which requires
    a (rtx) but is being passed an (unsigned int).

Oops.  This is OK.

    Unfortunately this still doesn't get us back to bootstrap land on x86.

I have a fix for that which should be checked in in under 20 minutes.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Last alignment change for MEM tracking
@ 2001-11-13 15:03 John David Anglin
  0 siblings, 0 replies; 21+ messages in thread
From: John David Anglin @ 2001-11-13 15:03 UTC (permalink / raw)
  To: gcc-patches

More fallout:

gcc -c  -DIN_GCC    -g  -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional   -DHAVE_CONFIG_H    -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/config -I../../gcc/../include \
	../../gcc/config/pa/pa.c -o pa.o
../../gcc/config/pa/pa.c: In function `emit_move_sequence':
../../gcc/config/pa/pa.c:1212: warning: passing arg 1 of `alter_subreg' from incompatible pointer type
../../gcc/config/pa/pa.c:1229: warning: passing arg 1 of `alter_subreg' from incompatible pointer type
../../gcc/config/pa/pa.c: In function `return_addr_rtx':
../../gcc/config/pa/pa.c:3556: too many arguments to function `emit_cmp_insn'
../../gcc/config/pa/pa.c:3561: too many arguments to function `emit_cmp_insn'
../../gcc/config/pa/pa.c:3566: too many arguments to function `emit_cmp_insn'
../../gcc/config/pa/pa.c:3570: warning: integer constant is unsigned in ANSI C, signed with -traditional
../../gcc/config/pa/pa.c:3571: too many arguments to function `emit_cmp_insn'
make[2]: *** [pa.o] Error 1
make[2]: Leaving directory `/xxx/gnu/gcc-3.1/objdir/gcc'
make[1]: *** [stage1_build] Error 2
make[1]: Leaving directory `/xxx/gnu/gcc-3.1/objdir/gcc'
make: *** [bootstrap-lean] Error 2

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Last alignment change for MEM tracking
@ 2001-11-13 15:03 Richard Kenner
  0 siblings, 0 replies; 21+ messages in thread
From: Richard Kenner @ 2001-11-13 15:03 UTC (permalink / raw)
  To: dje; +Cc: gcc-patches

    Are things suppose to be working now?  

They are indeed "supposed to".

    I find that I still need the following patch to rs6000.c to avoid "too
    many arguments" error.

Well the first hunks looks unrelated but the second two certainly look right
to me.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Last alignment change for MEM tracking
@ 2001-11-13 15:03 Richard Kenner
  2001-11-13 15:03 ` Stan Shebs
  2001-11-13 15:03 ` Andreas Tobler
  0 siblings, 2 replies; 21+ messages in thread
From: Richard Kenner @ 2001-11-13 15:03 UTC (permalink / raw)
  To: gcc-patches

This large change completes (modulo bugs) the alignment changes that were
the driving force behind the MEM tracking changes.  It removes the ALIGN
parameter from many more functions and uses the value from the MEM instead.

Also, now that each MEM has a known alignment, expand_expr need not return
a MEM that's at the alignment of the type.  This means expand_expr_unaligned
is no longer needed, but an ADDR_EXPR must copy the object if it is not
sufficiently aligned.

This also contains a few minor changes to MEM aliasing stuff which were
noticed when testing this change.

Tested on alphaev56-dec-osf4.0c.

Thu Nov 15 17:57:48 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* alias.c (nonoverlapping_memrefs): Use REGNO_PTR_FRAME_P.
	* emit-rtl.c (change_address): Fix typo in default alignment.
	(adjust_address_1): Use mode of NEW, not MODE, when setting size.
	* expr.c (highest_pow2_factor, case WITH_RECORD_EXPR): New case.
	* rtl.h (REGNO_PTR_FRAME_P): New macro.

	* expr.c (store_field): Pass tree instead of max size; callers changed.
	Change handling of alignment.
	Only copy to_rtx if is TARGET.
	(expand_expr_unaligned): Delete; callers now use expand_expr.
	(emit_cmp_insn): No longer take ALIGN parm; all callers changed.
	(expand_assignment): Change handling of alignment.
	Only copy to_rtx if was original.
	(get_inner_reference): No longer return alginment; callers changed.
	(expand_expr, case COMPONENT_REF): Change handling of alignment.
	(expand_expr, case ADDR_EXPR): Make copy if not sufficiently aligned.
	(compare_from_rtx): Delete ALIGN parm; all callers changed.
	(do_compare_rtx_and_jump): Likewise.
	* expr.h: Reflect above changes.
	* tree.h: Likewise.
	* dwarf2out.c (loc_descriptor_from_tree): Remove ALIGN parameter
	to get_inner_reference.
	* except.c: Remove ALIGN parameter in call to emit_cmp_and_jump_insns.
	* explow.c: Likewise.
	* loop.c: Likewise.
	* optabs.c: Likewise.
	(prepare_cmp_insn): Now static; remove ALIGN parm.  Callers changed.
	(emit_cmp_and_jump_insns): Remove ALIGN parm; all callers changed.
	* fold-const.c: Remove PALIGN in calls to get_inner_reference.
	* function.c (assign_stack_temp_for_type): No longer static.
	* optabs.h (emit_cmp_insn): Remove ALIGN parm.
	(prepare_cmp_insn): Delete declaration.
	* rtl.h (assign_stack_temp_for_type): Add declaration.
	* config/d30v/d30v.c: Reflect above changes.
	* config/i860/i860.c, config/ia64/ia64.c: Likewise.
	* config/rs6000/rs6000.c, config/sh/sh.c: Likewise.
	* ada/trans.c, ada/utils2.c: Remove PALIGN parameter to
	get_inner_reference.

*** alias.c	2001/11/12 16:56:48	1.155
--- alias.c	2001/11/15 20:18:01
*************** nonoverlapping_memrefs_p (x, y)
*** 1807,1813 ****
        return ((CONSTANT_P (basex) && CONSTANT_P (basey))
  	      || (CONSTANT_P (basex) && REG_P (basey)
! 		  && REGNO (basey) <= LAST_VIRTUAL_REGISTER)
  	      || (CONSTANT_P (basey) && REG_P (basex)
! 		  && REGNO (basex) <= LAST_VIRTUAL_REGISTER));
  
    sizex = (GET_CODE (rtlx) != MEM ? GET_MODE_SIZE (GET_MODE (rtlx))
--- 1807,1813 ----
        return ((CONSTANT_P (basex) && CONSTANT_P (basey))
  	      || (CONSTANT_P (basex) && REG_P (basey)
! 		  && REGNO_PTR_FRAME_P (REGNO (basey)))
  	      || (CONSTANT_P (basey) && REG_P (basex)
! 		  && REGNO_PTR_FRAME_P (REGNO (basex))));
  
    sizex = (GET_CODE (rtlx) != MEM ? GET_MODE_SIZE (GET_MODE (rtlx))
*** dwarf2out.c	2001/11/15 17:55:25	1.329
--- dwarf2out.c	2001/11/15 20:20:28
*************** loc_descriptor_from_tree (loc, addressp)
*** 7942,7949 ****
  	enum machine_mode mode;
  	int volatilep;
- 	unsigned int alignment;
  
  	obj = get_inner_reference (loc, &bitsize, &bitpos, &offset, &mode,
! 				   &unsignedp, &volatilep, &alignment);
  
  	if (obj == loc)
--- 7942,7948 ----
  	enum machine_mode mode;
  	int volatilep;
  
  	obj = get_inner_reference (loc, &bitsize, &bitpos, &offset, &mode,
! 				   &unsignedp, &volatilep);
  
  	if (obj == loc)
*** emit-rtl.c	2001/11/13 16:45:17	1.225
--- emit-rtl.c	2001/11/15 20:20:52
*************** change_address (memref, mode, addr)
*** 1863,1867 ****
      = get_mem_attrs (MEM_ALIAS_SET (memref), 0, 0,
  		     mmode == BLKmode ? 0 : GEN_INT (GET_MODE_SIZE (mmode)),
! 		     mmode == BLKmode ? 1 : GET_MODE_ALIGNMENT (mmode),
  		     mmode);
  
--- 1863,1868 ----
      = get_mem_attrs (MEM_ALIAS_SET (memref), 0, 0,
  		     mmode == BLKmode ? 0 : GEN_INT (GET_MODE_SIZE (mmode)),
! 		     (mmode == BLKmode ? BITS_PER_UNIT
! 		      : GET_MODE_ALIGNMENT (mmode)),
  		     mmode);
  
*************** adjust_address_1 (memref, mode, offset, 
*** 1916,1921 ****
  
    /* We can compute the size in a number of ways.  */
!   if (mode != BLKmode)
!     size = GEN_INT (GET_MODE_SIZE (mode));
    else if (MEM_SIZE (memref))
      size = plus_constant (MEM_SIZE (memref), -offset);
--- 1917,1922 ----
  
    /* We can compute the size in a number of ways.  */
!   if (GET_MODE (new) != BLKmode)
!     size = GEN_INT (GET_MODE_SIZE (GET_MODE (new)));
    else if (MEM_SIZE (memref))
      size = plus_constant (MEM_SIZE (memref), -offset);
*** except.c	2001/11/11 11:25:17	1.200
--- except.c	2001/11/15 20:21:15
*************** build_post_landing_pads ()
*** 1753,1758 ****
  		  emit_cmp_and_jump_insns (cfun->eh->filter,
  					   GEN_INT (c->u.catch.filter),
! 					   EQ, NULL_RTX, word_mode,
! 					   0, 0, c->label);
  	      }
  	  }
--- 1753,1758 ----
  		  emit_cmp_and_jump_insns (cfun->eh->filter,
  					   GEN_INT (c->u.catch.filter),
! 					   EQ, NULL_RTX, word_mode, 0,
! 					   c->label);
  	      }
  	  }
*************** build_post_landing_pads ()
*** 1780,1785 ****
  	  emit_cmp_and_jump_insns (cfun->eh->filter,
  				   GEN_INT (region->u.allowed.filter),
! 				   EQ, NULL_RTX, word_mode, 0, 0,
! 				   region->label);
  
  	  /* We delay the generation of the _Unwind_Resume until we generate
--- 1780,1784 ----
  	  emit_cmp_and_jump_insns (cfun->eh->filter,
  				   GEN_INT (region->u.allowed.filter),
! 				   EQ, NULL_RTX, word_mode, 0, region->label);
  
  	  /* We delay the generation of the _Unwind_Resume until we generate
*************** sjlj_emit_function_enter (dispatch_label
*** 2153,2158 ****
  
      emit_cmp_and_jump_insns (x, const0_rtx, NE, 0,
! 			     TYPE_MODE (integer_type_node), 0, 0,
! 			     dispatch_label);
    }
  #else
--- 2152,2156 ----
  
      emit_cmp_and_jump_insns (x, const0_rtx, NE, 0,
! 			     TYPE_MODE (integer_type_node), 0, dispatch_label);
    }
  #else
*************** sjlj_emit_dispatch_table (dispatch_label
*** 2262,2268 ****
  	}
  
!       emit_cmp_and_jump_insns (dispatch,
! 			       GEN_INT (lp_info[i].dispatch_index), EQ,
! 			       NULL_RTX, TYPE_MODE (integer_type_node), 0, 0,
  			       cfun->eh->region_array[i]->post_landing_pad);
      }
--- 2260,2265 ----
  	}
  
!       emit_cmp_and_jump_insns (dispatch, GEN_INT (lp_info[i].dispatch_index),
! 			       EQ, NULL_RTX, TYPE_MODE (integer_type_node), 0,
  			       cfun->eh->region_array[i]->post_landing_pad);
      }
*** explow.c	2001/11/13 14:12:02	1.83
--- explow.c	2001/11/15 20:21:30
*************** allocate_dynamic_stack_space (size, targ
*** 1349,1353 ****
  #endif
  	  emit_cmp_and_jump_insns (available, size, GEU, NULL_RTX, Pmode, 1,
! 				   0, space_available);
  #ifdef HAVE_trap
  	  if (HAVE_trap)
--- 1349,1353 ----
  #endif
  	  emit_cmp_and_jump_insns (available, size, GEU, NULL_RTX, Pmode, 1,
! 				   space_available);
  #ifdef HAVE_trap
  	  if (HAVE_trap)
*************** probe_stack_range (first, size)
*** 1565,1569 ****
        emit_label (test_lab);
        emit_cmp_and_jump_insns (test_addr, last_addr, CMP_OPCODE,
! 			       NULL_RTX, Pmode, 1, 0, loop_lab);
        emit_jump (end_lab);
        emit_note (NULL, NOTE_INSN_LOOP_END);
--- 1565,1569 ----
        emit_label (test_lab);
        emit_cmp_and_jump_insns (test_addr, last_addr, CMP_OPCODE,
! 			       NULL_RTX, Pmode, 1, loop_lab);
        emit_jump (end_lab);
        emit_note (NULL, NOTE_INSN_LOOP_END);
*** expr.c	2001/11/13 16:45:17	1.376
--- expr.c	2001/11/15 20:23:30
*************** static void store_constructor	PARAMS ((t
*** 159,169 ****
  static rtx store_field		PARAMS ((rtx, HOST_WIDE_INT,
  					 HOST_WIDE_INT, enum machine_mode,
! 					 tree, enum machine_mode, int,
! 					 HOST_WIDE_INT, int));
  static enum memory_use_mode
    get_memory_usage_from_modifier PARAMS ((enum expand_modifier));
  static rtx var_rtx		PARAMS ((tree));
  static HOST_WIDE_INT highest_pow2_factor PARAMS ((tree));
- static rtx expand_expr_unaligned PARAMS ((tree, unsigned int *));
  static rtx expand_increment	PARAMS ((tree, int, int));
  static void do_jump_by_parts_greater PARAMS ((tree, int, rtx, rtx));
--- 159,168 ----
  static rtx store_field		PARAMS ((rtx, HOST_WIDE_INT,
  					 HOST_WIDE_INT, enum machine_mode,
! 					 tree, enum machine_mode, int, tree,
! 					 int));
  static enum memory_use_mode
    get_memory_usage_from_modifier PARAMS ((enum expand_modifier));
  static rtx var_rtx		PARAMS ((tree));
  static HOST_WIDE_INT highest_pow2_factor PARAMS ((tree));
  static rtx expand_increment	PARAMS ((tree, int, int));
  static void do_jump_by_parts_greater PARAMS ((tree, int, rtx, rtx));
*************** convert_move (to, from, unsignedp)
*** 878,882 ****
  	    {
  	      emit_cmp_insn (lowfrom, const0_rtx, NE, NULL_RTX,
! 			     lowpart_mode, 0, 0);
  	      fill_value = gen_reg_rtx (word_mode);
  	      emit_insn (gen_slt (fill_value));
--- 877,881 ----
  	    {
  	      emit_cmp_insn (lowfrom, const0_rtx, NE, NULL_RTX,
! 			     lowpart_mode, 0);
  	      fill_value = gen_reg_rtx (word_mode);
  	      emit_insn (gen_slt (fill_value));
*************** expand_assignment (to, from, want_value,
*** 3717,3729 ****
        enum machine_mode mode1;
        HOST_WIDE_INT bitsize, bitpos;
        tree offset;
        int unsignedp;
        int volatilep = 0;
        tree tem;
-       unsigned int alignment;
  
        push_temp_slots ();
        tem = get_inner_reference (to, &bitsize, &bitpos, &offset, &mode1,
! 				 &unsignedp, &volatilep, &alignment);
  
        /* If we are going to use store_bit_field and extract_bit_field,
--- 3716,3728 ----
        enum machine_mode mode1;
        HOST_WIDE_INT bitsize, bitpos;
+       rtx orig_to_rtx;
        tree offset;
        int unsignedp;
        int volatilep = 0;
        tree tem;
  
        push_temp_slots ();
        tem = get_inner_reference (to, &bitsize, &bitpos, &offset, &mode1,
! 				 &unsignedp, &volatilep);
  
        /* If we are going to use store_bit_field and extract_bit_field,
*************** expand_assignment (to, from, want_value,
*** 3733,3737 ****
  	tem = stabilize_reference (tem);
  
!       to_rtx = expand_expr (tem, NULL_RTX, VOIDmode, EXPAND_MEMORY_USE_DONT);
        if (offset != 0)
  	{
--- 3732,3737 ----
  	tem = stabilize_reference (tem);
  
!       orig_to_rtx = to_rtx
! 	= expand_expr (tem, NULL_RTX, VOIDmode, EXPAND_MEMORY_USE_DONT);
        if (offset != 0)
  	{
*************** expand_assignment (to, from, want_value,
*** 3754,3761 ****
  	      && GET_MODE (to_rtx) == BLKmode
  	      && GET_MODE (XEXP (to_rtx, 0)) != VOIDmode
! 	      && bitsize
  	      && (bitpos % bitsize) == 0
  	      && (bitsize % GET_MODE_ALIGNMENT (mode1)) == 0
! 	      && alignment == GET_MODE_ALIGNMENT (mode1))
  	    {
  	      rtx temp
--- 3754,3761 ----
  	      && GET_MODE (to_rtx) == BLKmode
  	      && GET_MODE (XEXP (to_rtx, 0)) != VOIDmode
! 	      && bitsize > 0
  	      && (bitpos % bitsize) == 0
  	      && (bitsize % GET_MODE_ALIGNMENT (mode1)) == 0
! 	      && MEM_ALIGN (to_rtx) == GET_MODE_ALIGNMENT (mode1))
  	    {
  	      rtx temp
*************** expand_assignment (to, from, want_value,
*** 3775,3796 ****
  	}
  
-       if (volatilep)
- 	{
- 	  if (GET_CODE (to_rtx) == MEM)
- 	    {
- 	      /* When the offset is zero, to_rtx is the address of the
- 		 structure we are storing into, and hence may be shared.
- 		 We must make a new MEM before setting the volatile bit.  */
- 	      if (offset == 0)
- 		to_rtx = copy_rtx (to_rtx);
  
! 	      MEM_VOLATILE_P (to_rtx) = 1;
! 	    }
! #if 0  /* This was turned off because, when a field is volatile
! 	  in an object which is not volatile, the object may be in a register,
! 	  and then we would abort over here.  */
! 	  else
! 	    abort ();
! #endif
  	}
  
--- 3775,3786 ----
  	}
  
  
!       /* Deal with volatile and readonly fields.  The former is only done
! 	 for MEM.  Also set MEM_KEEP_ALIAS_SET_P if needed.  */
!       if (volatilep && GET_CODE (to_rtx) == MEM)
! 	{
! 	  if (to_rtx == orig_to_rtx)
! 	    to_rtx = copy_rtx (to_rtx);
! 	  MEM_VOLATILE_P (to_rtx) = 1;
  	}
  
*************** expand_assignment (to, from, want_value,
*** 3798,3807 ****
  	  && TREE_READONLY (TREE_OPERAND (to, 1)))
  	{
! 	  if (offset == 0)
  	    to_rtx = copy_rtx (to_rtx);
- 
  	  RTX_UNCHANGING_P (to_rtx) = 1;
  	}
  
        /* Check the access.  */
        if (current_function_check_memory_usage && GET_CODE (to_rtx) == MEM)
--- 3788,3803 ----
  	  && TREE_READONLY (TREE_OPERAND (to, 1)))
  	{
! 	  if (to_rtx == orig_to_rtx)
  	    to_rtx = copy_rtx (to_rtx);
  	  RTX_UNCHANGING_P (to_rtx) = 1;
  	}
  
+       if (! can_address_p (to))
+ 	{
+ 	  if (to_rtx == orig_to_rtx)
+ 	    to_rtx = copy_rtx (to_rtx);
+ 	  MEM_KEEP_ALIAS_SET_P (to_rtx) = 1;
+ 	}
+ 
        /* Check the access.  */
        if (current_function_check_memory_usage && GET_CODE (to_rtx) == MEM)
*************** expand_assignment (to, from, want_value,
*** 3833,3881 ****
  	  in_check_memory_usage = 0;
  	}
- 
-       /* If this is a varying-length object, we must get the address of
- 	 the source and do an explicit block move.  */
-       if (bitsize < 0)
- 	{
- 	  unsigned int from_align;
- 	  rtx from_rtx = expand_expr_unaligned (from, &from_align);
- 	  rtx inner_to_rtx
- 	    = adjust_address (to_rtx, BLKmode, bitpos / BITS_PER_UNIT);
  
! 	  emit_block_move (inner_to_rtx, from_rtx, expr_size (from));
  
! 	  free_temp_slots ();
! 	  pop_temp_slots ();
! 	  return to_rtx;
! 	}
!       else
! 	{
! 	  if (! can_address_p (to))
! 	    {
! 	      to_rtx = copy_rtx (to_rtx);
! 	      MEM_KEEP_ALIAS_SET_P (to_rtx) = 1;
! 	    }
  
! 	  result = store_field (to_rtx, bitsize, bitpos, mode1, from,
! 				(want_value
! 				 /* Spurious cast for HPUX compiler.  */
! 				 ? ((enum machine_mode)
! 				    TYPE_MODE (TREE_TYPE (to)))
! 				 : VOIDmode),
! 				unsignedp, int_size_in_bytes (TREE_TYPE (tem)),
! 				get_alias_set (to));
! 
! 	  preserve_temp_slots (result);
! 	  free_temp_slots ();
! 	  pop_temp_slots ();
! 
! 	  /* If the value is meaningful, convert RESULT to the proper mode.
! 	     Otherwise, return nothing.  */
! 	  return (want_value ? convert_modes (TYPE_MODE (TREE_TYPE (to)),
! 					      TYPE_MODE (TREE_TYPE (from)),
! 					      result,
! 					      TREE_UNSIGNED (TREE_TYPE (to)))
! 		  : NULL_RTX);
! 	}
      }
  
--- 3829,3852 ----
  	  in_check_memory_usage = 0;
  	}
  
!       result = store_field (to_rtx, bitsize, bitpos, mode1, from,
! 			    (want_value
! 			     /* Spurious cast for HPUX compiler.  */
! 			     ? ((enum machine_mode)
! 				TYPE_MODE (TREE_TYPE (to)))
! 			     : VOIDmode),
! 			    unsignedp, TREE_TYPE (tem), get_alias_set (to));
  
!       preserve_temp_slots (result);
!       free_temp_slots ();
!       pop_temp_slots ();
  
!       /* If the value is meaningful, convert RESULT to the proper mode.
! 	 Otherwise, return nothing.  */
!       return (want_value ? convert_modes (TYPE_MODE (TREE_TYPE (to)),
! 					  TYPE_MODE (TREE_TYPE (from)),
! 					  result,
! 					  TREE_UNSIGNED (TREE_TYPE (to)))
! 	      : NULL_RTX);
      }
  
*************** store_expr (exp, target, want_value)
*** 4320,4324 ****
  		  label = gen_label_rtx ();
  		  emit_cmp_and_jump_insns (size, const0_rtx, LT, NULL_RTX,
! 					   GET_MODE (size), 0, 0, label);
  		}
  
--- 4291,4295 ----
  		  label = gen_label_rtx ();
  		  emit_cmp_and_jump_insns (size, const0_rtx, LT, NULL_RTX,
! 					   GET_MODE (size), 0, label);
  		}
  
*************** store_constructor_field (target, bitsize
*** 4496,4501 ****
      }
    else
!     store_field (target, bitsize, bitpos, mode, exp, VOIDmode, 0,
! 		 int_size_in_bytes (type), alias_set);
  }
  
--- 4467,4472 ----
      }
    else
!     store_field (target, bitsize, bitpos, mode, exp, VOIDmode, 0, type,
! 		 alias_set);
  }
  
*************** store_constructor (exp, target, cleared,
*** 5127,5131 ****
     In this case, UNSIGNEDP must be nonzero if the value is an unsigned type.
  
!    TOTAL_SIZE is the size in bytes of the structure, or -1 if varying.
  
     ALIAS_SET is the alias set for the destination.  This value will
--- 5098,5102 ----
     In this case, UNSIGNEDP must be nonzero if the value is an unsigned type.
  
!    TYPE is the type of the underlying object,
  
     ALIAS_SET is the alias set for the destination.  This value will
*************** store_constructor (exp, target, cleared,
*** 5134,5139 ****
  
  static rtx
! store_field (target, bitsize, bitpos, mode, exp, value_mode, unsignedp,
! 	     total_size, alias_set)
       rtx target;
       HOST_WIDE_INT bitsize;
--- 5105,5110 ----
  
  static rtx
! store_field (target, bitsize, bitpos, mode, exp, value_mode, unsignedp, type,
! 	     alias_set)
       rtx target;
       HOST_WIDE_INT bitsize;
*************** store_field (target, bitsize, bitpos, mo
*** 5143,5147 ****
       enum machine_mode value_mode;
       int unsignedp;
!      HOST_WIDE_INT total_size;
       int alias_set;
  {
--- 5114,5118 ----
       enum machine_mode value_mode;
       int unsignedp;
!      tree type;
       int alias_set;
  {
*************** store_field (target, bitsize, bitpos, mo
*** 5155,5160 ****
    if (bitsize == 0)
      return expand_expr (exp, const0_rtx, VOIDmode, 0);
! 
!   if (bitsize < HOST_BITS_PER_WIDE_INT)
      width_mask = ((HOST_WIDE_INT) 1 << bitsize) - 1;
  
--- 5126,5130 ----
    if (bitsize == 0)
      return expand_expr (exp, const0_rtx, VOIDmode, 0);
!   else if (bitsize >=0 && bitsize < HOST_BITS_PER_WIDE_INT)
      width_mask = ((HOST_WIDE_INT) 1 << bitsize) - 1;
  
*************** store_field (target, bitsize, bitpos, mo
*** 5175,5196 ****
        rtx object
  	= assign_temp
! 	  (build_qualified_type (type_for_mode (GET_MODE (target), 0),
! 				 TYPE_QUAL_CONST),
  	   0, 1, 1);
        rtx blk_object = copy_rtx (object);
  
        PUT_MODE (blk_object, BLKmode);
!       set_mem_alias_set (blk_object, 0);
  
        if (bitsize != (HOST_WIDE_INT) GET_MODE_BITSIZE (GET_MODE (target)))
  	emit_move_insn (object, target);
  
!       store_field (blk_object, bitsize, bitpos, mode, exp, VOIDmode, 0,
! 		   total_size, alias_set);
  
-       /* Even though we aren't returning target, we need to
- 	 give it the updated value.  */
        emit_move_insn (target, object);
  
        return blk_object;
      }
--- 5145,5164 ----
        rtx object
  	= assign_temp
! 	  (build_qualified_type (type, TYPE_QUALS (type) | TYPE_QUAL_CONST),
  	   0, 1, 1);
        rtx blk_object = copy_rtx (object);
  
        PUT_MODE (blk_object, BLKmode);
!       MEM_COPY_ATTRIBUTES (blk_object, object);
  
        if (bitsize != (HOST_WIDE_INT) GET_MODE_BITSIZE (GET_MODE (target)))
  	emit_move_insn (object, target);
  
!       store_field (blk_object, bitsize, bitpos, mode, exp, VOIDmode, 0, type,
! 		   alias_set);
  
        emit_move_insn (target, object);
  
+       /* We want to return the BLKmode version of the data.  */
        return blk_object;
      }
*************** store_field (target, bitsize, bitpos, mo
*** 5220,5226 ****
  	  && (MEM_ALIGN (target) < GET_MODE_ALIGNMENT (mode)
  	      || bitpos % GET_MODE_ALIGNMENT (mode)))
-       || (mode == BLKmode && SLOW_UNALIGNED_ACCESS (mode, MEM_ALIGN (target))
- 	  && (TYPE_ALIGN (TREE_TYPE (exp)) > MEM_ALIGN (target)
- 	      || bitpos % TYPE_ALIGN (TREE_TYPE (exp)) != 0))
        /* If the RHS and field are a constant size and the size of the
  	 RHS isn't the same size as the bitfield, we must use bitfield
--- 5188,5191 ----
*************** store_field (target, bitsize, bitpos, mo
*** 5261,5267 ****
  	  target = adjust_address (target, VOIDmode, bitpos / BITS_PER_UNIT);
  	  emit_block_move (target, temp,
! 			   bitsize == -1 ? expr_size (exp)
! 			   : GEN_INT ((bitsize + BITS_PER_UNIT - 1)
! 				      / BITS_PER_UNIT));
  
  	  return value_mode == VOIDmode ? const0_rtx : target;
--- 5226,5231 ----
  	  target = adjust_address (target, VOIDmode, bitpos / BITS_PER_UNIT);
  	  emit_block_move (target, temp,
! 			   GEN_INT ((bitsize + BITS_PER_UNIT - 1)
! 				    / BITS_PER_UNIT));
  
  	  return value_mode == VOIDmode ? const0_rtx : target;
*************** store_field (target, bitsize, bitpos, mo
*** 5269,5273 ****
  
        /* Store the value in the bitfield.  */
!       store_bit_field (target, bitsize, bitpos, mode, temp, total_size);
        if (value_mode != VOIDmode)
  	{
--- 5233,5239 ----
  
        /* Store the value in the bitfield.  */
!       store_bit_field (target, bitsize, bitpos, mode, temp,
! 		       int_size_in_bytes (type));
! 
        if (value_mode != VOIDmode)
  	{
*************** store_field (target, bitsize, bitpos, mo
*** 5299,5303 ****
  	  return extract_bit_field (target, bitsize, bitpos, unsignedp,
  				    NULL_RTX, value_mode, VOIDmode,
! 				    total_size);
  	}
        return const0_rtx;
--- 5265,5269 ----
  	  return extract_bit_field (target, bitsize, bitpos, unsignedp,
  				    NULL_RTX, value_mode, VOIDmode,
! 				    int_size_in_bytes (type));
  	}
        return const0_rtx;
*************** store_field (target, bitsize, bitpos, mo
*** 5306,5310 ****
      {
        rtx addr = XEXP (target, 0);
!       rtx to_rtx;
  
        /* If a value is wanted, it must be the lhs;
--- 5272,5276 ----
      {
        rtx addr = XEXP (target, 0);
!       rtx to_rtx = target;
  
        /* If a value is wanted, it must be the lhs;
*************** store_field (target, bitsize, bitpos, mo
*** 5318,5334 ****
  		&& (XEXP (addr, 0) == virtual_incoming_args_rtx
  		    || XEXP (addr, 0) == virtual_stack_vars_rtx)))
! 	target = replace_equiv_address (target, copy_to_reg (addr));
  
        /* Now build a reference to just the desired component.  */
  
!       to_rtx = copy_rtx (adjust_address (target, mode,
! 					 bitpos / BITS_PER_UNIT));
  
        MEM_SET_IN_STRUCT_P (to_rtx, 1);
        if (!MEM_KEEP_ALIAS_SET_P (to_rtx) && MEM_ALIAS_SET (to_rtx) != 0)
! 	{
! 	  to_rtx = copy_rtx (to_rtx);
! 	  set_mem_alias_set (to_rtx, alias_set);
! 	}
  
        return store_expr (exp, to_rtx, value_mode != VOIDmode);
--- 5284,5299 ----
  		&& (XEXP (addr, 0) == virtual_incoming_args_rtx
  		    || XEXP (addr, 0) == virtual_stack_vars_rtx)))
! 	to_rtx = replace_equiv_address (to_rtx, copy_to_reg (addr));
  
        /* Now build a reference to just the desired component.  */
+ 
+       to_rtx = adjust_address (target, mode, bitpos / BITS_PER_UNIT);
  
!       if (to_rtx == target)
! 	to_rtx = copy_rtx (to_rtx);
  
        MEM_SET_IN_STRUCT_P (to_rtx, 1);
        if (!MEM_KEEP_ALIAS_SET_P (to_rtx) && MEM_ALIAS_SET (to_rtx) != 0)
! 	set_mem_alias_set (to_rtx, alias_set);
  
        return store_expr (exp, to_rtx, value_mode != VOIDmode);
*************** store_field (target, bitsize, bitpos, mo
*** 5346,5352 ****
     This offset is in addition to the bit position.
     If the position is not variable, we store 0 in *POFFSET.
-    We set *PALIGNMENT to the alignment of the address that will be
-    computed.  This is the alignment of the thing we return if *POFFSET
-    is zero, but can be more less strictly aligned if *POFFSET is nonzero.
  
     If any of the extraction expressions is volatile,
--- 5311,5314 ----
*************** store_field (target, bitsize, bitpos, mo
*** 5363,5367 ****
  tree
  get_inner_reference (exp, pbitsize, pbitpos, poffset, pmode,
! 		     punsignedp, pvolatilep, palignment)
       tree exp;
       HOST_WIDE_INT *pbitsize;
--- 5325,5329 ----
  tree
  get_inner_reference (exp, pbitsize, pbitpos, poffset, pmode,
! 		     punsignedp, pvolatilep)
       tree exp;
       HOST_WIDE_INT *pbitsize;
*************** get_inner_reference (exp, pbitsize, pbit
*** 5371,5375 ****
       int *punsignedp;
       int *pvolatilep;
-      unsigned int *palignment;
  {
    tree size_tree = 0;
--- 5333,5336 ----
*************** get_inner_reference (exp, pbitsize, pbit
*** 5377,5381 ****
    tree offset = size_zero_node;
    tree bit_offset = bitsize_zero_node;
-   unsigned int alignment = BIGGEST_ALIGNMENT;
    tree placeholder_ptr = 0;
    tree tem;
--- 5338,5341 ----
*************** get_inner_reference (exp, pbitsize, pbit
*** 5439,5444 ****
  				   DECL_FIELD_BIT_OFFSET (field));
  
! 	  if (! host_integerp (offset, 0))
! 	    alignment = MIN (alignment, DECL_OFFSET_ALIGN (field));
  	}
  
--- 5399,5403 ----
  				   DECL_FIELD_BIT_OFFSET (field));
  
! 	  /* ??? Right now we don't do anything with DECL_OFFSET_ALIGN.  */
  	}
  
*************** get_inner_reference (exp, pbitsize, pbit
*** 5501,5517 ****
  	*pvolatilep = 1;
  
-       /* If the offset is non-constant already, then we can't assume any
- 	 alignment more than the alignment here.  */
-       if (! TREE_CONSTANT (offset))
- 	alignment = MIN (alignment, TYPE_ALIGN (TREE_TYPE (exp)));
- 
        exp = TREE_OPERAND (exp, 0);
      }
  
-   if (DECL_P (exp))
-     alignment = MIN (alignment, DECL_ALIGN (exp));
-   else if (TREE_TYPE (exp) != 0)
-     alignment = MIN (alignment, TYPE_ALIGN (TREE_TYPE (exp)));
- 
    /* If OFFSET is constant, see if we can return the whole thing as a
       constant bit position.  Otherwise, split it up.  */
--- 5460,5466 ----
*************** get_inner_reference (exp, pbitsize, pbit
*** 5526,5530 ****
  
    *pmode = mode;
-   *palignment = alignment;
    return exp;
  }
--- 5475,5478 ----
*************** highest_pow2_factor (exp)
*** 6023,6027 ****
  
      case NON_LVALUE_EXPR:  case NOP_EXPR:  case CONVERT_EXPR:
!     case COMPOUND_EXPR:  case SAVE_EXPR:
        return highest_pow2_factor (TREE_OPERAND (exp, 0));
  
--- 5971,5975 ----
  
      case NON_LVALUE_EXPR:  case NOP_EXPR:  case CONVERT_EXPR:
!     case COMPOUND_EXPR:    case SAVE_EXPR: case WITH_RECORD_EXPR:
        return highest_pow2_factor (TREE_OPERAND (exp, 0));
  
*************** expand_expr (exp, target, tmode, modifie
*** 7012,7019 ****
  	tree offset;
  	int volatilep = 0;
- 	unsigned int alignment;
  	tree tem = get_inner_reference (exp, &bitsize, &bitpos, &offset,
! 					&mode1, &unsignedp, &volatilep,
! 					&alignment);
  	rtx orig_op0;
  
--- 6960,6965 ----
  	tree offset;
  	int volatilep = 0;
  	tree tem = get_inner_reference (exp, &bitsize, &bitpos, &offset,
! 					&mode1, &unsignedp, &volatilep);
  	rtx orig_op0;
  
*************** expand_expr (exp, target, tmode, modifie
*** 7101,7105 ****
  		&& (bitpos % bitsize) == 0
  		&& (bitsize % GET_MODE_ALIGNMENT (mode1)) == 0
! 		&& alignment == GET_MODE_ALIGNMENT (mode1))
  	      {
  		rtx temp = adjust_address (op0, mode1, bitpos / BITS_PER_UNIT);
--- 7047,7051 ----
  		&& (bitpos % bitsize) == 0
  		&& (bitsize % GET_MODE_ALIGNMENT (mode1)) == 0
! 		&& MEM_ALIGN (op0) == GET_MODE_ALIGNMENT (mode1))
  	      {
  		rtx temp = adjust_address (op0, mode1, bitpos / BITS_PER_UNIT);
*************** expand_expr (exp, target, tmode, modifie
*** 7172,7176 ****
  	       fetch it as a bit field.  */
  	    || (mode1 != BLKmode
! 		&& SLOW_UNALIGNED_ACCESS (mode1, alignment)
  		&& ((TYPE_ALIGN (TREE_TYPE (tem))
  		     < GET_MODE_ALIGNMENT (mode))
--- 7118,7122 ----
  	       fetch it as a bit field.  */
  	    || (mode1 != BLKmode
! 		&& SLOW_UNALIGNED_ACCESS (mode1, MEM_ALIGN (op))
  		&& ((TYPE_ALIGN (TREE_TYPE (tem))
  		     < GET_MODE_ALIGNMENT (mode))
*************** expand_expr (exp, target, tmode, modifie
*** 7183,7191 ****
  		    == INTEGER_CST)
  		&& 0 != compare_tree_int (TYPE_SIZE (TREE_TYPE (exp)),
! 					  bitsize))
! 	    || (mode == BLKmode
! 		&& SLOW_UNALIGNED_ACCESS (mode, alignment)
! 		&& (TYPE_ALIGN (type) > alignment
! 		    || bitpos % TYPE_ALIGN (type) != 0)))
  	  {
  	    enum machine_mode ext_mode = mode;
--- 7129,7133 ----
  		    == INTEGER_CST)
  		&& 0 != compare_tree_int (TYPE_SIZE (TREE_TYPE (exp)),
! 					  bitsize)))
  	  {
  	    enum machine_mode ext_mode = mode;
*************** expand_expr (exp, target, tmode, modifie
*** 7211,7217 ****
  
  		emit_block_move (target, op0,
! 				 bitsize == -1 ? expr_size  (exp)
! 				 : GEN_INT ((bitsize + BITS_PER_UNIT - 1)
! 					    / BITS_PER_UNIT));
  
  		return target;
--- 7153,7158 ----
  
  		emit_block_move (target, op0,
! 				 GEN_INT ((bitsize + BITS_PER_UNIT - 1)
! 					  / BITS_PER_UNIT));
  
  		return target;
*************** expand_expr (exp, target, tmode, modifie
*** 7269,7273 ****
  	set_mem_attributes (op0, exp, 0);
  	if (GET_CODE (XEXP (op0, 0)) == REG)
! 	  mark_reg_pointer (XEXP (op0, 0), alignment);
  
  	MEM_VOLATILE_P (op0) |= volatilep;
--- 7210,7214 ----
  	set_mem_attributes (op0, exp, 0);
  	if (GET_CODE (XEXP (op0, 0)) == REG)
! 	  mark_reg_pointer (XEXP (op0, 0), MEM_ALIGN (op0));
  
  	MEM_VOLATILE_P (op0) |= volatilep;
*************** expand_expr (exp, target, tmode, modifie
*** 7376,7390 ****
  	if (! (GET_CODE (index_val) == CONST_INT
  	       && GET_CODE (lo_r) == CONST_INT))
! 	  {
! 	    emit_cmp_and_jump_insns (index_val, lo_r, LT, NULL_RTX,
! 				     GET_MODE (index_val), iunsignedp, 0, op1);
! 	  }
  
  	if (! (GET_CODE (index_val) == CONST_INT
  	       && GET_CODE (hi_r) == CONST_INT))
! 	  {
! 	    emit_cmp_and_jump_insns (index_val, hi_r, GT, NULL_RTX,
! 				     GET_MODE (index_val), iunsignedp, 0, op1);
! 	  }
  
  	/* Calculate the element number of bit zero in the first word
--- 7317,7327 ----
  	if (! (GET_CODE (index_val) == CONST_INT
  	       && GET_CODE (lo_r) == CONST_INT))
! 	  emit_cmp_and_jump_insns (index_val, lo_r, LT, NULL_RTX,
! 				   GET_MODE (index_val), iunsignedp, op1);
  
  	if (! (GET_CODE (index_val) == CONST_INT
  	       && GET_CODE (hi_r) == CONST_INT))
! 	  emit_cmp_and_jump_insns (index_val, hi_r, GT, NULL_RTX,
! 				   GET_MODE (index_val), iunsignedp, op1);
  
  	/* Calculate the element number of bit zero in the first word
*************** expand_expr (exp, target, tmode, modifie
*** 7512,7516 ****
  			      (HOST_WIDE_INT) GET_MODE_BITSIZE (mode)),
  			 0, TYPE_MODE (valtype), TREE_OPERAND (exp, 0),
! 			 VOIDmode, 0, int_size_in_bytes (type), 0);
  	  else
  	    abort ();
--- 7449,7453 ----
  			      (HOST_WIDE_INT) GET_MODE_BITSIZE (mode)),
  			 0, TYPE_MODE (valtype), TREE_OPERAND (exp, 0),
! 			 VOIDmode, 0, type, 0);
  	  else
  	    abort ();
*************** expand_expr (exp, target, tmode, modifie
*** 8022,8026 ****
  	  int unsignedp = TREE_UNSIGNED (TREE_TYPE (TREE_OPERAND (exp, 1)));
  	  do_compare_rtx_and_jump (target, op1, code == MAX_EXPR ? GE : LE,
! 				   unsignedp, mode, NULL_RTX, 0, NULL_RTX,
  				   op0);
  	}
--- 7959,7963 ----
  	  int unsignedp = TREE_UNSIGNED (TREE_TYPE (TREE_OPERAND (exp, 1)));
  	  do_compare_rtx_and_jump (target, op1, code == MAX_EXPR ? GE : LE,
! 				   unsignedp, mode, NULL_RTX, NULL_RTX,
  				   op0);
  	}
*************** expand_expr (exp, target, tmode, modifie
*** 8115,8119 ****
  	  op1 = gen_label_rtx ();
  	  emit_cmp_and_jump_insns (temp, const0_rtx, EQ, NULL_RTX,
! 				   GET_MODE (temp), unsignedp, 0, op1);
  	  emit_move_insn (temp, const1_rtx);
  	  emit_label (op1);
--- 8052,8056 ----
  	  op1 = gen_label_rtx ();
  	  emit_cmp_and_jump_insns (temp, const0_rtx, EQ, NULL_RTX,
! 				   GET_MODE (temp), unsignedp, op1);
  	  emit_move_insn (temp, const1_rtx);
  	  emit_label (op1);
*************** expand_expr (exp, target, tmode, modifie
*** 8681,8686 ****
  		   || GET_CODE (op0) == PARALLEL)
  	    {
! 	      /* If this object is in a register, it must be not
! 		 be BLKmode.  */
  	      tree inner_type = TREE_TYPE (TREE_OPERAND (exp, 0));
  	      tree nt = build_qualified_type (inner_type,
--- 8618,8622 ----
  		   || GET_CODE (op0) == PARALLEL)
  	    {
! 	      /* If this object is in a register, it must can't be BLKmode.  */
  	      tree inner_type = TREE_TYPE (TREE_OPERAND (exp, 0));
  	      tree nt = build_qualified_type (inner_type,
*************** expand_expr (exp, target, tmode, modifie
*** 8714,8717 ****
--- 8650,8672 ----
  	    }
  
+ 	  /* If OP0 is not aligned as least as much as the type requires,
+ 	     we need to make a temporary, copy OP0 to it, and take the
+ 	     address of the temporary.  */
+ 	  if (expr_align (TREE_OPERAND (exp, 0)) > MEM_ALIGN (op0))
+ 	    {
+ 	      tree inner_type = TREE_TYPE (TREE_OPERAND (exp, 0));
+ 	      rtx new
+ 		= assign_stack_temp_for_type
+ 		  (TYPE_MODE (inner_type),
+ 		   MEM_SIZE (op0) ? INTVAL (MEM_SIZE (op0))
+ 		   : int_size_in_bytes (TREE_TYPE (inner_type)),
+ 		   1, build_qualified_type (inner_type,
+ 					    (TYPE_QUALS (inner_type)
+ 					     | TYPE_QUAL_CONST)));
+ 
+ 	      emit_block_move (new, op0, expr_size (TREE_OPERAND (exp, 0)));
+ 	      op0 = new;
+ 	    }
+ 
  	  op0 = force_operand (XEXP (op0, 0), target);
  	}
*************** expand_expr (exp, target, tmode, modifie
*** 8903,9213 ****
  }
  \f
- /* Similar to expand_expr, except that we don't specify a target, target
-    mode, or modifier and we return the alignment of the inner type.  This is
-    used in cases where it is not necessary to align the result to the
-    alignment of its type as long as we know the alignment of the result, for
-    example for comparisons of BLKmode values.  */
- 
- static rtx
- expand_expr_unaligned (exp, palign)
-      tree exp;
-      unsigned int *palign;
- {
-   rtx op0;
-   tree type = TREE_TYPE (exp);
-   enum machine_mode mode = TYPE_MODE (type);
- 
-   /* Default the alignment we return to that of the type.  */
-   *palign = TYPE_ALIGN (type);
- 
-   /* The only cases in which we do anything special is if the resulting mode
-      is BLKmode.  */
-   if (mode != BLKmode)
-     return expand_expr (exp, NULL_RTX, VOIDmode, EXPAND_NORMAL);
- 
-   switch (TREE_CODE (exp))
-     {
-     case CONVERT_EXPR:
-     case NOP_EXPR:
-     case NON_LVALUE_EXPR:
-       /* Conversions between BLKmode values don't change the underlying
-          alignment or value.  */
-       if (TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0))) == BLKmode)
- 	return expand_expr_unaligned (TREE_OPERAND (exp, 0), palign);
-       break;
- 
-     case ARRAY_REF:
-       /* Much of the code for this case is copied directly from expand_expr.
- 	 We need to duplicate it here because we will do something different
- 	 in the fall-through case, so we need to handle the same exceptions
- 	 it does.  */
-       {
- 	tree array = TREE_OPERAND (exp, 0);
- 	tree domain = TYPE_DOMAIN (TREE_TYPE (array));
- 	tree low_bound = domain ? TYPE_MIN_VALUE (domain) : integer_zero_node;
- 	tree index = convert (sizetype, TREE_OPERAND (exp, 1));
- 	HOST_WIDE_INT i;
- 
- 	if (TREE_CODE (TREE_TYPE (TREE_OPERAND (exp, 0))) != ARRAY_TYPE)
- 	  abort ();
- 
- 	/* Optimize the special-case of a zero lower bound.
- 
- 	   We convert the low_bound to sizetype to avoid some problems
- 	   with constant folding.  (E.g. suppose the lower bound is 1,
- 	   and its mode is QI.  Without the conversion,  (ARRAY
- 	   +(INDEX-(unsigned char)1)) becomes ((ARRAY+(-(unsigned char)1))
- 	   +INDEX), which becomes (ARRAY+255+INDEX).  Oops!)  */
- 
- 	if (! integer_zerop (low_bound))
- 	  index = size_diffop (index, convert (sizetype, low_bound));
- 
- 	/* If this is a constant index into a constant array,
- 	   just get the value from the array.  Handle both the cases when
- 	   we have an explicit constructor and when our operand is a variable
- 	   that was declared const.  */
- 
- 	if (TREE_CODE (array) == CONSTRUCTOR && ! TREE_SIDE_EFFECTS (array)
- 	    && host_integerp (index, 0)
- 	    && 0 > compare_tree_int (index,
- 				     list_length (CONSTRUCTOR_ELTS
- 						  (TREE_OPERAND (exp, 0)))))
- 	  {
- 	    tree elem;
- 
- 	    for (elem = CONSTRUCTOR_ELTS (TREE_OPERAND (exp, 0)),
- 		 i = tree_low_cst (index, 0);
- 		 elem != 0 && i != 0; i--, elem = TREE_CHAIN (elem))
- 	      ;
- 
- 	    if (elem)
- 	      return expand_expr_unaligned (fold (TREE_VALUE (elem)), palign);
- 	  }
- 
- 	else if (optimize >= 1
- 		 && TREE_READONLY (array) && ! TREE_SIDE_EFFECTS (array)
- 		 && TREE_CODE (array) == VAR_DECL && DECL_INITIAL (array)
- 		 && TREE_CODE (DECL_INITIAL (array)) != ERROR_MARK)
- 	  {
- 	    if (TREE_CODE (index) == INTEGER_CST)
- 	      {
- 		tree init = DECL_INITIAL (array);
- 
- 		if (TREE_CODE (init) == CONSTRUCTOR)
- 		  {
- 		    tree elem;
- 
- 		    for (elem = CONSTRUCTOR_ELTS (init);
- 			 ! tree_int_cst_equal (TREE_PURPOSE (elem), index);
- 			 elem = TREE_CHAIN (elem))
- 		      ;
- 
- 		    if (elem)
- 		      return expand_expr_unaligned (fold (TREE_VALUE (elem)),
- 						    palign);
- 		  }
- 	      }
- 	  }
-       }
-       /* Fall through.  */
- 
-     case COMPONENT_REF:
-     case BIT_FIELD_REF:
-     case ARRAY_RANGE_REF:
-       /* If the operand is a CONSTRUCTOR, we can just extract the
- 	 appropriate field if it is present.  Don't do this if we have
- 	 already written the data since we want to refer to that copy
- 	 and varasm.c assumes that's what we'll do.  */
-       if (TREE_CODE (exp) == COMPONENT_REF
- 	  && TREE_CODE (TREE_OPERAND (exp, 0)) == CONSTRUCTOR
- 	  && TREE_CST_RTL (TREE_OPERAND (exp, 0)) == 0)
- 	{
- 	  tree elt;
- 
- 	  for (elt = CONSTRUCTOR_ELTS (TREE_OPERAND (exp, 0)); elt;
- 	       elt = TREE_CHAIN (elt))
- 	    if (TREE_PURPOSE (elt) == TREE_OPERAND (exp, 1))
- 	      /* Note that unlike the case in expand_expr, we know this is
- 		 BLKmode and hence not an integer.  */
- 	      return expand_expr_unaligned (TREE_VALUE (elt), palign);
- 	}
- 
-       {
- 	enum machine_mode mode1;
- 	HOST_WIDE_INT bitsize, bitpos;
- 	tree offset;
- 	int volatilep = 0;
- 	unsigned int alignment;
- 	int unsignedp;
- 	tree tem = get_inner_reference (exp, &bitsize, &bitpos, &offset,
- 					&mode1, &unsignedp, &volatilep,
- 					&alignment);
- 
- 	/* If we got back the original object, something is wrong.  Perhaps
- 	   we are evaluating an expression too early.  In any event, don't
- 	   infinitely recurse.  */
- 	if (tem == exp)
- 	  abort ();
- 
- 	op0 = expand_expr (tem, NULL_RTX, VOIDmode, EXPAND_NORMAL);
- 
- 	/* If this is a constant, put it into a register if it is a
- 	   legitimate constant and OFFSET is 0 and memory if it isn't.  */
- 	if (CONSTANT_P (op0))
- 	  {
- 	    enum machine_mode inner_mode = TYPE_MODE (TREE_TYPE (tem));
- 
- 	    if (inner_mode != BLKmode && LEGITIMATE_CONSTANT_P (op0)
- 		&& offset == 0)
- 	      op0 = force_reg (inner_mode, op0);
- 	    else
- 	      op0 = validize_mem (force_const_mem (inner_mode, op0));
- 	  }
- 
- 	if (offset != 0)
- 	  {
- 	    rtx offset_rtx = expand_expr (offset, NULL_RTX, VOIDmode, 0);
- 
- 	    /* If this object is in a register, put it into memory.
- 	       This case can't occur in C, but can in Ada if we have
- 	       unchecked conversion of an expression from a scalar type to
- 	       an array or record type.  */
- 	    if (GET_CODE (op0) == REG || GET_CODE (op0) == SUBREG
- 		|| GET_CODE (op0) == CONCAT || GET_CODE (op0) == ADDRESSOF)
- 	      {
- 		tree nt = build_qualified_type (TREE_TYPE (tem),
- 						(TYPE_QUALS (TREE_TYPE (tem))
- 						 | TYPE_QUAL_CONST));
- 		rtx memloc = assign_temp (nt, 1, 1, 1);
- 
- 		emit_move_insn (memloc, op0);
- 		op0 = memloc;
- 	      }
- 
- 	    if (GET_CODE (op0) != MEM)
- 	      abort ();
- 
- 	    if (GET_MODE (offset_rtx) != ptr_mode)
- 	      offset_rtx = convert_to_mode (ptr_mode, offset_rtx, 0);
- 
- #ifdef POINTERS_EXTEND_UNSIGNED
- 	    if (GET_MODE (offset_rtx) != Pmode)
- 	      offset_rtx = convert_memory_address (Pmode, offset_rtx);
- #endif
- 
- 	    op0 = offset_address (op0, offset_rtx,
- 				  highest_pow2_factor (offset));
- 	  }
- 
- 	/* Don't forget about volatility even if this is a bitfield.  */
- 	if (GET_CODE (op0) == MEM && volatilep && ! MEM_VOLATILE_P (op0))
- 	  {
- 	    op0 = copy_rtx (op0);
- 	    MEM_VOLATILE_P (op0) = 1;
- 	  }
- 
- 	/* Check the access.  */
- 	if (current_function_check_memory_usage && GET_CODE (op0) == MEM)
- 	  {
- 	    rtx to;
- 	    int size;
- 
- 	    to = plus_constant (XEXP (op0, 0), (bitpos / BITS_PER_UNIT));
- 	    size = (bitpos % BITS_PER_UNIT) + bitsize + BITS_PER_UNIT - 1;
- 
- 	    /* Check the access right of the pointer.  */
- 	    in_check_memory_usage = 1;
- 	    if (size > BITS_PER_UNIT)
- 	      emit_library_call (chkr_check_addr_libfunc,
- 				 LCT_CONST_MAKE_BLOCK, VOIDmode, 3,
- 				 to, ptr_mode, GEN_INT (size / BITS_PER_UNIT),
- 				 TYPE_MODE (sizetype),
- 				 GEN_INT (MEMORY_USE_RO),
- 				 TYPE_MODE (integer_type_node));
- 	    in_check_memory_usage = 0;
- 	  }
- 
- 	/* In cases where an aligned union has an unaligned object
- 	   as a field, we might be extracting a BLKmode value from
- 	   an integer-mode (e.g., SImode) object.  Handle this case
- 	   by doing the extract into an object as wide as the field
- 	   (which we know to be the width of a basic mode), then
- 	   storing into memory, and changing the mode to BLKmode.
- 	   If we ultimately want the address (EXPAND_CONST_ADDRESS or
- 	   EXPAND_INITIALIZER), then we must not copy to a temporary.  */
- 	if (mode1 == VOIDmode
- 	    || GET_CODE (op0) == REG || GET_CODE (op0) == SUBREG
- 	    || (SLOW_UNALIGNED_ACCESS (mode1, alignment)
- 		&& (TYPE_ALIGN (type) > alignment
- 		    || bitpos % TYPE_ALIGN (type) != 0)))
- 	  {
- 	    enum machine_mode ext_mode = mode_for_size (bitsize, MODE_INT, 1);
- 
- 	    if (ext_mode == BLKmode)
- 	      {
- 		/* In this case, BITPOS must start at a byte boundary.  */
- 		if (GET_CODE (op0) != MEM
- 		    || bitpos % BITS_PER_UNIT != 0)
- 		  abort ();
- 
- 		op0 = adjust_address (op0, VOIDmode, bitpos / BITS_PER_UNIT);
- 	      }
- 	    else
- 	      {
- 		tree nt = build_qualified_type (type_for_mode (ext_mode, 0),
- 						TYPE_QUAL_CONST);
- 		rtx new = assign_temp (nt, 0, 1, 1);
- 
- 		op0 = extract_bit_field (validize_mem (op0), bitsize, bitpos,
- 					 unsignedp, NULL_RTX, ext_mode,
- 					 ext_mode,
- 					 int_size_in_bytes (TREE_TYPE (tem)));
- 
- 		/* If the result is a record type and BITSIZE is narrower than
- 		   the mode of OP0, an integral mode, and this is a big endian
- 		   machine, we must put the field into the high-order bits.  */
- 		if (TREE_CODE (type) == RECORD_TYPE && BYTES_BIG_ENDIAN
- 		    && GET_MODE_CLASS (GET_MODE (op0)) == MODE_INT
- 		    && bitsize < GET_MODE_BITSIZE (GET_MODE (op0)))
- 		  op0 = expand_shift (LSHIFT_EXPR, GET_MODE (op0), op0,
- 				      size_int (GET_MODE_BITSIZE
- 						(GET_MODE (op0))
- 						- bitsize),
- 				      op0, 1);
- 
- 		emit_move_insn (new, op0);
- 		op0 = copy_rtx (new);
- 		PUT_MODE (op0, BLKmode);
- 	      }
- 	  }
- 	else
- 	  /* Get a reference to just this component.  */
- 	  op0 = adjust_address (op0, mode1, bitpos / BITS_PER_UNIT);
- 
- 	set_mem_attributes (op0, exp, 0);
- 
- 	/* Adjust the alignment in case the bit position is not
- 	   a multiple of the alignment of the inner object.  */
- 	while (bitpos % alignment != 0)
- 	  alignment >>= 1;
- 
- 	if (GET_CODE (XEXP (op0, 0)) == REG)
- 	  mark_reg_pointer (XEXP (op0, 0), alignment);
- 
- 	MEM_IN_STRUCT_P (op0) = 1;
- 	MEM_VOLATILE_P (op0) |= volatilep;
- 
- 	*palign = alignment;
- 	return op0;
-       }
- 
-     default:
-       break;
- 
-     }
- 
-   return expand_expr (exp, NULL_RTX, VOIDmode, EXPAND_NORMAL);
- }
- \f
  /* Return the tree node if a ARG corresponds to a string constant or zero
     if it doesn't.  If we return non-zero, set *PTR_OFFSET to the offset
--- 8858,8861 ----
*************** do_jump (exp, if_false_label, if_true_la
*** 9698,9707 ****
  	tree offset;
  	int volatilep = 0;
- 	unsigned int alignment;
  
  	/* Get description of this reference.  We don't actually care
  	   about the underlying object here.  */
  	get_inner_reference (exp, &bitsize, &bitpos, &offset, &mode,
! 			     &unsignedp, &volatilep, &alignment);
  
  	type = type_for_size (bitsize, unsignedp);
--- 9346,9354 ----
  	tree offset;
  	int volatilep = 0;
  
  	/* Get description of this reference.  We don't actually care
  	   about the underlying object here.  */
  	get_inner_reference (exp, &bitsize, &bitpos, &offset, &mode,
! 			     &unsignedp, &volatilep);
  
  	type = type_for_size (bitsize, unsignedp);
*************** do_jump (exp, if_false_label, if_true_la
*** 10005,10009 ****
  	do_compare_rtx_and_jump (temp, CONST0_RTX (GET_MODE (temp)),
  				 NE, TREE_UNSIGNED (TREE_TYPE (exp)),
! 				 GET_MODE (temp), NULL_RTX, 0,
  				 if_false_label, if_true_label);
        else
--- 9652,9656 ----
  	do_compare_rtx_and_jump (temp, CONST0_RTX (GET_MODE (temp)),
  				 NE, TREE_UNSIGNED (TREE_TYPE (exp)),
! 				 GET_MODE (temp), NULL_RTX,
  				 if_false_label, if_true_label);
        else
*************** do_jump_by_parts_greater_rtx (mode, unsi
*** 10080,10089 ****
        /* All but high-order word must be compared as unsigned.  */
        do_compare_rtx_and_jump (op0_word, op1_word, GT,
! 			       (unsignedp || i > 0), word_mode, NULL_RTX, 0,
  			       NULL_RTX, if_true_label);
  
        /* Consider lower words only if these are equal.  */
        do_compare_rtx_and_jump (op0_word, op1_word, NE, unsignedp, word_mode,
! 			       NULL_RTX, 0, NULL_RTX, if_false_label);
      }
  
--- 9727,9736 ----
        /* All but high-order word must be compared as unsigned.  */
        do_compare_rtx_and_jump (op0_word, op1_word, GT,
! 			       (unsignedp || i > 0), word_mode, NULL_RTX,
  			       NULL_RTX, if_true_label);
  
        /* Consider lower words only if these are equal.  */
        do_compare_rtx_and_jump (op0_word, op1_word, NE, unsignedp, word_mode,
! 			       NULL_RTX, NULL_RTX, if_false_label);
      }
  
*************** do_jump_by_parts_equality (exp, if_false
*** 10116,10121 ****
  			     operand_subword_force (op1, i, mode),
  			     EQ, TREE_UNSIGNED (TREE_TYPE (exp)),
! 			     word_mode, NULL_RTX, 0, if_false_label,
! 			     NULL_RTX);
  
    if (if_true_label)
--- 9763,9767 ----
  			     operand_subword_force (op1, i, mode),
  			     EQ, TREE_UNSIGNED (TREE_TYPE (exp)),
! 			     word_mode, NULL_RTX, if_false_label, NULL_RTX);
  
    if (if_true_label)
*************** do_jump_by_parts_equality_rtx (op0, if_f
*** 10154,10158 ****
      {
        do_compare_rtx_and_jump (part, const0_rtx, EQ, 1, word_mode,
! 			       NULL_RTX, 0, if_false_label, if_true_label);
  
        return;
--- 9800,9804 ----
      {
        do_compare_rtx_and_jump (part, const0_rtx, EQ, 1, word_mode,
! 			       NULL_RTX, if_false_label, if_true_label);
  
        return;
*************** do_jump_by_parts_equality_rtx (op0, if_f
*** 10165,10169 ****
    for (i = 0; i < nwords; i++)
      do_compare_rtx_and_jump (operand_subword_force (op0, i, GET_MODE (op0)),
! 			     const0_rtx, EQ, 1, word_mode, NULL_RTX, 0,
  			     if_false_label, NULL_RTX);
  
--- 9811,9815 ----
    for (i = 0; i < nwords; i++)
      do_compare_rtx_and_jump (operand_subword_force (op0, i, GET_MODE (op0)),
! 			     const0_rtx, EQ, 1, word_mode, NULL_RTX,
  			     if_false_label, NULL_RTX);
  
*************** do_jump_by_parts_equality_rtx (op0, if_f
*** 10184,10194 ****
  
     If MODE is BLKmode, SIZE is an RTX giving the size of the objects being
!    compared.
! 
!    If ALIGN is non-zero, it is the alignment of this type; if zero, the
!    size of MODE should be used.  */
  
  rtx
! compare_from_rtx (op0, op1, code, unsignedp, mode, size, align)
       rtx op0, op1;
       enum rtx_code code;
--- 9830,9837 ----
  
     If MODE is BLKmode, SIZE is an RTX giving the size of the objects being
!    compared.  */
  
  rtx
! compare_from_rtx (op0, op1, code, unsignedp, mode, size)
       rtx op0, op1;
       enum rtx_code code;
*************** compare_from_rtx (op0, op1, code, unsign
*** 10196,10200 ****
       enum machine_mode mode;
       rtx size;
-      unsigned int align;
  {
    rtx tem;
--- 9839,9842 ----
*************** compare_from_rtx (op0, op1, code, unsign
*** 10245,10249 ****
  #endif
  
!   emit_cmp_insn (op0, op1, code, size, mode, unsignedp, align);
  
    return gen_rtx_fmt_ee (code, VOIDmode, cc0_rtx, const0_rtx);
--- 9887,9891 ----
  #endif
  
!   emit_cmp_insn (op0, op1, code, size, mode, unsignedp);
  
    return gen_rtx_fmt_ee (code, VOIDmode, cc0_rtx, const0_rtx);
*************** compare_from_rtx (op0, op1, code, unsign
*** 10254,10264 ****
  
     If MODE is BLKmode, SIZE is an RTX giving the size of the objects being
!    compared.
! 
!    If ALIGN is non-zero, it is the alignment of this type; if zero, the
!    size of MODE should be used.  */
  
  void
! do_compare_rtx_and_jump (op0, op1, code, unsignedp, mode, size, align,
  			 if_false_label, if_true_label)
       rtx op0, op1;
--- 9896,9903 ----
  
     If MODE is BLKmode, SIZE is an RTX giving the size of the objects being
!    compared.  */
  
  void
! do_compare_rtx_and_jump (op0, op1, code, unsignedp, mode, size,
  			 if_false_label, if_true_label)
       rtx op0, op1;
*************** do_compare_rtx_and_jump (op0, op1, code,
*** 10267,10271 ****
       enum machine_mode mode;
       rtx size;
-      unsigned int align;
       rtx if_false_label, if_true_label;
  {
--- 9906,9909 ----
*************** do_compare_rtx_and_jump (op0, op1, code,
*** 10345,10349 ****
      }
  
!   emit_cmp_and_jump_insns (op0, op1, code, size, mode, unsignedp, align,
  			   if_true_label);
  
--- 9983,9987 ----
      }
  
!   emit_cmp_and_jump_insns (op0, op1, code, size, mode, unsignedp,
  			   if_true_label);
  
*************** do_compare_and_jump (exp, signed_code, u
*** 10371,10375 ****
       rtx if_false_label, if_true_label;
  {
-   unsigned int align0, align1;
    rtx op0, op1;
    tree type;
--- 10009,10012 ----
*************** do_compare_and_jump (exp, signed_code, u
*** 10379,10387 ****
  
    /* Don't crash if the comparison was erroneous.  */
!   op0 = expand_expr_unaligned (TREE_OPERAND (exp, 0), &align0);
    if (TREE_CODE (TREE_OPERAND (exp, 0)) == ERROR_MARK)
      return;
  
!   op1 = expand_expr_unaligned (TREE_OPERAND (exp, 1), &align1);
    if (TREE_CODE (TREE_OPERAND (exp, 1)) == ERROR_MARK)
      return;
--- 10016,10024 ----
  
    /* Don't crash if the comparison was erroneous.  */
!   op0 = expand_expr (TREE_OPERAND (exp, 0), NULL_RTX, VOIDmode, 0);
    if (TREE_CODE (TREE_OPERAND (exp, 0)) == ERROR_MARK)
      return;
  
!   op1 = expand_expr (TREE_OPERAND (exp, 1), NULL_RTX, VOIDmode, 0);
    if (TREE_CODE (TREE_OPERAND (exp, 1)) == ERROR_MARK)
      return;
*************** do_compare_and_jump (exp, signed_code, u
*** 10435,10439 ****
  			   ((mode == BLKmode)
  			    ? expr_size (TREE_OPERAND (exp, 0)) : NULL_RTX),
- 			   MIN (align0, align1),
  			   if_false_label, if_true_label);
  }
--- 10072,10075 ----
*************** do_store_flag (exp, target, mode, only_c
*** 10714,10718 ****
    emit_move_insn (target, invert ? const0_rtx : const1_rtx);
    result = compare_from_rtx (op0, op1, code, unsignedp,
! 			     operand_mode, NULL_RTX, 0);
    if (GET_CODE (result) == CONST_INT)
      return (((result == const0_rtx && ! invert)
--- 10350,10354 ----
    emit_move_insn (target, invert ? const0_rtx : const1_rtx);
    result = compare_from_rtx (op0, op1, code, unsignedp,
! 			     operand_mode, NULL_RTX);
    if (GET_CODE (result) == CONST_INT)
      return (((result == const0_rtx && ! invert)
*************** try_casesi (index_type, index_expr, minv
*** 10781,10785 ****
        index = expand_expr (index_expr, NULL_RTX, VOIDmode, 0);
        emit_cmp_and_jump_insns (rangertx, index, LTU, NULL_RTX,
! 			       omode, 1, 0, default_label);
        /* Now we can safely truncate.  */
        index = convert_to_mode (index_mode, index, 0);
--- 10417,10421 ----
        index = expand_expr (index_expr, NULL_RTX, VOIDmode, 0);
        emit_cmp_and_jump_insns (rangertx, index, LTU, NULL_RTX,
! 			       omode, 1, default_label);
        /* Now we can safely truncate.  */
        index = convert_to_mode (index_mode, index, 0);
*************** do_tablejump (index, mode, range, table_
*** 10861,10865 ****
  
    emit_cmp_and_jump_insns (index, range, GTU, NULL_RTX, mode, 1,
! 			   0, default_label);
  
    /* If index is in range, it must fit in Pmode.
--- 10497,10501 ----
  
    emit_cmp_and_jump_insns (index, range, GTU, NULL_RTX, mode, 1,
! 			   default_label);
  
    /* If index is in range, it must fit in Pmode.
*** expr.h	2001/11/13 16:52:37	1.103
--- expr.h	2001/11/15 20:23:33
*************** extern int have_sub2_insn PARAMS ((rtx, 
*** 303,308 ****
     to a label if the comparison is true.  */
  extern void emit_cmp_and_jump_insns PARAMS ((rtx, rtx, enum rtx_code, rtx,
! 					     enum machine_mode, int,
! 					     unsigned int, rtx));
  
  /* Generate code to indirectly jump to a location given in the rtx LOC.  */
--- 303,307 ----
     to a label if the comparison is true.  */
  extern void emit_cmp_and_jump_insns PARAMS ((rtx, rtx, enum rtx_code, rtx,
! 					     enum machine_mode, int, rtx));
  
  /* Generate code to indirectly jump to a location given in the rtx LOC.  */
*************** extern void do_jump PARAMS ((tree, rtx, 
*** 543,550 ****
  /* Generate rtl to compare two rtx's, will call emit_cmp_insn.  */
  extern rtx compare_from_rtx PARAMS ((rtx, rtx, enum rtx_code, int,
! 				     enum machine_mode, rtx, unsigned int));
  extern void do_compare_rtx_and_jump PARAMS ((rtx, rtx, enum rtx_code, int,
  					     enum machine_mode, rtx,
! 					     unsigned int, rtx, rtx));
  
  /* Two different ways of generating switch statements.  */
--- 542,549 ----
  /* Generate rtl to compare two rtx's, will call emit_cmp_insn.  */
  extern rtx compare_from_rtx PARAMS ((rtx, rtx, enum rtx_code, int,
! 				     enum machine_mode, rtx));
  extern void do_compare_rtx_and_jump PARAMS ((rtx, rtx, enum rtx_code, int,
  					     enum machine_mode, rtx,
! 					     rtx, rtx));
  
  /* Two different ways of generating switch statements.  */
*** fold-const.c	2001/11/14 23:36:24	1.175
--- fold-const.c	2001/11/15 20:25:20
*************** optimize_bit_field_compare (code, compar
*** 3026,3030 ****
    int lunsignedp, runsignedp;
    int lvolatilep = 0, rvolatilep = 0;
-   unsigned int alignment;
    tree linner, rinner = NULL_TREE;
    tree mask;
--- 3026,3029 ----
*************** optimize_bit_field_compare (code, compar
*** 3037,3041 ****
       then will no longer be able to replace it.  */
    linner = get_inner_reference (lhs, &lbitsize, &lbitpos, &offset, &lmode,
! 				&lunsignedp, &lvolatilep, &alignment);
    if (linner == lhs || lbitsize == GET_MODE_BITSIZE (lmode) || lbitsize < 0
        || offset != 0 || TREE_CODE (linner) == PLACEHOLDER_EXPR)
--- 3036,3040 ----
       then will no longer be able to replace it.  */
    linner = get_inner_reference (lhs, &lbitsize, &lbitpos, &offset, &lmode,
! 				&lunsignedp, &lvolatilep);
    if (linner == lhs || lbitsize == GET_MODE_BITSIZE (lmode) || lbitsize < 0
        || offset != 0 || TREE_CODE (linner) == PLACEHOLDER_EXPR)
*************** optimize_bit_field_compare (code, compar
*** 3047,3051 ****
  	sizes, and signedness are the same.  */
       rinner = get_inner_reference (rhs, &rbitsize, &rbitpos, &offset, &rmode,
! 				   &runsignedp, &rvolatilep, &alignment);
  
       if (rinner == rhs || lbitpos != rbitpos || lbitsize != rbitsize
--- 3046,3050 ----
  	sizes, and signedness are the same.  */
       rinner = get_inner_reference (rhs, &rbitsize, &rbitpos, &offset, &rmode,
! 				   &runsignedp, &rvolatilep);
  
       if (rinner == rhs || lbitpos != rbitpos || lbitsize != rbitsize
*************** decode_field_reference (exp, pbitsize, p
*** 3205,3209 ****
    tree unsigned_type;
    unsigned int precision;
-   unsigned int alignment;
  
    /* All the optimizations using this function assume integer fields.
--- 3204,3207 ----
*************** decode_field_reference (exp, pbitsize, p
*** 3225,3229 ****
  
    inner = get_inner_reference (exp, pbitsize, pbitpos, &offset, pmode,
! 			       punsignedp, pvolatilep, &alignment);
    if ((inner == exp && and_mask == 0)
        || *pbitsize < 0 || offset != 0
--- 3223,3227 ----
  
    inner = get_inner_reference (exp, pbitsize, pbitpos, &offset, pmode,
! 			       punsignedp, pvolatilep);
    if ((inner == exp && and_mask == 0)
        || *pbitsize < 0 || offset != 0
*** function.c	2001/11/14 17:30:04	1.323
--- function.c	2001/11/15 20:26:31
*************** struct insns_for_mem_entry
*** 232,237 ****
  static rtx assign_stack_local_1 PARAMS ((enum machine_mode, HOST_WIDE_INT,
  					 int, struct function *));
- static rtx assign_stack_temp_for_type PARAMS ((enum machine_mode,
- 					       HOST_WIDE_INT, int, tree));
  static struct temp_slot *find_temp_slot_from_address  PARAMS ((rtx));
  static void put_reg_into_stack	PARAMS ((struct function *, rtx, tree,
--- 232,235 ----
*************** assign_stack_local (mode, size, align)
*** 630,634 ****
     TYPE is the type that will be used for the stack slot.  */
  
! static rtx
  assign_stack_temp_for_type (mode, size, keep, type)
       enum machine_mode mode;
--- 628,632 ----
     TYPE is the type that will be used for the stack slot.  */
  
! rtx
  assign_stack_temp_for_type (mode, size, keep, type)
       enum machine_mode mode;
*** loop.c	2001/11/15 10:28:48	1.368
--- loop.c	2001/11/15 20:28:19
*************** check_dbra_loop (loop, insn_count)
*** 7664,7668 ****
  	      start_sequence ();
  	      emit_cmp_and_jump_insns (reg, const0_rtx, cmp_code, NULL_RTX,
! 				       GET_MODE (reg), 0, 0,
  				       XEXP (jump_label, 0));
  	      tem = gen_sequence ();
--- 7664,7668 ----
  	      start_sequence ();
  	      emit_cmp_and_jump_insns (reg, const0_rtx, cmp_code, NULL_RTX,
! 				       GET_MODE (reg), 0,
  				       XEXP (jump_label, 0));
  	      tem = gen_sequence ();
*** optabs.c	2001/10/11 03:15:55	1.116
--- optabs.c	2001/11/15 20:29:14
*************** static int expand_cmplxdiv_wide PARAMS (
*** 97,104 ****
  				       int, enum optab_methods,
  				       enum mode_class, optab));
  static enum insn_code can_fix_p	PARAMS ((enum machine_mode, enum machine_mode,
  				       int, int *));
! static enum insn_code can_float_p PARAMS ((enum machine_mode, enum machine_mode,
! 					 int));
  static rtx ftruncify	PARAMS ((rtx));
  static optab new_optab	PARAMS ((void));
--- 97,108 ----
  				       int, enum optab_methods,
  				       enum mode_class, optab));
+ static void prepare_cmp_insn PARAMS ((rtx *, rtx *, enum rtx_code *, rtx,
+ 				      enum machine_mode *, int *,
+ 				      enum can_compare_purpose));
  static enum insn_code can_fix_p	PARAMS ((enum machine_mode, enum machine_mode,
  				       int, int *));
! static enum insn_code can_float_p PARAMS ((enum machine_mode,
! 					   enum machine_mode,
! 					   int));
  static rtx ftruncify	PARAMS ((rtx));
  static optab new_optab	PARAMS ((void));
*************** expand_cmplxdiv_wide (real0, real1, imag
*** 353,357 ****
    rtx temp1, temp2, lab1, lab2;
    enum machine_mode mode;
-   int align;
    rtx res;
    optab this_add_optab = add_optab;
--- 357,360 ----
*************** expand_cmplxdiv_wide (real0, real1, imag
*** 393,400 ****
  
    mode = GET_MODE (temp1);
-   align = GET_MODE_ALIGNMENT (mode);
    lab1 = gen_label_rtx ();
    emit_cmp_and_jump_insns (temp1, temp2, LT, NULL_RTX,
! 			   mode, unsignedp, align, lab1);
  
    /* |c| >= |d|; use ratio d/c to scale dividend and divisor.  */
--- 396,402 ----
  
    mode = GET_MODE (temp1);
    lab1 = gen_label_rtx ();
    emit_cmp_and_jump_insns (temp1, temp2, LT, NULL_RTX,
! 			   mode, unsignedp, lab1);
  
    /* |c| >= |d|; use ratio d/c to scale dividend and divisor.  */
*************** expand_abs (mode, op0, target, result_un
*** 2420,2424 ****
    else
      do_compare_rtx_and_jump (target, CONST0_RTX (mode), GE, 0, mode,
! 			     NULL_RTX, 0, NULL_RTX, op1);
  
    op0 = expand_unop (mode, result_unsignedp ? neg_optab : negv_optab,
--- 2422,2426 ----
    else
      do_compare_rtx_and_jump (target, CONST0_RTX (mode), GE, 0, mode,
! 			     NULL_RTX, NULL_RTX, op1);
  
    op0 = expand_unop (mode, result_unsignedp ? neg_optab : negv_optab,
*************** can_compare_p (code, mode, purpose)
*** 3036,3041 ****
     this matters if they need to be widened.
  
!    If they have mode BLKmode, then SIZE specifies the size of both operands,
!    and ALIGN specifies the known shared alignment of the operands.
  
     This function performs all the setup necessary so that the caller only has
--- 3038,3042 ----
     this matters if they need to be widened.
  
!    If they have mode BLKmode, then SIZE specifies the size of both operands.
  
     This function performs all the setup necessary so that the caller only has
*************** can_compare_p (code, mode, purpose)
*** 3046,3052 ****
     should perform the comparison on the modified values.  */
  
! void
! prepare_cmp_insn (px, py, pcomparison, size, pmode, punsignedp, align,
! 		  purpose)
       rtx *px, *py;
       enum rtx_code *pcomparison;
--- 3047,3052 ----
     should perform the comparison on the modified values.  */
  
! static void
! prepare_cmp_insn (px, py, pcomparison, size, pmode, punsignedp, purpose)
       rtx *px, *py;
       enum rtx_code *pcomparison;
*************** prepare_cmp_insn (px, py, pcomparison, s
*** 3054,3058 ****
       enum machine_mode *pmode;
       int *punsignedp;
-      int align ATTRIBUTE_UNUSED;
       enum can_compare_purpose purpose;
  {
--- 3054,3057 ----
*************** prepare_cmp_insn (px, py, pcomparison, s
*** 3061,3065 ****
    int unsignedp = *punsignedp;
    enum mode_class class;
-   rtx opalign ATTRIBUTE_UNUSED = GEN_INT (align / BITS_PER_UNIT);;
  
    class = GET_MODE_CLASS (mode);
--- 3060,3063 ----
*************** prepare_cmp_insn (px, py, pcomparison, s
*** 3104,3107 ****
--- 3102,3107 ----
        rtx result;
        enum machine_mode result_mode;
+       unsigned int opalign ATTRIBUTE_UNUSED
+ 	= (MIN (MEM_ALIGN (x), MEM_ALIGN (y)) / BITS_PER_UNIT);
  
        emit_queue ();
*************** prepare_cmp_insn (px, py, pcomparison, s
*** 3194,3199 ****
  	libfunc = ucmp_optab->handlers[(int) mode].libfunc;
  
!       emit_library_call (libfunc, 1,
! 			 word_mode, 2, x, mode, y, mode);
  
        /* Immediately move the result of the libcall into a pseudo
--- 3194,3198 ----
  	libfunc = ucmp_optab->handlers[(int) mode].libfunc;
  
!       emit_library_call (libfunc, 1, word_mode, 2, x, mode, y, mode);
  
        /* Immediately move the result of the libcall into a pseudo
*************** emit_cmp_and_jump_insn_1 (x, y, mode, co
*** 3323,3328 ****
     the proper branch condition code.
  
!    If X and Y have mode BLKmode, then SIZE specifies the size of both X and Y,
!    and ALIGN specifies the known shared alignment of X and Y. 
  
     MODE is the mode of the inputs (in case they are const_int).
--- 3322,3326 ----
     the proper branch condition code.
  
!    If X and Y have mode BLKmode, then SIZE specifies the size of both X and Y.
  
     MODE is the mode of the inputs (in case they are const_int).
*************** emit_cmp_and_jump_insn_1 (x, y, mode, co
*** 3333,3337 ****
  
  void
! emit_cmp_and_jump_insns (x, y, comparison, size, mode, unsignedp, align, label)
       rtx x, y;
       enum rtx_code comparison;
--- 3331,3335 ----
  
  void
! emit_cmp_and_jump_insns (x, y, comparison, size, mode, unsignedp, label)
       rtx x, y;
       enum rtx_code comparison;
*************** emit_cmp_and_jump_insns (x, y, compariso
*** 3339,3343 ****
       enum machine_mode mode;
       int unsignedp;
-      unsigned int align;
       rtx label;
  {
--- 3337,3340 ----
*************** emit_cmp_and_jump_insns (x, y, compariso
*** 3367,3371 ****
    if (unsignedp)
      comparison = unsigned_condition (comparison);
!   prepare_cmp_insn (&op0, &op1, &comparison, size, &mode, &unsignedp, align,
  		    ccp_jump);
    emit_cmp_and_jump_insn_1 (op0, op1, mode, comparison, unsignedp, label);
--- 3364,3369 ----
    if (unsignedp)
      comparison = unsigned_condition (comparison);
! 
!   prepare_cmp_insn (&op0, &op1, &comparison, size, &mode, &unsignedp,
  		    ccp_jump);
    emit_cmp_and_jump_insn_1 (op0, op1, mode, comparison, unsignedp, label);
*************** emit_cmp_and_jump_insns (x, y, compariso
*** 3375,3379 ****
  
  void
! emit_cmp_insn (x, y, comparison, size, mode, unsignedp, align)
       rtx x, y;
       enum rtx_code comparison;
--- 3373,3377 ----
  
  void
! emit_cmp_insn (x, y, comparison, size, mode, unsignedp)
       rtx x, y;
       enum rtx_code comparison;
*************** emit_cmp_insn (x, y, comparison, size, m
*** 3381,3387 ****
       enum machine_mode mode;
       int unsignedp;
-      unsigned int align;
  {
!   emit_cmp_and_jump_insns (x, y, comparison, size, mode, unsignedp, align, 0);
  }
  \f
--- 3379,3384 ----
       enum machine_mode mode;
       int unsignedp;
  {
!   emit_cmp_and_jump_insns (x, y, comparison, size, mode, unsignedp, 0);
  }
  \f
*************** emit_conditional_move (target, code, op0
*** 3739,3743 ****
  
    comparison 
!     = compare_from_rtx (op0, op1, code, unsignedp, cmode, NULL_RTX, 0);
  
    /* ??? Watch for const0_rtx (nop) and const_true_rtx (unconditional)?  */
--- 3736,3740 ----
  
    comparison 
!     = compare_from_rtx (op0, op1, code, unsignedp, cmode, NULL_RTX);
  
    /* ??? Watch for const0_rtx (nop) and const_true_rtx (unconditional)?  */
*************** expand_float (to, from, unsignedp)
*** 4170,4174 ****
  	      /* Test whether the sign bit is set.  */
  	      emit_cmp_and_jump_insns (from, const0_rtx, LT, NULL_RTX, imode,
! 				       0, 0, neglabel);
  
  	      /* The sign bit is not set.  Convert as signed.  */
--- 4167,4171 ----
  	      /* Test whether the sign bit is set.  */
  	      emit_cmp_and_jump_insns (from, const0_rtx, LT, NULL_RTX, imode,
! 				       0, neglabel);
  
  	      /* The sign bit is not set.  Convert as signed.  */
*************** expand_float (to, from, unsignedp)
*** 4218,4222 ****
        do_pending_stack_adjust ();
        emit_cmp_and_jump_insns (from, const0_rtx, GE, NULL_RTX, GET_MODE (from),
! 			        0, 0, label);
  
        /* On SCO 3.2.1, ldexp rejects values outside [0.5, 1).
--- 4215,4219 ----
        do_pending_stack_adjust ();
        emit_cmp_and_jump_insns (from, const0_rtx, GE, NULL_RTX, GET_MODE (from),
! 			       0, label);
  
        /* On SCO 3.2.1, ldexp rejects values outside [0.5, 1).
*************** expand_fix (to, from, unsignedp)
*** 4426,4430 ****
  	  do_pending_stack_adjust ();
  	  emit_cmp_and_jump_insns (from, limit, GE, NULL_RTX, GET_MODE (from),
! 				   0, 0, lab1);
  
  	  /* If not, do the signed "fix" and branch around fixup code.  */
--- 4423,4427 ----
  	  do_pending_stack_adjust ();
  	  emit_cmp_and_jump_insns (from, limit, GE, NULL_RTX, GET_MODE (from),
! 				   0, lab1);
  
  	  /* If not, do the signed "fix" and branch around fixup code.  */
*** optabs.h	2001/10/09 22:40:12	1.4
--- optabs.h	2001/11/15 20:29:16
*************** extern void emit_0_to_1_insn PARAMS ((rt
*** 292,296 ****
  /* Emit one rtl insn to compare two rtx's.  */
  extern void emit_cmp_insn PARAMS ((rtx, rtx, enum rtx_code, rtx,
! 				   enum machine_mode, int, unsigned int));
  
  /* The various uses that a comparison can have; used by can_compare_p:
--- 292,296 ----
  /* Emit one rtl insn to compare two rtx's.  */
  extern void emit_cmp_insn PARAMS ((rtx, rtx, enum rtx_code, rtx,
! 				   enum machine_mode, int));
  
  /* The various uses that a comparison can have; used by can_compare_p:
*************** enum can_compare_purpose
*** 307,314 ****
  extern int can_compare_p PARAMS ((enum rtx_code, enum machine_mode,
  				  enum can_compare_purpose));
- 
- extern void prepare_cmp_insn PARAMS ((rtx *, rtx *, enum rtx_code *, rtx,
- 				      enum machine_mode *, int *, int,
- 				      enum can_compare_purpose));
  
  extern rtx prepare_operand PARAMS ((int, rtx, int, enum machine_mode,
--- 307,310 ----
*** rtl.h	2001/11/15 10:28:47	1.313
--- rtl.h	2001/11/15 20:29:50
*************** extern rtx assign_stack_local		PARAMS ((
*** 1290,1293 ****
--- 1290,1295 ----
  extern rtx assign_stack_temp		PARAMS ((enum machine_mode,
  					       HOST_WIDE_INT, int));
+ extern rtx assign_stack_temp_for_type	PARAMS ((enum machine_mode,
+ 						 HOST_WIDE_INT, int, tree));
  extern rtx assign_temp			PARAMS ((tree, int, int, int));
  /* In emit-rtl.c */
*************** extern rtx gen_lowpart_SUBREG PARAMS ((e
*** 1682,1685 ****
--- 1684,1696 ----
  
  #define LAST_VIRTUAL_REGISTER		((FIRST_VIRTUAL_REGISTER) + 4)
+ 
+ /* Nonzero if REGNUM is a pointer into the stack frame.  */
+ #define REGNO_PTR_FRAME_P(REGNUM) 		\
+   ((REGNUM) == STACK_POINTER_REGNUM		\
+    || (REGNUM) == FRAME_POINTER_REGNUM		\
+    || (REGNUM) == HARD_FRAME_POINTER_REGNUM	\
+    || (REGNUM) == ARG_POINTER_REGNUM		\
+    || ((REGNUM) >= FIRST_VIRTUAL_REGISTER	\
+        && (REGNUM) <= LAST_VIRTUAL_REGISTER))
  
  /* REGNUM never really appearing in the INSN stream.  */
*** tree.h	2001/11/15 10:00:29	1.282
--- tree.h	2001/11/15 20:31:08
*************** extern tree get_inner_reference		PARAMS 
*** 2578,2582 ****
  						 HOST_WIDE_INT *, tree *,
  						 enum machine_mode *, int *,
! 						 int *, unsigned int *));
  
  /* Given a DECL or TYPE, return the scope in which it was declared, or
--- 2578,2582 ----
  						 HOST_WIDE_INT *, tree *,
  						 enum machine_mode *, int *,
! 						 int *));
  
  /* Given a DECL or TYPE, return the scope in which it was declared, or
*** config/d30v/d30v.c	2001/11/04 02:12:08	1.16
--- config/d30v/d30v.c	2001/11/15 20:34:20
*************** d30v_expand_builtin_va_arg(valist, type)
*** 2291,2295 ****
  
        emit_cmp_and_jump_insns (expand_expr (t, NULL_RTX, QImode, EXPAND_NORMAL),
! 			       GEN_INT (0), EQ, const1_rtx, QImode, 1, 1,
  			       lab_false);
  
--- 2291,2295 ----
  
        emit_cmp_and_jump_insns (expand_expr (t, NULL_RTX, QImode, EXPAND_NORMAL),
! 			       GEN_INT (0), EQ, const1_rtx, QImode, 1,
  			       lab_false);
  
*** config/i860/i860.c	2001/11/04 02:12:09	1.25
--- config/i860/i860.c	2001/11/15 20:37:47
*************** i860_va_arg (valist, type)
*** 2313,2317 ****
  			       GEN_INT (nparm - incr), GT, const0_rtx,
  			       TYPE_MODE (TREE_TYPE (field)),
! 			       TREE_UNSIGNED (field), 0, lab_false);
  
        t = fold (build (POSTINCREMENT_EXPR, TREE_TYPE (field), field,
--- 2313,2317 ----
  			       GEN_INT (nparm - incr), GT, const0_rtx,
  			       TYPE_MODE (TREE_TYPE (field)),
! 			       TREE_UNSIGNED (field), lab_false);
  
        t = fold (build (POSTINCREMENT_EXPR, TREE_TYPE (field), field,
*** config/ia64/ia64.c	2001/11/15 10:30:59	1.127
--- config/ia64/ia64.c	2001/11/15 20:38:59
*************** ia64_expand_fetch_and_op (binoptab, mode
*** 7399,7403 ****
    emit_insn (insn);
  
!   emit_cmp_and_jump_insns (tmp, ret, NE, 0, mode, 1, 0, label);
  
    return ret;
--- 7399,7403 ----
    emit_insn (insn);
  
!   emit_cmp_and_jump_insns (tmp, ret, NE, 0, mode, 1, label);
  
    return ret;
*************** ia64_expand_op_and_fetch (binoptab, mode
*** 7464,7468 ****
    emit_insn (insn);
  
!   emit_cmp_and_jump_insns (tmp, old, NE, 0, mode, 1, 0, label);
  
    return ret;
--- 7464,7468 ----
    emit_insn (insn);
  
!   emit_cmp_and_jump_insns (tmp, old, NE, 0, mode, 1, label);
  
    return ret;
*** config/rs6000/rs6000.c	2001/11/15 05:21:06	1.234
--- config/rs6000/rs6000.c	2001/11/15 20:41:46
*************** rs6000_va_arg (valist, type)
*** 2867,2872 ****
  
    emit_cmp_and_jump_insns (expand_expr (reg, NULL_RTX, QImode, EXPAND_NORMAL),
! 			   GEN_INT (8 - n_reg + 1),
! 			   GE, const1_rtx, QImode, 1, 1, lab_false);
  
    /* Long long is aligned in the registers.  */
--- 2867,2872 ----
  
    emit_cmp_and_jump_insns (expand_expr (reg, NULL_RTX, QImode, EXPAND_NORMAL),
! 			   GEN_INT (8 - n_reg + 1), GE, const1_rtx, QImode, 1,
! 			   lab_false);
  
    /* Long long is aligned in the registers.  */
*** config/sh/sh.c	2001/11/11 21:20:03	1.124
--- config/sh/sh.c	2001/11/15 20:42:28
*************** sh_va_arg (valist, type)
*** 4508,4512 ****
  				   expand_expr (next_fp_limit, NULL_RTX,
  						Pmode, EXPAND_NORMAL),
! 				   GE, const1_rtx, Pmode, 1, 1, lab_false);
  
  	  if (TYPE_ALIGN (type) > BITS_PER_WORD)
--- 4508,4512 ----
  				   expand_expr (next_fp_limit, NULL_RTX,
  						Pmode, EXPAND_NORMAL),
! 				   GE, const1_rtx, Pmode, 1, lab_false);
  
  	  if (TYPE_ALIGN (type) > BITS_PER_WORD)
*************** sh_va_arg (valist, type)
*** 4543,4547 ****
  				   expand_expr (next_o_limit, NULL_RTX,
  						Pmode, EXPAND_NORMAL),
! 				   GT, const1_rtx, Pmode, 1, 1, lab_false);
  
  	  tmp = build1 (ADDR_EXPR, pptr_type_node, next_o);
--- 4543,4547 ----
  				   expand_expr (next_o_limit, NULL_RTX,
  						Pmode, EXPAND_NORMAL),
! 				   GT, const1_rtx, Pmode, 1, lab_false);
  
  	  tmp = build1 (ADDR_EXPR, pptr_type_node, next_o);
*** ada/trans.c	2001/11/13 14:22:10	1.10
--- ada/trans.c	2001/11/15 23:05:04
*************** tree_transform (gnat_node)
*** 1428,1432 ****
  	      enum machine_mode mode;
  	      int unsignedp, volatilep;
- 	      unsigned int alignment;
  
  	      gnu_result_type = get_unpadded_type (Etype (gnat_node));
--- 1428,1431 ----
*************** tree_transform (gnat_node)
*** 1451,1455 ****
  
  	      get_inner_reference (gnu_prefix, &bitsize, &bitpos, &gnu_offset,
! 				   &mode, &unsignedp, &volatilep, &alignment);
  
  	      if (TREE_CODE (gnu_prefix) == COMPONENT_REF)
--- 1450,1454 ----
  
  	      get_inner_reference (gnu_prefix, &bitsize, &bitpos, &gnu_offset,
! 				   &mode, &unsignedp, &volatilep);
  
  	      if (TREE_CODE (gnu_prefix) == COMPONENT_REF)
*** ada/utils2.c	2001/10/29 20:25:51	1.3
--- ada/utils2.c	2001/11/15 23:05:07
*************** build_unary_op (op_code, result_type, op
*** 1165,1173 ****
  	      enum machine_mode mode;
  	      int unsignedp, volatilep;
- 	      unsigned int alignment;
  
  	      inner = get_inner_reference (operand, &bitsize, &bitpos, &offset,
! 					   &mode, &unsignedp, &volatilep,
! 					   &alignment);
  
  	      /* If INNER is a padding type whose field has a self-referential
--- 1165,1171 ----
  	      enum machine_mode mode;
  	      int unsignedp, volatilep;
  
  	      inner = get_inner_reference (operand, &bitsize, &bitpos, &offset,
! 					   &mode, &unsignedp, &volatilep);
  
  	      /* If INNER is a padding type whose field has a self-referential

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2001-11-19 23:27 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-13 15:03 Last alignment change for MEM tracking Richard Kenner
2001-11-13 15:03 ` John David Anglin
  -- strict thread matches above, loose matches on Subject: below --
2001-11-13 15:03 Richard Kenner
2001-11-13 15:03 Richard Kenner
2001-11-13 15:03 ` Stan Shebs
2001-11-13 15:03   ` Bryce McKinlay
2001-11-13 15:03 ` Andreas Tobler
2001-11-13 15:03 David Edelsohn
2001-11-13 15:03 Richard Kenner
     [not found] <no.id>
2001-11-13 15:03 ` John David Anglin
2001-11-13 15:03 Richard Kenner
2001-11-13 15:03 ` Bryce McKinlay
2001-11-13 15:03   ` Bryce McKinlay
2001-11-13 15:03 ` Stan Shebs
2001-11-13 15:03 John David Anglin
2001-11-13 15:03 Richard Kenner
2001-11-13 15:03 Richard Kenner
2001-11-13 15:03 ` Graham Stott
2001-11-13 15:03 Richard Kenner
2001-11-13 15:03 Richard Kenner
2001-11-13 15:03 Richard Kenner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).