- If some program uses for example SSE instruction can it be run on CPU that doesn t support SSE?
No. But in general this often generates a trap or exception, and the trap/interrupt handler can process that if needed.
For example long time ago softwares often contain code for x87. If the x87 coprocessor exists, the instruction will run normally in hardware, but if the computer lacks an x87 coprocessor then it ll generate a trap, after that the instruction will be processed in software and return result as normal. See What is the protocol for x87 floating point emulation in MS-DOS?
First versions of Hackintosh also use this to emulate SSE2 on CPUs that don t support this instruction set. Of course the performance is terrible but it will run.
- If not, does it mean that the real performance impact of such new instructions will be after few years when most CPU will support such technology (so there won t be any incompatibilities)?
Yes. But after a few years, perhaps softwares need updates, right? For a critical performance software, a rewrite to take advantage of the new instruction set may be needed. For some others, the increase in performance may not be noticeable
- When I compile a C++ program with optimizations does it mean that it ll use some of this new instructions? (I know that it depends on many factors, especially on the code, but I want some general answer) Or are they reserved mostly for programs written in asm?
Depends on the compiler and options you pass to it at compile time.
Modern compilers support auto-vectorization so they ll detect common idioms and optimize it. You just need to recompile to take advantage of the new instruction set. But for complex cases you still need to hand-optimize using SIMD intrinsics
If you use an external library, you ll automatically get a speed improvement when the library is updated to support the new instruction set, even if you don t do anything with your program