# HG changeset patch # User Michael Pavone # Date 1429066443 25200 # Node ID 95bc24c729e6ddf5423a410046a3d2813f2bdafb # Parent f74ce841fd1e375ab08c2b656d8c67242cad1e3a Move right hand parameter to cmp in _compileBinary to a temp reg if it is a constant since those are only supported in the left hand param currently diff -r f74ce841fd1e -r 95bc24c729e6 modules/llcompile.tp --- a/modules/llcompile.tp Mon Apr 13 22:42:27 2015 -0700 +++ b/modules/llcompile.tp Tue Apr 14 19:54:03 2015 -0700 @@ -134,6 +134,11 @@ } } else: { _compOps ifget: (expr op) :condFun { + if: (rv isInteger?) { + tmp <- rv + rv <- ilf getReg + ilf add: (il mov: tmp rv rs) + } ilf add: (il cmp: lv rv _size) cond <- condFun: _signed ilf add: (il bool: cond (dest val))