return FALSE;
}
+/* Do CSE estimation */
+static bool cseCostEstimation (iCode *ic, iCode *pdic)
+{
+ operand *result = IC_RESULT(ic);
+ sym_link *result_type = operandType(result);
+
+ /* if it is a pointer then return ok for now */
+ if (IC_RESULT(ic) && IS_PTR(result_type)) return 1;
+
+ /* if bitwise | add & subtract then no since mcs51 is pretty good at it
+ so we will cse only if they are local (i.e. both ic & pdic belong to
+ the same basic block */
+ if (IS_BITWISE_OP(ic) || ic->op == '+' || ic->op == '-') {
+ /* then if they are the same Basic block then ok */
+ if (ic->eBBlockNum == pdic->eBBlockNum) return 1;
+ else return 0;
+ }
+
+ /* for others it is cheaper to do the cse */
+ return 1;
+}
+
/** $1 is always the basename.
$2 is always the output file.
$3 varies
*/
static const char *_linkCmd[] =
{
- "aslink", "-nf", "$1", NULL
+ "{bindir}{sep}aslink", "-nf", "$1", NULL
};
+/* $3 is replaced by assembler.debug_opts resp. port->assembler.plain_opts */
static const char *_asmCmd[] =
{
- "asx8051", "$l", "-plosgffc", "$1.asm", NULL
+ "asx8051", "$l", "$3", "$1.asm", NULL
};
/* Globals */
_mcs51_regparm,
NULL,
NULL,
+ NULL,
FALSE,
0, /* leave lt */
0, /* leave gt */
1, /* transform != to !(a == b) */
0, /* leave == */
FALSE, /* No array initializer support. */
+ cseCostEstimation,
+ NULL, /* no builtin functions */
PORT_MAGIC
};