-2

I read that instruction set varies from one processor to another. Say for an example, Instruction set in an Intel processor is different from an instruction set of an AMD processor.

But If thats the case, how does device drivers of one hardware, supports multiple processors. As we know that device drivers are programmed in assembly.

Are they programmed using 32 bit instruction set and do all processors have the same 32-bit instruction set?

P.S: 64-bit instruction set varies from one processor to another processor. Only thing iwhich confuses is that do 32-bit instruction set also vary from processor to processor or are they same. If that changes too, there might me some portability issues of hardware, isn't it?

  • 7
    This question is not a specific programming question. Try cs.stackexchange.com. (Intel and AMD 32-bit processors are extremely similar; it is relatively easy to restrict yourself to the common subset. But ARM, MIPS, PPC, AXP are all very different.) Note that device drivers nowadays are not written in assembly. – Raymond Chen May 12 '14 at 03:15
  • Instruction sets mostly are RISC or MISC. AFAIK I know, most processors only differ in those and then 64/32 bit specifications. – icbytes May 12 '14 at 07:32
  • 32-bit instruction sets vary just as much or more than 64-bit instruction sets do. (By the time anyone got around to mass-producing 64-bit CPUs, it was clearer how to design a *good* ISA, so in general 64-bit ISAs have fewer "warts", with a few notable exceptions like the infamous ia64.) And I'd like to repeat what Raymond says: **device drivers nowadays are not written in assembly**. – zwol May 18 '14 at 14:54
  • @icbytes "RISC" and "MISC" (and "CISC") are broad umbrella terms. ARM, PowerPC, Alpha, MIPS, SPARC, and PA are all RISCs, and they do have some things in common, but they are all different enough from each other to require distinct compiler back ends, for instance. – zwol May 18 '14 at 14:55
  • instruction sets is the same in all proccessors in one line, like all Intel and AMD x86 processors have the same instruction set, that's x86, except for specific extension of course. This applies to all architectures regardless of 32, 64 or any-bit architectures – phuclv Jun 24 '14 at 02:15
  • how is 64-bit instruction set varies from one processor to another processor when all x86_64 CPUs are the same in the most part? Other architectures like MIPS, Sparc are no different – phuclv Jun 24 '14 at 02:18

1 Answers1

3

Intel and AMD 32 bit processors are both based off of the x86 architecture, with their 64 bit processors sharing x86_64 architecture. There are some differences though. Other architectures like ARM and MIPS are completely different.

Connor Pearson
  • 63,902
  • 28
  • 145
  • 142