This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: define_constraints patch, re-revised


On 10/2/06, Rask Ingemann Lambertsen <rask@sygehus.dk> wrote:
static inline bool
satisfies_constraint_I0 (rtx op)
{
  HOST_WIDE_INT ival = 0;
  if (GET_CODE (op) == CONST_INT)
    ival = INTVAL (op);
  return
#line 39 "../../../cvssrc/gcc/gcc/config/ia16/constraints.md"
(ival == 0);
}
[cut]
static inline bool
satisfies_constraint_Ipu (rtx op)
{
  return
#line 95 "../../../cvssrc/gcc/gcc/config/ia16/constraints.md"
(TARGET_18x ? true : false);
}
#endif /* tm-constrs.h */

Oh ho, I know what's going on now. There are two problems. First, I was mistaken in thinking that the boilerplate code got unconditionally emitted; it's cut out if we don't think it's needed. Second, there is an optimization in add_constraint ("Remove the redundant match_code from the expression") which is correct when IJKLMNOP constraints are called from the legacy interface (CONST_OK_FOR_CONSTRAINT/LETTER) but not when the satisfies_constraint_* functions / satisfies_constraint_p are called directly. I will try to find time to patch this in the next week or so, but I can't make any promises.

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]