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]

Re: Question about GO_IF_LEGITIMIZE_ADDRESS



>Peter> Any suggestions for which character to use for this new
>Peter> constraint(perhaps '@')?
>
>	GCC already has 'a'.  Is that what you mean?

Nope.  'a' is used to indicate that the value the operand (or what the
operand points at) goes into an address register.  If you have the
constraint string of "ma", then it indicates that that operand can
either be in memory("m"), or in an address register("a").  What I need
is a way of indicaing that the operand is in memory, but needs to be
accessed via register indirect.

I'm wondering if I can steal what I did for movsf where I pushed the
symbol_ref to a register, something like:

(define_expand "movsf"
  [(set (match_operand:SF 0 "nonimmediate_operand" "")
	(match_operand:SF 1 "general_operand" ""))]
  ""
  "
{
  if (TARGET_CFV4E) {
      /* Don't allow writes to memory except via a register;
	 the m68k doesn't consider PC-relative addresses to be writable.  */
      if (GET_CODE (operands[0]) == MEM
	  && symbolic_operand (XEXP (operands[0], 0), SImode))
	operands[0] = gen_rtx (MEM, SFmode,
			       force_reg (SImode, XEXP (operands[0], 0)));
  }
")

-- 
Peter Barada                                   Peter.Barada@motorola.com
Wizard                                         781-852-2768 (direct)
WaveMark Solutions(wholly owned by Motorola)   781-270-0193 (fax)


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