Eric Fleegal's WebLog

. . . .

No inline assembly on AMD64

Igor Abramov wrote:

“Well, I was in desperate need for 80-bit long doubles. Now I coded this type as set of asm inlines and application prototype shipped in such form. But the production version will be done for amd64, in 64-bit mode for performance reasons, and VS 2005 will not have inline assembler. This means rewriting some code again. “

Because VC++ in VS2005 doesn't allow for inline assembly when targeting amd64, you'll have to rewrite the inline assembly routines as pure assembly and then call them from C++.  However, inline assembly is still permitted when targeting the x86 architecture.

I'm no amd64 expert by any means, but I'm told that using x87 80bit registers might not work because the current version of the OS for amd64 doesn't save the x87 FPU state when context switching; this is one of several reasons why the C++ compiler targets SSE instructions instead of x87 instructions.  I have heard, but don't quote me on this, that future drops of the amd64 Windows OS will save the x87 FPU state.

Perhaps someone reading this post could shed a brighter light on the issue.

Published Friday, July 02, 2004 6:18 PM by ericflee

Comments

 

bbbl67 said:

Yes, you're right, the Windows for AMD64 won't save the x87 state, therefore x87 code is not permitted under the 64-bit mode under Windows. This is not an AMD64 restriction, it is a just a Microsoft restriction. Linux for AMD64 works just fine with x87 code. My guess is that Microsoft is taking this opportunity (i.e. the switchover from 32-bit to 64-bit x86 code) to remove x87 legacy code to simply matters for future programmers. Because x87 is not supported, other instruction sets which depend on the x87's register set won't be supported either, including MMX and 3DNow. It's only going to be SSE from here on in.
July 2, 2004 9:38 PM
 

What's gonna happen to "extended"? | keyongtech said:

January 22, 2009 3:29 AM
Anonymous comments are disabled

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker