Patch: pj fix for expression operands
Anthony Green
green@cygnus.com
Sun Mar 18 17:58:00 GMT 2001
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 =
More information about the Gcc-patches
mailing list