News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

x64 and x87

Started by GregL, September 15, 2007, 04:53:57 AM

Previous topic - Next topic

GregL

I haven't done any x64 assembly programming yet, I have done some reading about it. A question for you guys that are doing x64 programming. Now that the "no x87" urban myth has been mostly put to rest, have any of you done any x87 coding in x64 or do you use SSE/SSE2 etc. entirely. I guess the only advantage it offers is 80-bit extended-precision and built-in transcendental functions.

I have read that Visual C++ 2005 x64 generates only SSE/SSE2 code and will not generate x87 code.

I love programming the FPU, it would be sad to see it fall out of use.


Alloy

 Hi Greg,

  Visual C++ 2005 x64 doesn't generate x87 but you can plug in other c compilers that do. Some still can inline assemble.

  I kinda prefer the SSE2 instructions over the x87 for the usual reasons, easier to keep track of values, no more finit's and the paralellism.

We all used to be something else. Nature has always recycled.

feryno

Hello Greg,
have any of you done any x87 coding in x64 -> yes, without any problem
just don't forget to do FNINIT or EMMS before starting the usage of FPU
(this is because win x64 DLLs use SSE instructions which destroys FPU state)
Exactly as you wrote, my project required 80-bit precision.
Don't trust to myths, go your own way !

GregL

Yeah, and some people are still spreading this myth. And Microsoft is calling x87 code under x64 "legacy" and steering people away from it. Their C compiler for x64 will not do inline asm. If you need 80-bit extended precision for scientific and/or intensive numeric calculations there is no alternative. A good reason to know how to use MASM.