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]

Patch: pj fix for expression operands



The pj port is creating many more kinds of expression operands than it
could handle previously.  The following patch is needed in order to
build libgcc, newlib, and other important libraries.

Ok for branch and trunk?

AG


2001-03-18  Anthony Green  <green@redhat.com>

	* config/pj/pj.c (pj_output_rval): Deal with MINUS, MULT, LSHIFTRT
	and NEG operands.

Index: gcc/config/pj/pj.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/pj/pj.c,v
retrieving revision 1.3
diff -c -r1.3 pj.c
*** pj.c	2000/03/08 06:27:35	1.3
--- pj.c	2001/03/18 22:16:05
***************
*** 399,404 ****
--- 399,427 ----
        pj_output_rval (XEXP (op, 1), mode, op);
        pj_printf ("%*%cadd", mode_to_char (mode));
      }
+   else if (code == MINUS)
+     {
+       pj_output_rval (XEXP (op, 0), mode, op);
+       pj_output_rval (XEXP (op, 1), mode, op);
+       pj_printf ("%*%csub", mode_to_char (mode));
+     }
+   else if (code == MULT)
+     {
+       pj_output_rval (XEXP (op, 0), mode, op);
+       pj_output_rval (XEXP (op, 1), mode, op);
+       pj_printf ("%*%cmul", mode_to_char (mode));
+     }
+   else if (code == LSHIFTRT)
+     {
+       pj_output_rval (XEXP (op, 0), mode, op);
+       pj_output_rval (XEXP (op, 1), mode, op);
+       pj_printf ("%*%cushr", mode_to_char (mode));
+     }
+   else if (code == NEG)
+     {
+       pj_output_rval (XEXP (op, 0), mode, op);
+       pj_printf ("%*%cneg", mode_to_char (mode));
+     }
    else if (tab && tab->handlers[mode].insn_code != CODE_FOR_nothing)
      {
        const char *template =


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