This is the mail archive of the gcc@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]

define_memory_constraint and REG_OK_STRICT


Hello all,

I am doing a port for a 32bit target in GCC 4.4.0.
I have defined memory_constraints in predicates.c like this

(define_memory_constraint "Sr0"
   "Memory refrence through base registers"
   (match_test "target_mem_constraint (\"r0\", op)"))

In the function target_mem_constraint i have

int
target_mem_constraint (const char *str, rtx op)
{
  char c0 = str[0];
  char c1 = str[1];
  rtx op0 = XEXP (op, 0);
  bool strict =  reload_completed;

  if (!MEM_P (op))
    return 0;

  switch (c0)
    {
    case 'r':
      return (!STACK_REG_RTX_P (op0)
              && BASE_REG_RTX_P (op0, strict));
.......
.......

My question is my definition of strict correct?
or should it be reload_in_progress || reload_completed?

Regards,
Shafi


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