"Mark Dickinson" <dickinsm@xxxxxxxxx> writes: > If I'm not mistaken, that imulq is a 64 x 64 -> 64 bit multiply; this > seems inefficient, when a 32 x 32 -> 64 bit multiply ought to be > good enough. Is there a good reason for having a 64-bit multiply > here? Or is gcc just not in a good position to make this kind > of optimization? The problem with the 32 x 32 -> 64 bit widening multiply in 64-bit mode is that it generates the result as two separate 32-bit values in different registers. In order to use the 64-bit value, gcc would have to generate code to reassemble the two registers into one. On balance it's normally preferable to simply use the 64 x 64 -> 64 multiply. Ian