New instruction sets in the CPU

Each new generation of CPU introduces some sets of a new command, for example: MMX, 3DNOW, SSE, etc.

I have a few general questions about them:
1) If a program uses, for example, an SSE instruction, can it be run on a processor that does not support SSE?
2) If yes, does this mean that these casts will be changed to some more simple steps?
3) If not, does this mean that the real impact of such new instructions will be achieved in a few years, when most processors will support this technology (so there will be no incompatibilities)?
4) When I compile a program in C ++ with optimization, does it mean to use some of these new instructions? (I know that this depends on many factors, especially code, but I want a general answer) Or are they mostly reserved for programs written in asm?

+3
source share
5 answers

1) Yes and no: the CPU considers them invalid, but if the program checks whether the processor supports these instructions, then it can fall back to a version that does not use these instructions, which allows the program anyway.

2) The program will have to provide an alternative implementation using more “basic” instructions and know when to use which one.

3) , , , , , , .

4) . , , , : , . , , .

+7

, 4, GCC i386. -march ( -mcpu), , . Microsoft cl.exe /arch: /Gx .

, .

- , . . , ; , liboil ( ) , .

+2

, , , . .

+1

MMX 1996 , SSE 1999 , SSE2 Pentium 4 2001 . , , , MMX SSE , , SSE2. 3DNOW , AMD, , .

+1

1) - , , SSE, , SSE?

. , / -, .

, - x87. x87, , x87, , .

hackintosh SSE2 , . , , .

3) , , , ​​ ( )?

. , , , ? , .

4) ++ , ? ( , , , ) , asm?

,

0
source

Source: https://habr.com/ru/post/1738790/


All Articles