(long * long) is a long
(long long = long) has to sign extend right side and do assignment
> }
>
>
>
> .file "t.c"
> .version "01.01"
> gcc2_compiled.:
> .text
> .align 4
> .globl foo
> .type foo,@function
> foo:
> pushl %ebp
> movl %esp,%ebp
> movl a,%eax
> imull b,%eax
> movl %eax,c
store low word...
> cltd
sign extend eax into edx...
> movl %edx,c+4
store sign-extended high word
In other words, you lost high 32 bits of 32x32 mul here
due to error in C code.
Proper example would be c = ((long long)a) * b;
-- vda - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/