vnmakarov / mir

A lightweight JIT compiler based on MIR (Medium Internal Representation) and C11 JIT compiler and interpreter based on MIR
MIT License
2.24k stars 147 forks source link

Missing `MVN`/`NOT` instruction #320

Open giann opened 1 year ago

giann commented 1 year ago

There's not bitwise MIR_NOT instruction

giann commented 1 year ago

Maybe it's intended? I guess i can do: MIR_XOR value, 0xffff

Itay2805 commented 1 year ago

yeah you can compliment it with a XOR with FFs (I recommend using ~0 to not make mistakes). Even if intended I personally think it would be better to have it for completeness (even if the code gen can handle it)