lkml.org 
[lkml]   [2004]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: MSEC_TO_JIFFIES is messed up...
On Wed, 12 May 2004, Ingo Molnar wrote:

>
> * Davide Libenzi <davidel@xmailserver.org> 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

Yeah, I see.



- Davide

-
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/

\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.069 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site