# HG changeset patch # User Michael Pavone # Date 1429199195 25200 # Node ID f237d0cae58bec5d214672c12fa153fedeae6713 # Parent 3b023e5a0b42adb7e04afb6fefd0e5d0101d055c llcompile now works well enough for the a simple fib program to work diff -r 3b023e5a0b42 -r f237d0cae58b modules/llcompile.tp --- 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 { diff -r 3b023e5a0b42 -r f237d0cae58b modules/x86.tp --- 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 {