This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: PR target/19890 - gcc.dg/20020219-1.c fails on IA64 HP-UX
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: zack at codesourcery dot com, rth at redhat dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 31 Mar 2005 11:04:50 -0800 (PST)
- Subject: Re: Patch: PR target/19890 - gcc.dg/20020219-1.c fails on IA64 HP-UX
Here is a patch to implement -mdisable-indexing on IA64 HP-UX. I put it
in ilp32.opt because it only makes sense for ILP32 mode.
I tested it on IA64 HP-UX and Linux.
OK for checkin?
2005-03-31 Steve Ellcey <sje@cup.hp.com>
* config/ia64/ilp32.opt (mdisable-indexing): New flag to set
TARGET_DISABLE_INDEXING.
* config/ia64/ia64.h (TARGET_DISABLE_INDEXING): Define default value.
* config/ia64/ia64.c (addp4_optimize_ok): Check value of
TARGET_DISABLE_INDEXING.
*** gcc.orig/gcc/config/ia64/ilp32.opt Thu Mar 31 10:40:26 2005
--- gcc/gcc/config/ia64/ilp32.opt Thu Mar 31 11:03:05 2005
*************** Generate ILP32 code
*** 5,7 ****
--- 5,11 ----
mlp64
Target Report RejectNegative InverseMask(ILP32)
Generate LP64 code
+
+ mdisable-indexing
+ Target Report RejectNegative Mask(DISABLE_INDEXING)
+ Do not combine pointer extension with pointer addition.
*** gcc.orig/gcc/config/ia64/ia64.h Thu Mar 31 10:40:17 2005
--- gcc/gcc/config/ia64/ia64.h Thu Mar 31 11:03:05 2005
*************** extern int ia64_tls_size;
*** 79,84 ****
--- 79,88 ----
#define TARGET_ILP32 0
#endif
+ #ifndef TARGET_DISABLE_INDEXING
+ #define TARGET_DISABLE_INDEXING 0
+ #endif
+
#ifndef HAVE_AS_LTOFFX_LDXMOV_RELOCS
#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 0
#endif
*** gcc.orig/gcc/config/ia64/ia64.c Thu Mar 31 10:40:14 2005
--- gcc/gcc/config/ia64/ia64.c Thu Mar 31 11:03:04 2005
*************** ia64_move_ok (rtx dst, rtx src)
*** 679,686 ****
int
addp4_optimize_ok (rtx op1, rtx op2)
{
! return (basereg_operand (op1, GET_MODE(op1)) !=
! basereg_operand (op2, GET_MODE(op2)));
}
/* Check if OP is a mask suitable for use with SHIFT in a dep.z instruction.
--- 679,687 ----
int
addp4_optimize_ok (rtx op1, rtx op2)
{
! return (!TARGET_DISABLE_INDEXING
! && basereg_operand (op1, GET_MODE(op1)) !=
! basereg_operand (op2, GET_MODE(op2)));
}
/* Check if OP is a mask suitable for use with SHIFT in a dep.z instruction.