summaryrefslogtreecommitdiff
path: root/gcc/explow.c
diff options
context:
space:
mode:
authorSteve Ellcey <sje@cup.hp.com>2001-07-19 23:26:51 +0000
committerRichard Henderson <rth@gcc.gnu.org>2001-07-19 16:26:51 -0700
commit6dd12198d088c1e749b67c9e9a92352b2639265a (patch)
treea9b47fb91c9fd09f19a418557090e5dd7abf596d /gcc/explow.c
parent0248ce054752e353be11bdf52dae7c5f6d2cb7f0 (diff)
downloadgcc-6dd12198d088c1e749b67c9e9a92352b2639265a.tar.gz
* tm.texi (POINTERS_EXTEND_UNSIGNED) Modify definition.
* optabs.c (can_extend_p) Check HAVE_ptr_extend for a specialized pointer extension instruction. * combine.c (nonzero_bits,num_sign_bit_copies) Likewise. * simplify-rtx.c (simplify_unary_operation) Likewise. * explow.c (convert_memory_address) Check value of POINTERS_EXTEND_UNSIGNED to avoid some conversions when less than zero. * config/ia64/t-hpux (LIBGCC, INSTALL_LIBGCC, MULTILIB_OPTIONS, MULTILIB_DIRNAMES, MULTILIB_MATCHES) Add multilib support. * config/ia64/hpux.h (CPP_SPEC, ASM_SPEC, SUBTARGET_SWITCHES) Add Multilib Support. (POINTERS_EXTEND_UNSIGNED) Define for ILP32 support. * config/ia64/ia64.h (MASK_ILP32, TARGET_ILP32, SUBTARGET_SWITCHES) Add Multilib Support. (POINTER_SIZE, LONG_TYPE_SIZE, MAX_LONG_TYPE_SIZE) Modify for ILP32 support. * config/ia64/ia64.c (rtx_needs_barrier) Add support for addp4. * config/ia64/ia64.md (ptr_extend) New instruction to "swizzle" a 32 bit HP-UX pointer into a 64 bit HP-UX pointer. From-SVN: r44166
Diffstat (limited to 'gcc/explow.c')
-rw-r--r--gcc/explow.c42
1 files changed, 27 insertions, 15 deletions
diff --git a/gcc/explow.c b/gcc/explow.c
index afb51d9e655..a8249999c98 100644
--- a/gcc/explow.c
+++ b/gcc/explow.c
@@ -365,25 +365,36 @@ convert_memory_address (to_mode, x)
return x;
case SUBREG:
- if (GET_MODE (SUBREG_REG (x)) == to_mode)
+ if (POINTERS_EXTEND_UNSIGNED >= 0
+ && GET_MODE (SUBREG_REG (x)) == to_mode)
return SUBREG_REG (x);
break;
case LABEL_REF:
- temp = gen_rtx_LABEL_REF (to_mode, XEXP (x, 0));
- LABEL_REF_NONLOCAL_P (temp) = LABEL_REF_NONLOCAL_P (x);
- return temp;
+ if (POINTERS_EXTEND_UNSIGNED >= 0)
+ {
+ temp = gen_rtx_LABEL_REF (to_mode, XEXP (x, 0));
+ LABEL_REF_NONLOCAL_P (temp) = LABEL_REF_NONLOCAL_P (x);
+ return temp;
+ }
+ break;
case SYMBOL_REF:
- temp = gen_rtx_SYMBOL_REF (to_mode, XSTR (x, 0));
- SYMBOL_REF_FLAG (temp) = SYMBOL_REF_FLAG (x);
- CONSTANT_POOL_ADDRESS_P (temp) = CONSTANT_POOL_ADDRESS_P (x);
- STRING_POOL_ADDRESS_P (temp) = STRING_POOL_ADDRESS_P (x);
- return temp;
+ if (POINTERS_EXTEND_UNSIGNED >= 0)
+ {
+ temp = gen_rtx_SYMBOL_REF (to_mode, XSTR (x, 0));
+ SYMBOL_REF_FLAG (temp) = SYMBOL_REF_FLAG (x);
+ CONSTANT_POOL_ADDRESS_P (temp) = CONSTANT_POOL_ADDRESS_P (x);
+ STRING_POOL_ADDRESS_P (temp) = STRING_POOL_ADDRESS_P (x);
+ return temp;
+ }
+ break;
case CONST:
- return gen_rtx_CONST (to_mode,
- convert_memory_address (to_mode, XEXP (x, 0)));
+ if (POINTERS_EXTEND_UNSIGNED >= 0)
+ return gen_rtx_CONST (to_mode,
+ convert_memory_address (to_mode, XEXP (x, 0)));
+ break;
case PLUS:
case MULT:
@@ -391,10 +402,11 @@ convert_memory_address (to_mode, x)
permute the conversion and addition operation. We can always safely
permute them if we are making the address narrower. In addition,
always permute the operations if this is a constant. */
- if (GET_MODE_SIZE (to_mode) < GET_MODE_SIZE (from_mode)
- || (GET_CODE (x) == PLUS && GET_CODE (XEXP (x, 1)) == CONST_INT
- && (INTVAL (XEXP (x, 1)) + 20000 < 40000
- || CONSTANT_P (XEXP (x, 0)))))
+ if (POINTERS_EXTEND_UNSIGNED >= 0
+ && (GET_MODE_SIZE (to_mode) < GET_MODE_SIZE (from_mode)
+ || (GET_CODE (x) == PLUS && GET_CODE (XEXP (x, 1)) == CONST_INT
+ && (INTVAL (XEXP (x, 1)) + 20000 < 40000
+ || CONSTANT_P (XEXP (x, 0))))))
return gen_rtx_fmt_ee (GET_CODE (x), to_mode,
convert_memory_address (to_mode, XEXP (x, 0)),
convert_memory_address (to_mode, XEXP (x, 1)));