Tagged: widening arithmetic instructions
- ValidarkParticipantApril 11, 2023 at 10:20 amPost count: 20
At the end of one of the Q&A’s it was mentioned that on high-end Mills that support 128-bit adds it can perform said operation in 2 cycles. How does this square with widening adds, which I heard widen on overflow? If an add widens to 128 bit, will subsequent adds on the operand take two cycles? Will the Mill have to stall the rest of the machine for one of those cycles so that static scheduling can still treat those additions as one cycle?
How does widening arithmetic play with things like bitshifts where the size of the operands have to be known at compile time in order to shift by the right amount?
- Ivan GodardKeymasterApril 11, 2023 at 10:54 pmPost count: 689
All operand widths of executing code are known at compile time; there are no dynamic-sized operands in the architecture.
Widening ops widen unconditionally, not just on overflow. The result is a normal operand of the widened width, and subsequent operations take as long as they would for anything of that width. Latency varies by target member; our test targets are specified to do a and 8-byte add in one cycle and a 16 byte add in two.
You must be logged in to reply to this topic.