Mercurial > hg > index.cgi
diff 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 |
line wrap: on
line diff
--- a/lwasm/pass1.c Sun Aug 28 17:03:43 2011 -0600 +++ b/lwasm/pass1.c Mon Aug 29 18:30:55 2011 -0600 @@ -141,10 +141,17 @@ // lw_expr_simplify(cl -> addr, as); // set the data address if relevant - te = lw_expr_build(lw_expr_type_special, lwasm_expr_linedlen, cl -> prev); - cl -> daddr = lw_expr_build(lw_expr_type_oper, lw_expr_oper_plus, cl -> prev -> daddr, te); - lw_expr_destroy(te); - lwasm_reduce_expr(as, cl -> daddr); + if (as -> output_format == OUTPUT_OS9) + { + te = lw_expr_build(lw_expr_type_special, lwasm_expr_linedlen, cl -> prev); + cl -> daddr = lw_expr_build(lw_expr_type_oper, lw_expr_oper_plus, cl -> prev -> daddr, te); + lw_expr_destroy(te); + lwasm_reduce_expr(as, cl -> daddr); + } + else + { + cl -> daddr = lw_expr_copy(cl -> addr); + } // carry DP value forward cl -> dpval = cl -> prev -> dpval;