all groups > visual studio .net ide > december 2004 >
You're in the

visual studio .net ide

group:

cl.exe /G7 option problem


cl.exe /G7 option problem SLASH
12/21/2004 7:23:01 PM
visual studio .net ide: when i open /G7 option, compiler optimize float to long data cast instead of
calling _ftol2 function.But make some mistake when float = 0xffffffff; long
will be 0x80000000.
Assembly code:
00401032 mov eax,dword ptr [yy]
00401035 mov dword ptr [ebp-158h],eax
0040103B mov dword ptr [ebp-154h],0
00401045 fild qword ptr [ebp-158h]
0040104B mov ecx,dword ptr [p]
0040104E fmul dword ptr [ecx]
00401050 fnstcw word ptr [ebp-15Ah]
00401056 movzx eax,word ptr [ebp-15Ah]
0040105D or ah,0Ch
00401060 mov dword ptr [ebp-160h],eax
00401066 fldcw word ptr [ebp-160h]
0040106C fistp dword ptr [ebp-164h]
00401072 fldcw word ptr [ebp-15Ah]
00401078 mov edx,dword ptr [ebp-164h]
0040107E mov dword ptr [xx],edx
Re: cl.exe /G7 option problem Gabest
12/22/2004 1:15:31 PM
I had a very similar problem not long ago. Though I haven't received any
replies yet.

http://groups-beta.google.com/group/microsoft.public.dotnet.languages.vc/browse_thread/thread/e99a5f8bee32698a/571d8eb04f87fb10

( http://tinyurl.com/4neow )

AddThis Social Bookmark Button