Mercurial > repos > tabletprog
changeset 357:f237d0cae58b
llcompile now works well enough for the a simple fib program to work
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 16 Apr 2015 08:46:35 -0700 |
parents | 3b023e5a0b42 |
children | 27477c8c2823 |
files | modules/llcompile.tp modules/x86.tp |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/modules/llcompile.tp Wed Apr 15 23:03:24 2015 -0700 +++ b/modules/llcompile.tp Thu Apr 16 08:46:35 2015 -0700 @@ -270,7 +270,7 @@ } else: { option none } - _compileExpr: expr syms: syms ilfun: ilf dest: (option none) + _compileExpr: expr syms: syms ilfun: ilf dest: asn } elseblock <- ilf popBlock ilf add: (il skipIf: (il eq) block else: elseblock) @@ -515,7 +515,7 @@ mcode <- compileText: text _notError: mcode { ba <- bytearray executableFromBytes: mcode - arg <- if: (length: args) > 2 { int32: (args get: 2) } else: {0} + arg <- if: (length: args) > 2 { int64: (args get: 2) } else: {0} res <- ba runWithArg: (arg int64) print: (string: res) . "\n" } else: :err {
--- a/modules/x86.tp Wed Apr 15 23:03:24 2015 -0700 +++ b/modules/x86.tp Thu Apr 16 08:46:35 2015 -0700 @@ -130,7 +130,7 @@ mod_rm:withTail <- :register regmem :end { list <- regmem rm: end - (list value) or ( lshift: (register reg) by: 3u8) | (list tail) + (list value) or ( lshift: (register reg) and 7u8 by: 3u8) | (list tail) } mod_rm <- :reg rm {