Linked by David Adams on Sun 14th Aug 2011 22:41 UTC, submitted by subterrific
General Development The final ISO ballot on C++0x closed on Wednesday, and we just received the results: Unanimous approval. The next revision of C++ that we've been calling "C++0x" is now an International Standard! Geneva will take several months to publish it, but we hope it will be published well within the year, and then we'll be able to call it "C++11."
Permalink for comment 485027
To read all comments associated with this story, please click here.
RE[5]: Yet another standard...
by dpJudas on Mon 15th Aug 2011 08:53 UTC in reply to "RE[4]: Yet another standard..."
dpJudas
Member since:
2009-12-10

If the place for in-line assembly is .asm/.s files (says who exactly?), why do ***ALL*** major compilers, including visual C itself, support in-line assembly, outside that is, Visual Studio 64bit (2K5/8/10)?


It is very simple really. Microsoft decided that porting the in-line assembly code to support 64 bit was too much work. So they decided not to bother since in-line assembly really complicates the optimization stages of the compiler. And since the days when in-line assembly was "invented", compiler vendors realized that creating intrinsic functions was a much better solution.

The intrinsic functions have the key advantage that they can be optimized further by the compiler, which means things like register management and memory locations for variables can still be controlled by the usual optimization stages.

This means that some SSE2 code that is written with assembly will have to be re-written for x64 if you want to take advantage of the new set of registers, while the version using intrinsics will simply have to be recompiled. The intrinsic version also just works on GCC, Intel's compiler, MINGW, LLVM. This is also not the case for assembly.

Now if you still believe you're so pro that you can outsmart the compiler's optimization stages, then surely moving your code to an .asm file and doing the x64 function prolog should be a trivial one-time problem, right?

Reply Parent Score: 2