[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: debian architecture history question



On Tuesday 15 June 2010 04:34:23 Stan Hoeppner wrote:
> Again, the differences in the various 32bit kernels have nothing to do with
> the instruction sets being different.  They are identical.

Incorrect.

The i486 lines of chip (486 architecture in gcc) supports CMPXCHG and 5 other 
instructions which result in illegal instruction exceptions on a 80386.  
CMPXCHG is used for fast locking in modern kernel + glibc/eglibc.  That's why 
there is no -386 kernel image available.

The Pentium lines (586 architecture in gcc) support another 6 additional 
instructions, and one of those was actually included in i486 processors that 
were designed after the Pentium line: CPUID.  Again, on 80386 and most i486 
processors, these will cause an illegal instruction exception.  System 
mangement mode was introduced here as well.

The Pentium Pro line (686 architecture in gcc) gave us conditional move 
instructions.  Attempted execution of these instructions on 386, 486, or 586 
processors will, again, cause an illegal instruction exception.

Details: http://en.wikipedia.org/wiki/X86_instruction_listings

In addition to the upgrades to the instruction set, the micro-architecture 
changed a number of times between the original 80386 and the most recent IA-32 
only chips from Intel.  Of course, other manufacturers of IA-32 chips had 
different micro-architectures.

GCC has two separate options that reflect these parallel changes:
-march=<cpu-type> will generate code that uses instructions supported by $cpu-
type, but not necessarily by the original 80386.
-mtune=<cpu-type> will generate code that runs "best" on the micro-
architecture of $cpu-type, but still uses only instuctions that are shared 
across the whole IA-32 family.

Those two options can of course be combined to produce (e.g.) a kernel that 
runs on anything Pentium or better, but runs best on the Nocona micro-
architecture.
-- 
Boyd Stephen Smith Jr.           	 ,= ,-_-. =.
bss@iguanasuicide.net            	((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy 	 `-'(. .)`-'
http://iguanasuicide.net/        	     \_/

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: