+ if (strcmp (port->target, "pic14") == 0)
+ oldOneByteOps = TRUE;
+ if (getenv ("SDCC_NEWONEBYTEOPS"))
+ {
+ if (!saidHello)
+ {
+ fprintf (stderr, "Override: oldOneByteOps = FALSE\n");
+ saidHello = TRUE;
+ }
+ oldOneByteOps = FALSE;
+ }
+ else if (getenv ("SDCC_OLDONEBYTEOPS"))
+ {
+ if (!saidHello)
+ {
+ fprintf (stderr, "Override: oldOneByteOps = TRUE\n");
+ saidHello = TRUE;
+ }
+ oldOneByteOps = TRUE;
+ }
+
+
+ if ( oldOneByteOps
+ && ( (IS_CHAR (getSpec (ltype)) && !IS_UNSIGNED (getSpec (ltype)))
+ || (IS_CHAR (getSpec (rtype)) && !IS_UNSIGNED (getSpec (rtype)))))
+ /* one or two signed char operands: promote to int */
+ resultType = RESULT_TYPE_INT;
+#endif
+
+ ctype = computeType (ltype, rtype, resultType, op);
+
+#ifdef OLDONEBYTEOPS
+
+ if (oldOneByteOps)
+ {
+ if ( op == '*'
+ && IS_CHAR (getSpec (ltype)) && IS_UNSIGNED (getSpec (ltype))
+ && IS_CHAR (getSpec (rtype)) && IS_UNSIGNED (getSpec (rtype)))
+ {
+ /* two unsigned char operands and Mult: no promotion */
+ return ctype;
+ }
+ *op1 = geniCodeCast (ctype, *op1, TRUE);
+ *op2 = geniCodeCast (ctype, *op2, TRUE);
+
+ return ctype;
+ }
+
+#endif
+
+ switch (op)
+ {
+ case '*':
+ case '/':
+ case '%':
+ if (IS_CHAR (getSpec (ltype)) && IS_CHAR (getSpec (rtype)))
+ {
+ /* one byte operations: keep signedness for code generator */
+ return ctype;
+ }
+ break;
+ default:
+ break;
+ }