Author mark.dickinson
Recipients christian.heimes, collinwinter, gregory.p.smith, jyasskin, loewis, mark.dickinson, pitrou, schuppenies, vstinner
Date 2009-02-17.20:30:56
SpamBayes Score 0.0783857
Marked as misclassified No
Message-id <1234902658.51.0.32800029365.issue4258@psf.upfronthosting.co.za>
In-reply-to
Content
> unsigned long long m(unsigned long long a, unsigned long b)
> {
>        return a*b;
> }

I think that's doing a 32 x 64 -> 64 multiplication;  what's being used is 
more like this:

unsigned long long m(unsigned long a, unsigned long b)
{
    return (unsigned long long)a*b;
}

which gcc -O3 compiles to:

	pushl	%ebp
	movl	%esp, %ebp
	movl	12(%ebp), %eax
	mull	8(%ebp)
	leave
	ret
History
Date User Action Args
2009-02-17 20:30:58mark.dickinsonsetrecipients: + mark.dickinson, loewis, collinwinter, gregory.p.smith, pitrou, vstinner, christian.heimes, jyasskin, schuppenies
2009-02-17 20:30:58mark.dickinsonsetmessageid: <1234902658.51.0.32800029365.issue4258@psf.upfronthosting.co.za>
2009-02-17 20:30:57mark.dickinsonlinkissue4258 messages
2009-02-17 20:30:56mark.dickinsoncreate