lkml.org 
[lkml]   [1999]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Structure vs purism ?
On Fri, Jan 22, 1999 at 08:44:31AM -0500, Richard B. Johnson wrote:
> > .p2align 4,,7
> > .L5:
> > pushl $.LC0 # this was the string
> > call puts # even inlines foo() for you :-)
> > addl $4,%esp
> > subl $1,%ebx # mm.. ah! decl doesn't affect the flags
> Err... decl doesn't affect the carry flag. It affects
> OF, SF, ZF, AF, and PF.
> They could `jns` for numbers less than MAX_INT.

eep! and here I thought compilers were getting a little more intelligent.
They could inc the start value and use jne for all numbers... but is
subl slower than decl? It's certainly bigger...

>
>
> > jnc .L5
> > movl -4(%ebp),%ebx
> > movl %ebp,%esp
> > popl %ebp
> > ret
>

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

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