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]

memory_address_p


Dear Friends,

While looking at this basic function mentioned in the
subject, I realized I had some doubts.

The code reads as follows in gcc/recog.c

/* Return 1 if ADDR is a valid memory address for mode
MODE.  */
int
memory_address_p (mode, addr)
     enum machine_mode mode ATTRIBUTE_UNUSED;
     rtx addr;
{
  if (GET_CODE (addr) == ADDRESSOF)
    return 1;

  GO_IF_LEGITIMATE_ADDRESS (mode, addr, win);
  return 0;

 win:
  return 1;
}

My queries are

1. The argument "mode" is stated to be
ATTRIBUTE_UNUSED,
   but isn't it used via
      GO_IF_LEGITIMATE_ADDRESS ? 

2. The second doubt is about the usage. The GO_IF
   LEGITIMATE_ADDRESS macros  uses something like
   "GET_MODE_SIZE (mode)".For "mode == BLKmode" this
   seems to be zero. This invalidates addresses
   like  (mem:BLKmode ADDR) in some cases 
   that I am exploring.I want size of the reference
   even if it is BLKmode.
   Could  someone please clarify as to how to handle
   this? Or are there some additional 
   semantics involved ?

Thanks in advance,
Ranjit.

__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com


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