- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have two questions:
What is a default precision for a 64-bitplatform with AMD CPU? Is it _PC_64?
Here is a piece of codes from 'float.h' header file ( MS Visual Studios 20xx ):
[cpp]... /* Initial Control Word value */ #if defined( _M_IX86 ) #define _CW_DEFAULT ( _RC_NEAR + _PC_53 + _EM_INVALID + _EM_ZERODIVIDE + _EM_OVERFLOW + _EM_UNDERFLOW + _EM_INEXACT + ... ) #elif defined( _M_IA64 ) #define _CW_DEFAULT ( _RC_NEAR + _PC_64 + _EM_INVALID + _EM_ZERODIVIDE + _EM_OVERFLOW + _EM_UNDERFLOW + _EM_INEXACT + ... ) #elif defined( _M_AMD64 ) #define _CW_DEFAULT ( _RC_NEAR + _EM_INVALID + _EM_ZERODIVIDE + _EM_OVERFLOW + _EM_UNDERFLOW + _EM_INEXACT + ... ) #endif ... [/cpp]
What is a default precision for a 64-bitplatform with AMD CPU? Is it _PC_64?
Here is a piece of codes from 'float.h' header file ( MS Visual Studios 20xx ):
[cpp]... /* Initial Control Word value */ #if defined( _M_IX86 ) #define _CW_DEFAULT ( _RC_NEAR + _PC_53 + _EM_INVALID + _EM_ZERODIVIDE + _EM_OVERFLOW + _EM_UNDERFLOW + _EM_INEXACT + ... ) #elif defined( _M_IA64 ) #define _CW_DEFAULT ( _RC_NEAR + _PC_64 + _EM_INVALID + _EM_ZERODIVIDE + _EM_OVERFLOW + _EM_UNDERFLOW + _EM_INEXACT + ... ) #elif defined( _M_AMD64 ) #define _CW_DEFAULT ( _RC_NEAR + _EM_INVALID + _EM_ZERODIVIDE + _EM_OVERFLOW + _EM_UNDERFLOW + _EM_INEXACT + ... ) #endif ... [/cpp]
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
AMD64 here refers to the Windows X64 platform; no distinction regarding Intel64 or AMD64 platforms. The CPU hardware default is 64-bit precision mode (80-bit long double); Microsoft expects software to set 53-bit mode before any user mode x87 instructions are reached.
Microsoft made a change in responsibility for initializing precision mode in the X64 OS. The X64 OS sets 53-bit mode prior to starting your .exe, where the 32-bit OS expected the program to make that initialization. Besides, there is little or no support in the compilers or run-time library for X87 user code in 64-bit mode.
I don't know whether there is a consistency requirement for both the OS and a 32-bit program running under WOW64 to set precision mode. As far as I know, gcc programs run OK under either 32- or 64-bit OS; you might wish to be prepared for the "default" precision mode to be different accordingly. Likewise, when running under linux, you might be prepared for Intel compilers to initialize precision mode where gnu compilers do not.
Microsoft made a change in responsibility for initializing precision mode in the X64 OS. The X64 OS sets 53-bit mode prior to starting your .exe, where the 32-bit OS expected the program to make that initialization. Besides, there is little or no support in the compilers or run-time library for X87 user code in 64-bit mode.
I don't know whether there is a consistency requirement for both the OS and a 32-bit program running under WOW64 to set precision mode. As far as I know, gcc programs run OK under either 32- or 64-bit OS; you might wish to be prepared for the "default" precision mode to be different accordingly. Likewise, when running under linux, you might be prepared for Intel compilers to initialize precision mode where gnu compilers do not.
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
AMD64 here refers to the Windows X64 platform; no distinction regarding Intel64 or AMD64 platforms. The CPU hardware default is 64-bit precision mode (80-bit long double); Microsoft expects software to set 53-bit mode before any user mode x87 instructions are reached.
Microsoft made a change in responsibility for initializing precision mode in the X64 OS. The X64 OS sets 53-bit mode prior to starting your .exe, where the 32-bit OS expected the program to make that initialization. Besides, there is little or no support in the compilers or run-time library for X87 user code in 64-bit mode.
I don't know whether there is a consistency requirement for both the OS and a 32-bit program running under WOW64 to set precision mode. As far as I know, gcc programs run OK under either 32- or 64-bit OS; you might wish to be prepared for the "default" precision mode to be different accordingly. Likewise, when running under linux, you might be prepared for Intel compilers to initialize precision mode where gnu compilers do not.
Microsoft made a change in responsibility for initializing precision mode in the X64 OS. The X64 OS sets 53-bit mode prior to starting your .exe, where the 32-bit OS expected the program to make that initialization. Besides, there is little or no support in the compilers or run-time library for X87 user code in 64-bit mode.
I don't know whether there is a consistency requirement for both the OS and a 32-bit program running under WOW64 to set precision mode. As far as I know, gcc programs run OK under either 32- or 64-bit OS; you might wish to be prepared for the "default" precision mode to be different accordingly. Likewise, when running under linux, you might be prepared for Intel compilers to initialize precision mode where gnu compilers do not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting TimP (Intel)
AMD64 here refers to the Windows X64 platform; no distinction regarding Intel64 or AMD64 platforms...
Thank you! It was really confusing.
Best regards,
Sergey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I finally found a topic in MSDN:
"How to: Enable a 64-Bit Visual C++ Toolset at the Command Line"
that explains it, but in a little bit different way:
...
Argument: "x86_amd64"
Compiler: x64 Cross
Host: X86, x64, Itanium
Target Architecture: x64
...
or
...
Argument: "amd64"
Compiler: x64 Native
Host: x64
Target Architecture: x64
...
"How to: Enable a 64-Bit Visual C++ Toolset at the Command Line"
that explains it, but in a little bit different way:
...
Argument: "x86_amd64"
Compiler: x64 Cross
Host: X86, x64, Itanium
Target Architecture: x64
...
or
...
Argument: "amd64"
Compiler: x64 Native
Host: x64
Target Architecture: x64
...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
...and it explains why MS Depends shows 'AMD64' in a CPU columnfora 64-bit application:
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page