int len;
char * retInst;
+ /* Don't optimize jumps in a jump table; a more generic test */
+ if (currPl->ic && currPl->ic->op == JUMPTABLE)
+ return FALSE;
+
label = hTabItemWithKey (vars, 5);
if (!label) return FALSE;
len = strlen(label);
}
+/*-------------------------------------------------------------------*/
+/* operandsLiteral - returns true of the condition's operands are */
+/* literals. */
+/*-------------------------------------------------------------------*/
+FBYNAME (operandsLiteral)
+{
+ set *operands;
+ const char *op;
+
+ operands = setFromConditionArgs (cmdLine, vars);
+
+ if (!operands)
+ {
+ fprintf (stderr,
+ "*** internal error: operandsLiteral peephole restriction"
+ " malformed: %s\n", cmdLine);
+ return FALSE;
+ }
+
+ for (op = setFirstItem (operands); op; op = setNextItem (operands))
+ {
+ if (!isdigit(*op))
+ {
+ deleteSet (&operands);
+ return FALSE;
+ }
+ }
+
+ deleteSet (&operands);
+ return TRUE;
+}
+
+
/*-----------------------------------------------------------------*/
/* callFuncByName - calls a function as defined in the table */
/*-----------------------------------------------------------------*/
{
"operandsNotRelated", operandsNotRelated
},
+ {
+ "operandsLiteral", operandsLiteral
+ },
{
"labelRefCountChange", labelRefCountChange
}
char *s;
/* read in the default rules */
- readRules (port->peep.default_rules);
+ if (!options.nopeep)
+ {
+ readRules (port->peep.default_rules);
+ }
/* if we have any additional file read it too */
if (options.peep_file)
{
readRules (s = readFileIntoBuffer (options.peep_file));
setToNull ((void *) &s);
+ /* override nopeep setting, default rules have not been read */
+ options.nopeep = 0;
}