Re: [GD-Windows] VC8.0 and CMOV
Brought to you by:
vexxed72
From: Alen L. <ale...@cr...> - 2007-11-23 16:28:21
|
Well, yes I tried that. Creating an inline function with _asm to compare two numbers does work, but it seems to mess up with the compiler's optimizations of the rest of the function, because I can't input and output floats or ALU flags in any other way than through memory. Regarding the architecture, I'm optimizing this with /arch:SSE which, according to MSDN, implies using CMOV as well, but the complier never uses that instruction by itself. (BTw, sorry if this seems a bit off-topic, but google doesn't help, which seems like people usually don't really care. I hoped someone in the gamedev would already have experienced this.) Thanks, Alen Andrew wrote: > Does using "__asm" help? You could hand-code the instructions, then. > confer: > <http://msdn2.microsoft.com/EN-US/library/45yd4tzz(VS.80).aspx>, > which is the VC8.0 specific page about using __asm anywhere a > statement could appear. > It could be that the scheduler doesn't know that you are guaranteeing > that the program will be run on a Pentium Pro or better, system. > (Pentium Pro is when that instruction was added.) Of course, now that > I go to look for a reference to this on the microsoft web site, this > may not be a concern. I'm showing my age. > --andy > On Nov 23, 2007 4:45 AM, Alen Ladavac <ale...@cr...> wrote: >> Hi all, >> >> Is there any way to make MSVC8.0 to generate CMOV instructions? I have >> some performance-critical loops, with a lot of small ifs, where it >> generates branches, and I'd like it to put cmov/fcmov there instead. >> Allegedly, it is able to do so, but /O2 doesn't seem to help. I can't >> even find any intrinsic to do that. Any ideas appreciated. >> >> Thanks, >> Alen >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2005. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> Gamedevlists-windows mailing list >> Gam...@li... >> https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows >> Archives: >> http://sourceforge.net/mailarchive/forum.php?forum_id=555 >> -- Alen |