Mercurial > repos > tabletprog
diff modules/x86.tp @ 194:30bed95cbb18
Apply register assignments in il module
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 26 Aug 2013 20:42:20 -0700 |
parents | 4293c725394c |
children | 7856f0916549 |
line wrap: on
line diff
--- a/modules/x86.tp Mon Aug 26 19:53:16 2013 -0700 +++ b/modules/x86.tp Mon Aug 26 20:42:20 2013 -0700 @@ -210,7 +210,9 @@ _tempregs <- #[ _r10 _r11 - _rax + //TODO: Add rax back in once there's logic in il to properly + //allocate it for the instances in which it's live + //_rax ] @@ -553,7 +555,7 @@ ] } //allocated the return register - allocRet <- :size { + allocRet <- { bit <- (lshift: 1 by: (_rax num)) _used <- _used or bit _usedAllTime <- _usedAllTime or bit @@ -565,6 +567,7 @@ bit <- (lshift: 1 by: (reg num)) _used <- _used or bit _usedAllTime <- _usedAllTime or bit + reg } else: { il base: _rsp offset: _nextStackOff + 8 * (argnum - (_argregs length)) }