lkml.org 
[lkml]   [2005]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.6.13/14 x86 Makefile - Pentiums penalized ?
On Wed, 14 Sep 2005, Denis Vlasenko wrote:

> > It's documented as being suboptimal to use inc/dec due to it modifying all
> > of eflags resulting in dependency related stalls. add/sub only modifies
> > one bit of eflags so is more optimal. However there is a problem of
>
> ?! add/sub doesn't modify "only one bit in eflags", it modifies all.
> In fact, it's dec/inc which does not modify all bits.
> It doesn't touch 'carry' bit (IIRC).
>
> If inc/dec is slower on P4, it must be just another P4 quirk.

You're right about the add and the number of modified bits. The documented
part is found in the P4 optimisation manual;

"The inc and dec instructions should always be avoided. Using add
and sub instructions instead avoids data dependence and improves
performance."

-- 2-12 IA-32 Intel Architecture Optimization Reference Manual
-
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-09-14 09:23    [W:0.051 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site