3 ms·
CPUs do not guarantee that branchless instructions always take the same amount of time.
by charcircuit 1y ago
CPUs do not guarantee that branchless instructions always take the same amount of time.
- Arnavion 1y agoCPUs guarantee what they guarantee, and if they guarantee that a certain instruction takes an operand-independent time then it does. For example a RISC-V CPU implementing the Zkt extension is required to implement a whole bunch of logical and arithmetic integer operations with operand-independent timing. This includes the two "branchless move" instructions from the Zicond extension, czero.eqz and czero.nez.