Where CPU instruction set storage location?

First, CPU instruction set is designed to cure the CPU inside the "hard program", integrated in the logic circuit in the CPU, rather than what the code, there can be no "memory." So we can not find the "Instruction Set" of the entities in the CPU, If I have concrete images, that it is the "assembly language" to "machine code" (the equivalent of a translation) + CPU machine code to perform transistor and a set of logic circuits.

CPU instruction set and CPU architecture is closely related to our common Intel and AMD X86 system represented, for a large number of computers and servers; the other is to streamline the ARM instruction set architecture, set in the ARM architecture CPU is used extensively for mobile devices. Let's say we do an application, want and can run on PC and mobile phones, as it is compiled into X86 version can run on the X86 instruction set, the corresponding compile an ARM version can run on the ARM instruction set no matter what the compiled version, which runs from the equipment, the general process is the request from the software> operating system requests> CPU instruction set to perform such a process, a large number of cross-platform application that comes out.

There is an instruction set specifies how the CPU recognizes assembly instructions, and how to interact with the operating system (upper layer). So to speak, just as the instruction set of traffic lights on the road, red light green line stop, and when the vehicle can go, when not to go, according to the established rules are to perform, and this rule can not be changed. We used win7, win10 operating systems underlying architecture is based on the CPU's instruction set design, must unconditionally obey the instruction set architecture, so the problem called "operating system gets the CPU instruction where to set information" argument is not valid .

Let us talk about a specific set of instructions, like Intel's mainstream Core Duo processors will have EM64T, MMX, SSE, SSE2, SSE3, SSE4A, SSE4.1, SSE4.2, AVX, AVX2 instruction set, etc., AMD processors have Some proprietary instruction set, but still compatible with Intel's mainly why it is, first of all Intel for many years a strong technical strength so that it firmly holds the instruction set making power (development of new instruction set is not an easy task), after the CPU instruction set support the new launch, many developers will begin to learn and apply new applications to improve operational efficiency, for AMD to develop new instruction set strength is far better than Intel, but also that consumption can not afford time, simply to direct support for the Intel instruction set, so that can guarantee the speed of the CPU, while allowing the majority of application developers also eliminates repetitive learning costs.

Each has its own purpose instruction set, such as SSE instruction set mainly in CPU-intensive floating point performance, AVX instruction set can greatly improve CPU performance video encoding, they are like a math equation efficient, if applied program design optimized for these instruction sets, it can greatly improve the efficiency of certain aspects of the program.

Published 162 original articles · won praise 125 · views 470 000 +

Guess you like

Origin blog.csdn.net/jiangchao3392/article/details/102504837