[lkml]   [2003]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Runaway cron task on 2.5.63/4 bk?
Linus Torvalds <> wrote:
> On Tue, 11 Mar 2003, Andrew Morton wrote:
> >
> > 2.95.3 and 3.2.1 seem to do it right?
> Try the "64x32->64" version. gcc didn't use to get that one right, but
> maybe it does now.

long a;
long long b;
long long c;

void foo(void)
c = a * b;
It seems to get that wrong. At least, there are three multiplies in there.
3.2.1 is similar.

.file "t.c"
.version "01.01"
.align 4
.globl foo
.type foo,@function
pushl %ebp
movl %esp,%ebp
subl $16,%esp
pushl %esi
pushl %ebx
movl a,%eax
movl %eax,%ebx
movl %eax,%esi
sarl $31,%esi
movl %ebx,%eax
mull b
movl %eax,-8(%ebp)
movl %edx,-4(%ebp)
movl %ebx,%eax
imull b+4,%eax
addl %eax,%edx
movl %edx,-4(%ebp)
movl b,%eax
imull %esi,%eax
addl %eax,-4(%ebp)
movl -8(%ebp),%eax
movl -4(%ebp),%edx
movl %eax,c
movl %edx,c+4
popl %ebx
popl %esi
movl %ebp,%esp
popl %ebp
.size foo,.Lfe1-foo
.comm a,4,4
.comm b,8,4
.comm c,8,4
.ident "GCC: (GNU) 2.95.3 20010315 (release)"

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:33    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean