Search code examples
instruction-set

Is CPU only compatible to one kind of instruction set architecture?


I start to explore in the area of computer architecture. There are 2 questions about ISA that confuse me.

  1. As far as I know, there are different kinds of ISA such as ARM, MIPS, 80x86, etc. I wonder whether a CPU can only specifically read one kind of ISA. For example, can a processor read both 80x86 and MIPS.

  2. If a CPU is unique to an ISA, how can I check which ISA my PC processor is using? Can I find it out manually?

Thank you


Solution

    1. All the CPU/MCU's I know of support just single instruction set.

      There is capability of loading microcode to some of the newer architectures that may allow to change the instruction set behavior to some point bot strongly doubt it you can change the instruction set with it. Instruction set and internal CPU/MCU circuitry are strongly dependent. Making universal CPU with changeable instruction set is possible (for example with FPGA) but would be very slow in comparison to direct DIE encoded CPU. With similar technology of Die the clock speed would be may be just few MHz.

      Some architectures like i80x86 supports modes that can switch to different kind of operation (16/32/64 bit,real,protected) but its hard to say it is different instruction set or just subset of the same thing ...(matter of perspective)

    2. detection of instruction set.

      This is madness. Yes it is possible to detect which type of instruction set you have via program but all the CPU/MCU's have different pinout, interfaces, architectures and are not interchangeable (even in the same architecture class) so you detecting instruction set is meaningless as you alredy know the architecture you are doing the wiring for ...

      Anyway the detection would work like this:

      • have set of test programs of each supported instruction set/architecture that will set specific memory or IO to predefined state if working properly
      • have watch dog cycling between all the detections and stop on first valid result.