Fri Apr 12 08:06:54 2002 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+ * expr.c (expand_assigment): Remove duplicate conversions #ifdef
+ POINTERS_EXTEND_UNSIGNED.
+ (store_constructor, expand_expr, case COMPONENT_REF): Likewise.
+ (store_expr): Use TYPE_MODE (sizetype), not ptr_mode.
+
* emit-rtl.c (widen_memory_access): Don't do anything if MEMOFFSET
not specified.
if (GET_CODE (to_rtx) != 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);
+#else
+ if (GET_MODE (offset_rtx) != ptr_mode)
+ offset_rtx = convert_to_mode (ptr_mode, offset_rtx, 0);
#endif
/* A constant address in TO_RTX can have VOIDmode, we must not try
}
else
{
- size = expand_binop (ptr_mode, sub_optab, size,
+ size = expand_binop (TYPE_MODE (sizetype), sub_optab, size,
copy_size_rtx, NULL_RTX, 0,
OPTAB_LIB_WIDEN);
if (GET_CODE (to_rtx) != 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);
+#else
+ if (GET_MODE (offset_rtx) != ptr_mode)
+ offset_rtx = convert_to_mode (ptr_mode, offset_rtx, 0);
#endif
to_rtx = offset_address (to_rtx, offset_rtx,
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);
+#else
+ if (GET_MODE (offset_rtx) != ptr_mode)
+ offset_rtx = convert_to_mode (ptr_mode, offset_rtx, 0);
#endif
/* A constant address in OP0 can have VOIDmode, we must not try