Do all Intel/AMD processor cores have the same architecture?

Thread Starter

Fran3

Joined Mar 28, 2019
51
I'm thinking now like a former hardware/firmware designer who knew the architecture of the system processor... be they a microprocessor or microcontroller...
1 - There are so many processors in PC's now days...
one wonders how the operating system code and applications code handles all the different possible architectures...
2 - Does the Operating System create a "virtual" processor so applications can be written for that 'virtual processor" with a known architecture... or what?
3 - Or, are all the 'smarts' already programmed in the various processors so that the OS just tells the processor to do "this" and it just does it... so the OS has a standard interface with the processor... or what?
Just trying to catch up after many year absence from the field.
Thank for any help/education :)
 

dl324

Joined Mar 30, 2015
18,289
1 - There are so many processors in PC's now days...
one wonders how the operating system code and applications code handles all the different possible architectures...
Compilers will handle the architecture differences. Assembly code will be architecture dependent.
2 - Does the Operating System create a "virtual" processor so applications can be written for that 'virtual processor" with a known architecture... or what?
The OS is more likely to have been created for a specific architecture. It's possible to run "virtual machines" to run code written for a different OS. For example, Wine for running Windows applications on a Linux box or WSL on Windows to run Linux.
3 - Or, are all the 'smarts' already programmed in the various processors so that the OS just tells the processor to do "this" and it just does it... so the OS has a standard interface with the processor... or what?
Different processors may have their own instruction sets. It's the compiler's job to convert high level instructions into machine code.
 

BobTPH

Joined Jun 5, 2013
11,489
X86 processors made by Intel and AMD share the same instruction set architecture (ISA.) They do not share the same internal architecture (implementation if the ISA) either within generations in the same company or across the two.

These processors are pretty much unique in that they incorporate 4 major and many minor revisions of the ISA (8086 (real mode), 80286 (16-bit segmented virtual memory), 80386 (32-bit flat address space paged virtual memory, and X64 (64 bit ISA and address space.)

The Windows OS, I believe, still comes two versions, for 32-bit and 64-bit machines.

Each requires a minimum subset of the ISA to run and runs on processors that have that and any extensions beyond that. I.e., the 32-bit versions will still run on the 64-bit processors, but not vice versa.
 

nsaspook

Joined Aug 27, 2009
16,275
At the low-level embedded/OS kernel level there are significant differences in X86 processors at the 64-bit level with baseline (really old x86 processors) , V2 -> V4 and various in-between incantations.
It's becoming a compatibility nightmare. I needed to recompile a kernel to fix a bug in the unstable distro kernel tree, everything (modules) with SSSE3 needed to be removed for older hardware compatibility.
Example: https://en.wikipedia.org/wiki/AVX-512,

x86-64-v1​
CMOV, CX8, FPU, FXSR, MMX, OSFXSR, SCE, SSE, SSE2​
x86-64-v2​
CMPXCHG16B, LAHF-SAHF, POPCNT, SSE3, SSE4_1, SSE4_2, SSSE3​
x86-64-v3​
AVX, AVX2, BMI1, BMI2, F16C, FMA, LZCNT, MOVBE, OSXSAVE​
x86-64-v4​
AVX512F, AVX512BW, AVX512CD, AVX512DQ, AVX512VL​


CPU level check command on a few of my servers at home.
./x86-64-level --assert=4
The CPU [Intel(R) Xeon(R) CPU E5-2640 0 @ 2.50GHz] on this host ('hp8') supports x86-64-v2, which is less than the required x86-64-v4

./x86-64-level --assert=4
The CPU [Intel(R) Xeon(R) CPU E5-2640 v3 @ 2.60GHz] on this host ('hpdesk') supports x86-64-v3, which is less than the required x86-64-v4

./x86-64-level --assert=4
The CPU [Intel(R) Core(TM) i5-4690 CPU @ 3.50GHz] on this host ('sma2') supports x86-64-v3, which is less than the required x86-64-v4
 
Last edited:
Top