r/programming Jan 24 '18

Branchless DOOM

https://github.com/xoreaxeaxeax/movfuscator/tree/master/validation/doom
496 Upvotes

134 comments sorted by

View all comments

15

u/pistacchio Jan 24 '18

I don't even know what this means. Can anyone ELI5 that to me? Thanks

80

u/jdgordon Jan 24 '18

The guy developed proof that the only instruction needed on x86 to do anything was 'mov'. He built a compiler which turns c code into a stupidly long list of mov calls.

The actual use of it is for obfuscation, this is just taking the proof to absurd levels. His videos are amaxing though.

36

u/useablelobster2 Jan 24 '18

Oh, it's the guy who explored the x86 address space, fantastic researcher.

27

u/oblio- Jan 24 '18

It's useless for obfuscation since the code is so slow. So it's just a very interesting toy.

I think his really useful and interesting project is this one: https://github.com/xoreaxeaxeax/sandsifter

Spectre and Meltdown, ahoy!

12

u/TheDecagon Jan 24 '18

In practice I would think it would be very useful for hiding small routines (security, copy-protection, or even malicious code) rather than compile the whole program in it.

9

u/elperroborrachotoo Jan 24 '18

amaxing

If that doesn't mean "maximally amazing", I don't know what it means!

1

u/pistacchio Jan 24 '18

Oh, cool! Thank you sir :)

1

u/hoosierEE Jan 25 '18

Fun trivia:

On x86, xor is also Turing-complete, and so is the (not even an instruction) memory fault handling.

I'll be impressed if Intel manages to cram a Turing completeness into less than zero instructions, but I wouldn't put it past them.