comparison lwasm/pragma.c @ 376:35d4213e6657

Add cycle counting to listing Add option to include instruction cycle counts to the listing. Thanks to Erik G <erik@6809.org> for the patch.
author William Astle <lost@l-w.ca>
date Mon, 13 Jul 2015 20:47:30 -0600
parents 71f507f404f1
children 67373a053c49
comparison
equal deleted inserted replaced
375:71f507f404f1 376:35d4213e6657
62 { "condundefzero", "nocondundefzero", PRAGMA_CONDUNDEFZERO }, 62 { "condundefzero", "nocondundefzero", PRAGMA_CONDUNDEFZERO },
63 { "6809", "6309", PRAGMA_6809 }, 63 { "6809", "6309", PRAGMA_6809 },
64 { "6800compat", "no6800compat", PRAGMA_6800COMPAT }, 64 { "6800compat", "no6800compat", PRAGMA_6800COMPAT },
65 { "forwardrefmax", "noforwardrefmax", PRAGMA_FORWARDREFMAX }, 65 { "forwardrefmax", "noforwardrefmax", PRAGMA_FORWARDREFMAX },
66 { "testmode", "notestmode", PRAGMA_TESTMODE }, 66 { "testmode", "notestmode", PRAGMA_TESTMODE },
67 { 0, 0, 0} 67 { "c", "noc", PRAGMA_C },
68 { "cc", "nocc", PRAGMA_CC },
69 { "cd", "nocd", PRAGMA_CD },
70 { "ct", "noct", PRAGMA_CT },
71 { 0, 0, 0 }
68 }; 72 };
69 73
70 int parse_pragma_string(asmstate_t *as, char *str, int ignoreerr) 74 int parse_pragma_string(asmstate_t *as, char *str, int ignoreerr)
71 { 75 {
72 char *p; 76 char *p;
139 143
140 // *pragma must NEVER throw an error 144 // *pragma must NEVER throw an error
141 parse_pragma_string(as, ps, 1); 145 parse_pragma_string(as, ps, 1);
142 if (as -> pragmas & PRAGMA_NOLIST) 146 if (as -> pragmas & PRAGMA_NOLIST)
143 l -> pragmas |= PRAGMA_NOLIST; 147 l -> pragmas |= PRAGMA_NOLIST;
148 if (as->pragmas & PRAGMA_CC)
149 {
150 l->pragmas |= PRAGMA_CC;
151 as->pragmas &= ~PRAGMA_CC;
152 }
144 lw_free(ps); 153 lw_free(ps);
145 } 154 }
146 155
147 static int pragma_stack_compare(input_stack_entry *e, void *d) 156 static int pragma_stack_compare(input_stack_entry *e, void *d)
148 { 157 {