Skip to main content
The compiler for XBOX is the Visual C++ x64 compiler that ships with Visual Studio. Use Visual Studio 2022 (17.12 or 17.14) or the latest Visual Studio 2026 update. XBOX development also supports clang/LLVM for Windows v11 or later. This toolset uses the Visual C/C++ Runtime. If you use MSBuild, use the Visual Studio 2019 or Visual Studio 2022 clang/LLVM integration. Other toolset and runtime combinations might not run or pass certification. For details about upgrading Visual C++ code, see Visual C++ Porting and Upgrading Guide.
The XBOX tooling only works with Microsoft Program Database (PDB) files for debugging symbols. It doesn’t support the CodeView or DWARF debugging information that LLVM .ld files emit.

C++14, C++17, and C++20 language versions and features

Visual Studio 2019, Visual Studio 2022, and Visual Studio 2026 support C++11, C++14, and C++17. Visual Studio 2022 and Visual Studio 2026 also support C++20.

Intrinsics

The Visual C++ compiler doesn’t support x64 inline assembly but does support a wide variety of intrinsics to support inclusion of specialized instruction sets for XBOX development.
Any use of intrinsics assumes that you already verified that the target platform supports the instructions. If you don’t verify support, the app throws runtime invalid instruction exceptions. Pay particular attention to the fact that XBOX One (AMD Jaguar CPU) supports AVX and F16C, and XBOX Series X|S (AMD Hercules CPU) also supports AVX2 and FMA3. Neither platform supports AVX-512 or later instructions.
Visual Studio supports the /arch:AVX and /arch:AVX2 switches, which enable the use of the VEX prefix that’s part of the AVX instruction set standard. Use this switch for all XBOX applications. For more information, see the following articles.

clang/LLVM intrinsics

The clang/LLVM for Windows toolset implements many of the same intrinsics as MSVC, but some key differences exist:
  • clang/LLVM and GNUC treat SSE SIMD types differently than Visual C++ and the Intel Compiler. Specifically, the __m128, __m128i, and __m128d types are opaque types rather than structs, so you can’t create C++ overloaded functions that use those types. This difference also means direct element access through __m128.m128_f32[0] doesn’t compile on clang/LLVM.
For this reason, DirectXMath defines _XM_NO_XMVECTOR_OVERLOADS_ when building by using clang/LLVM. For better portability, you can explicitly define this macro in your code to enforce it for MSVC as well.
  • The cpuid intrinsics for clang/LLVM use a special header #include <cpuid.h>. The __cpuid intrinsic takes a different parameter list, and __cpuid_count is the equivalent of the MSVC __cpuidex but again with a different parameter list.

Calling conventions

The default calling convention for x64 native code is __fastcall, detailed on Microsoft Docs. The __cdecl and __stdcall calling conventions are just aliases for __fastcall on x64. The MSVC and clang/LLVM compilers include support for the __vectorcall calling convention for x86 and x64 code. For more information, see Visual C++ Team Blog: Introducing ‘Vector Calling Convention’ and Microsoft Docs.

Autovectorizer and autoparallelizer

The Visual C++ optimizer can change scalar integer or floating-point computations into SIMD instructions through the autovectorizer. The autovectorizer is automatically enabled with /O2 or /Ox. You can disable it for specific loops by using #pragma loop(no_vector). These compiler toolsets also support autoparallelization for loops by using threads. Enable autoparallelization by using /Qpar. You can provide a hint for a specific loop by using #pragma (loop(hint_parallel(n))). For more information, see the following article.

Reporting bugs

Report bugs for the Visual C++ compiler (if possible) through Visual Studio Report a Problem…. See Microsoft Docs and the Developer Community website. For details on creating a good bug report for the compiler, see this page.
If more NDA information is required to reproduce the issue, you can add a comment to a public report issue marked as “Microsoft only.”
For bug reporting for the clang/LLVM for Windows compiler, use https://bugs.llvm.org/ For bug reports for the Microsoft Standard C++ Library (also known as STL), use https://github.com/microsoft/STL/issues As always, feel free to reach out to your Account Manager for critical issues that need escalation.

Resources

Last modified on October 20, 2026