Re: MSEC_TO_JIFFIES is messed up...

From: Ingo Molnar
Date: Wed May 12 2004 - 16:43:25 EST



* Davide Libenzi <davidel@xxxxxxxxxxxxxxx> wrote:

> int foo(int i) {
>
>
> return i * 1000 / 1000;
> }

try unsigned and you'll see:

pushl %ebp
movl %esp, %ebp
movl 8(%ebp), %edx
movl %edx, %eax
sall $2, %eax
addl %edx, %eax
leal 0(,%eax,4), %edx
addl %edx, %eax
leal 0(,%eax,4), %edx
addl %edx, %eax
leal 0(,%eax,8), %edx
movl $274877907, %eax
mull %edx
movl %edx, %eax
shrl $6, %eax
leave
ret

Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/