- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried to search docs and online but I don't see:
1) how to do conditional compilation based on the targeted cpu/arch
2) how to emit all defined preprocessor maro.
MS compiler has these predifined macro:
http://msdn.microsoft.com/en-us/library/b0084kay%28v=VS.80%29.aspx
_M_IX86_FP
Seems that Intel compiler does not implement that and doesn't have any other way to detect what /arch was used.
I tried to build a project that tested _M_IX86_FP and obviously results produced by intel ocmpiler sucked big time because it didn't properly mimic ms compiler. Among popular open source project that also test this macro is speex codec.
1) how to do conditional compilation based on the targeted cpu/arch
2) how to emit all defined preprocessor maro.
MS compiler has these predifined macro:
http://msdn.microsoft.com/en-us/library/b0084kay%28v=VS.80%29.aspx
_M_IX86_FP
Expands to a value indicating which /arch compiler option was used:
0 if /arch was not used.
1 if /arch:SSE was used.
2 if /arch:SSE2 was used.
See /arch (Minimum CPU Architecture) for more information.
Seems that Intel compiler does not implement that and doesn't have any other way to detect what /arch was used.
I tried to build a project that tested _M_IX86_FP and obviously results produced by intel ocmpiler sucked big time because it didn't properly mimic ms compiler. Among popular open source project that also test this macro is speex codec.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi mtlroom,
First, if you want to print out the list of defined macros, compile a source file with "/QdM /E" to get a list of them.
Currently there isn't a predefined macro from the Intel compiler that will tell you what the /arch setting used to compile a source file is. I see potentially two feature requests here.
1. I think it makes the most sense for the Intel compiler to have its own macro for this due to the significantly different option settings the Intel compiler offers in this space (i.e. supporting SSSE3 and above options and also supporting this option on Intel 64 architectures).
2. If we do have an Intel-compiler-specific macro, then we could still support the _M_IX86_FP macro in compatibility situations where it makes sense (i.e. set it to 2 by default, or to 0 if /arch:IA32 or /arch:SSE is used and only define this on 32-bit compilations).
Does this make sense? Are you only interested in the second request or would you be interested in both?
First, if you want to print out the list of defined macros, compile a source file with "/QdM /E" to get a list of them.
Currently there isn't a predefined macro from the Intel compiler that will tell you what the /arch setting used to compile a source file is. I see potentially two feature requests here.
1. I think it makes the most sense for the Intel compiler to have its own macro for this due to the significantly different option settings the Intel compiler offers in this space (i.e. supporting SSSE3 and above options and also supporting this option on Intel 64 architectures).
2. If we do have an Intel-compiler-specific macro, then we could still support the _M_IX86_FP macro in compatibility situations where it makes sense (i.e. set it to 2 by default, or to 0 if /arch:IA32 or /arch:SSE is used and only define this on 32-bit compilations).
Does this make sense? Are you only interested in the second request or would you be interested in both?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry for bumping an old thread, but I still see that Intel composer 12 update 5 doesn't support those 2 macros. Can you at least support those macros for now?

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page