Jakub's Recommendations for ia32 Support

Ulrich Drepper drepper at redhat.com
Tue Feb 3 20:01:10 UTC 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dominik 'Rathann' Mierzejewski wrote:
> I'd like to see a case (not involving Pentium 4) where using cmov is slower
> than not using it. It definitely is faster for decoding H.264 in FFmpeg
> for example.

I don't have a specific test case.  But I do talk to the CPU
architectures at Intel regularly.  They always say the cmov should be
avoided.  Especially with the introduction of the fused micro-ops the
various cmp+jcc pairs are likely move faster.

And from the code generation perspective using cmp+jcc is also more
flexible.  With cmov you have to tie up two registers.  This is
particularly bad with the x86 ABI.

There are certainly cases where cmov can be faster.  Perhaps exclusively
on older micro architectures (P4s, early Core2, maybe AMD, haven't
checked).  But in general it's no win.

- --
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkmIooYACgkQ2ijCOnn/RHSaCwCgvpRT/7GJELdNu+5nSPKUqKHa
wmgAnjxFmL278HkbwBCI5HK5YCT47JzC
=xAK6
-----END PGP SIGNATURE-----




More information about the fedora-devel-list mailing list