Mercurial > hg-old > index.cgi
changeset 222:7803d2d09993
Allow 8 bit immediate operands to be external references
author | lost |
---|---|
date | Sat, 09 May 2009 16:39:17 +0000 |
parents | 271c0ef9ea60 |
children | 436b36214e35 |
files | ChangeLog lwasm/insn_gen.c |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sat May 09 16:32:47 2009 +0000 +++ b/ChangeLog Sat May 09 16:39:17 2009 +0000 @@ -17,6 +17,7 @@ generated by lwasm [LWASM] [b] Fixed segfault in "extern" pseudo op and allowed a symbol list as the operand just like "export" [LWASM] +[+] 8 bit immediate operands can now be external references [LWASM] Version 2.3
--- a/lwasm/insn_gen.c Sat May 09 16:32:47 2009 +0000 +++ b/lwasm/insn_gen.c Sat May 09 16:39:17 2009 +0000 @@ -159,7 +159,11 @@ if (r != 0) rval = 0; if (r == 1 && as -> passnum == 2) - register_error(as, l, 2, "Illegal external or intersegment reference"); + { + l -> relocoff = as -> addr - l -> codeaddr; + l -> reloc8bit = 1; + } +// register_error(as, l, 2, "Illegal external or intersegment reference"); lwasm_emit(as, l, rval & 0xff); return; }