4 ms·
CMOV aside, I remember it was proved MOV itself is turing-complete.
by zerr 7y ago
CMOV aside, I remember it was proved MOV itself is turing-complete.
- orangse 7y agohttps://github.com/xoreaxeaxeax/movfuscator https://github.com/xoreaxeaxeax/movfuscator posting for anyone wondering
- agumonkey 7y agoslightly related, does embedding arithmetic in mov instructions go faster than explicit ALU operations ?
- Filligree 7y agoDepending on the arithmetic, it seems that yes it can! I've noticed gcc using LEA instructions for arithmetic of the form (x * a + b), where 'a' and 'b' fit with the instruction.
- jnordwick 7y agoUsing LEA (load effective address) for calculation seems to be pretty common in most programs for both gcc and llvm. You basically get smaller code, and it used to schedule them better across more execution ports. Not sure if the CPU can fuse the ADD+MUL now.