Click to Rate and Give Feedback
MSDN
MSDN Library
Windows Driver Kit: Kernel-Mode Driver Architecture
x64 Compiler Limitations

The compiler for x64-based processors has the following known limitations:

  • No support for the /clr switch. The compiler for x64-based processors only generates native code.
  • No support for MMX intrinsic functions.
  • No support for run-time checks using the /RTC switch.
  • No support for security checks using the /GS switch.
  • The _frnd function does not work with arguments whose absolute values are greater than MAX_INT.
  • Inlining into SEH filters can result in invalid code if you use the GetExceptionCode or GetExceptionInfo functions. The symptom could be an executable file that terminates without a dialog box.

    //Avoid using GetExceptionInfo() for this structure
    __inline void funca(DWORD); 
    __try { 
    ... 
    } except(funca(GetExceptionCode())) 

    ... 

    //Instead use the compiler switch /Ob0 to disable inlining or use: 
    __declspec(noinline) 
    // On a class member function if there is a problem 

  • Two special cases of the va_start usage and one special case of va_arg usage are not currently supported.

    Define class string as follows:

    class String1 {
    public:
    String1 (const String1 &);
    ...
    };

    class String2 {
    ...
    };

    Note that String1 has a copy constructor, and String2 could be any class. The following two cases of va_start are not supported:

    <any type> foo1(const String1 last_parameter_with_known_type, ...)
    {
    va_list arg_list;
    va_start(arg_list, last_parameter_with_known_type);
    ...
    }

    <any type> foo2(const String2 &last_parameter_with_known_type, ...)
    {
    va_list arg_list;
    va_start(arg_list, last_parameter_with_known_type);
    ...
    }

    va_start calls are not supported if:

    • Last parameter with known type is an object of class with default copy constructor (the constructor is called to create a copy of object to pass the copy to function foo1).
    • Last parameter with known type is an object passed by reference.

    The following case of va_arg usage is not supported (see the previous String1 definition):

    <any type> foo3(<any type> last_parameter_with_known_type, ...)
    <any type> foo4( )
    {
    String1 q;
    foo3(last_parameter_with_known_type, q);
    }

    The passing of an object of class with default copy constructor in the "..." part of parameters is not supported.

    It does not matter in the previous example if q is a local, global, or temporary variable.

    The fourth case is not supported with object passed by reference in "...", because there are no language-supported ways to do that. The only proposed workaround is to change specifications of foo1, foo2, foo3, and so on to those ones that accept pointers to objects instead.

  • Fatal error C1128: <func:#> object file format limit exceeded: more than 64-KB sections can occur if a file contains many functions. Remove -Gy or split up the file so it contains fewer functions. Removing -Zi or -Z7 also removes a lot of sections, because if -Gy is applied, -Zi forces emission of a .debug$S section for each .text section included.
  • _asm is not supported for x64-based compilers. All assembly code must be written in a separate file, or intrinsic functions must be used.


Send feedback on this topic
Built on August 05, 2009
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker