[Insight-developers] ITK / CableSwig / gcc 4.1 / 64 bit Linux - _mm_cvtsd_si64 and _mm_cvtss_si64

Brad King brad.king at kitware.com
Tue Feb 8 16:58:40 EST 2011


On 02/08/2011 04:41 PM, Wheeler, Frederick W (GE Global Research) wrote:
> After some digging with gccxml -E it seems the declarations for
> _mm_cvtsd_si64 and _mm_cvtss_si64 are in emmintrin.h and xmmintrin.h on
> my system in /usr/lib/gcc/x86_64-redhat-linux/4.1.1/include/, so
> ITK_COMPILER_SUPPORTS_SSE2_64 gets set to ON by the try_compile.  But
> these declarations are not in the gccxml_gnu_*.h versions of these files
> in CableSwig_usr_gcc_rel/lib/CableSwig/share/gccxml-0.9/GCC/4.1/ so they
> are missing when gccxml runs.
> 
> Here are the changes I made to fix the errors.

Please try the source tree patch below.

Thanks,
-Brad

Index: gccxml_gnu_emmintrin.h
===================================================================
RCS file: /cvsroot/GCC_XML/gccxml/GCC_XML/Support/GCC/4.1/gccxml_gnu_emmintrin.h,v
retrieving revision 1.1
diff -c -3 -p -r1.1 gccxml_gnu_emmintrin.h
*** gccxml_gnu_emmintrin.h      27 Jul 2010 18:34:07 -0000      1.1
--- gccxml_gnu_emmintrin.h      8 Feb 2011 21:57:33 -0000
*************** _mm_cvtsd_si32 (__m128d __A)
*** 541,546 ****
--- 541,552 ----
  ;

  #ifdef __x86_64__
+ /* Intel intrinsic.  */
+ static __inline long long __attribute__((__always_inline__,__artificial__))
+ _mm_cvtsd_si64 (__m128d __A)
+ ;
+
+ /* Microsoft intrinsic.  */
  static __inline long long __attribute__((__always_inline__))
  _mm_cvtsd_si64x (__m128d __A)
  ;
Index: gccxml_gnu_xmmintrin.h
===================================================================
RCS file: /cvsroot/GCC_XML/gccxml/GCC_XML/Support/GCC/4.1/gccxml_gnu_xmmintrin.h,v
retrieving revision 1.1
diff -c -3 -p -r1.1 gccxml_gnu_xmmintrin.h
*** gccxml_gnu_xmmintrin.h      27 Jul 2010 18:34:07 -0000      1.1
--- gccxml_gnu_xmmintrin.h      8 Feb 2011 21:57:33 -0000
*************** _mm_cvt_ss2si (__m128 __A)
*** 356,361 ****
--- 356,368 ----
  #ifdef __x86_64__
  /* Convert the lower SPFP value to a 32-bit integer according to the current
     rounding mode.  */
+
+ /* Intel intrinsic.  */
+ static __inline long long __attribute__((__always_inline__,__artificial__))
+ _mm_cvtss_si64 (__m128 __A)
+ ;
+
+ /* Microsoft intrinsic.  */
  static __inline long long __attribute__((__always_inline__))
  _mm_cvtss_si64x (__m128 __A)
  ;


More information about the Insight-developers mailing list