diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-04-12 12:33:24 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-04-12 12:33:24 +0000 |
commit | 4a83669886cd16729e6fc94293d18fcd285ccf3e (patch) | |
tree | eb53b2245cbdb9d1a8926413297859db66cdb8c1 | |
parent | 22ee087be379faaee98a4c9cb2094971c7af1621 (diff) | |
download | gcc-4a83669886cd16729e6fc94293d18fcd285ccf3e.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52223 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/expr.c | 20 |
2 files changed, 15 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d74aeebc706..63fc94ffff8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 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. diff --git a/gcc/expr.c b/gcc/expr.c index a9ca3f6613b..c5b1eced98d 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -3684,12 +3684,12 @@ expand_assignment (to, from, want_value, suggest_reg) 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 @@ -4180,7 +4180,7 @@ store_expr (exp, target, want_value) } 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); @@ -4489,12 +4489,12 @@ store_constructor (exp, target, cleared, size) 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, @@ -6913,12 +6913,12 @@ expand_expr (exp, target, tmode, modifier) 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 |