I'm looking at the code for lt and eq, and I'm not sure what's going on exactly. The lt instruction between two registers is implemented as follows:
tltor.asm.cmp(opnds[1], opnds[0]);
tltor.asm. mov($(immFalse), dest). cmovl(tltor.ctxImmTrue, dest);
And ctxImmTrue is defined as follows:
that.ctxImmTrue = mem(1 * that.REG_BYTE_WIDTH, irToAsm.config.context); that.ctxImmFalse = mem(2 * that.REG_BYTE_WIDTH, irToAsm.config.context);
My understanding is that cmovl can't move an immediate value into a register. I'm not sure what that definition for ctxImmTrue does. Is it allocating some memory location for the constant? Where is the actual value of the constant actually being set?
I'd like to actually change this code to use 1 for true and 0 for false.
- Maxime