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: Using SCRATCH Register for a mov op,


(define_expand "movhi"
  [(parallel[(set (match_operand:HI 0 "general_operand" "=r,r,m,r,r")
        (match_operand:HI 1 "general_operand" "r,m,r,I,i"))
   (clobber (match_scratch:QI 2 ""))])]
  ""
  "{
  rtx temp;
  /* One of the ops has to be in a register */
  if (!register_operand(operand0, HImode)
      && !register_operand(operand1, HImode))
    {
      operands[1] = copy_to_mode_reg(HImode, operand1);
    }
}")

	Shouldn't the define_expand use

(clobber (scratch:QI))

not

(clobber (match_scratch:QI 2 ""))

	The define_insn needs to match the scratch, but the define_expand
needs to create the scratch register.

David


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