3 ms·
The following might be of interest: movfuscator "The single instruction C compiler" https://github.com/xoreaxeaxeax/movfuscator https://github.com/xoreaxeaxe
by peter_d_sherman 6y ago
The following might be of interest:
movfuscator
"The single instruction C compiler"
https://github.com/xoreaxeaxeax/movfuscator https://github.com/xoreaxeaxeax/movfuscator
...In other words, yes, it is possible to write a complete compiler which creates all of its compiled code by using only one single type of x86 instruction...
Also, this might be interesting:
https://en.wikipedia.org/wiki/One-instruction_set_computer https://en.wikipedia.org/wiki/One-instruction_set_computer
>"A one-instruction set computer (OISC), sometimes called an ultimate reduced instruction set computer (URISC), is an abstract machine that uses only one instruction – obviating the need for a machine language opcode.[1][2][3] With a judicious choice for the single instruction and given infinite resources, an OISC is capable of being a universal computer in the same manner as traditional computers that have multiple instructions.[2]:55 OISCs have been recommended as aids in teaching computer architecture[1]:327[2]:2 and have been used as computational models in structural computing research.[3]"
- vegadw 6y agoYeah, I've seen the movfuscator before. It's kinda funny to think it's only ~66% different than normal output (if you don't count the size inflation) There's also https://hackaday.com/2020/11/23/a-cpu-less-computer-with-a-single-nor-gate-alu/ https://hackaday.com/2020/11/23/a-cpu-less-computer-with-a-s... which is sorta related
- remram 6y agoIt's a bit different because the mov-only compiler would be taking advantage of the multiple addressing modes available for mov. Those act more like many instructions. You couldn't build a compiler/machine that only does copies.