Re: “Does a compiler use all x86 instructions?”
twitter.com
twitter.com
3dnow and via extensions aren't actually emitted for common binaries, even if objdump claims they are there.
Validating my own disassembler against objdumps output showed a lot of these outliers.
A recursive disassembler is better at only attempting to disassemble code that actually appears in the code path, although then it misses things that are indirectly in the code sequence.
It's an unsolved problem.
You might consider rerunning your analysis with ghidra or Ida, but those aren't as easy to mass disassemble like objdump *.
movfuscator
"The single instruction C compiler"
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
>"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]"
There's also https://hackaday.com/2020/11/23/a-cpu-less-computer-with-a-s... which is sorta related