- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Trying to build a 3rd party product which uses the following code segment; it compiles OK under MSVC but it fails under ICC complaining about the "fld Float" instruction, although it appears to be a legal instruction.
[cpp]#if PROCESSOR_X86 inline int32 X86RoundingOp(real32 const Float, uint16 Mode) { rounding_mode OldMode; rounding_mode NewMode; _asm { fstcw OldMode; }; NewMode = OldMode; NewMode &= 0xF3FF; NewMode |= Mode << 10; int32 Int32; _asm { fldcw NewMode; fld Float; fistp Int32; fldcw OldMode; }; return(Int32); } #endif[/cpp]
1>G:\\Dev\\1.31.0.255\\Libraries\\granny2\\source\\granny_controlled_animation.cpp(800) (col. 30): error: unsupported instruction form -- __asm fld
1>G:\\Dev\\1.31.0.255\\Libraries\\granny2\\source\\granny_controlled_animation.cpp(800) (col. 30): error: unsupported instruction form -- __asm fld
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oliver,
What happens if you remove "const" from Float? (type issue)
and/or
What happens if you change "Float" to "FloatArg"? (keyword issue)
Jim Dempsey
What happens if you remove "const" from Float? (type issue)
and/or
What happens if you change "Float" to "FloatArg"? (keyword issue)
Jim Dempsey
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oliver,
What happens if you remove "const" from Float? (type issue)
and/or
What happens if you change "Float" to "FloatArg"? (keyword issue)
Jim Dempsey
What happens if you remove "const" from Float? (type issue)
and/or
What happens if you change "Float" to "FloatArg"? (keyword issue)
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Renaming it from Float to FloatArg did the trick, thanks :)
- Oliver

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