View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0012101GCC-XML(No Category)public2011-04-18 08:012015-03-26 11:59
ReporterMartin Bergtholdt 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionsuspended 
PlatformMSVC 2008 9.0 64bitOSWindowsOS VersionWindows-7 64bit
Summary0012101: gccxml does not mimic 64-bit MS preprocessing
DescriptionWhen producing itk-wrappers with Cableswig, I get a lot of errors like this:

280>D:/Programming/CC/ITK/Modules/Core/Common/include/itkMathDetail.h: In function 'itk::int64_t itk::Math::Detail::RoundHalfIntegerToEven_64(double)':
280>D:/Programming/CC/ITK/Modules/Core/Common/include/itkMathDetail.h:280: error: '_mm_cvtsd_si64' was not declared in this scope
280>D:/Programming/CC/ITK/Modules/Core/Common/include/itkMathDetail.h: In function 'itk::int64_t itk::Math::Detail::RoundHalfIntegerToEven_64(float)':
280>D:/Programming/CC/ITK/Modules/Core/Common/include/itkMathDetail.h:288: error: '_mm_cvtss_si64' was not declared in this scope

It seems that there is some issue with gccxml and the SSE2 extensions.
Steps To ReproduceBuilding of ITK with this configuration:

BUILD_SHARED_LIBS=ON
USE_WRAP_ITK=ON
WRAP_ITK_SWIGINTERFACE=ON
Additional Informationin iktMathDetail 73 ff. I can add guards against gccxml like this:

# if defined(ITK_COMPILER_SUPPORTS_SSE2_32) && !defined( __GCCXML__ )
# undef USE_SSE2_32IMPL
# define USE_SSE2_32IMPL 1
# endif
# if defined(ITK_COMPILER_SUPPORTS_SSE2_64) && !defined( __GCCXML__ )
# undef USE_SSE2_64IMPL
# define USE_SSE2_64IMPL 1
# endif

which allows me to compile ITK 4.0 (GIT) with wrappers.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0026212)
Brad King (manager)
2011-04-18 10:50

I think it works in 32-bit builds. The problem is that gccxml simulates the preprocessing of the 32-bit compiler. Therefore the 64-bit versions of those functions do not appear. They are written in MS's emmintrin.h as

#if defined(_M_AMD64)
 /* _mm_*64 functions here */
#endif

(0026213)
Brad King (manager)
2011-04-18 10:52

The function shows up if I add -D_M_AMD64:

$ gccxml --gccxml-compiler cl sse2.cxx -E -D_M_AMD64 | grep.exe cvtsd
...
extern long long _mm_cvtsd_si64(__m128d);
...
(0026215)
Brad King (manager)
2011-04-18 10:55

Fixing this for gccxml is non-trivial. I think your patch to ITK to work around the problem is correct. Other implementations in itkMathDetail.h are already guarded by testing for __GCCXML__. Please submit a patch for review here:

  http://review.source.kitware.com/p/ITK [^]
(0026233)
Martin Bergtholdt (reporter)
2011-04-20 10:26

Done. Not yet too comfortable with the gerrit process, so please excuse any non-conformalities.

This is the ID: I6f1ccf72
(0038322)
Brad King (manager)
2015-03-26 11:59

As announced here:

 [ANNOUNCE] GCC-XML maintenance moving to Github
 http://thread.gmane.org/gmane.comp.compilers.gccxml/731 [^]
 http://public.kitware.com/pipermail/gccxml/2015-March/003206.html [^]

gccxml will no longer be developed by its original author, who will instead focus on CastXML:

 https://github.com/CastXML/CastXML#readme [^]

The original GCC-XML issue tracker is now closed. In order to facilitate ongoing maintenance by community participants, issues will now be tracked on the Github repository page:

 https://github.com/gccxml/gccxml/issues [^]

 Issue History
Date Modified Username Field Change
2011-04-18 08:01 Martin Bergtholdt New Issue
2011-04-18 10:50 Brad King Note Added: 0026212
2011-04-18 10:50 Brad King Assigned To => Brad King
2011-04-18 10:50 Brad King Status new => acknowledged
2011-04-18 10:50 Brad King Summary GCCXML does not support SSE2 extensions => gccxml does not mimic 64-bit MS preprocessing
2011-04-18 10:52 Brad King Note Added: 0026213
2011-04-18 10:55 Brad King Note Added: 0026215
2011-04-20 10:26 Martin Bergtholdt Note Added: 0026233
2015-03-26 11:59 Brad King Note Added: 0038322
2015-03-26 11:59 Brad King Status acknowledged => resolved
2015-03-26 11:59 Brad King Resolution open => suspended


Copyright © 2000 - 2018 MantisBT Team