Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do Intel and AMD processor have the same assembler?

The C language was used to write UNIX to achieve portability -- the same C language program compiled using different compilers produces different machine instructions. How come Windows OS is able to run on both Intel and AMD processors?

like image 976
user136281 Avatar asked Jul 10 '09 13:07

user136281


People also ask

What assembler does AMD use?

x86 assembly language is a family of backward-compatible assembly languages, which provide some level of compatibility all the way back to the Intel 8008. x86 assembly languages are used to produce object code for the x86 class of processors, which includes Intel's Core series and AMD's Phenom and Phenom II series.

Do Intel and AMD manufacture their own processors?

AMD, which doesn't manufacture its own chips like Intel, depends on companies such as TSMC and GlobalFoundries to make the chips for them. "We are using cutting edge semiconductor nodes and we are a very large purchaser in this area, so that is certainly helpful in securing our supply chain," Papermaster said.

Do all Intel and all AMD processors have the same socket?

AMD's Ryzen chips consistent use the AM4 socket. There are some exceptions when getting into workstation hardware or enthusiast-grade chips: AMD's Threadripper processors fit in the TR4 socket, while some Intel chips use the LGA 2066 socket.

Are AMD and Intel both x86?

History. Historically, AMD has developed and produced processors with instruction sets patterned after Intel's original designs, but with x86-64, roles were reversed: Intel found itself in the position of adopting the ISA that AMD created as an extension to Intel's own x86 processor line.


2 Answers

AMD and Intel processors(*) have a large set of instructions in common, so it is possible for a compiler or assembler to write binary code which runs "the same" on both.

However, different processor families even from one manufacturer have their own sets of instructions, usually referred to as "extensions" or whatever. Ignoring the x87 co-processor, the first time I remember this being a marketing point was when everything suddenly went "with MMX(TM) technology". Binary code expected to run on any processor either needs to avoid extensions, or to detect the CPU type before using them.

Intel's Itanium 64-bit architecture was completely different from AMD's x86-64 architecture, so for a while their 64bit offerings were non-compatible (and Itanium was nothing like x86, whereas x86-64 extended the instruction set by adding 64bit instructions). Intel blinked first and adopted x86-64, although there are still a few differences: http://en.wikipedia.org/wiki/X86-64#Differences_between_AMD64_and_Intel_64

Windows probably uses the common x86 or x86-64 instruction set for almost all code. I wouldn't be surprised if various drivers and codecs are shipped in multiple versions, and the correct one selected once the CPU has been interrogated.

(*) Actually, Intel make or have made various kinds of processors, including ARM (Intel's ARM processors were called XScale, but I think they've sold that business). And AMD make other processors too. But we know which Intel/AMD processors you mean :-)

like image 95
Steve Jessop Avatar answered Oct 02 '22 17:10

Steve Jessop


As you suspect, the main stream Intel and AMD processors have the same instruction set.

Windows does not run on ARM or PowerPC chips, for example, because it is somewhat dependant on the underlying instruction set.

However, most of Windows is written in C++ (as far as I know), which should be portable to other architectures. Windows NT even ran on PowerPC and other architectures.

like image 39
Magnus Hoff Avatar answered Oct 02 '22 18:10

Magnus Hoff