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 RFC: Fix ARM bug by splitting up iwmmxt_movsi_insn


On Mon, Oct 13, 2003 at 10:12:47AM +0100, Richard Earnshaw wrote:
> > +   switch (which_alternative)
> > +   {
> > +   case 0: return \"mov%?\\t%0, %1\";
> > +   case 1: return \"mvn%?\\t%0, #%B1\";
> > +   case 2: return \"ldr%?\\t%0, %1\";
> > +   case 3: return \"str%?\\t%1, %0\";
> > +   case 4: return \"tmcr%?\\t%0, %1\";
> > +   case 5: return \"tmrc%?\\t%0, %1\";
> > +   default: return arm_output_load_gr (operands);
> > +  }"

If you do this then you need to fix arm_output_load_gr also.  At the
minimum:

  if (GET_CODE (operands [1]) != MEM
      || GET_CODE (sum = XEXP (operands [1], 0)) != PLUS
      || GET_CODE (reg = XEXP (sum, 0)) != REG
      || GET_CODE (offset = XEXP (sum, 1)) != CONST_INT
      || ((INTVAL (offset) < 1024) && (INTVAL (offset) > -1024)))
    return "wldrw%?\t%0, %1";

But wldrw is the unpredicable instruction which started all this.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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