comparison lwasm/pass1.c @ 166:324f28905144

Fixed problem with rmb, etc., not working right wrt line address when not in os9 mode
author lost@l-w.ca
date Mon, 29 Aug 2011 18:30:55 -0600
parents 9cf1796259b2
children d59f17580e8b
comparison
equal deleted inserted replaced
165:c45f23ae79e6 166:324f28905144
139 lw_expr_destroy(te); 139 lw_expr_destroy(te);
140 lwasm_reduce_expr(as, cl -> addr); 140 lwasm_reduce_expr(as, cl -> addr);
141 // lw_expr_simplify(cl -> addr, as); 141 // lw_expr_simplify(cl -> addr, as);
142 142
143 // set the data address if relevant 143 // set the data address if relevant
144 te = lw_expr_build(lw_expr_type_special, lwasm_expr_linedlen, cl -> prev); 144 if (as -> output_format == OUTPUT_OS9)
145 cl -> daddr = lw_expr_build(lw_expr_type_oper, lw_expr_oper_plus, cl -> prev -> daddr, te); 145 {
146 lw_expr_destroy(te); 146 te = lw_expr_build(lw_expr_type_special, lwasm_expr_linedlen, cl -> prev);
147 lwasm_reduce_expr(as, cl -> daddr); 147 cl -> daddr = lw_expr_build(lw_expr_type_oper, lw_expr_oper_plus, cl -> prev -> daddr, te);
148 lw_expr_destroy(te);
149 lwasm_reduce_expr(as, cl -> daddr);
150 }
151 else
152 {
153 cl -> daddr = lw_expr_copy(cl -> addr);
154 }
148 155
149 // carry DP value forward 156 // carry DP value forward
150 cl -> dpval = cl -> prev -> dpval; 157 cl -> dpval = cl -> prev -> dpval;
151 158
152 } 159 }