comparison lwasm/lwasm.h @ 377:67373a053c49

Add ?rts target for branch instructions Add a ?rts target for branch instructions, which brances to the nearest RTS or inverts the branch logic to branch around a generated RTS. Activated by a pragma "qrts". Thanks to Erik G <erik@6809.org> for the patch.
author William Astle <lost@l-w.ca>
date Mon, 13 Jul 2015 20:50:02 -0600
parents 35d4213e6657
children d791d47afc48
comparison
equal deleted inserted replaced
376:35d4213e6657 377:67373a053c49
95 PRAGMA_6809 = 1 << 14, // 6809/6309 assembly mode 95 PRAGMA_6809 = 1 << 14, // 6809/6309 assembly mode
96 PRAGMA_TESTMODE = 1 << 15, // enable test mode (for internal unit testing) 96 PRAGMA_TESTMODE = 1 << 15, // enable test mode (for internal unit testing)
97 PRAGMA_C = 1 << 16, // enable cycle counts 97 PRAGMA_C = 1 << 16, // enable cycle counts
98 PRAGMA_CD = 1 << 17, // enable detailed cycle count 98 PRAGMA_CD = 1 << 17, // enable detailed cycle count
99 PRAGMA_CT = 1 << 18, // enable cycle count running total 99 PRAGMA_CT = 1 << 18, // enable cycle count running total
100 PRAGMA_CC = 1 << 19 // clear cycle count running total 100 PRAGMA_CC = 1 << 19, // clear cycle count running total
101 PRAGMA_QRTS = 1 << 20 // enable BRA ?RTS support
101 }; 102 };
102 103
103 enum 104 enum
104 { 105 {
105 section_flag_bss = 1, // BSS section 106 section_flag_bss = 1, // BSS section
270 struct line_expr_s *exprs; // expressions used during parsing 271 struct line_expr_s *exprs; // expressions used during parsing
271 char *lstr; // string passed forward 272 char *lstr; // string passed forward
272 int pb; // pass forward post byte 273 int pb; // pass forward post byte
273 int lint; // pass forward integer 274 int lint; // pass forward integer
274 int lint2; // another pass forward integer 275 int lint2; // another pass forward integer
276 int conditional_return; // for ?RTS handling (1 if RTS follows)
275 asmstate_t *as; // assembler state data ptr 277 asmstate_t *as; // assembler state data ptr
276 int pragmas; // pragmas in effect for the line 278 int pragmas; // pragmas in effect for the line
277 int context; // the symbol context number 279 int context; // the symbol context number
278 char *ltext; // line number 280 char *ltext; // line number
279 char *linespec; // line spec 281 char *linespec; // line spec