4

Why does the 80486 take longer to execute simple instructions than complex ones?

 3 years ago
source link: https://retrocomputing.stackexchange.com/questions/14876/why-does-the-80486-take-longer-to-execute-simple-instructions-than-complex-ones
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

The 80486 processor can execute many instructions in a single cycle, such as a register-to-register add instruction ( ADD EAX, EBX , for example), which one would generally assume is fairly complex, requiring two registers to be read, a full 32 bit ALU operation, and both a register and flag writes.

However, other instructions that one would naturally assume to be relatively simple take multiple cycles, including the various flag manipulation instructions like STC and CLC , which are a strict subset of the operations required for an ADD instruction (only loading a precalculated value into the flags, rather than having to actually determine what the value to load should be based on inputs, and not needing a register update at all), yet take 2 cycles.

What is the reason for this apparent discrepancy?


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK