+2003-04-11 kevin Vigor <kevin@vigor.nu>
+
+ * ds390/gen.c ds390/peeph.def: fix bug 706781
+
2003-04-11 Borut Razem <borut.razem@siol.net>
* support/Util/dbuf.c, support/Util/dbuf.h: update to version 1.1.1 - re-added C++ stuff to make it still more portable
// AOP_IS_DPTRn(IC_LEFT(ic)) ? "true" : "false",
// AOP_IS_DPTRn(IC_RIGHT(ic)) ? "true" : "false",
// AOP_IS_DPTRn(IC_RESULT(ic)) ? "true" : "false");
-// );
-
+// );
- // Right uses DPTR unless left or result is an AOP_STR.
- aopOp (IC_RIGHT(ic),ic,FALSE, AOP_IS_STR(IC_LEFT(ic)) || AOP_IS_STR(IC_RESULT(ic)));
+ // Right uses DPTR unless left or result is an AOP_STR; however,
+ // if right is an AOP_STR, it must use DPTR regardless.
+ if ((AOP_IS_STR(IC_LEFT(ic)) || AOP_IS_STR(IC_RESULT(ic)))
+ && !AOP_IS_STR(IC_RIGHT(ic)))
+ {
+ useDp2 = TRUE;
+ }
+ else
+ {
+ useDp2 = FALSE;
+ }
+
+ aopOp (IC_RIGHT(ic),ic,FALSE, useDp2);
// if the right used DPTR, left MUST use DPTR2.
// if the right used DPTR2, left MUST use DPTR.