Created
August 27, 2013 18:26
-
-
Save anonymous/6357167 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
proc compBundleIT* (ob: var tNavmFrontend) = | |
type | |
tCompCondImm = proc (ob: tNavmBackend,val: int64,fDisAsm: bool) | |
tCompCond = proc (ob: tNavmBackend,fDisAsm: bool) | |
var | |
vBndl: tNavmUCell = tNavmUCell (ob.sVmMem[ob.oVmMem]) | |
vOpcA: int16 | |
vInsA: int8 | |
vInsB: int8 | |
proc inRange (val: tNavmSCell,r: int): bool = | |
var nVal: tNavmSCell = val shr (r * 8) | |
if nVal > 0: result = false else: result = true | |
proc compCondImm (ob: var tNavmFrontend,vBndl: var tNavmUCell,p: tCompCondImm,q: tCompCond,fImm: bool,r: int) = | |
if fImm != false: | |
if inRange (ob.sVmMem[ob.oVmMem],r) != false: | |
p (ob,ob.sVmMem[ob.oVmMem],ob.fDisAsm) | |
ob.oVmMem = ob.oVmMem + 1 | |
vBndl = vBndl shr 10 | |
else: | |
ob.liImm (ob.sVmMem[ob.oVmMem],ob.fDisAsm) | |
q (ob,ob.fDisAsm) | |
ob.oVmMem = ob.oVmMem + 1 | |
vBndl = vBndl shr 10 | |
# this fails | |
# proc compCondImm (p: tCompCondImm,q: tCompCond,fImm: bool,r: int) = | |
# if fImm != false: | |
# if inRange (ob.sVmMem[ob.oVmMem],r) != false: | |
# p (ob,ob.sVmMem[ob.oVmMem],ob.fDisAsm) | |
# ob.oVmMem = ob.oVmMem + 1 | |
# vBndl = vBndl shr 10 | |
# else: | |
# ob.liImm (ob.sVmMem[ob.oVmMem],ob.fDisAsm) | |
# q (ob,ob.fDisAsm) | |
# ob.oVmMem = ob.oVmMem + 1 | |
# vBndl = vBndl shr 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment