+2003-09-06 Bernhard Held <bernhard@bernhardheld.de>
+
+ * src/SDCCicode.c (ast2iCode): fixed differences in iCode with different
+ compilers
+
2003-09-05 Erik Petrich <epetrich@ivorytower.norman.ok.us>
* src/SDCCast.c (isConformingBody): fixed loop reversal bug
reported in bug #800609
ul != (TYPE_UWORD) ul)
werror (W_INT_OVL);
}
- else /* int */
+ else /* signed int */
{
- /* int is handled here in order to detect overflow */
+ /* signed int is handled here in order to detect overflow */
TYPE_DWORD l = (TYPE_WORD) operandLitValue (left) *
(TYPE_WORD) operandLitValue (right);
resType = usualBinaryConversions (&left, &right);
- /* if the right is a literal & power of 2
- and left is unsigned then make it a
+ /* if the right is a literal & power of 2
+ and left is unsigned then make it a
right shift */
if (IS_LITERAL (retype) &&
!IS_FLOAT (letype) &&
case NE_OP:
case AND_OP:
case OR_OP:
+ /* different compilers (even different gccs) evaluate
+ the two calls in a different order. to get the same
+ result on all machines we've to specify a clear sequence.
return geniCodeLogic (geniCodeRValue (left, FALSE),
- geniCodeRValue (right, FALSE),
- tree->opval.op);
+ geniCodeRValue (right, FALSE),
+ tree->opval.op);
+ */
+ {
+ operand *leftOp, *rightOp;
+
+ rightOp = geniCodeRValue (right, FALSE);
+ leftOp = geniCodeRValue (left , FALSE);
+
+ return geniCodeLogic (leftOp, rightOp, tree->opval.op);
+ }
case '?':
return geniCodeConditional (tree,lvl);