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: [PATCH] SPARC psABI fix, callee returns struct checking.


On Wed, Mar 22, 2006 at 04:45:29PM -0500, Carlos O'Donell wrote:
> > +(define_insn "adjust_register"
> > +  [(unspec:SI [(match_operand:SI 0 "register_operand" "r")
> > +              (match_operand:SI 1 "small_int_operand" "I")] 
> > UNSPEC_ADJUST_REGISTER)]
> > +  ""
> > +{
> > +  return "add\t%0, %1, %0\n\t";
> > +}
> > +  [(set (attr "length") (const_int 1))])

This modifies operand 0.  This must be represented as

  [(set (match_operand:SI 0 "register_operand" "+r")
	(unspec:SI [(match_dup 0)
		    (match_operand:SI 1 "small_int_operand" "I")]
		   UNSPEC_ADJUST_REGISTER))]

Supposing that you actually need the unspec at all.  I see
commentary that claims that the compiler expects the return
address to be constant, but I'd like some explanation as to
why and where.


r~


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