0

I have understood the arithmetic circuitry, which involves addition, subtraction, increment, decrement microoperations. Also, understood shift circuitry. And found that multiplication and division can be done by a sequence of above arithmetic and shift operations. (Booth's algorithm)

I want to know that whether modern systems include them as a single operation? If yes, how can that be?

Also, what operations are microoperations in modern systems?

  • 1
    There is no simple answer to your question. There can be a ridiculous amount of possible micro operations in modern computers as microcode can control each part of the execution unit individually. Multiplication is not microcoded on modern application-class processors, but in contrast to addition it does usually take more than one cycle to complete. – fuz Mar 15 '22 at 14:04
  • Are you talking about modern x86 μops? (As opposed to stuff like 8086 or 6502 which were microcoded in the classic sense of each instruction decoding to a sequence of internal microprogram operations; in modern x86 most instructions aren't microcoded in this sense). Yes, modern x86 CPUs decode non-widening `imul` to a single uop. See https://www.realworldtech.com/merom/4/ / https://www.realworldtech.com/sandy-bridge/3/ and [Agner Fog's microarch guide](https://agner.org/optimize/) / https://uops.info/. – Peter Cordes Mar 15 '22 at 14:09
  • 2
    Widening (one-operand) `mul`/`imul` take at least 2 uops, to write 2 registers. 64-bit imul is microcoded as multiple uops on some CPUs where the HW multiplier is only 32-bit wide (e.g. early low-power Silvermont family). See also [What is a microcoded instruction?](https://stackoverflow.com/q/40366643) and I guess https://en.wikipedia.org/wiki/Micro-operation which mentions old-style microcoded CPUs vs. modern CPUs decoding to RISC-like uops. – Peter Cordes Mar 15 '22 at 14:12

0 Answers0