[clug] gcc3.3 + 3dNOW bug?

Ian McCulloch ianmcc at physik.rwth-aachen.de
Mon Sep 13 15:15:33 GMT 2004


The header mm3dnow.h defines wrappers for the builtins, and interestingly 
they pass by value, not pointer (or reference;), eg

static __inline __m64
_m_pfmul (__m64 __A, __m64 __B)
  return (__m64)__builtin_ia32_pfmul ((__v2sf)__A, (__v2sf)__B);

Perhaps there is a reason for that?  Does it actually work properly if you 
use these wrappers rather than the builtins?  perhaps the 
argument-modifying behaviour is actually documented (I couldn't find 
anything in 30 seconds of googling though)?  Since they are gcc 
extensions, they don't need to obey const-correctness rules, although it 
would be quite rude not to ;-)


More information about the linux mailing list