Re:The Pentium 4 and the G4e: An Architectural Comparison (2...
by duskwuff on Tuesday September 02, 2014 @02:25AM
(#8256073)
> One of the more amusing P4 oddities is that certain 32-bit add/sub instructions will have a very slightly higher latency if there is a carry/borrow between the two 16-bit halves
This kind of data-dependent delay gives crypto people hives, for what it's worth. It's the sort of thing that can make timing attacks possible.
Re:The Pentium 4 and the G4e: An Architectural Comparison (2...
by cfallin on Monday September 01, 2014 @08:03PM
(#8255157)
> This is probably a consequence of pipelining in the ALU itself.
Yep, the P4 "fast ALU" was double-pumped and did 16-bit chunks of a 32-bit add/sub in adjacent half-cycles [1]. This meant that dependent chains of, e.g., adds could still issue back-to-back, since the first half of a dependent instruction requires only the low 16 bits of its sources. Always struck me as very clever!
[1] http://www.ecs.umass.edu/ece/koren/ece568/papers/Pentium4.pd...
One of the more amusing P4 oddities is that certain 32-bit add/sub instructions will have a very slightly higher latency if there is a carry/borrow between the two 16-bit halves - it's very difficult to detect (I believe it's ~0.5 cycle), but it's there. This is probably a consequence of pipelining in the ALU itself.