#define FBYNAME(x) int x (hTab *vars, lineNode *currPl, lineNode *head, \
const char *cmdLine)
+#if !OPT_DISABLE_PIC
+void peepRules2pCode(peepRule *);
+#endif
+
/*-----------------------------------------------------------------*/
/* pcDistance - afinds a label back ward or forward */
/*-----------------------------------------------------------------*/
/* don't indent comments & labels */
if (head->line &&
(*head->line == ';' ||
- head->line[strlen (head->line) - 1] == ':'))
+ head->line[strlen (head->line) - 1] == ':')) {
fprintf (of, "%s\n", head->line);
- else
+ } else {
+ if (head->isInline && *head->line=='#') {
+ // comment out preprocessor directives in inline asm
+ fprintf (of, ";");
+ }
fprintf (of, "\t%s\n", head->line);
+ }
head = head->next;
}
}
/* first get the value of the variable */
vvx = *s;
- /* the value is ended by a ',' or space or newline or null */
+ /* the value is ended by a ',' or space or newline or null or ) */
while (*vvx &&
*vvx != ',' &&
!isspace (*vvx) &&
*vvx != '\n' &&
- *vvx != ':')
+ *vvx != ':' &&
+ *vvx != ')')
{
char ubb = 0;
/* if we find a '(' then we need to balance it */
}
/*-----------------------------------------------------------------*/
-/* initPeepHole - initiaises the peep hole optimizer stuff */
+/* initPeepHole - initialises the peep hole optimizer stuff */
/*-----------------------------------------------------------------*/
void
initPeepHole ()
readRules (s = readFileIntoBuffer (options.peep_file));
setToNull ((void **) &s);
}
+
+
+#if !OPT_DISABLE_PIC
+ /* Convert the peep rules into pcode.
+ NOTE: this is only support in the PIC port (at the moment)
+ */
+ if (TARGET_IS_PIC) {
+ peepRules2pCode(rootRules);
+ }
+#endif
+
}