Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Multiplication by 3 is actually a common operation, particularly in address calculations, where a shift and an add means multiplying the index by 3. Implementing this naively would add significant latency. But using this circuitry the LEA (Load Effective Address) instruction can do it in a single cycle, so spending this much transistor budget on it was totally a good call.


Is it used for that, though? As I understood the article, this circuit is used as a part of floating-point multiplication.


What?

- LEA is just an instruction moves the address calculated by an addressing mode into its output operand, rather than performing a data transfer to or from that address; all the addressing that LEA can do, MOV instructions can also do.

- The indexed addressing modes of the x86 used by MOV or LEA do not support a scale factor of 3, only powers of two: 1, 2, 4, 8. So address generation has no use for multiplication by 3.

- Article makes it clear that the multiplier by 3 is part of the floating point multiplier.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: